import{ab as kt,ac as tr,d as er,o as nr,ad as dr,a as Zt,s as Ze,E as Un,ae as vr,r as Gn,n as pr,h as Qt,b as Dn,c as yr,w as Lt,e as Ot,f as ke,A as gr,j as Zn,z as Wn,x as mr,af as br,ag as _r,ah as Or,a2 as Er,Z as Ar,$ as wr,a0 as Tr,a1 as kr,U as Nr,ai as Sr,aj as xr,_ as Pr}from"./index-7b3f5fdc.js";import{c as qr}from"./index-a832a56d.js";import{V as Lr}from"./index-a513db85.js";import{a as Rr}from"./index-e96dc078.js";import{w as jr}from"./index-354ab616.js";import{w as Ir}from"./index-81f068f9.js";import{j as Mr}from"./index-d0b57c12.js";var rr={exports:{}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */(function(R,U){(function(p,d){R.exports=d()})(typeof self<"u"?self:kt,function(){return function(m){var p={};function d(E){if(p[E])return p[E].exports;var b=p[E]={i:E,l:!1,exports:{}};return m[E].call(b.exports,b,b.exports,d),b.l=!0,b.exports}return d.m=m,d.c=p,d.d=function(E,b,O){d.o(E,b)||Object.defineProperty(E,b,{configurable:!1,enumerable:!0,get:O})},d.n=function(E){var b=E&&E.__esModule?function(){return E.default}:function(){return E};return d.d(b,"a",b),b},d.o=function(E,b){return Object.prototype.hasOwnProperty.call(E,b)},d.p="",d(d.s=109)}([function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=d(17),b=d(18),O=d(19),y=d(45),g=d(46),h=d(47),o=d(48),n=d(49),e=d(12),f=d(32),a=d(33),u=d(31),r=d(1),i={Scope:r.Scope,create:r.create,find:r.find,query:r.query,register:r.register,Container:E.default,Format:b.default,Leaf:O.default,Embed:o.default,Scroll:y.default,Block:h.default,Inline:g.default,Text:n.default,Attributor:{Attribute:e.default,Class:f.default,Style:a.default,Store:u.default}};p.default=i},function(m,p,d){var E=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)i.hasOwnProperty(c)&&(r[c]=i[c])};return function(r,i){u(r,i);function c(){this.constructor=r}r.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=function(u){E(r,u);function r(i){var c=this;return i="[Parchment] "+i,c=u.call(this,i)||this,c.message=i,c.name=c.constructor.name,c}return r}(Error);p.ParchmentError=b;var O={},y={},g={},h={};p.DATA_KEY="__blot";var o;(function(u){u[u.TYPE=3]="TYPE",u[u.LEVEL=12]="LEVEL",u[u.ATTRIBUTE=13]="ATTRIBUTE",u[u.BLOT=14]="BLOT",u[u.INLINE=7]="INLINE",u[u.BLOCK=11]="BLOCK",u[u.BLOCK_BLOT=10]="BLOCK_BLOT",u[u.INLINE_BLOT=6]="INLINE_BLOT",u[u.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",u[u.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",u[u.ANY=15]="ANY"})(o=p.Scope||(p.Scope={}));function n(u,r){var i=f(u);if(i==null)throw new b("Unable to create "+u+" blot");var c=i,t=u instanceof Node||u.nodeType===Node.TEXT_NODE?u:c.create(r);return new c(t,r)}p.create=n;function e(u,r){return r===void 0&&(r=!1),u==null?null:u[p.DATA_KEY]!=null?u[p.DATA_KEY].blot:r?e(u.parentNode,r):null}p.find=e;function f(u,r){r===void 0&&(r=o.ANY);var i;if(typeof u=="string")i=h[u]||O[u];else if(u instanceof Text||u.nodeType===Node.TEXT_NODE)i=h.text;else if(typeof u=="number")u&o.LEVEL&o.BLOCK?i=h.block:u&o.LEVEL&o.INLINE&&(i=h.inline);else if(u instanceof HTMLElement){var c=(u.getAttribute("class")||"").split(/\s+/);for(var t in c)if(i=y[c[t]],i)break;i=i||g[u.tagName]}return i==null?null:r&o.LEVEL&i.scope&&r&o.TYPE&i.scope?i:null}p.query=f;function a(){for(var u=[],r=0;r1)return u.map(function(t){return a(t)});var i=u[0];if(typeof i.blotName!="string"&&typeof i.attrName!="string")throw new b("Invalid definition");if(i.blotName==="abstract")throw new b("Cannot register abstract class");if(h[i.blotName||i.attrName]=i,typeof i.keyName=="string")O[i.keyName]=i;else if(i.className!=null&&(y[i.className]=i),i.tagName!=null){Array.isArray(i.tagName)?i.tagName=i.tagName.map(function(t){return t.toUpperCase()}):i.tagName=i.tagName.toUpperCase();var c=Array.isArray(i.tagName)?i.tagName:[i.tagName];c.forEach(function(t){(g[t]==null||i.className==null)&&(g[t]=i)})}return i}p.register=a},function(m,p,d){var E=d(51),b=d(11),O=d(3),y=d(20),g=String.fromCharCode(0),h=function(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]};h.prototype.insert=function(o,n){var e={};return o.length===0?this:(e.insert=o,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(e.attributes=n),this.push(e))},h.prototype.delete=function(o){return o<=0?this:this.push({delete:o})},h.prototype.retain=function(o,n){if(o<=0)return this;var e={retain:o};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(e.attributes=n),this.push(e)},h.prototype.push=function(o){var n=this.ops.length,e=this.ops[n-1];if(o=O(!0,{},o),typeof e=="object"){if(typeof o.delete=="number"&&typeof e.delete=="number")return this.ops[n-1]={delete:e.delete+o.delete},this;if(typeof e.delete=="number"&&o.insert!=null&&(n-=1,e=this.ops[n-1],typeof e!="object"))return this.ops.unshift(o),this;if(b(o.attributes,e.attributes)){if(typeof o.insert=="string"&&typeof e.insert=="string")return this.ops[n-1]={insert:e.insert+o.insert},typeof o.attributes=="object"&&(this.ops[n-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof e.retain=="number")return this.ops[n-1]={retain:e.retain+o.retain},typeof o.attributes=="object"&&(this.ops[n-1].attributes=o.attributes),this}}return n===this.ops.length?this.ops.push(o):this.ops.splice(n,0,o),this},h.prototype.chop=function(){var o=this.ops[this.ops.length-1];return o&&o.retain&&!o.attributes&&this.ops.pop(),this},h.prototype.filter=function(o){return this.ops.filter(o)},h.prototype.forEach=function(o){this.ops.forEach(o)},h.prototype.map=function(o){return this.ops.map(o)},h.prototype.partition=function(o){var n=[],e=[];return this.forEach(function(f){var a=o(f)?n:e;a.push(f)}),[n,e]},h.prototype.reduce=function(o,n){return this.ops.reduce(o,n)},h.prototype.changeLength=function(){return this.reduce(function(o,n){return n.insert?o+y.length(n):n.delete?o-n.delete:o},0)},h.prototype.length=function(){return this.reduce(function(o,n){return o+y.length(n)},0)},h.prototype.slice=function(o,n){o=o||0,typeof n!="number"&&(n=1/0);for(var e=[],f=y.iterator(this.ops),a=0;a0&&e.next(a.retain-u)}for(var r=new h(f);n.hasNext()||e.hasNext();)if(e.peekType()==="insert")r.push(e.next());else if(n.peekType()==="delete")r.push(n.next());else{var i=Math.min(n.peekLength(),e.peekLength()),c=n.next(i),t=e.next(i);if(typeof t.retain=="number"){var s={};typeof c.retain=="number"?s.retain=i:s.insert=c.insert;var k=y.attributes.compose(c.attributes,t.attributes,typeof c.retain=="number");if(k&&(s.attributes=k),r.push(s),!e.hasNext()&&b(r.ops[r.ops.length-1],s)){var w=new h(n.rest());return r.concat(w).chop()}}else typeof t.delete=="number"&&typeof c.retain=="number"&&r.push(t)}return r.chop()},h.prototype.concat=function(o){var n=new h(this.ops.slice());return o.ops.length>0&&(n.push(o.ops[0]),n.ops=n.ops.concat(o.ops.slice(1))),n},h.prototype.diff=function(o,n){if(this.ops===o.ops)return new h;var e=[this,o].map(function(i){return i.map(function(c){if(c.insert!=null)return typeof c.insert=="string"?c.insert:g;var t=i===o?"on":"with";throw new Error("diff() called "+t+" non-document")}).join("")}),f=new h,a=E(e[0],e[1],n),u=y.iterator(this.ops),r=y.iterator(o.ops);return a.forEach(function(i){for(var c=i[1].length;c>0;){var t=0;switch(i[0]){case E.INSERT:t=Math.min(r.peekLength(),c),f.push(r.next(t));break;case E.DELETE:t=Math.min(c,u.peekLength()),u.next(t),f.delete(t);break;case E.EQUAL:t=Math.min(u.peekLength(),r.peekLength(),c);var s=u.next(t),k=r.next(t);b(s.insert,k.insert)?f.retain(t,y.attributes.diff(s.attributes,k.attributes)):f.push(k).delete(t);break}c-=t}}),f.chop()},h.prototype.eachLine=function(o,n){n=n||` `;for(var e=y.iterator(this.ops),f=new h,a=0;e.hasNext();){if(e.peekType()!=="insert")return;var u=e.peek(),r=y.length(u)-e.peekLength(),i=typeof u.insert=="string"?u.insert.indexOf(n,r)-r:-1;if(i<0)f.push(e.next());else if(i>0)f.push(e.next(i));else{if(o(f,e.next(1).attributes||{},a)===!1)return;a+=1,f=new h}}f.length()>0&&o(f,{},a)},h.prototype.transform=function(o,n){if(n=!!n,typeof o=="number")return this.transformPosition(o,n);for(var e=y.iterator(this.ops),f=y.iterator(o.ops),a=new h;e.hasNext()||f.hasNext();)if(e.peekType()==="insert"&&(n||f.peekType()!=="insert"))a.retain(y.length(e.next()));else if(f.peekType()==="insert")a.push(f.next());else{var u=Math.min(e.peekLength(),f.peekLength()),r=e.next(u),i=f.next(u);if(r.delete)continue;i.delete?a.push(i):a.retain(u,y.attributes.transform(r.attributes,i.attributes,n))}return a.chop()},h.prototype.transformPosition=function(o,n){n=!!n;for(var e=y.iterator(this.ops),f=0;e.hasNext()&&f<=o;){var a=e.peekLength(),u=e.peekType();if(e.next(),u==="delete"){o-=Math.min(a,o-f);continue}else u==="insert"&&(f"u"||d.call(e,u)},h=function(e,f){b&&f.name==="__proto__"?b(e,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):e[f.name]=f.newValue},o=function(e,f){if(f==="__proto__")if(d.call(e,f)){if(O)return O(e,f).value}else return;return e[f]};m.exports=function n(){var e,f,a,u,r,i,c=arguments[0],t=1,s=arguments.length,k=!1;for(typeof c=="boolean"&&(k=c,c=arguments[1]||{},t=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});t0&&(q1&&arguments[1]!==void 0?arguments[1]:!1;if(D&&(q===0||q>=this.length()-w)){var z=this.clone();return q===0?(this.parent.insertBefore(z,this),this):(this.parent.insertBefore(z,this.next),z)}else{var K=b(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"split",this).call(this,q,D);return this.cache={},K}}}]),_}(n.default.Block);P.blotName="block",P.tagName="P",P.defaultChild="break",P.allowedChildren=[u.default,n.default.Embed,i.default];function A(v){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return v==null||(typeof v.formats=="function"&&(_=(0,y.default)(_,v.formats())),v.parent==null||v.parent.blotName=="scroll"||v.parent.statics.scope!==v.statics.scope)?_:A(v.parent,_)}p.bubbleFormats=A,p.BlockEmbed=T,p.default=P},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.overload=p.expandConfig=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},b=function(){function H(j,S){var I=[],M=!0,$=!1,C=void 0;try{for(var L=j[Symbol.iterator](),F;!(M=(F=L.next()).done)&&(I.push(F.value),!(S&&I.length===S));M=!0);}catch(V){$=!0,C=V}finally{try{!M&&L.return&&L.return()}finally{if($)throw C}}return I}return function(j,S){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return H(j,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function H(j,S){for(var I=0;I2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof S!="string"){var C=S.attrName||S.blotName;typeof C=="string"?this.register("formats/"+C,S,I):Object.keys(S).forEach(function(L){M.register(L,S[L],I)})}else this.imports[S]!=null&&!$&&N.warn("Overwriting "+S+" with",I),this.imports[S]=I,(S.startsWith("blots/")||S.startsWith("formats/"))&&I.blotName!=="abstract"?r.default.register(I):S.startsWith("modules")&&typeof I.register=="function"&&I.register()}}]);function H(j){var S=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_(this,H),this.options=D(j,I),this.container=this.options.container,this.container==null)return N.error("Invalid Quill container",j);this.options.debug&&H.debug(this.options.debug);var M=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 e.default,this.scroll=r.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new o.default(this.scroll),this.selection=new c.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(e.default.events.EDITOR_CHANGE,function(C){C===e.default.events.TEXT_CHANGE&&S.root.classList.toggle("ql-blank",S.editor.isBlank())}),this.emitter.on(e.default.events.SCROLL_UPDATE,function(C,L){var F=S.selection.lastRange,V=F&&F.length===0?F.index:void 0;z.call(S,function(){return S.editor.update(null,L,V)},C)});var $=this.clipboard.convert(`
`+M+"


");this.setContents($),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return O(H,[{key:"addContainer",value:function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof S=="string"){var M=S;S=document.createElement("div"),S.classList.add(M)}return this.container.insertBefore(S,I),S}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(S,I,M){var $=this,C=K(S,I,M),L=b(C,4);return S=L[0],I=L[1],M=L[3],z.call(this,function(){return $.editor.deleteText(S,I)},M,S,-1*I)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(S),this.container.classList.toggle("ql-disabled",!S)}},{key:"focus",value:function(){var S=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=S,this.scrollIntoView()}},{key:"format",value:function(S,I){var M=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.default.sources.API;return z.call(this,function(){var C=M.getSelection(!0),L=new g.default;if(C==null)return L;if(r.default.query(S,r.default.Scope.BLOCK))L=M.editor.formatLine(C.index,C.length,v({},S,I));else{if(C.length===0)return M.selection.format(S,I),L;L=M.editor.formatText(C.index,C.length,v({},S,I))}return M.setSelection(C,e.default.sources.SILENT),L},$)}},{key:"formatLine",value:function(S,I,M,$,C){var L=this,F=void 0,V=K(S,I,M,$,C),G=b(V,4);return S=G[0],I=G[1],F=G[2],C=G[3],z.call(this,function(){return L.editor.formatLine(S,I,F)},C,S,0)}},{key:"formatText",value:function(S,I,M,$,C){var L=this,F=void 0,V=K(S,I,M,$,C),G=b(V,4);return S=G[0],I=G[1],F=G[2],C=G[3],z.call(this,function(){return L.editor.formatText(S,I,F)},C,S,0)}},{key:"getBounds",value:function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=void 0;typeof S=="number"?M=this.selection.getBounds(S,I):M=this.selection.getBounds(S.index,S.length);var $=this.container.getBoundingClientRect();return{bottom:M.bottom-$.top,height:M.height,left:M.left-$.left,right:M.right-$.left,top:M.top-$.top,width:M.width}}},{key:"getContents",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-S,M=K(S,I),$=b(M,2);return S=$[0],I=$[1],this.editor.getContents(S,I)}},{key:"getFormat",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof S=="number"?this.editor.getFormat(S,I):this.editor.getFormat(S.index,S.length)}},{key:"getIndex",value:function(S){return S.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(S){return this.scroll.leaf(S)}},{key:"getLine",value:function(S){return this.scroll.line(S)}},{key:"getLines",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof S!="number"?this.scroll.lines(S.index,S.length):this.scroll.lines(S,I)}},{key:"getModule",value:function(S){return this.theme.modules[S]}},{key:"getSelection",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return S&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-S,M=K(S,I),$=b(M,2);return S=$[0],I=$[1],this.editor.getText(S,I)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(S,I,M){var $=this,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:H.sources.API;return z.call(this,function(){return $.editor.insertEmbed(S,I,M)},C,S)}},{key:"insertText",value:function(S,I,M,$,C){var L=this,F=void 0,V=K(S,0,M,$,C),G=b(V,4);return S=G[0],F=G[2],C=G[3],z.call(this,function(){return L.editor.insertText(S,I,F)},C,S,I.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(S,I,M){this.clipboard.dangerouslyPasteHTML(S,I,M)}},{key:"removeFormat",value:function(S,I,M){var $=this,C=K(S,I,M),L=b(C,4);return S=L[0],I=L[1],M=L[3],z.call(this,function(){return $.editor.removeFormat(S,I)},M,S)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(S){var I=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.default.sources.API;return z.call(this,function(){S=new g.default(S);var $=I.getLength(),C=I.editor.deleteText(0,$),L=I.editor.applyDelta(S),F=L.ops[L.ops.length-1];F!=null&&typeof F.insert=="string"&&F.insert[F.insert.length-1]===` `&&(I.editor.deleteText(I.getLength()-1,1),L.delete(1));var V=C.compose(L);return V},M)}},{key:"setSelection",value:function(S,I,M){if(S==null)this.selection.setRange(null,I||H.sources.API);else{var $=K(S,I,M),C=b($,4);S=C[0],I=C[1],M=C[3],this.selection.setRange(new i.Range(S,I),M),M!==e.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.default.sources.API,M=new g.default().insert(S);return this.setContents(M,I)}},{key:"update",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.default.sources.USER,I=this.scroll.update(S);return this.selection.update(S),I}},{key:"updateContents",value:function(S){var I=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.default.sources.API;return z.call(this,function(){return S=new g.default(S),I.editor.applyDelta(S,M)},M,!0)}}]),H}();q.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},q.events=e.default.events,q.sources=e.default.sources,q.version="1.3.7",q.imports={delta:g.default,parchment:r.default,"core/module":a.default,"core/theme":P.default};function D(H,j){if(j=(0,s.default)(!0,{container:H,modules:{clipboard:!0,keyboard:!0,history:!0}},j),!j.theme||j.theme===q.DEFAULTS.theme)j.theme=P.default;else if(j.theme=q.import("themes/"+j.theme),j.theme==null)throw new Error("Invalid theme "+j.theme+". Did you register it?");var S=(0,s.default)(!0,{},j.theme.DEFAULTS);[S,j].forEach(function($){$.modules=$.modules||{},Object.keys($.modules).forEach(function(C){$.modules[C]===!0&&($.modules[C]={})})});var I=Object.keys(S.modules).concat(Object.keys(j.modules)),M=I.reduce(function($,C){var L=q.import("modules/"+C);return L==null?N.error("Cannot load "+C+" module. Are you sure you registered it?"):$[C]=L.DEFAULTS||{},$},{});return j.modules!=null&&j.modules.toolbar&&j.modules.toolbar.constructor!==Object&&(j.modules.toolbar={container:j.modules.toolbar}),j=(0,s.default)(!0,{},q.DEFAULTS,{modules:M},S,j),["bounds","container","scrollingContainer"].forEach(function($){typeof j[$]=="string"&&(j[$]=document.querySelector(j[$]))}),j.modules=Object.keys(j.modules).reduce(function($,C){return j.modules[C]&&($[C]=j.modules[C]),$},{}),j}function z(H,j,S,I){if(this.options.strict&&!this.isEnabled()&&j===e.default.sources.USER)return new g.default;var M=S==null?null:this.getSelection(),$=this.editor.delta,C=H();if(M!=null&&(S===!0&&(S=M.index),I==null?M=Y(M,C,j):I!==0&&(M=Y(M,S,I,j)),this.setSelection(M,e.default.sources.SILENT)),C.length()>0){var L,F=[e.default.events.TEXT_CHANGE,C,$,j];if((L=this.emitter).emit.apply(L,[e.default.events.EDITOR_CHANGE].concat(F)),j!==e.default.sources.SILENT){var V;(V=this.emitter).emit.apply(V,F)}}return C}function K(H,j,S,I,M){var $={};return typeof H.index=="number"&&typeof H.length=="number"?typeof j!="number"?(M=I,I=S,S=j,j=H.length,H=H.index):(j=H.length,H=H.index):typeof j!="number"&&(M=I,I=S,S=j,j=0),(typeof S>"u"?"undefined":E(S))==="object"?($=S,M=I):typeof S=="string"&&(I!=null?$[S]=I:M=S),M=M||e.default.sources.API,[H,j,$,M]}function Y(H,j,S,I){if(H==null)return null;var M=void 0,$=void 0;if(j instanceof g.default){var C=[H.index,H.index+H.length].map(function(G){return j.transformPosition(G,I!==e.default.sources.USER)}),L=b(C,2);M=L[0],$=L[1]}else{var F=[H.index,H.index+H.length].map(function(G){return G=0?G+S:Math.max(j,G+S)}),V=b(F,2);M=V[0],$=V[1]}return new i.Range(M,$-M)}p.expandConfig=D,p.overload=K,p.default=q},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function u(r,i){for(var c=0;c0){var t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}],[{key:"compare",value:function(c,t){var s=r.order.indexOf(c),k=r.order.indexOf(t);return s>=0||k>=0?s-k:c===t?0:c1?k-1:0),T=1;T1&&arguments[1]!==void 0?arguments[1]:{};E(this,O),this.quill=y,this.options=g};b.DEFAULTS={},p.default=b},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=["error","warn","log","info"],b="warn";function O(g){if(E.indexOf(g)<=E.indexOf(b)){for(var h,o=arguments.length,n=Array(o>1?o-1:0),e=1;e0&&typeof n[0]!="number")}function o(n,e,f){var a,u;if(g(n)||g(e)||n.prototype!==e.prototype)return!1;if(O(n))return O(e)?(n=E.call(n),e=E.call(e),y(n,e,f)):!1;if(h(n)){if(!h(e)||n.length!==e.length)return!1;for(a=0;a=0;a--)if(r[a]!=i[a])return!1;for(a=r.length-1;a>=0;a--)if(u=r[a],!y(n[u],e[u],f))return!1;return typeof n==typeof e}},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=d(1),b=function(){function O(y,g,h){h===void 0&&(h={}),this.attrName=y,this.keyName=g;var o=E.Scope.TYPE&E.Scope.ATTRIBUTE;h.scope!=null?this.scope=h.scope&E.Scope.LEVEL|o:this.scope=E.Scope.ATTRIBUTE,h.whitelist!=null&&(this.whitelist=h.whitelist)}return O.keys=function(y){return[].map.call(y.attributes,function(g){return g.name})},O.prototype.add=function(y,g){return this.canAdd(y,g)?(y.setAttribute(this.keyName,g),!0):!1},O.prototype.canAdd=function(y,g){var h=E.query(y,E.Scope.BLOT&(this.scope|E.Scope.TYPE));return h==null?!1:this.whitelist==null?!0:typeof g=="string"?this.whitelist.indexOf(g.replace(/["']/g,""))>-1:this.whitelist.indexOf(g)>-1},O.prototype.remove=function(y){y.removeAttribute(this.keyName)},O.prototype.value=function(y){var g=y.getAttribute(this.keyName);return this.canAdd(y,g)&&g?g:""},O}();p.default=b},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.Code=void 0;var E=function(){function T(P,A){var v=[],_=!0,N=!1,q=void 0;try{for(var D=P[Symbol.iterator](),z;!(_=(z=D.next()).done)&&(v.push(z.value),!(A&&v.length===A));_=!0);}catch(K){N=!0,q=K}finally{try{!_&&D.return&&D.return()}finally{if(N)throw q}}return v}return function(P,A){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return T(P,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(){function T(P,A){for(var v=0;v=v+_)){var z=this.newlineIndex(v,!0)+1,K=D-z+1,Y=this.isolate(z,K),H=Y.next;Y.format(N,q),H instanceof P&&H.formatAt(0,v-z+_-K,N,q)}}}},{key:"insertAt",value:function(v,_,N){if(N==null){var q=this.descendant(r.default,v),D=E(q,2),z=D[0],K=D[1];z.insertAt(K,_)}}},{key:"length",value:function(){var v=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` `)?v:v+1}},{key:"newlineIndex",value:function(v){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(_)return this.domNode.textContent.slice(0,v).lastIndexOf(` `);var N=this.domNode.textContent.slice(v).indexOf(` `);return N>-1?v+N:-1}},{key:"optimize",value:function(v){this.domNode.textContent.endsWith(` `)||this.appendChild(o.default.create("text",` `)),O(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,v);var _=this.next;_!=null&&_.prev===this&&_.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===_.statics.formats(_.domNode)&&(_.optimize(v),_.moveChildren(this),_.remove())}},{key:"replace",value:function(v){O(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"replace",this).call(this,v),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(_){var N=o.default.find(_);N==null?_.parentNode.removeChild(_):N instanceof o.default.Embed?N.remove():N.unwrap()})}}],[{key:"create",value:function(v){var _=O(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,v);return _.setAttribute("spellcheck",!1),_}},{key:"formats",value:function(){return!0}}]),P}(e.default);w.blotName="code-block",w.tagName="PRE",w.TAB=" ",p.Code=k,p.default=w},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},b=function(){function H(j,S){var I=[],M=!0,$=!1,C=void 0;try{for(var L=j[Symbol.iterator](),F;!(M=(F=L.next()).done)&&(I.push(F.value),!(S&&I.length===S));M=!0);}catch(V){$=!0,C=V}finally{try{!M&&L.return&&L.return()}finally{if($)throw C}}return I}return function(j,S){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return H(j,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function H(j,S){for(var I=0;I=$&&!G.endsWith(` `)&&(M=!0),I.scroll.insertAt(C,G);var X=I.scroll.line(C),nt=b(X,2),it=nt[0],at=nt[1],ft=(0,v.default)({},(0,i.bubbleFormats)(it));if(it instanceof c.default){var ht=it.descendant(e.default.Leaf,at),mt=b(ht,1),gt=mt[0];ft=(0,v.default)(ft,(0,i.bubbleFormats)(gt))}V=o.default.attributes.diff(ft,V)||{}}else if(E(L.insert)==="object"){var W=Object.keys(L.insert)[0];if(W==null)return C;I.scroll.insertAt(C,W,L.insert[W])}$+=F}return Object.keys(V).forEach(function(Q){I.scroll.formatAt(C,F,Q,V[Q])}),C+F},0),S.reduce(function(C,L){return typeof L.delete=="number"?(I.scroll.deleteAt(C,L.delete),C):C+(L.retain||L.insert.length||1)},0),this.scroll.batchEnd(),this.update(S)}},{key:"deleteText",value:function(S,I){return this.scroll.deleteAt(S,I),this.update(new g.default().retain(S).delete(I))}},{key:"formatLine",value:function(S,I){var M=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys($).forEach(function(C){if(!(M.scroll.whitelist!=null&&!M.scroll.whitelist[C])){var L=M.scroll.lines(S,Math.max(I,1)),F=I;L.forEach(function(V){var G=V.length();if(!(V instanceof a.default))V.format(C,$[C]);else{var X=S-V.offset(M.scroll),nt=V.newlineIndex(X+F)-X+1;V.formatAt(X,nt,C,$[C])}F-=G})}}),this.scroll.optimize(),this.update(new g.default().retain(S).retain(I,(0,w.default)($)))}},{key:"formatText",value:function(S,I){var M=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys($).forEach(function(C){M.scroll.formatAt(S,I,C,$[C])}),this.update(new g.default().retain(S).retain(I,(0,w.default)($)))}},{key:"getContents",value:function(S,I){return this.delta.slice(S,S+I)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(S,I){return S.concat(I.delta())},new g.default)}},{key:"getFormat",value:function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=[],$=[];I===0?this.scroll.path(S).forEach(function(L){var F=b(L,1),V=F[0];V instanceof c.default?M.push(V):V instanceof e.default.Leaf&&$.push(V)}):(M=this.scroll.lines(S,I),$=this.scroll.descendants(e.default.Leaf,S,I));var C=[M,$].map(function(L){if(L.length===0)return{};for(var F=(0,i.bubbleFormats)(L.shift());Object.keys(F).length>0;){var V=L.shift();if(V==null)return F;F=K((0,i.bubbleFormats)(V),F)}return F});return v.default.apply(v.default,C)}},{key:"getText",value:function(S,I){return this.getContents(S,I).filter(function(M){return typeof M.insert=="string"}).map(function(M){return M.insert}).join("")}},{key:"insertEmbed",value:function(S,I,M){return this.scroll.insertAt(S,I,M),this.update(new g.default().retain(S).insert(N({},I,M)))}},{key:"insertText",value:function(S,I){var M=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return I=I.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(S,I),Object.keys($).forEach(function(C){M.scroll.formatAt(S,I.length,C,$[C])}),this.update(new g.default().retain(S).insert(I,(0,w.default)($)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var S=this.scroll.children.head;return S.statics.blotName!==c.default.blotName||S.children.length>1?!1:S.children.head instanceof s.default}},{key:"removeFormat",value:function(S,I){var M=this.getText(S,I),$=this.scroll.line(S+I),C=b($,2),L=C[0],F=C[1],V=0,G=new g.default;L!=null&&(L instanceof a.default?V=L.newlineIndex(F)-F+1:V=L.length()-F,G=L.delta().slice(F,F+V-1).insert(` `));var X=this.getContents(S,I+V),nt=X.diff(new g.default().insert(M).concat(G)),it=new g.default().retain(S).concat(nt);return this.applyDelta(it)}},{key:"update",value:function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,$=this.delta;if(I.length===1&&I[0].type==="characterData"&&I[0].target.data.match(D)&&e.default.find(I[0].target)){var C=e.default.find(I[0].target),L=(0,i.bubbleFormats)(C),F=C.offset(this.scroll),V=I[0].oldValue.replace(r.default.CONTENTS,""),G=new g.default().insert(V),X=new g.default().insert(C.value()),nt=new g.default().retain(F).concat(G.diff(X,M));S=nt.reduce(function(it,at){return at.insert?it.insert(at.insert,L):it.push(at)},new g.default),this.delta=$.compose(S)}else this.delta=this.getDelta(),(!S||!(0,P.default)($.compose(S),this.delta))&&(S=$.diff(this.delta,M));return S}}]),H}();function K(H,j){return Object.keys(j).reduce(function(S,I){return H[I]==null||(j[I]===H[I]?S[I]=j[I]:Array.isArray(j[I])?j[I].indexOf(H[I])<0&&(S[I]=j[I].concat([H[I]])):S[I]=[j[I],H[I]]),S},{})}function Y(H){return H.reduce(function(j,S){if(S.insert===1){var I=(0,w.default)(S.attributes);return delete I.image,j.insert({image:S.attributes.image},I)}if(S.attributes!=null&&(S.attributes.list===!0||S.attributes.bullet===!0)&&(S=(0,w.default)(S),S.attributes.list?S.attributes.list="ordered":(S.attributes.list="bullet",delete S.attributes.bullet)),typeof S.insert=="string"){var M=S.insert.replace(/\r\n/g,` `).replace(/\r/g,` `);return j.insert(M,S.attributes)}return j.push(S)},new g.default)}p.default=z},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.Range=void 0;var E=function(){function T(P,A){var v=[],_=!0,N=!1,q=void 0;try{for(var D=P[Symbol.iterator](),z;!(_=(z=D.next()).done)&&(v.push(z.value),!(A&&v.length===A));_=!0);}catch(K){N=!0,q=K}finally{try{!_&&D.return&&D.return()}finally{if(N)throw q}}return v}return function(P,A){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return T(P,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(){function T(P,A){for(var v=0;v1&&arguments[1]!==void 0?arguments[1]:0;c(this,T),this.index=P,this.length=A},k=function(){function T(P,A){var v=this;c(this,T),this.emitter=A,this.scroll=P,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=y.default.create("cursor",this),this.lastRange=this.savedRange=new s(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){v.mouseDown||setTimeout(v.update.bind(v,f.default.sources.USER),1)}),this.emitter.on(f.default.events.EDITOR_CHANGE,function(_,N){_===f.default.events.TEXT_CHANGE&&N.length()>0&&v.update(f.default.sources.SILENT)}),this.emitter.on(f.default.events.SCROLL_BEFORE_UPDATE,function(){if(v.hasFocus()){var _=v.getNativeRange();_!=null&&_.start.node!==v.cursor.textNode&&v.emitter.once(f.default.events.SCROLL_UPDATE,function(){try{v.setNativeRange(_.start.node,_.start.offset,_.end.node,_.end.offset)}catch{}})}}),this.emitter.on(f.default.events.SCROLL_OPTIMIZE,function(_,N){if(N.range){var q=N.range,D=q.startNode,z=q.startOffset,K=q.endNode,Y=q.endOffset;v.setNativeRange(D,z,K,Y)}}),this.update(f.default.sources.SILENT)}return b(T,[{key:"handleComposition",value:function(){var A=this;this.root.addEventListener("compositionstart",function(){A.composing=!0}),this.root.addEventListener("compositionend",function(){if(A.composing=!1,A.cursor.parent){var v=A.cursor.restore();if(!v)return;setTimeout(function(){A.setNativeRange(v.startNode,v.startOffset,v.endNode,v.endOffset)},1)}})}},{key:"handleDragging",value:function(){var A=this;this.emitter.listenDOM("mousedown",document.body,function(){A.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){A.mouseDown=!1,A.update(f.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(A,v){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[A])){this.scroll.update();var _=this.getNativeRange();if(!(_==null||!_.native.collapsed||y.default.query(A,y.default.Scope.BLOCK))){if(_.start.node!==this.cursor.textNode){var N=y.default.find(_.start.node,!1);if(N==null)return;if(N instanceof y.default.Leaf){var q=N.split(_.start.offset);N.parent.insertBefore(this.cursor,q)}else N.insertBefore(this.cursor,_.start.node);this.cursor.attach()}this.cursor.format(A,v),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(A){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_=this.scroll.length();A=Math.min(A,_-1),v=Math.min(A+v,_-1)-A;var N=void 0,q=this.scroll.leaf(A),D=E(q,2),z=D[0],K=D[1];if(z==null)return null;var Y=z.position(K,!0),H=E(Y,2);N=H[0],K=H[1];var j=document.createRange();if(v>0){j.setStart(N,K);var S=this.scroll.leaf(A+v),I=E(S,2);if(z=I[0],K=I[1],z==null)return null;var M=z.position(K,!0),$=E(M,2);return N=$[0],K=$[1],j.setEnd(N,K),j.getBoundingClientRect()}else{var C="left",L=void 0;return N instanceof Text?(K0&&(C="right")),{bottom:L.top+L.height,height:L.height,left:L[C],right:L[C],top:L.top,width:0}}}},{key:"getNativeRange",value:function(){var A=document.getSelection();if(A==null||A.rangeCount<=0)return null;var v=A.getRangeAt(0);if(v==null)return null;var _=this.normalizeNative(v);return t.info("getNativeRange",_),_}},{key:"getRange",value:function(){var A=this.getNativeRange();if(A==null)return[null,null];var v=this.normalizedToRange(A);return[v,A]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(A){var v=this,_=[[A.start.node,A.start.offset]];A.native.collapsed||_.push([A.end.node,A.end.offset]);var N=_.map(function(z){var K=E(z,2),Y=K[0],H=K[1],j=y.default.find(Y,!0),S=j.offset(v.scroll);return H===0?S:j instanceof y.default.Container?S+j.length():S+j.index(Y,H)}),q=Math.min(Math.max.apply(Math,i(N)),this.scroll.length()-1),D=Math.min.apply(Math,[q].concat(i(N)));return new s(D,q-D)}},{key:"normalizeNative",value:function(A){if(!w(this.root,A.startContainer)||!A.collapsed&&!w(this.root,A.endContainer))return null;var v={start:{node:A.startContainer,offset:A.startOffset},end:{node:A.endContainer,offset:A.endOffset},native:A};return[v.start,v.end].forEach(function(_){for(var N=_.node,q=_.offset;!(N instanceof Text)&&N.childNodes.length>0;)if(N.childNodes.length>q)N=N.childNodes[q],q=0;else if(N.childNodes.length===q)N=N.lastChild,q=N instanceof Text?N.data.length:N.childNodes.length+1;else break;_.node=N,_.offset=q}),v}},{key:"rangeToNative",value:function(A){var v=this,_=A.collapsed?[A.index]:[A.index,A.index+A.length],N=[],q=this.scroll.length();return _.forEach(function(D,z){D=Math.min(q-1,D);var K=void 0,Y=v.scroll.leaf(D),H=E(Y,2),j=H[0],S=H[1],I=j.position(S,z!==0),M=E(I,2);K=M[0],S=M[1],N.push(K,S)}),N.length<2&&(N=N.concat(N)),N}},{key:"scrollIntoView",value:function(A){var v=this.lastRange;if(v!=null){var _=this.getBounds(v.index,v.length);if(_!=null){var N=this.scroll.length()-1,q=this.scroll.line(Math.min(v.index,N)),D=E(q,1),z=D[0],K=z;if(v.length>0){var Y=this.scroll.line(Math.min(v.index+v.length,N)),H=E(Y,1);K=H[0]}if(!(z==null||K==null)){var j=A.getBoundingClientRect();_.topj.bottom&&(A.scrollTop+=_.bottom-j.bottom)}}}}},{key:"setNativeRange",value:function(A,v){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A,N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:v,q=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(t.info("setNativeRange",A,v,_,N),!(A!=null&&(this.root.parentNode==null||A.parentNode==null||_.parentNode==null))){var D=document.getSelection();if(D!=null)if(A!=null){this.hasFocus()||this.root.focus();var z=(this.getNativeRange()||{}).native;if(z==null||q||A!==z.startContainer||v!==z.startOffset||_!==z.endContainer||N!==z.endOffset){A.tagName=="BR"&&(v=[].indexOf.call(A.parentNode.childNodes,A),A=A.parentNode),_.tagName=="BR"&&(N=[].indexOf.call(_.parentNode.childNodes,_),_=_.parentNode);var K=document.createRange();K.setStart(A,v),K.setEnd(_,N),D.removeAllRanges(),D.addRange(K)}}else D.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(A){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.default.sources.API;if(typeof v=="string"&&(_=v,v=!1),t.info("setRange",A),A!=null){var N=this.rangeToNative(A);this.setNativeRange.apply(this,i(N).concat([v]))}else this.setNativeRange(null);this.update(_)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f.default.sources.USER,v=this.lastRange,_=this.getRange(),N=E(_,2),q=N[0],D=N[1];if(this.lastRange=q,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,n.default)(v,this.lastRange)){var z;!this.composing&&D!=null&&D.native.collapsed&&D.start.node!==this.cursor.textNode&&this.cursor.restore();var K=[f.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(v),A];if((z=this.emitter).emit.apply(z,[f.default.events.EDITOR_CHANGE].concat(K)),A!==f.default.sources.SILENT){var Y;(Y=this.emitter).emit.apply(Y,K)}}}}]),T}();function w(T,P){try{P.parentNode}catch{return!1}return P instanceof Text&&(P=P.parentNode),T.contains(P)}p.Range=s,p.default=k},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r0&&(e+=1),[this.parent.domNode,e]},h.prototype.value=function(){var o;return o={},o[this.statics.blotName]=this.statics.value(this.domNode)||!0,o},h.scope=O.Scope.INLINE_BLOT,h}(b.default);p.default=y},function(m,p,d){var E=d(11),b=d(3),O={attributes:{compose:function(g,h,o){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var n=b(!0,{},h);o||(n=Object.keys(n).reduce(function(f,a){return n[a]!=null&&(f[a]=n[a]),f},{}));for(var e in g)g[e]!==void 0&&h[e]===void 0&&(n[e]=g[e]);return Object.keys(n).length>0?n:void 0},diff:function(g,h){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var o=Object.keys(g).concat(Object.keys(h)).reduce(function(n,e){return E(g[e],h[e])||(n[e]=h[e]===void 0?null:h[e]),n},{});return Object.keys(o).length>0?o:void 0},transform:function(g,h,o){if(typeof g!="object")return h;if(typeof h=="object"){if(!o)return h;var n=Object.keys(h).reduce(function(e,f){return g[f]===void 0&&(e[f]=h[f]),e},{});return Object.keys(n).length>0?n:void 0}}},iterator:function(g){return new y(g)},length:function(g){return typeof g.delete=="number"?g.delete:typeof g.retain=="number"?g.retain:typeof g.insert=="string"?g.insert.length:1}};function y(g){this.ops=g,this.index=0,this.offset=0}y.prototype.hasNext=function(){return this.peekLength()<1/0},y.prototype.next=function(g){g||(g=1/0);var h=this.ops[this.index];if(h){var o=this.offset,n=O.length(h);if(g>=n-o?(g=n-o,this.index+=1,this.offset=0):this.offset+=g,typeof h.delete=="number")return{delete:g};var e={};return h.attributes&&(e.attributes=h.attributes),typeof h.retain=="number"?e.retain=g:typeof h.insert=="string"?e.insert=h.insert.substr(o,g):e.insert=h.insert,e}else return{retain:1/0}},y.prototype.peek=function(){return this.ops[this.index]},y.prototype.peekLength=function(){return this.ops[this.index]?O.length(this.ops[this.index])-this.offset:1/0},y.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"},y.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var g=this.offset,h=this.index,o=this.next(),n=this.ops.slice(this.index);return this.offset=g,this.index=h,[o].concat(n)}else return[]},m.exports=O},function(m,p){var d=function(){function E(a,u){return u!=null&&a instanceof u}var b;try{b=Map}catch{b=function(){}}var O;try{O=Set}catch{O=function(){}}var y;try{y=Promise}catch{y=function(){}}function g(a,u,r,i,c){typeof u=="object"&&(r=u.depth,i=u.prototype,c=u.includeNonEnumerable,u=u.circular);var t=[],s=[],k=typeof Buffer<"u";typeof u>"u"&&(u=!0),typeof r>"u"&&(r=1/0);function w(T,P){if(T===null)return null;if(P===0)return T;var A,v;if(typeof T!="object")return T;if(E(T,b))A=new b;else if(E(T,O))A=new O;else if(E(T,y))A=new y(function(j,S){T.then(function(I){j(w(I,P-1))},function(I){S(w(I,P-1))})});else if(g.__isArray(T))A=[];else if(g.__isRegExp(T))A=new RegExp(T.source,f(T)),T.lastIndex&&(A.lastIndex=T.lastIndex);else if(g.__isDate(T))A=new Date(T.getTime());else{if(k&&Buffer.isBuffer(T))return Buffer.allocUnsafe?A=Buffer.allocUnsafe(T.length):A=new Buffer(T.length),T.copy(A),A;E(T,Error)?A=Object.create(T):typeof i>"u"?(v=Object.getPrototypeOf(T),A=Object.create(v)):(A=Object.create(i),v=i)}if(u){var _=t.indexOf(T);if(_!=-1)return s[_];t.push(T),s.push(A)}E(T,b)&&T.forEach(function(j,S){var I=w(S,P-1),M=w(j,P-1);A.set(I,M)}),E(T,O)&&T.forEach(function(j){var S=w(j,P-1);A.add(S)});for(var N in T){var q;v&&(q=Object.getOwnPropertyDescriptor(v,N)),!(q&&q.set==null)&&(A[N]=w(T[N],P-1))}if(Object.getOwnPropertySymbols)for(var D=Object.getOwnPropertySymbols(T),N=0;N0){if(K instanceof n.BlockEmbed||S instanceof n.BlockEmbed){this.optimize();return}if(K instanceof r.default){var I=K.newlineIndex(K.length(),!0);if(I>-1&&(K=K.split(I+1),K===S)){this.optimize();return}}else if(S instanceof r.default){var M=S.newlineIndex(0);M>-1&&S.split(M+1)}var $=S.children.head instanceof a.default?null:S.children.head;K.moveChildren(S,$),K.remove()}this.optimize()}},{key:"enable",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",N)}},{key:"formatAt",value:function(N,q,D,z){this.whitelist!=null&&!this.whitelist[D]||(O(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"formatAt",this).call(this,N,q,D,z),this.optimize())}},{key:"insertAt",value:function(N,q,D){if(!(D!=null&&this.whitelist!=null&&!this.whitelist[q])){if(N>=this.length())if(D==null||g.default.query(q,g.default.Scope.BLOCK)==null){var z=g.default.create(this.statics.defaultChild);this.appendChild(z),D==null&&q.endsWith(` `)&&(q=q.slice(0,-1)),z.insertAt(0,q,D)}else{var K=g.default.create(q,D);this.appendChild(K)}else O(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertAt",this).call(this,N,q,D);this.optimize()}}},{key:"insertBefore",value:function(N,q){if(N.statics.scope===g.default.Scope.INLINE_BLOT){var D=g.default.create(this.statics.defaultChild);D.appendChild(N),N=D}O(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertBefore",this).call(this,N,q)}},{key:"leaf",value:function(N){return this.path(N).pop()||[null,-1]}},{key:"line",value:function(N){return N===this.length()?this.line(N-1):this.descendant(T,N)}},{key:"lines",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,D=function z(K,Y,H){var j=[],S=H;return K.children.forEachAt(Y,H,function(I,M,$){T(I)?j.push(I):I instanceof g.default.Container&&(j=j.concat(z(I,M,S))),S-=$}),j};return D(this,N,q)}},{key:"optimize",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(O(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,N,q),N.length>0&&this.emitter.emit(o.default.events.SCROLL_OPTIMIZE,N,q))}},{key:"path",value:function(N){return O(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"path",this).call(this,N).slice(1)}},{key:"update",value:function(N){if(this.batch!==!0){var q=o.default.sources.USER;typeof N=="string"&&(q=N),Array.isArray(N)||(N=this.observer.takeRecords()),N.length>0&&this.emitter.emit(o.default.events.SCROLL_BEFORE_UPDATE,q,N),O(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"update",this).call(this,N.concat([])),N.length>0&&this.emitter.emit(o.default.events.SCROLL_UPDATE,q,N)}}}]),v}(g.default.Scroll);P.blotName="scroll",P.className="ql-editor",P.tagName="DIV",P.defaultChild="block",P.allowedChildren=[e.default,n.BlockEmbed,c.default],p.default=P},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0}),p.SHORTKEY=p.default=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},b=function(){function L(F,V){var G=[],X=!0,nt=!1,it=void 0;try{for(var at=F[Symbol.iterator](),ft;!(X=(ft=at.next()).done)&&(G.push(ft.value),!(V&&G.length===V));X=!0);}catch(ht){nt=!0,it=ht}finally{try{!X&&at.return&&at.return()}finally{if(nt)throw it}}return G}return function(F,V){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return L(F,V);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function L(F,V){for(var G=0;G1&&arguments[1]!==void 0?arguments[1]:{},nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},it=C(G);if(it==null||it.key==null)return D.warn("Attempted to add invalid keyboard binding",it);typeof X=="function"&&(X={handler:X}),typeof nt=="function"&&(nt={handler:nt}),it=(0,e.default)(it,X,nt),this.bindings[it.key]=this.bindings[it.key]||[],this.bindings[it.key].push(it)}},{key:"listen",value:function(){var G=this;this.quill.root.addEventListener("keydown",function(X){if(!X.defaultPrevented){var nt=X.which||X.keyCode,it=(G.bindings[nt]||[]).filter(function(dt){return F.match(X,dt)});if(it.length!==0){var at=G.quill.getSelection();if(!(at==null||!G.quill.hasFocus())){var ft=G.quill.getLine(at.index),ht=b(ft,2),mt=ht[0],gt=ht[1],W=G.quill.getLeaf(at.index),Q=b(W,2),tt=Q[0],et=Q[1],J=at.length===0?[tt,et]:G.quill.getLeaf(at.index+at.length),st=b(J,2),ot=st[0],lt=st[1],Nt=tt instanceof c.default.Text?tt.value().slice(0,et):"",Et=ot instanceof c.default.Text?ot.value().slice(lt):"",pt={collapsed:at.length===0,empty:at.length===0&&mt.length()<=1,format:G.quill.getFormat(at),offset:gt,prefix:Nt,suffix:Et},Xt=it.some(function(dt){if(dt.collapsed!=null&&dt.collapsed!==pt.collapsed||dt.empty!=null&&dt.empty!==pt.empty||dt.offset!=null&&dt.offset!==pt.offset)return!1;if(Array.isArray(dt.format)){if(dt.format.every(function(Mt){return pt.format[Mt]==null}))return!1}else if(E(dt.format)==="object"&&!Object.keys(dt.format).every(function(Mt){return dt.format[Mt]===!0?pt.format[Mt]!=null:dt.format[Mt]===!1?pt.format[Mt]==null:(0,o.default)(dt.format[Mt],pt.format[Mt])}))return!1;return dt.prefix!=null&&!dt.prefix.test(pt.prefix)||dt.suffix!=null&&!dt.suffix.test(pt.suffix)?!1:dt.handler.call(G,at,pt)!==!0});Xt&&X.preventDefault()}}}})}}]),F}(P.default);K.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},K.DEFAULTS={bindings:{bold:$("bold"),italic:$("italic"),underline:$("underline"),indent:{key:K.keys.TAB,format:["blockquote","indent","list"],handler:function(F,V){if(V.collapsed&&V.offset!==0)return!0;this.quill.format("indent","+1",s.default.sources.USER)}},outdent:{key:K.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(F,V){if(V.collapsed&&V.offset!==0)return!0;this.quill.format("indent","-1",s.default.sources.USER)}},"outdent backspace":{key:K.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(F,V){V.format.indent!=null?this.quill.format("indent","-1",s.default.sources.USER):V.format.list!=null&&this.quill.format("list",!1,s.default.sources.USER)}},"indent code-block":M(!0),"outdent code-block":M(!1),"remove tab":{key:K.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(F){this.quill.deleteText(F.index-1,1,s.default.sources.USER)}},tab:{key:K.keys.TAB,handler:function(F){this.quill.history.cutoff();var V=new a.default().retain(F.index).delete(F.length).insert(" ");this.quill.updateContents(V,s.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(F.index+1,s.default.sources.SILENT)}},"list empty enter":{key:K.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(F,V){this.quill.format("list",!1,s.default.sources.USER),V.format.indent&&this.quill.format("indent",!1,s.default.sources.USER)}},"checklist enter":{key:K.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(F){var V=this.quill.getLine(F.index),G=b(V,2),X=G[0],nt=G[1],it=(0,e.default)({},X.formats(),{list:"checked"}),at=new a.default().retain(F.index).insert(` `,it).retain(X.length()-nt-1).retain(1,{list:"unchecked"});this.quill.updateContents(at,s.default.sources.USER),this.quill.setSelection(F.index+1,s.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:K.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(F,V){var G=this.quill.getLine(F.index),X=b(G,2),nt=X[0],it=X[1],at=new a.default().retain(F.index).insert(` `,V.format).retain(nt.length()-it-1).retain(1,{header:null});this.quill.updateContents(at,s.default.sources.USER),this.quill.setSelection(F.index+1,s.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(F,V){var G=V.prefix.length,X=this.quill.getLine(F.index),nt=b(X,2),it=nt[0],at=nt[1];if(at>G)return!0;var ft=void 0;switch(V.prefix.trim()){case"[]":case"[ ]":ft="unchecked";break;case"[x]":ft="checked";break;case"-":case"*":ft="bullet";break;default:ft="ordered"}this.quill.insertText(F.index," ",s.default.sources.USER),this.quill.history.cutoff();var ht=new a.default().retain(F.index-at).delete(G+1).retain(it.length()-2-at).retain(1,{list:ft});this.quill.updateContents(ht,s.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(F.index-G,s.default.sources.SILENT)}},"code exit":{key:K.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(F){var V=this.quill.getLine(F.index),G=b(V,2),X=G[0],nt=G[1],it=new a.default().retain(F.index+X.length()-nt-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(it,s.default.sources.USER)}},"embed left":Y(K.keys.LEFT,!1),"embed left shift":Y(K.keys.LEFT,!0),"embed right":Y(K.keys.RIGHT,!1),"embed right shift":Y(K.keys.RIGHT,!0)}};function Y(L,F){var V,G=L===K.keys.LEFT?"prefix":"suffix";return V={key:L,shiftKey:F,altKey:null},v(V,G,/^$/),v(V,"handler",function(nt){var it=nt.index;L===K.keys.RIGHT&&(it+=nt.length+1);var at=this.quill.getLeaf(it),ft=b(at,1),ht=ft[0];return ht instanceof c.default.Embed?(L===K.keys.LEFT?F?this.quill.setSelection(nt.index-1,nt.length+1,s.default.sources.USER):this.quill.setSelection(nt.index-1,s.default.sources.USER):F?this.quill.setSelection(nt.index,nt.length+1,s.default.sources.USER):this.quill.setSelection(nt.index+nt.length+1,s.default.sources.USER),!1):!0}),V}function H(L,F){if(!(L.index===0||this.quill.getLength()<=1)){var V=this.quill.getLine(L.index),G=b(V,1),X=G[0],nt={};if(F.offset===0){var it=this.quill.getLine(L.index-1),at=b(it,1),ft=at[0];if(ft!=null&&ft.length()>1){var ht=X.formats(),mt=this.quill.getFormat(L.index-1,1);nt=r.default.attributes.diff(ht,mt)||{}}}var gt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(F.prefix)?2:1;this.quill.deleteText(L.index-gt,gt,s.default.sources.USER),Object.keys(nt).length>0&&this.quill.formatLine(L.index-gt,gt,nt,s.default.sources.USER),this.quill.focus()}}function j(L,F){var V=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(F.suffix)?2:1;if(!(L.index>=this.quill.getLength()-V)){var G={},X=0,nt=this.quill.getLine(L.index),it=b(nt,1),at=it[0];if(F.offset>=at.length()-1){var ft=this.quill.getLine(L.index+1),ht=b(ft,1),mt=ht[0];if(mt){var gt=at.formats(),W=this.quill.getFormat(L.index,1);G=r.default.attributes.diff(gt,W)||{},X=mt.length()}}this.quill.deleteText(L.index,V,s.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(L.index+X-1,V,G,s.default.sources.USER)}}function S(L){var F=this.quill.getLines(L),V={};if(F.length>1){var G=F[0].formats(),X=F[F.length-1].formats();V=r.default.attributes.diff(X,G)||{}}this.quill.deleteText(L,s.default.sources.USER),Object.keys(V).length>0&&this.quill.formatLine(L.index,1,V,s.default.sources.USER),this.quill.setSelection(L.index,s.default.sources.SILENT),this.quill.focus()}function I(L,F){var V=this;L.length>0&&this.quill.scroll.deleteAt(L.index,L.length);var G=Object.keys(F.format).reduce(function(X,nt){return c.default.query(nt,c.default.Scope.BLOCK)&&!Array.isArray(F.format[nt])&&(X[nt]=F.format[nt]),X},{});this.quill.insertText(L.index,` `,G,s.default.sources.USER),this.quill.setSelection(L.index+1,s.default.sources.SILENT),this.quill.focus(),Object.keys(F.format).forEach(function(X){G[X]==null&&(Array.isArray(F.format[X])||X!=="link"&&V.quill.format(X,F.format[X],s.default.sources.USER))})}function M(L){return{key:K.keys.TAB,shiftKey:!L,format:{"code-block":!0},handler:function(V){var G=c.default.query("code-block"),X=V.index,nt=V.length,it=this.quill.scroll.descendant(G,X),at=b(it,2),ft=at[0],ht=at[1];if(ft!=null){var mt=this.quill.getIndex(ft),gt=ft.newlineIndex(ht,!0)+1,W=ft.newlineIndex(mt+ht+nt),Q=ft.domNode.textContent.slice(gt,W).split(` `);ht=0,Q.forEach(function(tt,et){L?(ft.insertAt(gt+ht,G.TAB),ht+=G.TAB.length,et===0?X+=G.TAB.length:nt+=G.TAB.length):tt.startsWith(G.TAB)&&(ft.deleteAt(gt+ht,G.TAB.length),ht-=G.TAB.length,et===0?X-=G.TAB.length:nt-=G.TAB.length),ht+=tt.length+1}),this.quill.update(s.default.sources.USER),this.quill.setSelection(X,nt,s.default.sources.SILENT)}}}}function $(L){return{key:L[0].toUpperCase(),shortKey:!0,handler:function(V,G){this.quill.format(L,!G.format[L],s.default.sources.USER)}}}function C(L){if(typeof L=="string"||typeof L=="number")return C({key:L});if((typeof L>"u"?"undefined":E(L))==="object"&&(L=(0,g.default)(L,!1)),typeof L.key=="string")if(K.keys[L.key.toUpperCase()]!=null)L.key=K.keys[L.key.toUpperCase()];else if(L.key.length===1)L.key=L.key.toUpperCase().charCodeAt(0);else return null;return L.shortKey&&(L[z]=L.shortKey,delete L.shortKey),L}p.default=K,p.SHORTKEY=z},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function r(i,c){var t=[],s=!0,k=!1,w=void 0;try{for(var T=i[Symbol.iterator](),P;!(s=(P=T.next()).done)&&(t.push(P.value),!(c&&t.length===c));s=!0);}catch(A){k=!0,w=A}finally{try{!s&&T.return&&T.return()}finally{if(k)throw w}}return t}return function(i,c){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return r(i,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function r(i,c,t){i===null&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,c);if(s===void 0){var k=Object.getPrototypeOf(i);return k===null?void 0:r(k,c,t)}else{if("value"in s)return s.value;var w=s.get;return w===void 0?void 0:w.call(t)}},O=function(){function r(i,c){for(var t=0;t-1}p.default=e,p.sanitize=f},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},b=function(){function u(r,i){for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:!1,t=this.container.querySelector(".ql-selected");if(i!==t&&(t!=null&&t.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(i.parentNode.children,i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),c))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":E(Event))==="object"){var s=document.createEvent("Event");s.initEvent("change",!0,!0),this.select.dispatchEvent(s)}this.close()}}},{key:"update",value:function(){var i=void 0;if(this.select.selectedIndex>-1){var c=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(c)}else this.selectItem(null);var t=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}]),u}();p.default=a},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=d(0),b=D(E),O=d(5),y=D(O),g=d(4),h=D(g),o=d(16),n=D(o),e=d(25),f=D(e),a=d(24),u=D(a),r=d(35),i=D(r),c=d(6),t=D(c),s=d(22),k=D(s),w=d(7),T=D(w),P=d(55),A=D(P),v=d(42),_=D(v),N=d(23),q=D(N);function D(z){return z&&z.__esModule?z:{default:z}}y.default.register({"blots/block":h.default,"blots/block/embed":g.BlockEmbed,"blots/break":n.default,"blots/container":f.default,"blots/cursor":u.default,"blots/embed":i.default,"blots/inline":t.default,"blots/scroll":k.default,"blots/text":T.default,"modules/clipboard":A.default,"modules/history":_.default,"modules/keyboard":q.default}),b.default.register(h.default,n.default,u.default,t.default,k.default,T.default),p.default=y.default},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=d(1),b=function(){function O(y){this.domNode=y,this.domNode[E.DATA_KEY]={blot:this}}return Object.defineProperty(O.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),O.create=function(y){if(this.tagName==null)throw new E.ParchmentError("Blot definition missing tagName");var g;return Array.isArray(this.tagName)?(typeof y=="string"&&(y=y.toUpperCase(),parseInt(y).toString()===y&&(y=parseInt(y))),typeof y=="number"?g=document.createElement(this.tagName[y-1]):this.tagName.indexOf(y)>-1?g=document.createElement(y):g=document.createElement(this.tagName[0])):g=document.createElement(this.tagName),this.className&&g.classList.add(this.className),g},O.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},O.prototype.clone=function(){var y=this.domNode.cloneNode(!1);return E.create(y)},O.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[E.DATA_KEY]},O.prototype.deleteAt=function(y,g){var h=this.isolate(y,g);h.remove()},O.prototype.formatAt=function(y,g,h,o){var n=this.isolate(y,g);if(E.query(h,E.Scope.BLOT)!=null&&o)n.wrap(h,o);else if(E.query(h,E.Scope.ATTRIBUTE)!=null){var e=E.create(this.statics.scope);n.wrap(e),e.format(h,o)}},O.prototype.insertAt=function(y,g,h){var o=h==null?E.create("text",g):E.create(g,h),n=this.split(y);this.parent.insertBefore(o,n)},O.prototype.insertInto=function(y,g){g===void 0&&(g=null),this.parent!=null&&this.parent.children.remove(this);var h=null;y.children.insertBefore(this,g),g!=null&&(h=g.domNode),(this.domNode.parentNode!=y.domNode||this.domNode.nextSibling!=h)&&y.domNode.insertBefore(this.domNode,h),this.parent=y,this.attach()},O.prototype.isolate=function(y,g){var h=this.split(y);return h.split(g),h},O.prototype.length=function(){return 1},O.prototype.offset=function(y){return y===void 0&&(y=this.parent),this.parent==null||this==y?0:this.parent.children.offset(this)+this.parent.offset(y)},O.prototype.optimize=function(y){this.domNode[E.DATA_KEY]!=null&&delete this.domNode[E.DATA_KEY].mutations},O.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},O.prototype.replace=function(y){y.parent!=null&&(y.parent.insertBefore(this,y.next),y.remove())},O.prototype.replaceWith=function(y,g){var h=typeof y=="string"?E.create(y,g):y;return h.replace(this),h},O.prototype.split=function(y,g){return y===0?this:this.next},O.prototype.update=function(y,g){},O.prototype.wrap=function(y,g){var h=typeof y=="string"?E.create(y,g):y;return this.parent!=null&&this.parent.insertBefore(h,this.next),h.appendChild(this),h},O.blotName="abstract",O}();p.default=b},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=d(12),b=d(32),O=d(33),y=d(1),g=function(){function h(o){this.attributes={},this.domNode=o,this.build()}return h.prototype.attribute=function(o,n){n?o.add(this.domNode,n)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])},h.prototype.build=function(){var o=this;this.attributes={};var n=E.default.keys(this.domNode),e=b.default.keys(this.domNode),f=O.default.keys(this.domNode);n.concat(e).concat(f).forEach(function(a){var u=y.query(a,y.Scope.ATTRIBUTE);u instanceof E.default&&(o.attributes[u.attrName]=u)})},h.prototype.copy=function(o){var n=this;Object.keys(this.attributes).forEach(function(e){var f=n.attributes[e].value(n.domNode);o.format(e,f)})},h.prototype.move=function(o){var n=this;this.copy(o),Object.keys(this.attributes).forEach(function(e){n.attributes[e].remove(n.domNode)}),this.attributes={}},h.prototype.values=function(){var o=this;return Object.keys(this.attributes).reduce(function(n,e){return n[e]=o.attributes[e].value(o.domNode),n},{})},h}();p.default=g},function(m,p,d){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var n in o)o.hasOwnProperty(n)&&(h[n]=o[n])};return function(h,o){g(h,o);function n(){this.constructor=h}h.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=d(12);function O(g,h){var o=g.getAttribute("class")||"";return o.split(/\s+/).filter(function(n){return n.indexOf(h+"-")===0})}var y=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("class")||"").split(/\s+/).map(function(n){return n.split("-").slice(0,-1).join("-")})},h.prototype.add=function(o,n){return this.canAdd(o,n)?(this.remove(o),o.classList.add(this.keyName+"-"+n),!0):!1},h.prototype.remove=function(o){var n=O(o,this.keyName);n.forEach(function(e){o.classList.remove(e)}),o.classList.length===0&&o.removeAttribute("class")},h.prototype.value=function(o){var n=O(o,this.keyName)[0]||"",e=n.slice(this.keyName.length+1);return this.canAdd(o,e)?e:""},h}(b.default);p.default=y},function(m,p,d){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var n in o)o.hasOwnProperty(n)&&(h[n]=o[n])};return function(h,o){g(h,o);function n(){this.constructor=h}h.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=d(12);function O(g){var h=g.split("-"),o=h.slice(1).map(function(n){return n[0].toUpperCase()+n.slice(1)}).join("");return h[0]+o}var y=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("style")||"").split(";").map(function(n){var e=n.split(":");return e[0].trim()})},h.prototype.add=function(o,n){return this.canAdd(o,n)?(o.style[O(this.keyName)]=n,!0):!1},h.prototype.remove=function(o){o.style[O(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")},h.prototype.value=function(o){var n=o.style[O(this.keyName)];return this.canAdd(o,n)?n:""},h}(b.default);p.default=y},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function y(g,h){for(var o=0;oP&&this.stack.undo.length>0){var A=this.stack.undo.pop();T=T.compose(A.undo),k=A.redo.compose(k)}else this.lastRecorded=P;this.stack.undo.push({redo:k,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(k){this.stack.undo.forEach(function(w){w.undo=k.transform(w.undo,!0),w.redo=k.transform(w.redo,!0)}),this.stack.redo.forEach(function(w){w.undo=k.transform(w.undo,!0),w.redo=k.transform(w.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(o.default);u.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function r(c){var t=c.ops[c.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(` `):t.attributes!=null?Object.keys(t.attributes).some(function(s){return O.default.query(s,O.default.Scope.BLOCK)!=null}):!1}function i(c){var t=c.reduce(function(k,w){return k+=w.delete||0,k},0),s=c.length()-t;return r(c)&&(s-=1),s}p.default=u,p.getLastChangeIndex=i},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.BaseTooltip=void 0;var E=function(){function I(M,$){for(var C=0;C<$.length;C++){var L=$[C];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(M,L.key,L)}}return function(M,$,C){return $&&I(M.prototype,$),C&&I(M,C),M}}(),b=function I(M,$,C){M===null&&(M=Function.prototype);var L=Object.getOwnPropertyDescriptor(M,$);if(L===void 0){var F=Object.getPrototypeOf(M);return F===null?void 0:I(F,$,C)}else{if("value"in L)return L.value;var V=L.get;return V===void 0?void 0:V.call(C)}},O=d(3),y=P(O),g=d(2),h=P(g),o=d(8),n=P(o),e=d(23),f=P(e),a=d(34),u=P(a),r=d(59),i=P(r),c=d(60),t=P(c),s=d(28),k=P(s),w=d(61),T=P(w);function P(I){return I&&I.__esModule?I:{default:I}}function A(I,M){if(!(I instanceof M))throw new TypeError("Cannot call a class as a function")}function v(I,M){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:I}function _(I,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);I.prototype=Object.create(M&&M.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(I,M):I.__proto__=M)}var N=[!1,"center","right","justify"],q=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],D=[!1,"serif","monospace"],z=["1","2","3",!1],K=["small",!1,"large","huge"],Y=function(I){_(M,I);function M($,C){A(this,M);var L=v(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,$,C)),F=function V(G){if(!document.body.contains($.root))return document.body.removeEventListener("click",V);L.tooltip!=null&&!L.tooltip.root.contains(G.target)&&document.activeElement!==L.tooltip.textbox&&!L.quill.hasFocus()&&L.tooltip.hide(),L.pickers!=null&&L.pickers.forEach(function(X){X.container.contains(G.target)||X.close()})};return $.emitter.listenDOM("click",document.body,F),L}return E(M,[{key:"addModule",value:function(C){var L=b(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"addModule",this).call(this,C);return C==="toolbar"&&this.extendToolbar(L),L}},{key:"buildButtons",value:function(C,L){C.forEach(function(F){var V=F.getAttribute("class")||"";V.split(/\s+/).forEach(function(G){if(G.startsWith("ql-")&&(G=G.slice(3),L[G]!=null))if(G==="direction")F.innerHTML=L[G][""]+L[G].rtl;else if(typeof L[G]=="string")F.innerHTML=L[G];else{var X=F.value||"";X!=null&&L[G][X]&&(F.innerHTML=L[G][X])}})})}},{key:"buildPickers",value:function(C,L){var F=this;this.pickers=C.map(function(G){if(G.classList.contains("ql-align"))return G.querySelector("option")==null&&S(G,N),new t.default(G,L.align);if(G.classList.contains("ql-background")||G.classList.contains("ql-color")){var X=G.classList.contains("ql-background")?"background":"color";return G.querySelector("option")==null&&S(G,q,X==="background"?"#ffffff":"#000000"),new i.default(G,L[X])}else return G.querySelector("option")==null&&(G.classList.contains("ql-font")?S(G,D):G.classList.contains("ql-header")?S(G,z):G.classList.contains("ql-size")&&S(G,K)),new k.default(G)});var V=function(){F.pickers.forEach(function(X){X.update()})};this.quill.on(n.default.events.EDITOR_CHANGE,V)}}]),M}(u.default);Y.DEFAULTS=(0,y.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var M=this,$=this.container.querySelector("input.ql-image[type=file]");$==null&&($=document.createElement("input"),$.setAttribute("type","file"),$.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),$.classList.add("ql-image"),$.addEventListener("change",function(){if($.files!=null&&$.files[0]!=null){var C=new FileReader;C.onload=function(L){var F=M.quill.getSelection(!0);M.quill.updateContents(new h.default().retain(F.index).delete(F.length).insert({image:L.target.result}),n.default.sources.USER),M.quill.setSelection(F.index+1,n.default.sources.SILENT),$.value=""},C.readAsDataURL($.files[0])}}),this.container.appendChild($)),$.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var H=function(I){_(M,I);function M($,C){A(this,M);var L=v(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,$,C));return L.textbox=L.root.querySelector('input[type="text"]'),L.listen(),L}return E(M,[{key:"listen",value:function(){var C=this;this.textbox.addEventListener("keydown",function(L){f.default.match(L,"enter")?(C.save(),L.preventDefault()):f.default.match(L,"escape")&&(C.cancel(),L.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),L!=null?this.textbox.value=L:C!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+C)||""),this.root.setAttribute("data-mode",C)}},{key:"restoreFocus",value:function(){var C=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=C}},{key:"save",value:function(){var C=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var L=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",C,n.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",C,n.default.sources.USER)),this.quill.root.scrollTop=L;break}case"video":C=j(C);case"formula":{if(!C)break;var F=this.quill.getSelection(!0);if(F!=null){var V=F.index+F.length;this.quill.insertEmbed(V,this.root.getAttribute("data-mode"),C,n.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(V+1," ",n.default.sources.USER),this.quill.setSelection(V+2,n.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),M}(T.default);function j(I){var M=I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return M?(M[1]||"https")+"://www.youtube.com/embed/"+M[2]+"?showinfo=0":(M=I.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(M[1]||"https")+"://player.vimeo.com/video/"+M[2]+"/":I}function S(I,M){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;M.forEach(function(C){var L=document.createElement("option");C===$?L.setAttribute("selected","selected"):L.setAttribute("value",C),I.appendChild(L)})}p.BaseTooltip=H,p.default=Y},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function b(){this.head=this.tail=null,this.length=0}return b.prototype.append=function(){for(var O=[],y=0;y1&&this.append.apply(this,O.slice(1))},b.prototype.contains=function(O){for(var y,g=this.iterator();y=g();)if(y===O)return!0;return!1},b.prototype.insertBefore=function(O,y){O&&(O.next=y,y!=null?(O.prev=y.prev,y.prev!=null&&(y.prev.next=O),y.prev=O,y===this.head&&(this.head=O)):this.tail!=null?(this.tail.next=O,O.prev=this.tail,this.tail=O):(O.prev=null,this.head=this.tail=O),this.length+=1)},b.prototype.offset=function(O){for(var y=0,g=this.head;g!=null;){if(g===O)return y;y+=g.length(),g=g.next}return-1},b.prototype.remove=function(O){this.contains(O)&&(O.prev!=null&&(O.prev.next=O.next),O.next!=null&&(O.next.prev=O.prev),O===this.head&&(this.head=O.next),O===this.tail&&(this.tail=O.prev),this.length-=1)},b.prototype.iterator=function(O){return O===void 0&&(O=this.head),function(){var y=O;return O!=null&&(O=O.next),y}},b.prototype.find=function(O,y){y===void 0&&(y=!1);for(var g,h=this.iterator();g=h();){var o=g.length();if(Of?g(e,O-f,Math.min(y,f+u-O)):g(e,0,Math.min(u,O+y-f)),f+=u}},b.prototype.map=function(O){return this.reduce(function(y,g){return y.push(O(g)),y},[])},b.prototype.reduce=function(O,y){for(var g,h=this.iterator();g=h();)y=O(y,g);return y},b}();p.default=E},function(m,p,d){var E=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var f in e)e.hasOwnProperty(f)&&(n[f]=e[f])};return function(n,e){o(n,e);function f(){this.constructor=n}n.prototype=e===null?Object.create(e):(f.prototype=e.prototype,new f)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=d(17),O=d(1),y={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},g=100,h=function(o){E(n,o);function n(e){var f=o.call(this,e)||this;return f.scroll=f,f.observer=new MutationObserver(function(a){f.update(a)}),f.observer.observe(f.domNode,y),f.attach(),f}return n.prototype.detach=function(){o.prototype.detach.call(this),this.observer.disconnect()},n.prototype.deleteAt=function(e,f){this.update(),e===0&&f===this.length()?this.children.forEach(function(a){a.remove()}):o.prototype.deleteAt.call(this,e,f)},n.prototype.formatAt=function(e,f,a,u){this.update(),o.prototype.formatAt.call(this,e,f,a,u)},n.prototype.insertAt=function(e,f,a){this.update(),o.prototype.insertAt.call(this,e,f,a)},n.prototype.optimize=function(e,f){var a=this;e===void 0&&(e=[]),f===void 0&&(f={}),o.prototype.optimize.call(this,f);for(var u=[].slice.call(this.observer.takeRecords());u.length>0;)e.push(u.pop());for(var r=function(s,k){k===void 0&&(k=!0),!(s==null||s===a)&&s.domNode.parentNode!=null&&(s.domNode[O.DATA_KEY].mutations==null&&(s.domNode[O.DATA_KEY].mutations=[]),k&&r(s.parent))},i=function(s){s.domNode[O.DATA_KEY]==null||s.domNode[O.DATA_KEY].mutations==null||(s instanceof b.default&&s.children.forEach(i),s.optimize(f))},c=e,t=0;c.length>0;t+=1){if(t>=g)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(s){var k=O.find(s.target,!0);k!=null&&(k.domNode===s.target&&(s.type==="childList"?(r(O.find(s.previousSibling,!1)),[].forEach.call(s.addedNodes,function(w){var T=O.find(w,!1);r(T,!1),T instanceof b.default&&T.children.forEach(function(P){r(P,!1)})})):s.type==="attributes"&&r(k.prev)),r(k))}),this.children.forEach(i),c=[].slice.call(this.observer.takeRecords()),u=c.slice();u.length>0;)e.push(u.pop())}},n.prototype.update=function(e,f){var a=this;f===void 0&&(f={}),e=e||this.observer.takeRecords(),e.map(function(u){var r=O.find(u.target,!0);return r==null?null:r.domNode[O.DATA_KEY].mutations==null?(r.domNode[O.DATA_KEY].mutations=[u],r):(r.domNode[O.DATA_KEY].mutations.push(u),null)}).forEach(function(u){u==null||u===a||u.domNode[O.DATA_KEY]==null||u.update(u.domNode[O.DATA_KEY].mutations||[],f)}),this.domNode[O.DATA_KEY].mutations!=null&&o.prototype.update.call(this,this.domNode[O.DATA_KEY].mutations,f),this.optimize(e,f)},n.blotName="scroll",n.defaultChild="block",n.scope=O.Scope.BLOCK_BLOT,n.tagName="DIV",n}(b.default);p.default=h},function(m,p,d){var E=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var e in n)n.hasOwnProperty(e)&&(o[e]=n[e])};return function(o,n){h(o,n);function e(){this.constructor=o}o.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=d(18),O=d(1);function y(h,o){if(Object.keys(h).length!==Object.keys(o).length)return!1;for(var n in h)if(h[n]!==o[n])return!1;return!0}var g=function(h){E(o,h);function o(){return h!==null&&h.apply(this,arguments)||this}return o.formats=function(n){if(n.tagName!==o.tagName)return h.formats.call(this,n)},o.prototype.format=function(n,e){var f=this;n===this.statics.blotName&&!e?(this.children.forEach(function(a){a instanceof b.default||(a=a.wrap(o.blotName,!0)),f.attributes.copy(a)}),this.unwrap()):h.prototype.format.call(this,n,e)},o.prototype.formatAt=function(n,e,f,a){if(this.formats()[f]!=null||O.query(f,O.Scope.ATTRIBUTE)){var u=this.isolate(n,e);u.format(f,a)}else h.prototype.formatAt.call(this,n,e,f,a)},o.prototype.optimize=function(n){h.prototype.optimize.call(this,n);var e=this.formats();if(Object.keys(e).length===0)return this.unwrap();var f=this.next;f instanceof o&&f.prev===this&&y(e,f.formats())&&(f.moveChildren(this),f.remove())},o.blotName="inline",o.scope=O.Scope.INLINE_BLOT,o.tagName="SPAN",o}(b.default);p.default=g},function(m,p,d){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var n in o)o.hasOwnProperty(n)&&(h[n]=o[n])};return function(h,o){g(h,o);function n(){this.constructor=h}h.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=d(18),O=d(1),y=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.formats=function(o){var n=O.query(h.blotName).tagName;if(o.tagName!==n)return g.formats.call(this,o)},h.prototype.format=function(o,n){O.query(o,O.Scope.BLOCK)!=null&&(o===this.statics.blotName&&!n?this.replaceWith(h.blotName):g.prototype.format.call(this,o,n))},h.prototype.formatAt=function(o,n,e,f){O.query(e,O.Scope.BLOCK)!=null?this.format(e,f):g.prototype.formatAt.call(this,o,n,e,f)},h.prototype.insertAt=function(o,n,e){if(e==null||O.query(n,O.Scope.INLINE)!=null)g.prototype.insertAt.call(this,o,n,e);else{var f=this.split(o),a=O.create(n,e);f.parent.insertBefore(a,f)}},h.prototype.update=function(o,n){navigator.userAgent.match(/Trident/)?this.build():g.prototype.update.call(this,o,n)},h.blotName="block",h.scope=O.Scope.BLOCK_BLOT,h.tagName="P",h}(b.default);p.default=y},function(m,p,d){var E=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,h){g.__proto__=h}||function(g,h){for(var o in h)h.hasOwnProperty(o)&&(g[o]=h[o])};return function(g,h){y(g,h);function o(){this.constructor=g}g.prototype=h===null?Object.create(h):(o.prototype=h.prototype,new o)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=d(19),O=function(y){E(g,y);function g(){return y!==null&&y.apply(this,arguments)||this}return g.formats=function(h){},g.prototype.format=function(h,o){y.prototype.formatAt.call(this,0,this.length(),h,o)},g.prototype.formatAt=function(h,o,n,e){h===0&&o===this.length()?this.format(n,e):y.prototype.formatAt.call(this,h,o,n,e)},g.prototype.formats=function(){return this.statics.formats(this.domNode)},g}(b.default);p.default=O},function(m,p,d){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var n in o)o.hasOwnProperty(n)&&(h[n]=o[n])};return function(h,o){g(h,o);function n(){this.constructor=h}h.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=d(19),O=d(1),y=function(g){E(h,g);function h(o){var n=g.call(this,o)||this;return n.text=n.statics.value(n.domNode),n}return h.create=function(o){return document.createTextNode(o)},h.value=function(o){var n=o.data;return n.normalize&&(n=n.normalize()),n},h.prototype.deleteAt=function(o,n){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+n)},h.prototype.index=function(o,n){return this.domNode===o?n:-1},h.prototype.insertAt=function(o,n,e){e==null?(this.text=this.text.slice(0,o)+n+this.text.slice(o),this.domNode.data=this.text):g.prototype.insertAt.call(this,o,n,e)},h.prototype.length=function(){return this.text.length},h.prototype.optimize=function(o){g.prototype.optimize.call(this,o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof h&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},h.prototype.position=function(o,n){return[this.domNode,o]},h.prototype.split=function(o,n){if(n===void 0&&(n=!1),!n){if(o===0)return this;if(o===this.length())return this.next}var e=O.create(this.domNode.splitText(o));return this.parent.insertBefore(e,this.next),this.text=this.statics.value(this.domNode),e},h.prototype.update=function(o,n){var e=this;o.some(function(f){return f.type==="characterData"&&f.target===e.domNode})&&(this.text=this.statics.value(this.domNode))},h.prototype.value=function(){return this.text},h.blotName="text",h.scope=O.Scope.INLINE_BLOT,h}(b.default);p.default=y},function(m,p,d){var E=document.createElement("div");if(E.classList.toggle("test-class",!1),E.classList.contains("test-class")){var b=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(O,y){return arguments.length>1&&!this.contains(O)==!y?y:b.call(this,O)}}String.prototype.startsWith||(String.prototype.startsWith=function(O,y){return y=y||0,this.substr(y,O.length)===O}),String.prototype.endsWith||(String.prototype.endsWith=function(O,y){var g=this.toString();(typeof y!="number"||!isFinite(y)||Math.floor(y)!==y||y>g.length)&&(y=g.length),y-=O.length;var h=g.indexOf(O,y);return h!==-1&&h===y}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(y){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof y!="function")throw new TypeError("predicate must be a function");for(var g=Object(this),h=g.length>>>0,o=arguments[1],n,e=0;es.length?t:s,T=t.length>s.length?s:t,P=w.indexOf(T);if(P!=-1)return k=[[E,w.substring(0,P)],[b,T],[E,w.substring(P+T.length)]],t.length>s.length&&(k[0][0]=k[2][0]=d),k;if(T.length==1)return[[d,t],[E,s]];var A=e(t,s);if(A){var v=A[0],_=A[1],N=A[2],q=A[3],D=A[4],z=O(v,N),K=O(_,q);return z.concat([[b,D]],K)}return g(t,s)}function g(t,s){for(var k=t.length,w=s.length,T=Math.ceil((k+w)/2),P=T,A=2*T,v=new Array(A),_=new Array(A),N=0;Nk)K+=2;else if($>w)z+=2;else if(D){var C=P+q-S;if(C>=0&&C=L)return h(t,s,M,$)}}}for(var F=-j+Y;F<=j-H;F+=2){var C=P+F,L;F==-j||F!=j&&_[C-1]<_[C+1]?L=_[C+1]:L=_[C-1]+1;for(var V=L-F;Lk)H+=2;else if(V>w)Y+=2;else if(!D){var I=P+q-F;if(I>=0&&I=L)return h(t,s,M,$)}}}}return[[d,t],[E,s]]}function h(t,s,k,w){var T=t.substring(0,k),P=s.substring(0,w),A=t.substring(k),v=s.substring(w),_=O(T,P),N=O(A,v);return _.concat(N)}function o(t,s){if(!t||!s||t.charAt(0)!=s.charAt(0))return 0;for(var k=0,w=Math.min(t.length,s.length),T=w,P=0;ks.length?t:s,w=t.length>s.length?s:t;if(k.length<4||w.length*2=K.length?[M,$,C,L,I]:null}var P=T(k,w,Math.ceil(k.length/4)),A=T(k,w,Math.ceil(k.length/2)),v;if(!P&&!A)return null;A?P?v=P[4].length>A[4].length?P:A:v=A:v=P;var _,N,q,D;t.length>s.length?(_=v[0],N=v[1],q=v[2],D=v[3]):(q=v[0],D=v[1],_=v[2],N=v[3]);var z=v[4];return[_,N,q,D,z]}function f(t){t.push([b,""]);for(var s=0,k=0,w=0,T="",P="",A;s1?(k!==0&&w!==0&&(A=o(P,T),A!==0&&(s-k-w>0&&t[s-k-w-1][0]==b?t[s-k-w-1][1]+=P.substring(0,A):(t.splice(0,0,[b,P.substring(0,A)]),s++),P=P.substring(A),T=T.substring(A)),A=n(P,T),A!==0&&(t[s][1]=P.substring(P.length-A)+t[s][1],P=P.substring(0,P.length-A),T=T.substring(0,T.length-A))),k===0?t.splice(s-w,k+w,[E,P]):w===0?t.splice(s-k,k+w,[d,T]):t.splice(s-k-w,k+w,[d,T],[E,P]),s=s-k-w+(k?1:0)+(w?1:0)+1):s!==0&&t[s-1][0]==b?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,w=0,k=0,T="",P="";break}t[t.length-1][1]===""&&t.pop();var v=!1;for(s=1;s0&&w.splice(T+2,0,[A[0],v]),c(w,T,3)}else return t}function i(t){for(var s=!1,k=function(A){return A.charCodeAt(0)>=56320&&A.charCodeAt(0)<=57343},w=function(A){return A.charCodeAt(A.length-1)>=55296&&A.charCodeAt(A.length-1)<=56319},T=2;T0&&P.push(t[T]);return P}function c(t,s,k){for(var w=s+k-1;w>=0&&w>=s-1;w--)if(w+1\r?\n +\<"),this.convert();var J=this.quill.getFormat(this.quill.selection.savedRange.index);if(J[w.default.blotName]){var st=this.container.innerText;return this.container.innerHTML="",new o.default().insert(st,N({},w.default.blotName,J[w.default.blotName]))}var ot=this.prepareMatching(),lt=b(ot,2),Nt=lt[0],Et=lt[1],pt=F(this.container,Nt,Et);return C(pt,` `)&&pt.ops[pt.ops.length-1].attributes==null&&(pt=pt.compose(new o.default().retain(pt.length()-1).delete(1))),K.log("convert",this.container.innerHTML,pt),this.container.innerHTML="",pt}},{key:"dangerouslyPasteHTML",value:function(et,J){var st=arguments.length>2&&arguments[2]!==void 0?arguments[2]:a.default.sources.API;if(typeof et=="string")this.quill.setContents(this.convert(et),J),this.quill.setSelection(0,a.default.sources.SILENT);else{var ot=this.convert(J);this.quill.updateContents(new o.default().retain(et).concat(ot),st),this.quill.setSelection(et+ot.length(),a.default.sources.SILENT)}}},{key:"onPaste",value:function(et){var J=this;if(!(et.defaultPrevented||!this.quill.isEnabled())){var st=this.quill.getSelection(),ot=new o.default().retain(st.index),lt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(a.default.sources.SILENT),setTimeout(function(){ot=ot.concat(J.convert()).delete(st.length),J.quill.updateContents(ot,a.default.sources.USER),J.quill.setSelection(ot.length()-st.length,a.default.sources.SILENT),J.quill.scrollingContainer.scrollTop=lt,J.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var et=this,J=[],st=[];return this.matchers.forEach(function(ot){var lt=b(ot,2),Nt=lt[0],Et=lt[1];switch(Nt){case Node.TEXT_NODE:st.push(Et);break;case Node.ELEMENT_NODE:J.push(Et);break;default:[].forEach.call(et.container.querySelectorAll(Nt),function(pt){pt[Y]=pt[Y]||[],pt[Y].push(Et)});break}}),[J,st]}}]),Q}(c.default);I.DEFAULTS={matchers:[],matchVisual:!0};function M(W,Q,tt){return(typeof Q>"u"?"undefined":E(Q))==="object"?Object.keys(Q).reduce(function(et,J){return M(et,J,Q[J])},W):W.reduce(function(et,J){return J.attributes&&J.attributes[Q]?et.push(J):et.insert(J.insert,(0,g.default)({},N({},Q,tt),J.attributes))},new o.default)}function $(W){if(W.nodeType!==Node.ELEMENT_NODE)return{};var Q="__ql-computed-style";return W[Q]||(W[Q]=window.getComputedStyle(W))}function C(W,Q){for(var tt="",et=W.ops.length-1;et>=0&&tt.length-1}function F(W,Q,tt){return W.nodeType===W.TEXT_NODE?tt.reduce(function(et,J){return J(W,et)},new o.default):W.nodeType===W.ELEMENT_NODE?[].reduce.call(W.childNodes||[],function(et,J){var st=F(J,Q,tt);return J.nodeType===W.ELEMENT_NODE&&(st=Q.reduce(function(ot,lt){return lt(J,ot)},st),st=(J[Y]||[]).reduce(function(ot,lt){return lt(J,ot)},st)),et.concat(st)},new o.default):new o.default}function V(W,Q,tt){return M(tt,W,!0)}function G(W,Q){var tt=e.default.Attributor.Attribute.keys(W),et=e.default.Attributor.Class.keys(W),J=e.default.Attributor.Style.keys(W),st={};return tt.concat(et).concat(J).forEach(function(ot){var lt=e.default.query(ot,e.default.Scope.ATTRIBUTE);lt!=null&&(st[lt.attrName]=lt.value(W),st[lt.attrName])||(lt=j[ot],lt!=null&&(lt.attrName===ot||lt.keyName===ot)&&(st[lt.attrName]=lt.value(W)||void 0),lt=S[ot],lt!=null&&(lt.attrName===ot||lt.keyName===ot)&&(lt=S[ot],st[lt.attrName]=lt.value(W)||void 0))}),Object.keys(st).length>0&&(Q=M(Q,st)),Q}function X(W,Q){var tt=e.default.query(W);if(tt==null)return Q;if(tt.prototype instanceof e.default.Embed){var et={},J=tt.value(W);J!=null&&(et[tt.blotName]=J,Q=new o.default().insert(et,tt.formats(W)))}else typeof tt.formats=="function"&&(Q=M(Q,tt.blotName,tt.formats(W)));return Q}function nt(W,Q){return C(Q,` `)||Q.insert(` `),Q}function it(){return new o.default}function at(W,Q){var tt=e.default.query(W);if(tt==null||tt.blotName!=="list-item"||!C(Q,` `))return Q;for(var et=-1,J=W.parentNode;!J.classList.contains("ql-clipboard");)(e.default.query(J)||{}).blotName==="list"&&(et+=1),J=J.parentNode;return et<=0?Q:Q.compose(new o.default().retain(Q.length()-1).retain(1,{indent:et}))}function ft(W,Q){return C(Q,` `)||(L(W)||Q.length()>0&&W.nextSibling&&L(W.nextSibling))&&Q.insert(` `),Q}function ht(W,Q){if(L(W)&&W.nextElementSibling!=null&&!C(Q,` `)){var tt=W.offsetHeight+parseFloat($(W).marginTop)+parseFloat($(W).marginBottom);W.nextElementSibling.offsetTop>W.offsetTop+tt*1.5&&Q.insert(` `)}return Q}function mt(W,Q){var tt={},et=W.style||{};return et.fontStyle&&$(W).fontStyle==="italic"&&(tt.italic=!0),et.fontWeight&&($(W).fontWeight.startsWith("bold")||parseInt($(W).fontWeight)>=700)&&(tt.bold=!0),Object.keys(tt).length>0&&(Q=M(Q,tt)),parseFloat(et.textIndent||0)>0&&(Q=new o.default().insert(" ").concat(Q)),Q}function gt(W,Q){var tt=W.data;if(W.parentNode.tagName==="O:P")return Q.insert(tt.trim());if(tt.trim().length===0&&W.parentNode.classList.contains("ql-clipboard"))return Q;if(!$(W.parentNode).whiteSpace.startsWith("pre")){var et=function(st,ot){return ot=ot.replace(/[^\u00a0]/g,""),ot.length<1&&st?" ":ot};tt=tt.replace(/\r\n/g," ").replace(/\n/g," "),tt=tt.replace(/\s\s+/g,et.bind(et,!0)),(W.previousSibling==null&&L(W.parentNode)||W.previousSibling!=null&&L(W.previousSibling))&&(tt=tt.replace(/^\s+/,et.bind(et,!1))),(W.nextSibling==null&&L(W.parentNode)||W.nextSibling!=null&&L(W.nextSibling))&&(tt=tt.replace(/\s+$/,et.bind(et,!1)))}return Q.insert(tt)}p.default=I,p.matchAttributor=G,p.matchBlot=X,p.matchNewline=ft,p.matchSpacing=ht,p.matchText=gt},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r '},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;re.right&&(a=e.right-f.right,this.root.style.left=o+a+"px"),f.lefte.bottom){var u=f.bottom-f.top,r=h.bottom-h.top+u;this.root.style.top=n-r+"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")}}]),y}();p.default=O},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function A(v,_){var N=[],q=!0,D=!1,z=void 0;try{for(var K=v[Symbol.iterator](),Y;!(q=(Y=K.next()).done)&&(N.push(Y.value),!(_&&N.length===_));q=!0);}catch(H){D=!0,z=H}finally{try{!q&&K.return&&K.return()}finally{if(D)throw z}}return N}return function(v,_){if(Array.isArray(v))return v;if(Symbol.iterator in Object(v))return A(v,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function A(v,_,N){v===null&&(v=Function.prototype);var q=Object.getOwnPropertyDescriptor(v,_);if(q===void 0){var D=Object.getPrototypeOf(v);return D===null?void 0:A(D,_,N)}else{if("value"in q)return q.value;var z=q.get;return z===void 0?void 0:z.call(N)}},O=function(){function A(v,_){for(var N=0;N<_.length;N++){var q=_[N];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(v,q.key,q)}}return function(v,_,N){return _&&A(v.prototype,_),N&&A(v,N),v}}(),y=d(3),g=c(y),h=d(8),o=c(h),n=d(43),e=c(n),f=d(27),a=c(f),u=d(15),r=d(41),i=c(r);function c(A){return A&&A.__esModule?A:{default:A}}function t(A,v){if(!(A instanceof v))throw new TypeError("Cannot call a class as a function")}function s(A,v){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:A}function k(A,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);A.prototype=Object.create(v&&v.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(A,v):A.__proto__=v)}var w=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(A){k(v,A);function v(_,N){t(this,v),N.modules.toolbar!=null&&N.modules.toolbar.container==null&&(N.modules.toolbar.container=w);var q=s(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,_,N));return q.quill.container.classList.add("ql-snow"),q}return O(v,[{key:"extendToolbar",value:function(N){N.container.classList.add("ql-snow"),this.buildButtons([].slice.call(N.container.querySelectorAll("button")),i.default),this.buildPickers([].slice.call(N.container.querySelectorAll("select")),i.default),this.tooltip=new P(this.quill,this.options.bounds),N.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(q,D){N.handlers.link.call(N,!D.format.link)})}}]),v}(e.default);T.DEFAULTS=(0,g.default)(!0,{},e.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(v){if(v){var _=this.quill.getSelection();if(_==null||_.length==0)return;var N=this.quill.getText(_);/^\S+@\S+\.\S+$/.test(N)&&N.indexOf("mailto:")!==0&&(N="mailto:"+N);var q=this.quill.theme.tooltip;q.edit("link",N)}else this.quill.format("link",!1)}}}}});var P=function(A){k(v,A);function v(_,N){t(this,v);var q=s(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,_,N));return q.preview=q.root.querySelector("a.ql-preview"),q}return O(v,[{key:"listen",value:function(){var N=this;b(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(q){N.root.classList.contains("ql-editing")?N.save():N.edit("link",N.preview.textContent),q.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(q){if(N.linkRange!=null){var D=N.linkRange;N.restoreFocus(),N.quill.formatText(D,"link",!1,o.default.sources.USER),delete N.linkRange}q.preventDefault(),N.hide()}),this.quill.on(o.default.events.SELECTION_CHANGE,function(q,D,z){if(q!=null){if(q.length===0&&z===o.default.sources.USER){var K=N.quill.scroll.descendant(a.default,q.index),Y=E(K,2),H=Y[0],j=Y[1];if(H!=null){N.linkRange=new u.Range(q.index-j,H.length());var S=a.default.formats(H.domNode);N.preview.textContent=S,N.preview.setAttribute("href",S),N.show(),N.position(N.quill.getBounds(N.linkRange));return}}else delete N.linkRange;N.hide()}})}},{key:"show",value:function(){b(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),v}(n.BaseTooltip);P.TEMPLATE=['','','',''].join(""),p.default=T},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=d(29),b=J(E),O=d(36),y=d(38),g=d(64),h=d(65),o=J(h),n=d(66),e=J(n),f=d(67),a=J(f),u=d(37),r=d(26),i=d(39),c=d(40),t=d(56),s=J(t),k=d(68),w=J(k),T=d(27),P=J(T),A=d(69),v=J(A),_=d(70),N=J(_),q=d(71),D=J(q),z=d(72),K=J(z),Y=d(73),H=J(Y),j=d(13),S=J(j),I=d(74),M=J(I),$=d(75),C=J($),L=d(57),F=J(L),V=d(41),G=J(V),X=d(28),nt=J(X),it=d(59),at=J(it),ft=d(60),ht=J(ft),mt=d(61),gt=J(mt),W=d(108),Q=J(W),tt=d(62),et=J(tt);function J(st){return st&&st.__esModule?st:{default:st}}b.default.register({"attributors/attribute/direction":y.DirectionAttribute,"attributors/class/align":O.AlignClass,"attributors/class/background":u.BackgroundClass,"attributors/class/color":r.ColorClass,"attributors/class/direction":y.DirectionClass,"attributors/class/font":i.FontClass,"attributors/class/size":c.SizeClass,"attributors/style/align":O.AlignStyle,"attributors/style/background":u.BackgroundStyle,"attributors/style/color":r.ColorStyle,"attributors/style/direction":y.DirectionStyle,"attributors/style/font":i.FontStyle,"attributors/style/size":c.SizeStyle},!0),b.default.register({"formats/align":O.AlignClass,"formats/direction":y.DirectionClass,"formats/indent":g.IndentClass,"formats/background":u.BackgroundStyle,"formats/color":r.ColorStyle,"formats/font":i.FontClass,"formats/size":c.SizeClass,"formats/blockquote":o.default,"formats/code-block":S.default,"formats/header":e.default,"formats/list":a.default,"formats/bold":s.default,"formats/code":j.Code,"formats/italic":w.default,"formats/link":P.default,"formats/script":v.default,"formats/strike":N.default,"formats/underline":D.default,"formats/image":K.default,"formats/video":H.default,"formats/list/item":f.ListItem,"modules/formula":M.default,"modules/syntax":C.default,"modules/toolbar":F.default,"themes/bubble":Q.default,"themes/snow":et.default,"ui/icons":G.default,"ui/picker":nt.default,"ui/icon-picker":ht.default,"ui/color-picker":at.default,"ui/tooltip":gt.default},!0),p.default=b.default},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0}),p.IndentClass=void 0;var E=function(){function a(u,r){for(var i=0;i0&&this.children.tail.format(w,T)}},{key:"formats",value:function(){return f({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(w,T){if(w instanceof i)b(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"insertBefore",this).call(this,w,T);else{var P=T==null?this.length():T.offset(this),A=this.split(P);A.parent.insertBefore(w,A)}}},{key:"optimize",value:function(w){b(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"optimize",this).call(this,w);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(w){if(w.statics.blotName!==this.statics.blotName){var T=y.default.create(this.statics.defaultChild);w.moveChildren(T),this.appendChild(T)}b(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"replace",this).call(this,w)}}]),s}(n.default);c.blotName="list",c.scope=y.default.Scope.BLOCK_BLOT,c.tagName=["OL","UL"],c.defaultChild="list-item",c.allowedChildren=[i],p.ListItem=i,p.default=c},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=d(56),b=O(E);function O(n){return n&&n.__esModule?n:{default:n}}function y(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function g(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function h(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var o=function(n){h(e,n);function e(){return y(this,e),g(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return e}(b.default);o.blotName="italic",o.tagName=["EM","I"],p.default=o},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r-1?t?this.domNode.setAttribute(c,t):this.domNode.removeAttribute(c):b(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,c,t)}}],[{key:"create",value:function(c){var t=b(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,c);return typeof c=="string"&&t.setAttribute("src",this.sanitize(c)),t}},{key:"formats",value:function(c){return f.reduce(function(t,s){return c.hasAttribute(s)&&(t[s]=c.getAttribute(s)),t},{})}},{key:"match",value:function(c){return/\.(jpe?g|gif|png)$/.test(c)||/^data:image\/.+;base64/.test(c)}},{key:"sanitize",value:function(c){return(0,g.sanitize)(c,["http","https","data"])?c:"//:0"}},{key:"value",value:function(c){return c.getAttribute("src")}}]),r}(y.default.Embed);a.blotName="image",a.tagName="IMG",p.default=a},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function u(r,i){for(var c=0;c-1?t?this.domNode.setAttribute(c,t):this.domNode.removeAttribute(c):b(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,c,t)}}],[{key:"create",value:function(c){var t=b(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,c);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen",!0),t.setAttribute("src",this.sanitize(c)),t}},{key:"formats",value:function(c){return f.reduce(function(t,s){return c.hasAttribute(s)&&(t[s]=c.getAttribute(s)),t},{})}},{key:"sanitize",value:function(c){return g.default.sanitize(c)}},{key:"value",value:function(c){return c.getAttribute("src")}}]),r}(O.BlockEmbed);a.blotName="video",a.className="ql-video",a.tagName="IFRAME",p.default=a},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.FormulaBlot=void 0;var E=function(){function c(t,s){for(var k=0;k0||this.cachedText==null)&&(this.domNode.innerHTML=P(A),this.domNode.normalize(),this.attach()),this.cachedText=A)}}]),w}(f.default);c.className="ql-syntax";var t=new y.default.Attributor.Class("token","hljs",{scope:y.default.Scope.INLINE}),s=function(k){i(w,k),E(w,null,[{key:"register",value:function(){h.default.register(t,!0),h.default.register(c,!0)}}]);function w(T,P){u(this,w);var A=r(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T,P));if(typeof A.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var v=null;return A.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(v),v=setTimeout(function(){A.highlight(),v=null},A.options.interval)}),A.highlight(),A}return E(w,[{key:"highlight",value:function(){var P=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var A=this.quill.getSelection();this.quill.scroll.descendants(c).forEach(function(v){v.highlight(P.options.highlight)}),this.quill.update(h.default.sources.SILENT),A!=null&&this.quill.setSelection(A,h.default.sources.SILENT)}}}]),w}(n.default);s.DEFAULTS={highlight:function(){return window.hljs==null?null:function(k){var w=window.hljs.highlightAuto(k);return w.value}}(),interval:1e3},p.CodeBlock=c,p.CodeToken=t,p.default=s},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p,d){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.BubbleTooltip=void 0;var E=function w(T,P,A){T===null&&(T=Function.prototype);var v=Object.getOwnPropertyDescriptor(T,P);if(v===void 0){var _=Object.getPrototypeOf(T);return _===null?void 0:w(_,P,A)}else{if("value"in v)return v.value;var N=v.get;return N===void 0?void 0:N.call(A)}},b=function(){function w(T,P){for(var A=0;A0&&D===h.default.sources.USER){v.show(),v.root.style.left="0px",v.root.style.width="",v.root.style.width=v.root.offsetWidth+"px";var z=v.quill.getLines(N.index,N.length);if(z.length===1)v.position(v.quill.getBounds(N));else{var K=z[z.length-1],Y=v.quill.getIndex(K),H=Math.min(K.length()-1,N.index+N.length-Y),j=v.quill.getBounds(new e.Range(Y,H));v.position(j)}}else document.activeElement!==v.textbox&&v.quill.hasFocus()&&v.hide()}),v}return b(T,[{key:"listen",value:function(){var A=this;E(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){A.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!A.root.classList.contains("ql-hidden")){var v=A.quill.getSelection();v!=null&&A.position(A.quill.getBounds(v))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(A){var v=E(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,A),_=this.root.querySelector(".ql-tooltip-arrow");if(_.style.marginLeft="",v===0)return v;_.style.marginLeft=-1*v-_.offsetWidth/2+"px"}}]),T}(o.BaseTooltip);k.TEMPLATE=['','
','','',"
"].join(""),p.BubbleTooltip=k,p.default=s},function(m,p,d){m.exports=d(63)}]).default})})(rr);var Dr=rr.exports;const Bn=tr(Dr);var zt=-1,Ct=1,It=0;function Se(R,U,m,p){if(R===U)return R?[[It,R]]:[];if(m!=null){var d=Hr(R,U,m);if(d)return d}var E=zn(R,U),b=R.substring(0,E);R=R.substring(E),U=U.substring(E),E=Kn(R,U);var O=R.substring(R.length-E);R=R.substring(0,R.length-E),U=U.substring(0,U.length-E);var y=Br(R,U);return b&&y.unshift([It,b]),O&&y.push([It,O]),ir(y,p),y}function Br(R,U){var m;if(!R)return[[Ct,U]];if(!U)return[[zt,R]];var p=R.length>U.length?R:U,d=R.length>U.length?U:R,E=p.indexOf(d);if(E!==-1)return m=[[Ct,p.substring(0,E)],[It,d],[Ct,p.substring(E+d.length)]],R.length>U.length&&(m[0][0]=m[2][0]=zt),m;if(d.length===1)return[[zt,R],[Ct,U]];var b=Fr(R,U);if(b){var O=b[0],y=b[1],g=b[2],h=b[3],o=b[4],n=Se(O,g),e=Se(y,h);return n.concat([[It,o]],e)}return Cr(R,U)}function Cr(R,U){for(var m=R.length,p=U.length,d=Math.ceil((m+p)/2),E=d,b=2*d,O=new Array(b),y=new Array(b),g=0;gm)e+=2;else if(t>p)n+=2;else if(o){var s=E+h-r;if(s>=0&&s=k)return Yn(R,U,c,t)}}}for(var w=-u+f;w<=u-a;w+=2){var s=E+w,k;w===-u||w!==u&&y[s-1]m)a+=2;else if(T>p)f+=2;else if(!o){var i=E+h-w;if(i>=0&&i=k)return Yn(R,U,c,t)}}}}return[[zt,R],[Ct,U]]}function Yn(R,U,m,p){var d=R.substring(0,m),E=U.substring(0,p),b=R.substring(m),O=U.substring(p),y=Se(d,E),g=Se(b,O);return y.concat(g)}function zn(R,U){if(!R||!U||R.charAt(0)!==U.charAt(0))return 0;for(var m=0,p=Math.min(R.length,U.length),d=p,E=0;mU.length?R:U,p=R.length>U.length?U:R;if(m.length<4||p.length*2=e.length?[c,t,s,k,i]:null}var E=d(m,p,Math.ceil(m.length/4)),b=d(m,p,Math.ceil(m.length/2)),O;if(!E&&!b)return null;b?E?O=E[4].length>b[4].length?E:b:O=b:O=E;var y,g,h,o;R.length>U.length?(y=O[0],g=O[1],h=O[2],o=O[3]):(h=O[0],o=O[1],y=O[2],g=O[3]);var n=O[4];return[y,g,h,o,n]}function ir(R,U){R.push([It,""]);for(var m=0,p=0,d=0,E="",b="",O;m=0&&ur(R[y][1])){var g=R[y][1].slice(-1);if(R[y][1]=R[y][1].slice(0,-1),E=g+E,b=g+b,!R[y][1]){R.splice(y,1),m--;var h=y-1;R[h]&&R[h][0]===Ct&&(d++,b=R[h][1]+b,h--),R[h]&&R[h][0]===zt&&(p++,E=R[h][1]+E,h--),y=h}}if(lr(R[m][1])){var g=R[m][1].charAt(0);R[m][1]=R[m][1].slice(1),E+=g,b+=g}}if(m0||b.length>0){E.length>0&&b.length>0&&(O=zn(b,E),O!==0&&(y>=0?R[y][1]+=b.substring(0,O):(R.splice(0,0,[It,b.substring(0,O)]),m++),b=b.substring(O),E=E.substring(O)),O=Kn(b,E),O!==0&&(R[m][1]=b.substring(b.length-O)+R[m][1],b=b.substring(0,b.length-O),E=E.substring(0,E.length-O)));var o=d+p;E.length===0&&b.length===0?(R.splice(m-o,o),m=m-o):E.length===0?(R.splice(m-o,o,[Ct,b]),m=m-o+1):b.length===0?(R.splice(m-o,o,[zt,E]),m=m-o+1):(R.splice(m-o,o,[zt,E],[Ct,b]),m=m-o+2)}m!==0&&R[m-1][0]===It?(R[m-1][1]+=R[m][1],R.splice(m,1)):m++,d=0,p=0,E="",b="";break}}R[R.length-1][1]===""&&R.pop();var n=!1;for(m=1;m=55296&&R<=56319}function ar(R){return R>=56320&&R<=57343}function lr(R){return ar(R.charCodeAt(0))}function ur(R){return or(R.charCodeAt(R.length-1))}function Ur(R){for(var U=[],m=0;m0&&U.push(R[m]);return U}function Cn(R,U,m,p){return ur(R)||lr(p)?null:Ur([[It,R],[zt,U],[Ct,m],[It,p]])}function Hr(R,U,m){var p=typeof m=="number"?{index:m,length:0}:m.oldRange,d=typeof m=="number"?null:m.newRange,E=R.length,b=U.length;if(p.length===0&&(d===null||d.length===0)){var O=p.index,y=R.slice(0,O),g=R.slice(O),h=d?d.index:null;t:{var o=O+b-E;if(h!==null&&h!==o||o<0||o>b)break t;var n=U.slice(0,o),e=U.slice(o);if(e!==g)break t;var f=Math.min(O,o),a=y.slice(0,f),u=n.slice(0,f);if(a!==u)break t;var r=y.slice(f),i=n.slice(f);return Cn(a,r,i,g)}t:{if(h!==null&&h!==O)break t;var c=O,n=U.slice(0,c),e=U.slice(c);if(n!==y)break t;var t=Math.min(E-c,b-c),s=g.slice(g.length-t),k=e.slice(e.length-t);if(s!==k)break t;var r=g.slice(0,g.length-t),i=e.slice(0,e.length-t);return Cn(y,r,i,s)}}if(p.length>0&&d&&d.length===0)t:{var a=R.slice(0,p.index),s=R.slice(p.index+p.length),f=a.length,t=s.length;if(b-1}function ln(l,x){var B=this.__data__,Z=se(B,l);return Z<0?B.push([l,x]):B[Z][1]=x,this}At.prototype.clear=nn,At.prototype.delete=rn,At.prototype.get=on,At.prototype.has=an,At.prototype.set=ln;function St(l){var x=-1,B=l?l.length:0;for(this.clear();++x-1&&l%1==0&&l-1&&l%1==0&&l<=d}function Ht(l){var x=typeof l;return!!l&&(x=="object"||x=="function")}function He(l){return!!l&&typeof l=="object"}function Te(l){return he(l)?ue(l):En(l)}function In(){return[]}function Mn(){return!1}R.exports=Be})(We,We.exports);var sr=We.exports,Ye={exports:{}};Ye.exports;(function(R,U){var m=200,p="__lodash_hash_undefined__",d=1,E=2,b=9007199254740991,O="[object Arguments]",y="[object Array]",g="[object AsyncFunction]",h="[object Boolean]",o="[object Date]",n="[object Error]",e="[object Function]",f="[object GeneratorFunction]",a="[object Map]",u="[object Number]",r="[object Null]",i="[object Object]",c="[object Promise]",t="[object Proxy]",s="[object RegExp]",k="[object Set]",w="[object String]",T="[object Symbol]",P="[object Undefined]",A="[object WeakMap]",v="[object ArrayBuffer]",_="[object DataView]",N="[object Float32Array]",q="[object Float64Array]",D="[object Int8Array]",z="[object Int16Array]",K="[object Int32Array]",Y="[object Uint8Array]",H="[object Uint8ClampedArray]",j="[object Uint16Array]",S="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,C={};C[N]=C[q]=C[D]=C[z]=C[K]=C[Y]=C[H]=C[j]=C[S]=!0,C[O]=C[y]=C[v]=C[h]=C[_]=C[o]=C[n]=C[e]=C[a]=C[u]=C[i]=C[s]=C[k]=C[w]=C[A]=!1;var L=typeof kt=="object"&&kt&&kt.Object===Object&&kt,F=typeof self=="object"&&self&&self.Object===Object&&self,V=L||F||Function("return this")(),G=U&&!U.nodeType&&U,X=G&&!0&&R&&!R.nodeType&&R,nt=X&&X.exports===G,it=nt&&L.process,at=function(){try{return it&&it.binding&&it.binding("util")}catch{}}(),ft=at&&at.isTypedArray;function ht(l,x){for(var B=-1,Z=l==null?0:l.length,ut=0,rt=[];++B-1}function hn(l,x){var B=this.__data__,Z=fe(B,l);return Z<0?(++this.size,B.push([l,x])):B[Z][1]=x,this}St.prototype.clear=un,St.prototype.delete=sn,St.prototype.get=fn,St.prototype.has=cn,St.prototype.set=hn;function Rt(l){var x=-1,B=l==null?0:l.length;for(this.clear();++xvt))return!1;var yt=rt.get(l);if(yt&&rt.get(x))return yt==x;var xt=-1,jt=!0,_t=B&E?new ue:void 0;for(rt.set(l,x),rt.set(x,l);++xt-1&&l%1==0&&l-1&&l%1==0&&l<=b}function Ue(l){var x=typeof l;return l!=null&&(x=="object"||x=="function")}function Ht(l){return l!=null&&typeof l=="object"}var He=ft?Q(ft):Tn;function Te(l){return Ae(l)?En(l):kn(l)}function In(){return[]}function Mn(){return!1}R.exports=jn})(Ye,Ye.exports);var fr=Ye.exports,$n={},cr=kt&&kt.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty($n,"__esModule",{value:!0});var Kr=cr(sr),$r=cr(fr),Hn;(function(R){function U(E,b,O){E===void 0&&(E={}),b===void 0&&(b={}),typeof E!="object"&&(E={}),typeof b!="object"&&(b={});var y=Kr.default(b);O||(y=Object.keys(y).reduce(function(h,o){return y[o]!=null&&(h[o]=y[o]),h},{}));for(var g in E)E[g]!==void 0&&b[g]===void 0&&(y[g]=E[g]);return Object.keys(y).length>0?y:void 0}R.compose=U;function m(E,b){E===void 0&&(E={}),b===void 0&&(b={}),typeof E!="object"&&(E={}),typeof b!="object"&&(b={});var O=Object.keys(E).concat(Object.keys(b)).reduce(function(y,g){return $r.default(E[g],b[g])||(y[g]=b[g]===void 0?null:b[g]),y},{});return Object.keys(O).length>0?O:void 0}R.diff=m;function p(E,b){E===void 0&&(E={}),b===void 0&&(b={}),E=E||{};var O=Object.keys(b).reduce(function(y,g){return b[g]!==E[g]&&E[g]!==void 0&&(y[g]=b[g]),y},{});return Object.keys(E).reduce(function(y,g){return E[g]!==b[g]&&b[g]===void 0&&(y[g]=null),y},O)}R.invert=p;function d(E,b,O){if(O===void 0&&(O=!1),typeof E!="object")return b;if(typeof b=="object"){if(!O)return b;var y=Object.keys(b).reduce(function(g,h){return E[h]===void 0&&(g[h]=b[h]),g},{});return Object.keys(y).length>0?y:void 0}}R.transform=d})(Hn||(Hn={}));$n.default=Hn;var $e={},Ve={},Qn;function Vr(){if(Qn)return Ve;Qn=1;var R=kt&&kt.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Ve,"__esModule",{value:!0});var U=R(hr()),m=function(){function p(d){this.ops=d,this.index=0,this.offset=0}return p.prototype.hasNext=function(){return this.peekLength()<1/0},p.prototype.next=function(d){d||(d=1/0);var E=this.ops[this.index];if(E){var b=this.offset,O=U.default.length(E);if(d>=O-b?(d=O-b,this.index+=1,this.offset=0):this.offset+=d,typeof E.delete=="number")return{delete:d};var y={};return E.attributes&&(y.attributes=E.attributes),typeof E.retain=="number"?y.retain=d:typeof E.insert=="string"?y.insert=E.insert.substr(b,d):y.insert=E.insert,y}else return{retain:1/0}},p.prototype.peek=function(){return this.ops[this.index]},p.prototype.peekLength=function(){return this.ops[this.index]?U.default.length(this.ops[this.index])-this.offset:1/0},p.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"},p.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var d=this.offset,E=this.index,b=this.next(),O=this.ops.slice(this.index);return this.offset=d,this.index=E,[b].concat(O)}else return[]},p}();return Ve.default=m,Ve}var Xn;function hr(){if(Xn)return $e;Xn=1;var R=kt&&kt.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty($e,"__esModule",{value:!0});var U=R(Vr()),m;return function(p){function d(b){return new U.default(b)}p.iterator=d;function E(b){return typeof b.delete=="number"?b.delete:typeof b.retain=="number"?b.retain:typeof b.insert=="string"?b.insert.length:1}p.length=E}(m||(m={})),$e.default=m,$e}var xe=kt&&kt.__importDefault||function(R){return R&&R.__esModule?R:{default:R}},Ge=xe(zr),Gr=xe(sr),Fn=xe(fr),Ne=xe($n),Tt=xe(hr()),Zr=String.fromCharCode(0),Wr=function(){function R(U){Array.isArray(U)?this.ops=U:U!=null&&Array.isArray(U.ops)?this.ops=U.ops:this.ops=[]}return R.prototype.insert=function(U,m){var p={};return typeof U=="string"&&U.length===0?this:(p.insert=U,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(p.attributes=m),this.push(p))},R.prototype.delete=function(U){return U<=0?this:this.push({delete:U})},R.prototype.retain=function(U,m){if(U<=0)return this;var p={retain:U};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(p.attributes=m),this.push(p)},R.prototype.push=function(U){var m=this.ops.length,p=this.ops[m-1];if(U=Gr.default(U),typeof p=="object"){if(typeof U.delete=="number"&&typeof p.delete=="number")return this.ops[m-1]={delete:p.delete+U.delete},this;if(typeof p.delete=="number"&&U.insert!=null&&(m-=1,p=this.ops[m-1],typeof p!="object"))return this.ops.unshift(U),this;if(Fn.default(U.attributes,p.attributes)){if(typeof U.insert=="string"&&typeof p.insert=="string")return this.ops[m-1]={insert:p.insert+U.insert},typeof U.attributes=="object"&&(this.ops[m-1].attributes=U.attributes),this;if(typeof U.retain=="number"&&typeof p.retain=="number")return this.ops[m-1]={retain:p.retain+U.retain},typeof U.attributes=="object"&&(this.ops[m-1].attributes=U.attributes),this}}return m===this.ops.length?this.ops.push(U):this.ops.splice(m,0,U),this},R.prototype.chop=function(){var U=this.ops[this.ops.length-1];return U&&U.retain&&!U.attributes&&this.ops.pop(),this},R.prototype.filter=function(U){return this.ops.filter(U)},R.prototype.forEach=function(U){this.ops.forEach(U)},R.prototype.map=function(U){return this.ops.map(U)},R.prototype.partition=function(U){var m=[],p=[];return this.forEach(function(d){var E=U(d)?m:p;E.push(d)}),[m,p]},R.prototype.reduce=function(U,m){return this.ops.reduce(U,m)},R.prototype.changeLength=function(){return this.reduce(function(U,m){return m.insert?U+Tt.default.length(m):m.delete?U-m.delete:U},0)},R.prototype.length=function(){return this.reduce(function(U,m){return U+Tt.default.length(m)},0)},R.prototype.slice=function(U,m){U===void 0&&(U=0),m===void 0&&(m=1/0);for(var p=[],d=Tt.default.iterator(this.ops),E=0;E0&&p.next(E.retain-b)}for(var O=new R(d);m.hasNext()||p.hasNext();)if(p.peekType()==="insert")O.push(p.next());else if(m.peekType()==="delete")O.push(m.next());else{var y=Math.min(m.peekLength(),p.peekLength()),g=m.next(y),h=p.next(y);if(typeof h.retain=="number"){var o={};typeof g.retain=="number"?o.retain=y:o.insert=g.insert;var n=Ne.default.compose(g.attributes,h.attributes,typeof g.retain=="number");if(n&&(o.attributes=n),O.push(o),!p.hasNext()&&Fn.default(O.ops[O.ops.length-1],o)){var e=new R(m.rest());return O.concat(e).chop()}}else typeof h.delete=="number"&&typeof g.retain=="number"&&O.push(h)}return O.chop()},R.prototype.concat=function(U){var m=new R(this.ops.slice());return U.ops.length>0&&(m.push(U.ops[0]),m.ops=m.ops.concat(U.ops.slice(1))),m},R.prototype.diff=function(U,m){if(this.ops===U.ops)return new R;var p=[this,U].map(function(y){return y.map(function(g){if(g.insert!=null)return typeof g.insert=="string"?g.insert:Zr;var h=y===U?"on":"with";throw new Error("diff() called "+h+" non-document")}).join("")}),d=new R,E=Ge.default(p[0],p[1],m),b=Tt.default.iterator(this.ops),O=Tt.default.iterator(U.ops);return E.forEach(function(y){for(var g=y[1].length;g>0;){var h=0;switch(y[0]){case Ge.default.INSERT:h=Math.min(O.peekLength(),g),d.push(O.next(h));break;case Ge.default.DELETE:h=Math.min(g,b.peekLength()),b.next(h),d.delete(h);break;case Ge.default.EQUAL:h=Math.min(b.peekLength(),O.peekLength(),g);var o=b.next(h),n=O.next(h);Fn.default(o.insert,n.insert)?d.retain(h,Ne.default.diff(o.attributes,n.attributes)):d.push(n).delete(h);break}g-=h}}),d.chop()},R.prototype.eachLine=function(U,m){m===void 0&&(m=` `);for(var p=Tt.default.iterator(this.ops),d=new R,E=0;p.hasNext();){if(p.peekType()!=="insert")return;var b=p.peek(),O=Tt.default.length(b)-p.peekLength(),y=typeof b.insert=="string"?b.insert.indexOf(m,O)-O:-1;if(y<0)d.push(p.next());else if(y>0)d.push(p.next(y));else{if(U(d,p.next(1).attributes||{},E)===!1)return;E+=1,d=new R}}d.length()>0&&U(d,{},E)},R.prototype.invert=function(U){var m=new R;return this.reduce(function(p,d){if(d.insert)m.delete(Tt.default.length(d));else{if(d.retain&&d.attributes==null)return m.retain(d.retain),p+d.retain;if(d.delete||d.retain&&d.attributes){var E=d.delete||d.retain,b=U.slice(p,p+E);return b.forEach(function(O){d.delete?m.push(O):d.retain&&d.attributes&&m.retain(Tt.default.length(O),Ne.default.invert(d.attributes,O.attributes))}),p+E}}return p},0),m.chop()},R.prototype.transform=function(U,m){if(m===void 0&&(m=!1),m=!!m,typeof U=="number")return this.transformPosition(U,m);for(var p=U,d=Tt.default.iterator(this.ops),E=Tt.default.iterator(p.ops),b=new R;d.hasNext()||E.hasNext();)if(d.peekType()==="insert"&&(m||E.peekType()!=="insert"))b.retain(Tt.default.length(d.next()));else if(E.peekType()==="insert")b.push(E.next());else{var O=Math.min(d.peekLength(),E.peekLength()),y=d.next(O),g=E.next(O);if(y.delete)continue;g.delete?b.push(g):b.retain(O,Ne.default.transform(y.attributes,g.attributes,m))}return b.chop()},R.prototype.transformPosition=function(U,m){m===void 0&&(m=!1),m=!!m;for(var p=Tt.default.iterator(this.ops),d=0;p.hasNext()&&d<=U;){var E=p.peekLength(),b=p.peekType();if(p.next(),b==="delete"){U-=Math.min(E,U-d);continue}else b==="insert"&&(d["delta","html","text"].includes(R)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:R=>["snow","bubble",""].includes(R)},toolbar:{type:[String,Array,Object],required:!1,validator:R=>typeof R=="string"&&R!==""?R.charAt(0)==="#"?!0:Object.keys(Jn).indexOf(R)!==-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:(R,U)=>{nr(()=>{E()}),dr(()=>{m=null});let m,p;const d=Zt(),E=()=>{var v;if(d.value){if(p=b(),R.modules)if(Array.isArray(R.modules))for(const _ of R.modules)Bn.register(`modules/${_.name}`,_.module);else Bn.register(`modules/${R.modules.name}`,R.modules.module);m=new Bn(d.value,p),c(R.content),m.on("text-change",o),m.on("selection-change",e),m.on("editor-change",f),R.theme!=="bubble"&&d.value.classList.remove("ql-bubble"),R.theme!=="snow"&&d.value.classList.remove("ql-snow"),(v=m.getModule("toolbar"))===null||v===void 0||v.container.addEventListener("mousedown",_=>{_.preventDefault()}),U.emit("ready",m)}},b=()=>{const v={};if(R.theme!==""&&(v.theme=R.theme),R.readOnly&&(v.readOnly=R.readOnly),R.placeholder&&(v.placeholder=R.placeholder),R.toolbar&&R.toolbar!==""&&(v.modules={toolbar:(()=>{if(typeof R.toolbar=="object")return R.toolbar;if(typeof R.toolbar=="string")return R.toolbar.charAt(0)==="#"?R.toolbar:Jn[R.toolbar]})()}),R.modules){const _=(()=>{var N,q;const D={};if(Array.isArray(R.modules))for(const z of R.modules)D[z.name]=(N=z.options)!==null&&N!==void 0?N:{};else D[R.modules.name]=(q=R.modules.options)!==null&&q!==void 0?q:{};return D})();v.modules=Object.assign({},v.modules,_)}return Object.assign({},R.globalOptions,R.options,v)},O=v=>typeof v=="object"&&v?v.slice():v,y=v=>Object.values(v.ops).some(_=>!_.retain||Object.keys(_).length!==1);let g;const h=v=>{if(typeof g==typeof v){if(v===g)return!0;if(typeof v=="object"&&v&&typeof g=="object"&&g)return!y(g.diff(v))}return!1},o=(v,_,N)=>{g=O(i()),h(R.content)||U.emit("update:content",g),U.emit("textChange",{delta:v,oldContents:_,source:N})},n=Zt(),e=(v,_,N)=>{n.value=!!(m!=null&&m.hasFocus()),U.emit("selectionChange",{range:v,oldRange:_,source:N})};Ze(n,v=>{v?U.emit("focus",d):U.emit("blur",d)});const f=(...v)=>{v[0]==="text-change"&&U.emit("editorChange",{name:v[0],delta:v[1],oldContents:v[2],source:v[3]}),v[0]==="selection-change"&&U.emit("editorChange",{name:v[0],range:v[1],oldRange:v[2],source:v[3]})},a=()=>d.value,u=()=>{var v;return(v=m==null?void 0:m.getModule("toolbar"))===null||v===void 0?void 0:v.container},r=()=>{if(m)return m;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.`},i=(v,_)=>R.contentType==="html"?k():R.contentType==="text"?t(v,_):m==null?void 0:m.getContents(v,_),c=(v,_="api")=>{const N=v||(R.contentType==="delta"?new Qr:"");R.contentType==="html"?w(N):R.contentType==="text"?s(N,_):m==null||m.setContents(N,_),g=O(N)},t=(v,_)=>{var N;return(N=m==null?void 0:m.getText(v,_))!==null&&N!==void 0?N:""},s=(v,_="api")=>{m==null||m.setText(v,_)},k=()=>{var v;return(v=m==null?void 0:m.root.innerHTML)!==null&&v!==void 0?v:""},w=v=>{m&&(m.root.innerHTML=v)},T=(v,_="api")=>{const N=m==null?void 0:m.clipboard.convert(v);N&&(m==null||m.setContents(N,_))},P=()=>{m==null||m.focus()},A=()=>{Un(()=>{var v;!U.slots.toolbar&&m&&((v=m.getModule("toolbar"))===null||v===void 0||v.container.remove()),E()})};return Ze(()=>R.content,v=>{if(!m||!v||h(v))return;const _=m.getSelection();_&&Un(()=>m==null?void 0:m.setSelection(_)),c(v)},{deep:!0}),Ze(()=>R.enable,v=>{m&&m.enable(v)}),{editor:d,getEditor:a,getToolbar:u,getQuill:r,getContents:i,setContents:c,getHTML:k,setHTML:w,pasteHTML:T,focus:P,getText:t,setText:s,reinit:A}},render(){var R,U;return[(U=(R=this.$slots).toolbar)===null||U===void 0?void 0:U.call(R),vr("div",{ref:"editor",...this.$attrs})]}});const Jr={style:{padding:"10px"}},ti={key:0},ei={key:1},ni=["onClick"],ri={class:"editor"},ii=er({__name:"notice",setup(R){const U=Zt(""),m=Zt(null),d=Zt({theme:"bubble",modules:{toolbar:{container:[["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{align:[]}],[{size:["small",!1,"large","huge"]}],[{font:[]}],[{header:[1,2,3,4,5,6,!1]}],[{direction:"ltl"}],[{direction:"rtl"}],[{indent:"-1"},{indent:"+1"}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],["blockquote","code-block"],["clean"],["link","image","video"]],handlers:{image:()=>{const t=document.createElement("input");t.setAttribute("type","file"),t.setAttribute("accept","image/*"),t.click(),t.onchange=async()=>{const s=t.files?t.files[0]:null;if(s){const k=new FormData;k.append("file",s);try{const w=await Sr(k),T=xr(m.value).getQuill();if(T){const P=T.getSelection(!0);T.insertEmbed(P.index,"image",w.data.fullurl)}}catch{alert("图片上传失败")}}}}}}}}),E=[{Choice:".ql-insertMetric",title:"跳转配置"},{Choice:".ql-bold",title:"加粗"},{Choice:".ql-italic",title:"斜体"},{Choice:".ql-underline",title:"下划线"},{Choice:".ql-header",title:"段落格式"},{Choice:".ql-strike",title:"删除线"},{Choice:".ql-blockquote",title:"块引用"},{Choice:".ql-code",title:"插入代码"},{Choice:".ql-code-block",title:"插入代码段"},{Choice:".ql-font",title:"字体"},{Choice:".ql-size",title:"字体大小"},{Choice:'.ql-list[value="ordered"]',title:"编号列表"},{Choice:'.ql-list[value="bullet"]',title:"项目列表"},{Choice:".ql-direction",title:"文本方向"},{Choice:'.ql-header[value="1"]',title:"h1"},{Choice:'.ql-header[value="2"]',title:"h2"},{Choice:".ql-align",title:"对齐方式"},{Choice:".ql-color",title:"字体颜色"},{Choice:".ql-background",title:"背景颜色"},{Choice:".ql-image",title:"图像"},{Choice:".ql-video",title:"视频"},{Choice:".ql-link",title:"添加链接"},{Choice:".ql-formula",title:"插入公式"},{Choice:".ql-clean",title:"清除字体格式"},{Choice:'.ql-script[value="sub"]',title:"下标"},{Choice:'.ql-script[value="super"]',title:"上标"},{Choice:'.ql-indent[value="-1"]',title:"向左缩进"},{Choice:'.ql-indent[value="+1"]',title:"向右缩进"},{Choice:".ql-header .ql-picker-label",title:"标题大小"},{Choice:'.ql-header .ql-picker-item[data-value="1"]',title:"标题一"},{Choice:'.ql-header .ql-picker-item[data-value="2"]',title:"标题二"},{Choice:'.ql-header .ql-picker-item[data-value="3"]',title:"标题三"},{Choice:'.ql-header .ql-picker-item[data-value="4"]',title:"标题四"},{Choice:'.ql-header .ql-picker-item[data-value="5"]',title:"标题五"},{Choice:'.ql-header .ql-picker-item[data-value="6"]',title:"标题六"},{Choice:".ql-header .ql-picker-item:last-child",title:"标准"},{Choice:'.ql-size .ql-picker-item[data-value="small"]',title:"小号"},{Choice:'.ql-size .ql-picker-item[data-value="large"]',title:"大号"},{Choice:'.ql-size .ql-picker-item[data-value="huge"]',title:"超大号"},{Choice:".ql-size .ql-picker-item:nth-child(2)",title:"标准"},{Choice:".ql-align .ql-picker-item:first-child",title:"居左对齐"},{Choice:'.ql-align .ql-picker-item[data-value="center"]',title:"居中对齐"},{Choice:'.ql-align .ql-picker-item[data-value="right"]',title:"居右对齐"},{Choice:'.ql-align .ql-picker-item[data-value="justify"]',title:"两端对齐"}],b=()=>{for(let t of E){let s=document.querySelector(".editor "+t.Choice);s&&s.setAttribute("title",t.title)}},O=t=>{t.preventDefault();const s=t.clipboardData;if(!s)return;s.types.includes("Files")&&Array.from(s.files).forEach(w=>{})},y=t=>{n.current=t.current,n.limit=t.limit,a()},g=Zt([]),h=Zt(!1),o=Zt(1),n=Gn({current:1,limit:10,total:1}),e=Gn({title:"",author:"",content:"",status:1});nr(()=>{a(),Un(()=>{m.value&&m.value.getQuill()&&(b(),m.value.getQuill().root.addEventListener("paste",O,!1))})});const f=()=>{e.id=void 0,e.title="",e.author="",e.content="",U.value="",e.status=1,o.value=1,h.value=!0},a=()=>{pr({page:n.current,size:n.limit}).then(t=>{t.code==1?(g.value=t.data.data,n.total=t.data.count):Qt.msg(t.msg,{icon:2})})},u=t=>{h.value=!0,e.id=t.id,e.title=t.title,e.author=t.author,e.content=t.content,U.value=t.content,e.status=parseInt(t.status.toString()),o.value=2};Ze(U,t=>{e.content=t});const r=async t=>{const s=await br({id:t.id});s.code==1?(Qt.msg("删除成功!",{icon:1}),a()):Qt.msg(s.msg,{icon:2})},i=[{title:"公告标题",width:"180px",key:"title"},{title:"作者",width:"120px",key:"author"},{title:"公告内容",width:"280px",key:"content",ellipsisTooltip:!0},{title:"发布时间",width:"180px",key:"createtime"},{title:"状态",width:"100px",customSlot:"status",key:"status"},{title:"操作",width:"120px",customSlot:"operator",key:"operator",align:"center",fixed:"right"}],c=Zt([{text:"确认",callback:async()=>{if(e.title==""){Qt.msg("公告标题不能为空!",{icon:2});return}if(e.author==""){Qt.msg("作者不能为空!",{icon:2});return}if(e.content==""){Qt.msg("公告内容不能为空!",{icon:2});return}const t=o.value==1?await _r(e):await Or(e);t.code==1?(Qt.msg("提交成功!",{icon:1}),h.value=!1,a()):Qt.msg(t.msg,{icon:2})}},{text:"取消",callback:()=>{h.value=!1}}]);return(t,s)=>{const k=Er,w=Ir,T=jr,P=Rr,A=Lr,v=Ar,_=wr,N=Tr,q=kr,D=Mr,z=qr,K=Nr;return Dn(),yr(z,{style:{padding:"20px"}},{default:Lt(()=>[Ot(A,null,{default:Lt(()=>[ke("div",Jr,[s[7]||(s[7]=ke("span",{style:{"font-size":"18px","vertical-align":"center","margin-right":"20px"}},"通知公告",-1)),Ot(k,{type:"primary",onClick:s[0]||(s[0]=Y=>f()),size:"sm"},{default:Lt(()=>s[6]||(s[6]=[gr("新增公告")])),_:1})]),Ot(P,{page:n,height:"600px",size:"lg",onChange:y,columns:i,"data-source":g.value},{status:Lt(({data:Y})=>[Y.status==1?(Dn(),Zn("span",ti,"已发布")):Wn("",!0),Y.status==0?(Dn(),Zn("span",ei,"已隐藏")):Wn("",!0)]),operator:Lt(({data:Y})=>[Ot(T,{size:"lg"},{default:Lt(()=>[ke("span",{style:{color:"#00A394",cursor:"pointer"},onClick:H=>u(Y)},"编辑",8,ni),Ot(w,{trigger:"click",content:"确定要删除吗?",onConfirm:H=>r(Y)},{default:Lt(()=>s[8]||(s[8]=[ke("span",{style:{color:"#00A394",cursor:"pointer"}},"删除",-1)])),_:2},1032,["onConfirm"])]),_:2},1024)]),_:1},8,["page","data-source"])]),_:1}),Ot(K,{modelValue:h.value,"onUpdate:modelValue":s[5]||(s[5]=Y=>h.value=Y),title:o.value==1?"新增公告":"编辑公告",type:4,shade:!0,area:["950px","100%"],btn:c.value},{default:Lt(()=>[Ot(z,{fluid:"true",style:{padding:"20px"}},{default:Lt(()=>[Ot(D,{model:e},{default:Lt(()=>[Ot(_,{required:"",label:"公告标题",prop:"title"},{default:Lt(()=>[Ot(v,{modelValue:e.title,"onUpdate:modelValue":s[1]||(s[1]=Y=>e.title=Y),placeholder:"请输入公告标题"},null,8,["modelValue"])]),_:1}),Ot(_,{required:"",label:"作者",prop:"author"},{default:Lt(()=>[Ot(v,{modelValue:e.author,"onUpdate:modelValue":s[2]||(s[2]=Y=>e.author=Y),placeholder:"请输入作者"},null,8,["modelValue"])]),_:1}),Ot(_,{required:"",label:"公告内容",prop:"content"},{default:Lt(()=>[ke("div",ri,[Ot(mr(Xr),{ref_key:"editorRef",ref:m,content:U.value,"onUpdate:content":s[3]||(s[3]=Y=>U.value=Y),options:d.value,contentType:"html"},null,8,["content","options"])])]),_:1}),Ot(_,{required:"",label:"状态",prop:"status"},{default:Lt(()=>[Ot(q,{modelValue:e.status,"onUpdate:modelValue":s[4]||(s[4]=Y=>e.status=Y),placeholder:"请选择"},{default:Lt(()=>[Ot(N,{value:0,label:"隐藏"}),Ot(N,{value:1,label:"显示"})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue","title","btn"])]),_:1})}}});const hi=Pr(ii,[["__scopeId","data-v-f637a2e3"]]);export{hi as default};