From 2dd34a41856c423c44dd56d14da117ecd5b367ba Mon Sep 17 00:00:00 2001 From: gigamaster <1905497+gigamaster@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:01:19 +0100 Subject: [PATCH] reactjs getStandardName --- app/tools/notes/asset-manifest.json | 6 +++--- app/tools/notes/index.html | 2 +- .../notes/static/js/{main.54fcc67e.js => main.5915b474.js} | 6 +++--- ...54fcc67e.js.LICENSE.txt => main.5915b474.js.LICENSE.txt} | 0 .../js/{main.54fcc67e.js.map => main.5915b474.js.map} | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename app/tools/notes/static/js/{main.54fcc67e.js => main.5915b474.js} (93%) rename app/tools/notes/static/js/{main.54fcc67e.js.LICENSE.txt => main.5915b474.js.LICENSE.txt} (100%) rename app/tools/notes/static/js/{main.54fcc67e.js.map => main.5915b474.js.map} (57%) diff --git a/app/tools/notes/asset-manifest.json b/app/tools/notes/asset-manifest.json index 5543a26..8731a3d 100644 --- a/app/tools/notes/asset-manifest.json +++ b/app/tools/notes/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "/codemo/tools/notes/static/css/main.516d29e3.css", - "main.js": "/codemo/tools/notes/static/js/main.54fcc67e.js", + "main.js": "/codemo/tools/notes/static/js/main.5915b474.js", "static/media/error404.png": "/codemo/tools/notes/static/media/error404.9884765d176951ea97fa.png", "static/media/nomadenotes.png": "/codemo/tools/notes/static/media/nomadenotes.9884765d176951ea97fa.png", "index.html": "/codemo/tools/notes/index.html", "main.516d29e3.css.map": "/codemo/tools/notes/static/css/main.516d29e3.css.map", - "main.54fcc67e.js.map": "/codemo/tools/notes/static/js/main.54fcc67e.js.map" + "main.5915b474.js.map": "/codemo/tools/notes/static/js/main.5915b474.js.map" }, "entrypoints": [ "static/css/main.516d29e3.css", - "static/js/main.54fcc67e.js" + "static/js/main.5915b474.js" ] } \ No newline at end of file diff --git a/app/tools/notes/index.html b/app/tools/notes/index.html index 4514f1a..7faf908 100644 --- a/app/tools/notes/index.html +++ b/app/tools/notes/index.html @@ -1 +1 @@ -Codemo Digital Nomad Notes
\ No newline at end of file +Codemo Digital Nomad Notes
\ No newline at end of file diff --git a/app/tools/notes/static/js/main.54fcc67e.js b/app/tools/notes/static/js/main.5915b474.js similarity index 93% rename from app/tools/notes/static/js/main.54fcc67e.js rename to app/tools/notes/static/js/main.5915b474.js index d8af2c5..b9ba1fd 100644 --- a/app/tools/notes/static/js/main.54fcc67e.js +++ b/app/tools/notes/static/js/main.5915b474.js @@ -1,3 +1,3 @@ -/*! For license information please see main.54fcc67e.js.LICENSE.txt */ -!function(){var e={446:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",l="day",u="week",s="month",c="quarter",f="year",d="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},m=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:m,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+m(r,2,"0")+":"+m(o,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var l=t.name;x[l]=t,o=l}return!r&&o&&(b=o),o||!r&&b},k=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},O=g;O.l=_,O.i=w,O.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function y(e){this.$L=_(e.locale,null,!0),this.parse(e)}var m=y.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(O.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},m.isAfter=function(e,t){return k(e)/i,a=//i,l=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},u=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},s="object"===typeof window&&window.DOMParser;if("function"===typeof s){var c=new s;l=u=function(e,t){return t&&(e="<"+t+">"+e+""),c.parseFromString(e,"text/html")}}if("object"===typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();l=function(e,t){return t?(f.documentElement.querySelector(t).innerHTML=e,f):(f.documentElement.innerHTML=e,f)}}var d,p="object"===typeof document?document.createElement("template"):{};p.content&&(d=function(e){return p.innerHTML=e,p.content.childNodes}),e.exports=function(e){var s,c,f,p,h=e.match(o);switch(h&&h[1]&&(s=h[1].toLowerCase()),s){case t:return c=u(e),i.test(e)||(f=c.querySelector(n))&&f.parentNode.removeChild(f),a.test(e)||(f=c.querySelector(r))&&f.parentNode.removeChild(f),c.querySelectorAll(t);case n:case r:return p=(c=l(e)).querySelectorAll(s),a.test(e)&&i.test(e)?p[0].parentNode.childNodes:p;default:return d?d(e):(f=l(e,r).querySelector(r)).childNodes}}},70:function(e,t,n){var r=n(4273),o=n(1454).formatDOM,i=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(i);return n&&n[1]&&(t=n[1]),o(r(e),null,t)}},1454:function(e,t,n){for(var r,o=n(196),i=n(2955).CASE_SENSITIVE_TAG_NAMES,a=o.Comment,l=o.Element,u=o.ProcessingInstruction,s=o.Text,c={},f=0,d=i.length;f0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=f;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=d;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=p;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,r)||this;return a.name=t,a.attribs=n,a.type=o,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function v(e){return(0,i.isTag)(e)}function y(e){return e.type===i.ElementType.CDATA}function m(e){return e.type===i.ElementType.Text}function g(e){return e.type===i.ElementType.Comment}function b(e){return e.type===i.ElementType.Directive}function x(e){return e.type===i.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),m(e))n=new u(e.data);else if(g(e))n=new s(e.data);else if(v(e)){var r=t?_(e.children):[],i=new h(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=i}else if(y(e)){r=t?_(e.children):[];var a=new d(r);r.forEach((function(e){return e.parent=a})),n=a}else if(x(e)){r=t?_(e.children):[];var l=new p(r);r.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var f=new c(e.name,e.data);null!=e["x-name"]&&(f["x-name"]=e["x-name"],f["x-publicId"]=e["x-publicId"],f["x-systemId"]=e["x-systemId"]),n=f}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n1&&(c=h(c,{key:c.key||x})),m.push(c);else if("text"!==i.type){switch(f=i.attribs,u(i)?a(f.style,f):f&&(f=o(f)),d=null,i.type){case"script":case"style":i.children[0]&&(f.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?f.defaultValue=i.children[0].data:i.children&&i.children.length&&(d=e(i.children,n));break;default:continue}w>1&&(f.key=x),m.push(v(i.name,f,d))}else{if((s=!i.data.trim().length)&&i.parent&&!l(i.parent))continue;if(b&&s)continue;m.push(i.data)}return 1===m.length?m[0]:m}},8625:function(e,t,n){var r=n(5043),o=n(7294).default;var i={reactCompat:!0};var a=r.version.split(".")[0]>=16,l=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!==typeof e)throw new TypeError("First argument must be an object");var n,r,o="function"===typeof t,i={},a={};for(n in e)r=e[n],o&&(i=t(n,r))&&2===i.length?a[i[0]]=i[1]:"string"===typeof r&&(a[r]=n);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!==e&&void 0!==e)try{t.style=o(e,i)}catch(n){t.style={}}},canTextBeChildOfNode:function(e){return!l.has(e.name)},elementsWithNoTextChildren:l}},8801:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(8400),a=n(185);o(n(185),t);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},u=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"===typeof t&&(n=t,t=l),"object"===typeof e&&(t=e,e=void 0),this.callback=null!==e&&void 0!==e?e:null,this.options=null!==t&&void 0!==t?t:l,this.elementCB=null!==n&&void 0!==n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"===typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=u,t.default=u},185:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=f;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=d;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=p;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,r)||this;return a.name=t,a.attribs=n,a.type=o,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function v(e){return(0,i.isTag)(e)}function y(e){return e.type===i.ElementType.CDATA}function m(e){return e.type===i.ElementType.Text}function g(e){return e.type===i.ElementType.Comment}function b(e){return e.type===i.ElementType.Directive}function x(e){return e.type===i.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),m(e))n=new u(e.data);else if(g(e))n=new s(e.data);else if(v(e)){var r=t?_(e.children):[],i=new h(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=i}else if(y(e)){r=t?_(e.children):[];var a=new d(r);r.forEach((function(e){return e.parent=a})),n=a}else if(x(e)){r=t?_(e.children):[];var l=new p(r);r.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var f=new c(e.name,e.data);null!=e["x-name"]&&(f["x-name"]=e["x-name"],f["x-publicId"]=e["x-publicId"],f["x-systemId"]=e["x-systemId"]),n=f}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;nc))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,v=!0,y=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h-1&&e%1==0&&e-1}},1714:function(e,t,n){var r=n(1340);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},7251:function(e,t,n){var r=n(8724),o=n(7160),i=n(5204);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},7159:function(e,t,n){var r=n(2622);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},438:function(e,t,n){var r=n(2622);e.exports=function(e){return r(this,e).get(e)}},9394:function(e,t,n){var r=n(2622);e.exports=function(e){return r(this,e).has(e)}},6874:function(e,t,n){var r=n(2622);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},4160:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},5575:function(e,t,n){var r=n(7937)(Object,"create");e.exports=r},1143:function(e,t,n){var r=n(3028)(Object.keys,Object);e.exports=r},6832:function(e,t,n){e=n.nmd(e);var r=n(7105),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,l=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=l},6095:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3028:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},6552:function(e,t,n){var r=n(7105),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},6179:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},6704:function(e){e.exports=function(e){return this.__data__.has(e)}},2074:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},4545:function(e,t,n){var r=n(7160);e.exports=function(){this.__data__=new r,this.size=0}},793:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7760:function(e){e.exports=function(e){return this.__data__.get(e)}},3892:function(e){e.exports=function(e){return this.__data__.has(e)}},6788:function(e,t,n){var r=n(7160),o=n(5204),i=n(4816);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},6996:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},3211:function(e){e.exports=function(e,t){return e===t||e!==e&&t!==t}},2777:function(e,t,n){var r=n(5193),o=n(2761),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=u},4052:function(e){var t=Array.isArray;e.exports=t},6571:function(e,t,n){var r=n(1629),o=n(6173);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4543:function(e,t,n){e=n.nmd(e);var r=n(6552),o=n(14),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,l=a&&a.exports===i?r.Buffer:void 0,u=(l?l.isBuffer:void 0)||o;e.exports=u},9853:function(e,t,n){var r=n(6989);e.exports=function(e,t){return r(e,t)}},1629:function(e,t,n){var r=n(6913),o=n(6686);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},6173:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6686:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},2761:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},1268:function(e,t,n){var r=n(5428),o=n(7574),i=n(6832),a=i&&i.isTypedArray,l=a?o(a):r;e.exports=l},8673:function(e,t,n){var r=n(3204),o=n(3713),i=n(6571);e.exports=function(e){return i(e)?r(e):o(e)}},7828:function(e){e.exports=function(){return[]}},14:function(e){e.exports=function(){return!1}},4175:function(e){var t;"undefined"!==typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),o=n(18),i=n(19),a=n(45),l=n(46),u=n(47),s=n(48),c=n(49),f=n(12),d=n(32),p=n(33),h=n(31),v=n(1),y={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:r.default,Format:o.default,Leaf:i.default,Embed:s.default,Scroll:a.default,Block:u.default,Inline:l.default,Text:c.default,Attributor:{Attribute:f.default,Class:d.default,Style:p.default,Store:h.default}};t.default=y},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return r(t,e),t}(Error);t.ParchmentError=o;var i,a={},l={},u={},s={};function c(e,t){var n;if(void 0===t&&(t=i.ANY),"string"===typeof e)n=s[e]||a[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=s.text;else if("number"===typeof e)e&i.LEVEL&i.BLOCK?n=s.block:e&i.LEVEL&i.INLINE&&(n=s.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=l[r[o]])break;n=n||u[e.tagName]}return null==n?null:t&i.LEVEL&n.scope&&t&i.TYPE&n.scope?n:null}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(i=t.Scope||(t.Scope={})),t.create=function(e,t){var n=c(e);if(null==n)throw new o("Unable to create "+e+" blot");var r=n,i=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t);return new r(i,t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=c,t.register=function e(){for(var t=[],n=0;n1)return t.map((function(t){return e(t)}));var r=t[0];if("string"!==typeof r.blotName&&"string"!==typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");return s[r.blotName||r.attrName]=r,"string"===typeof r.keyName?a[r.keyName]=r:(null!=r.className&&(l[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(e){return e.toUpperCase()})):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach((function(e){null!=u[e]&&null!=r.className||(u[e]=r)})))),r}},function(e,t,n){var r=n(51),o=n(11),i=n(3),a=n(20),l=String.fromCharCode(0),u=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};u.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},u.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},u.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},u.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=i(!0,{},e),"object"===typeof n){if("number"===typeof e.delete&&"number"===typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"===typeof n.delete&&null!=e.insert&&(t-=1,"object"!==typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(o(e.attributes,n.attributes)){if("string"===typeof e.insert&&"string"===typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"===typeof e.retain&&"number"===typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},u.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},u.prototype.filter=function(e){return this.ops.filter(e)},u.prototype.forEach=function(e){this.ops.forEach(e)},u.prototype.map=function(e){return this.ops.map(e)},u.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(r){(e(r)?t:n).push(r)})),[t,n]},u.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},u.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e}),0)},u.prototype.length=function(){return this.reduce((function(e,t){return e+a.length(t)}),0)},u.prototype.slice=function(e,t){e=e||0,"number"!==typeof t&&(t=1/0);for(var n=[],r=a.iterator(this.ops),o=0;o0&&n.next(i.retain-l)}for(var s=new u(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())s.push(n.next());else if("delete"===t.peekType())s.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),f=t.next(c),d=n.next(c);if("number"===typeof d.retain){var p={};"number"===typeof f.retain?p.retain=c:p.insert=f.insert;var h=a.attributes.compose(f.attributes,d.attributes,"number"===typeof f.retain);if(h&&(p.attributes=h),s.push(p),!n.hasNext()&&o(s.ops[s.ops.length-1],p)){var v=new u(t.rest());return s.concat(v).chop()}}else"number"===typeof d.delete&&"number"===typeof f.retain&&s.push(d)}return s.chop()},u.prototype.concat=function(e){var t=new u(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},u.prototype.diff=function(e,t){if(this.ops===e.ops)return new u;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"===typeof n.insert?n.insert:l;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),i=new u,s=r(n[0],n[1],t),c=a.iterator(this.ops),f=a.iterator(e.ops);return s.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(f.peekLength(),t),i.push(f.next(n));break;case r.DELETE:n=Math.min(t,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),t);var l=c.next(n),u=f.next(n);o(l.insert,u.insert)?i.retain(n,a.attributes.diff(l.attributes,u.attributes)):i.push(u).delete(n)}t-=n}})),i.chop()},u.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new u,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),l=a.length(i)-n.peekLength(),s="string"===typeof i.insert?i.insert.indexOf(t,l)-l:-1;if(s<0)r.push(n.next());else if(s>0)r.push(n.next(s));else{if(!1===e(r,n.next(1).attributes||{},o))return;o+=1,r=new u}}r.length()>0&&e(r,{},o)},u.prototype.transform=function(e,t){if(t=!!t,"number"===typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),o=new u;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),l=n.next(i),s=r.next(i);if(l.delete)continue;s.delete?o.push(s):o.retain(i,a.attributes.transform(l.attributes,s.attributes,t))}else o.retain(a.length(n.next()));return o.chop()},u.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r0&&(e1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(l.default.Block);function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"===typeof e.formats&&(t=(0,i.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:m(e.parent,t))}y.blotName="block",y.tagName="P",y.defaultChild="break",y.allowedChildren=[s.default,l.default.Embed,c.default],t.bubbleFormats=m,t.BlockEmbed=v,t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=x(t,r),this.container=this.options.container,null==this.container)return g.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var o=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 u.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new l.default(this.scroll),this.selection=new d.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(u.default.events.EDITOR_CHANGE,(function(e){e===u.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(u.default.events.SCROLL_UPDATE,(function(e,t){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;w.call(n,(function(){return n.editor.update(null,t,o)}),e)}));var i=this.clipboard.convert("
"+o+"


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