(self.webpackChunk=self.webpackChunk||[]).push([[2796],{78033:function(vt,ht,X){"use strict";X.d(ht,{Z:function(){return w}});var ot=X(52319),q=X(93236),b={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},p=b,P=X(85651),k=function(m,c){return q.createElement(P.Z,(0,ot.Z)({},m,{ref:c,icon:p}))},w=q.forwardRef(k)},17675:function(vt,ht,X){"use strict";X.d(ht,{Z:function(){return w}});var ot=X(52319),q=X(93236),b={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},p=b,P=X(85651),k=function(m,c){return q.createElement(P.Z,(0,ot.Z)({},m,{ref:c,icon:p}))},w=q.forwardRef(k)},61786:function(vt,ht,X){"use strict";var ot=X(88351),q=X(87841),b=X(93236),p=X(8263),P=X(62086),k=["fieldProps","proFieldProps"],w=["fieldProps","proFieldProps"],y="text",m=function(t){var l=t.fieldProps,o=t.proFieldProps,a=(0,q.Z)(t,k);return(0,P.jsx)(p.Z,(0,ot.Z)({valueType:y,fieldProps:l,filedConfig:{valueType:y},proFieldProps:o},a))},c=function(t){var l=t.fieldProps,o=t.proFieldProps,a=(0,q.Z)(t,w);return(0,P.jsx)(p.Z,(0,ot.Z)({valueType:"password",fieldProps:l,proFieldProps:o,filedConfig:{valueType:y}},a))},u=m;u.Password=c,u.displayName="ProFormComponent",ht.Z=u},28931:function(vt,ht,X){"use strict";X.d(ht,{Y:function(){return i}});var ot=X(99177),q=X(42700),b=X(88351),p=X(67654),P=X(87841),k=X(29320),w=X(50126),y=X(92750),m=X(72266),c=X.n(m),u=X(71639),e=X(24599),t=X(93236),l=X(19103),o=X(96630),a=X(62086),r=["children","trigger","onVisibleChange","onOpenChange","modalProps","onFinish","submitTimeout","title","width","visible","open"];function i(s){var n,f,T,g,O=s.children,x=s.trigger,v=s.onVisibleChange,h=s.onOpenChange,d=s.modalProps,E=s.onFinish,N=s.submitTimeout,R=s.title,B=s.width,C=s.visible,$=s.open,I=(0,P.Z)(s,r);(0,e.ET)(!I.footer||!(d!=null&&d.footer),"ModalForm \u662F\u4E00\u4E2A ProForm \u7684\u7279\u6B8A\u5E03\u5C40\uFF0C\u5982\u679C\u60F3\u81EA\u5B9A\u4E49\u6309\u94AE\uFF0C\u8BF7\u4F7F\u7528 submit.render \u81EA\u5B9A\u4E49\u3002");var L=(0,t.useContext)(w.ZP.ConfigContext),A=(0,t.useState)([]),S=(0,p.Z)(A,2),M=S[1],F=(0,t.useState)(!1),D=(0,p.Z)(F,2),_=D[0],j=D[1],H=(0,u.Z)(!!C,{value:$||C,onChange:h||v}),U=(0,p.Z)(H,2),W=U[0],Y=U[1],et=(0,t.useRef)(null),nt=(0,t.useCallback)(function(V){et.current===null&&V&&M([]),et.current=V},[]),rt=(0,t.useRef)(),at=(0,t.useCallback)(function(){var V,Z,J,Q=(V=(Z=I.form)!==null&&Z!==void 0?Z:(J=I.formRef)===null||J===void 0?void 0:J.current)!==null&&V!==void 0?V:rt.current;Q&&d!==null&&d!==void 0&&d.destroyOnClose&&Q.resetFields()},[d==null?void 0:d.destroyOnClose,I.form,I.formRef]);(0,t.useImperativeHandle)(I.formRef,function(){return rt.current},[rt.current]),(0,t.useEffect)(function(){W&&($||C)&&(h==null||h(!0),v==null||v(!0))},[C,$,W]);var ft=(0,t.useMemo)(function(){return x?t.cloneElement(x,(0,b.Z)((0,b.Z)({key:"trigger"},x.props),{},{onClick:function(){var V=(0,q.Z)((0,ot.Z)().mark(function J(Q){var tt,lt;return(0,ot.Z)().wrap(function(it){for(;;)switch(it.prev=it.next){case 0:Y(!W),(tt=x.props)===null||tt===void 0||(lt=tt.onClick)===null||lt===void 0||lt.call(tt,Q);case 2:case"end":return it.stop()}},J)}));function Z(J){return V.apply(this,arguments)}return Z}()})):null},[Y,x,W]),st=(0,t.useMemo)(function(){var V,Z,J,Q,tt,lt,ct,it;return I.submitter===!1?!1:c()({searchConfig:{submitText:(V=(Z=d==null?void 0:d.okText)!==null&&Z!==void 0?Z:(J=L.locale)===null||J===void 0||(Q=J.Modal)===null||Q===void 0?void 0:Q.okText)!==null&&V!==void 0?V:"\u786E\u8BA4",resetText:(tt=(lt=d==null?void 0:d.cancelText)!==null&<!==void 0?lt:(ct=L.locale)===null||ct===void 0||(it=ct.Modal)===null||it===void 0?void 0:it.cancelText)!==null&&tt!==void 0?tt:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:N?_:void 0,onClick:function(ut){var dt;Y(!1),d==null||(dt=d.onCancel)===null||dt===void 0||dt.call(d,ut)}}},I.submitter)},[(n=L.locale)===null||n===void 0||(f=n.Modal)===null||f===void 0?void 0:f.cancelText,(T=L.locale)===null||T===void 0||(g=T.Modal)===null||g===void 0?void 0:g.okText,d,I.submitter,Y,_,N]),K=(0,t.useCallback)(function(V,Z){return(0,a.jsxs)(a.Fragment,{children:[V,et.current&&Z?(0,a.jsx)(t.Fragment,{children:(0,l.createPortal)(Z,et.current)},"submitter"):Z]})},[]),z=(0,t.useCallback)(function(){var V=(0,q.Z)((0,ot.Z)().mark(function Z(J){var Q,tt,lt;return(0,ot.Z)().wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return Q=E==null?void 0:E(J),N&&Q instanceof Promise&&(j(!0),tt=setTimeout(function(){return j(!1)},N),Q.finally(function(){clearTimeout(tt),j(!1)})),it.next=4,Q;case 4:return lt=it.sent,lt&&Y(!1),it.abrupt("return",lt);case 7:case"end":return it.stop()}},Z)}));return function(Z){return V.apply(this,arguments)}}(),[E,Y,N]),G=(0,k.X)(W);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y.Z,(0,b.Z)((0,b.Z)((0,b.Z)({title:R,width:B||800},d),G),{},{onCancel:function(Z){var J;N&&_||(Y(!1),d==null||(J=d.onCancel)===null||J===void 0||J.call(d,Z))},afterClose:function(){var Z;at(),Y(!1),d==null||(Z=d.afterClose)===null||Z===void 0||Z.call(d)},footer:I.submitter!==!1?(0,a.jsx)("div",{ref:nt,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,a.jsx)(o.I,(0,b.Z)((0,b.Z)({formComponentType:"ModalForm",layout:"vertical"},I),{},{onInit:function(Z,J){var Q;I.formRef&&(I.formRef.current=J),I==null||(Q=I.onInit)===null||Q===void 0||Q.call(I,Z,J),rt.current=J},formRef:rt,submitter:st,onFinish:function(){var V=(0,q.Z)((0,ot.Z)().mark(function Z(J){var Q;return(0,ot.Z)().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return lt.next=2,z(J);case 2:return Q=lt.sent,lt.abrupt("return",Q);case 4:case"end":return lt.stop()}},Z)}));return function(Z){return V.apply(this,arguments)}}(),contentRender:K,children:O}))})),ft]})}},40882:function(vt,ht,X){"use strict";X.d(ht,{A:function(){return O}});var ot=X(88351),q=X(84974),b=X(93236),p=X(96630),P=X(5424),k=X(40749),w=X(67654),y=X(67817),m=X(71639),c=X(80128),u=X(50126),e=X(61385),t=X(84875),l=X.n(t),o=X(75986),a=X(16216),r=X(21983),i=function(v){var h;return(0,k.Z)({},v.componentCls,{"&-title":{marginBlockEnd:v.marginXL,fontWeight:"bold"},"&-container":(0,k.Z)({flexWrap:"wrap",maxWidth:"100%"},"> div".concat(v.antCls,"-space-item"),{maxWidth:"100%"}),"&-twoLine":(h={display:"block",width:"100%"},(0,k.Z)(h,"".concat(v.componentCls,"-title"),{width:"100%",margin:"8px 0"}),(0,k.Z)(h,"".concat(v.componentCls,"-container"),{paddingInlineStart:16}),(0,k.Z)(h,"".concat(v.antCls,"-space-item,").concat(v.antCls,"-form-item"),{width:"100%"}),(0,k.Z)(h,"".concat(v.antCls,"-form-item"),{"&-control":{display:"flex",alignItems:"center",justifyContent:"flex-end","&-input":{alignItems:"center",justifyContent:"flex-end","&-content":{flex:"none"}}}}),h)})};function s(x){return(0,r.Xj)("ProFormGroup",function(v){var h=(0,ot.Z)((0,ot.Z)({},v),{},{componentCls:".".concat(x)});return[i(h)]})}var n=X(62086),f=b.forwardRef(function(x,v){var h=b.useContext(o.Z),d=h.groupProps,E=(0,ot.Z)((0,ot.Z)({},d),x),N=E.children,R=E.collapsible,B=E.defaultCollapsed,C=E.style,$=E.labelLayout,I=E.title,L=I===void 0?x.label:I,A=E.tooltip,S=E.align,M=S===void 0?"start":S,F=E.direction,D=E.size,_=D===void 0?32:D,j=E.titleStyle,H=E.titleRender,U=E.spaceProps,W=E.extra,Y=E.autoFocus,et=(0,m.Z)(function(){return B||!1},{value:x.collapsed,onChange:x.onCollapse}),nt=(0,w.Z)(et,2),rt=nt[0],at=nt[1],ft=(0,b.useContext)(u.ZP.ConfigContext),st=ft.getPrefixCls,K=(0,a.zx)(x),z=K.ColWrapper,G=K.RowWrapper,V=st("pro-form-group"),Z=s(V),J=Z.wrapSSR,Q=Z.hashId,tt=R&&(0,n.jsx)(y.Z,{style:{marginInlineEnd:8},rotate:rt?void 0:90}),lt=(0,n.jsx)(c.G,{label:tt?(0,n.jsxs)("div",{children:[tt,L]}):L,tooltip:A}),ct=(0,b.useCallback)(function(yt){var mt=yt.children;return(0,n.jsx)(e.Z,(0,ot.Z)((0,ot.Z)({},U),{},{className:l()("".concat(V,"-container ").concat(Q),U==null?void 0:U.className),size:_,align:M,direction:F,style:(0,ot.Z)({rowGap:0},U==null?void 0:U.style),children:mt}))},[M,V,F,Q,_,U]),it=H?H(lt,x):lt,gt=(0,b.useMemo)(function(){var yt=[],mt=b.Children.toArray(N).map(function(pt,Et){var bt;return b.isValidElement(pt)&&pt!==null&&pt!==void 0&&(bt=pt.props)!==null&&bt!==void 0&&bt.hidden?(yt.push(pt),null):Et===0&&b.isValidElement(pt)&&Y?b.cloneElement(pt,(0,ot.Z)((0,ot.Z)({},pt.props),{},{autoFocus:Y})):pt});return[(0,n.jsx)(G,{Wrapper:ct,children:mt},"children"),yt.length>0?(0,n.jsx)("div",{style:{display:"none"},children:yt}):null]},[N,G,ct,Y]),ut=(0,w.Z)(gt,2),dt=ut[0],Ot=ut[1];return J((0,n.jsx)(z,{children:(0,n.jsxs)("div",{className:l()(V,Q,(0,k.Z)({},"".concat(V,"-twoLine"),$==="twoLine")),style:C,ref:v,children:[Ot,(L||A||W)&&(0,n.jsx)("div",{className:"".concat(V,"-title ").concat(Q).trim(),style:j,onClick:function(){at(!rt)},children:W?(0,n.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[it,(0,n.jsx)("span",{onClick:function(mt){return mt.stopPropagation()},children:W})]}):it}),(0,n.jsx)("div",{style:{display:R&&rt?"none":void 0},children:dt})]})}))});f.displayName="ProForm-Group";var T=f,g=X(9664);function O(x){return(0,n.jsx)(p.I,(0,ot.Z)({layout:"vertical",submitter:{render:function(h,d){return d.reverse()}},contentRender:function(h,d){return(0,n.jsxs)(n.Fragment,{children:[h,d]})}},x))}O.Group=T,O.useForm=q.Z.useForm,O.Item=g.Z,O.useWatch=q.Z.useWatch,O.ErrorList=q.Z.ErrorList,O.Provider=q.Z.Provider,O.useFormInstance=q.Z.useFormInstance,O.EditOrReadOnlyContext=P.A},80128:function(vt,ht,X){"use strict";X.d(ht,{G:function(){return i}});var ot=X(88351),q=X(40749),b=X(52319),p=X(93236),P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},k=P,w=X(85651),y=function(n,f){return p.createElement(w.Z,(0,b.Z)({},n,{ref:f,icon:k}))},m=p.forwardRef(y),c=X(50126),u=X(87087),e=X(84875),t=X.n(e),l=X(21983),o=function(n){return(0,q.Z)({},n.componentCls,{display:"inline-flex",alignItems:"center",maxWidth:"100%","&-icon":{display:"block",marginInlineStart:"4px",cursor:"pointer","&:hover":{color:n.colorPrimary}},"&-title":{display:"inline-flex",flex:"1"},"&-subtitle ":{marginInlineStart:8,color:n.colorTextSecondary,fontWeight:"normal",fontSize:n.fontSize,whiteSpace:"nowrap"},"&-title-ellipsis":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"keep-all"}})};function a(s){return(0,l.Xj)("LabelIconTip",function(n){var f=(0,ot.Z)((0,ot.Z)({},n),{},{componentCls:".".concat(s)});return[o(f)]})}var r=X(62086),i=p.memo(function(s){var n=s.label,f=s.tooltip,T=s.ellipsis,g=s.subTitle,O=(0,p.useContext)(c.ZP.ConfigContext),x=O.getPrefixCls,v=x("pro-core-label-tip"),h=a(v),d=h.wrapSSR,E=h.hashId;if(!f&&!g)return(0,r.jsx)(r.Fragment,{children:n});var N=typeof f=="string"||p.isValidElement(f)?{title:f}:f,R=(N==null?void 0:N.icon)||(0,r.jsx)(m,{});return d((0,r.jsxs)("div",{className:t()(v,E),onMouseDown:function(C){return C.stopPropagation()},onMouseLeave:function(C){return C.stopPropagation()},onMouseMove:function(C){return C.stopPropagation()},children:[(0,r.jsx)("div",{className:t()("".concat(v,"-title"),E,(0,q.Z)({},"".concat(v,"-title-ellipsis"),T)),children:n}),g&&(0,r.jsx)("div",{className:"".concat(v,"-subtitle ").concat(E).trim(),children:g}),f&&(0,r.jsx)(u.Z,(0,ot.Z)((0,ot.Z)({},N),{},{children:(0,r.jsx)("span",{className:"".concat(v,"-icon ").concat(E).trim(),children:R})}))]}))})},23653:function(){"use strict"},31223:function(vt,ht,X){var ot=X(6620);function q(b,p){return ot(b,p)}vt.exports=q},82270:function(vt,ht,X){var ot=X(36379).lW;(function(b,p){vt.exports=p()})(typeof self!="undefined"?self:this,function(){return function(q){var b={};function p(P){if(b[P])return b[P].exports;var k=b[P]={i:P,l:!1,exports:{}};return q[P].call(k.exports,k,k.exports,p),k.l=!0,k.exports}return p.m=q,p.c=b,p.d=function(P,k,w){p.o(P,k)||Object.defineProperty(P,k,{configurable:!1,enumerable:!0,get:w})},p.n=function(P){var k=P&&P.__esModule?function(){return P.default}:function(){return P};return p.d(k,"a",k),k},p.o=function(P,k){return Object.prototype.hasOwnProperty.call(P,k)},p.p="",p(p.s=109)}([function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=p(17),k=p(18),w=p(19),y=p(45),m=p(46),c=p(47),u=p(48),e=p(49),t=p(12),l=p(32),o=p(33),a=p(31),r=p(1),i={Scope:r.Scope,create:r.create,find:r.find,query:r.query,register:r.register,Container:P.default,Format:k.default,Leaf:w.default,Embed:u.default,Scroll:y.default,Block:c.default,Inline:m.default,Text:e.default,Attributor:{Attribute:t.default,Class:l.default,Style:o.default,Store:a.default}};b.default=i},function(q,b,p){"use strict";var P=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)i.hasOwnProperty(s)&&(r[s]=i[s])};return function(r,i){a(r,i);function s(){this.constructor=r}r.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}();Object.defineProperty(b,"__esModule",{value:!0});var k=function(a){P(r,a);function r(i){var s=this;return i="[Parchment] "+i,s=a.call(this,i)||this,s.message=i,s.name=s.constructor.name,s}return r}(Error);b.ParchmentError=k;var w={},y={},m={},c={};b.DATA_KEY="__blot";var u;(function(a){a[a.TYPE=3]="TYPE",a[a.LEVEL=12]="LEVEL",a[a.ATTRIBUTE=13]="ATTRIBUTE",a[a.BLOT=14]="BLOT",a[a.INLINE=7]="INLINE",a[a.BLOCK=11]="BLOCK",a[a.BLOCK_BLOT=10]="BLOCK_BLOT",a[a.INLINE_BLOT=6]="INLINE_BLOT",a[a.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",a[a.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",a[a.ANY=15]="ANY"})(u=b.Scope||(b.Scope={}));function e(a,r){var i=l(a);if(i==null)throw new k("Unable to create "+a+" blot");var s=i,n=a instanceof Node||a.nodeType===Node.TEXT_NODE?a:s.create(r);return new s(n,r)}b.create=e;function t(a,r){return r===void 0&&(r=!1),a==null?null:a[b.DATA_KEY]!=null?a[b.DATA_KEY].blot:r?t(a.parentNode,r):null}b.find=t;function l(a,r){r===void 0&&(r=u.ANY);var i;if(typeof a=="string")i=c[a]||w[a];else if(a instanceof Text||a.nodeType===Node.TEXT_NODE)i=c.text;else if(typeof a=="number")a&u.LEVEL&u.BLOCK?i=c.block:a&u.LEVEL&u.INLINE&&(i=c.inline);else if(a instanceof HTMLElement){var s=(a.getAttribute("class")||"").split(/\s+/);for(var n in s)if(i=y[s[n]],i)break;i=i||m[a.tagName]}return i==null?null:r&u.LEVEL&i.scope&&r&u.TYPE&i.scope?i:null}b.query=l;function o(){for(var a=[],r=0;r1)return a.map(function(n){return o(n)});var i=a[0];if(typeof i.blotName!="string"&&typeof i.attrName!="string")throw new k("Invalid definition");if(i.blotName==="abstract")throw new k("Cannot register abstract class");if(c[i.blotName||i.attrName]=i,typeof i.keyName=="string")w[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(n){return n.toUpperCase()}):i.tagName=i.tagName.toUpperCase();var s=Array.isArray(i.tagName)?i.tagName:[i.tagName];s.forEach(function(n){(m[n]==null||i.className==null)&&(m[n]=i)})}return i}b.register=o},function(q,b,p){var P=p(51),k=p(11),w=p(3),y=p(20),m=String.fromCharCode(0),c=function(u){Array.isArray(u)?this.ops=u:u!=null&&Array.isArray(u.ops)?this.ops=u.ops:this.ops=[]};c.prototype.insert=function(u,e){var t={};return u.length===0?this:(t.insert=u,e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t))},c.prototype.delete=function(u){return u<=0?this:this.push({delete:u})},c.prototype.retain=function(u,e){if(u<=0)return this;var t={retain:u};return e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t)},c.prototype.push=function(u){var e=this.ops.length,t=this.ops[e-1];if(u=w(!0,{},u),typeof t=="object"){if(typeof u.delete=="number"&&typeof t.delete=="number")return this.ops[e-1]={delete:t.delete+u.delete},this;if(typeof t.delete=="number"&&u.insert!=null&&(e-=1,t=this.ops[e-1],typeof t!="object"))return this.ops.unshift(u),this;if(k(u.attributes,t.attributes)){if(typeof u.insert=="string"&&typeof t.insert=="string")return this.ops[e-1]={insert:t.insert+u.insert},typeof u.attributes=="object"&&(this.ops[e-1].attributes=u.attributes),this;if(typeof u.retain=="number"&&typeof t.retain=="number")return this.ops[e-1]={retain:t.retain+u.retain},typeof u.attributes=="object"&&(this.ops[e-1].attributes=u.attributes),this}}return e===this.ops.length?this.ops.push(u):this.ops.splice(e,0,u),this},c.prototype.chop=function(){var u=this.ops[this.ops.length-1];return u&&u.retain&&!u.attributes&&this.ops.pop(),this},c.prototype.filter=function(u){return this.ops.filter(u)},c.prototype.forEach=function(u){this.ops.forEach(u)},c.prototype.map=function(u){return this.ops.map(u)},c.prototype.partition=function(u){var e=[],t=[];return this.forEach(function(l){var o=u(l)?e:t;o.push(l)}),[e,t]},c.prototype.reduce=function(u,e){return this.ops.reduce(u,e)},c.prototype.changeLength=function(){return this.reduce(function(u,e){return e.insert?u+y.length(e):e.delete?u-e.delete:u},0)},c.prototype.length=function(){return this.reduce(function(u,e){return u+y.length(e)},0)},c.prototype.slice=function(u,e){u=u||0,typeof e!="number"&&(e=1/0);for(var t=[],l=y.iterator(this.ops),o=0;o0&&t.next(o.retain-a)}for(var r=new c(l);e.hasNext()||t.hasNext();)if(t.peekType()==="insert")r.push(t.next());else if(e.peekType()==="delete")r.push(e.next());else{var i=Math.min(e.peekLength(),t.peekLength()),s=e.next(i),n=t.next(i);if(typeof n.retain=="number"){var f={};typeof s.retain=="number"?f.retain=i:f.insert=s.insert;var T=y.attributes.compose(s.attributes,n.attributes,typeof s.retain=="number");if(T&&(f.attributes=T),r.push(f),!t.hasNext()&&k(r.ops[r.ops.length-1],f)){var g=new c(e.rest());return r.concat(g).chop()}}else typeof n.delete=="number"&&typeof s.retain=="number"&&r.push(n)}return r.chop()},c.prototype.concat=function(u){var e=new c(this.ops.slice());return u.ops.length>0&&(e.push(u.ops[0]),e.ops=e.ops.concat(u.ops.slice(1))),e},c.prototype.diff=function(u,e){if(this.ops===u.ops)return new c;var t=[this,u].map(function(i){return i.map(function(s){if(s.insert!=null)return typeof s.insert=="string"?s.insert:m;var n=i===u?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),l=new c,o=P(t[0],t[1],e),a=y.iterator(this.ops),r=y.iterator(u.ops);return o.forEach(function(i){for(var s=i[1].length;s>0;){var n=0;switch(i[0]){case P.INSERT:n=Math.min(r.peekLength(),s),l.push(r.next(n));break;case P.DELETE:n=Math.min(s,a.peekLength()),a.next(n),l.delete(n);break;case P.EQUAL:n=Math.min(a.peekLength(),r.peekLength(),s);var f=a.next(n),T=r.next(n);k(f.insert,T.insert)?l.retain(n,y.attributes.diff(f.attributes,T.attributes)):l.push(T).delete(n);break}s-=n}}),l.chop()},c.prototype.eachLine=function(u,e){e=e||` `;for(var t=y.iterator(this.ops),l=new c,o=0;t.hasNext();){if(t.peekType()!=="insert")return;var a=t.peek(),r=y.length(a)-t.peekLength(),i=typeof a.insert=="string"?a.insert.indexOf(e,r)-r:-1;if(i<0)l.push(t.next());else if(i>0)l.push(t.next(i));else{if(u(l,t.next(1).attributes||{},o)===!1)return;o+=1,l=new c}}l.length()>0&&u(l,{},o)},c.prototype.transform=function(u,e){if(e=!!e,typeof u=="number")return this.transformPosition(u,e);for(var t=y.iterator(this.ops),l=y.iterator(u.ops),o=new c;t.hasNext()||l.hasNext();)if(t.peekType()==="insert"&&(e||l.peekType()!=="insert"))o.retain(y.length(t.next()));else if(l.peekType()==="insert")o.push(l.next());else{var a=Math.min(t.peekLength(),l.peekLength()),r=t.next(a),i=l.next(a);if(r.delete)continue;i.delete?o.push(i):o.retain(a,y.attributes.transform(r.attributes,i.attributes,e))}return o.chop()},c.prototype.transformPosition=function(u,e){e=!!e;for(var t=y.iterator(this.ops),l=0;t.hasNext()&&l<=u;){var o=t.peekLength(),a=t.peekType();if(t.next(),a==="delete"){u-=Math.min(o,u-l);continue}else a==="insert"&&(l0&&(N1&&arguments[1]!==void 0?arguments[1]:!1;if(R&&(N===0||N>=this.length()-g)){var B=this.clone();return N===0?(this.parent.insertBefore(B,this),this):(this.parent.insertBefore(B,this.next),B)}else{var C=k(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"split",this).call(this,N,R);return this.cache={},C}}}]),d}(e.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[a.default,e.default.Embed,i.default];function v(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return h==null||(typeof h.formats=="function"&&(d=(0,y.default)(d,h.formats())),h.parent==null||h.parent.blotName=="scroll"||h.parent.statics.scope!==h.statics.scope)?d:v(h.parent,d)}b.bubbleFormats=v,b.BlockEmbed=O,b.default=x},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.overload=b.expandConfig=void 0;var P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},k=function(){function I(L,A){var S=[],M=!0,F=!1,D=void 0;try{for(var _=L[Symbol.iterator](),j;!(M=(j=_.next()).done)&&(S.push(j.value),!(A&&S.length===A));M=!0);}catch(H){F=!0,D=H}finally{try{!M&&_.return&&_.return()}finally{if(F)throw D}}return S}return function(L,A){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return I(L,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function I(L,A){for(var S=0;S2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof A!="string"){var D=A.attrName||A.blotName;typeof D=="string"?this.register("formats/"+D,A,S):Object.keys(A).forEach(function(_){M.register(_,A[_],S)})}else this.imports[A]!=null&&!F&&E.warn("Overwriting "+A+" with",S),this.imports[A]=S,(A.startsWith("blots/")||A.startsWith("formats/"))&&S.blotName!=="abstract"?r.default.register(S):A.startsWith("modules")&&typeof S.register=="function"&&S.register()}}]);function I(L){var A=this,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(d(this,I),this.options=R(L,S),this.container=this.options.container,this.container==null)return E.error("Invalid Quill container",L);this.options.debug&&I.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 t.default,this.scroll=r.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new u.default(this.scroll),this.selection=new s.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(t.default.events.EDITOR_CHANGE,function(D){D===t.default.events.TEXT_CHANGE&&A.root.classList.toggle("ql-blank",A.editor.isBlank())}),this.emitter.on(t.default.events.SCROLL_UPDATE,function(D,_){var j=A.selection.lastRange,H=j&&j.length===0?j.index:void 0;B.call(A,function(){return A.editor.update(null,_,H)},D)});var F=this.clipboard.convert(`
`+M+"


");this.setContents(F),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return w(I,[{key:"addContainer",value:function(A){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof A=="string"){var M=A;A=document.createElement("div"),A.classList.add(M)}return this.container.insertBefore(A,S),A}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(A,S,M){var F=this,D=C(A,S,M),_=k(D,4);return A=_[0],S=_[1],M=_[3],B.call(this,function(){return F.editor.deleteText(A,S)},M,A,-1*S)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(A),this.container.classList.toggle("ql-disabled",!A)}},{key:"focus",value:function(){var A=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=A,this.scrollIntoView()}},{key:"format",value:function(A,S){var M=this,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.default.sources.API;return B.call(this,function(){var D=M.getSelection(!0),_=new m.default;if(D==null)return _;if(r.default.query(A,r.default.Scope.BLOCK))_=M.editor.formatLine(D.index,D.length,h({},A,S));else{if(D.length===0)return M.selection.format(A,S),_;_=M.editor.formatText(D.index,D.length,h({},A,S))}return M.setSelection(D,t.default.sources.SILENT),_},F)}},{key:"formatLine",value:function(A,S,M,F,D){var _=this,j=void 0,H=C(A,S,M,F,D),U=k(H,4);return A=U[0],S=U[1],j=U[2],D=U[3],B.call(this,function(){return _.editor.formatLine(A,S,j)},D,A,0)}},{key:"formatText",value:function(A,S,M,F,D){var _=this,j=void 0,H=C(A,S,M,F,D),U=k(H,4);return A=U[0],S=U[1],j=U[2],D=U[3],B.call(this,function(){return _.editor.formatText(A,S,j)},D,A,0)}},{key:"getBounds",value:function(A){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=void 0;typeof A=="number"?M=this.selection.getBounds(A,S):M=this.selection.getBounds(A.index,A.length);var F=this.container.getBoundingClientRect();return{bottom:M.bottom-F.top,height:M.height,left:M.left-F.left,right:M.right-F.left,top:M.top-F.top,width:M.width}}},{key:"getContents",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-A,M=C(A,S),F=k(M,2);return A=F[0],S=F[1],this.editor.getContents(A,S)}},{key:"getFormat",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof A=="number"?this.editor.getFormat(A,S):this.editor.getFormat(A.index,A.length)}},{key:"getIndex",value:function(A){return A.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(A){return this.scroll.leaf(A)}},{key:"getLine",value:function(A){return this.scroll.line(A)}},{key:"getLines",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof A!="number"?this.scroll.lines(A.index,A.length):this.scroll.lines(A,S)}},{key:"getModule",value:function(A){return this.theme.modules[A]}},{key:"getSelection",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return A&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-A,M=C(A,S),F=k(M,2);return A=F[0],S=F[1],this.editor.getText(A,S)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(A,S,M){var F=this,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:I.sources.API;return B.call(this,function(){return F.editor.insertEmbed(A,S,M)},D,A)}},{key:"insertText",value:function(A,S,M,F,D){var _=this,j=void 0,H=C(A,0,M,F,D),U=k(H,4);return A=U[0],j=U[2],D=U[3],B.call(this,function(){return _.editor.insertText(A,S,j)},D,A,S.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(A,S,M){this.clipboard.dangerouslyPasteHTML(A,S,M)}},{key:"removeFormat",value:function(A,S,M){var F=this,D=C(A,S,M),_=k(D,4);return A=_[0],S=_[1],M=_[3],B.call(this,function(){return F.editor.removeFormat(A,S)},M,A)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(A){var S=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return B.call(this,function(){A=new m.default(A);var F=S.getLength(),D=S.editor.deleteText(0,F),_=S.editor.applyDelta(A),j=_.ops[_.ops.length-1];j!=null&&typeof j.insert=="string"&&j.insert[j.insert.length-1]===` `&&(S.editor.deleteText(S.getLength()-1,1),_.delete(1));var H=D.compose(_);return H},M)}},{key:"setSelection",value:function(A,S,M){if(A==null)this.selection.setRange(null,S||I.sources.API);else{var F=C(A,S,M),D=k(F,4);A=D[0],S=D[1],M=D[3],this.selection.setRange(new i.Range(A,S),M),M!==t.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(A){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API,M=new m.default().insert(A);return this.setContents(M,S)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.default.sources.USER,S=this.scroll.update(A);return this.selection.update(A),S}},{key:"updateContents",value:function(A){var S=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return B.call(this,function(){return A=new m.default(A),S.editor.applyDelta(A,M)},M,!0)}}]),I}();N.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},N.events=t.default.events,N.sources=t.default.sources,N.version="1.3.7",N.imports={delta:m.default,parchment:r.default,"core/module":o.default,"core/theme":x.default};function R(I,L){if(L=(0,f.default)(!0,{container:I,modules:{clipboard:!0,keyboard:!0,history:!0}},L),!L.theme||L.theme===N.DEFAULTS.theme)L.theme=x.default;else if(L.theme=N.import("themes/"+L.theme),L.theme==null)throw new Error("Invalid theme "+L.theme+". Did you register it?");var A=(0,f.default)(!0,{},L.theme.DEFAULTS);[A,L].forEach(function(F){F.modules=F.modules||{},Object.keys(F.modules).forEach(function(D){F.modules[D]===!0&&(F.modules[D]={})})});var S=Object.keys(A.modules).concat(Object.keys(L.modules)),M=S.reduce(function(F,D){var _=N.import("modules/"+D);return _==null?E.error("Cannot load "+D+" module. Are you sure you registered it?"):F[D]=_.DEFAULTS||{},F},{});return L.modules!=null&&L.modules.toolbar&&L.modules.toolbar.constructor!==Object&&(L.modules.toolbar={container:L.modules.toolbar}),L=(0,f.default)(!0,{},N.DEFAULTS,{modules:M},A,L),["bounds","container","scrollingContainer"].forEach(function(F){typeof L[F]=="string"&&(L[F]=document.querySelector(L[F]))}),L.modules=Object.keys(L.modules).reduce(function(F,D){return L.modules[D]&&(F[D]=L.modules[D]),F},{}),L}function B(I,L,A,S){if(this.options.strict&&!this.isEnabled()&&L===t.default.sources.USER)return new m.default;var M=A==null?null:this.getSelection(),F=this.editor.delta,D=I();if(M!=null&&(A===!0&&(A=M.index),S==null?M=$(M,D,L):S!==0&&(M=$(M,A,S,L)),this.setSelection(M,t.default.sources.SILENT)),D.length()>0){var _,j=[t.default.events.TEXT_CHANGE,D,F,L];if((_=this.emitter).emit.apply(_,[t.default.events.EDITOR_CHANGE].concat(j)),L!==t.default.sources.SILENT){var H;(H=this.emitter).emit.apply(H,j)}}return D}function C(I,L,A,S,M){var F={};return typeof I.index=="number"&&typeof I.length=="number"?typeof L!="number"?(M=S,S=A,A=L,L=I.length,I=I.index):(L=I.length,I=I.index):typeof L!="number"&&(M=S,S=A,A=L,L=0),(typeof A=="undefined"?"undefined":P(A))==="object"?(F=A,M=S):typeof A=="string"&&(S!=null?F[A]=S:M=A),M=M||t.default.sources.API,[I,L,F,M]}function $(I,L,A,S){if(I==null)return null;var M=void 0,F=void 0;if(L instanceof m.default){var D=[I.index,I.index+I.length].map(function(U){return L.transformPosition(U,S!==t.default.sources.USER)}),_=k(D,2);M=_[0],F=_[1]}else{var j=[I.index,I.index+I.length].map(function(U){return U=0?U+A:Math.max(L,U+A)}),H=k(j,2);M=H[0],F=H[1]}return new i.Range(M,F-M)}b.expandConfig=R,b.overload=C,b.default=N},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function a(r,i){for(var s=0;s0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(s,n){var f=r.order.indexOf(s),T=r.order.indexOf(n);return f>=0||T>=0?f-T:s===n?0:s1?T-1:0),O=1;O1&&arguments[1]!==void 0?arguments[1]:{};P(this,w),this.quill=y,this.options=m};k.DEFAULTS={},b.default=k},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=["error","warn","log","info"],k="warn";function w(m){if(P.indexOf(m)<=P.indexOf(k)){for(var c,u=arguments.length,e=Array(u>1?u-1:0),t=1;t0&&typeof e[0]!="number")}function u(e,t,l){var o,a;if(m(e)||m(t)||e.prototype!==t.prototype)return!1;if(w(e))return w(t)?(e=P.call(e),t=P.call(t),y(e,t,l)):!1;if(c(e)){if(!c(t)||e.length!==t.length)return!1;for(o=0;o=0;o--)if(r[o]!=i[o])return!1;for(o=r.length-1;o>=0;o--)if(a=r[o],!y(e[a],t[a],l))return!1;return typeof e==typeof t}},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=p(1),k=function(){function w(y,m,c){c===void 0&&(c={}),this.attrName=y,this.keyName=m;var u=P.Scope.TYPE&P.Scope.ATTRIBUTE;c.scope!=null?this.scope=c.scope&P.Scope.LEVEL|u:this.scope=P.Scope.ATTRIBUTE,c.whitelist!=null&&(this.whitelist=c.whitelist)}return w.keys=function(y){return[].map.call(y.attributes,function(m){return m.name})},w.prototype.add=function(y,m){return this.canAdd(y,m)?(y.setAttribute(this.keyName,m),!0):!1},w.prototype.canAdd=function(y,m){var c=P.query(y,P.Scope.BLOT&(this.scope|P.Scope.TYPE));return c==null?!1:this.whitelist==null?!0:typeof m=="string"?this.whitelist.indexOf(m.replace(/["']/g,""))>-1:this.whitelist.indexOf(m)>-1},w.prototype.remove=function(y){y.removeAttribute(this.keyName)},w.prototype.value=function(y){var m=y.getAttribute(this.keyName);return this.canAdd(y,m)&&m?m:""},w}();b.default=k},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.Code=void 0;var P=function(){function O(x,v){var h=[],d=!0,E=!1,N=void 0;try{for(var R=x[Symbol.iterator](),B;!(d=(B=R.next()).done)&&(h.push(B.value),!(v&&h.length===v));d=!0);}catch(C){E=!0,N=C}finally{try{!d&&R.return&&R.return()}finally{if(E)throw N}}return h}return function(x,v){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return O(x,v);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),k=function(){function O(x,v){for(var h=0;h=h+d)){var B=this.newlineIndex(h,!0)+1,C=R-B+1,$=this.isolate(B,C),I=$.next;$.format(E,N),I instanceof x&&I.formatAt(0,h-B+d-C,E,N)}}}},{key:"insertAt",value:function(h,d,E){if(E==null){var N=this.descendant(r.default,h),R=P(N,2),B=R[0],C=R[1];B.insertAt(C,d)}}},{key:"length",value:function(){var h=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` `)?h:h+1}},{key:"newlineIndex",value:function(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(d)return this.domNode.textContent.slice(0,h).lastIndexOf(` `);var E=this.domNode.textContent.slice(h).indexOf(` `);return E>-1?h+E:-1}},{key:"optimize",value:function(h){this.domNode.textContent.endsWith(` `)||this.appendChild(u.default.create("text",` `)),w(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,h);var d=this.next;d!=null&&d.prev===this&&d.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===d.statics.formats(d.domNode)&&(d.optimize(h),d.moveChildren(this),d.remove())}},{key:"replace",value:function(h){w(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,h),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(d){var E=u.default.find(d);E==null?d.parentNode.removeChild(d):E instanceof u.default.Embed?E.remove():E.unwrap()})}}],[{key:"create",value:function(h){var d=w(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,h);return d.setAttribute("spellcheck",!1),d}},{key:"formats",value:function(){return!0}}]),x}(t.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",b.Code=T,b.default=g},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},k=function(){function I(L,A){var S=[],M=!0,F=!1,D=void 0;try{for(var _=L[Symbol.iterator](),j;!(M=(j=_.next()).done)&&(S.push(j.value),!(A&&S.length===A));M=!0);}catch(H){F=!0,D=H}finally{try{!M&&_.return&&_.return()}finally{if(F)throw D}}return S}return function(L,A){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return I(L,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function I(L,A){for(var S=0;S=F&&!U.endsWith(` `)&&(M=!0),S.scroll.insertAt(D,U);var W=S.scroll.line(D),Y=k(W,2),et=Y[0],nt=Y[1],rt=(0,h.default)({},(0,i.bubbleFormats)(et));if(et instanceof s.default){var at=et.descendant(t.default.Leaf,nt),ft=k(at,1),st=ft[0];rt=(0,h.default)(rt,(0,i.bubbleFormats)(st))}H=u.default.attributes.diff(rt,H)||{}}else if(P(_.insert)==="object"){var K=Object.keys(_.insert)[0];if(K==null)return D;S.scroll.insertAt(D,K,_.insert[K])}F+=j}return Object.keys(H).forEach(function(z){S.scroll.formatAt(D,j,z,H[z])}),D+j},0),A.reduce(function(D,_){return typeof _.delete=="number"?(S.scroll.deleteAt(D,_.delete),D):D+(_.retain||_.insert.length||1)},0),this.scroll.batchEnd(),this.update(A)}},{key:"deleteText",value:function(A,S){return this.scroll.deleteAt(A,S),this.update(new m.default().retain(A).delete(S))}},{key:"formatLine",value:function(A,S){var M=this,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(F).forEach(function(D){if(!(M.scroll.whitelist!=null&&!M.scroll.whitelist[D])){var _=M.scroll.lines(A,Math.max(S,1)),j=S;_.forEach(function(H){var U=H.length();if(!(H instanceof o.default))H.format(D,F[D]);else{var W=A-H.offset(M.scroll),Y=H.newlineIndex(W+j)-W+1;H.formatAt(W,Y,D,F[D])}j-=U})}}),this.scroll.optimize(),this.update(new m.default().retain(A).retain(S,(0,g.default)(F)))}},{key:"formatText",value:function(A,S){var M=this,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(F).forEach(function(D){M.scroll.formatAt(A,S,D,F[D])}),this.update(new m.default().retain(A).retain(S,(0,g.default)(F)))}},{key:"getContents",value:function(A,S){return this.delta.slice(A,A+S)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(A,S){return A.concat(S.delta())},new m.default)}},{key:"getFormat",value:function(A){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=[],F=[];S===0?this.scroll.path(A).forEach(function(_){var j=k(_,1),H=j[0];H instanceof s.default?M.push(H):H instanceof t.default.Leaf&&F.push(H)}):(M=this.scroll.lines(A,S),F=this.scroll.descendants(t.default.Leaf,A,S));var D=[M,F].map(function(_){if(_.length===0)return{};for(var j=(0,i.bubbleFormats)(_.shift());Object.keys(j).length>0;){var H=_.shift();if(H==null)return j;j=C((0,i.bubbleFormats)(H),j)}return j});return h.default.apply(h.default,D)}},{key:"getText",value:function(A,S){return this.getContents(A,S).filter(function(M){return typeof M.insert=="string"}).map(function(M){return M.insert}).join("")}},{key:"insertEmbed",value:function(A,S,M){return this.scroll.insertAt(A,S,M),this.update(new m.default().retain(A).insert(E({},S,M)))}},{key:"insertText",value:function(A,S){var M=this,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return S=S.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(A,S),Object.keys(F).forEach(function(D){M.scroll.formatAt(A,S.length,D,F[D])}),this.update(new m.default().retain(A).insert(S,(0,g.default)(F)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var A=this.scroll.children.head;return A.statics.blotName!==s.default.blotName||A.children.length>1?!1:A.children.head instanceof f.default}},{key:"removeFormat",value:function(A,S){var M=this.getText(A,S),F=this.scroll.line(A+S),D=k(F,2),_=D[0],j=D[1],H=0,U=new m.default;_!=null&&(_ instanceof o.default?H=_.newlineIndex(j)-j+1:H=_.length()-j,U=_.delta().slice(j,j+H-1).insert(` `));var W=this.getContents(A,S+H),Y=W.diff(new m.default().insert(M).concat(U)),et=new m.default().retain(A).concat(Y);return this.applyDelta(et)}},{key:"update",value:function(A){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,F=this.delta;if(S.length===1&&S[0].type==="characterData"&&S[0].target.data.match(R)&&t.default.find(S[0].target)){var D=t.default.find(S[0].target),_=(0,i.bubbleFormats)(D),j=D.offset(this.scroll),H=S[0].oldValue.replace(r.default.CONTENTS,""),U=new m.default().insert(H),W=new m.default().insert(D.value()),Y=new m.default().retain(j).concat(U.diff(W,M));A=Y.reduce(function(et,nt){return nt.insert?et.insert(nt.insert,_):et.push(nt)},new m.default),this.delta=F.compose(A)}else this.delta=this.getDelta(),(!A||!(0,x.default)(F.compose(A),this.delta))&&(A=F.diff(this.delta,M));return A}}]),I}();function C(I,L){return Object.keys(L).reduce(function(A,S){return I[S]==null||(L[S]===I[S]?A[S]=L[S]:Array.isArray(L[S])?L[S].indexOf(I[S])<0&&(A[S]=L[S].concat([I[S]])):A[S]=[L[S],I[S]]),A},{})}function $(I){return I.reduce(function(L,A){if(A.insert===1){var S=(0,g.default)(A.attributes);return delete S.image,L.insert({image:A.attributes.image},S)}if(A.attributes!=null&&(A.attributes.list===!0||A.attributes.bullet===!0)&&(A=(0,g.default)(A),A.attributes.list?A.attributes.list="ordered":(A.attributes.list="bullet",delete A.attributes.bullet)),typeof A.insert=="string"){var M=A.insert.replace(/\r\n/g,` `).replace(/\r/g,` `);return L.insert(M,A.attributes)}return L.push(A)},new m.default)}b.default=B},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.Range=void 0;var P=function(){function O(x,v){var h=[],d=!0,E=!1,N=void 0;try{for(var R=x[Symbol.iterator](),B;!(d=(B=R.next()).done)&&(h.push(B.value),!(v&&h.length===v));d=!0);}catch(C){E=!0,N=C}finally{try{!d&&R.return&&R.return()}finally{if(E)throw N}}return h}return function(x,v){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return O(x,v);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),k=function(){function O(x,v){for(var h=0;h1&&arguments[1]!==void 0?arguments[1]:0;s(this,O),this.index=x,this.length=v},T=function(){function O(x,v){var h=this;s(this,O),this.emitter=v,this.scroll=x,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=y.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){h.mouseDown||setTimeout(h.update.bind(h,l.default.sources.USER),1)}),this.emitter.on(l.default.events.EDITOR_CHANGE,function(d,E){d===l.default.events.TEXT_CHANGE&&E.length()>0&&h.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){if(h.hasFocus()){var d=h.getNativeRange();d!=null&&d.start.node!==h.cursor.textNode&&h.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{h.setNativeRange(d.start.node,d.start.offset,d.end.node,d.end.offset)}catch(E){}})}}),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,function(d,E){if(E.range){var N=E.range,R=N.startNode,B=N.startOffset,C=N.endNode,$=N.endOffset;h.setNativeRange(R,B,C,$)}}),this.update(l.default.sources.SILENT)}return k(O,[{key:"handleComposition",value:function(){var v=this;this.root.addEventListener("compositionstart",function(){v.composing=!0}),this.root.addEventListener("compositionend",function(){if(v.composing=!1,v.cursor.parent){var h=v.cursor.restore();if(!h)return;setTimeout(function(){v.setNativeRange(h.startNode,h.startOffset,h.endNode,h.endOffset)},1)}})}},{key:"handleDragging",value:function(){var v=this;this.emitter.listenDOM("mousedown",document.body,function(){v.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){v.mouseDown=!1,v.update(l.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(v,h){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[v])){this.scroll.update();var d=this.getNativeRange();if(!(d==null||!d.native.collapsed||y.default.query(v,y.default.Scope.BLOCK))){if(d.start.node!==this.cursor.textNode){var E=y.default.find(d.start.node,!1);if(E==null)return;if(E instanceof y.default.Leaf){var N=E.split(d.start.offset);E.parent.insertBefore(this.cursor,N)}else E.insertBefore(this.cursor,d.start.node);this.cursor.attach()}this.cursor.format(v,h),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(v){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d=this.scroll.length();v=Math.min(v,d-1),h=Math.min(v+h,d-1)-v;var E=void 0,N=this.scroll.leaf(v),R=P(N,2),B=R[0],C=R[1];if(B==null)return null;var $=B.position(C,!0),I=P($,2);E=I[0],C=I[1];var L=document.createRange();if(h>0){L.setStart(E,C);var A=this.scroll.leaf(v+h),S=P(A,2);if(B=S[0],C=S[1],B==null)return null;var M=B.position(C,!0),F=P(M,2);return E=F[0],C=F[1],L.setEnd(E,C),L.getBoundingClientRect()}else{var D="left",_=void 0;return E instanceof Text?(C0&&(D="right")),{bottom:_.top+_.height,height:_.height,left:_[D],right:_[D],top:_.top,width:0}}}},{key:"getNativeRange",value:function(){var v=document.getSelection();if(v==null||v.rangeCount<=0)return null;var h=v.getRangeAt(0);if(h==null)return null;var d=this.normalizeNative(h);return n.info("getNativeRange",d),d}},{key:"getRange",value:function(){var v=this.getNativeRange();if(v==null)return[null,null];var h=this.normalizedToRange(v);return[h,v]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(v){var h=this,d=[[v.start.node,v.start.offset]];v.native.collapsed||d.push([v.end.node,v.end.offset]);var E=d.map(function(B){var C=P(B,2),$=C[0],I=C[1],L=y.default.find($,!0),A=L.offset(h.scroll);return I===0?A:L instanceof y.default.Container?A+L.length():A+L.index($,I)}),N=Math.min(Math.max.apply(Math,i(E)),this.scroll.length()-1),R=Math.min.apply(Math,[N].concat(i(E)));return new f(R,N-R)}},{key:"normalizeNative",value:function(v){if(!g(this.root,v.startContainer)||!v.collapsed&&!g(this.root,v.endContainer))return null;var h={start:{node:v.startContainer,offset:v.startOffset},end:{node:v.endContainer,offset:v.endOffset},native:v};return[h.start,h.end].forEach(function(d){for(var E=d.node,N=d.offset;!(E instanceof Text)&&E.childNodes.length>0;)if(E.childNodes.length>N)E=E.childNodes[N],N=0;else if(E.childNodes.length===N)E=E.lastChild,N=E instanceof Text?E.data.length:E.childNodes.length+1;else break;d.node=E,d.offset=N}),h}},{key:"rangeToNative",value:function(v){var h=this,d=v.collapsed?[v.index]:[v.index,v.index+v.length],E=[],N=this.scroll.length();return d.forEach(function(R,B){R=Math.min(N-1,R);var C=void 0,$=h.scroll.leaf(R),I=P($,2),L=I[0],A=I[1],S=L.position(A,B!==0),M=P(S,2);C=M[0],A=M[1],E.push(C,A)}),E.length<2&&(E=E.concat(E)),E}},{key:"scrollIntoView",value:function(v){var h=this.lastRange;if(h!=null){var d=this.getBounds(h.index,h.length);if(d!=null){var E=this.scroll.length()-1,N=this.scroll.line(Math.min(h.index,E)),R=P(N,1),B=R[0],C=B;if(h.length>0){var $=this.scroll.line(Math.min(h.index+h.length,E)),I=P($,1);C=I[0]}if(!(B==null||C==null)){var L=v.getBoundingClientRect();d.topL.bottom&&(v.scrollTop+=d.bottom-L.bottom)}}}}},{key:"setNativeRange",value:function(v,h){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v,E=arguments.length>3&&arguments[3]!==void 0?arguments[3]:h,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(n.info("setNativeRange",v,h,d,E),!(v!=null&&(this.root.parentNode==null||v.parentNode==null||d.parentNode==null))){var R=document.getSelection();if(R!=null)if(v!=null){this.hasFocus()||this.root.focus();var B=(this.getNativeRange()||{}).native;if(B==null||N||v!==B.startContainer||h!==B.startOffset||d!==B.endContainer||E!==B.endOffset){v.tagName=="BR"&&(h=[].indexOf.call(v.parentNode.childNodes,v),v=v.parentNode),d.tagName=="BR"&&(E=[].indexOf.call(d.parentNode.childNodes,d),d=d.parentNode);var C=document.createRange();C.setStart(v,h),C.setEnd(d,E),R.removeAllRanges(),R.addRange(C)}}else R.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(v){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l.default.sources.API;if(typeof h=="string"&&(d=h,h=!1),n.info("setRange",v),v!=null){var E=this.rangeToNative(v);this.setNativeRange.apply(this,i(E).concat([h]))}else this.setNativeRange(null);this.update(d)}},{key:"update",value:function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l.default.sources.USER,h=this.lastRange,d=this.getRange(),E=P(d,2),N=E[0],R=E[1];if(this.lastRange=N,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,e.default)(h,this.lastRange)){var B;!this.composing&&R!=null&&R.native.collapsed&&R.start.node!==this.cursor.textNode&&this.cursor.restore();var C=[l.default.events.SELECTION_CHANGE,(0,c.default)(this.lastRange),(0,c.default)(h),v];if((B=this.emitter).emit.apply(B,[l.default.events.EDITOR_CHANGE].concat(C)),v!==l.default.sources.SILENT){var $;($=this.emitter).emit.apply($,C)}}}}]),O}();function g(O,x){try{x.parentNode}catch(v){return!1}return x instanceof Text&&(x=x.parentNode),O.contains(x)}b.Range=f,b.default=T},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function l(o,a){for(var r=0;r0&&(t+=1),[this.parent.domNode,t]},c.prototype.value=function(){var u;return u={},u[this.statics.blotName]=this.statics.value(this.domNode)||!0,u},c.scope=w.Scope.INLINE_BLOT,c}(k.default);b.default=y},function(q,b,p){var P=p(11),k=p(3),w={attributes:{compose:function(m,c,u){typeof m!="object"&&(m={}),typeof c!="object"&&(c={});var e=k(!0,{},c);u||(e=Object.keys(e).reduce(function(l,o){return e[o]!=null&&(l[o]=e[o]),l},{}));for(var t in m)m[t]!==void 0&&c[t]===void 0&&(e[t]=m[t]);return Object.keys(e).length>0?e:void 0},diff:function(m,c){typeof m!="object"&&(m={}),typeof c!="object"&&(c={});var u=Object.keys(m).concat(Object.keys(c)).reduce(function(e,t){return P(m[t],c[t])||(e[t]=c[t]===void 0?null:c[t]),e},{});return Object.keys(u).length>0?u:void 0},transform:function(m,c,u){if(typeof m!="object")return c;if(typeof c=="object"){if(!u)return c;var e=Object.keys(c).reduce(function(t,l){return m[l]===void 0&&(t[l]=c[l]),t},{});return Object.keys(e).length>0?e:void 0}}},iterator:function(m){return new y(m)},length:function(m){return typeof m.delete=="number"?m.delete:typeof m.retain=="number"?m.retain:typeof m.insert=="string"?m.insert.length:1}};function y(m){this.ops=m,this.index=0,this.offset=0}y.prototype.hasNext=function(){return this.peekLength()<1/0},y.prototype.next=function(m){m||(m=1/0);var c=this.ops[this.index];if(c){var u=this.offset,e=w.length(c);if(m>=e-u?(m=e-u,this.index+=1,this.offset=0):this.offset+=m,typeof c.delete=="number")return{delete:m};var t={};return c.attributes&&(t.attributes=c.attributes),typeof c.retain=="number"?t.retain=m:typeof c.insert=="string"?t.insert=c.insert.substr(u,m):t.insert=c.insert,t}else return{retain:1/0}},y.prototype.peek=function(){return this.ops[this.index]},y.prototype.peekLength=function(){return this.ops[this.index]?w.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 m=this.offset,c=this.index,u=this.next(),e=this.ops.slice(this.index);return this.offset=m,this.index=c,[u].concat(e)}else return[]},q.exports=w},function(q,b){var p=function(){"use strict";function P(o,a){return a!=null&&o instanceof a}var k;try{k=Map}catch(o){k=function(){}}var w;try{w=Set}catch(o){w=function(){}}var y;try{y=Promise}catch(o){y=function(){}}function m(o,a,r,i,s){typeof a=="object"&&(r=a.depth,i=a.prototype,s=a.includeNonEnumerable,a=a.circular);var n=[],f=[],T=typeof ot!="undefined";typeof a=="undefined"&&(a=!0),typeof r=="undefined"&&(r=1/0);function g(O,x){if(O===null)return null;if(x===0)return O;var v,h;if(typeof O!="object")return O;if(P(O,k))v=new k;else if(P(O,w))v=new w;else if(P(O,y))v=new y(function(L,A){O.then(function(S){L(g(S,x-1))},function(S){A(g(S,x-1))})});else if(m.__isArray(O))v=[];else if(m.__isRegExp(O))v=new RegExp(O.source,l(O)),O.lastIndex&&(v.lastIndex=O.lastIndex);else if(m.__isDate(O))v=new Date(O.getTime());else{if(T&&ot.isBuffer(O))return ot.allocUnsafe?v=ot.allocUnsafe(O.length):v=new ot(O.length),O.copy(v),v;P(O,Error)?v=Object.create(O):typeof i=="undefined"?(h=Object.getPrototypeOf(O),v=Object.create(h)):(v=Object.create(i),h=i)}if(a){var d=n.indexOf(O);if(d!=-1)return f[d];n.push(O),f.push(v)}P(O,k)&&O.forEach(function(L,A){var S=g(A,x-1),M=g(L,x-1);v.set(S,M)}),P(O,w)&&O.forEach(function(L){var A=g(L,x-1);v.add(A)});for(var E in O){var N;h&&(N=Object.getOwnPropertyDescriptor(h,E)),!(N&&N.set==null)&&(v[E]=g(O[E],x-1))}if(Object.getOwnPropertySymbols)for(var R=Object.getOwnPropertySymbols(O),E=0;E0){if(C instanceof e.BlockEmbed||A instanceof e.BlockEmbed){this.optimize();return}if(C instanceof r.default){var S=C.newlineIndex(C.length(),!0);if(S>-1&&(C=C.split(S+1),C===A)){this.optimize();return}}else if(A instanceof r.default){var M=A.newlineIndex(0);M>-1&&A.split(M+1)}var F=A.children.head instanceof o.default?null:A.children.head;C.moveChildren(A,F),C.remove()}this.optimize()}},{key:"enable",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",E)}},{key:"formatAt",value:function(E,N,R,B){this.whitelist!=null&&!this.whitelist[R]||(w(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"formatAt",this).call(this,E,N,R,B),this.optimize())}},{key:"insertAt",value:function(E,N,R){if(!(R!=null&&this.whitelist!=null&&!this.whitelist[N])){if(E>=this.length())if(R==null||m.default.query(N,m.default.Scope.BLOCK)==null){var B=m.default.create(this.statics.defaultChild);this.appendChild(B),R==null&&N.endsWith(` `)&&(N=N.slice(0,-1)),B.insertAt(0,N,R)}else{var C=m.default.create(N,R);this.appendChild(C)}else w(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"insertAt",this).call(this,E,N,R);this.optimize()}}},{key:"insertBefore",value:function(E,N){if(E.statics.scope===m.default.Scope.INLINE_BLOT){var R=m.default.create(this.statics.defaultChild);R.appendChild(E),E=R}w(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"insertBefore",this).call(this,E,N)}},{key:"leaf",value:function(E){return this.path(E).pop()||[null,-1]}},{key:"line",value:function(E){return E===this.length()?this.line(E-1):this.descendant(O,E)}},{key:"lines",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,R=function B(C,$,I){var L=[],A=I;return C.children.forEachAt($,I,function(S,M,F){O(S)?L.push(S):S instanceof m.default.Container&&(L=L.concat(B(S,M,A))),A-=F}),L};return R(this,E,N)}},{key:"optimize",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(w(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"optimize",this).call(this,E,N),E.length>0&&this.emitter.emit(u.default.events.SCROLL_OPTIMIZE,E,N))}},{key:"path",value:function(E){return w(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"path",this).call(this,E).slice(1)}},{key:"update",value:function(E){if(this.batch!==!0){var N=u.default.sources.USER;typeof E=="string"&&(N=E),Array.isArray(E)||(E=this.observer.takeRecords()),E.length>0&&this.emitter.emit(u.default.events.SCROLL_BEFORE_UPDATE,N,E),w(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"update",this).call(this,E.concat([])),E.length>0&&this.emitter.emit(u.default.events.SCROLL_UPDATE,N,E)}}}]),h}(m.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[t.default,e.BlockEmbed,s.default],b.default=x},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.SHORTKEY=b.default=void 0;var P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},k=function(){function _(j,H){var U=[],W=!0,Y=!1,et=void 0;try{for(var nt=j[Symbol.iterator](),rt;!(W=(rt=nt.next()).done)&&(U.push(rt.value),!(H&&U.length===H));W=!0);}catch(at){Y=!0,et=at}finally{try{!W&&nt.return&&nt.return()}finally{if(Y)throw et}}return U}return function(j,H){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return _(j,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function _(j,H){for(var U=0;U1&&arguments[1]!==void 0?arguments[1]:{},Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},et=D(U);if(et==null||et.key==null)return R.warn("Attempted to add invalid keyboard binding",et);typeof W=="function"&&(W={handler:W}),typeof Y=="function"&&(Y={handler:Y}),et=(0,t.default)(et,W,Y),this.bindings[et.key]=this.bindings[et.key]||[],this.bindings[et.key].push(et)}},{key:"listen",value:function(){var U=this;this.quill.root.addEventListener("keydown",function(W){if(!W.defaultPrevented){var Y=W.which||W.keyCode,et=(U.bindings[Y]||[]).filter(function(ut){return j.match(W,ut)});if(et.length!==0){var nt=U.quill.getSelection();if(!(nt==null||!U.quill.hasFocus())){var rt=U.quill.getLine(nt.index),at=k(rt,2),ft=at[0],st=at[1],K=U.quill.getLeaf(nt.index),z=k(K,2),G=z[0],V=z[1],Z=nt.length===0?[G,V]:U.quill.getLeaf(nt.index+nt.length),J=k(Z,2),Q=J[0],tt=J[1],lt=G instanceof s.default.Text?G.value().slice(0,V):"",ct=Q instanceof s.default.Text?Q.value().slice(tt):"",it={collapsed:nt.length===0,empty:nt.length===0&&ft.length()<=1,format:U.quill.getFormat(nt),offset:st,prefix:lt,suffix:ct},gt=et.some(function(ut){if(ut.collapsed!=null&&ut.collapsed!==it.collapsed||ut.empty!=null&&ut.empty!==it.empty||ut.offset!=null&&ut.offset!==it.offset)return!1;if(Array.isArray(ut.format)){if(ut.format.every(function(dt){return it.format[dt]==null}))return!1}else if(P(ut.format)==="object"&&!Object.keys(ut.format).every(function(dt){return ut.format[dt]===!0?it.format[dt]!=null:ut.format[dt]===!1?it.format[dt]==null:(0,u.default)(ut.format[dt],it.format[dt])}))return!1;return ut.prefix!=null&&!ut.prefix.test(it.prefix)||ut.suffix!=null&&!ut.suffix.test(it.suffix)?!1:ut.handler.call(U,nt,it)!==!0});gt&&W.preventDefault()}}}})}}]),j}(x.default);C.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},C.DEFAULTS={bindings:{bold:F("bold"),italic:F("italic"),underline:F("underline"),indent:{key:C.keys.TAB,format:["blockquote","indent","list"],handler:function(j,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:C.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(j,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:C.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(j,H){H.format.indent!=null?this.quill.format("indent","-1",f.default.sources.USER):H.format.list!=null&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":M(!0),"outdent code-block":M(!1),"remove tab":{key:C.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(j){this.quill.deleteText(j.index-1,1,f.default.sources.USER)}},tab:{key:C.keys.TAB,handler:function(j){this.quill.history.cutoff();var H=new o.default().retain(j.index).delete(j.length).insert(" ");this.quill.updateContents(H,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(j.index+1,f.default.sources.SILENT)}},"list empty enter":{key:C.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(j,H){this.quill.format("list",!1,f.default.sources.USER),H.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:C.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(j){var H=this.quill.getLine(j.index),U=k(H,2),W=U[0],Y=U[1],et=(0,t.default)({},W.formats(),{list:"checked"}),nt=new o.default().retain(j.index).insert(` `,et).retain(W.length()-Y-1).retain(1,{list:"unchecked"});this.quill.updateContents(nt,f.default.sources.USER),this.quill.setSelection(j.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:C.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(j,H){var U=this.quill.getLine(j.index),W=k(U,2),Y=W[0],et=W[1],nt=new o.default().retain(j.index).insert(` `,H.format).retain(Y.length()-et-1).retain(1,{header:null});this.quill.updateContents(nt,f.default.sources.USER),this.quill.setSelection(j.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(j,H){var U=H.prefix.length,W=this.quill.getLine(j.index),Y=k(W,2),et=Y[0],nt=Y[1];if(nt>U)return!0;var rt=void 0;switch(H.prefix.trim()){case"[]":case"[ ]":rt="unchecked";break;case"[x]":rt="checked";break;case"-":case"*":rt="bullet";break;default:rt="ordered"}this.quill.insertText(j.index," ",f.default.sources.USER),this.quill.history.cutoff();var at=new o.default().retain(j.index-nt).delete(U+1).retain(et.length()-2-nt).retain(1,{list:rt});this.quill.updateContents(at,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(j.index-U,f.default.sources.SILENT)}},"code exit":{key:C.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(j){var H=this.quill.getLine(j.index),U=k(H,2),W=U[0],Y=U[1],et=new o.default().retain(j.index+W.length()-Y-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(et,f.default.sources.USER)}},"embed left":$(C.keys.LEFT,!1),"embed left shift":$(C.keys.LEFT,!0),"embed right":$(C.keys.RIGHT,!1),"embed right shift":$(C.keys.RIGHT,!0)}};function $(_,j){var H,U=_===C.keys.LEFT?"prefix":"suffix";return H={key:_,shiftKey:j,altKey:null},h(H,U,/^$/),h(H,"handler",function(Y){var et=Y.index;_===C.keys.RIGHT&&(et+=Y.length+1);var nt=this.quill.getLeaf(et),rt=k(nt,1),at=rt[0];return at instanceof s.default.Embed?(_===C.keys.LEFT?j?this.quill.setSelection(Y.index-1,Y.length+1,f.default.sources.USER):this.quill.setSelection(Y.index-1,f.default.sources.USER):j?this.quill.setSelection(Y.index,Y.length+1,f.default.sources.USER):this.quill.setSelection(Y.index+Y.length+1,f.default.sources.USER),!1):!0}),H}function I(_,j){if(!(_.index===0||this.quill.getLength()<=1)){var H=this.quill.getLine(_.index),U=k(H,1),W=U[0],Y={};if(j.offset===0){var et=this.quill.getLine(_.index-1),nt=k(et,1),rt=nt[0];if(rt!=null&&rt.length()>1){var at=W.formats(),ft=this.quill.getFormat(_.index-1,1);Y=r.default.attributes.diff(at,ft)||{}}}var st=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(j.prefix)?2:1;this.quill.deleteText(_.index-st,st,f.default.sources.USER),Object.keys(Y).length>0&&this.quill.formatLine(_.index-st,st,Y,f.default.sources.USER),this.quill.focus()}}function L(_,j){var H=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(j.suffix)?2:1;if(!(_.index>=this.quill.getLength()-H)){var U={},W=0,Y=this.quill.getLine(_.index),et=k(Y,1),nt=et[0];if(j.offset>=nt.length()-1){var rt=this.quill.getLine(_.index+1),at=k(rt,1),ft=at[0];if(ft){var st=nt.formats(),K=this.quill.getFormat(_.index,1);U=r.default.attributes.diff(st,K)||{},W=ft.length()}}this.quill.deleteText(_.index,H,f.default.sources.USER),Object.keys(U).length>0&&this.quill.formatLine(_.index+W-1,H,U,f.default.sources.USER)}}function A(_){var j=this.quill.getLines(_),H={};if(j.length>1){var U=j[0].formats(),W=j[j.length-1].formats();H=r.default.attributes.diff(W,U)||{}}this.quill.deleteText(_,f.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(_.index,1,H,f.default.sources.USER),this.quill.setSelection(_.index,f.default.sources.SILENT),this.quill.focus()}function S(_,j){var H=this;_.length>0&&this.quill.scroll.deleteAt(_.index,_.length);var U=Object.keys(j.format).reduce(function(W,Y){return s.default.query(Y,s.default.Scope.BLOCK)&&!Array.isArray(j.format[Y])&&(W[Y]=j.format[Y]),W},{});this.quill.insertText(_.index,` `,U,f.default.sources.USER),this.quill.setSelection(_.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(j.format).forEach(function(W){U[W]==null&&(Array.isArray(j.format[W])||W!=="link"&&H.quill.format(W,j.format[W],f.default.sources.USER))})}function M(_){return{key:C.keys.TAB,shiftKey:!_,format:{"code-block":!0},handler:function(H){var U=s.default.query("code-block"),W=H.index,Y=H.length,et=this.quill.scroll.descendant(U,W),nt=k(et,2),rt=nt[0],at=nt[1];if(rt!=null){var ft=this.quill.getIndex(rt),st=rt.newlineIndex(at,!0)+1,K=rt.newlineIndex(ft+at+Y),z=rt.domNode.textContent.slice(st,K).split(` `);at=0,z.forEach(function(G,V){_?(rt.insertAt(st+at,U.TAB),at+=U.TAB.length,V===0?W+=U.TAB.length:Y+=U.TAB.length):G.startsWith(U.TAB)&&(rt.deleteAt(st+at,U.TAB.length),at-=U.TAB.length,V===0?W-=U.TAB.length:Y-=U.TAB.length),at+=G.length+1}),this.quill.update(f.default.sources.USER),this.quill.setSelection(W,Y,f.default.sources.SILENT)}}}}function F(_){return{key:_[0].toUpperCase(),shortKey:!0,handler:function(H,U){this.quill.format(_,!U.format[_],f.default.sources.USER)}}}function D(_){if(typeof _=="string"||typeof _=="number")return D({key:_});if((typeof _=="undefined"?"undefined":P(_))==="object"&&(_=(0,m.default)(_,!1)),typeof _.key=="string")if(C.keys[_.key.toUpperCase()]!=null)_.key=C.keys[_.key.toUpperCase()];else if(_.key.length===1)_.key=_.key.toUpperCase().charCodeAt(0);else return null;return _.shortKey&&(_[B]=_.shortKey,delete _.shortKey),_}b.default=C,b.SHORTKEY=B},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function r(i,s){var n=[],f=!0,T=!1,g=void 0;try{for(var O=i[Symbol.iterator](),x;!(f=(x=O.next()).done)&&(n.push(x.value),!(s&&n.length===s));f=!0);}catch(v){T=!0,g=v}finally{try{!f&&O.return&&O.return()}finally{if(T)throw g}}return n}return function(i,s){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return r(i,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),k=function r(i,s,n){i===null&&(i=Function.prototype);var f=Object.getOwnPropertyDescriptor(i,s);if(f===void 0){var T=Object.getPrototypeOf(i);return T===null?void 0:r(T,s,n)}else{if("value"in f)return f.value;var g=f.get;return g===void 0?void 0:g.call(n)}},w=function(){function r(i,s){for(var n=0;n-1}b.default=t,b.sanitize=l},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},k=function(){function a(r,i){for(var s=0;s1&&arguments[1]!==void 0?arguments[1]:!1,n=this.container.querySelector(".ql-selected");if(i!==n&&(n!=null&&n.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"),s))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event=="undefined"?"undefined":P(Event))==="object"){var f=document.createEvent("Event");f.initEvent("change",!0,!0),this.select.dispatchEvent(f)}this.close()}}},{key:"update",value:function(){var i=void 0;if(this.select.selectedIndex>-1){var s=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(s)}else this.selectItem(null);var n=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),a}();b.default=o},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=p(0),k=R(P),w=p(5),y=R(w),m=p(4),c=R(m),u=p(16),e=R(u),t=p(25),l=R(t),o=p(24),a=R(o),r=p(35),i=R(r),s=p(6),n=R(s),f=p(22),T=R(f),g=p(7),O=R(g),x=p(55),v=R(x),h=p(42),d=R(h),E=p(23),N=R(E);function R(B){return B&&B.__esModule?B:{default:B}}y.default.register({"blots/block":c.default,"blots/block/embed":m.BlockEmbed,"blots/break":e.default,"blots/container":l.default,"blots/cursor":a.default,"blots/embed":i.default,"blots/inline":n.default,"blots/scroll":T.default,"blots/text":O.default,"modules/clipboard":v.default,"modules/history":d.default,"modules/keyboard":N.default}),k.default.register(c.default,e.default,a.default,n.default,T.default,O.default),b.default=y.default},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=p(1),k=function(){function w(y){this.domNode=y,this.domNode[P.DATA_KEY]={blot:this}}return Object.defineProperty(w.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),w.create=function(y){if(this.tagName==null)throw new P.ParchmentError("Blot definition missing tagName");var m;return Array.isArray(this.tagName)?(typeof y=="string"&&(y=y.toUpperCase(),parseInt(y).toString()===y&&(y=parseInt(y))),typeof y=="number"?m=document.createElement(this.tagName[y-1]):this.tagName.indexOf(y)>-1?m=document.createElement(y):m=document.createElement(this.tagName[0])):m=document.createElement(this.tagName),this.className&&m.classList.add(this.className),m},w.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},w.prototype.clone=function(){var y=this.domNode.cloneNode(!1);return P.create(y)},w.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[P.DATA_KEY]},w.prototype.deleteAt=function(y,m){var c=this.isolate(y,m);c.remove()},w.prototype.formatAt=function(y,m,c,u){var e=this.isolate(y,m);if(P.query(c,P.Scope.BLOT)!=null&&u)e.wrap(c,u);else if(P.query(c,P.Scope.ATTRIBUTE)!=null){var t=P.create(this.statics.scope);e.wrap(t),t.format(c,u)}},w.prototype.insertAt=function(y,m,c){var u=c==null?P.create("text",m):P.create(m,c),e=this.split(y);this.parent.insertBefore(u,e)},w.prototype.insertInto=function(y,m){m===void 0&&(m=null),this.parent!=null&&this.parent.children.remove(this);var c=null;y.children.insertBefore(this,m),m!=null&&(c=m.domNode),(this.domNode.parentNode!=y.domNode||this.domNode.nextSibling!=c)&&y.domNode.insertBefore(this.domNode,c),this.parent=y,this.attach()},w.prototype.isolate=function(y,m){var c=this.split(y);return c.split(m),c},w.prototype.length=function(){return 1},w.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)},w.prototype.optimize=function(y){this.domNode[P.DATA_KEY]!=null&&delete this.domNode[P.DATA_KEY].mutations},w.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},w.prototype.replace=function(y){y.parent!=null&&(y.parent.insertBefore(this,y.next),y.remove())},w.prototype.replaceWith=function(y,m){var c=typeof y=="string"?P.create(y,m):y;return c.replace(this),c},w.prototype.split=function(y,m){return y===0?this:this.next},w.prototype.update=function(y,m){},w.prototype.wrap=function(y,m){var c=typeof y=="string"?P.create(y,m):y;return this.parent!=null&&this.parent.insertBefore(c,this.next),c.appendChild(this),c},w.blotName="abstract",w}();b.default=k},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=p(12),k=p(32),w=p(33),y=p(1),m=function(){function c(u){this.attributes={},this.domNode=u,this.build()}return c.prototype.attribute=function(u,e){e?u.add(this.domNode,e)&&(u.value(this.domNode)!=null?this.attributes[u.attrName]=u:delete this.attributes[u.attrName]):(u.remove(this.domNode),delete this.attributes[u.attrName])},c.prototype.build=function(){var u=this;this.attributes={};var e=P.default.keys(this.domNode),t=k.default.keys(this.domNode),l=w.default.keys(this.domNode);e.concat(t).concat(l).forEach(function(o){var a=y.query(o,y.Scope.ATTRIBUTE);a instanceof P.default&&(u.attributes[a.attrName]=a)})},c.prototype.copy=function(u){var e=this;Object.keys(this.attributes).forEach(function(t){var l=e.attributes[t].value(e.domNode);u.format(t,l)})},c.prototype.move=function(u){var e=this;this.copy(u),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},c.prototype.values=function(){var u=this;return Object.keys(this.attributes).reduce(function(e,t){return e[t]=u.attributes[t].value(u.domNode),e},{})},c}();b.default=m},function(q,b,p){"use strict";var P=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var e in u)u.hasOwnProperty(e)&&(c[e]=u[e])};return function(c,u){m(c,u);function e(){this.constructor=c}c.prototype=u===null?Object.create(u):(e.prototype=u.prototype,new e)}}();Object.defineProperty(b,"__esModule",{value:!0});var k=p(12);function w(m,c){var u=m.getAttribute("class")||"";return u.split(/\s+/).filter(function(e){return e.indexOf(c+"-")===0})}var y=function(m){P(c,m);function c(){return m!==null&&m.apply(this,arguments)||this}return c.keys=function(u){return(u.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},c.prototype.add=function(u,e){return this.canAdd(u,e)?(this.remove(u),u.classList.add(this.keyName+"-"+e),!0):!1},c.prototype.remove=function(u){var e=w(u,this.keyName);e.forEach(function(t){u.classList.remove(t)}),u.classList.length===0&&u.removeAttribute("class")},c.prototype.value=function(u){var e=w(u,this.keyName)[0]||"",t=e.slice(this.keyName.length+1);return this.canAdd(u,t)?t:""},c}(k.default);b.default=y},function(q,b,p){"use strict";var P=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var e in u)u.hasOwnProperty(e)&&(c[e]=u[e])};return function(c,u){m(c,u);function e(){this.constructor=c}c.prototype=u===null?Object.create(u):(e.prototype=u.prototype,new e)}}();Object.defineProperty(b,"__esModule",{value:!0});var k=p(12);function w(m){var c=m.split("-"),u=c.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return c[0]+u}var y=function(m){P(c,m);function c(){return m!==null&&m.apply(this,arguments)||this}return c.keys=function(u){return(u.getAttribute("style")||"").split(";").map(function(e){var t=e.split(":");return t[0].trim()})},c.prototype.add=function(u,e){return this.canAdd(u,e)?(u.style[w(this.keyName)]=e,!0):!1},c.prototype.remove=function(u){u.style[w(this.keyName)]="",u.getAttribute("style")||u.removeAttribute("style")},c.prototype.value=function(u){var e=u.style[w(this.keyName)];return this.canAdd(u,e)?e:""},c}(k.default);b.default=y},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function y(m,c){for(var u=0;ux&&this.stack.undo.length>0){var v=this.stack.undo.pop();O=O.compose(v.undo),T=v.redo.compose(T)}else this.lastRecorded=x;this.stack.undo.push({redo:T,undo:O}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(T){this.stack.undo.forEach(function(g){g.undo=T.transform(g.undo,!0),g.redo=T.transform(g.redo,!0)}),this.stack.redo.forEach(function(g){g.undo=T.transform(g.undo,!0),g.redo=T.transform(g.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),n}(u.default);a.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function r(s){var n=s.ops[s.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(` `):n.attributes!=null?Object.keys(n.attributes).some(function(f){return w.default.query(f,w.default.Scope.BLOCK)!=null}):!1}function i(s){var n=s.reduce(function(T,g){return T+=g.delete||0,T},0),f=s.length()-n;return r(s)&&(f-=1),f}b.default=a,b.getLastChangeIndex=i},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.BaseTooltip=void 0;var P=function(){function S(M,F){for(var D=0;D0&&arguments[0]!==void 0?arguments[0]:"link",_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),_!=null?this.textbox.value=_:D!==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-"+D)||""),this.root.setAttribute("data-mode",D)}},{key:"restoreFocus",value:function(){var D=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=D}},{key:"save",value:function(){var D=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var _=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",D,e.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",D,e.default.sources.USER)),this.quill.root.scrollTop=_;break}case"video":D=L(D);case"formula":{if(!D)break;var j=this.quill.getSelection(!0);if(j!=null){var H=j.index+j.length;this.quill.insertEmbed(H,this.root.getAttribute("data-mode"),D,e.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(H+1," ",e.default.sources.USER),this.quill.setSelection(H+2,e.default.sources.USER)}break}default:}this.textbox.value="",this.hide()}}]),M}(O.default);function L(S){var M=S.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||S.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return M?(M[1]||"https")+"://www.youtube.com/embed/"+M[2]+"?showinfo=0":(M=S.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(M[1]||"https")+"://player.vimeo.com/video/"+M[2]+"/":S}function A(S,M){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;M.forEach(function(D){var _=document.createElement("option");D===F?_.setAttribute("selected","selected"):_.setAttribute("value",D),S.appendChild(_)})}b.BaseTooltip=I,b.default=$},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function k(){this.head=this.tail=null,this.length=0}return k.prototype.append=function(){for(var w=[],y=0;y1&&this.append.apply(this,w.slice(1))},k.prototype.contains=function(w){for(var y,m=this.iterator();y=m();)if(y===w)return!0;return!1},k.prototype.insertBefore=function(w,y){w&&(w.next=y,y!=null?(w.prev=y.prev,y.prev!=null&&(y.prev.next=w),y.prev=w,y===this.head&&(this.head=w)):this.tail!=null?(this.tail.next=w,w.prev=this.tail,this.tail=w):(w.prev=null,this.head=this.tail=w),this.length+=1)},k.prototype.offset=function(w){for(var y=0,m=this.head;m!=null;){if(m===w)return y;y+=m.length(),m=m.next}return-1},k.prototype.remove=function(w){this.contains(w)&&(w.prev!=null&&(w.prev.next=w.next),w.next!=null&&(w.next.prev=w.prev),w===this.head&&(this.head=w.next),w===this.tail&&(this.tail=w.prev),this.length-=1)},k.prototype.iterator=function(w){return w===void 0&&(w=this.head),function(){var y=w;return w!=null&&(w=w.next),y}},k.prototype.find=function(w,y){y===void 0&&(y=!1);for(var m,c=this.iterator();m=c();){var u=m.length();if(wl?m(t,w-l,Math.min(y,l+a-w)):m(t,0,Math.min(a,w+y-l)),l+=a}},k.prototype.map=function(w){return this.reduce(function(y,m){return y.push(w(m)),y},[])},k.prototype.reduce=function(w,y){for(var m,c=this.iterator();m=c();)y=w(y,m);return y},k}();b.default=P},function(q,b,p){"use strict";var P=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var l in t)t.hasOwnProperty(l)&&(e[l]=t[l])};return function(e,t){u(e,t);function l(){this.constructor=e}e.prototype=t===null?Object.create(t):(l.prototype=t.prototype,new l)}}();Object.defineProperty(b,"__esModule",{value:!0});var k=p(17),w=p(1),y={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},m=100,c=function(u){P(e,u);function e(t){var l=u.call(this,t)||this;return l.scroll=l,l.observer=new MutationObserver(function(o){l.update(o)}),l.observer.observe(l.domNode,y),l.attach(),l}return e.prototype.detach=function(){u.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(t,l){this.update(),t===0&&l===this.length()?this.children.forEach(function(o){o.remove()}):u.prototype.deleteAt.call(this,t,l)},e.prototype.formatAt=function(t,l,o,a){this.update(),u.prototype.formatAt.call(this,t,l,o,a)},e.prototype.insertAt=function(t,l,o){this.update(),u.prototype.insertAt.call(this,t,l,o)},e.prototype.optimize=function(t,l){var o=this;t===void 0&&(t=[]),l===void 0&&(l={}),u.prototype.optimize.call(this,l);for(var a=[].slice.call(this.observer.takeRecords());a.length>0;)t.push(a.pop());for(var r=function(f,T){T===void 0&&(T=!0),!(f==null||f===o)&&f.domNode.parentNode!=null&&(f.domNode[w.DATA_KEY].mutations==null&&(f.domNode[w.DATA_KEY].mutations=[]),T&&r(f.parent))},i=function(f){f.domNode[w.DATA_KEY]==null||f.domNode[w.DATA_KEY].mutations==null||(f instanceof k.default&&f.children.forEach(i),f.optimize(l))},s=t,n=0;s.length>0;n+=1){if(n>=m)throw new Error("[Parchment] Maximum optimize iterations reached");for(s.forEach(function(f){var T=w.find(f.target,!0);T!=null&&(T.domNode===f.target&&(f.type==="childList"?(r(w.find(f.previousSibling,!1)),[].forEach.call(f.addedNodes,function(g){var O=w.find(g,!1);r(O,!1),O instanceof k.default&&O.children.forEach(function(x){r(x,!1)})})):f.type==="attributes"&&r(T.prev)),r(T))}),this.children.forEach(i),s=[].slice.call(this.observer.takeRecords()),a=s.slice();a.length>0;)t.push(a.pop())}},e.prototype.update=function(t,l){var o=this;l===void 0&&(l={}),t=t||this.observer.takeRecords(),t.map(function(a){var r=w.find(a.target,!0);return r==null?null:r.domNode[w.DATA_KEY].mutations==null?(r.domNode[w.DATA_KEY].mutations=[a],r):(r.domNode[w.DATA_KEY].mutations.push(a),null)}).forEach(function(a){a==null||a===o||a.domNode[w.DATA_KEY]==null||a.update(a.domNode[w.DATA_KEY].mutations||[],l)}),this.domNode[w.DATA_KEY].mutations!=null&&u.prototype.update.call(this,this.domNode[w.DATA_KEY].mutations,l),this.optimize(t,l)},e.blotName="scroll",e.defaultChild="block",e.scope=w.Scope.BLOCK_BLOT,e.tagName="DIV",e}(k.default);b.default=c},function(q,b,p){"use strict";var P=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,e){u.__proto__=e}||function(u,e){for(var t in e)e.hasOwnProperty(t)&&(u[t]=e[t])};return function(u,e){c(u,e);function t(){this.constructor=u}u.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}();Object.defineProperty(b,"__esModule",{value:!0});var k=p(18),w=p(1);function y(c,u){if(Object.keys(c).length!==Object.keys(u).length)return!1;for(var e in c)if(c[e]!==u[e])return!1;return!0}var m=function(c){P(u,c);function u(){return c!==null&&c.apply(this,arguments)||this}return u.formats=function(e){if(e.tagName!==u.tagName)return c.formats.call(this,e)},u.prototype.format=function(e,t){var l=this;e===this.statics.blotName&&!t?(this.children.forEach(function(o){o instanceof k.default||(o=o.wrap(u.blotName,!0)),l.attributes.copy(o)}),this.unwrap()):c.prototype.format.call(this,e,t)},u.prototype.formatAt=function(e,t,l,o){if(this.formats()[l]!=null||w.query(l,w.Scope.ATTRIBUTE)){var a=this.isolate(e,t);a.format(l,o)}else c.prototype.formatAt.call(this,e,t,l,o)},u.prototype.optimize=function(e){c.prototype.optimize.call(this,e);var t=this.formats();if(Object.keys(t).length===0)return this.unwrap();var l=this.next;l instanceof u&&l.prev===this&&y(t,l.formats())&&(l.moveChildren(this),l.remove())},u.blotName="inline",u.scope=w.Scope.INLINE_BLOT,u.tagName="SPAN",u}(k.default);b.default=m},function(q,b,p){"use strict";var P=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var e in u)u.hasOwnProperty(e)&&(c[e]=u[e])};return function(c,u){m(c,u);function e(){this.constructor=c}c.prototype=u===null?Object.create(u):(e.prototype=u.prototype,new e)}}();Object.defineProperty(b,"__esModule",{value:!0});var k=p(18),w=p(1),y=function(m){P(c,m);function c(){return m!==null&&m.apply(this,arguments)||this}return c.formats=function(u){var e=w.query(c.blotName).tagName;if(u.tagName!==e)return m.formats.call(this,u)},c.prototype.format=function(u,e){w.query(u,w.Scope.BLOCK)!=null&&(u===this.statics.blotName&&!e?this.replaceWith(c.blotName):m.prototype.format.call(this,u,e))},c.prototype.formatAt=function(u,e,t,l){w.query(t,w.Scope.BLOCK)!=null?this.format(t,l):m.prototype.formatAt.call(this,u,e,t,l)},c.prototype.insertAt=function(u,e,t){if(t==null||w.query(e,w.Scope.INLINE)!=null)m.prototype.insertAt.call(this,u,e,t);else{var l=this.split(u),o=w.create(e,t);l.parent.insertBefore(o,l)}},c.prototype.update=function(u,e){navigator.userAgent.match(/Trident/)?this.build():m.prototype.update.call(this,u,e)},c.blotName="block",c.scope=w.Scope.BLOCK_BLOT,c.tagName="P",c}(k.default);b.default=y},function(q,b,p){"use strict";var P=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,c){m.__proto__=c}||function(m,c){for(var u in c)c.hasOwnProperty(u)&&(m[u]=c[u])};return function(m,c){y(m,c);function u(){this.constructor=m}m.prototype=c===null?Object.create(c):(u.prototype=c.prototype,new u)}}();Object.defineProperty(b,"__esModule",{value:!0});var k=p(19),w=function(y){P(m,y);function m(){return y!==null&&y.apply(this,arguments)||this}return m.formats=function(c){},m.prototype.format=function(c,u){y.prototype.formatAt.call(this,0,this.length(),c,u)},m.prototype.formatAt=function(c,u,e,t){c===0&&u===this.length()?this.format(e,t):y.prototype.formatAt.call(this,c,u,e,t)},m.prototype.formats=function(){return this.statics.formats(this.domNode)},m}(k.default);b.default=w},function(q,b,p){"use strict";var P=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var e in u)u.hasOwnProperty(e)&&(c[e]=u[e])};return function(c,u){m(c,u);function e(){this.constructor=c}c.prototype=u===null?Object.create(u):(e.prototype=u.prototype,new e)}}();Object.defineProperty(b,"__esModule",{value:!0});var k=p(19),w=p(1),y=function(m){P(c,m);function c(u){var e=m.call(this,u)||this;return e.text=e.statics.value(e.domNode),e}return c.create=function(u){return document.createTextNode(u)},c.value=function(u){var e=u.data;return e.normalize&&(e=e.normalize()),e},c.prototype.deleteAt=function(u,e){this.domNode.data=this.text=this.text.slice(0,u)+this.text.slice(u+e)},c.prototype.index=function(u,e){return this.domNode===u?e:-1},c.prototype.insertAt=function(u,e,t){t==null?(this.text=this.text.slice(0,u)+e+this.text.slice(u),this.domNode.data=this.text):m.prototype.insertAt.call(this,u,e,t)},c.prototype.length=function(){return this.text.length},c.prototype.optimize=function(u){m.prototype.optimize.call(this,u),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof c&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},c.prototype.position=function(u,e){return e===void 0&&(e=!1),[this.domNode,u]},c.prototype.split=function(u,e){if(e===void 0&&(e=!1),!e){if(u===0)return this;if(u===this.length())return this.next}var t=w.create(this.domNode.splitText(u));return this.parent.insertBefore(t,this.next),this.text=this.statics.value(this.domNode),t},c.prototype.update=function(u,e){var t=this;u.some(function(l){return l.type==="characterData"&&l.target===t.domNode})&&(this.text=this.statics.value(this.domNode))},c.prototype.value=function(){return this.text},c.blotName="text",c.scope=w.Scope.INLINE_BLOT,c}(k.default);b.default=y},function(q,b,p){"use strict";var P=document.createElement("div");if(P.classList.toggle("test-class",!1),P.classList.contains("test-class")){var k=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(w,y){return arguments.length>1&&!this.contains(w)==!y?y:k.call(this,w)}}String.prototype.startsWith||(String.prototype.startsWith=function(w,y){return y=y||0,this.substr(y,w.length)===w}),String.prototype.endsWith||(String.prototype.endsWith=function(w,y){var m=this.toString();(typeof y!="number"||!isFinite(y)||Math.floor(y)!==y||y>m.length)&&(y=m.length),y-=w.length;var c=m.indexOf(w,y);return c!==-1&&c===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 m=Object(this),c=m.length>>>0,u=arguments[1],e,t=0;tf.length?n:f,O=n.length>f.length?f:n,x=g.indexOf(O);if(x!=-1)return T=[[P,g.substring(0,x)],[k,O],[P,g.substring(x+O.length)]],n.length>f.length&&(T[0][0]=T[2][0]=p),T;if(O.length==1)return[[p,n],[P,f]];var v=t(n,f);if(v){var h=v[0],d=v[1],E=v[2],N=v[3],R=v[4],B=w(h,E),C=w(d,N);return B.concat([[k,R]],C)}return m(n,f)}function m(n,f){for(var T=n.length,g=f.length,O=Math.ceil((T+g)/2),x=O,v=2*O,h=new Array(v),d=new Array(v),E=0;ET)C+=2;else if(F>g)B+=2;else if(R){var D=x+N-A;if(D>=0&&D=_)return c(n,f,M,F)}}}for(var j=-L+$;j<=L-I;j+=2){var D=x+j,_;j==-L||j!=L&&d[D-1]T)I+=2;else if(H>g)$+=2;else if(!R){var S=x+N-j;if(S>=0&&S=_)return c(n,f,M,F)}}}}return[[p,n],[P,f]]}function c(n,f,T,g){var O=n.substring(0,T),x=f.substring(0,g),v=n.substring(T),h=f.substring(g),d=w(O,x),E=w(v,h);return d.concat(E)}function u(n,f){if(!n||!f||n.charAt(0)!=f.charAt(0))return 0;for(var T=0,g=Math.min(n.length,f.length),O=g,x=0;Tf.length?n:f,g=n.length>f.length?f:n;if(T.length<4||g.length*2=C.length?[M,F,D,_,S]:null}var x=O(T,g,Math.ceil(T.length/4)),v=O(T,g,Math.ceil(T.length/2)),h;if(!x&&!v)return null;v?x?h=x[4].length>v[4].length?x:v:h=v:h=x;var d,E,N,R;n.length>f.length?(d=h[0],E=h[1],N=h[2],R=h[3]):(N=h[0],R=h[1],d=h[2],E=h[3]);var B=h[4];return[d,E,N,R,B]}function l(n){n.push([k,""]);for(var f=0,T=0,g=0,O="",x="",v;f1?(T!==0&&g!==0&&(v=u(x,O),v!==0&&(f-T-g>0&&n[f-T-g-1][0]==k?n[f-T-g-1][1]+=x.substring(0,v):(n.splice(0,0,[k,x.substring(0,v)]),f++),x=x.substring(v),O=O.substring(v)),v=e(x,O),v!==0&&(n[f][1]=x.substring(x.length-v)+n[f][1],x=x.substring(0,x.length-v),O=O.substring(0,O.length-v))),T===0?n.splice(f-g,T+g,[P,x]):g===0?n.splice(f-T,T+g,[p,O]):n.splice(f-T-g,T+g,[p,O],[P,x]),f=f-T-g+(T?1:0)+(g?1:0)+1):f!==0&&n[f-1][0]==k?(n[f-1][1]+=n[f][1],n.splice(f,1)):f++,g=0,T=0,O="",x="";break}n[n.length-1][1]===""&&n.pop();var h=!1;for(f=1;f0&&g.splice(O+2,0,[v[0],h]),s(g,O,3)}else return n}function i(n){for(var f=!1,T=function(v){return v.charCodeAt(0)>=56320&&v.charCodeAt(0)<=57343},g=function(v){return v.charCodeAt(v.length-1)>=55296&&v.charCodeAt(v.length-1)<=56319},O=2;O0&&x.push(n[O]);return x}function s(n,f,T){for(var g=f+T-1;g>=0&&g>=f-1;g--)if(g+1\r?\n +\<"),this.convert();var Z=this.quill.getFormat(this.quill.selection.savedRange.index);if(Z[g.default.blotName]){var J=this.container.innerText;return this.container.innerHTML="",new u.default().insert(J,E({},g.default.blotName,Z[g.default.blotName]))}var Q=this.prepareMatching(),tt=k(Q,2),lt=tt[0],ct=tt[1],it=j(this.container,lt,ct);return D(it,` `)&&it.ops[it.ops.length-1].attributes==null&&(it=it.compose(new u.default().retain(it.length()-1).delete(1))),C.log("convert",this.container.innerHTML,it),this.container.innerHTML="",it}},{key:"dangerouslyPasteHTML",value:function(V,Z){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o.default.sources.API;if(typeof V=="string")this.quill.setContents(this.convert(V),Z),this.quill.setSelection(0,o.default.sources.SILENT);else{var Q=this.convert(Z);this.quill.updateContents(new u.default().retain(V).concat(Q),J),this.quill.setSelection(V+Q.length(),o.default.sources.SILENT)}}},{key:"onPaste",value:function(V){var Z=this;if(!(V.defaultPrevented||!this.quill.isEnabled())){var J=this.quill.getSelection(),Q=new u.default().retain(J.index),tt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(o.default.sources.SILENT),setTimeout(function(){Q=Q.concat(Z.convert()).delete(J.length),Z.quill.updateContents(Q,o.default.sources.USER),Z.quill.setSelection(Q.length()-J.length,o.default.sources.SILENT),Z.quill.scrollingContainer.scrollTop=tt,Z.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var V=this,Z=[],J=[];return this.matchers.forEach(function(Q){var tt=k(Q,2),lt=tt[0],ct=tt[1];switch(lt){case Node.TEXT_NODE:J.push(ct);break;case Node.ELEMENT_NODE:Z.push(ct);break;default:[].forEach.call(V.container.querySelectorAll(lt),function(it){it[$]=it[$]||[],it[$].push(ct)});break}}),[Z,J]}}]),z}(s.default);S.DEFAULTS={matchers:[],matchVisual:!0};function M(K,z,G){return(typeof z=="undefined"?"undefined":P(z))==="object"?Object.keys(z).reduce(function(V,Z){return M(V,Z,z[Z])},K):K.reduce(function(V,Z){return Z.attributes&&Z.attributes[z]?V.push(Z):V.insert(Z.insert,(0,m.default)({},E({},z,G),Z.attributes))},new u.default)}function F(K){if(K.nodeType!==Node.ELEMENT_NODE)return{};var z="__ql-computed-style";return K[z]||(K[z]=window.getComputedStyle(K))}function D(K,z){for(var G="",V=K.ops.length-1;V>=0&&G.length-1}function j(K,z,G){return K.nodeType===K.TEXT_NODE?G.reduce(function(V,Z){return Z(K,V)},new u.default):K.nodeType===K.ELEMENT_NODE?[].reduce.call(K.childNodes||[],function(V,Z){var J=j(Z,z,G);return Z.nodeType===K.ELEMENT_NODE&&(J=z.reduce(function(Q,tt){return tt(Z,Q)},J),J=(Z[$]||[]).reduce(function(Q,tt){return tt(Z,Q)},J)),V.concat(J)},new u.default):new u.default}function H(K,z,G){return M(G,K,!0)}function U(K,z){var G=t.default.Attributor.Attribute.keys(K),V=t.default.Attributor.Class.keys(K),Z=t.default.Attributor.Style.keys(K),J={};return G.concat(V).concat(Z).forEach(function(Q){var tt=t.default.query(Q,t.default.Scope.ATTRIBUTE);tt!=null&&(J[tt.attrName]=tt.value(K),J[tt.attrName])||(tt=L[Q],tt!=null&&(tt.attrName===Q||tt.keyName===Q)&&(J[tt.attrName]=tt.value(K)||void 0),tt=A[Q],tt!=null&&(tt.attrName===Q||tt.keyName===Q)&&(tt=A[Q],J[tt.attrName]=tt.value(K)||void 0))}),Object.keys(J).length>0&&(z=M(z,J)),z}function W(K,z){var G=t.default.query(K);if(G==null)return z;if(G.prototype instanceof t.default.Embed){var V={},Z=G.value(K);Z!=null&&(V[G.blotName]=Z,z=new u.default().insert(V,G.formats(K)))}else typeof G.formats=="function"&&(z=M(z,G.blotName,G.formats(K)));return z}function Y(K,z){return D(z,` `)||z.insert(` `),z}function et(){return new u.default}function nt(K,z){var G=t.default.query(K);if(G==null||G.blotName!=="list-item"||!D(z,` `))return z;for(var V=-1,Z=K.parentNode;!Z.classList.contains("ql-clipboard");)(t.default.query(Z)||{}).blotName==="list"&&(V+=1),Z=Z.parentNode;return V<=0?z:z.compose(new u.default().retain(z.length()-1).retain(1,{indent:V}))}function rt(K,z){return D(z,` `)||(_(K)||z.length()>0&&K.nextSibling&&_(K.nextSibling))&&z.insert(` `),z}function at(K,z){if(_(K)&&K.nextElementSibling!=null&&!D(z,` `)){var G=K.offsetHeight+parseFloat(F(K).marginTop)+parseFloat(F(K).marginBottom);K.nextElementSibling.offsetTop>K.offsetTop+G*1.5&&z.insert(` `)}return z}function ft(K,z){var G={},V=K.style||{};return V.fontStyle&&F(K).fontStyle==="italic"&&(G.italic=!0),V.fontWeight&&(F(K).fontWeight.startsWith("bold")||parseInt(F(K).fontWeight)>=700)&&(G.bold=!0),Object.keys(G).length>0&&(z=M(z,G)),parseFloat(V.textIndent||0)>0&&(z=new u.default().insert(" ").concat(z)),z}function st(K,z){var G=K.data;if(K.parentNode.tagName==="O:P")return z.insert(G.trim());if(G.trim().length===0&&K.parentNode.classList.contains("ql-clipboard"))return z;if(!F(K.parentNode).whiteSpace.startsWith("pre")){var V=function(J,Q){return Q=Q.replace(/[^\u00a0]/g,""),Q.length<1&&J?" ":Q};G=G.replace(/\r\n/g," ").replace(/\n/g," "),G=G.replace(/\s\s+/g,V.bind(V,!0)),(K.previousSibling==null&&_(K.parentNode)||K.previousSibling!=null&&_(K.previousSibling))&&(G=G.replace(/^\s+/,V.bind(V,!1))),(K.nextSibling==null&&_(K.parentNode)||K.nextSibling!=null&&_(K.nextSibling))&&(G=G.replace(/\s+$/,V.bind(V,!1)))}return z.insert(G)}b.default=S,b.matchAttributor=U,b.matchBlot=W,b.matchNewline=rt,b.matchSpacing=at,b.matchText=st},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function l(o,a){for(var r=0;r '},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function l(o,a){for(var r=0;rt.right&&(o=t.right-l.right,this.root.style.left=u+o+"px"),l.leftt.bottom){var a=l.bottom-l.top,r=c.bottom-c.top+a;this.root.style.top=e-r+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),y}();b.default=w},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function v(h,d){var E=[],N=!0,R=!1,B=void 0;try{for(var C=h[Symbol.iterator](),$;!(N=($=C.next()).done)&&(E.push($.value),!(d&&E.length===d));N=!0);}catch(I){R=!0,B=I}finally{try{!N&&C.return&&C.return()}finally{if(R)throw B}}return E}return function(h,d){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return v(h,d);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),k=function v(h,d,E){h===null&&(h=Function.prototype);var N=Object.getOwnPropertyDescriptor(h,d);if(N===void 0){var R=Object.getPrototypeOf(h);return R===null?void 0:v(R,d,E)}else{if("value"in N)return N.value;var B=N.get;return B===void 0?void 0:B.call(E)}},w=function(){function v(h,d){for(var E=0;E','','',''].join(""),b.default=O},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=p(29),k=Z(P),w=p(36),y=p(38),m=p(64),c=p(65),u=Z(c),e=p(66),t=Z(e),l=p(67),o=Z(l),a=p(37),r=p(26),i=p(39),s=p(40),n=p(56),f=Z(n),T=p(68),g=Z(T),O=p(27),x=Z(O),v=p(69),h=Z(v),d=p(70),E=Z(d),N=p(71),R=Z(N),B=p(72),C=Z(B),$=p(73),I=Z($),L=p(13),A=Z(L),S=p(74),M=Z(S),F=p(75),D=Z(F),_=p(57),j=Z(_),H=p(41),U=Z(H),W=p(28),Y=Z(W),et=p(59),nt=Z(et),rt=p(60),at=Z(rt),ft=p(61),st=Z(ft),K=p(108),z=Z(K),G=p(62),V=Z(G);function Z(J){return J&&J.__esModule?J:{default:J}}k.default.register({"attributors/attribute/direction":y.DirectionAttribute,"attributors/class/align":w.AlignClass,"attributors/class/background":a.BackgroundClass,"attributors/class/color":r.ColorClass,"attributors/class/direction":y.DirectionClass,"attributors/class/font":i.FontClass,"attributors/class/size":s.SizeClass,"attributors/style/align":w.AlignStyle,"attributors/style/background":a.BackgroundStyle,"attributors/style/color":r.ColorStyle,"attributors/style/direction":y.DirectionStyle,"attributors/style/font":i.FontStyle,"attributors/style/size":s.SizeStyle},!0),k.default.register({"formats/align":w.AlignClass,"formats/direction":y.DirectionClass,"formats/indent":m.IndentClass,"formats/background":a.BackgroundStyle,"formats/color":r.ColorStyle,"formats/font":i.FontClass,"formats/size":s.SizeClass,"formats/blockquote":u.default,"formats/code-block":A.default,"formats/header":t.default,"formats/list":o.default,"formats/bold":f.default,"formats/code":L.Code,"formats/italic":g.default,"formats/link":x.default,"formats/script":h.default,"formats/strike":E.default,"formats/underline":R.default,"formats/image":C.default,"formats/video":I.default,"formats/list/item":l.ListItem,"modules/formula":M.default,"modules/syntax":D.default,"modules/toolbar":j.default,"themes/bubble":z.default,"themes/snow":V.default,"ui/icons":U.default,"ui/picker":Y.default,"ui/icon-picker":at.default,"ui/color-picker":nt.default,"ui/tooltip":st.default},!0),b.default=k.default},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.IndentClass=void 0;var P=function(){function o(a,r){for(var i=0;i0&&this.children.tail.format(g,O)}},{key:"formats",value:function(){return l({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(g,O){if(g instanceof i)k(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"insertBefore",this).call(this,g,O);else{var x=O==null?this.length():O.offset(this),v=this.split(x);v.parent.insertBefore(g,v)}}},{key:"optimize",value:function(g){k(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"optimize",this).call(this,g);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(g){if(g.statics.blotName!==this.statics.blotName){var O=y.default.create(this.statics.defaultChild);g.moveChildren(O),this.appendChild(O)}k(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"replace",this).call(this,g)}}]),f}(e.default);s.blotName="list",s.scope=y.default.Scope.BLOCK_BLOT,s.tagName=["OL","UL"],s.defaultChild="list-item",s.allowedChildren=[i],b.ListItem=i,b.default=s},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=p(56),k=w(P);function w(e){return e&&e.__esModule?e:{default:e}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function c(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(e){c(t,e);function t(){return y(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(k.default);u.blotName="italic",u.tagName=["EM","I"],b.default=u},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function l(o,a){for(var r=0;r-1?n?this.domNode.setAttribute(s,n):this.domNode.removeAttribute(s):k(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,s,n)}}],[{key:"create",value:function(s){var n=k(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,s);return typeof s=="string"&&n.setAttribute("src",this.sanitize(s)),n}},{key:"formats",value:function(s){return l.reduce(function(n,f){return s.hasAttribute(f)&&(n[f]=s.getAttribute(f)),n},{})}},{key:"match",value:function(s){return/\.(jpe?g|gif|png)$/.test(s)||/^data:image\/.+;base64/.test(s)}},{key:"sanitize",value:function(s){return(0,m.sanitize)(s,["http","https","data"])?s:"//:0"}},{key:"value",value:function(s){return s.getAttribute("src")}}]),r}(y.default.Embed);o.blotName="image",o.tagName="IMG",b.default=o},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var P=function(){function a(r,i){for(var s=0;s-1?n?this.domNode.setAttribute(s,n):this.domNode.removeAttribute(s):k(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,s,n)}}],[{key:"create",value:function(s){var n=k(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,s);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(s)),n}},{key:"formats",value:function(s){return l.reduce(function(n,f){return s.hasAttribute(f)&&(n[f]=s.getAttribute(f)),n},{})}},{key:"sanitize",value:function(s){return m.default.sanitize(s)}},{key:"value",value:function(s){return s.getAttribute("src")}}]),r}(w.BlockEmbed);o.blotName="video",o.className="ql-video",o.tagName="IFRAME",b.default=o},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.FormulaBlot=void 0;var P=function(){function s(n,f){for(var T=0;T0||this.cachedText==null)&&(this.domNode.innerHTML=x(v),this.domNode.normalize(),this.attach()),this.cachedText=v)}}]),g}(l.default);s.className="ql-syntax";var n=new y.default.Attributor.Class("token","hljs",{scope:y.default.Scope.INLINE}),f=function(T){i(g,T),P(g,null,[{key:"register",value:function(){c.default.register(n,!0),c.default.register(s,!0)}}]);function g(O,x){a(this,g);var v=r(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,O,x));if(typeof v.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var h=null;return v.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(h),h=setTimeout(function(){v.highlight(),h=null},v.options.interval)}),v.highlight(),v}return P(g,[{key:"highlight",value:function(){var x=this;if(!this.quill.selection.composing){this.quill.update(c.default.sources.USER);var v=this.quill.getSelection();this.quill.scroll.descendants(s).forEach(function(h){h.highlight(x.options.highlight)}),this.quill.update(c.default.sources.SILENT),v!=null&&this.quill.setSelection(v,c.default.sources.SILENT)}}}]),g}(e.default);f.DEFAULTS={highlight:function(){return window.hljs==null?null:function(T){var g=window.hljs.highlightAuto(T);return g.value}}(),interval:1e3},b.CodeBlock=s,b.CodeToken=n,b.default=f},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b){q.exports=' '},function(q,b,p){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=b.BubbleTooltip=void 0;var P=function g(O,x,v){O===null&&(O=Function.prototype);var h=Object.getOwnPropertyDescriptor(O,x);if(h===void 0){var d=Object.getPrototypeOf(O);return d===null?void 0:g(d,x,v)}else{if("value"in h)return h.value;var E=h.get;return E===void 0?void 0:E.call(v)}},k=function(){function g(O,x){for(var v=0;v0&&R===c.default.sources.USER){h.show(),h.root.style.left="0px",h.root.style.width="",h.root.style.width=h.root.offsetWidth+"px";var B=h.quill.getLines(E.index,E.length);if(B.length===1)h.position(h.quill.getBounds(E));else{var C=B[B.length-1],$=h.quill.getIndex(C),I=Math.min(C.length()-1,E.index+E.length-$),L=h.quill.getBounds(new t.Range($,I));h.position(L)}}else document.activeElement!==h.textbox&&h.quill.hasFocus()&&h.hide()}),h}return k(O,[{key:"listen",value:function(){var v=this;P(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){v.root.classList.remove("ql-editing")}),this.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!v.root.classList.contains("ql-hidden")){var h=v.quill.getSelection();h!=null&&v.position(v.quill.getBounds(h))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(v){var h=P(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"position",this).call(this,v),d=this.root.querySelector(".ql-tooltip-arrow");if(d.style.marginLeft="",h===0)return h;d.style.marginLeft=-1*h-d.offsetWidth/2+"px"}}]),O}(u.BaseTooltip);T.TEMPLATE=['','
','','',"
"].join(""),b.BubbleTooltip=T,b.default=f},function(q,b,p){q.exports=p(63)}]).default})},18123:function(vt,ht,X){"use strict";var ot=this&&this.__extends||function(){var u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var a in o)o.hasOwnProperty(a)&&(l[a]=o[a])},u(e,t)};return function(e,t){u(e,t);function l(){this.constructor=e}e.prototype=t===null?Object.create(t):(l.prototype=t.prototype,new l)}}(),q=this&&this.__assign||function(){return q=Object.assign||function(u){for(var e,t=1,l=arguments.length;t1)throw new Error("The Quill editing area can only be composed of a single React element.");if(P.default.Children.count(t.children)){var o=P.default.Children.only(t.children);if(((l=o)===null||l===void 0?void 0:l.type)==="textarea")throw new Error("Quill does not support editing on a