|
|
import{ct as e,it as t,n,ut as r}from"./axios-CiYFffbI.js";import{A as i,C as a,E as o,G as s,I as c,N as l,O as u,V as d,Y as f,_ as p,d as m,it as h,kt as g,l as _,p as v,q as y,ut as b,v as x,y as S}from"./runtime-core.esm-bundler-CnFWH3R5.js";import{o as C}from"./index-DhmwAFpV.js";var w=e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.Quill=r():n.Quill=r()})(typeof self<`u`?self:e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=109)})([(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=n(17),i=n(18),a=n(19),o=n(45),s=n(46),c=n(47),l=n(48),u=n(49),d=n(12),f=n(32),p=n(33),m=n(31),h=n(1);t.default={Scope:h.Scope,create:h.create,find:h.find,query:h.query,register:h.register,Container:r.default,Format:i.default,Leaf:a.default,Embed:l.default,Scroll:o.default,Block:c.default,Inline:s.default,Text:u.default,Attributor:{Attribute:d.default,Class:f.default,Style:p.default,Store:m.default}}}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=function(e){r(t,e);function t(t){var n=this;return t=`[Parchment] `+t,n=e.call(this,t)||this,n.message=t,n.name=n.constructor.name,n}return t}(Error);t.ParchmentError=i;var a={},o={},s={},c={};t.DATA_KEY=`__blot`;var l;(function(e){e[e.TYPE=3]=`TYPE`,e[e.LEVEL=12]=`LEVEL`,e[e.ATTRIBUTE=13]=`ATTRIBUTE`,e[e.BLOT=14]=`BLOT`,e[e.INLINE=7]=`INLINE`,e[e.BLOCK=11]=`BLOCK`,e[e.BLOCK_BLOT=10]=`BLOCK_BLOT`,e[e.INLINE_BLOT=6]=`INLINE_BLOT`,e[e.BLOCK_ATTRIBUTE=9]=`BLOCK_ATTRIBUTE`,e[e.INLINE_ATTRIBUTE=5]=`INLINE_ATTRIBUTE`,e[e.ANY=15]=`ANY`})(l=t.Scope||={});function u(e,t){var n=f(e);if(n==null)throw new i(`Unable to create `+e+` blot`);var r=n;return new r(e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t),t)}t.create=u;function d(e,n){return n===void 0&&(n=!1),e==null?null:e[t.DATA_KEY]==null?n?d(e.parentNode,n):null:e[t.DATA_KEY].blot}t.find=d;function f(e,t){t===void 0&&(t=l.ANY);var n;if(typeof e==`string`)n=c[e]||a[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=c.text;else if(typeof e==`number`)e&l.LEVEL&l.BLOCK?n=c.block:e&l.LEVEL&l.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute(`class`)||``).split(/\s+/);for(var i in r)if(n=o[r[i]],n)break;n||=s[e.tagName]}return n==null?null:t&l.LEVEL&n.scope&&t&l.TYPE&n.scope?n:null}t.query=f;function p(){var e=[...arguments];if(e.length>1)return e.map(function(e){return p(e)});var t=e[0];if(typeof t.blotName!=`string`&&typeof t.attrName!=`string`)throw new i(`Invalid definition`);if(t.blotName===`abstract`)throw new i(`Cannot register abstract class`);return c[t.blotName||t.attrName]=t,typeof t.keyName==`string`?a[t.keyName]=t:(t.className!=null&&(o[t.className]=t),t.tagName!=null&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(function(e){return e.toUpperCase()}):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(function(e){(s[e]==null||t.className==null)&&(s[e]=t)}))),t}t.register=p}),(function(e,t,n){var r=n(51),i=n(11),a=n(3),o=n(20),s=`\0`,c=function(e){Array.isArray(e)?this.ops=e:e!=null&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};c.prototype.insert=function(e,t){var n={};return e.length===0?this:(n.insert=e,typeof t==`object`&&t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},c.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},c.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return typeof t==`object`&&t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},c.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=a(!0,{},e),typeof n==`object`){if(typeof e.delete==`number`&&typeof n.delete==`number`)return this.ops[t-1]={delete:n.delete+e.delete},this;if(typeof n.delete==`number`&&e.insert!=null&&(--t,n=this.ops[t-1],typeof n!=`object`))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if(typeof e.insert==`string`&&typeof n.insert==`string`)return this.ops[t-1]={insert:n.insert+e.insert},typeof e.attributes==`object`&&(this.ops[t-1].attributes=e.attributes),this;if(typeof e.retain==`number`&&typeof n.retain==`number`)return this.ops[t-1]={retain:n.retain+e.retain},typeof e.attributes==`object`&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},c.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},c.prototype.filter=function(e){return this.ops.filter(e)},c.prototype.forEach=function(e){this.ops.forEach(e)},c.prototype.map=function(e){return this.ops.map(e)},c.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},c.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},c.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+o.length(t):t.delete?e-t.delete:e},0)},c.prototype.length=function(){return this.reduce(function(e,t){return e+o.length(t)},0)},c.prototype.slice=function(e,t){e||=0,typeof t!=`number`&&(t=1/0);for(var n=[],r=o.iterator(this.ops),i=0;i<t&&r.hasNext();){var a;i<e?a=r.next(e-i):(a=r.next(t-i),n.push(a)),i+=o.length(a)}return new c(n)},c.prototype.compose=function(e){var t=o.iterator(this.ops),n=o.iterator(e.ops),r=[],a=n.peek();if(a!=null&&typeof a.retain==`number`&&a.attributes==null){for(var s=a.retain;t.peekType()===`insert`&&t.peekLength()<=s;)s-=t.peekLength(),r.push(t.next());a.retain-s>0&&n.next(a.retain-s)}for(var l=new c(r);t.hasNext()||n.hasNext();)if(n.peekType()===`insert`)l.push(n.next());else if(t.peekType()===`delete`)l.push(t.next());else{var u=Math.min(t.peekLength(),n.peekLength()),d=t.next(u),f=n.next(u);if(typeof f.retain==`number`){var p={};typeof d.retain==`number`?p.retain=u:p.insert=d.insert;var m=o.attributes.compose(d.attributes,f.attributes,typeof d.retain==`number`);if(m&&(p.attributes=m),l.push(p),!n.hasNext()&&i(l.ops[l.ops.length-1],p)){var h=new c(t.rest());return l.concat(h).chop()}}else typeof f.delete==`number`&&typeof d.retain==`number`&&l.push(f)}return l.chop()},c.prototype.concat=function(e){var t=new c(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},c.prototype.diff=function(e,t){if(this.ops===e.ops)return new c;var n=[this,e].map(function(t){return t.map(function(n){if(n.insert!=null)return typeof n.insert==`string`?n.insert:s;throw Error(`diff() called `+(t===e?`on`:`with`)+` non-document`)}).join(``)}),a=new c,l=r(n[0],n[1],t),u=o.iterator(this.ops),d=o.iterator(e.ops);return l.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(d.peekLength(),t),a.push(d.next(n));break;case r.DELETE:n=Math.min(t,u.peekLength()),u.next(n),a.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),t);var s=u.next(n),c=d.next(n);i(s.insert,c.insert)?a.retain(n,o.attributes.diff(s.attributes,c.attributes)):a.push(c).delete(n);break}t-=n}}),a.chop()},c.prototype.eachLine=function(e,t){t||=`
|
|
|
`;for(var n=o.iterator(this.ops),r=new c,i=0;n.hasNext();){if(n.peekType()!==`insert`)return;var a=n.peek(),s=o.length(a)-n.peekLength(),l=typeof a.insert==`string`?a.insert.indexOf(t,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(e(r,n.next(1).attributes||{},i)===!1)return;i+=1,r=new c}}r.length()>0&&e(r,{},i)},c.prototype.transform=function(e,t){if(t=!!t,typeof e==`number`)return this.transformPosition(e,t);for(var n=o.iterator(this.ops),r=o.iterator(e.ops),i=new c;n.hasNext()||r.hasNext();)if(n.peekType()===`insert`&&(t||r.peekType()!==`insert`))i.retain(o.length(n.next()));else if(r.peekType()===`insert`)i.push(r.next());else{var a=Math.min(n.peekLength(),r.peekLength()),s=n.next(a),l=r.next(a);if(s.delete)continue;l.delete?i.push(l):i.retain(a,o.attributes.transform(s.attributes,l.attributes,t))}return i.chop()},c.prototype.transformPosition=function(e,t){t=!!t;for(var n=o.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),a=n.peekType();if(n.next(),a===`delete`){e-=Math.min(i,e-r);continue}else a===`insert`&&(r<e||!t)&&(e+=i);r+=i}return e},e.exports=c}),(function(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=d(n(3)),o=d(n(2)),s=d(n(0)),c=d(n(16)),l=d(n(6)),u=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function p(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function m(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=1,g=function(e){m(t,e);function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`attach`,value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`attach`,this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:`delta`,value:function(){return new o.default().insert(this.value(),(0,a.default)(this.formats(),this.attributes.values()))}},{key:`format`,value:function(e,t){var n=s.default.query(e,s.default.Scope.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,t)}},{key:`formatAt`,value:function(e,t,n,r){this.format(n,r)}},{key:`insertAt`,value:function(e,n,r){if(typeof n==`string`&&n.endsWith(`
|
|
|
`)){var a=s.default.create(_.blotName);this.parent.insertBefore(a,e===0?this:this.next),a.insertAt(0,n.slice(0,-1))}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`insertAt`,this).call(this,e,n,r)}}]),t}(s.default.Embed);g.scope=s.default.Scope.BLOCK_BLOT;var _=function(e){m(t,e);function t(e){f(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return r(t,[{key:`delta`,value:function(){return this.cache.delta??(this.cache.delta=this.descendants(s.default.Leaf).reduce(function(e,t){return t.length()===0?e:e.insert(t.value(),v(t))},new o.default).insert(`
|
|
|
`,v(this))),this.cache.delta}},{key:`deleteAt`,value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`deleteAt`,this).call(this,e,n),this.cache={}}},{key:`formatAt`,value:function(e,n,r,a){n<=0||(s.default.query(r,s.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,a):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`formatAt`,this).call(this,e,Math.min(n,this.length()-e-1),r,a),this.cache={})}},{key:`insertAt`,value:function(e,n,r){if(r!=null)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`insertAt`,this).call(this,e,n,r);if(n.length!==0){var a=n.split(`
|
|
|
`),o=a.shift();o.length>0&&(e<this.length()-1||this.children.tail==null?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`insertAt`,this).call(this,Math.min(e,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});var s=this;a.reduce(function(e,t){return s=s.split(e,!0),s.insertAt(0,t),t.length},e+o.length)}}},{key:`insertBefore`,value:function(e,n){var r=this.children.head;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`insertBefore`,this).call(this,e,n),r instanceof c.default&&r.remove(),this.cache={}}},{key:`length`,value:function(){return this.cache.length??(this.cache.length=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`length`,this).call(this)+h),this.cache.length}},{key:`moveChildren`,value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`moveChildren`,this).call(this,e,n),this.cache={}}},{key:`optimize`,value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`optimize`,this).call(this,e),this.cache={}}},{key:`path`,value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`path`,this).call(this,e,!0)}},{key:`removeChild`,value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`removeChild`,this).call(this,e),this.cache={}}},{key:`split`,value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n&&(e===0||e>=this.length()-h)){var r=this.clone();return e===0?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}else{var a=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`split`,this).call(this,e,n);return this.cache={},a}}}]),t}(s.default.Block);_.blotName=`block`,_.tagName=`P`,_.defaultChild=`break`,_.allowedChildren=[l.default,s.default.Embed,u.default];function v(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e==null||(typeof e.formats==`function`&&(t=(0,a.default)(t,e.formats())),e.parent==null||e.parent.blotName==`scroll`||e.parent.statics.scope!==e.statics.scope)?t:v(e.parent,t)}t.bubbleFormats=v,t.BlockEmbed=g,t.default=_}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(50);var o=g(n(2)),s=g(n(14)),c=g(n(8)),l=g(n(9)),u=g(n(0)),d=n(15),f=g(d),p=g(n(3)),m=g(n(10)),h=g(n(34));function g(e){return e&&e.__esModule?e:{default:e}}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var y=(0,m.default)(`quill`),b=function(){a(e,null,[{key:`debug`,value:function(e){e===!0&&(e=`log`),m.default.level(e)}},{key:`find`,value:function(e){return e.__quill||u.default.find(e)}},{key:`import`,value:function(e){return this.imports[e]??y.error(`Cannot import `+e+`. Are you sure it was registered?`),this.imports[e]}},{key:`register`,value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof e!=`string`){var i=e.attrName||e.blotName;typeof i==`string`?this.register(`formats/`+i,e,t):Object.keys(e).forEach(function(r){n.register(r,e[r],t)})}else this.imports[e]!=null&&!r&&y.warn(`Overwriting `+e+` with`,t),this.imports[e]=t,(e.startsWith(`blots/`)||e.startsWith(`formats/`))&&t.blotName!==`abstract`?u.default.register(t):e.startsWith(`modules`)&&typeof t.register==`function`&&t.register()}}]);function e(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(v(this,e),this.options=x(t,r),this.container=this.options.container,this.container==null)return y.error(`Invalid Quill container`,t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add(`ql-container`),this.container.innerHTML=``,this.container.__quill=this,this.root=this.addContainer(`ql-editor`),this.root.classList.add(`ql-blank`),this.root.setAttribute(`data-gramm`,!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new c.default,this.scroll=u.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new f.default(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.theme.init(),this.emitter.on(c.default.events.EDITOR_CHANGE,function(e){e===c.default.events.TEXT_CHANGE&&n.root.classList.toggle(`ql-blank`,n.editor.isBlank())}),this.emitter.on(c.default.events.SCROLL_UPDATE,function(e,t){var r=n.selection.lastRange,i=r&&r.length===0?r.index:void 0;S.call(n,function(){return n.editor.update(null,t,i)},e)});var a=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+i+`<p><br></p></div>`);this.setContents(a),this.history.clear(),this.options.placeholder&&this.root.setAttribute(`data-placeholder`,this.options.placeholder),this.options.readOnly&&this.disable()}return a(e,[{key:`addContainer`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e==`string`){var n=e;e=document.createElement(`div`),e.classList.add(n)}return this.container.insertBefore(e,t),e}},{key:`blur`,value:function(){this.selection.setRange(null)}},{key:`deleteText`,value:function(e,t,n){var r=this,a=i(C(e,t,n),4);return e=a[0],t=a[1],n=a[3],S.call(this,function(){return r.editor.deleteText(e,t)},n,e,-1*t)}},{key:`disable`,value:function(){this.enable(!1)}},{key:`enable`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle(`ql-disabled`,!e)}},{key:`focus`,value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:`format`,value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:c.default.sources.API;return S.call(this,function(){var r=n.getSelection(!0),i=new o.default;if(r==null)return i;if(u.default.query(e,u.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,_({},e,t));else if(r.length===0)return n.selection.format(e,t),i;else i=n.editor.formatText(r.index,r.length,_({},e,t));return n.setSelection(r,c.default.sources.SILENT),i},r)}},{key:`formatLine`,value:function(e,t,n,r,a){var o=this,s=void 0,c=i(C(e,t,n,r,a),4);return e=c[0],t=c[1],s=c[2],a=c[3],S.call(this,function(){return o.editor.formatLine(e,t,s)},a,e,0)}},{key:`formatText`,value:function(e,t,n,r,a){var o=this,s=void 0,c=i(C(e,t,n,r,a),4);return e=c[0],t=c[1],s=c[2],a=c[3],S.call(this,function(){return o.editor.formatText(e,t,s)},a,e,0)}},{key:`getBounds`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=void 0;n=typeof e==`number`?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var 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}}},{key:`getContents`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e,n=i(C(e,t),2);return e=n[0],t=n[1],this.editor.getContents(e,t)}},{key:`getFormat`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e==`number`?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:`getIndex`,value:function(e){return e.offset(this.scroll)}},{key:`getLength`,value:function(){return this.scroll.length()}},{key:`getLeaf`,value:function(e){return this.scroll.leaf(e)}},{key:`getLine`,value:function(e){return this.scroll.line(e)}},{key:`getLines`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e==`number`?this.scroll.lines(e,t):this.scroll.lines(e.index,e.length)}},{key:`getModule`,value:function(e){return this.theme.modules[e]}},{key:`getSelection`,value:function(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:`getText`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e,n=i(C(e,t),2);return e=n[0],t=n[1],this.editor.getText(e,t)}},{key:`hasFocus`,value:function(){return this.selection.hasFocus()}},{key:`insertEmbed`,value:function(t,n,r){var i=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e.sources.API;return S.call(this,function(){return i.editor.insertEmbed(t,n,r)},a,t)}},{key:`insertText`,value:function(e,t,n,r,a){var o=this,s=void 0,c=i(C(e,0,n,r,a),4);return e=c[0],s=c[2],a=c[3],S.call(this,function(){return o.editor.insertText(e,t,s)},a,e,t.length)}},{key:`isEnabled`,value:function(){return!this.container.classList.contains(`ql-disabled`)}},{key:`off`,value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:`on`,value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:`once`,value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:`pasteHTML`,value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:`removeFormat`,value:function(e,t,n){var r=this,a=i(C(e,t,n),4);return e=a[0],t=a[1],n=a[3],S.call(this,function(){return r.editor.removeFormat(e,t)},n,e)}},{key:`scrollIntoView`,value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:`setContents`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.default.sources.API;return S.call(this,function(){e=new o.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),a=i.ops[i.ops.length-1];return a!=null&&typeof a.insert==`string`&&a.insert[a.insert.length-1]===`
|
|
|
`&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)},n)}},{key:`setSelection`,value:function(t,n,r){if(t==null)this.selection.setRange(null,n||e.sources.API);else{var a=i(C(t,n,r),4);t=a[0],n=a[1],r=a[3],this.selection.setRange(new d.Range(t,n),r),r!==c.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:`setText`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.default.sources.API,n=new o.default().insert(e);return this.setContents(n,t)}},{key:`update`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:`updateContents`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.default.sources.API;return S.call(this,function(){return e=new o.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:``,readOnly:!1,scrollingContainer:null,strict:!0,theme:`default`},b.events=c.default.events,b.sources=c.default.sources,b.version=`1.3.7`,b.imports={delta:o.default,parchment:u.default,"core/module":l.default,"core/theme":h.default};function x(e,t){if(t=(0,p.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t),!t.theme||t.theme===b.DEFAULTS.theme)t.theme=h.default;else if(t.theme=b.import(`themes/`+t.theme),t.theme==null)throw Error(`Invalid theme `+t.theme+`. Did you register it?`);var n=(0,p.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){e.modules[t]===!0&&(e.modules[t]={})})});var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce(function(e,t){var n=b.import(`modules/`+t);return n==null?y.error(`Cannot load `+t+` module. Are you sure you registered it?`):e[t]=n.DEFAULTS||{},e},{});return t.modules!=null&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,p.default)(!0,{},b.DEFAULTS,{modules:r},n,t),[`bounds`,`container`,`scrollingContainer`].forEach(function(e){typeof t[e]==`string`&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e},{}),t}function S(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===c.default.sources.USER)return new o.default;var i=n==null?null:this.getSelection(),a=this.editor.delta,s=e();if(i!=null&&(n===!0&&(n=i.index),r==null?i=w(i,s,t):r!==0&&(i=w(i,n,r,t)),this.setSelection(i,c.default.sources.SILENT)),s.length()>0){var l,u=[c.default.events.TEXT_CHANGE,s,a,t];if((l=this.emitter).emit.apply(l,[c.default.events.EDITOR_CHANGE].concat(u)),t!==c.default.sources.SILENT){var d;(d=this.emitter).emit.apply(d,u)}}return s}function C(e,t,n,i,a){var o={};return typeof e.index==`number`&&typeof e.length==`number`?typeof t==`number`?(t=e.length,e=e.index):(a=i,i=n,n=t,t=e.length,e=e.index):typeof t!=`number`&&(a=i,i=n,n=t,t=0),(n===void 0?`undefined`:r(n))===`object`?(o=n,a=i):typeof n==`string`&&(i==null?a=n:o[n]=i),a||=c.default.sources.API,[e,t,o,a]}function w(e,t,n,r){if(e==null)return null;var a=void 0,s=void 0;if(t instanceof o.default){var l=i([e.index,e.index+e.length].map(function(e){return t.transformPosition(e,r!==c.default.sources.USER)}),2);a=l[0],s=l[1]}else{var u=i([e.index,e.index+e.length].map(function(e){return e<t||e===t&&r===c.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)}),2);a=u[0],s=u[1]}return new d.Range(a,s-a)}t.expandConfig=x,t.overload=C,t.default=b}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=s(n(7)),o=s(n(0));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function l(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function u(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){u(t,e);function t(){return c(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`formatAt`,value:function(e,n,r,a){if(t.compare(this.statics.blotName,r)<0&&o.default.query(r,o.default.Scope.BLOT)){var s=this.isolate(e,n);a&&s.wrap(r,a)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`formatAt`,this).call(this,e,n,r,a)}},{key:`optimize`,value:function(e){if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`optimize`,this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:`compare`,value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}}]),t}(o.default.Inline);d.allowedChildren=[d,o.default.Embed,a.default],d.order=[`cursor`,`inline`,`underline`,`strike`,`italic`,`bold`,`script`,`link`,`code`],t.default=d}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=i(n(0));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.default=function(e){s(t,e);function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(r.default.Text)}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=s(n(54)),o=s(n(10));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function l(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function u(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=(0,o.default)(`quill:events`);[`selectionchange`,`mousedown`,`mouseup`,`click`].forEach(function(e){document.addEventListener(e,function(){var e=[...arguments];[].slice.call(document.querySelectorAll(`.ql-container`)).forEach(function(t){if(t.__quill&&t.__quill.emitter){var n;(n=t.__quill.emitter).handleDOM.apply(n,e)}})})});var f=function(e){u(t,e);function t(){c(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on(`error`,d.error),e}return r(t,[{key:`emit`,value:function(){d.log.apply(d,arguments),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`emit`,this).apply(this,arguments)}},{key:`handleDOM`,value:function(e){var t=[...arguments].slice(1);(this.listeners[e.type]||[]).forEach(function(n){var r=n.node,i=n.handler;(e.target===r||r.contains(e.target))&&i.apply(void 0,[e].concat(t))})}},{key:`listenDOM`,value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(a.default);f.events={EDITOR_CHANGE:`editor-change`,SCROLL_BEFORE_UPDATE:`scroll-before-update`,SCROLL_OPTIMIZE:`scroll-optimize`,SCROLL_UPDATE:`scroll-update`,SELECTION_CHANGE:`selection-change`,TEXT_CHANGE:`text-change`},f.sources={API:`api`,SILENT:`silent`,USER:`user`},t.default=f}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var i=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r(this,e),this.quill=t,this.options=n};i.DEFAULTS={},t.default=i}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=[`error`,`warn`,`log`,`info`],i=`warn`;function a(e){if(r.indexOf(e)<=r.indexOf(i)){var t,n=[...arguments].slice(1);(t=console)[e].apply(t,n)}}function o(e){return r.reduce(function(t,n){return t[n]=a.bind(console,n,e),t},{})}a.level=o.level=function(e){i=e},t.default=o}),(function(e,t,n){var r=Array.prototype.slice,i=n(52),a=n(53),o=e.exports=function(e,t,n){return n||={},e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||typeof e!=`object`&&typeof t!=`object`?n.strict?e===t:e==t:l(e,t,n)};function s(e){return e==null}function c(e){return!(!e||typeof e!=`object`||typeof e.length!=`number`||typeof e.copy!=`function`||typeof e.slice!=`function`||e.length>0&&typeof e[0]!=`number`)}function l(e,t,n){var l,u;if(s(e)||s(t)||e.prototype!==t.prototype)return!1;if(a(e))return a(t)?(e=r.call(e),t=r.call(t),o(e,t,n)):!1;if(c(e)){if(!c(t)||e.length!==t.length)return!1;for(l=0;l<e.length;l++)if(e[l]!==t[l])return!1;return!0}try{var d=i(e),f=i(t)}catch{return!1}if(d.length!=f.length)return!1;for(d.sort(),f.sort(),l=d.length-1;l>=0;l--)if(d[l]!=f[l])return!1;for(l=d.length-1;l>=0;l--)if(u=d[l],!o(e[u],t[u],n))return!1;return typeof e==typeof t}}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=n(1);t.default=function(){function e(e,t,n){n===void 0&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;n.scope==null?this.scope=r.Scope.ATTRIBUTE:this.scope=n.scope&r.Scope.LEVEL|i,n.whitelist!=null&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1},e.prototype.canAdd=function(e,t){return r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))==null?!1:this.whitelist==null?!0:typeof t==`string`?this.whitelist.indexOf(t.replace(/["']/g,``))>-1:this.whitelist.indexOf(t)>-1},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:``},e}()}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=t.Code=void 0;var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},o=d(n(2)),s=d(n(0)),c=d(n(4)),l=d(n(6)),u=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function p(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function m(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){m(t,e);function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(l.default);h.blotName=`code`,h.tagName=`CODE`;var g=function(e){m(t,e);function t(){return f(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,[{key:`delta`,value:function(){var e=this,t=this.domNode.textContent;return t.endsWith(`
|
|
|
`)&&(t=t.slice(0,-1)),t.split(`
|
|
|
`).reduce(function(t,n){return t.insert(n).insert(`
|
|
|
`,e.formats())},new o.default)}},{key:`format`,value:function(e,n){if(!(e===this.statics.blotName&&n)){var i=r(this.descendant(u.default,this.length()-1),1)[0];i?.deleteAt(i.length()-1,1),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`format`,this).call(this,e,n)}}},{key:`formatAt`,value:function(e,n,r,i){if(n!==0&&!(s.default.query(r,s.default.Scope.BLOCK)==null||r===this.statics.blotName&&i===this.statics.formats(this.domNode))){var a=this.newlineIndex(e);if(!(a<0||a>=e+n)){var o=this.newlineIndex(e,!0)+1,c=a-o+1,l=this.isolate(o,c),u=l.next;l.format(r,i),u instanceof t&&u.formatAt(0,e-o+n-c,r,i)}}}},{key:`insertAt`,value:function(e,t,n){if(n==null){var i=r(this.descendant(u.default,e),2),a=i[0],o=i[1];a.insertAt(o,t)}}},{key:`length`,value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
|
`)?e:e+1}},{key:`newlineIndex`,value:function(e){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf(`
|
|
|
`);var t=this.domNode.textContent.slice(e).indexOf(`
|
|
|
`);return t>-1?e+t:-1}},{key:`optimize`,value:function(e){this.domNode.textContent.endsWith(`
|
|
|
`)||this.appendChild(s.default.create(`text`,`
|
|
|
`)),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`optimize`,this).call(this,e);var n=this.next;n!=null&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:`replace`,value:function(e){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`replace`,this).call(this,e),[].slice.call(this.domNode.querySelectorAll(`*`)).forEach(function(e){var t=s.default.find(e);t==null?e.parentNode.removeChild(e):t instanceof s.default.Embed?t.remove():t.unwrap()})}}],[{key:`create`,value:function(e){var n=a(t.__proto__||Object.getPrototypeOf(t),`create`,this).call(this,e);return n.setAttribute(`spellcheck`,!1),n}},{key:`formats`,value:function(){return!0}}]),t}(c.default);g.blotName=`code-block`,g.tagName=`PRE`,g.TAB=` `,t.Code=h,t.default=g}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=_(n(2)),s=_(n(20)),c=_(n(0)),l=_(n(13)),u=_(n(24)),d=n(4),f=_(d),p=_(n(16)),m=_(n(21)),h=_(n(11)),g=_(n(3));function _(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var b=/^[ -~]*$/,x=function(){function e(t){y(this,e),this.scroll=t,this.delta=this.getDelta()}return a(e,[{key:`applyDelta`,value:function(e){var t=this,n=!1;this.scroll.update();var a=this.scroll.length();return this.scroll.batchStart(),e=C(e),e.reduce(function(e,o){var l=o.retain||o.delete||o.insert.length||1,u=o.attributes||{};if(o.insert!=null){if(typeof o.insert==`string`){var p=o.insert;p.endsWith(`
|
|
|
`)&&n&&(n=!1,p=p.slice(0,-1)),e>=a&&!p.endsWith(`
|
|
|
`)&&(n=!0),t.scroll.insertAt(e,p);var m=i(t.scroll.line(e),2),h=m[0],_=m[1],v=(0,g.default)({},(0,d.bubbleFormats)(h));if(h instanceof f.default){var y=i(h.descendant(c.default.Leaf,_),1)[0];v=(0,g.default)(v,(0,d.bubbleFormats)(y))}u=s.default.attributes.diff(v,u)||{}}else if(r(o.insert)===`object`){var b=Object.keys(o.insert)[0];if(b==null)return e;t.scroll.insertAt(e,b,o.insert[b])}a+=l}return Object.keys(u).forEach(function(n){t.scroll.formatAt(e,l,n,u[n])}),e+l},0),e.reduce(function(e,n){return typeof n.delete==`number`?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(e)}},{key:`deleteText`,value:function(e,t){return this.scroll.deleteAt(e,t),this.update(new o.default().retain(e).delete(t))}},{key:`formatLine`,value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(i){if(!(n.scroll.whitelist!=null&&!n.scroll.whitelist[i])){var a=n.scroll.lines(e,Math.max(t,1)),o=t;a.forEach(function(t){var a=t.length();if(!(t instanceof l.default))t.format(i,r[i]);else{var s=e-t.offset(n.scroll),c=t.newlineIndex(s+o)-s+1;t.formatAt(s,c,i,r[i])}o-=a})}}),this.scroll.optimize(),this.update(new o.default().retain(e).retain(t,(0,m.default)(r)))}},{key:`formatText`,value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t,i,r[i])}),this.update(new o.default().retain(e).retain(t,(0,m.default)(r)))}},{key:`getContents`,value:function(e,t){return this.delta.slice(e,e+t)}},{key:`getDelta`,value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new o.default)}},{key:`getFormat`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],r=[];t===0?this.scroll.path(e).forEach(function(e){var t=i(e,1)[0];t instanceof f.default?n.push(t):t instanceof c.default.Leaf&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(c.default.Leaf,e,t));var a=[n,r].map(function(e){if(e.length===0)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(n==null)return t;t=S((0,d.bubbleFormats)(n),t)}return t});return g.default.apply(g.default,a)}},{key:`getText`,value:function(e,t){return this.getContents(e,t).filter(function(e){return typeof e.insert==`string`}).map(function(e){return e.insert}).join(``)}},{key:`insertEmbed`,value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update(new o.default().retain(e).insert(v({},t,n)))}},{key:`insertText`,value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),this.scroll.insertAt(e,t),Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t.length,i,r[i])}),this.update(new o.default().retain(e).insert(t,(0,m.default)(r)))}},{key:`isBlank`,value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName!==f.default.blotName||e.children.length>1?!1:e.children.head instanceof p.default}},{key:`removeFormat`,value:function(e,t){var n=this.getText(e,t),r=i(this.scroll.line(e+t),2),a=r[0],s=r[1],c=0,u=new o.default;a!=null&&(c=a instanceof l.default?a.newlineIndex(s)-s+1:a.length()-s,u=a.delta().slice(s,s+c-1).insert(`
|
|
|
`));var d=this.getContents(e,t+c).diff(new o.default().insert(n).concat(u)),f=new o.default().retain(e).concat(d);return this.applyDelta(f)}},{key:`update`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=this.delta;if(t.length===1&&t[0].type===`characterData`&&t[0].target.data.match(b)&&c.default.find(t[0].target)){var i=c.default.find(t[0].target),a=(0,d.bubbleFormats)(i),s=i.offset(this.scroll),l=t[0].oldValue.replace(u.default.CONTENTS,``),f=new o.default().insert(l),p=new o.default().insert(i.value());e=new o.default().retain(s).concat(f.diff(p,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,a):e.push(t)},new o.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),(!e||!(0,h.default)(r.compose(e),this.delta))&&(e=r.diff(this.delta,n));return e}}]),e}();function S(e,t){return Object.keys(t).reduce(function(n,r){return e[r]==null||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n},{})}function C(e){return e.reduce(function(e,t){if(t.insert===1){var n=(0,m.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(t.attributes!=null&&(t.attributes.list===!0||t.attributes.bullet===!0)&&(t=(0,m.default)(t),t.attributes.list?t.attributes.list=`ordered`:(t.attributes.list=`bullet`,delete t.attributes.bullet)),typeof t.insert==`string`){var r=t.insert.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`);return e.insert(r,t.attributes)}return e.push(t)},new o.default)}t.default=x}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=t.Range=void 0;var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=u(n(0)),o=u(n(21)),s=u(n(11)),c=u(n(8)),l=u(n(10));function u(e){return e&&e.__esModule?e:{default:e}}function d(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}function f(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var p=(0,l.default)(`quill:selection`),m=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;f(this,e),this.index=t,this.length=n},h=function(){function e(t,n){var r=this;f(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=a.default.create(`cursor`,this),this.lastRange=this.savedRange=new m(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM(`selectionchange`,document,function(){r.mouseDown||setTimeout(r.update.bind(r,c.default.sources.USER),1)}),this.emitter.on(c.default.events.EDITOR_CHANGE,function(e,t){e===c.default.events.TEXT_CHANGE&&t.length()>0&&r.update(c.default.sources.SILENT)}),this.emitter.on(c.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();e!=null&&e.start.node!==r.cursor.textNode&&r.emitter.once(c.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch{}})}}),this.emitter.on(c.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var n=t.range,i=n.startNode,a=n.startOffset,o=n.endNode,s=n.endOffset;r.setNativeRange(i,a,o,s)}}),this.update(c.default.sources.SILENT)}return i(e,[{key:`handleComposition`,value:function(){var e=this;this.root.addEventListener(`compositionstart`,function(){e.composing=!0}),this.root.addEventListener(`compositionend`,function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout(function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:`handleDragging`,value:function(){var e=this;this.emitter.listenDOM(`mousedown`,document.body,function(){e.mouseDown=!0}),this.emitter.listenDOM(`mouseup`,document.body,function(){e.mouseDown=!1,e.update(c.default.sources.USER)})}},{key:`focus`,value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:`format`,value:function(e,t){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[e])){this.scroll.update();var n=this.getNativeRange();if(!(n==null||!n.native.collapsed||a.default.query(e,a.default.Scope.BLOCK))){if(n.start.node!==this.cursor.textNode){var r=a.default.find(n.start.node,!1);if(r==null)return;if(r instanceof a.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:`getBounds`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var i=void 0,a=r(this.scroll.leaf(e),2),o=a[0],s=a[1];if(o==null)return null;var c=r(o.position(s,!0),2);i=c[0],s=c[1];var l=document.createRange();if(t>0){l.setStart(i,s);var u=r(this.scroll.leaf(e+t),2);if(o=u[0],s=u[1],o==null)return null;var d=r(o.position(s,!0),2);return i=d[0],s=d[1],l.setEnd(i,s),l.getBoundingClientRect()}else{var f=`left`,p=void 0;return i instanceof Text?(s<i.data.length?(l.setStart(i,s),l.setEnd(i,s+1)):(l.setStart(i,s-1),l.setEnd(i,s),f=`right`),p=l.getBoundingClientRect()):(p=o.domNode.getBoundingClientRect(),s>0&&(f=`right`)),{bottom:p.top+p.height,height:p.height,left:p[f],right:p[f],top:p.top,width:0}}}},{key:`getNativeRange`,value:function(){var e=document.getSelection();if(e==null||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(t==null)return null;var n=this.normalizeNative(t);return p.info(`getNativeRange`,n),n}},{key:`getRange`,value:function(){var e=this.getNativeRange();return e==null?[null,null]:[this.normalizedToRange(e),e]}},{key:`hasFocus`,value:function(){return document.activeElement===this.root}},{key:`normalizedToRange`,value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var i=n.map(function(e){var n=r(e,2),i=n[0],o=n[1],s=a.default.find(i,!0),c=s.offset(t.scroll);return o===0?c:s instanceof a.default.Container?c+s.length():c+s.index(i,o)}),o=Math.min(Math.max.apply(Math,d(i)),this.scroll.length()-1),s=Math.min.apply(Math,[o].concat(d(i)));return new m(s,o-s)}},{key:`normalizeNative`,value:function(e){if(!g(this.root,e.startContainer)||!e.collapsed&&!g(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else if(t.childNodes.length===n)t=t.lastChild,n=t instanceof Text?t.data.length:t.childNodes.length+1;else break;e.node=t,e.offset=n}),t}},{key:`rangeToNative`,value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],i=[],a=this.scroll.length();return n.forEach(function(e,n){e=Math.min(a-1,e);var o=void 0,s=r(t.scroll.leaf(e),2),c=s[0],l=s[1],u=r(c.position(l,n!==0),2);o=u[0],l=u[1],i.push(o,l)}),i.length<2&&(i=i.concat(i)),i}},{key:`scrollIntoView`,value:function(e){var t=this.lastRange;if(t!=null){var n=this.getBounds(t.index,t.length);if(n!=null){var i=this.scroll.length()-1,a=r(this.scroll.line(Math.min(t.index,i)),1)[0],o=a;if(t.length>0&&(o=r(this.scroll.line(Math.min(t.index+t.length,i)),1)[0]),!(a==null||o==null)){var s=e.getBoundingClientRect();n.top<s.top?e.scrollTop-=s.top-n.top:n.bottom>s.bottom&&(e.scrollTop+=n.bottom-s.bottom)}}}}},{key:`setNativeRange`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(p.info(`setNativeRange`,e,t,n,r),!(e!=null&&(this.root.parentNode==null||e.parentNode==null||n.parentNode==null))){var a=document.getSelection();if(a!=null)if(e!=null){this.hasFocus()||this.root.focus();var o=(this.getNativeRange()||{}).native;if(o==null||i||e!==o.startContainer||t!==o.startOffset||n!==o.endContainer||r!==o.endOffset){e.tagName==`BR`&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),n.tagName==`BR`&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(e,t),s.setEnd(n,r),a.removeAllRanges(),a.addRange(s)}}else a.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:`setRange`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:c.default.sources.API;if(typeof t==`string`&&(n=t,t=!1),p.info(`setRange`,e),e!=null){var r=this.rangeToNative(e);this.setNativeRange.apply(this,d(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:`update`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c.default.sources.USER,t=this.lastRange,n=r(this.getRange(),2),i=n[0],a=n[1];if(this.lastRange=i,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,s.default)(t,this.lastRange)){var l;!this.composing&&a!=null&&a.native.collapsed&&a.start.node!==this.cursor.textNode&&this.cursor.restore();var u=[c.default.events.SELECTION_CHANGE,(0,o.default)(this.lastRange),(0,o.default)(t),e];if((l=this.emitter).emit.apply(l,[c.default.events.EDITOR_CHANGE].concat(u)),e!==c.default.sources.SILENT){var d;(d=this.emitter).emit.apply(d,u)}}}}]),e}();function g(e,t){try{t.parentNode}catch{return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=m,t.default=h}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){l(t,e);function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`insertInto`,value:function(e,n){e.children.length===0?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`insertInto`,this).call(this,e,n):this.remove()}},{key:`length`,value:function(){return 0}},{key:`value`,value:function(){return``}}],[{key:`value`,value:function(){}}]),t}(a.default.Embed);u.blotName=`break`,u.tagName=`BR`,t.default=u}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=n(44),a=n(30),o=n(1),s=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.build(),n}return t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=c(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof o.ParchmentError)return;throw e}})},t.prototype.deleteAt=function(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,n){e.deleteAt(t,n)})},t.prototype.descendant=function(e,n){var r=this.children.find(n),i=r[0],a=r[1];return e.blotName==null&&e(i)||e.blotName!=null&&i instanceof e?[i,a]:i instanceof t?i.descendant(e,a):[null,-1]},t.prototype.descendants=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=Number.MAX_VALUE);var i=[],a=r;return this.children.forEachAt(n,r,function(n,r,o){(e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,a))),a-=o}),i},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,function(e,t,i){e.formatAt(t,i,n,r)})},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),i=r[0],a=r[1];if(i)i.insertAt(a,t,n);else{var s=n==null?o.create(`text`,t):o.create(t,n);this.appendChild(s)}},t.prototype.insertBefore=function(e,t){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new o.ParchmentError(`Cannot insert `+e.statics.blotName+` into `+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(n){e.insertBefore(n,t)})},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),this.children.length===0)if(this.statics.defaultChild!=null){var n=o.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){n===void 0&&(n=!1);var r=this.children.find(e,n),i=r[0],a=r[1],o=[[this,e]];return i instanceof t?o.concat(i.path(a,n)):(i!=null&&o.push([i,a]),o)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(t===void 0&&(t=!1),!t){if(e===0)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),function(e,r,i){e=e.split(r,t),n.appendChild(e)}),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,r=[],i=[];e.forEach(function(e){e.target===n.domNode&&e.type===`childList`&&(r.push.apply(r,e.addedNodes),i.push.apply(i,e.removedNodes))}),i.forEach(function(e){if(!(e.parentNode!=null&&e.tagName!==`IFRAME`&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=o.find(e);t!=null&&(t.domNode.parentNode==null||t.domNode.parentNode===n.domNode)&&t.detach()}}),r.filter(function(e){return e.parentNode==n.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var t=null;e.nextSibling!=null&&(t=o.find(e.nextSibling));var r=c(e);(r.next!=t||r.next==null)&&(r.parent!=null&&r.parent.removeChild(n),n.insertBefore(r,t||void 0))})},t}(a.default);function c(e){var t=o.find(e);if(t==null)try{t=o.create(e)}catch{t=o.create(o.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=s}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=n(12),a=n(31),o=n(17),s=n(1);t.default=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.attributes=new a.default(n.domNode),n}return t.formats=function(e){if(typeof this.tagName==`string`)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()},t.prototype.format=function(e,t){var n=s.query(e);n instanceof i.default?this.attributes.attribute(n,t):t&&n!=null&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return t!=null&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some(function(e){return e.target===r.domNode&&e.type===`attributes`})&&this.attributes.build()},t.prototype.wrap=function(n,r){var i=e.prototype.wrap.call(this,n,r);return i instanceof t&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},t}(o.default)}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=n(30),a=n(1);t.default=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return e={},e[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=a.Scope.INLINE_BLOT,t}(i.default)}),(function(e,t,n){var r=n(11),i=n(3),a={attributes:{compose:function(e,t,n){typeof e!=`object`&&(e={}),typeof t!=`object`&&(t={});var r=i(!0,{},t);for(var a in n||(r=Object.keys(r).reduce(function(e,t){return r[t]!=null&&(e[t]=r[t]),e},{})),e)e[a]!==void 0&&t[a]===void 0&&(r[a]=e[a]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){typeof e!=`object`&&(e={}),typeof t!=`object`&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,i){return r(e[i],t[i])||(n[i]=t[i]===void 0?null:t[i]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if(typeof e!=`object`)return t;if(typeof t==`object`){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return e[r]===void 0&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new o(e)},length:function(e){return typeof e.delete==`number`?e.delete:typeof e.retain==`number`?e.retain:typeof e.insert==`string`?e.insert.length:1}};function o(e){this.ops=e,this.index=0,this.offset=0}o.prototype.hasNext=function(){return this.peekLength()<1/0},o.prototype.next=function(e){e||=1/0;var t=this.ops[this.index];if(t){var n=this.offset,r=a.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,typeof t.delete==`number`)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),typeof t.retain==`number`?i.retain=e:typeof t.insert==`string`?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}else return{retain:1/0}},o.prototype.peek=function(){return this.ops[this.index]},o.prototype.peekLength=function(){return this.ops[this.index]?a.length(this.ops[this.index])-this.offset:1/0},o.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete==`number`?`delete`:typeof this.ops[this.index].retain==`number`?`retain`:`insert`:`retain`},o.prototype.rest=function(){if(!this.hasNext())return[];if(this.offset===0)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)},e.exports=a}),(function(e,t){var n=(function(){function e(e,t){return t!=null&&e instanceof t}var t;try{t=Map}catch{t=function(){}}var n;try{n=Set}catch{n=function(){}}var r;try{r=Promise}catch{r=function(){}}function i(a,o,s,c,u){typeof o==`object`&&(s=o.depth,c=o.prototype,u=o.includeNonEnumerable,o=o.circular);var d=[],f=[],p=typeof Buffer<`u`;o===void 0&&(o=!0),s===void 0&&(s=1/0);function m(a,s){if(a===null)return null;if(s===0)return a;var h,g;if(typeof a!=`object`)return a;if(e(a,t))h=new t;else if(e(a,n))h=new n;else if(e(a,r))h=new r(function(e,t){a.then(function(t){e(m(t,s-1))},function(e){t(m(e,s-1))})});else if(i.__isArray(a))h=[];else if(i.__isRegExp(a))h=new RegExp(a.source,l(a)),a.lastIndex&&(h.lastIndex=a.lastIndex);else if(i.__isDate(a))h=new Date(a.getTime());else if(p&&Buffer.isBuffer(a))return h=Buffer.allocUnsafe?Buffer.allocUnsafe(a.length):new Buffer(a.length),a.copy(h),h;else e(a,Error)?h=Object.create(a):c===void 0?(g=Object.getPrototypeOf(a),h=Object.create(g)):(h=Object.create(c),g=c);if(o){var _=d.indexOf(a);if(_!=-1)return f[_];d.push(a),f.push(h)}for(var v in e(a,t)&&a.forEach(function(e,t){var n=m(t,s-1),r=m(e,s-1);h.set(n,r)}),e(a,n)&&a.forEach(function(e){var t=m(e,s-1);h.add(t)}),a){var y;g&&(y=Object.getOwnPropertyDescriptor(g,v)),!(y&&y.set==null)&&(h[v]=m(a[v],s-1))}if(Object.getOwnPropertySymbols)for(var b=Object.getOwnPropertySymbols(a),v=0;v<b.length;v++){var x=b[v],S=Object.getOwnPropertyDescriptor(a,x);S&&!S.enumerable&&!u||(h[x]=m(a[x],s-1),S.enumerable||Object.defineProperty(h,x,{enumerable:!1}))}if(u)for(var C=Object.getOwnPropertyNames(a),v=0;v<C.length;v++){var w=C[v],S=Object.getOwnPropertyDescriptor(a,w);S&&S.enumerable||(h[w]=m(a[w],s-1),Object.defineProperty(h,w,{enumerable:!1}))}return h}return m(a,s)}i.clonePrototype=function(e){if(e===null)return null;var t=function(){};return t.prototype=e,new t};function a(e){return Object.prototype.toString.call(e)}i.__objToStr=a;function o(e){return typeof e==`object`&&a(e)===`[object Date]`}i.__isDate=o;function s(e){return typeof e==`object`&&a(e)===`[object Array]`}i.__isArray=s;function c(e){return typeof e==`object`&&a(e)===`[object RegExp]`}i.__isRegExp=c;function l(e){var t=``;return e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),t}return i.__getRegExpFlags=l,i})();typeof e==`object`&&e.exports&&(e.exports=n)}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},o=p(n(0)),s=p(n(8)),c=n(4),l=p(c),u=p(n(16)),d=p(n(13)),f=p(n(25));function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function h(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function g(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _(e){return e instanceof l.default||e instanceof c.BlockEmbed}var v=function(e){g(t,e);function t(e,n){m(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),r.domNode.addEventListener(`DOMNodeInserted`,function(){}),r.optimize(),r.enable(),r}return i(t,[{key:`batchStart`,value:function(){this.batch=!0}},{key:`batchEnd`,value:function(){this.batch=!1,this.optimize()}},{key:`deleteAt`,value:function(e,n){var i=r(this.line(e),2),o=i[0],s=i[1],l=r(this.line(e+n),1)[0];if(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`deleteAt`,this).call(this,e,n),l!=null&&o!==l&&s>0){if(o instanceof c.BlockEmbed||l instanceof c.BlockEmbed){this.optimize();return}if(o instanceof d.default){var f=o.newlineIndex(o.length(),!0);if(f>-1&&(o=o.split(f+1),o===l)){this.optimize();return}}else if(l instanceof d.default){var p=l.newlineIndex(0);p>-1&&l.split(p+1)}var m=l.children.head instanceof u.default?null:l.children.head;o.moveChildren(l,m),o.remove()}this.optimize()}},{key:`enable`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute(`contenteditable`,e)}},{key:`formatAt`,value:function(e,n,r,i){this.whitelist!=null&&!this.whitelist[r]||(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`formatAt`,this).call(this,e,n,r,i),this.optimize())}},{key:`insertAt`,value:function(e,n,r){if(!(r!=null&&this.whitelist!=null&&!this.whitelist[n])){if(e>=this.length())if(r==null||o.default.query(n,o.default.Scope.BLOCK)==null){var i=o.default.create(this.statics.defaultChild);this.appendChild(i),r==null&&n.endsWith(`
|
|
|
`)&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var s=o.default.create(n,r);this.appendChild(s)}else a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`insertAt`,this).call(this,e,n,r);this.optimize()}}},{key:`insertBefore`,value:function(e,n){if(e.statics.scope===o.default.Scope.INLINE_BLOT){var r=o.default.create(this.statics.defaultChild);r.appendChild(e),e=r}a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`insertBefore`,this).call(this,e,n)}},{key:`leaf`,value:function(e){return this.path(e).pop()||[null,-1]}},{key:`line`,value:function(e){return e===this.length()?this.line(e-1):this.descendant(_,e)}},{key:`lines`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return function e(t,n,r){var i=[],a=r;return t.children.forEachAt(n,r,function(t,n,r){_(t)?i.push(t):t instanceof o.default.Container&&(i=i.concat(e(t,n,a))),a-=r}),i}(this,e,t)}},{key:`optimize`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`optimize`,this).call(this,e,n),e.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,e,n))}},{key:`path`,value:function(e){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`path`,this).call(this,e).slice(1)}},{key:`update`,value:function(e){if(this.batch!==!0){var n=s.default.sources.USER;typeof e==`string`&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,e),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`update`,this).call(this,e.concat([])),e.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,e)}}}]),t}(o.default.Scroll);v.blotName=`scroll`,v.className=`ql-editor`,v.tagName=`DIV`,v.defaultChild=`block`,v.allowedChildren=[l.default,c.BlockEmbed,f.default],t.default=v}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.SHORTKEY=t.default=void 0;var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=h(n(21)),s=h(n(11)),c=h(n(3)),l=h(n(2)),u=h(n(20)),d=h(n(0)),f=h(n(5)),p=h(n(10)),m=h(n(9));function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function v(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function y(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var b=(0,p.default)(`quill:keyboard`),x=/Mac/i.test(navigator.platform)?`metaKey`:`ctrlKey`,S=function(e){y(t,e),a(t,null,[{key:`match`,value:function(e,t){return t=A(t),[`altKey`,`ctrlKey`,`metaKey`,`shiftKey`].some(function(n){return!!t[n]!==e[n]&&t[n]!==null})?!1:t.key===(e.which||e.keyCode)}}]);function t(e,n){_(this,t);var r=v(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(t){t===`list autofill`&&e.scroll.whitelist!=null&&!e.scroll.whitelist.list||r.options.bindings[t]&&r.addBinding(r.options.bindings[t])}),r.addBinding({key:t.keys.ENTER,shiftKey:null},D),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},w),r.addBinding({key:t.keys.DELETE},{collapsed:!0},T)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},T)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},E),r.addBinding({key:t.keys.DELETE},{collapsed:!1},E),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),r.listen(),r}return a(t,[{key:`addBinding`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=A(e);if(r==null||r.key==null)return b.warn(`Attempted to add invalid keyboard binding`,r);typeof t==`function`&&(t={handler:t}),typeof n==`function`&&(n={handler:n}),r=(0,c.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:`listen`,value:function(){var e=this;this.quill.root.addEventListener(`keydown`,function(n){if(!n.defaultPrevented){var a=n.which||n.keyCode,o=(e.bindings[a]||[]).filter(function(e){return t.match(n,e)});if(o.length!==0){var c=e.quill.getSelection();if(!(c==null||!e.quill.hasFocus())){var l=i(e.quill.getLine(c.index),2),u=l[0],f=l[1],p=i(e.quill.getLeaf(c.index),2),m=p[0],h=p[1],g=i(c.length===0?[m,h]:e.quill.getLeaf(c.index+c.length),2),_=g[0],v=g[1],y=m instanceof d.default.Text?m.value().slice(0,h):``,b=_ instanceof d.default.Text?_.value().slice(v):``,x={collapsed:c.length===0,empty:c.length===0&&u.length()<=1,format:e.quill.getFormat(c),offset:f,prefix:y,suffix:b};o.some(function(t){if(t.collapsed!=null&&t.collapsed!==x.collapsed||t.empty!=null&&t.empty!==x.empty||t.offset!=null&&t.offset!==x.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return x.format[e]==null}))return!1}else if(r(t.format)===`object`&&!Object.keys(t.format).every(function(e){return t.format[e]===!0?x.format[e]!=null:t.format[e]===!1?x.format[e]==null:(0,s.default)(t.format[e],x.format[e])}))return!1;return t.prefix!=null&&!t.prefix.test(x.prefix)||t.suffix!=null&&!t.suffix.test(x.suffix)?!1:t.handler.call(e,c,x)!==!0})&&n.preventDefault()}}}})}}]),t}(m.default);S.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},S.DEFAULTS={bindings:{bold:k(`bold`),italic:k(`italic`),underline:k(`underline`),indent:{key:S.keys.TAB,format:[`blockquote`,`indent`,`list`],handler:function(e,t){if(t.collapsed&&t.offset!==0)return!0;this.quill.format(`indent`,`+1`,f.default.sources.USER)}},outdent:{key:S.keys.TAB,shiftKey:!0,format:[`blockquote`,`indent`,`list`],handler:function(e,t){if(t.collapsed&&t.offset!==0)return!0;this.quill.format(`indent`,`-1`,f.default.sources.USER)}},"outdent backspace":{key:S.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:[`indent`,`list`],offset:0,handler:function(e,t){t.format.indent==null?t.format.list!=null&&this.quill.format(`list`,!1,f.default.sources.USER):this.quill.format(`indent`,`-1`,f.default.sources.USER)}},"indent code-block":O(!0),"outdent code-block":O(!1),"remove tab":{key:S.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,f.default.sources.USER)}},tab:{key:S.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=new l.default().retain(e.index).delete(e.length).insert(` `);this.quill.updateContents(t,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,f.default.sources.SILENT)}},"list empty enter":{key:S.keys.ENTER,collapsed:!0,format:[`list`],empty:!0,handler:function(e,t){this.quill.format(`list`,!1,f.default.sources.USER),t.format.indent&&this.quill.format(`indent`,!1,f.default.sources.USER)}},"checklist enter":{key:S.keys.ENTER,collapsed:!0,format:{list:`checked`},handler:function(e){var t=i(this.quill.getLine(e.index),2),n=t[0],r=t[1],a=(0,c.default)({},n.formats(),{list:`checked`}),o=new l.default().retain(e.index).insert(`
|
|
|
`,a).retain(n.length()-r-1).retain(1,{list:`unchecked`});this.quill.updateContents(o,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:S.keys.ENTER,collapsed:!0,format:[`header`],suffix:/^$/,handler:function(e,t){var n=i(this.quill.getLine(e.index),2),r=n[0],a=n[1],o=new l.default().retain(e.index).insert(`
|
|
|
`,t.format).retain(r.length()-a-1).retain(1,{header:null});this.quill.updateContents(o,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:` `,collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=i(this.quill.getLine(e.index),2),a=r[0],o=r[1];if(o>n)return!0;var s=void 0;switch(t.prefix.trim()){case`[]`:case`[ ]`:s=`unchecked`;break;case`[x]`:s=`checked`;break;case`-`:case`*`:s=`bullet`;break;default:s=`ordered`}this.quill.insertText(e.index,` `,f.default.sources.USER),this.quill.history.cutoff();var c=new l.default().retain(e.index-o).delete(n+1).retain(a.length()-2-o).retain(1,{list:s});this.quill.updateContents(c,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,f.default.sources.SILENT)}},"code exit":{key:S.keys.ENTER,collapsed:!0,format:[`code-block`],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=i(this.quill.getLine(e.index),2),n=t[0],r=t[1],a=new l.default().retain(e.index+n.length()-r-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,f.default.sources.USER)}},"embed left":C(S.keys.LEFT,!1),"embed left shift":C(S.keys.LEFT,!0),"embed right":C(S.keys.RIGHT,!1),"embed right shift":C(S.keys.RIGHT,!0)}};function C(e,t){var n,r=e===S.keys.LEFT?`prefix`:`suffix`;return n={key:e,shiftKey:t,altKey:null},g(n,r,/^$/),g(n,`handler`,function(n){var r=n.index;return e===S.keys.RIGHT&&(r+=n.length+1),i(this.quill.getLeaf(r),1)[0]instanceof d.default.Embed?(e===S.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index+n.length+1,f.default.sources.USER),!1):!0}),n}function w(e,t){if(!(e.index===0||this.quill.getLength()<=1)){var n=i(this.quill.getLine(e.index),1)[0],r={};if(t.offset===0){var a=i(this.quill.getLine(e.index-1),1)[0];if(a!=null&&a.length()>1){var o=n.formats(),s=this.quill.getFormat(e.index-1,1);r=u.default.attributes.diff(o,s)||{}}}var c=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-c,c,f.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index-c,c,r,f.default.sources.USER),this.quill.focus()}}function T(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},a=0,o=i(this.quill.getLine(e.index),1)[0];if(t.offset>=o.length()-1){var s=i(this.quill.getLine(e.index+1),1)[0];if(s){var c=o.formats(),l=this.quill.getFormat(e.index,1);r=u.default.attributes.diff(c,l)||{},a=s.length()}}this.quill.deleteText(e.index,n,f.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+a-1,n,r,f.default.sources.USER)}}function E(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=u.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,f.default.sources.USER),this.quill.setSelection(e.index,f.default.sources.SILENT),this.quill.focus()}function D(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce(function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,`
|
|
|
`,r,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(function(e){r[e]??(Array.isArray(t.format[e])||e!==`link`&&n.quill.format(e,t.format[e],f.default.sources.USER))})}function O(e){return{key:S.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query(`code-block`),r=t.index,a=t.length,o=i(this.quill.scroll.descendant(n,r),2),s=o[0],c=o[1];if(s!=null){var l=this.quill.getIndex(s),u=s.newlineIndex(c,!0)+1,p=s.newlineIndex(l+c+a),m=s.domNode.textContent.slice(u,p).split(`
|
|
|
`);c=0,m.forEach(function(t,i){e?(s.insertAt(u+c,n.TAB),c+=n.TAB.length,i===0?r+=n.TAB.length:a+=n.TAB.length):t.startsWith(n.TAB)&&(s.deleteAt(u+c,n.TAB.length),c-=n.TAB.length,i===0?r-=n.TAB.length:a-=n.TAB.length),c+=t.length+1}),this.quill.update(f.default.sources.USER),this.quill.setSelection(r,a,f.default.sources.SILENT)}}}}function k(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],f.default.sources.USER)}}}function A(e){if(typeof e==`string`||typeof e==`number`)return A({key:e});if((e===void 0?`undefined`:r(e))===`object`&&(e=(0,o.default)(e,!1)),typeof e.key==`string`)if(S.keys[e.key.toUpperCase()]!=null)e.key=S.keys[e.key.toUpperCase()];else if(e.key.length===1)e.key=e.key.toUpperCase().charCodeAt(0);else return null;return e.shortKey&&(e[x]=e.shortKey,delete e.shortKey),e}t.default=S,t.SHORTKEY=x}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(0)),s=c(n(7));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function u(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function d(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){d(t,e),a(t,null,[{key:`value`,value:function(){}}]);function t(e,n){l(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return a(t,[{key:`detach`,value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:`format`,value:function(e,n){if(this._length!==0)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`format`,this).call(this,e,n);for(var r=this,a=0;r!=null&&r.statics.scope!==o.default.Scope.BLOCK_BLOT;)a+=r.offset(r.parent),r=r.parent;r!=null&&(this._length=t.CONTENTS.length,r.optimize(),r.formatAt(a,t.CONTENTS.length,e,n),this._length=0)}},{key:`index`,value:function(e,n){return e===this.textNode?0:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`index`,this).call(this,e,n)}},{key:`length`,value:function(){return this._length}},{key:`position`,value:function(){return[this.textNode,this.textNode.data.length]}},{key:`remove`,value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`remove`,this).call(this),this.parent=null}},{key:`restore`,value:function(){if(!(this.selection.composing||this.parent==null)){var e=this.textNode,n=this.selection.getNativeRange(),i=void 0,a=void 0,c=void 0;if(n!=null&&n.start.node===e&&n.end.node===e){var l=[e,n.start.offset,n.end.offset];i=l[0],a=l[1],c=l[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var u=this.textNode.data.split(t.CONTENTS).join(``);this.next instanceof s.default?(i=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=t.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(o.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),a!=null){var d=r([a,c].map(function(e){return Math.max(0,Math.min(i.data.length,e-1))}),2);return a=d[0],c=d[1],{startNode:i,startOffset:a,endNode:i,endOffset:c}}}}},{key:`update`,value:function(e,t){var n=this;if(e.some(function(e){return e.type===`characterData`&&e.target===n.textNode})){var r=this.restore();r&&(t.range=r)}}},{key:`value`,value:function(){return``}}]),t}(o.default.Embed);f.blotName=`cursor`,f.className=`ql-cursor`,f.tagName=`span`,f.CONTENTS=``,t.default=f}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=o(n(0)),i=n(4),a=o(i);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){l(t,e);function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(r.default.Container);u.allowedChildren=[a.default,i.BlockEmbed,u],t.default=u}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){l(t,e);function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`value`,value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`value`,this).call(this,e);return n.startsWith(`rgb(`)?(n=n.replace(/^[^\d]+/,``).replace(/[^\d]+$/,``),`#`+n.split(`,`).map(function(e){return(`00`+parseInt(e).toString(16)).slice(-2)}).join(``)):n}}]),t}(a.default.Attributor.Style),d=new a.default.Attributor.Class(`color`,`ql-color`,{scope:a.default.Scope.INLINE}),f=new u(`color`,`color`,{scope:a.default.Scope.INLINE});t.ColorAttributor=u,t.ColorClass=d,t.ColorStyle=f}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.sanitize=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){l(t,e);function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`format`,value:function(e,n){if(e!==this.statics.blotName||!n)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`format`,this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute(`href`,n)}}],[{key:`create`,value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),`create`,this).call(this,e);return e=this.sanitize(e),n.setAttribute(`href`,e),n.setAttribute(`rel`,`noopener noreferrer`),n.setAttribute(`target`,`_blank`),n}},{key:`formats`,value:function(e){return e.getAttribute(`href`)}},{key:`sanitize`,value:function(e){return d(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(a.default);u.blotName=`link`,u.tagName=`A`,u.SANITIZED_URL=`about:blank`,u.PROTOCOL_WHITELIST=[`http`,`https`,`mailto`,`tel`];function d(e,t){var n=document.createElement(`a`);n.href=e;var r=n.href.slice(0,n.href.indexOf(`:`));return t.indexOf(r)>-1}t.default=u,t.sanitize=d}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=s(n(23)),o=s(n(107));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var l=0;function u(e,t){e.setAttribute(t,e.getAttribute(t)!==`true`)}t.default=function(){function e(t){var n=this;c(this,e),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`,function(){n.togglePicker()}),this.label.addEventListener(`keydown`,function(e){switch(e.keyCode){case a.default.keys.ENTER:n.togglePicker();break;case a.default.keys.ESCAPE:n.escape(),e.preventDefault();break;default:}}),this.select.addEventListener(`change`,this.update.bind(this))}return i(e,[{key:`togglePicker`,value:function(){this.container.classList.toggle(`ql-expanded`),u(this.label,`aria-expanded`),u(this.options,`aria-hidden`)}},{key:`buildItem`,value:function(e){var t=this,n=document.createElement(`span`);return n.tabIndex=`0`,n.setAttribute(`role`,`button`),n.classList.add(`ql-picker-item`),e.hasAttribute(`value`)&&n.setAttribute(`data-value`,e.getAttribute(`value`)),e.textContent&&n.setAttribute(`data-label`,e.textContent),n.addEventListener(`click`,function(){t.selectItem(n,!0)}),n.addEventListener(`keydown`,function(e){switch(e.keyCode){case a.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case a.default.keys.ESCAPE:t.escape(),e.preventDefault();break;default:}}),n}},{key:`buildLabel`,value:function(){var e=document.createElement(`span`);return e.classList.add(`ql-picker-label`),e.innerHTML=o.default,e.tabIndex=`0`,e.setAttribute(`role`,`button`),e.setAttribute(`aria-expanded`,`false`),this.container.appendChild(e),e}},{key:`buildOptions`,value:function(){var e=this,t=document.createElement(`span`);t.classList.add(`ql-picker-options`),t.setAttribute(`aria-hidden`,`true`),t.tabIndex=`-1`,t.id=`ql-picker-options-`+l,l+=1,this.label.setAttribute(`aria-controls`,t.id),this.options=t,[].slice.call(this.select.options).forEach(function(n){var r=e.buildItem(n);t.appendChild(r),n.selected===!0&&e.selectItem(r)}),this.container.appendChild(t)}},{key:`buildPicker`,value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add(`ql-picker`),this.label=this.buildLabel(),this.buildOptions()}},{key:`escape`,value:function(){var e=this;this.close(),setTimeout(function(){return e.label.focus()},1)}},{key:`close`,value:function(){this.container.classList.remove(`ql-expanded`),this.label.setAttribute(`aria-expanded`,`false`),this.options.setAttribute(`aria-hidden`,`true`)}},{key:`selectItem`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.container.querySelector(`.ql-selected`);if(e!==n&&(n?.classList.remove(`ql-selected`),e!=null&&(e.classList.add(`ql-selected`),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute(`data-value`)?this.label.setAttribute(`data-value`,e.getAttribute(`data-value`)):this.label.removeAttribute(`data-value`),e.hasAttribute(`data-label`)?this.label.setAttribute(`data-label`,e.getAttribute(`data-label`)):this.label.removeAttribute(`data-label`),t))){if(typeof Event==`function`)this.select.dispatchEvent(new Event(`change`));else if((typeof Event>`u`?`undefined`:r(Event))===`object`){var i=document.createEvent(`Event`);i.initEvent(`change`,!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:`update`,value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(`.ql-picker-options`).children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=e!=null&&e!==this.select.querySelector(`option[selected]`);this.label.classList.toggle(`ql-active`,n)}}]),e}()}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=_(n(0)),i=_(n(5)),a=n(4),o=_(a),s=_(n(16)),c=_(n(25)),l=_(n(24)),u=_(n(35)),d=_(n(6)),f=_(n(22)),p=_(n(7)),m=_(n(55)),h=_(n(42)),g=_(n(23));function _(e){return e&&e.__esModule?e:{default:e}}i.default.register({"blots/block":o.default,"blots/block/embed":a.BlockEmbed,"blots/break":s.default,"blots/container":c.default,"blots/cursor":l.default,"blots/embed":u.default,"blots/inline":d.default,"blots/scroll":f.default,"blots/text":p.default,"modules/clipboard":m.default,"modules/history":h.default,"modules/keyboard":g.default}),r.default.register(o.default,s.default,l.default,d.default,f.default,p.default),t.default=i.default}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=n(1);t.default=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,`statics`,{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(this.tagName==null)throw new r.ParchmentError(`Blot definition missing tagName`);var t;return Array.isArray(this.tagName)?(typeof e==`string`&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t=typeof e==`number`?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var a=this.isolate(e,t);if(r.query(n,r.Scope.BLOT)!=null&&i)a.wrap(n,i);else if(r.query(n,r.Scope.ATTRIBUTE)!=null){var o=r.create(this.statics.scope);a.wrap(o),o.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=n==null?r.create(`text`,t):r.create(t,n),a=this.split(e);this.parent.insertBefore(i,a)},e.prototype.insertInto=function(e,t){t===void 0&&(t=null),this.parent!=null&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),t!=null&&(n=t.domNode),(this.domNode.parentNode!=e.domNode||this.domNode.nextSibling!=n)&&e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return e===void 0&&(e=this.parent),this.parent==null||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){this.domNode[r.DATA_KEY]!=null&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){e.parent!=null&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n=typeof e==`string`?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return e===0?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n=typeof e==`string`?r.create(e,t):e;return this.parent!=null&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName=`abstract`,e}()}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=n(12),i=n(32),a=n(33),o=n(1);t.default=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)==null?delete this.attributes[e.attrName]:this.attributes[e.attrName]=e):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=a.default.keys(this.domNode);t.concat(n).concat(s).forEach(function(t){var n=o.query(t,o.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)})},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach(function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=e.attributes[n].value(e.domNode),t},{})},e}()}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=n(12);function a(e,t){return(e.getAttribute(`class`)||``).split(/\s+/).filter(function(e){return e.indexOf(t+`-`)===0})}t.default=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.keys=function(e){return(e.getAttribute(`class`)||``).split(/\s+/).map(function(e){return e.split(`-`).slice(0,-1).join(`-`)})},t.prototype.add=function(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(this.keyName+`-`+t),!0):!1},t.prototype.remove=function(e){a(e,this.keyName).forEach(function(t){e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute(`class`)},t.prototype.value=function(e){var t=(a(e,this.keyName)[0]||``).slice(this.keyName.length+1);return this.canAdd(e,t)?t:``},t}(i.default)}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=n(12);function a(e){var t=e.split(`-`),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join(``);return t[0]+n}t.default=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.keys=function(e){return(e.getAttribute(`style`)||``).split(`;`).map(function(e){return e.split(`:`)[0].trim()})},t.prototype.add=function(e,t){return this.canAdd(e,t)?(e.style[a(this.keyName)]=t,!0):!1},t.prototype.remove=function(e){e.style[a(this.keyName)]=``,e.getAttribute(`style`)||e.removeAttribute(`style`)},t.prototype.value=function(e){var t=e.style[a(this.keyName)];return this.canAdd(e,t)?t:``},t}(i.default)}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=function(){function e(t,n){i(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:`init`,value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){e.modules[t]??e.addModule(t)})}},{key:`addModule`,value:function(e){var t=this.quill.constructor.import(`modules/`+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();a.DEFAULTS={modules:{}},a.themes={default:a},t.default=a}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=s(n(0)),o=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function l(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function u(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=``;t.default=function(e){u(t,e);function t(e){c(this,t);var n=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement(`span`),n.contentNode.setAttribute(`contenteditable`,!1),[].slice.call(n.domNode.childNodes).forEach(function(e){n.contentNode.appendChild(e)}),n.leftGuard=document.createTextNode(d),n.rightGuard=document.createTextNode(d),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return r(t,[{key:`index`,value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`index`,this).call(this,e,n)}},{key:`restore`,value:function(e){var t=void 0,n=void 0,r=e.data.split(d).join(``);if(e===this.leftGuard)if(this.prev instanceof o.default){var i=this.prev.length();this.prev.insertAt(i,r),t={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(a.default.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof o.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(a.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=d,t}},{key:`update`,value:function(e,t){var n=this;e.forEach(function(e){if(e.type===`characterData`&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}})}}]),t}(a.default.Embed)}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r=i(n(0));function i(e){return e&&e.__esModule?e:{default:e}}var a={scope:r.default.Scope.BLOCK,whitelist:[`right`,`center`,`justify`]},o=new r.default.Attributor.Attribute(`align`,`align`,a),s=new r.default.Attributor.Class(`align`,`ql-align`,a),c=new r.default.Attributor.Style(`align`,`text-align`,a);t.AlignAttribute=o,t.AlignClass=s,t.AlignStyle=c}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r=a(n(0)),i=n(26);function a(e){return e&&e.__esModule?e:{default:e}}var o=new r.default.Attributor.Class(`background`,`ql-bg`,{scope:r.default.Scope.INLINE}),s=new i.ColorAttributor(`background`,`background-color`,{scope:r.default.Scope.INLINE});t.BackgroundClass=o,t.BackgroundStyle=s}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r=i(n(0));function i(e){return e&&e.__esModule?e:{default:e}}var a={scope:r.default.Scope.BLOCK,whitelist:[`rtl`]},o=new r.default.Attributor.Attribute(`direction`,`dir`,a),s=new r.default.Attributor.Class(`direction`,`ql-direction`,a),c=new r.default.Attributor.Style(`direction`,`direction`,a);t.DirectionAttribute=o,t.DirectionClass=s,t.DirectionStyle=c}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.FontClass=t.FontStyle=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u={scope:a.default.Scope.INLINE,whitelist:[`serif`,`monospace`]},d=new a.default.Attributor.Class(`font`,`ql-font`,u);t.FontStyle=new(function(e){l(t,e);function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`value`,value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`value`,this).call(this,e).replace(/["']/g,``)}}]),t}(a.default.Attributor.Style))(`font`,`font-family`,u),t.FontClass=d}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r=i(n(0));function i(e){return e&&e.__esModule?e:{default:e}}var a=new r.default.Attributor.Class(`size`,`ql-size`,{scope:r.default.Scope.INLINE,whitelist:[`small`,`large`,`huge`]}),o=new r.default.Attributor.Style(`size`,`font-size`,{scope:r.default.Scope.INLINE,whitelist:[`10px`,`18px`,`32px`]});t.SizeClass=a,t.SizeStyle=o}),(function(e,t,n){e.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.getLastChangeIndex=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=s(n(0)),a=s(n(5)),o=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function l(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function u(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){u(t,e);function t(e,n){c(this,t);var r=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(a.default.events.EDITOR_CHANGE,function(e,t,n,i){e!==a.default.events.TEXT_CHANGE||r.ignoreChange||(!r.options.userOnly||i===a.default.sources.USER?r.record(t,n):r.transform(t))}),r.quill.keyboard.addBinding({key:`Z`,shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:`Z`,shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:`Y`,shortKey:!0},r.redo.bind(r)),r}return r(t,[{key:`change`,value:function(e,t){if(this.stack[e].length!==0){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],a.default.sources.USER),this.ignoreChange=!1;var r=p(n[e]);this.quill.setSelection(r)}}},{key:`clear`,value:function(){this.stack={undo:[],redo:[]}}},{key:`cutoff`,value:function(){this.lastRecorded=0}},{key:`record`,value:function(e,t){if(e.ops.length!==0){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:`redo`,value:function(){this.change(`redo`,`undo`)}},{key:`transform`,value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:`undo`,value:function(){this.change(`undo`,`redo`)}}]),t}(o.default);d.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function f(e){var t=e.ops[e.ops.length-1];return t==null?!1:t.insert==null?t.attributes==null?!1:Object.keys(t.attributes).some(function(e){return i.default.query(e,i.default.Scope.BLOCK)!=null}):typeof t.insert==`string`&&t.insert.endsWith(`
|
|
|
`)}function p(e){var t=e.reduce(function(e,t){return e+=t.delete||0,e},0),n=e.length()-t;return f(e)&&--n,n}t.default=d,t.getLastChangeIndex=p}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=m(n(3)),o=m(n(2)),s=m(n(8)),c=m(n(23)),l=m(n(34)),u=m(n(59)),d=m(n(60)),f=m(n(28)),p=m(n(61));function m(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function g(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function _(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[!1,`center`,`right`,`justify`],y=`#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`.split(`.`),b=[!1,`serif`,`monospace`],x=[`1`,`2`,`3`,!1],S=[`small`,!1,`large`,`huge`],C=function(e){_(t,e);function t(e,n){h(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM(`click`,document.body,function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener(`click`,t);r.tooltip!=null&&!r.tooltip.root.contains(n.target)&&document.activeElement!==r.tooltip.textbox&&!r.quill.hasFocus()&&r.tooltip.hide(),r.pickers!=null&&r.pickers.forEach(function(e){e.container.contains(n.target)||e.close()})}),r}return r(t,[{key:`addModule`,value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`addModule`,this).call(this,e);return e===`toolbar`&&this.extendToolbar(n),n}},{key:`buildButtons`,value:function(e,t){e.forEach(function(e){(e.getAttribute(`class`)||``).split(/\s+/).forEach(function(n){if(n.startsWith(`ql-`)&&(n=n.slice(3),t[n]!=null))if(n===`direction`)e.innerHTML=t[n][``]+t[n].rtl;else if(typeof t[n]==`string`)e.innerHTML=t[n];else{var r=e.value||``;r!=null&&t[n][r]&&(e.innerHTML=t[n][r])}})})}},{key:`buildPickers`,value:function(e,t){var n=this;this.pickers=e.map(function(e){if(e.classList.contains(`ql-align`))return e.querySelector(`option`)??E(e,v),new d.default(e,t.align);if(e.classList.contains(`ql-background`)||e.classList.contains(`ql-color`)){var n=e.classList.contains(`ql-background`)?`background`:`color`;return e.querySelector(`option`)??E(e,y,n===`background`?`#ffffff`:`#000000`),new u.default(e,t[n])}else return e.querySelector(`option`)??(e.classList.contains(`ql-font`)?E(e,b):e.classList.contains(`ql-header`)?E(e,x):e.classList.contains(`ql-size`)&&E(e,S)),new f.default(e)}),this.quill.on(s.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(e){e.update()})})}}]),t}(l.default);C.DEFAULTS=(0,a.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit(`formula`)},image:function(){var e=this,t=this.container.querySelector(`input.ql-image[type=file]`);t??(t=document.createElement(`input`),t.setAttribute(`type`,`file`),t.setAttribute(`accept`,`image/png, image/gif, image/jpeg, image/bmp, image/x-icon`),t.classList.add(`ql-image`),t.addEventListener(`change`,function(){if(t.files!=null&&t.files[0]!=null){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents(new o.default().retain(r.index).delete(r.length).insert({image:n.target.result}),s.default.sources.USER),e.quill.setSelection(r.index+1,s.default.sources.SILENT),t.value=``},n.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit(`video`)}}}}});var w=function(e){_(t,e);function t(e,n){h(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector(`input[type="text"]`),r.listen(),r}return r(t,[{key:`listen`,value:function(){var e=this;this.textbox.addEventListener(`keydown`,function(t){c.default.match(t,`enter`)?(e.save(),t.preventDefault()):c.default.match(t,`escape`)&&(e.cancel(),t.preventDefault())})}},{key:`cancel`,value:function(){this.hide()}},{key:`edit`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`link`,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove(`ql-hidden`),this.root.classList.add(`ql-editing`),t==null?e!==this.root.getAttribute(`data-mode`)&&(this.textbox.value=``):this.textbox.value=t,this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute(`placeholder`,this.textbox.getAttribute(`data-`+e)||``),this.root.setAttribute(`data-mode`,e)}},{key:`restoreFocus`,value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:`save`,value:function(){var e=this.textbox.value;switch(this.root.getAttribute(`data-mode`)){case`link`:var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,`link`,e,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format(`link`,e,s.default.sources.USER)),this.quill.root.scrollTop=t;break;case`video`:e=T(e);case`formula`:if(!e)break;var n=this.quill.getSelection(!0);if(n!=null){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute(`data-mode`),e,s.default.sources.USER),this.root.getAttribute(`data-mode`)===`formula`&&this.quill.insertText(r+1,` `,s.default.sources.USER),this.quill.setSelection(r+2,s.default.sources.USER)}break;default:}this.textbox.value=``,this.hide()}}]),t}(p.default);function T(e){var t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?(t[1]||`https`)+`://www.youtube.com/embed/`+t[2]+`?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||`https`)+`://player.vimeo.com/video/`+t[2]+`/`:e}function E(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(function(t){var r=document.createElement(`option`);t===n?r.setAttribute(`selected`,`selected`):r.setAttribute(`value`,t),e.appendChild(r)})}t.BaseTooltip=w,t.default=C}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){var e=[...arguments];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,t==null?this.tail==null?(e.prev=null,this.head=this.tail=e):(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;n!=null;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),--this.length)},e.prototype.iterator=function(e){return e===void 0&&(e=this.head),function(){var t=e;return e!=null&&(e=e.next),t}},e.prototype.find=function(e,t){t===void 0&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(e<i||t&&e===i&&(n.next==null||n.next.length()!==0))return[n,e];e-=i}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r=this.find(e),i=r[0],a=r[1],o,s=e-a,c=this.iterator(i);(o=c())&&s<e+t;){var l=o.length();e>s?n(o,e-s,Math.min(t,s+l-e)):n(o,0,Math.min(l,e+t-s)),s+=l}},e.prototype.map=function(e){return this.reduce(function(t,n){return t.push(e(n)),t},[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}()}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=n(17),a=n(1),o={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=100;t.default=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver(function(e){n.update(e)}),n.observer.observe(n.domNode,o),n.attach(),n}return t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),t===0&&n===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;t===void 0&&(t=[]),n===void 0&&(n={}),e.prototype.optimize.call(this,n);for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)t.push(o.pop());for(var c=function(e,t){t===void 0&&(t=!0),!(e==null||e===r)&&e.domNode.parentNode!=null&&(e.domNode[a.DATA_KEY].mutations??(e.domNode[a.DATA_KEY].mutations=[]),t&&c(e.parent))},l=function(e){e.domNode[a.DATA_KEY]==null||e.domNode[a.DATA_KEY].mutations==null||(e instanceof i.default&&e.children.forEach(l),e.optimize(n))},u=t,d=0;u.length>0;d+=1){if(d>=s)throw Error(`[Parchment] Maximum optimize iterations reached`);for(u.forEach(function(e){var t=a.find(e.target,!0);t!=null&&(t.domNode===e.target&&(e.type===`childList`?(c(a.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=a.find(e,!1);c(t,!1),t instanceof i.default&&t.children.forEach(function(e){c(e,!1)})})):e.type===`attributes`&&c(t.prev)),c(t))}),this.children.forEach(l),u=[].slice.call(this.observer.takeRecords()),o=u.slice();o.length>0;)t.push(o.pop())}},t.prototype.update=function(t,n){var r=this;n===void 0&&(n={}),t||=this.observer.takeRecords(),t.map(function(e){var t=a.find(e.target,!0);return t==null?null:t.domNode[a.DATA_KEY].mutations==null?(t.domNode[a.DATA_KEY].mutations=[e],t):(t.domNode[a.DATA_KEY].mutations.push(e),null)}).forEach(function(e){e==null||e===r||e.domNode[a.DATA_KEY]==null||e.update(e.domNode[a.DATA_KEY].mutations||[],n)}),this.domNode[a.DATA_KEY].mutations!=null&&e.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName=`scroll`,t.defaultChild=`block`,t.scope=a.Scope.BLOCK_BLOT,t.tagName=`DIV`,t}(i.default)}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=n(18),a=n(1);function o(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}t.default=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var a=this;n===this.statics.blotName&&!r?(this.children.forEach(function(e){e instanceof i.default||(e=e.wrap(t.blotName,!0)),a.attributes.copy(e)}),this.unwrap()):e.prototype.format.call(this,n,r)},t.prototype.formatAt=function(t,n,r,i){this.formats()[r]!=null||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(Object.keys(r).length===0)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&o(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName=`inline`,t.scope=a.Scope.INLINE_BLOT,t.tagName=`SPAN`,t}(i.default)}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=n(18),a=n(1);t.default=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.formats=function(n){var r=a.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){a.query(n,a.Scope.BLOCK)!=null&&(n===this.statics.blotName&&!r?this.replaceWith(t.blotName):e.prototype.format.call(this,n,r))},t.prototype.formatAt=function(t,n,r,i){a.query(r,a.Scope.BLOCK)==null?e.prototype.formatAt.call(this,t,n,r,i):this.format(r,i)},t.prototype.insertAt=function(t,n,r){if(r==null||a.query(n,a.Scope.INLINE)!=null)e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),o=a.create(n,r);i.parent.insertBefore(o,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName=`block`,t.scope=a.Scope.BLOCK_BLOT,t.tagName=`P`,t}(i.default)}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0}),t.default=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){t===0&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default)}),(function(e,t,n){var r=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,`__esModule`,{value:!0});var i=n(19),a=n(1);t.default=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){r==null?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return t===void 0&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(t===void 0&&(t=!1),!t){if(e===0)return this;if(e===this.length())return this.next}var n=a.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some(function(e){return e.type===`characterData`&&e.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName=`text`,t.scope=a.Scope.INLINE_BLOT,t}(i.default)}),(function(e,t,n){var r=document.createElement(`div`);if(r.classList.toggle(`test-class`,!1),r.classList.contains(`test-class`)){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t||=0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();(typeof t!=`number`||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,`find`,{value:function(e){if(this===null)throw TypeError(`Array.prototype.find called on null or undefined`);if(typeof e!=`function`)throw TypeError(`predicate must be a function`);for(var t=Object(this),n=t.length>>>0,r=arguments[1],i,a=0;a<n;a++)if(i=t[a],e.call(r,i,a,t))return i}}),document.addEventListener(`DOMContentLoaded`,function(){document.execCommand(`enableObjectResizing`,!1,!1),document.execCommand(`autoUrlDetect`,!1,!1)})}),(function(e,t){var n=-1,r=1,i=0;function a(e,t,n){if(e==t)return e?[[i,e]]:[];(n<0||e.length<n)&&(n=null);var r=l(e,t),a=e.substring(0,r);e=e.substring(r),t=t.substring(r),r=u(e,t);var s=e.substring(e.length-r);e=e.substring(0,e.length-r),t=t.substring(0,t.length-r);var c=o(e,t);return a&&c.unshift([i,a]),s&&c.push([i,s]),f(c),n!=null&&(c=h(c,n)),c=g(c),c}function o(e,t){var o;if(!e)return[[r,t]];if(!t)return[[n,e]];var c=e.length>t.length?e:t,l=e.length>t.length?t:e,u=c.indexOf(l);if(u!=-1)return o=[[r,c.substring(0,u)],[i,l],[r,c.substring(u+l.length)]],e.length>t.length&&(o[0][0]=o[2][0]=n),o;if(l.length==1)return[[n,e],[r,t]];var f=d(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=a(p,h),y=a(m,g);return v.concat([[i,_]],y)}return s(e,t)}function s(e,t){for(var i=e.length,a=t.length,o=Math.ceil((i+a)/2),s=o,l=2*o,u=Array(l),d=Array(l),f=0;f<l;f++)u[f]=-1,d[f]=-1;u[s+1]=0,d[s+1]=0;for(var p=i-a,m=p%2!=0,h=0,g=0,_=0,v=0,y=0;y<o;y++){for(var b=-y+h;b<=y-g;b+=2){for(var x=s+b,S=b==-y||b!=y&&u[x-1]<u[x+1]?u[x+1]:u[x-1]+1,C=S-b;S<i&&C<a&&e.charAt(S)==t.charAt(C);)S++,C++;if(u[x]=S,S>i)g+=2;else if(C>a)h+=2;else if(m){var w=s+p-b;if(w>=0&&w<l&&d[w]!=-1){var T=i-d[w];if(S>=T)return c(e,t,S,C)}}}for(var E=-y+_;E<=y-v;E+=2){for(var w=s+E,T=E==-y||E!=y&&d[w-1]<d[w+1]?d[w+1]:d[w-1]+1,D=T-E;T<i&&D<a&&e.charAt(i-T-1)==t.charAt(a-D-1);)T++,D++;if(d[w]=T,T>i)v+=2;else if(D>a)_+=2;else if(!m){var x=s+p-E;if(x>=0&&x<l&&u[x]!=-1){var S=u[x],C=s+S-x;if(T=i-T,S>=T)return c(e,t,S,C)}}}}return[[n,e],[r,t]]}function c(e,t,n,r){var i=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=a(i,o),u=a(s,c);return l.concat(u)}function l(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i}function u(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i}function d(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;function i(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),i=-1,a=``,o,s,c,d;(i=t.indexOf(r,i+1))!=-1;){var f=l(e.substring(n),t.substring(i)),p=u(e.substring(0,n),t.substring(0,i));a.length<p+f&&(a=t.substring(i-p,i)+t.substring(i,i+f),o=e.substring(0,n-p),s=e.substring(n+f),c=t.substring(0,i-p),d=t.substring(i+f))}return a.length*2>=e.length?[o,s,c,d,a]:null}var a=i(n,r,Math.ceil(n.length/4)),o=i(n,r,Math.ceil(n.length/2)),s;if(!a&&!o)return null;s=o?a&&a[4].length>o[4].length?a:o:a;var c,d,f,p;e.length>t.length?(c=s[0],d=s[1],f=s[2],p=s[3]):(f=s[0],p=s[1],c=s[2],d=s[3]);var m=s[4];return[c,d,f,p,m]}function f(e){e.push([i,``]);for(var t=0,a=0,o=0,s=``,c=``,d;t<e.length;)switch(e[t][0]){case r:o++,c+=e[t][1],t++;break;case n:a++,s+=e[t][1],t++;break;case i:a+o>1?(a!==0&&o!==0&&(d=l(c,s),d!==0&&(t-a-o>0&&e[t-a-o-1][0]==i?e[t-a-o-1][1]+=c.substring(0,d):(e.splice(0,0,[i,c.substring(0,d)]),t++),c=c.substring(d),s=s.substring(d)),d=u(c,s),d!==0&&(e[t][1]=c.substring(c.length-d)+e[t][1],c=c.substring(0,c.length-d),s=s.substring(0,s.length-d))),a===0?e.splice(t-o,a+o,[r,c]):o===0?e.splice(t-a,a+o,[n,s]):e.splice(t-a-o,a+o,[n,s],[r,c]),t=t-a-o+(a?1:0)+(o?1:0)+1):t!==0&&e[t-1][0]==i?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,o=0,a=0,s=``,c=``;break}e[e.length-1][1]===``&&e.pop();var p=!1;for(t=1;t<e.length-1;)e[t-1][0]==i&&e[t+1][0]==i&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),p=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),p=!0)),t++;p&&f(e)}var p=a;p.INSERT=r,p.DELETE=n,p.EQUAL=i,e.exports=p;function m(e,t){if(t===0)return[i,e];for(var r=0,a=0;a<e.length;a++){var o=e[a];if(o[0]===n||o[0]===i){var s=r+o[1].length;if(t===s)return[a+1,e];if(t<s){e=e.slice();var c=t-r,l=[o[0],o[1].slice(0,c)],u=[o[0],o[1].slice(c)];return e.splice(a,1,l,u),[a+1,e]}else r=s}}throw Error(`cursor_pos is out of bounds!`)}function h(e,t){var n=m(e,t),r=n[1],a=n[0],o=r[a],s=r[a+1];if(o==null||o[0]!==i)return e;if(s!=null&&o[1]+s[1]===s[1]+o[1])return r.splice(a,2,s,o),_(r,a,2);if(s!=null&&s[1].indexOf(o[1])===0){r.splice(a,2,[s[0],o[1]],[0,o[1]]);var c=s[1].slice(o[1].length);return c.length>0&&r.splice(a+2,0,[s[0],c]),_(r,a,3)}else return e}function g(e){for(var t=!1,a=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},o=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},s=2;s<e.length;s+=1)e[s-2][0]===i&&o(e[s-2][1])&&e[s-1][0]===n&&a(e[s-1][1])&&e[s][0]===r&&a(e[s][1])&&(t=!0,e[s-1][1]=e[s-2][1].slice(-1)+e[s-1][1],e[s][1]=e[s-2][1].slice(-1)+e[s][1],e[s-2][1]=e[s-2][1].slice(0,-1));if(!t)return e;for(var c=[],s=0;s<e.length;s+=1)e[s][1].length>0&&c.push(e[s]);return c}function _(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var i=e[r],a=e[r+1];i[0]===a[1]&&e.splice(r,2,[i[0],i[1]+a[1]])}return e}}),(function(e,t){t=e.exports=typeof Object.keys==`function`?Object.keys:n,t.shim=n;function n(e){var t=[];for(var n in e)t.push(n);return t}}),(function(e,t){t=e.exports=(function(){return Object.prototype.toString.call(arguments)})()==`[object Arguments]`?n:r,t.supported=n;function n(e){return Object.prototype.toString.call(e)==`[object Arguments]`}t.unsupported=r;function r(e){return e&&typeof e==`object`&&typeof e.length==`number`&&Object.prototype.hasOwnProperty.call(e,`callee`)&&!Object.prototype.propertyIsEnumerable.call(e,`callee`)||!1}}),(function(e,t){var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},o.prototype.listeners=function(e,t){var n=r?r+e:e,i=this._events[n];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var a=0,o=i.length,s=Array(o);a<o;a++)s[a]=i[a].fn;return s},o.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},o.prototype.on=function(e,t,n){var i=new a(t,n||this),o=r?r+e:e;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},o.prototype.once=function(e,t,n){var i=new a(t,n||this,!0),o=r?r+e:e;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},o.prototype.removeListener=function(e,t,n,a){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return--this._eventsCount===0?this._events=new i:delete this._events[o],this;var s=this._events[o];if(s.fn)s.fn===t&&(!a||s.once)&&(!n||s.context===n)&&(--this._eventsCount===0?this._events=new i:delete this._events[o]);else{for(var c=0,l=[],u=s.length;c<u;c++)(s[c].fn!==t||a&&!s[c].once||n&&s[c].context!==n)&&l.push(s[c]);l.length?this._events[o]=l.length===1?l[0]:l:--this._eventsCount===0?this._events=new i:delete this._events[o]}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&(--this._eventsCount===0?this._events=new i:delete this._events[t])):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prototype.setMaxListeners=function(){return this},o.prefixed=r,o.EventEmitter=o,e!==void 0&&(e.exports=o)}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=y(n(3)),s=y(n(2)),c=y(n(0)),l=y(n(5)),u=y(n(10)),d=y(n(9)),f=n(36),p=n(37),m=y(n(13)),h=n(26),g=n(38),_=n(39),v=n(40);function y(e){return e&&e.__esModule?e:{default:e}}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function S(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function C(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var w=(0,u.default)(`quill:clipboard`),T=`__ql-matcher`,E=[[Node.TEXT_NODE,z],[Node.TEXT_NODE,R],[`br`,te],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,ee],[Node.ELEMENT_NODE,re],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,ie],[`li`,ne],[`b`,F.bind(F,`bold`)],[`i`,F.bind(F,`italic`)],[`style`,L]],D=[f.AlignAttribute,g.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),O=[f.AlignStyle,p.BackgroundStyle,h.ColorStyle,g.DirectionStyle,_.FontStyle,v.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),k=function(e){C(t,e);function t(e,n){x(this,t);var r=S(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener(`paste`,r.onPaste.bind(r)),r.container=r.quill.addContainer(`ql-clipboard`),r.container.setAttribute(`contenteditable`,!0),r.container.setAttribute(`tabindex`,-1),r.matchers=[],E.concat(r.options.matchers).forEach(function(e){var t=i(e,2),a=t[0],o=t[1];!n.matchVisual&&o===re||r.addMatcher(a,o)}),r}return a(t,[{key:`addMatcher`,value:function(e,t){this.matchers.push([e,t])}},{key:`convert`,value:function(e){if(typeof e==`string`)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,`><`),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[m.default.blotName]){var n=this.container.innerText;return this.container.innerHTML=``,new s.default().insert(n,b({},m.default.blotName,t[m.default.blotName]))}var r=i(this.prepareMatching(),2),a=r[0],o=r[1],c=P(this.container,a,o);return M(c,`
|
|
|
`)&&c.ops[c.ops.length-1].attributes==null&&(c=c.compose(new s.default().retain(c.length()-1).delete(1))),w.log(`convert`,this.container.innerHTML,c),this.container.innerHTML=``,c}},{key:`dangerouslyPasteHTML`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l.default.sources.API;if(typeof e==`string`)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,l.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents(new s.default().retain(e).concat(r),n),this.quill.setSelection(e+r.length(),l.default.sources.SILENT)}}},{key:`onPaste`,value:function(e){var t=this;if(!(e.defaultPrevented||!this.quill.isEnabled())){var n=this.quill.getSelection(),r=new s.default().retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(l.default.sources.SILENT),setTimeout(function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,l.default.sources.USER),t.quill.setSelection(r.length()-n.length,l.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()},1)}}},{key:`prepareMatching`,value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(r){var a=i(r,2),o=a[0],s=a[1];switch(o){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:t.push(s);break;default:[].forEach.call(e.container.querySelectorAll(o),function(e){e[T]=e[T]||[],e[T].push(s)});break}}),[t,n]}}]),t}(d.default);k.DEFAULTS={matchers:[],matchVisual:!0};function A(e,t,n){return(t===void 0?`undefined`:r(t))===`object`?Object.keys(t).reduce(function(e,n){return A(e,n,t[n])},e):e.reduce(function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,o.default)({},b({},t,n),r.attributes))},new s.default)}function j(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t=`__ql-computed-style`;return e[t]||(e[t]=window.getComputedStyle(e))}function M(e,t){for(var n=``,r=e.ops.length-1;r>=0&&n.length<t.length;--r){var i=e.ops[r];if(typeof i.insert!=`string`)break;n=i.insert+n}return n.slice(-1*t.length)===t}function N(e){if(e.childNodes.length===0)return!1;var t=j(e);return[`block`,`list-item`].indexOf(t.display)>-1}function P(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce(function(t,n){return n(e,t)},new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(r,i){var a=P(i,t,n);return i.nodeType===e.ELEMENT_NODE&&(a=t.reduce(function(e,t){return t(i,e)},a),a=(i[T]||[]).reduce(function(e,t){return t(i,e)},a)),r.concat(a)},new s.default):new s.default}function F(e,t,n){return A(n,e,!0)}function I(e,t){var n=c.default.Attributor.Attribute.keys(e),r=c.default.Attributor.Class.keys(e),i=c.default.Attributor.Style.keys(e),a={};return n.concat(r).concat(i).forEach(function(t){var n=c.default.query(t,c.default.Scope.ATTRIBUTE);n!=null&&(a[n.attrName]=n.value(e),a[n.attrName])||(n=D[t],n!=null&&(n.attrName===t||n.keyName===t)&&(a[n.attrName]=n.value(e)||void 0),n=O[t],n!=null&&(n.attrName===t||n.keyName===t)&&(n=O[t],a[n.attrName]=n.value(e)||void 0))}),Object.keys(a).length>0&&(t=A(t,a)),t}function ee(e,t){var n=c.default.query(e);if(n==null)return t;if(n.prototype instanceof c.default.Embed){var r={},i=n.value(e);i!=null&&(r[n.blotName]=i,t=new s.default().insert(r,n.formats(e)))}else typeof n.formats==`function`&&(t=A(t,n.blotName,n.formats(e)));return t}function te(e,t){return M(t,`
|
|
|
`)||t.insert(`
|
|
|
`),t}function L(){return new s.default}function ne(e,t){var n=c.default.query(e);if(n==null||n.blotName!==`list-item`||!M(t,`
|
|
|
`))return t;for(var r=-1,i=e.parentNode;!i.classList.contains(`ql-clipboard`);)(c.default.query(i)||{}).blotName===`list`&&(r+=1),i=i.parentNode;return r<=0?t:t.compose(new s.default().retain(t.length()-1).retain(1,{indent:r}))}function R(e,t){return M(t,`
|
|
|
`)||(N(e)||t.length()>0&&e.nextSibling&&N(e.nextSibling))&&t.insert(`
|
|
|
`),t}function re(e,t){if(N(e)&&e.nextElementSibling!=null&&!M(t,`
|
|
|
|
|
|
`)){var n=e.offsetHeight+parseFloat(j(e).marginTop)+parseFloat(j(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+n*1.5&&t.insert(`
|
|
|
`)}return t}function ie(e,t){var n={},r=e.style||{};return r.fontStyle&&j(e).fontStyle===`italic`&&(n.italic=!0),r.fontWeight&&(j(e).fontWeight.startsWith(`bold`)||parseInt(j(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=A(t,n)),parseFloat(r.textIndent||0)>0&&(t=new s.default().insert(` `).concat(t)),t}function z(e,t){var n=e.data;if(e.parentNode.tagName===`O:P`)return t.insert(n.trim());if(n.trim().length===0&&e.parentNode.classList.contains(`ql-clipboard`))return t;if(!j(e.parentNode).whiteSpace.startsWith(`pre`)){var r=function(e,t){return t=t.replace(/[^\u00a0]/g,``),t.length<1&&e?` `:t};n=n.replace(/\r\n/g,` `).replace(/\n/g,` `),n=n.replace(/\s\s+/g,r.bind(r,!0)),(e.previousSibling==null&&N(e.parentNode)||e.previousSibling!=null&&N(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(e.nextSibling==null&&N(e.parentNode)||e.nextSibling!=null&&N(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}t.default=k,t.matchAttributor=I,t.matchBlot=ee,t.matchNewline=R,t.matchSpacing=re,t.matchText=z}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){l(t,e);function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`optimize`,value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`optimize`,this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:`create`,value:function(){return i(t.__proto__||Object.getPrototypeOf(t),`create`,this).call(this)}},{key:`formats`,value:function(){return!0}}]),t}(a.default);u.blotName=`bold`,u.tagName=[`STRONG`,`B`],t.default=u}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.addControls=t.default=void 0;var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=u(n(2)),o=u(n(0)),s=u(n(5)),c=u(n(10)),l=u(n(9));function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function p(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function m(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=(0,c.default)(`quill:toolbar`),g=function(e){m(t,e);function t(e,n){f(this,t);var i=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(i.options.container)){var a=document.createElement(`div`);v(a,i.options.container),e.container.parentNode.insertBefore(a,e.container),i.container=a}else typeof i.options.container==`string`?i.container=document.querySelector(i.options.container):i.container=i.options.container;if(!(i.container instanceof HTMLElement)){var o;return o=h.error(`Container required for toolbar`,i.options),p(i,o)}return i.container.classList.add(`ql-toolbar`),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach(function(e){i.addHandler(e,i.options.handlers[e])}),[].forEach.call(i.container.querySelectorAll(`button, select`),function(e){i.attach(e)}),i.quill.on(s.default.events.EDITOR_CHANGE,function(e,t){e===s.default.events.SELECTION_CHANGE&&i.update(t)}),i.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){var e=r(i.quill.selection.getRange(),1)[0];i.update(e)}),i}return i(t,[{key:`addHandler`,value:function(e,t){this.handlers[e]=t}},{key:`attach`,value:function(e){var t=this,n=[].find.call(e.classList,function(e){return e.indexOf(`ql-`)===0});if(n){if(n=n.slice(3),e.tagName===`BUTTON`&&e.setAttribute(`type`,`button`),this.handlers[n]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[n]==null){h.warn(`ignoring attaching to disabled format`,n,e);return}if(o.default.query(n)==null){h.warn(`ignoring attaching to nonexistent format`,n,e);return}}var i=e.tagName===`SELECT`?`change`:`click`;e.addEventListener(i,function(i){var c=void 0;if(e.tagName===`SELECT`){if(e.selectedIndex<0)return;var l=e.options[e.selectedIndex];c=l.hasAttribute(`selected`)?!1:l.value||!1}else c=e.classList.contains(`ql-active`)?!1:e.value||!e.hasAttribute(`value`),i.preventDefault();t.quill.focus();var u=r(t.quill.selection.getRange(),1)[0];if(t.handlers[n]!=null)t.handlers[n].call(t,c);else if(o.default.query(n).prototype instanceof o.default.Embed){if(c=prompt(`Enter `+n),!c)return;t.quill.updateContents(new a.default().retain(u.index).delete(u.length).insert(d({},n,c)),s.default.sources.USER)}else t.quill.format(n,c,s.default.sources.USER);t.update(u)}),this.controls.push([n,e])}}},{key:`update`,value:function(e){var t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(function(n){var i=r(n,2),a=i[0],o=i[1];if(o.tagName===`SELECT`){var s=void 0;if(e==null)s=null;else if(t[a]==null)s=o.querySelector(`option[selected]`);else if(!Array.isArray(t[a])){var c=t[a];typeof c==`string`&&(c=c.replace(/\"/g,`\\"`)),s=o.querySelector(`option[value="`+c+`"]`)}s==null?(o.value=``,o.selectedIndex=-1):s.selected=!0}else if(e==null)o.classList.remove(`ql-active`);else if(o.hasAttribute(`value`)){var l=t[a]===o.getAttribute(`value`)||t[a]!=null&&t[a].toString()===o.getAttribute(`value`)||t[a]==null&&!o.getAttribute(`value`);o.classList.toggle(`ql-active`,l)}else o.classList.toggle(`ql-active`,t[a]!=null)})}}]),t}(l.default);g.DEFAULTS={};function _(e,t,n){var r=document.createElement(`button`);r.setAttribute(`type`,`button`),r.classList.add(`ql-`+t),n!=null&&(r.value=n),e.appendChild(r)}function v(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var n=document.createElement(`span`);n.classList.add(`ql-formats`),t.forEach(function(e){if(typeof e==`string`)_(n,e);else{var t=Object.keys(e)[0],r=e[t];Array.isArray(r)?y(n,t,r):_(n,t,r)}}),e.appendChild(n)})}function y(e,t,n){var r=document.createElement(`select`);r.classList.add(`ql-`+t),n.forEach(function(e){var t=document.createElement(`option`);e===!1?t.setAttribute(`selected`,`selected`):t.setAttribute(`value`,e),r.appendChild(t)}),e.appendChild(r)}g.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(t!=null)if(t.length==0){var n=this.quill.getFormat();Object.keys(n).forEach(function(t){o.default.query(t,o.default.Scope.INLINE)!=null&&e.quill.format(t,!1)})}else this.quill.removeFormat(t,s.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;e===`rtl`&&t==null?this.quill.format(`align`,`right`,s.default.sources.USER):!e&&t===`right`&&this.quill.format(`align`,!1,s.default.sources.USER),this.quill.format(`direction`,e,s.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if(e===`+1`||e===`-1`){var i=e===`+1`?1:-1;n.direction===`rtl`&&(i*=-1),this.quill.format(`indent`,r+i,s.default.sources.USER)}},link:function(e){e===!0&&(e=prompt(`Enter link URL:`)),this.quill.format(`link`,e,s.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);e===`check`?n.list===`checked`||n.list===`unchecked`?this.quill.format(`list`,!1,s.default.sources.USER):this.quill.format(`list`,`unchecked`,s.default.sources.USER):this.quill.format(`list`,e,s.default.sources.USER)}}},t.default=g,t.addControls=v}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>`}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=o(n(28));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.default=function(e){l(t,e);function t(e,n){s(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.label.innerHTML=n,r.container.classList.add(`ql-color-picker`),[].slice.call(r.container.querySelectorAll(`.ql-picker-item`),0,7).forEach(function(e){e.classList.add(`ql-primary`)}),r}return r(t,[{key:`buildItem`,value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`buildItem`,this).call(this,e);return n.style.backgroundColor=e.getAttribute(`value`)||``,n}},{key:`selectItem`,value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`selectItem`,this).call(this,e,n);var r=this.label.querySelector(`.ql-color-label`),a=e&&e.getAttribute(`data-value`)||``;r&&(r.tagName===`line`?r.style.stroke=a:r.style.fill=a)}}]),t}(a.default)}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=o(n(28));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.default=function(e){l(t,e);function t(e,n){s(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.container.classList.add(`ql-icon-picker`),[].forEach.call(r.container.querySelectorAll(`.ql-picker-item`),function(e){e.innerHTML=n[e.getAttribute(`data-value`)||``]}),r.defaultItem=r.container.querySelector(`.ql-selected`),r.selectItem(r.defaultItem),r}return r(t,[{key:`selectItem`,value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`selectItem`,this).call(this,e,n),e||=this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(a.default)}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}t.default=function(){function e(t,n){var r=this;i(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer(`ql-tooltip`),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener(`scroll`,function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+`px`}),this.hide()}return r(e,[{key:`hide`,value:function(){this.root.classList.add(`ql-hidden`)}},{key:`position`,value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+`px`,this.root.style.top=n+`px`,this.root.classList.remove(`ql-flip`);var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),a=0;if(i.right>r.right&&(a=r.right-i.right,this.root.style.left=t+a+`px`),i.left<r.left&&(a=r.left-i.left,this.root.style.left=t+a+`px`),i.bottom>r.bottom){var o=i.bottom-i.top,s=e.bottom-e.top+o;this.root.style.top=n-s+`px`,this.root.classList.add(`ql-flip`)}return a}},{key:`show`,value:function(){this.root.classList.remove(`ql-editing`),this.root.classList.remove(`ql-hidden`)}}]),e}()}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=p(n(3)),s=p(n(8)),c=n(43),l=p(c),u=p(n(27)),d=n(15),f=p(n(41));function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function h(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function g(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _=[[{header:[`1`,`2`,`3`,!1]}],[`bold`,`italic`,`underline`,`link`],[{list:`ordered`},{list:`bullet`}],[`clean`]],v=function(e){g(t,e);function t(e,n){m(this,t),n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=_);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add(`ql-snow`),r}return a(t,[{key:`extendToolbar`,value:function(e){e.container.classList.add(`ql-snow`),this.buildButtons([].slice.call(e.container.querySelectorAll(`button`)),f.default),this.buildPickers([].slice.call(e.container.querySelectorAll(`select`)),f.default),this.tooltip=new y(this.quill,this.options.bounds),e.container.querySelector(`.ql-link`)&&this.quill.keyboard.addBinding({key:`K`,shortKey:!0},function(t,n){e.handlers.link.call(e,!n.format.link)})}}]),t}(l.default);v.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(t==null||t.length==0)return;var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf(`mailto:`)!==0&&(n=`mailto:`+n),this.quill.theme.tooltip.edit(`link`,n)}else this.quill.format(`link`,!1)}}}}});var y=function(e){g(t,e);function t(e,n){m(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector(`a.ql-preview`),r}return a(t,[{key:`listen`,value:function(){var e=this;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`listen`,this).call(this),this.root.querySelector(`a.ql-action`).addEventListener(`click`,function(t){e.root.classList.contains(`ql-editing`)?e.save():e.edit(`link`,e.preview.textContent),t.preventDefault()}),this.root.querySelector(`a.ql-remove`).addEventListener(`click`,function(t){if(e.linkRange!=null){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,`link`,!1,s.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(s.default.events.SELECTION_CHANGE,function(t,n,i){if(t!=null){if(t.length===0&&i===s.default.sources.USER){var a=r(e.quill.scroll.descendant(u.default,t.index),2),o=a[0],c=a[1];if(o!=null){e.linkRange=new d.Range(t.index-c,o.length());var l=u.default.formats(o.domNode);e.preview.textContent=l,e.preview.setAttribute(`href`,l),e.show(),e.position(e.quill.getBounds(e.linkRange));return}}else delete e.linkRange;e.hide()}})}},{key:`show`,value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`show`,this).call(this),this.root.removeAttribute(`data-mode`)}}]),t}(c.BaseTooltip);y.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(``),t.default=v}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=F(n(29)),i=n(36),a=n(38),o=n(64),s=F(n(65)),c=F(n(66)),l=n(67),u=F(l),d=n(37),f=n(26),p=n(39),m=n(40),h=F(n(56)),g=F(n(68)),_=F(n(27)),v=F(n(69)),y=F(n(70)),b=F(n(71)),x=F(n(72)),S=F(n(73)),C=n(13),w=F(C),T=F(n(74)),E=F(n(75)),D=F(n(57)),O=F(n(41)),k=F(n(28)),A=F(n(59)),j=F(n(60)),M=F(n(61)),N=F(n(108)),P=F(n(62));function F(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":m.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":m.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":o.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":p.FontClass,"formats/size":m.SizeClass,"formats/blockquote":s.default,"formats/code-block":w.default,"formats/header":c.default,"formats/list":u.default,"formats/bold":h.default,"formats/code":C.Code,"formats/italic":g.default,"formats/link":_.default,"formats/script":v.default,"formats/strike":y.default,"formats/underline":b.default,"formats/image":x.default,"formats/video":S.default,"formats/list/item":l.ListItem,"modules/formula":T.default,"modules/syntax":E.default,"modules/toolbar":D.default,"themes/bubble":N.default,"themes/snow":P.default,"ui/icons":O.default,"ui/picker":k.default,"ui/icon-picker":j.default,"ui/color-picker":A.default,"ui/tooltip":M.default},!0),t.default=r.default}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.IndentClass=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.IndentClass=new(function(e){l(t,e);function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`add`,value:function(e,n){if(n===`+1`||n===`-1`){var r=this.value(e)||0;n=n===`+1`?r+1:r-1}return n===0?(this.remove(e),!0):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`add`,this).call(this,e,n)}},{key:`canAdd`,value:function(e,n){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`canAdd`,this).call(this,e,n)||i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`canAdd`,this).call(this,e,parseInt(n))}},{key:`value`,value:function(e){return parseInt(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`value`,this).call(this,e))||void 0}}]),t}(a.default.Attributor.Class))(`indent`,`ql-indent`,{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]})}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=i(n(4));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){s(t,e);function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(r.default);c.blotName=`blockquote`,c.tagName=`blockquote`,t.default=c}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(4));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=function(e){c(t,e);function t(){return o(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,null,[{key:`formats`,value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(i.default);l.blotName=`header`,l.tagName=[`H1`,`H2`,`H3`,`H4`,`H5`,`H6`],t.default=l}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=t.ListItem=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=c(n(0)),o=c(n(4)),s=c(n(25));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function d(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function f(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){f(t,e);function t(){return u(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`format`,value:function(e,n){e===m.blotName&&!n?this.replaceWith(a.default.create(this.statics.scope)):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`format`,this).call(this,e,n)}},{key:`remove`,value:function(){this.prev==null&&this.next==null?this.parent.remove():i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`remove`,this).call(this)}},{key:`replaceWith`,value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`replaceWith`,this).call(this,e,n))}}],[{key:`formats`,value:function(e){return e.tagName===this.tagName?void 0:i(t.__proto__||Object.getPrototypeOf(t),`formats`,this).call(this,e)}}]),t}(o.default);p.blotName=`list-item`,p.tagName=`LI`;var m=function(e){f(t,e),r(t,null,[{key:`create`,value:function(e){var n=e===`ordered`?`OL`:`UL`,r=i(t.__proto__||Object.getPrototypeOf(t),`create`,this).call(this,n);return(e===`checked`||e===`unchecked`)&&r.setAttribute(`data-checked`,e===`checked`),r}},{key:`formats`,value:function(e){if(e.tagName===`OL`)return`ordered`;if(e.tagName===`UL`)return e.hasAttribute(`data-checked`)?e.getAttribute(`data-checked`)===`true`?`checked`:`unchecked`:`bullet`}}]);function t(e){u(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),i=a.default.find(t.target);r===`checked`?i.format(`list`,`unchecked`):r===`unchecked`&&i.format(`list`,`checked`)}};return e.addEventListener(`touchstart`,r),e.addEventListener(`mousedown`,r),n}return r(t,[{key:`format`,value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:`formats`,value:function(){return l({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:`insertBefore`,value:function(e,n){if(e instanceof p)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`insertBefore`,this).call(this,e,n);else{var r=n==null?this.length():n.offset(this),a=this.split(r);a.parent.insertBefore(e,a)}}},{key:`optimize`,value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`optimize`,this).call(this,e);var n=this.next;n!=null&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute(`data-checked`)===this.domNode.getAttribute(`data-checked`)&&(n.moveChildren(this),n.remove())}},{key:`replace`,value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=a.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`replace`,this).call(this,e)}}]),t}(s.default);m.blotName=`list`,m.scope=a.default.Scope.BLOCK_BLOT,m.tagName=[`OL`,`UL`],m.defaultChild=`list-item`,m.allowedChildren=[p],t.ListItem=p,t.default=m}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=i(n(56));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){s(t,e);function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(r.default);c.blotName=`italic`,c.tagName=[`EM`,`I`],t.default=c}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){l(t,e);function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,null,[{key:`create`,value:function(e){return e===`super`?document.createElement(`sup`):e===`sub`?document.createElement(`sub`):i(t.__proto__||Object.getPrototypeOf(t),`create`,this).call(this,e)}},{key:`formats`,value:function(e){if(e.tagName===`SUB`)return`sub`;if(e.tagName===`SUP`)return`super`}}]),t}(a.default);u.blotName=`script`,u.tagName=[`SUB`,`SUP`],t.default=u}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){s(t,e);function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(r.default);c.blotName=`strike`,c.tagName=`S`,t.default=c}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){s(t,e);function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(r.default);c.blotName=`underline`,c.tagName=`U`,t.default=c}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=s(n(0)),o=n(27);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function l(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function u(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=[`alt`,`height`,`width`],f=function(e){u(t,e);function t(){return c(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`format`,value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`format`,this).call(this,e,n)}}],[{key:`create`,value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),`create`,this).call(this,e);return typeof e==`string`&&n.setAttribute(`src`,this.sanitize(e)),n}},{key:`formats`,value:function(e){return d.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:`match`,value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:`sanitize`,value:function(e){return(0,o.sanitize)(e,[`http`,`https`,`data`])?e:`//:0`}},{key:`value`,value:function(e){return e.getAttribute(`src`)}}]),t}(a.default.Embed);f.blotName=`image`,f.tagName=`IMG`,t.default=f}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=n(4),o=s(n(27));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function l(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function u(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=[`height`,`width`],f=function(e){u(t,e);function t(){return c(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`format`,value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`format`,this).call(this,e,n)}}],[{key:`create`,value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),`create`,this).call(this,e);return n.setAttribute(`frameborder`,`0`),n.setAttribute(`allowfullscreen`,!0),n.setAttribute(`src`,this.sanitize(e)),n}},{key:`formats`,value:function(e){return d.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:`sanitize`,value:function(e){return o.default.sanitize(e)}},{key:`value`,value:function(e){return e.getAttribute(`src`)}}]),t}(a.BlockEmbed);f.blotName=`video`,f.className=`ql-video`,f.tagName=`IFRAME`,t.default=f}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=c(n(35)),o=c(n(5)),s=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function u(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function d(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){d(t,e);function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,null,[{key:`create`,value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),`create`,this).call(this,e);return typeof e==`string`&&(window.katex.render(e,n,{throwOnError:!1,errorColor:`#f00`}),n.setAttribute(`data-value`,e)),n}},{key:`value`,value:function(e){return e.getAttribute(`data-value`)}}]),t}(a.default);f.blotName=`formula`,f.className=`ql-formula`,f.tagName=`SPAN`;var p=function(e){d(t,e),r(t,null,[{key:`register`,value:function(){o.default.register(f,!0)}}]);function t(){l(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(window.katex==null)throw Error(`Formula module requires KaTeX.`);return e}return t}(s.default);t.FormulaBlot=f,t.default=p}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},a=l(n(0)),o=l(n(5)),s=l(n(9)),c=l(n(13));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function d(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function f(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){f(t,e);function t(){return u(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,[{key:`replaceWith`,value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`replaceWith`,this).call(this,e)}},{key:`highlight`,value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(c.default);p.className=`ql-syntax`;var m=new a.default.Attributor.Class(`token`,`hljs`,{scope:a.default.Scope.INLINE}),h=function(e){f(t,e),r(t,null,[{key:`register`,value:function(){o.default.register(m,!0),o.default.register(p,!0)}}]);function t(e,n){u(this,t);var r=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(typeof r.options.highlight!=`function`)throw Error(`Syntax module requires highlight.js. Please include the library on the page before Quill.`);var i=null;return r.quill.on(o.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(i),i=setTimeout(function(){r.highlight(),i=null},r.options.interval)}),r.highlight(),r}return r(t,[{key:`highlight`,value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(o.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(p).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(o.default.sources.SILENT),t!=null&&this.quill.setSelection(t,o.default.sources.SILENT)}}}]),t}(s.default);h.DEFAULTS={highlight:function(){return window.hljs==null?null:function(e){return window.hljs.highlightAuto(e).value}}(),interval:1e3},t.CodeBlock=p,t.CodeToken=m,t.default=h}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>`}),(function(e,t){e.exports=`<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"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <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"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>`}),(function(e,t){e.exports=`<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> <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></path> </svg>`}),(function(e,t){e.exports=`<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>`}),(function(e,t){e.exports=`<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></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <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></path> </svg>`}),(function(e,t){e.exports=`<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>`}),(function(e,t){e.exports=`<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>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <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> <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></path> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <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> <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> <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></path> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>`}),(function(e,t){e.exports=`<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>`}),(function(e,t){e.exports=`<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>`}),(function(e,t){e.exports=`<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>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <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> <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></path> </svg>`}),(function(e,t){e.exports=`<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></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>`}),(function(e,t){e.exports=`<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>`}),(function(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=d(n(3)),o=d(n(8)),s=n(43),c=d(s),l=n(15),u=d(n(41));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function p(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function m(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=[[`bold`,`italic`,`link`],[{header:1},{header:2},`blockquote`]],g=function(e){m(t,e);function t(e,n){f(this,t),n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=h);var r=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add(`ql-bubble`),r}return i(t,[{key:`extendToolbar`,value:function(e){this.tooltip=new _(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll(`button`)),u.default),this.buildPickers([].slice.call(e.container.querySelectorAll(`select`)),u.default)}}]),t}(c.default);g.DEFAULTS=(0,a.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format(`link`,!1)}}}}});var _=function(e){m(t,e);function t(e,n){f(this,t);var r=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(o.default.events.EDITOR_CHANGE,function(e,t,n,i){if(e===o.default.events.SELECTION_CHANGE)if(t!=null&&t.length>0&&i===o.default.sources.USER){r.show(),r.root.style.left=`0px`,r.root.style.width=``,r.root.style.width=r.root.offsetWidth+`px`;var a=r.quill.getLines(t.index,t.length);if(a.length===1)r.position(r.quill.getBounds(t));else{var s=a[a.length-1],c=r.quill.getIndex(s),u=Math.min(s.length()-1,t.index+t.length-c),d=r.quill.getBounds(new l.Range(c,u));r.position(d)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return i(t,[{key:`listen`,value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`listen`,this).call(this),this.root.querySelector(`.ql-close`).addEventListener(`click`,function(){e.root.classList.remove(`ql-editing`)}),this.quill.on(o.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains(`ql-hidden`)){var t=e.quill.getSelection();t!=null&&e.position(e.quill.getBounds(t))}},1)})}},{key:`cancel`,value:function(){this.show()}},{key:`position`,value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),`position`,this).call(this,e),i=this.root.querySelector(`.ql-tooltip-arrow`);if(i.style.marginLeft=``,n===0)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+`px`}}]),t}(s.BaseTooltip);_.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(``),t.BubbleTooltip=_,t.default=g}),(function(e,t,n){e.exports=n(63)})]).default})})),T=e(((e,t)=>{var n=-1,r=1,i=0;function a(e,t,n,r){if(e===t)return e?[[i,e]]:[];if(n!=null){var a=y(e,t,n);if(a)return a}var s=l(e,t),c=e.substring(0,s);e=e.substring(s),t=t.substring(s),s=u(e,t);var d=e.substring(e.length-s);e=e.substring(0,e.length-s),t=t.substring(0,t.length-s);var p=o(e,t);return c&&p.unshift([i,c]),d&&p.push([i,d]),f(p,r),p}function o(e,t){var o;if(!e)return[[r,t]];if(!t)return[[n,e]];var c=e.length>t.length?e:t,l=e.length>t.length?t:e,u=c.indexOf(l);if(u!==-1)return o=[[r,c.substring(0,u)],[i,l],[r,c.substring(u+l.length)]],e.length>t.length&&(o[0][0]=o[2][0]=n),o;if(l.length===1)return[[n,e],[r,t]];var f=d(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=a(p,h),y=a(m,g);return v.concat([[i,_]],y)}return s(e,t)}function s(e,t){for(var i=e.length,a=t.length,o=Math.ceil((i+a)/2),s=o,l=2*o,u=Array(l),d=Array(l),f=0;f<l;f++)u[f]=-1,d[f]=-1;u[s+1]=0,d[s+1]=0;for(var p=i-a,m=p%2!=0,h=0,g=0,_=0,v=0,y=0;y<o;y++){for(var b=-y+h;b<=y-g;b+=2){for(var x=s+b,S=b===-y||b!==y&&u[x-1]<u[x+1]?u[x+1]:u[x-1]+1,C=S-b;S<i&&C<a&&e.charAt(S)===t.charAt(C);)S++,C++;if(u[x]=S,S>i)g+=2;else if(C>a)h+=2;else if(m){var w=s+p-b;if(w>=0&&w<l&&d[w]!==-1){var T=i-d[w];if(S>=T)return c(e,t,S,C)}}}for(var E=-y+_;E<=y-v;E+=2){for(var w=s+E,T=E===-y||E!==y&&d[w-1]<d[w+1]?d[w+1]:d[w-1]+1,D=T-E;T<i&&D<a&&e.charAt(i-T-1)===t.charAt(a-D-1);)T++,D++;if(d[w]=T,T>i)v+=2;else if(D>a)_+=2;else if(!m){var x=s+p-E;if(x>=0&&x<l&&u[x]!==-1){var S=u[x],C=s+S-x;if(T=i-T,S>=T)return c(e,t,S,C)}}}}return[[n,e],[r,t]]}function c(e,t,n,r){var i=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=a(i,o),u=a(s,c);return l.concat(u)}function l(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return p(e.charCodeAt(i-1))&&i--,i}function u(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return m(e.charCodeAt(e.length-i))&&i--,i}function d(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;function i(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),i=-1,a=``,o,s,c,d;(i=t.indexOf(r,i+1))!==-1;){var f=l(e.substring(n),t.substring(i)),p=u(e.substring(0,n),t.substring(0,i));a.length<p+f&&(a=t.substring(i-p,i)+t.substring(i,i+f),o=e.substring(0,n-p),s=e.substring(n+f),c=t.substring(0,i-p),d=t.substring(i+f))}return a.length*2>=e.length?[o,s,c,d,a]:null}var a=i(n,r,Math.ceil(n.length/4)),o=i(n,r,Math.ceil(n.length/2)),s;if(!a&&!o)return null;s=o?a&&a[4].length>o[4].length?a:o:a;var c,d,f,p;e.length>t.length?(c=s[0],d=s[1],f=s[2],p=s[3]):(f=s[0],p=s[1],c=s[2],d=s[3]);var m=s[4];return[c,d,f,p,m]}function f(e,t){e.push([i,``]);for(var a=0,o=0,s=0,c=``,d=``,p;a<e.length;){if(a<e.length-1&&!e[a][1]){e.splice(a,1);continue}switch(e[a][0]){case r:s++,d+=e[a][1],a++;break;case n:o++,c+=e[a][1],a++;break;case i:var m=a-s-o-1;if(t){if(m>=0&&g(e[m][1])){var _=e[m][1].slice(-1);if(e[m][1]=e[m][1].slice(0,-1),c=_+c,d=_+d,!e[m][1]){e.splice(m,1),a--;var v=m-1;e[v]&&e[v][0]===r&&(s++,d=e[v][1]+d,v--),e[v]&&e[v][0]===n&&(o++,c=e[v][1]+c,v--),m=v}}if(h(e[a][1])){var _=e[a][1].charAt(0);e[a][1]=e[a][1].slice(1),c+=_,d+=_}}if(a<e.length-1&&!e[a][1]){e.splice(a,1);break}if(c.length>0||d.length>0){c.length>0&&d.length>0&&(p=l(d,c),p!==0&&(m>=0?e[m][1]+=d.substring(0,p):(e.splice(0,0,[i,d.substring(0,p)]),a++),d=d.substring(p),c=c.substring(p)),p=u(d,c),p!==0&&(e[a][1]=d.substring(d.length-p)+e[a][1],d=d.substring(0,d.length-p),c=c.substring(0,c.length-p)));var y=s+o;c.length===0&&d.length===0?(e.splice(a-y,y),a-=y):c.length===0?(e.splice(a-y,y,[r,d]),a=a-y+1):d.length===0?(e.splice(a-y,y,[n,c]),a=a-y+1):(e.splice(a-y,y,[n,c],[r,d]),a=a-y+2)}a!==0&&e[a-1][0]===i?(e[a-1][1]+=e[a][1],e.splice(a,1)):a++,s=0,o=0,c=``,d=``;break}}e[e.length-1][1]===``&&e.pop();var b=!1;for(a=1;a<e.length-1;)e[a-1][0]===i&&e[a+1][0]===i&&(e[a][1].substring(e[a][1].length-e[a-1][1].length)===e[a-1][1]?(e[a][1]=e[a-1][1]+e[a][1].substring(0,e[a][1].length-e[a-1][1].length),e[a+1][1]=e[a-1][1]+e[a+1][1],e.splice(a-1,1),b=!0):e[a][1].substring(0,e[a+1][1].length)==e[a+1][1]&&(e[a-1][1]+=e[a+1][1],e[a][1]=e[a][1].substring(e[a+1][1].length)+e[a+1][1],e.splice(a+1,1),b=!0)),a++;b&&f(e,t)}function p(e){return e>=55296&&e<=56319}function m(e){return e>=56320&&e<=57343}function h(e){return m(e.charCodeAt(0))}function g(e){return p(e.charCodeAt(e.length-1))}function _(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}function v(e,t,a,o){return g(e)||h(o)?null:_([[i,e],[n,t],[r,a],[i,o]])}function y(e,t,n){var r=typeof n==`number`?{index:n,length:0}:n.oldRange,i=typeof n==`number`?null:n.newRange,a=e.length,o=t.length;if(r.length===0&&(i===null||i.length===0)){var s=r.index,c=e.slice(0,s),l=e.slice(s),u=i?i.index:null;editBefore:{var d=s+o-a;if(u!==null&&u!==d||d<0||d>o)break editBefore;var f=t.slice(0,d),p=t.slice(d);if(p!==l)break editBefore;var m=Math.min(s,d),h=c.slice(0,m),g=f.slice(0,m);if(h!==g)break editBefore;var _=c.slice(m),y=f.slice(m);return v(h,_,y,l)}editAfter:{if(u!==null&&u!==s)break editAfter;var b=s,f=t.slice(0,b),p=t.slice(b);if(f!==c)break editAfter;var x=Math.min(a-b,o-b),S=l.slice(l.length-x),C=p.slice(p.length-x);if(S!==C)break editAfter;var _=l.slice(0,l.length-x),y=p.slice(0,p.length-x);return v(c,_,y,S)}}if(r.length>0&&i&&i.length===0)replaceRange:{var h=e.slice(0,r.index),S=e.slice(r.index+r.length),m=h.length,x=S.length;if(o<m+x)break replaceRange;var g=t.slice(0,m),C=t.slice(o-x);if(h!==g||S!==C)break replaceRange;var _=e.slice(m,a-x),y=t.slice(m,o-x);return v(h,_,y,S)}return null}function b(e,t,n){return a(e,t,n,!0)}b.INSERT=r,b.DELETE=n,b.EQUAL=i,t.exports=b})),E=e(((e,t)=>{var n=200,r=`__lodash_hash_undefined__`,i=9007199254740991,a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object GeneratorFunction]`,f=`[object Map]`,p=`[object Number]`,m=`[object Object]`,h=`[object Promise]`,g=`[object RegExp]`,_=`[object Set]`,v=`[object String]`,y=`[object Symbol]`,b=`[object WeakMap]`,x=`[object ArrayBuffer]`,S=`[object DataView]`,C=`[object Float32Array]`,w=`[object Float64Array]`,T=`[object Int8Array]`,E=`[object Int16Array]`,D=`[object Int32Array]`,O=`[object Uint8Array]`,k=`[object Uint8ClampedArray]`,A=`[object Uint16Array]`,j=`[object Uint32Array]`,M=/[\\^$.*+?()[\]{}|]/g,N=/\w*$/,P=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,I={};I[a]=I[o]=I[x]=I[S]=I[s]=I[c]=I[C]=I[w]=I[T]=I[E]=I[D]=I[f]=I[p]=I[m]=I[g]=I[_]=I[v]=I[y]=I[O]=I[k]=I[A]=I[j]=!0,I[l]=I[u]=I[b]=!1;var ee=typeof global==`object`&&global&&global.Object===Object&&global,te=typeof self==`object`&&self&&self.Object===Object&&self,L=ee||te||Function(`return this`)(),ne=typeof e==`object`&&e&&!e.nodeType&&e,R=ne&&typeof t==`object`&&t&&!t.nodeType&&t,re=R&&R.exports===ne;function ie(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function ae(e,t){for(var n=-1,r=e?e.length:0;++n<r&&t(e[n],n,e)!==!1;);return e}function oe(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function se(e,t,n,r){var i=-1,a=e?e.length:0;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function ce(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function le(e,t){return e?.[t]}function ue(e){var t=!1;if(e!=null&&typeof e.toString!=`function`)try{t=!!(e+``)}catch{}return t}function de(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function fe(e,t){return function(n){return e(t(n))}}function pe(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var me=Array.prototype,he=Function.prototype,ge=Object.prototype,_e=L[`__core-js_shared__`],ve=function(){var e=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),ye=he.toString,B=ge.hasOwnProperty,be=ge.toString,xe=RegExp(`^`+ye.call(B).replace(M,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Se=re?L.Buffer:void 0,Ce=L.Symbol,we=L.Uint8Array,V=fe(Object.getPrototypeOf,Object),Te=Object.create,Ee=ge.propertyIsEnumerable,De=me.splice,Oe=Object.getOwnPropertySymbols,ke=Se?Se.isBuffer:void 0,Ae=fe(Object.keys,Object),je=J(L,`DataView`),Me=J(L,`Map`),H=J(L,`Promise`),Ne=J(L,`Set`),Pe=J(L,`WeakMap`),Fe=J(Object,`create`),Ie=Q(je),Le=Q(Me),Re=Q(H),ze=Q(Ne),Be=Q(Pe),Ve=Ce?Ce.prototype:void 0,He=Ve?Ve.valueOf:void 0;function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ue(){this.__data__=Fe?Fe(null):{}}function We(e){return this.has(e)&&delete this.__data__[e]}function Ge(e){var t=this.__data__;if(Fe){var n=t[e];return n===r?void 0:n}return B.call(t,e)?t[e]:void 0}function Ke(e){var t=this.__data__;return Fe?t[e]!==void 0:B.call(t,e)}function qe(e,t){var n=this.__data__;return n[e]=Fe&&t===void 0?r:t,this}U.prototype.clear=Ue,U.prototype.delete=We,U.prototype.get=Ge,U.prototype.has=Ke,U.prototype.set=qe;function W(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Je(){this.__data__=[]}function Ye(e){var t=this.__data__,n=dt(t,e);return n<0?!1:(n==t.length-1?t.pop():De.call(t,n,1),!0)}function Xe(e){var t=this.__data__,n=dt(t,e);return n<0?void 0:t[n][1]}function Ze(e){return dt(this.__data__,e)>-1}function Qe(e,t){var n=this.__data__,r=dt(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}W.prototype.clear=Je,W.prototype.delete=Ye,W.prototype.get=Xe,W.prototype.has=Ze,W.prototype.set=Qe;function G(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $e(){this.__data__={hash:new U,map:new(Me||W),string:new U}}function et(e){return At(this,e).delete(e)}function tt(e){return At(this,e).get(e)}function nt(e){return At(this,e).has(e)}function rt(e,t){return At(this,e).set(e,t),this}G.prototype.clear=$e,G.prototype.delete=et,G.prototype.get=tt,G.prototype.has=nt,G.prototype.set=rt;function K(e){this.__data__=new W(e)}function it(){this.__data__=new W}function at(e){return this.__data__.delete(e)}function ot(e){return this.__data__.get(e)}function st(e){return this.__data__.has(e)}function ct(e,t){var r=this.__data__;if(r instanceof W){var i=r.__data__;if(!Me||i.length<n-1)return i.push([e,t]),this;r=this.__data__=new G(i)}return r.set(e,t),this}K.prototype.clear=it,K.prototype.delete=at,K.prototype.get=ot,K.prototype.has=st,K.prototype.set=ct;function lt(e,t){var n=Bt(e)||zt(e)?ce(e.length,String):[],r=n.length,i=!!r;for(var a in e)(t||B.call(e,a))&&!(i&&(a==`length`||Nt(a,r)))&&n.push(a);return n}function ut(e,t,n){var r=e[t];(!(B.call(e,t)&&Rt(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function dt(e,t){for(var n=e.length;n--;)if(Rt(e[n][0],t))return n;return-1}function q(e,t){return e&&Dt(t,qt(t),e)}function ft(e,t,n,r,i,o,s){var c;if(r&&(c=o?r(e,i,o,s):r(e)),c!==void 0)return c;if(!$(e))return e;var l=Bt(e);if(l){if(c=jt(e),!t)return Et(e,c)}else{var f=X(e),p=f==u||f==d;if(Ut(e))return vt(e,t);if(f==m||f==a||p&&!o){if(ue(e))return o?e:{};if(c=Z(p?{}:e),!t)return Ot(e,q(c,e))}else{if(!I[f])return o?e:{};c=Mt(e,f,ft,t)}}s||=new K;var h=s.get(e);if(h)return h;if(s.set(e,c),!l)var g=n?kt(e):qt(e);return ae(g||e,function(i,a){g&&(a=i,i=e[a]),ut(c,a,ft(i,t,n,r,a,e,s))}),c}function pt(e){return $(e)?Te(e):{}}function mt(e,t,n){var r=t(e);return Bt(e)?r:oe(r,n(e))}function ht(e){return be.call(e)}function gt(e){return!$(e)||Ft(e)?!1:(Wt(e)||ue(e)?xe:P).test(Q(e))}function _t(e){if(!It(e))return Ae(e);var t=[];for(var n in Object(e))B.call(e,n)&&n!=`constructor`&&t.push(n);return t}function vt(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function yt(e){var t=new e.constructor(e.byteLength);return new we(t).set(new we(e)),t}function bt(e,t){var n=t?yt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function xt(e,t,n){return se(t?n(de(e),!0):de(e),ie,new e.constructor)}function St(e){var t=new e.constructor(e.source,N.exec(e));return t.lastIndex=e.lastIndex,t}function Ct(e,t,n){return se(t?n(pe(e),!0):pe(e),z,new e.constructor)}function wt(e){return He?Object(He.call(e)):{}}function Tt(e,t){var n=t?yt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Et(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function Dt(e,t,n,r){n||={};for(var i=-1,a=t.length;++i<a;){var o=t[i],s=r?r(n[o],e[o],o,n,e):void 0;ut(n,o,s===void 0?e[o]:s)}return n}function Ot(e,t){return Dt(e,Y(e),t)}function kt(e){return mt(e,qt,Y)}function At(e,t){var n=e.__data__;return Pt(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function J(e,t){var n=le(e,t);return gt(n)?n:void 0}var Y=Oe?fe(Oe,Object):Jt,X=ht;(je&&X(new je(new ArrayBuffer(1)))!=S||Me&&X(new Me)!=f||H&&X(H.resolve())!=h||Ne&&X(new Ne)!=_||Pe&&X(new Pe)!=b)&&(X=function(e){var t=be.call(e),n=t==m?e.constructor:void 0,r=n?Q(n):void 0;if(r)switch(r){case Ie:return S;case Le:return f;case Re:return h;case ze:return _;case Be:return b}return t});function jt(e){var t=e.length,n=e.constructor(t);return t&&typeof e[0]==`string`&&B.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function Z(e){return typeof e.constructor==`function`&&!It(e)?pt(V(e)):{}}function Mt(e,t,n,r){var i=e.constructor;switch(t){case x:return yt(e);case s:case c:return new i(+e);case S:return bt(e,r);case C:case w:case T:case E:case D:case O:case k:case A:case j:return Tt(e,r);case f:return xt(e,r,n);case p:case v:return new i(e);case g:return St(e);case _:return Ct(e,r,n);case y:return wt(e)}}function Nt(e,t){return t??=i,!!t&&(typeof e==`number`||F.test(e))&&e>-1&&e%1==0&&e<t}function Pt(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Ft(e){return!!ve&&ve in e}function It(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||ge)}function Q(e){if(e!=null){try{return ye.call(e)}catch{}try{return e+``}catch{}}return``}function Lt(e){return ft(e,!0,!0)}function Rt(e,t){return e===t||e!==e&&t!==t}function zt(e){return Ht(e)&&B.call(e,`callee`)&&(!Ee.call(e,`callee`)||be.call(e)==a)}var Bt=Array.isArray;function Vt(e){return e!=null&&Gt(e.length)&&!Wt(e)}function Ht(e){return Kt(e)&&Vt(e)}var Ut=ke||Yt;function Wt(e){var t=$(e)?be.call(e):``;return t==u||t==d}function Gt(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=i}function $(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function Kt(e){return!!e&&typeof e==`object`}function qt(e){return Vt(e)?lt(e):_t(e)}function Jt(){return[]}function Yt(){return!1}t.exports=Lt})),D=e(((e,t)=>{var n=200,r=`__lodash_hash_undefined__`,i=1,a=2,o=9007199254740991,s=`[object Arguments]`,c=`[object Array]`,l=`[object AsyncFunction]`,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Function]`,m=`[object GeneratorFunction]`,h=`[object Map]`,g=`[object Number]`,_=`[object Null]`,v=`[object Object]`,y=`[object Promise]`,b=`[object Proxy]`,x=`[object RegExp]`,S=`[object Set]`,C=`[object String]`,w=`[object Symbol]`,T=`[object Undefined]`,E=`[object WeakMap]`,D=`[object ArrayBuffer]`,O=`[object DataView]`,k=`[object Float32Array]`,A=`[object Float64Array]`,j=`[object Int8Array]`,M=`[object Int16Array]`,N=`[object Int32Array]`,P=`[object Uint8Array]`,F=`[object Uint8ClampedArray]`,I=`[object Uint16Array]`,ee=`[object Uint32Array]`,te=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,R={};R[k]=R[A]=R[j]=R[M]=R[N]=R[P]=R[F]=R[I]=R[ee]=!0,R[s]=R[c]=R[D]=R[u]=R[O]=R[d]=R[f]=R[p]=R[h]=R[g]=R[v]=R[x]=R[S]=R[C]=R[E]=!1;var re=typeof global==`object`&&global&&global.Object===Object&&global,ie=typeof self==`object`&&self&&self.Object===Object&&self,z=re||ie||Function(`return this`)(),ae=typeof e==`object`&&e&&!e.nodeType&&e,oe=ae&&typeof t==`object`&&t&&!t.nodeType&&t,se=oe&&oe.exports===ae,ce=se&&re.process,le=function(){try{return ce&&ce.binding&&ce.binding(`util`)}catch{}}(),ue=le&&le.isTypedArray;function de(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function fe(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function pe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function me(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function he(e){return function(t){return e(t)}}function ge(e,t){return e.has(t)}function _e(e,t){return e?.[t]}function ve(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ye(e,t){return function(n){return e(t(n))}}function B(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var be=Array.prototype,xe=Function.prototype,Se=Object.prototype,Ce=z[`__core-js_shared__`],we=xe.toString,V=Se.hasOwnProperty,Te=function(){var e=/[^.]+$/.exec(Ce&&Ce.keys&&Ce.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),Ee=Se.toString,De=RegExp(`^`+we.call(V).replace(te,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Oe=se?z.Buffer:void 0,ke=z.Symbol,Ae=z.Uint8Array,je=Se.propertyIsEnumerable,Me=be.splice,H=ke?ke.toStringTag:void 0,Ne=Object.getOwnPropertySymbols,Pe=Oe?Oe.isBuffer:void 0,Fe=ye(Object.keys,Object),Ie=Y(z,`DataView`),Le=Y(z,`Map`),Re=Y(z,`Promise`),ze=Y(z,`Set`),Be=Y(z,`WeakMap`),Ve=Y(Object,`create`),He=Q(Ie),U=Q(Le),Ue=Q(Re),We=Q(ze),Ge=Q(Be),Ke=ke?ke.prototype:void 0,qe=Ke?Ke.valueOf:void 0;function W(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Je(){this.__data__=Ve?Ve(null):{},this.size=0}function Ye(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Xe(e){var t=this.__data__;if(Ve){var n=t[e];return n===r?void 0:n}return V.call(t,e)?t[e]:void 0}function Ze(e){var t=this.__data__;return Ve?t[e]!==void 0:V.call(t,e)}function Qe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ve&&t===void 0?r:t,this}W.prototype.clear=Je,W.prototype.delete=Ye,W.prototype.get=Xe,W.prototype.has=Ze,W.prototype.set=Qe;function G(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $e(){this.__data__=[],this.size=0}function et(e){var t=this.__data__,n=vt(t,e);return n<0?!1:(n==t.length-1?t.pop():Me.call(t,n,1),--this.size,!0)}function tt(e){var t=this.__data__,n=vt(t,e);return n<0?void 0:t[n][1]}function nt(e){return vt(this.__data__,e)>-1}function rt(e,t){var n=this.__data__,r=vt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}G.prototype.clear=$e,G.prototype.delete=et,G.prototype.get=tt,G.prototype.has=nt,G.prototype.set=rt;function K(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function it(){this.size=0,this.__data__={hash:new W,map:new(Le||G),string:new W}}function at(e){var t=J(this,e).delete(e);return this.size-=t?1:0,t}function ot(e){return J(this,e).get(e)}function st(e){return J(this,e).has(e)}function ct(e,t){var n=J(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}K.prototype.clear=it,K.prototype.delete=at,K.prototype.get=ot,K.prototype.has=st,K.prototype.set=ct;function lt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new K;++t<n;)this.add(e[t])}function ut(e){return this.__data__.set(e,r),this}function dt(e){return this.__data__.has(e)}lt.prototype.add=lt.prototype.push=ut,lt.prototype.has=dt;function q(e){this.size=(this.__data__=new G(e)).size}function ft(){this.__data__=new G,this.size=0}function pt(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function mt(e){return this.__data__.get(e)}function ht(e){return this.__data__.has(e)}function gt(e,t){var r=this.__data__;if(r instanceof G){var i=r.__data__;if(!Le||i.length<n-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new K(i)}return r.set(e,t),this.size=r.size,this}q.prototype.clear=ft,q.prototype.delete=pt,q.prototype.get=mt,q.prototype.has=ht,q.prototype.set=gt;function _t(e,t){var n=zt(e),r=!n&&Rt(e),i=!n&&!r&&Vt(e),a=!n&&!r&&!i&&Kt(e),o=n||r||i||a,s=o?me(e.length,String):[],c=s.length;for(var l in e)(t||V.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Mt(l,c)))&&s.push(l);return s}function vt(e,t){for(var n=e.length;n--;)if(Lt(e[n][0],t))return n;return-1}function yt(e,t,n){var r=t(e);return zt(e)?r:fe(r,n(e))}function bt(e){return e==null?e===void 0?T:_:H&&H in Object(e)?X(e):It(e)}function xt(e){return $(e)&&bt(e)==s}function St(e,t,n,r,i){return e===t?!0:e==null||t==null||!$(e)&&!$(t)?e!==e&&t!==t:Ct(e,t,n,r,St,i)}function Ct(e,t,n,r,a,o){var l=zt(e),u=zt(t),d=l?c:Z(e),f=u?c:Z(t);d=d==s?v:d,f=f==s?v:f;var p=d==v,m=f==v,h=d==f;if(h&&Vt(e)){if(!Vt(t))return!1;l=!0,p=!1}if(h&&!p)return o||=new q,l||Kt(e)?Dt(e,t,n,r,a,o):Ot(e,t,d,n,r,a,o);if(!(n&i)){var g=p&&V.call(e,`__wrapped__`),_=m&&V.call(t,`__wrapped__`);if(g||_){var y=g?e.value():e,b=_?t.value():t;return o||=new q,a(y,b,n,r,o)}}return h?(o||=new q,kt(e,t,n,r,a,o)):!1}function wt(e){return!Gt(e)||Pt(e)?!1:(Ut(e)?De:L).test(Q(e))}function Tt(e){return $(e)&&Wt(e.length)&&!!R[bt(e)]}function Et(e){if(!Ft(e))return Fe(e);var t=[];for(var n in Object(e))V.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Dt(e,t,n,r,o,s){var c=n&i,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,p=!0,m=n&a?new lt:void 0;for(s.set(e,t),s.set(t,e);++f<l;){var h=e[f],g=t[f];if(r)var _=c?r(g,h,f,t,e,s):r(h,g,f,e,t,s);if(_!==void 0){if(_)continue;p=!1;break}if(m){if(!pe(t,function(e,t){if(!ge(m,t)&&(h===e||o(h,e,n,r,s)))return m.push(t)})){p=!1;break}}else if(!(h===g||o(h,g,n,r,s))){p=!1;break}}return s.delete(e),s.delete(t),p}function Ot(e,t,n,r,o,s,c){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!s(new Ae(e),new Ae(t)));case u:case d:case g:return Lt(+e,+t);case f:return e.name==t.name&&e.message==t.message;case x:case C:return e==t+``;case h:var l=ve;case S:var p=r&i;if(l||=B,e.size!=t.size&&!p)return!1;var m=c.get(e);if(m)return m==t;r|=a,c.set(e,t);var _=Dt(l(e),l(t),r,o,s,c);return c.delete(e),_;case w:if(qe)return qe.call(e)==qe.call(t)}return!1}function kt(e,t,n,r,a,o){var s=n&i,c=At(e),l=c.length;if(l!=At(t).length&&!s)return!1;for(var u=l;u--;){var d=c[u];if(!(s?d in t:V.call(t,d)))return!1}var f=o.get(e);if(f&&o.get(t))return f==t;var p=!0;o.set(e,t),o.set(t,e);for(var m=s;++u<l;){d=c[u];var h=e[d],g=t[d];if(r)var _=s?r(g,h,d,t,e,o):r(h,g,d,e,t,o);if(!(_===void 0?h===g||a(h,g,n,r,o):_)){p=!1;break}m||=d==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return o.delete(e),o.delete(t),p}function At(e){return yt(e,qt,jt)}function J(e,t){var n=e.__data__;return Nt(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Y(e,t){var n=_e(e,t);return wt(n)?n:void 0}function X(e){var t=V.call(e,H),n=e[H];try{e[H]=void 0;var r=!0}catch{}var i=Ee.call(e);return r&&(t?e[H]=n:delete e[H]),i}var jt=Ne?function(e){return e==null?[]:(e=Object(e),de(Ne(e),function(t){return je.call(e,t)}))}:Jt,Z=bt;(Ie&&Z(new Ie(new ArrayBuffer(1)))!=O||Le&&Z(new Le)!=h||Re&&Z(Re.resolve())!=y||ze&&Z(new ze)!=S||Be&&Z(new Be)!=E)&&(Z=function(e){var t=bt(e),n=t==v?e.constructor:void 0,r=n?Q(n):``;if(r)switch(r){case He:return O;case U:return h;case Ue:return y;case We:return S;case Ge:return E}return t});function Mt(e,t){return t??=o,!!t&&(typeof e==`number`||ne.test(e))&&e>-1&&e%1==0&&e<t}function Nt(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Pt(e){return!!Te&&Te in e}function Ft(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Se)}function It(e){return Ee.call(e)}function Q(e){if(e!=null){try{return we.call(e)}catch{}try{return e+``}catch{}}return``}function Lt(e,t){return e===t||e!==e&&t!==t}var Rt=xt(function(){return arguments}())?xt:function(e){return $(e)&&V.call(e,`callee`)&&!je.call(e,`callee`)},zt=Array.isArray;function Bt(e){return e!=null&&Wt(e.length)&&!Ut(e)}var Vt=Pe||Yt;function Ht(e,t){return St(e,t)}function Ut(e){if(!Gt(e))return!1;var t=bt(e);return t==p||t==m||t==l||t==b}function Wt(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=o}function Gt(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function $(e){return typeof e==`object`&&!!e}var Kt=ue?he(ue):Tt;function qt(e){return Bt(e)?_t(e):Et(e)}function Jt(){return[]}function Yt(){return!1}t.exports=Ht})),O=e((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var n=t(E()),r=t(D()),i;(function(e){function t(e,t,r){e===void 0&&(e={}),t===void 0&&(t={}),typeof e!=`object`&&(e={}),typeof t!=`object`&&(t={});var i=n.default(t);for(var a in r||(i=Object.keys(i).reduce(function(e,t){return i[t]!=null&&(e[t]=i[t]),e},{})),e)e[a]!==void 0&&t[a]===void 0&&(i[a]=e[a]);return Object.keys(i).length>0?i:void 0}e.compose=t;function i(e,t){e===void 0&&(e={}),t===void 0&&(t={}),typeof e!=`object`&&(e={}),typeof t!=`object`&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,i){return r.default(e[i],t[i])||(n[i]=t[i]===void 0?null:t[i]),n},{});return Object.keys(n).length>0?n:void 0}e.diff=i;function a(e,t){e===void 0&&(e={}),t===void 0&&(t={}),e||={};var n=Object.keys(t).reduce(function(n,r){return t[r]!==e[r]&&e[r]!==void 0&&(n[r]=t[r]),n},{});return Object.keys(e).reduce(function(n,r){return e[r]!==t[r]&&t[r]===void 0&&(n[r]=null),n},n)}e.invert=a;function o(e,t,n){if(n===void 0&&(n=!1),typeof e!=`object`)return t;if(typeof t==`object`){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return e[r]===void 0&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}e.transform=o})(i||={}),e.default=i})),k=e((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var n=t(A());e.default=function(){function e(e){this.ops=e,this.index=0,this.offset=0}return e.prototype.hasNext=function(){return this.peekLength()<1/0},e.prototype.next=function(e){e||=1/0;var t=this.ops[this.index];if(t){var r=this.offset,i=n.default.length(t);if(e>=i-r?(e=i-r,this.index+=1,this.offset=0):this.offset+=e,typeof t.delete==`number`)return{delete:e};var a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain==`number`?a.retain=e:typeof t.insert==`string`?a.insert=t.insert.substr(r,e):a.insert=t.insert,a}else return{retain:1/0}},e.prototype.peek=function(){return this.ops[this.index]},e.prototype.peekLength=function(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0},e.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete==`number`?`delete`:typeof this.ops[this.index].retain==`number`?`retain`:`insert`:`retain`},e.prototype.rest=function(){if(!this.hasNext())return[];if(this.offset===0)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)},e}()})),A=e((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var n=t(k()),r;(function(e){function t(e){return new n.default(e)}e.iterator=t;function r(e){return typeof e.delete==`number`?e.delete:typeof e.retain==`number`?e.retain:typeof e.insert==`string`?e.insert.length:1}e.length=r})(r||={}),e.default=r})),j=e(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},r=n(T()),i=n(E()),a=n(D()),o=n(O()),s=n(A()),c=`\0`;t.exports=function(){function e(e){Array.isArray(e)?this.ops=e:e!=null&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]}return e.prototype.insert=function(e,t){var n={};return typeof e==`string`&&e.length===0?this:(n.insert=e,typeof t==`object`&&t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},e.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},e.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return typeof t==`object`&&t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},e.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=i.default(e),typeof n==`object`){if(typeof e.delete==`number`&&typeof n.delete==`number`)return this.ops[t-1]={delete:n.delete+e.delete},this;if(typeof n.delete==`number`&&e.insert!=null&&(--t,n=this.ops[t-1],typeof n!=`object`))return this.ops.unshift(e),this;if(a.default(e.attributes,n.attributes)){if(typeof e.insert==`string`&&typeof n.insert==`string`)return this.ops[t-1]={insert:n.insert+e.insert},typeof e.attributes==`object`&&(this.ops[t-1].attributes=e.attributes),this;if(typeof e.retain==`number`&&typeof n.retain==`number`)return this.ops[t-1]={retain:n.retain+e.retain},typeof e.attributes==`object`&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},e.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},e.prototype.filter=function(e){return this.ops.filter(e)},e.prototype.forEach=function(e){this.ops.forEach(e)},e.prototype.map=function(e){return this.ops.map(e)},e.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},e.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},e.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+s.default.length(t):t.delete?e-t.delete:e},0)},e.prototype.length=function(){return this.reduce(function(e,t){return e+s.default.length(t)},0)},e.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var r=[],i=s.default.iterator(this.ops),a=0;a<n&&i.hasNext();){var o=void 0;a<t?o=i.next(t-a):(o=i.next(n-a),r.push(o)),a+=s.default.length(o)}return new e(r)},e.prototype.compose=function(t){var n=s.default.iterator(this.ops),r=s.default.iterator(t.ops),i=[],c=r.peek();if(c!=null&&typeof c.retain==`number`&&c.attributes==null){for(var l=c.retain;n.peekType()===`insert`&&n.peekLength()<=l;)l-=n.peekLength(),i.push(n.next());c.retain-l>0&&r.next(c.retain-l)}for(var u=new e(i);n.hasNext()||r.hasNext();)if(r.peekType()===`insert`)u.push(r.next());else if(n.peekType()===`delete`)u.push(n.next());else{var d=Math.min(n.peekLength(),r.peekLength()),f=n.next(d),p=r.next(d);if(typeof p.retain==`number`){var m={};typeof f.retain==`number`?m.retain=d:m.insert=f.insert;var h=o.default.compose(f.attributes,p.attributes,typeof f.retain==`number`);if(h&&(m.attributes=h),u.push(m),!r.hasNext()&&a.default(u.ops[u.ops.length-1],m)){var g=new e(n.rest());return u.concat(g).chop()}}else typeof p.delete==`number`&&typeof f.retain==`number`&&u.push(p)}return u.chop()},e.prototype.concat=function(t){var n=new e(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},e.prototype.diff=function(t,n){if(this.ops===t.ops)return new e;var i=[this,t].map(function(e){return e.map(function(n){if(n.insert!=null)return typeof n.insert==`string`?n.insert:c;throw Error(`diff() called `+(e===t?`on`:`with`)+` non-document`)}).join(``)}),l=new e,u=r.default(i[0],i[1],n),d=s.default.iterator(this.ops),f=s.default.iterator(t.ops);return u.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.default.INSERT:n=Math.min(f.peekLength(),t),l.push(f.next(n));break;case r.default.DELETE:n=Math.min(t,d.peekLength()),d.next(n),l.delete(n);break;case r.default.EQUAL:n=Math.min(d.peekLength(),f.peekLength(),t);var i=d.next(n),s=f.next(n);a.default(i.insert,s.insert)?l.retain(n,o.default.diff(i.attributes,s.attributes)):l.push(s).delete(n);break}t-=n}}),l.chop()},e.prototype.eachLine=function(t,n){n===void 0&&(n=`
|
|
|
`);for(var r=s.default.iterator(this.ops),i=new e,a=0;r.hasNext();){if(r.peekType()!==`insert`)return;var o=r.peek(),c=s.default.length(o)-r.peekLength(),l=typeof o.insert==`string`?o.insert.indexOf(n,c)-c:-1;if(l<0)i.push(r.next());else if(l>0)i.push(r.next(l));else{if(t(i,r.next(1).attributes||{},a)===!1)return;a+=1,i=new e}}i.length()>0&&t(i,{},a)},e.prototype.invert=function(t){var n=new e;return this.reduce(function(e,r){if(r.insert)n.delete(s.default.length(r));else if(r.retain&&r.attributes==null)return n.retain(r.retain),e+r.retain;else if(r.delete||r.retain&&r.attributes){var i=r.delete||r.retain;return t.slice(e,e+i).forEach(function(e){r.delete?n.push(e):r.retain&&r.attributes&&n.retain(s.default.length(e),o.default.invert(r.attributes,e.attributes))}),e+i}return e},0),n.chop()},e.prototype.transform=function(t,n){if(n===void 0&&(n=!1),n=!!n,typeof t==`number`)return this.transformPosition(t,n);for(var r=t,i=s.default.iterator(this.ops),a=s.default.iterator(r.ops),c=new e;i.hasNext()||a.hasNext();)if(i.peekType()===`insert`&&(n||a.peekType()!==`insert`))c.retain(s.default.length(i.next()));else if(a.peekType()===`insert`)c.push(a.next());else{var l=Math.min(i.peekLength(),a.peekLength()),u=i.next(l),d=a.next(l);if(u.delete)continue;d.delete?c.push(d):c.retain(l,o.default.transform(u.attributes,d.attributes,n))}return c.chop()},e.prototype.transformPosition=function(e,t){t===void 0&&(t=!1),t=!!t;for(var n=s.default.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),a=n.peekType();if(n.next(),a===`delete`){e-=Math.min(i,e-r);continue}else a===`insert`&&(r<e||!t)&&(e+=i);r+=i}return e},e.Op=s.default,e.AttributeMap=o.default,e}()})),M=r(w()),N=r(j()),P={essential:[[{header:[1,2,3,4,5,6,!1]}],[`bold`,`italic`,`underline`],[{list:`ordered`},{list:`bullet`},{align:[]}],[`blockquote`,`code-block`,`link`],[{color:[]},`clean`]],minimal:[[{header:1},{header:2}],[`bold`,`italic`,`underline`],[{list:`ordered`},{list:`bullet`},{align:[]}]],full:[[`bold`,`italic`,`underline`,`strike`],[`blockquote`,`code-block`],[{header:1},{header:2}],[{list:`ordered`},{list:`bullet`}],[{script:`sub`},{script:`super`}],[{indent:`-1`},{indent:`+1`}],[{direction:`rtl`}],[{size:[`small`,!1,`large`,`huge`]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],[`link`,`video`,`image`],[`clean`]]},F=S({name:`QuillEditor`,inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:`delta`,validator:e=>[`delta`,`html`,`text`].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:`snow`,validator:e=>[`snow`,`bubble`,``].includes(e)},toolbar:{type:[String,Array,Object],required:!1,validator:e=>typeof e==`string`&&e!==``?e.charAt(0)===`#`?!0:Object.keys(P).indexOf(e)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:[`textChange`,`selectionChange`,`editorChange`,`update:content`,`focus`,`blur`,`ready`],setup:(e,t)=>{l(()=>{o()}),i(()=>{n=null});let n,r,a=h(),o=()=>{var i;if(a.value){if(r=s(),e.modules)if(Array.isArray(e.modules))for(let t of e.modules)M.default.register(`modules/${t.name}`,t.module);else M.default.register(`modules/${e.modules.name}`,e.modules.module);n=new M.default(a.value,r),w(e.content),n.on(`text-change`,m),n.on(`selection-change`,_),n.on(`editor-change`,v),e.theme!==`bubble`&&a.value.classList.remove(`ql-bubble`),e.theme!==`snow`&&a.value.classList.remove(`ql-snow`),(i=n.getModule(`toolbar`))==null||i.container.addEventListener(`mousedown`,e=>{e.preventDefault()}),t.emit(`ready`,n)}},s=()=>{let t={};if(e.theme!==``&&(t.theme=e.theme),e.readOnly&&(t.readOnly=e.readOnly),e.placeholder&&(t.placeholder=e.placeholder),e.toolbar&&e.toolbar!==``&&(t.modules={toolbar:(()=>{if(typeof e.toolbar==`object`)return e.toolbar;if(typeof e.toolbar==`string`)return e.toolbar.charAt(0)===`#`?e.toolbar:P[e.toolbar]})()}),e.modules){let n=(()=>{let t={};if(Array.isArray(e.modules))for(let n of e.modules)t[n.name]=n.options??{};else t[e.modules.name]=e.modules.options??{};return t})();t.modules=Object.assign({},t.modules,n)}return Object.assign({},e.globalOptions,e.options,t)},c=e=>typeof e==`object`&&e?e.slice():e,d=e=>Object.values(e.ops).some(e=>!e.retain||Object.keys(e).length!==1),f,p=e=>{if(typeof f==typeof e){if(e===f)return!0;if(typeof e==`object`&&e&&typeof f==`object`&&f)return!d(f.diff(e))}return!1},m=(n,r,i)=>{f=c(C()),p(e.content)||t.emit(`update:content`,f),t.emit(`textChange`,{delta:n,oldContents:r,source:i})},g=h(),_=(e,r,i)=>{g.value=!!n?.hasFocus(),t.emit(`selectionChange`,{range:e,oldRange:r,source:i})};y(g,e=>{e?t.emit(`focus`,a):t.emit(`blur`,a)});let v=(...e)=>{e[0]===`text-change`&&t.emit(`editorChange`,{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),e[0]===`selection-change`&&t.emit(`editorChange`,{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},b=()=>a.value,x=()=>n?.getModule(`toolbar`)?.container,S=()=>{if(n)return n;throw`The quill editor hasn't been instantiated yet,
|
|
|
make sure to call this method when the editor ready
|
|
|
or use v-on:ready="onReady(quill)" event instead.`},C=(t,r)=>e.contentType===`html`?D():e.contentType===`text`?T(t,r):n?.getContents(t,r),w=(t,r=`api`)=>{let i=t||(e.contentType===`delta`?new N.default:``);e.contentType===`html`?O(i):e.contentType===`text`?E(i,r):n?.setContents(i,r),f=c(i)},T=(e,t)=>n?.getText(e,t)??``,E=(e,t=`api`)=>{n?.setText(e,t)},D=()=>n?.root.innerHTML??``,O=e=>{n&&(n.root.innerHTML=e)};return y(()=>e.content,e=>{if(!n||!e||p(e))return;let t=n.getSelection();t&&u(()=>n?.setSelection(t)),w(e)},{deep:!0}),y(()=>e.enable,e=>{n&&n.enable(e)}),{editor:a,getEditor:b,getToolbar:x,getQuill:S,getContents:C,setContents:w,getHTML:D,setHTML:O,pasteHTML:(e,t=`api`)=>{let r=n?.clipboard.convert(e);r&&n?.setContents(r,t)},focus:()=>{n?.focus()},getText:T,setText:E,reinit:()=>{u(()=>{var e;!t.slots.toolbar&&n&&((e=n.getModule(`toolbar`))==null||e.container.remove()),o()})}}},render(){var e;return[(e=this.$slots).toolbar?.call(e),a(`div`,{ref:`editor`,...this.$attrs})]}});function I(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}function ee(e){if(!e?.trim())return``;if(typeof document>`u`)return e;let t=document.createElement(`div`);t.innerHTML=e,t.querySelectorAll(`*`).forEach(e=>{e.removeAttribute(`style`),e.removeAttribute(`class`)}),t.querySelectorAll(`font`).forEach(e=>I(e));let n=0;for(;n<5;){let e=t.querySelectorAll(`span`),r=!1;if(e.forEach(e=>{e.attributes.length===0&&(I(e),r=!0)}),!r)break;n++}return t.innerHTML}var te={class:`rich-editor-field`},L=C(S({__name:`RichEditorField`,props:o({editorOptions:{},fieldKey:{},minHeight:{default:180}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){t(e=>({v100fcf4a:a.value}));let r=s(e,`modelValue`),i=e,a=_(()=>`${i.minHeight}px`),o=h(!1),l=h(0),u=h(``);function S(){o.value?(r.value=u.value,l.value+=1,o.value=!1):(u.value=r.value||``,o.value=!0)}function C(){let e=ee(r.value||``);r.value=e,u.value=e,l.value+=1,n.success(`已清除样式`)}return y(()=>i.fieldKey,(e,t)=>{t!==void 0&&(o.value=!1,u.value=``,l.value+=1)}),(t,n)=>{let i=d(`a-button`),a=d(`a-space`),s=d(`a-textarea`);return c(),v(`div`,te,[x(a,{style:{"margin-bottom":`8px`,"flex-wrap":`wrap`}},{default:f(()=>[x(i,{size:`small`,onClick:S},{default:f(()=>[p(g(o.value?`返回可视化`:`查看源代码`),1)]),_:1}),x(i,{size:`small`,onClick:C},{default:f(()=>[...n[2]||=[p(`一键清除样式`,-1)]]),_:1})]),_:1}),o.value?(c(),m(s,{key:0,modelValue:u.value,"onUpdate:modelValue":n[0]||=e=>u.value=e,"auto-size":{minRows:14,maxRows:32},placeholder:`HTML 源代码`,style:{"font-family":`ui-monospace, monospace`,"font-size":`12px`}},null,8,[`modelValue`])):(c(),m(b(F),{key:`${e.fieldKey}-${l.value}`,content:r.value,"onUpdate:content":n[1]||=e=>r.value=e,"content-type":`html`,theme:`snow`,options:e.editorOptions},null,8,[`content`,`options`]))])}}}),[[`__scopeId`,`data-v-881023d4`]]);export{L as t}; |