@pdftron/pdfjs-express 8.7.1 → 8.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/core/23.chunk.js +5 -5
- package/public/core/AzurePartRetriever.chunk.js +2 -2
- package/public/core/ContentEdit.chunk.js +19 -19
- package/public/core/ExternalAnnotationMerger.chunk.js +3 -3
- package/public/core/ExternalPdfPartRetriever.chunk.js +3 -3
- package/public/core/HttpPartRetriever.chunk.js +3 -3
- package/public/core/LocalPartRetriever.chunk.js +1 -1
- package/public/core/PDFInfoVersion1.chunk.js +10 -10
- package/public/core/SelectionInfoOld.chunk.js +13 -13
- package/public/core/StreamingPartRetriever.chunk.js +3 -3
- package/public/core/WebDBPartRetriever.chunk.js +1 -1
- package/public/core/WebViewerServerPartRetriever.chunk.js +13 -13
- package/public/core/pdfjs/pdf.worker.js +50 -48
- package/public/core/pikaday.chunk.js +14 -14
- package/public/core/vendors.ascii85.chunk.js +6 -6
- package/public/core/vendors.ascii85.quill.chunk.js +11 -11
- package/public/core/vendors.pako.chunk.js +65 -65
- package/public/core/vendors.quill.chunk.js +103 -103
- package/public/core/webviewer-core.min.js +1666 -1664
- package/public/ui/style.css +1 -1
- package/public/ui/style.css.map +1 -1
- package/webviewer.min.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
|
|
2
|
-
(function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[2],{377:function(ia,ba,e){(function(e){(function(e,ba){ia.exports=ba()})("undefined"!==typeof self?self:this,function(){return function(e){function x(da){if(
|
|
2
|
+
(function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[2],{377:function(ia,ba,e){(function(e){(function(e,ba){ia.exports=ba()})("undefined"!==typeof self?self:this,function(){return function(e){function x(da){if(ba[da])return ba[da].exports;var aa=ba[da]={i:da,l:!1,exports:{}};e[da].call(aa.exports,aa,aa.exports,x);aa.l=!0;return aa.exports}var ba={};x.m=e;x.c=ba;x.d=function(e,aa,w){x.o(e,aa)||Object.defineProperty(e,aa,{configurable:!1,enumerable:!0,get:w})};x.n=function(e){var aa=
|
|
3
3
|
e&&e.__esModule?function(){return e["default"]}:function(){return e};x.d(aa,"a",aa);return aa};x.o=function(e,x){return Object.prototype.hasOwnProperty.call(e,x)};x.p="";return x(x.s=109)}([function(e,ba,ca){Object.defineProperty(ba,"__esModule",{value:!0});e=ca(17);var x=ca(18),aa=ca(19),w=ca(45),y=ca(46),n=ca(47),h=ca(48),f=ca(49),r=ca(12),z=ca(32),fa=ca(33),ha=ca(31);ca=ca(1);ba.default={Scope:ca.Scope,create:ca.create,find:ca.find,query:ca.query,register:ca.register,Container:e.default,Format:x.default,
|
|
4
4
|
Leaf:aa.default,Embed:h.default,Scroll:w.default,Block:n.default,Inline:y.default,Text:f.default,Attributor:{Attribute:r.default,Class:z.default,Style:fa.default,Store:ha.default}}},function(e,ba){function x(e,f){void 0===f&&(f=!1);return null==e?null:null!=e[ba.DATA_KEY]?e[ba.DATA_KEY].blot:f?x(e.parentNode,f):null}function da(e,w){void 0===w&&(w=z.ANY);if("string"===typeof e)var x=r[e]||n[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)x=r.text;else if("number"===typeof e)e&z.LEVEL&z.BLOCK?
|
|
5
5
|
x=r.block:e&z.LEVEL&z.INLINE&&(x=r.inline);else if(e instanceof HTMLElement){var y=(e.getAttribute("class")||"").split(/\s+/),aa;for(aa in y)if(x=h[y[aa]])break;x=x||f[e.tagName]}return null==x?null:w&z.LEVEL&x.scope&&w&z.TYPE&x.scope?x:null}function aa(){for(var e=[],w=0;w<arguments.length;w++)e[w]=arguments[w];if(1<e.length)return e.map(function(e){return aa(e)});var x=e[0];if("string"!==typeof x.blotName&&"string"!==typeof x.attrName)throw new y("Invalid definition");if("abstract"===x.blotName)throw new y("Cannot register abstract class");
|
|
@@ -11,14 +11,14 @@ null!=h&&"object"===typeof h&&0<Object.keys(h).length&&(e.attributes=h);return t
|
|
|
11
11
|
"string"===typeof h.insert)return this.ops[f-1]={insert:h.insert+e.insert},"object"===typeof e.attributes&&(this.ops[f-1].attributes=e.attributes),this;if("number"===typeof e.retain&&"number"===typeof h.retain)return this.ops[f-1]={retain:h.retain+e.retain},"object"===typeof e.attributes&&(this.ops[f-1].attributes=e.attributes),this}}f===this.ops.length?this.ops.push(e):this.ops.splice(f,0,e);return this};x.prototype.chop=function(){var e=this.ops[this.ops.length-1];e&&e.retain&&!e.attributes&&this.ops.pop();
|
|
12
12
|
return this};x.prototype.filter=function(e){return this.ops.filter(e)};x.prototype.forEach=function(e){this.ops.forEach(e)};x.prototype.map=function(e){return this.ops.map(e)};x.prototype.partition=function(e){var f=[],h=[];this.forEach(function(n){(e(n)?f:h).push(n)});return[f,h]};x.prototype.reduce=function(e,h){return this.ops.reduce(e,h)};x.prototype.changeLength=function(){return this.reduce(function(e,h){return h.insert?e+n.length(h):h.delete?e-h.delete:e},0)};x.prototype.length=function(){return this.reduce(function(e,
|
|
13
13
|
h){return e+n.length(h)},0)};x.prototype.slice=function(e,h){e=e||0;"number"!==typeof h&&(h=Infinity);for(var f=[],r=n.iterator(this.ops),w=0;w<h&&r.hasNext();){if(w<e)var y=r.next(e-w);else y=r.next(h-w),f.push(y);w+=n.length(y)}return new x(f)};x.prototype.compose=function(e){var f=n.iterator(this.ops);e=n.iterator(e.ops);var h=[],y=e.peek();if(null!=y&&"number"===typeof y.retain&&null==y.attributes){for(var aa=y.retain;"insert"===f.peekType()&&f.peekLength()<=aa;)aa-=f.peekLength(),h.push(f.next());
|
|
14
|
-
0<y.retain-aa&&e.next(y.retain-aa)}for(h=new x(h);f.hasNext()||e.hasNext();)if("insert"===e.peekType())h.push(e.next());else if("delete"===f.peekType())h.push(f.next());else{aa=Math.min(f.peekLength(),e.peekLength());var da=f.next(aa),
|
|
15
|
-
new x(f.rest()),h.concat(f).chop()}else"number"===typeof
|
|
16
|
-
}).join("")}),y=new x;r=aa(f[0],f[1],r);var da=n.iterator(this.ops),
|
|
14
|
+
0<y.retain-aa&&e.next(y.retain-aa)}for(h=new x(h);f.hasNext()||e.hasNext();)if("insert"===e.peekType())h.push(e.next());else if("delete"===f.peekType())h.push(f.next());else{aa=Math.min(f.peekLength(),e.peekLength());var da=f.next(aa),ba=e.next(aa);if("number"===typeof ba.retain){y={};"number"===typeof da.retain?y.retain=aa:y.insert=da.insert;if(aa=n.attributes.compose(da.attributes,ba.attributes,"number"===typeof da.retain))y.attributes=aa;h.push(y);if(!e.hasNext()&&w(h.ops[h.ops.length-1],y))return f=
|
|
15
|
+
new x(f.rest()),h.concat(f).chop()}else"number"===typeof ba["delete"]&&"number"===typeof da.retain&&h.push(ba)}return h.chop()};x.prototype.concat=function(e){var f=new x(this.ops.slice());0<e.ops.length&&(f.push(e.ops[0]),f.ops=f.ops.concat(e.ops.slice(1)));return f};x.prototype.diff=function(e,r){if(this.ops===e.ops)return new x;var f=[this,e].map(function(f){return f.map(function(n){if(null!=n.insert)return"string"===typeof n.insert?n.insert:h;throw Error("diff() called "+(f===e?"on":"with")+" non-document");
|
|
16
|
+
}).join("")}),y=new x;r=aa(f[0],f[1],r);var da=n.iterator(this.ops),ba=n.iterator(e.ops);r.forEach(function(e){for(var f=e[1].length;0<f;){var h=0;switch(e[0]){case aa.INSERT:h=Math.min(ba.peekLength(),f);y.push(ba.next(h));break;case aa.DELETE:h=Math.min(f,da.peekLength());da.next(h);y["delete"](h);break;case aa.EQUAL:h=Math.min(da.peekLength(),ba.peekLength(),f);var r=da.next(h),x=ba.next(h);if(w(r.insert,x.insert))y.retain(h,n.attributes.diff(r.attributes,x.attributes));else y.push(x)["delete"](h)}f-=
|
|
17
17
|
h}});return y.chop()};x.prototype.eachLine=function(e,h){h=h||"\n";for(var f=n.iterator(this.ops),r=new x,w=0;f.hasNext();){if("insert"!==f.peekType())return;var y=f.peek(),aa=n.length(y)-f.peekLength();y="string"===typeof y.insert?y.insert.indexOf(h,aa)-aa:-1;if(0>y)r.push(f.next());else if(0<y)r.push(f.next(y));else{if(!1===e(r,f.next(1).attributes||{},w))return;w+=1;r=new x}}0<r.length()&&e(r,{},w)};x.prototype.transform=function(e,h){h=!!h;if("number"===typeof e)return this.transformPosition(e,
|
|
18
18
|
h);var f=n.iterator(this.ops);e=n.iterator(e.ops);for(var r=new x;f.hasNext()||e.hasNext();)if("insert"!==f.peekType()||!h&&"insert"===e.peekType())if("insert"===e.peekType())r.push(e.next());else{var w=Math.min(f.peekLength(),e.peekLength()),y=f.next(w),aa=e.next(w);y["delete"]||(aa["delete"]?r.push(aa):r.retain(w,n.attributes.transform(y.attributes,aa.attributes,h)))}else r.retain(n.length(f.next()));return r.chop()};x.prototype.transformPosition=function(e,h){h=!!h;for(var f=n.iterator(this.ops),
|
|
19
|
-
r=0;f.hasNext()&&r<=e;){var w=f.peekLength(),x=f.peekType();f.next();"delete"===x?e-=Math.min(w,e-r):("insert"===x&&(r<e||!h)&&(e+=w),r+=w)}return e};e.exports=x},function(e){function x(e,n){if("__proto__"===n){if(!w.call(e,n))return;if(h)return h(e,n).value}return e[n]}function
|
|
20
|
-
e.constructor.prototype&&w.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!f&&!h)return!1;for(var n in e);return"undefined"===typeof n||w.call(e,n)}function aa(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===y.call(e)}var w=Object.prototype.hasOwnProperty,y=Object.prototype.toString,n=Object.defineProperty,h=Object.getOwnPropertyDescriptor;e.exports=function r(){var e,h,n=arguments[0],w=1,y=arguments.length,
|
|
21
|
-
{},w=2);if(null==n||"object"!==typeof n&&"function"!==typeof n)n={};for(;w<y;++w){var ha=arguments[w];if(null!=ha)for(e in ha){var ea=x(n,e);var ia=x(ha,e);n!==ia&&(
|
|
19
|
+
r=0;f.hasNext()&&r<=e;){var w=f.peekLength(),x=f.peekType();f.next();"delete"===x?e-=Math.min(w,e-r):("insert"===x&&(r<e||!h)&&(e+=w),r+=w)}return e};e.exports=x},function(e){function x(e,n){if("__proto__"===n){if(!w.call(e,n))return;if(h)return h(e,n).value}return e[n]}function ba(e,h){n&&"__proto__"===h.name?n(e,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):e[h.name]=h.newValue}function da(e){if(!e||"[object Object]"!==y.call(e))return!1;var f=w.call(e,"constructor"),h=e.constructor&&
|
|
20
|
+
e.constructor.prototype&&w.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!f&&!h)return!1;for(var n in e);return"undefined"===typeof n||w.call(e,n)}function aa(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===y.call(e)}var w=Object.prototype.hasOwnProperty,y=Object.prototype.toString,n=Object.defineProperty,h=Object.getOwnPropertyDescriptor;e.exports=function r(){var e,h,n=arguments[0],w=1,y=arguments.length,ca=!1;"boolean"===typeof n&&(ca=n,n=arguments[1]||
|
|
21
|
+
{},w=2);if(null==n||"object"!==typeof n&&"function"!==typeof n)n={};for(;w<y;++w){var ha=arguments[w];if(null!=ha)for(e in ha){var ea=x(n,e);var ia=x(ha,e);n!==ia&&(ca&&ia&&(da(ia)||(h=aa(ia)))?(h?(h=!1,ea=ea&&aa(ea)?ea:[]):ea=ea&&da(ea)?ea:{},ba(n,{name:e,newValue:r(ca,ea,ia)})):"undefined"!==typeof ia&&ba(n,{name:e,newValue:ia}))}}return n}},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");
|
|
22
22
|
}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}function n(e){var f=
|
|
23
23
|
1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return f;"function"===typeof e.formats&&(f=(0,r.default)(f,e.formats()));return null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?f:n(e.parent,f)}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.BlockEmbed=ba.bubbleFormats=void 0;var h=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,
|
|
24
24
|
n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}(),f=function sa(e,f,h){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return sa(e,f,h)}else{if("value"in n)return n.value;f=n.get;return void 0===f?void 0:f.call(h)}};e=ca(3);var r=x(e);e=ca(2);var z=x(e);e=ca(0);var fa=x(e);e=ca(16);var ha=x(e);e=ca(6);e=x(e);ca=ca(7);ca=x(ca);var ea=function(e){function n(){aa(this,n);return w(this,(n.__proto__||
|
|
@@ -29,21 +29,21 @@ e+h===this.length()&&this.format(n,w):f(r.prototype.__proto__||Object.getPrototy
|
|
|
29
29
|
this).call(this,Math.min(e,this.length()-1),n):this.children.tail.insertAt(this.children.tail.length(),n),this.cache={});var w=this;h.reduce(function(e,f){w=w.split(e,!0);w.insertAt(0,f);return f.length},e+n.length)}}},{key:"insertBefore",value:function(e,h){var n=this.children.head;f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"insertBefore",this).call(this,e,h);n instanceof ha.default&&n.remove();this.cache={}}},{key:"length",value:function(){null==this.cache.length&&(this.cache.length=
|
|
30
30
|
f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"length",this).call(this)+1);return this.cache.length}},{key:"moveChildren",value:function(e,h){f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"moveChildren",this).call(this,e,h);this.cache={}}},{key:"optimize",value:function(e){f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"optimize",this).call(this,e);this.cache={}}},{key:"path",value:function(e){return f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),
|
|
31
31
|
"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"removeChild",this).call(this,e);this.cache={}}},{key:"split",value:function(e){var h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!1;if(h&&(0===e||e>=this.length()-1)){h=this.clone();if(0===e)return this.parent.insertBefore(h,this),this;this.parent.insertBefore(h,this.next);return h}h=f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"split",this).call(this,
|
|
32
|
-
e,h);this.cache={};return h}}]);return r}(fa.default.Block);ia.blotName="block";ia.tagName="P";ia.defaultChild="break";ia.allowedChildren=[e.default,fa.default.Embed,ca.default];ba.bubbleFormats=n;ba.BlockEmbed=ea;ba.default=ia},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f,h){f in e?Object.defineProperty(e,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):e[f]=h;return e}function w(e,f){f=(0,
|
|
33
|
-
history:!0}},f);if(f.theme&&f.theme!==
|
|
34
|
-
f+" module. Are you sure you registered it?"):e[f]=h.DEFAULTS||{};return e},{});null!=f.modules&&f.modules.toolbar&&f.modules.toolbar.constructor!==Object&&(f.modules.toolbar={container:f.modules.toolbar});f=(0,
|
|
32
|
+
e,h);this.cache={};return h}}]);return r}(fa.default.Block);ia.blotName="block";ia.tagName="P";ia.defaultChild="break";ia.allowedChildren=[e.default,fa.default.Embed,ca.default];ba.bubbleFormats=n;ba.BlockEmbed=ea;ba.default=ia},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f,h){f in e?Object.defineProperty(e,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):e[f]=h;return e}function w(e,f){f=(0,qa.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,
|
|
33
|
+
history:!0}},f);if(f.theme&&f.theme!==va.DEFAULTS.theme){if(f.theme=va.import("themes/"+f.theme),null==f.theme)throw Error("Invalid theme "+f.theme+". Did you register it?");}else f.theme=Ea.default;e=(0,qa.default)(!0,{},f.theme.DEFAULTS);[e,f].forEach(function(e){e.modules=e.modules||{};Object.keys(e.modules).forEach(function(f){!0===e.modules[f]&&(e.modules[f]={})})});var h=Object.keys(e.modules).concat(Object.keys(f.modules)).reduce(function(e,f){var h=va.import("modules/"+f);null==h?ra.error("Cannot load "+
|
|
34
|
+
f+" module. Are you sure you registered it?"):e[f]=h.DEFAULTS||{};return e},{});null!=f.modules&&f.modules.toolbar&&f.modules.toolbar.constructor!==Object&&(f.modules.toolbar={container:f.modules.toolbar});f=(0,qa.default)(!0,{},va.DEFAULTS,{modules:h},e,f);["bounds","container","scrollingContainer"].forEach(function(e){"string"===typeof f[e]&&(f[e]=document.querySelector(f[e]))});f.modules=Object.keys(f.modules).reduce(function(e,h){f.modules[h]&&(e[h]=f.modules[h]);return e},{});return f}function y(e,
|
|
35
35
|
f,n,r){if(this.options.strict&&!this.isEnabled()&&f===ea.default.sources.USER)return new fa.default;var w=null==n?null:this.getSelection(),x=this.editor.delta;e=e();null!=w&&(!0===n&&(n=w.index),null==r?w=h(w,e,f):0!==r&&(w=h(w,n,r,f)),this.setSelection(w,ea.default.sources.SILENT));if(0<e.length()){var z;n=[ea.default.events.TEXT_CHANGE,e,x,f];(z=this.emitter).emit.apply(z,[ea.default.events.EDITOR_CHANGE].concat(n));if(f!==ea.default.sources.SILENT){var y;(y=this.emitter).emit.apply(y,n)}}return e}
|
|
36
36
|
function n(e,h,n,r,w){var x={};"number"===typeof e.index&&"number"===typeof e.length?("number"!==typeof h?(w=r,r=n,n=h,h=e.length):h=e.length,e=e.index):"number"!==typeof h&&(w=r,r=n,n=h,h=0);"object"===("undefined"===typeof n?"undefined":f(n))?(x=n,w=r):"string"===typeof n&&(null!=r?x[n]=r:w=n);w=w||ea.default.sources.API;return[e,h,x,w]}function h(e,f,h,n){if(null==e)return null;var w=void 0,x=void 0;f instanceof fa.default?(w=[e.index,e.index+e.length].map(function(e){return f.transformPosition(e,
|
|
37
37
|
n!==ea.default.sources.USER)}),e=r(w,2),w=e[0],x=e[1]):(w=[e.index,e.index+e.length].map(function(e){return e<f||e===f&&n===ea.default.sources.USER?e:0<=h?e+h:Math.max(f,e+h)}),e=r(w,2),w=e[0],x=e[1]);return new la.Range(w,x-w)}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.overload=ba.expandConfig=void 0;var f="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?
|
|
38
38
|
"symbol":typeof e},r=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!f||h.length!==f);n=!0);}catch(Ca){r=!0,w=Ca}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),z=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=
|
|
39
|
-
n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();ca(50);e=ca(2);var fa=x(e);e=ca(14);var ha=x(e);e=ca(8);var ea=x(e);e=ca(9);e=x(e);var ia=ca(0),
|
|
40
|
-
e))throw new TypeError("Cannot call a class as a function");this.options=w(f,n);this.container=this.options.container;if(null==this.container)return
|
|
41
|
-
this.options.scrollingContainer||this.root;this.emitter=new ea.default;this.scroll=
|
|
39
|
+
n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();ca(50);e=ca(2);var fa=x(e);e=ca(14);var ha=x(e);e=ca(8);var ea=x(e);e=ca(9);e=x(e);var ia=ca(0),ma=x(ia),la=ca(15),na=x(la);ia=ca(3);var qa=x(ia);ia=ca(10);var sa=x(ia);ca=ca(34);var Ea=x(ca),ra=(0,sa.default)("quill"),va=function(){function e(f){var h=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(this instanceof
|
|
40
|
+
e))throw new TypeError("Cannot call a class as a function");this.options=w(f,n);this.container=this.options.container;if(null==this.container)return ra.error("Invalid Quill container",f);this.options.debug&&e.debug(this.options.debug);n=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=
|
|
41
|
+
this.options.scrollingContainer||this.root;this.emitter=new ea.default;this.scroll=ma.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats});this.editor=new ha.default(this.scroll);this.selection=new na.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(ea.default.events.EDITOR_CHANGE,
|
|
42
42
|
function(e){e===ea.default.events.TEXT_CHANGE&&h.root.classList.toggle("ql-blank",h.editor.isBlank())});this.emitter.on(ea.default.events.SCROLL_UPDATE,function(e,f){var n=h.selection.lastRange,r=n&&0===n.length?n.index:void 0;y.call(h,function(){return h.editor.update(null,f,r)},e)});n=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+n+"<p><br></p></div>");this.setContents(n);this.history.clear();this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder);
|
|
43
|
-
this.options.readOnly&&this.disable()}z(e,null,[{key:"debug",value:function(e){!0===e&&(e="log");sa.default.level(e)}},{key:"find",value:function(e){return e.__quill||
|
|
44
|
-
this.register("formats/"+n,e,f):Object.keys(e).forEach(function(n){h.register(n,e[n],f)})):(null==this.imports[e]||n||
|
|
43
|
+
this.options.readOnly&&this.disable()}z(e,null,[{key:"debug",value:function(e){!0===e&&(e="log");sa.default.level(e)}},{key:"find",value:function(e){return e.__quill||ma.default.find(e)}},{key:"import",value:function(e){null==this.imports[e]&&ra.error("Cannot import "+e+". Are you sure it was registered?");return this.imports[e]}},{key:"register",value:function(e,f){var h=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:!1;"string"!==typeof e?(n=e.attrName||e.blotName,"string"===typeof n?
|
|
44
|
+
this.register("formats/"+n,e,f):Object.keys(e).forEach(function(n){h.register(n,e[n],f)})):(null==this.imports[e]||n||ra.warn("Overwriting "+e+" with",f),this.imports[e]=f,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==f.blotName?ma.default.register(f):e.startsWith("modules")&&"function"===typeof f.register&&f.register())}}]);z(e,[{key:"addContainer",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if("string"===typeof e){var h=e;e=document.createElement("div");
|
|
45
45
|
e.classList.add(h)}this.container.insertBefore(e,f);return e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,f,h){var w=this;h=n(e,f,h);h=r(h,4);e=h[0];f=h[1];h=h[3];return y.call(this,function(){return w.editor.deleteText(e,f)},h,e,-1*f)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:!0;this.scroll.enable(e);this.container.classList.toggle("ql-disabled",
|
|
46
|
-
!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus();this.scrollingContainer.scrollTop=e;this.scrollIntoView()}},{key:"format",value:function(e,f){var h=this;return y.call(this,function(){var n=h.getSelection(!0),r=new fa.default;if(null==n)return r;if(
|
|
46
|
+
!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus();this.scrollingContainer.scrollTop=e;this.scrollIntoView()}},{key:"format",value:function(e,f){var h=this;return y.call(this,function(){var n=h.getSelection(!0),r=new fa.default;if(null==n)return r;if(ma.default.query(e,ma.default.Scope.BLOCK))r=h.editor.formatLine(n.index,n.length,aa({},e,f));else{if(0===n.length)return h.selection.format(e,f),r;r=h.editor.formatText(n.index,n.length,aa({},e,f))}h.setSelection(n,
|
|
47
47
|
ea.default.sources.SILENT);return r},2<arguments.length&&void 0!==arguments[2]?arguments[2]:ea.default.sources.API)}},{key:"formatLine",value:function(e,f,h,w,x){var z=this,aa=void 0;h=n(e,f,h,w,x);h=r(h,4);e=h[0];f=h[1];aa=h[2];x=h[3];return y.call(this,function(){return z.editor.formatLine(e,f,aa)},x,e,0)}},{key:"formatText",value:function(e,f,h,w,x){var z=this,aa=void 0;h=n(e,f,h,w,x);h=r(h,4);e=h[0];f=h[1];aa=h[2];x=h[3];return y.call(this,function(){return z.editor.formatText(e,f,aa)},x,e,0)}},
|
|
48
48
|
{key:"getBounds",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;f="number"===typeof e?this.selection.getBounds(e,f):this.selection.getBounds(e.index,e.length);var h=this.container.getBoundingClientRect();return{bottom:f.bottom-h.top,height:f.height,left:f.left-h.left,right:f.right-h.left,top:f.top-h.top,width:f.width}}},{key:"getContents",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:
|
|
49
49
|
this.getLength()-e;e=n(e,f);f=r(e,2);e=f[0];f=f[1];return this.editor.getContents(e,f)}},{key:"getFormat",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return"number"===typeof e?this.editor.getFormat(e,f):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",
|
|
@@ -53,8 +53,8 @@ arguments[0]&&this.focus();this.update();return this.selection.getRange()[0]}},{
|
|
|
53
53
|
arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,f,h){this.clipboard.dangerouslyPasteHTML(e,f,h)}},{key:"removeFormat",value:function(e,f,h){var w=this;h=n(e,f,h);h=r(h,4);e=h[0];f=h[1];h=h[3];return y.call(this,function(){return w.editor.removeFormat(e,f)},h,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var f=this;return y.call(this,
|
|
54
54
|
function(){e=new fa.default(e);var h=f.getLength();h=f.editor.deleteText(0,h);var n=f.editor.applyDelta(e),r=n.ops[n.ops.length-1];null!=r&&"string"===typeof r.insert&&"\n"===r.insert[r.insert.length-1]&&(f.editor.deleteText(f.getLength()-1,1),n.delete(1));return h.compose(n)},1<arguments.length&&void 0!==arguments[1]?arguments[1]:ea.default.sources.API)}},{key:"setSelection",value:function(f,h,w){null==f?this.selection.setRange(null,h||e.sources.API):(f=n(f,h,w),w=r(f,4),f=w[0],h=w[1],w=w[3],this.selection.setRange(new la.Range(f,
|
|
55
55
|
h),w),w!==ea.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer))}},{key:"setText",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ea.default.sources.API,h=(new fa.default).insert(e);return this.setContents(h,f)}},{key:"update",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ea.default.sources.USER,f=this.scroll.update(e);this.selection.update(e);return f}},{key:"updateContents",value:function(e){var f=this,h=
|
|
56
|
-
1<arguments.length&&void 0!==arguments[1]?arguments[1]:ea.default.sources.API;return y.call(this,function(){e=new fa.default(e);return f.editor.applyDelta(e,h)},h,!0)}}]);return e}();
|
|
57
|
-
w;ba.overload=n;ba.default=
|
|
56
|
+
1<arguments.length&&void 0!==arguments[1]?arguments[1]:ea.default.sources.API;return y.call(this,function(){e=new fa.default(e);return f.editor.applyDelta(e,h)},h,!0)}}]);return e}();va.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"};va.events=ea.default.events;va.sources=ea.default.sources;va.version="1.3.7";va.imports={delta:fa.default,parchment:ma.default,"core/module":e.default,"core/theme":Ea.default};ba.expandConfig=
|
|
57
|
+
w;ba.overload=n;ba.default=va},function(e,ba,ca){function x(e,h){if("function"!==typeof h&&null!==h)throw new TypeError("Super expression must either be null or a function, not "+typeof h);e.prototype=Object.create(h&&h.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});h&&(Object.setPrototypeOf?Object.setPrototypeOf(e,h):e.__proto__=h)}Object.defineProperty(ba,"__esModule",{value:!0});var aa=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=
|
|
58
58
|
n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(h,f,n){f&&e(h.prototype,f);n&&e(h,n);return h}}(),w=function z(e,f,r){null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0===h){if(e=Object.getPrototypeOf(e),null!==e)return z(e,f,r)}else{if("value"in h)return h.value;f=h.get;return void 0===f?void 0:f.call(r)}};e=(e=ca(7))&&e.__esModule?e:{default:e};var y=(ca=ca(0))&&ca.__esModule?ca:{default:ca};ca=
|
|
59
59
|
function(e){function f(){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");var e=(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?this:e}x(f,e);aa(f,[{key:"formatAt",value:function(e,h,x,aa){0>f.compare(this.statics.blotName,x)&&y.default.query(x,y.default.Scope.BLOT)?(e=this.isolate(e,h),aa&&e.wrap(x,aa)):w(f.prototype.__proto__||
|
|
60
60
|
Object.getPrototypeOf(f.prototype),"formatAt",this).call(this,e,h,x,aa)}},{key:"optimize",value:function(e){w(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"optimize",this).call(this,e);this.parent instanceof f&&0<f.compare(this.statics.blotName,this.parent.statics.blotName)&&(e=this.parent.isolate(this.offset(),this.length()),this.moveChildren(e),e.wrap(this))}}],[{key:"compare",value:function(e,h){var r=f.order.indexOf(e),w=f.order.indexOf(h);return 0<=r||0<=w?r-w:e===h?0:e<h?-1:1}}]);
|
|
@@ -67,48 +67,48 @@ e=!e||"object"!==typeof e&&"function"!==typeof e?this:e;e.listeners={};e.on("err
|
|
|
67
67
|
[e].concat(h))})}},{key:"listenDOM",value:function(e,f,h){this.listeners[e]||(this.listeners[e]=[]);this.listeners[e].push({node:f,handler:h})}}]);return f}(e.default);ca.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"};ca.sources={API:"api",SILENT:"silent",USER:"user"};ba.default=ca},function(e,ba){Object.defineProperty(ba,"__esModule",{value:!0});
|
|
68
68
|
e=function aa(e){var w=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(this instanceof aa))throw new TypeError("Cannot call a class as a function");this.quill=e;this.options=w};e.DEFAULTS={};ba.default=e},function(e,ba){function x(e){if(aa.indexOf(e)<=aa.indexOf(w)){for(var n,h=arguments.length,f=Array(1<h?h-1:0),r=1;r<h;r++)f[r-1]=arguments[r];(n=console)[e].apply(n,f)}}function da(e){return aa.reduce(function(n,h){n[h]=x.bind(console,h,e);return n},{})}Object.defineProperty(ba,"__esModule",
|
|
69
69
|
{value:!0});var aa=["error","warn","log","info"],w="warn";x.level=da.level=function(e){w=e};ba.default=da},function(e,ba,ca){function x(e){return!e||"object"!==typeof e||"number"!==typeof e.length||"function"!==typeof e.copy||"function"!==typeof e.slice||0<e.length&&"number"!==typeof e[0]?!1:!0}function aa(e,r,z){var f;if(null===e||void 0===e||null===r||void 0===r||e.prototype!==r.prototype)return!1;if(n(e)){if(!n(r))return!1;e=w.call(e);r=w.call(r);return h(e,r,z)}if(x(e)){if(!x(r)||e.length!==r.length)return!1;
|
|
70
|
-
for(f=0;f<e.length;f++)if(e[f]!==r[f])return!1;return!0}try{var aa=y(e);var da=y(r)}catch(
|
|
70
|
+
for(f=0;f<e.length;f++)if(e[f]!==r[f])return!1;return!0}try{var aa=y(e);var da=y(r)}catch(pa){return!1}if(aa.length!=da.length)return!1;aa.sort();da.sort();for(f=aa.length-1;0<=f;f--)if(aa[f]!=da[f])return!1;for(f=aa.length-1;0<=f;f--)if(da=aa[f],!h(e[da],r[da],z))return!1;return typeof e===typeof r}var w=Array.prototype.slice,y=ca(52),n=ca(53),h=e.exports=function(e,h,n){n||(n={});return e===h?!0:e instanceof Date&&h instanceof Date?e.getTime()===h.getTime():!e||!h||"object"!=typeof e&&"object"!=
|
|
71
71
|
typeof h?n.strict?e===h:e==h:aa(e,h,n)}},function(e,ba,ca){Object.defineProperty(ba,"__esModule",{value:!0});var x=ca(1);e=function(){function e(e,y,n){void 0===n&&(n={});this.attrName=e;this.keyName=y;e=x.Scope.TYPE&x.Scope.ATTRIBUTE;this.scope=null!=n.scope?n.scope&x.Scope.LEVEL|e:x.Scope.ATTRIBUTE;null!=n.whitelist&&(this.whitelist=n.whitelist)}e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})};e.prototype.add=function(e,x){if(!this.canAdd(e,x))return!1;e.setAttribute(this.keyName,
|
|
72
72
|
x);return!0};e.prototype.canAdd=function(e,y){return null==x.query(e,x.Scope.BLOT&(this.scope|x.Scope.TYPE))?!1:null==this.whitelist?!0:"string"===typeof y?-1<this.whitelist.indexOf(y.replace(/["']/g,"")):-1<this.whitelist.indexOf(y)};e.prototype.remove=function(e){e.removeAttribute(this.keyName)};e.prototype.value=function(e){var w=e.getAttribute(this.keyName);return this.canAdd(e,w)&&w?w:""};return e}();ba.default=e},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,
|
|
73
73
|
f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?
|
|
74
|
-
Object.setPrototypeOf(e,f):e.__proto__=f)}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.Code=void 0;var n=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!f||h.length!==f);n=!0);}catch(
|
|
74
|
+
Object.setPrototypeOf(e,f):e.__proto__=f)}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.Code=void 0;var n=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!f||h.length!==f);n=!0);}catch(ra){r=!0,w=ra}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
75
75
|
}}(),h=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}(),f=function na(e,f,h){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return na(e,f,h)}else{if("value"in n)return n.value;f=n.get;return void 0===f?void 0:f.call(h)}};e=ca(2);
|
|
76
|
-
var r=x(e);e=ca(0);var z=x(e);e=ca(4);e=x(e);var fa=ca(6);fa=x(fa);ca=ca(7);var
|
|
77
|
-
return f.split("\n").reduce(function(f,h){return f.insert(h).insert("\n",e.formats())},new r.default)}},{key:"format",value:function(e,h){if(e!==this.statics.blotName||!h){var r=this.descendant(
|
|
78
|
-
this.newlineIndex(e);if(!(0>r||r>=e+f)){var w=this.newlineIndex(e,!0)+1;r=r-w+1;var y=this.isolate(w,r),aa=y.next;y.format(h,n);aa instanceof x&&aa.formatAt(0,e-w+f-r,h,n)}}}},{key:"insertAt",value:function(e,f,h){null==h&&(e=this.descendant(
|
|
76
|
+
var r=x(e);e=ca(0);var z=x(e);e=ca(4);e=x(e);var fa=ca(6);fa=x(fa);ca=ca(7);var ea=x(ca);ca=function(e){function f(){aa(this,f);return w(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}y(f,e);return f}(fa.default);ca.blotName="code";ca.tagName="CODE";e=function(e){function x(){aa(this,x);return w(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}y(x,e);h(x,[{key:"delta",value:function(){var e=this,f=this.domNode.textContent;f.endsWith("\n")&&(f=f.slice(0,-1));
|
|
77
|
+
return f.split("\n").reduce(function(f,h){return f.insert(h).insert("\n",e.formats())},new r.default)}},{key:"format",value:function(e,h){if(e!==this.statics.blotName||!h){var r=this.descendant(ea.default,this.length()-1);r=n(r,1)[0];null!=r&&r.deleteAt(r.length()-1,1);f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,e,h)}}},{key:"formatAt",value:function(e,f,h,n){if(0!==f&&null!=z.default.query(h,z.default.Scope.BLOCK)&&(h!==this.statics.blotName||n!==this.statics.formats(this.domNode))){var r=
|
|
78
|
+
this.newlineIndex(e);if(!(0>r||r>=e+f)){var w=this.newlineIndex(e,!0)+1;r=r-w+1;var y=this.isolate(w,r),aa=y.next;y.format(h,n);aa instanceof x&&aa.formatAt(0,e-w+f-r,h,n)}}}},{key:"insertAt",value:function(e,f,h){null==h&&(e=this.descendant(ea.default,e),e=n(e,2),e[0].insertAt(e[1],f))}},{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(1<arguments.length&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,
|
|
79
79
|
e).lastIndexOf("\n");var f=this.domNode.textContent.slice(e).indexOf("\n");return-1<f?e+f:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(z.default.create("text","\n"));f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,e);var h=this.next;null!=h&&h.prev===this&&h.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===h.statics.formats(h.domNode)&&(h.optimize(e),h.moveChildren(this),h.remove())}},
|
|
80
80
|
{key:"replace",value:function(e){f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,e);[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var f=z.default.find(e);null==f?e.parentNode.removeChild(e):f instanceof z.default.Embed?f.remove():f.unwrap()})}}],[{key:"create",value:function(e){e=f(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,e);e.setAttribute("spellcheck",!1);return e}},{key:"formats",value:function(){return!0}}]);return x}(e.default);
|
|
81
81
|
e.blotName="code-block";e.tagName="PRE";e.TAB=" ";ba.Code=ca;ba.default=e},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f,h){f in e?Object.defineProperty(e,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):e[f]=h;return e}function w(e,f){return Object.keys(f).reduce(function(h,n){if(null==e[n])return h;f[n]===e[n]?h[n]=f[n]:Array.isArray(f[n])?0>f[n].indexOf(e[n])&&(h[n]=f[n].concat([e[n]])):h[n]=[f[n],e[n]];return h},{})}function y(e){return e.reduce(function(e,
|
|
82
82
|
f){if(1===f.insert){var h=(0,na.default)(f.attributes);delete h.image;return e.insert({image:f.attributes.image},h)}null==f.attributes||!0!==f.attributes.list&&!0!==f.attributes.bullet||(f=(0,na.default)(f),f.attributes.list?f.attributes.list="ordered":(f.attributes.list="bullet",delete f.attributes.bullet));return"string"===typeof f.insert?(h=f.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e.insert(h,f.attributes)):e.push(f)},new r.default)}Object.defineProperty(ba,"__esModule",{value:!0});var n=
|
|
83
83
|
"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},h=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!f||h.length!==f);n=!0);}catch(Fa){r=!0,w=Fa}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;
|
|
84
|
-
}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),f=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(2);var r=x(e);e=ca(20);var z=x(e);e=ca(0);var fa=x(e);e=ca(13);var
|
|
85
|
-
var
|
|
86
|
-
r&&(r=!1,x=x.slice(0,-1));e>=w&&!x.endsWith("\n")&&(r=!0);f.scroll.insertAt(e,x);x=f.scroll.line(e);x=h(x,2);var da=x[0],ba=x[1];x=(0,sa.default)({},(0,ia.bubbleFormats)(da));da instanceof
|
|
84
|
+
}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),f=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(2);var r=x(e);e=ca(20);var z=x(e);e=ca(0);var fa=x(e);e=ca(13);var ea=x(e);e=ca(24);var ha=x(e),ia=ca(4),ma=x(ia);e=ca(16);var la=x(e);e=ca(21);var na=x(e);e=ca(11);
|
|
85
|
+
var qa=x(e);ca=ca(3);var sa=x(ca),Ea=/^[ -~]*$/;ca=function(){function e(f){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.scroll=f;this.delta=this.getDelta()}f(e,[{key:"applyDelta",value:function(e){var f=this,r=!1;this.scroll.update();var w=this.scroll.length();this.scroll.batchStart();e=y(e);e.reduce(function(e,x){var y=x.retain||x.delete||x.insert.length||1,aa=x.attributes||{};if(null!=x.insert){if("string"===typeof x.insert){x=x.insert;x.endsWith("\n")&&
|
|
86
|
+
r&&(r=!1,x=x.slice(0,-1));e>=w&&!x.endsWith("\n")&&(r=!0);f.scroll.insertAt(e,x);x=f.scroll.line(e);x=h(x,2);var da=x[0],ba=x[1];x=(0,sa.default)({},(0,ia.bubbleFormats)(da));da instanceof ma.default&&(da=da.descendant(fa.default.Leaf,ba),da=h(da,1)[0],x=(0,sa.default)(x,(0,ia.bubbleFormats)(da)));aa=z.default.attributes.diff(x,aa)||{}}else if("object"===n(x.insert)){da=Object.keys(x.insert)[0];if(null==da)return e;f.scroll.insertAt(e,da,x.insert[da])}w+=y}Object.keys(aa).forEach(function(h){f.scroll.formatAt(e,
|
|
87
87
|
y,h,aa[h])});return e+y},0);e.reduce(function(e,h){return"number"===typeof h.delete?(f.scroll.deleteAt(e,h.delete),e):e+(h.retain||h.insert.length||1)},0);this.scroll.batchEnd();return this.update(e)}},{key:"deleteText",value:function(e,f){this.scroll.deleteAt(e,f);return this.update((new r.default).retain(e).delete(f))}},{key:"formatLine",value:function(e,f){var h=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update();Object.keys(n).forEach(function(r){if(null==h.scroll.whitelist||
|
|
88
|
-
h.scroll.whitelist[r]){var w=h.scroll.lines(e,Math.max(f,1)),x=f;w.forEach(function(f){var w=f.length();if(f instanceof
|
|
89
|
-
f,r,n[r])});return this.update((new r.default).retain(e).retain(f,(0,na.default)(n)))}},{key:"getContents",value:function(e,f){return this.delta.slice(e,e+f)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,f){return e.concat(f.delta())},new r.default)}},{key:"getFormat",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===f?this.scroll.path(e).forEach(function(e){e=h(e,1)[0];e instanceof
|
|
88
|
+
h.scroll.whitelist[r]){var w=h.scroll.lines(e,Math.max(f,1)),x=f;w.forEach(function(f){var w=f.length();if(f instanceof ea.default){var z=e-f.offset(h.scroll),y=f.newlineIndex(z+x)-z+1;f.formatAt(z,y,r,n[r])}else f.format(r,n[r]);x-=w})}});this.scroll.optimize();return this.update((new r.default).retain(e).retain(f,(0,na.default)(n)))}},{key:"formatText",value:function(e,f){var h=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};Object.keys(n).forEach(function(r){h.scroll.formatAt(e,
|
|
89
|
+
f,r,n[r])});return this.update((new r.default).retain(e).retain(f,(0,na.default)(n)))}},{key:"getContents",value:function(e,f){return this.delta.slice(e,e+f)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,f){return e.concat(f.delta())},new r.default)}},{key:"getFormat",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===f?this.scroll.path(e).forEach(function(e){e=h(e,1)[0];e instanceof ma.default?n.push(e):e instanceof fa.default.Leaf&&
|
|
90
90
|
r.push(e)}):(n=this.scroll.lines(e,f),r=this.scroll.descendants(fa.default.Leaf,e,f));f=[n,r].map(function(e){if(0===e.length)return{};for(var f=(0,ia.bubbleFormats)(e.shift());0<Object.keys(f).length;){var h=e.shift();if(null==h)break;f=w((0,ia.bubbleFormats)(h),f)}return f});return sa.default.apply(sa.default,f)}},{key:"getText",value:function(e,f){return this.getContents(e,f).filter(function(e){return"string"===typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,
|
|
91
91
|
f,h){this.scroll.insertAt(e,f,h);return this.update((new r.default).retain(e).insert(aa({},f,h)))}},{key:"insertText",value:function(e,f){var h=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};f=f.replace(/\r\n/g,"\n").replace(/\r/g,"\n");this.scroll.insertAt(e,f);Object.keys(n).forEach(function(r){h.scroll.formatAt(e,f.length,r,n[r])});return this.update((new r.default).retain(e).insert(f,(0,na.default)(n)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;
|
|
92
|
-
if(1<this.scroll.children.length)return!1;var e=this.scroll.children.head;return e.statics.blotName!==
|
|
93
|
-
e=(new r.default).retain(e).concat(f);return this.applyDelta(e)}},{key:"update",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0,n=this.delta;if(1===f.length&&"characterData"===f[0].type&&f[0].target.data.match(Ea)&&fa.default.find(f[0].target)){var w=fa.default.find(f[0].target),x=(0,ia.bubbleFormats)(w),z=w.offset(this.scroll);f=f[0].oldValue.replace(
|
|
94
|
-
w=(new r.default).insert(w.value());e=(new r.default).retain(z).concat(f.diff(w,h)).reduce(function(e,f){return f.insert?e.insert(f.insert,x):e.push(f)},new r.default);this.delta=n.compose(e)}else this.delta=this.getDelta(),e&&(0,
|
|
92
|
+
if(1<this.scroll.children.length)return!1;var e=this.scroll.children.head;return e.statics.blotName!==ma.default.blotName||1<e.children.length?!1:e.children.head instanceof la.default}},{key:"removeFormat",value:function(e,f){var n=this.getText(e,f),w=this.scroll.line(e+f),x=h(w,2);w=x[0];x=x[1];var z=0,y=new r.default;null!=w&&(z=w instanceof ea.default?w.newlineIndex(x)-x+1:w.length()-x,y=w.delta().slice(x,x+z-1).insert("\n"));f=this.getContents(e,f+z).diff((new r.default).insert(n).concat(y));
|
|
93
|
+
e=(new r.default).retain(e).concat(f);return this.applyDelta(e)}},{key:"update",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0,n=this.delta;if(1===f.length&&"characterData"===f[0].type&&f[0].target.data.match(Ea)&&fa.default.find(f[0].target)){var w=fa.default.find(f[0].target),x=(0,ia.bubbleFormats)(w),z=w.offset(this.scroll);f=f[0].oldValue.replace(ha.default.CONTENTS,"");f=(new r.default).insert(f);
|
|
94
|
+
w=(new r.default).insert(w.value());e=(new r.default).retain(z).concat(f.diff(w,h)).reduce(function(e,f){return f.insert?e.insert(f.insert,x):e.push(f)},new r.default);this.delta=n.compose(e)}else this.delta=this.getDelta(),e&&(0,qa.default)(n.compose(e),this.delta)||(e=n.diff(this.delta,h));return e}}]);return e}();ba.default=ca},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e){if(Array.isArray(e)){for(var f=0,h=Array(e.length);f<e.length;f++)h[f]=e[f];return h}return Array.from(e)}
|
|
95
95
|
function w(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");}function y(e,f){try{f.parentNode}catch(la){return!1}f instanceof Text&&(f=f.parentNode);return e.contains(f)}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.Range=void 0;var n=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!f||h.length!==
|
|
96
|
-
f);n=!0);}catch(
|
|
97
|
-
x(e);ca=ca(10);ca=x(ca);var
|
|
96
|
+
f);n=!0);}catch(va){r=!0,w=va}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),h=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(0);var f=x(e);e=ca(21);var r=x(e);e=ca(11);var z=x(e);e=ca(8);var fa=
|
|
97
|
+
x(e);ca=ca(10);ca=x(ca);var ea=(0,ca.default)("quill:selection"),ha=function la(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;w(this,la);this.index=e;this.length=f};ca=function(){function e(h,n){var r=this;w(this,e);this.emitter=n;this.scroll=h;this.mouseDown=this.composing=!1;this.root=this.scroll.domNode;this.cursor=f.default.create("cursor",this);this.lastRange=this.savedRange=new ha(0,0);this.handleComposition();this.handleDragging();this.emitter.listenDOM("selectionchange",
|
|
98
98
|
document,function(){r.mouseDown||setTimeout(r.update.bind(r,fa.default.sources.USER),1)});this.emitter.on(fa.default.events.EDITOR_CHANGE,function(e,f){e===fa.default.events.TEXT_CHANGE&&0<f.length()&&r.update(fa.default.sources.SILENT)});this.emitter.on(fa.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();if(null!=e&&e.start.node!==r.cursor.textNode)r.emitter.once(fa.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,
|
|
99
99
|
e.end.offset)}catch(Ea){}})}});this.emitter.on(fa.default.events.SCROLL_OPTIMIZE,function(e,f){f.range&&(e=f.range,r.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset))});this.update(fa.default.sources.SILENT)}h(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",function(){e.composing=!0});this.root.addEventListener("compositionend",function(){e.composing=!1;if(e.cursor.parent){var f=e.cursor.restore();f&&setTimeout(function(){e.setNativeRange(f.startNode,
|
|
100
100
|
f.startOffset,f.endNode,f.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(fa.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,h){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=
|
|
101
101
|
this.getNativeRange();if(null!=n&&n.native.collapsed&&!f.default.query(e,f.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=f.default.find(n.start.node,!1);if(null==r)return;r instanceof f.default.Leaf?(n=r.split(n.start.offset),r.parent.insertBefore(this.cursor,n)):r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,h);this.scroll.optimize();this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length);this.update()}}}},{key:"getBounds",
|
|
102
102
|
value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,h=this.scroll.length();e=Math.min(e,h-1);f=Math.min(e+f,h-1)-e;h=this.scroll.leaf(e);var r=n(h,2);h=r[0];var w=r[1];if(null==h)return null;r=h.position(w,!0);r=n(r,2);var x=r[0];w=r[1];r=document.createRange();if(0<f){r.setStart(x,w);f=this.scroll.leaf(e+f);f=n(f,2);h=f[0];w=f[1];if(null==h)return null;f=h.position(w,!0);f=n(f,2);x=f[0];w=f[1];r.setEnd(x,w);return r.getBoundingClientRect()}f="left";x instanceof Text?
|
|
103
|
-
(w<x.data.length?(r.setStart(x,w),r.setEnd(x,w+1)):(r.setStart(x,w-1),r.setEnd(x,w),f="right"),h=r.getBoundingClientRect()):(h=h.domNode.getBoundingClientRect(),0<w&&(f="right"));return{bottom:h.top+h.height,height:h.height,left:h[f],right:h[f],top:h.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||0>=e.rangeCount)return null;e=e.getRangeAt(0);if(null==e)return null;e=this.normalizeNative(e);
|
|
103
|
+
(w<x.data.length?(r.setStart(x,w),r.setEnd(x,w+1)):(r.setStart(x,w-1),r.setEnd(x,w),f="right"),h=r.getBoundingClientRect()):(h=h.domNode.getBoundingClientRect(),0<w&&(f="right"));return{bottom:h.top+h.height,height:h.height,left:h[f],right:h[f],top:h.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||0>=e.rangeCount)return null;e=e.getRangeAt(0);if(null==e)return null;e=this.normalizeNative(e);ea.info("getNativeRange",e);return e}},{key:"getRange",value:function(){var e=
|
|
104
104
|
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 h=this,r=[[e.start.node,e.start.offset]];e.native.collapsed||r.push([e.end.node,e.end.offset]);r=r.map(function(e){var r=n(e,2);e=r[0];r=r[1];var w=f.default.find(e,!0),x=w.offset(h.scroll);return 0===r?x:w instanceof f.default.Container?x+w.length():x+w.index(e,r)});e=Math.min(Math.max.apply(Math,
|
|
105
|
-
aa(r)),this.scroll.length()-1);r=Math.min.apply(Math,[e].concat(aa(r)));return new
|
|
105
|
+
aa(r)),this.scroll.length()-1);r=Math.min.apply(Math,[e].concat(aa(r)));return new ha(r,e-r)}},{key:"normalizeNative",value:function(e){if(!y(this.root,e.startContainer)||!e.collapsed&&!y(this.root,e.endContainer))return null;e={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};[e.start,e.end].forEach(function(e){for(var f=e.node,h=e.offset;!(f instanceof Text)&&0<f.childNodes.length;)if(f.childNodes.length>h)f=f.childNodes[h],h=0;else if(f.childNodes.length===
|
|
106
106
|
h)f=f.lastChild,h=f instanceof Text?f.data.length:f.childNodes.length+1;else break;e.node=f;e.offset=h});return e}},{key:"rangeToNative",value:function(e){var f=this;e=e.collapsed?[e.index]:[e.index,e.index+e.length];var h=[],r=this.scroll.length();e.forEach(function(e,w){e=Math.min(r-1,e);e=f.scroll.leaf(e);var x=n(e,2);e=x[1];w=x[0].position(e,0!==w);e=n(w,2);w=e[0];e=e[1];h.push(w,e)});2>h.length&&(h=h.concat(h));return h}},{key:"scrollIntoView",value:function(e){var f=this.lastRange;if(null!=
|
|
107
107
|
f){var h=this.getBounds(f.index,f.length);if(null!=h){var r=this.scroll.length()-1,w=this.scroll.line(Math.min(f.index,r)),x=w=n(w,1)[0];0<f.length&&(f=this.scroll.line(Math.min(f.index+f.length,r)),x=n(f,1)[0]);null!=w&&null!=x&&(f=e.getBoundingClientRect(),h.top<f.top?e.scrollTop-=f.top-h.top:h.bottom>f.bottom&&(e.scrollTop+=h.bottom-f.bottom))}}}},{key:"setNativeRange",value:function(e,f){var h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e,n=3<arguments.length&&void 0!==arguments[3]?
|
|
108
|
-
arguments[3]:f,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:!1;
|
|
109
|
-
(n=[].indexOf.call(h.parentNode.childNodes,h),h=h.parentNode),r=document.createRange(),r.setStart(e,f),r.setEnd(h,n),w.removeAllRanges(),w.addRange(r)}else w.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!1,h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:fa.default.sources.API;"string"===typeof f&&(h=f,f=!1);
|
|
108
|
+
arguments[3]:f,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:!1;ea.info("setNativeRange",e,f,h,n);if(null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=h.parentNode){var w=document.getSelection();if(null!=w)if(null!=e){this.hasFocus()||this.root.focus();var x=(this.getNativeRange()||{}).native;if(null==x||r||e!==x.startContainer||f!==x.startOffset||h!==x.endContainer||n!==x.endOffset)"BR"==e.tagName&&(f=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==h.tagName&&
|
|
109
|
+
(n=[].indexOf.call(h.parentNode.childNodes,h),h=h.parentNode),r=document.createRange(),r.setStart(e,f),r.setEnd(h,n),w.removeAllRanges(),w.addRange(r)}else w.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!1,h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:fa.default.sources.API;"string"===typeof f&&(h=f,f=!1);ea.info("setRange",e);if(null!=e){var n=this.rangeToNative(e);this.setNativeRange.apply(this,
|
|
110
110
|
aa(n).concat([f]))}else this.setNativeRange(null);this.update(h)}},{key:"update",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:fa.default.sources.USER,f=this.lastRange,h=this.getRange();h=n(h,2);var w=h[1];this.lastRange=h[0];null!=this.lastRange&&(this.savedRange=this.lastRange);if(!(0,z.default)(f,this.lastRange)){var x;!this.composing&&null!=w&&w.native.collapsed&&w.start.node!==this.cursor.textNode&&this.cursor.restore();f=[fa.default.events.SELECTION_CHANGE,(0,
|
|
111
|
-
r.default)(this.lastRange),(0,r.default)(f),e];(x=this.emitter).emit.apply(x,[fa.default.events.EDITOR_CHANGE].concat(f));if(e!==fa.default.sources.SILENT){var y;(y=this.emitter).emit.apply(y,f)}}}}]);return e}();ba.Range=
|
|
111
|
+
r.default)(this.lastRange),(0,r.default)(f),e];(x=this.emitter).emit.apply(x,[fa.default.events.EDITOR_CHANGE].concat(f));if(e!==fa.default.sources.SILENT){var y;(y=this.emitter).emit.apply(y,f)}}}}]);return e}();ba.Range=ha;ba.default=ca},function(e,ba,ca){function x(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});
|
|
112
112
|
n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(ba,"__esModule",{value:!0});var aa=function(){function e(e,h){for(var f=0;f<h.length;f++){var n=h[f];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(n,h,f){h&&e(n.prototype,h);f&&e(n,f);return n}}(),w=function r(e,h,f){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,h);if(void 0===n){if(e=Object.getPrototypeOf(e),
|
|
113
113
|
null!==e)return r(e,h,f)}else{if("value"in n)return n.value;h=n.get;return void 0===h?void 0:h.call(f)}};e=function(e){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");var e=(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?this:e}x(h,e);aa(h,[{key:"insertInto",value:function(e,n){0===e.children.length?
|
|
114
114
|
w(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]);return h}(function(e){return e&&e.__esModule?e:{default:e}}(ca(0)).default.Embed);e.blotName="break";e.tagName="BR";ba.default=e},function(e,ba,ca){function x(e){var h=y.find(e);if(null==h)try{h=y.create(e)}catch(f){h=y.create(y.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){h.domNode.appendChild(e)}),
|
|
@@ -130,45 +130,45 @@ n){aa(e[n],h[n])||(f[n]=void 0===h[n]?null:h[n]);return f},{});return 0<Object.k
|
|
|
130
130
|
1}};x.prototype.hasNext=function(){return Infinity>this.peekLength()};x.prototype.next=function(e){e||(e=Infinity);var h=this.ops[this.index];if(h){var f=this.offset,n=y.length(h);e>=n-f?(e=n-f,this.index+=1,this.offset=0):this.offset+=e;if("number"===typeof h["delete"])return{"delete":e};n={};h.attributes&&(n.attributes=h.attributes);"number"===typeof h.retain?n.retain=e:n.insert="string"===typeof h.insert?h.insert.substr(f,e):h.insert;return n}return{retain:Infinity}};x.prototype.peek=function(){return this.ops[this.index]};
|
|
131
131
|
x.prototype.peekLength=function(){return this.ops[this.index]?y.length(this.ops[this.index])-this.offset:Infinity};x.prototype.peekType=function(){if(this.ops[this.index]){if("number"===typeof this.ops[this.index]["delete"])return"delete";if("number"!==typeof this.ops[this.index].retain)return"insert"}return"retain"};x.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,h=this.index,f=this.next(),r=this.ops.slice(this.index);this.offset=
|
|
132
132
|
e;this.index=h;return[f].concat(r)}return[]};e.exports=y},function(x){var ba=function(){function x(e,h){return null!=h&&e instanceof h}function da(f,r,z,aa,ba){function fa(f,z){if(null===f)return null;if(0===z||"object"!=typeof f)return f;if(x(f,y))var ja=new y;else if(x(f,n))ja=new n;else if(x(f,h))ja=new h(function(e,h){f.then(function(f){e(fa(f,z-1))},function(e){h(fa(e,z-1))})});else if(da.__isArray(f))ja=[];else if(da.__isRegExp(f))ja=new RegExp(f.source,w(f)),f.lastIndex&&(ja.lastIndex=f.lastIndex);
|
|
133
|
-
else if(da.__isDate(f))ja=new Date(f.getTime());else{if(
|
|
134
|
-
for(var ka in f){var la;ia&&(la=Object.getOwnPropertyDescriptor(ia,ka));la&&null==la.set||(ja[ka]=fa(f[ka],z-1))}if(Object.getOwnPropertySymbols)for(
|
|
135
|
-
(ja[la]=fa(f[la],z-1),Object.defineProperty(ja,la,{enumerable:!1}));return ja}"object"===typeof r&&(z=r.depth,aa=r.prototype,ba=r.includeNonEnumerable,r=r.circular);var ca=[],
|
|
133
|
+
else if(da.__isDate(f))ja=new Date(f.getTime());else{if(ha&&e.isBuffer(f))return ja=e.allocUnsafe?e.allocUnsafe(f.length):new e(f.length),f.copy(ja),ja;if(x(f,Error))ja=Object.create(f);else if("undefined"==typeof aa){var ia=Object.getPrototypeOf(f);ja=Object.create(ia)}else ja=Object.create(aa),ia=aa}if(r){var ra=ca.indexOf(f);if(-1!=ra)return ea[ra];ca.push(f);ea.push(ja)}x(f,y)&&f.forEach(function(e,f){f=fa(f,z-1);e=fa(e,z-1);ja.set(f,e)});x(f,n)&&f.forEach(function(e){e=fa(e,z-1);ja.add(e)});
|
|
134
|
+
for(var ka in f){var la;ia&&(la=Object.getOwnPropertyDescriptor(ia,ka));la&&null==la.set||(ja[ka]=fa(f[ka],z-1))}if(Object.getOwnPropertySymbols)for(ra=Object.getOwnPropertySymbols(f),ka=0;ka<ra.length;ka++)if(la=ra[ka],ia=Object.getOwnPropertyDescriptor(f,la),!ia||ia.enumerable||ba)ja[la]=fa(f[la],z-1),ia.enumerable||Object.defineProperty(ja,la,{enumerable:!1});if(ba)for(ra=Object.getOwnPropertyNames(f),ka=0;ka<ra.length;ka++)la=ra[ka],ia=Object.getOwnPropertyDescriptor(f,la),ia&&ia.enumerable||
|
|
135
|
+
(ja[la]=fa(f[la],z-1),Object.defineProperty(ja,la,{enumerable:!1}));return ja}"object"===typeof r&&(z=r.depth,aa=r.prototype,ba=r.includeNonEnumerable,r=r.circular);var ca=[],ea=[],ha="undefined"!=typeof e;"undefined"==typeof r&&(r=!0);"undefined"==typeof z&&(z=Infinity);return fa(f,z)}function aa(e){return Object.prototype.toString.call(e)}function w(e){var f="";e.global&&(f+="g");e.ignoreCase&&(f+="i");e.multiline&&(f+="m");return f}try{var y=Map}catch(f){y=function(){}}try{var n=Set}catch(f){n=
|
|
136
136
|
function(){}}try{var h=Promise}catch(f){h=function(){}}da.clonePrototype=function(e){function f(){}if(null===e)return null;f.prototype=e;return new f};da.__objToStr=aa;da.__isDate=function(e){return"object"===typeof e&&"[object Date]"===aa(e)};da.__isArray=function(e){return"object"===typeof e&&"[object Array]"===aa(e)};da.__isRegExp=function(e){return"object"===typeof e&&"[object RegExp]"===aa(e)};da.__getRegExpFlags=w;return da}();"object"===typeof x&&x.exports&&(x.exports=ba)},function(e,ba,ca){function x(e){return e&&
|
|
137
137
|
e.__esModule?e:{default:e}}function aa(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function w(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=
|
|
138
|
-
f)}function y(e){return e instanceof
|
|
138
|
+
f)}function y(e){return e instanceof ea.default||e instanceof fa.BlockEmbed}Object.defineProperty(ba,"__esModule",{value:!0});var n=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!f||h.length!==f);n=!0);}catch(oa){r=!0,w=oa}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
139
139
|
}}(),h=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}(),f=function sa(e,f,h){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return sa(e,f,h)}else{if("value"in n)return n.value;f=n.get;return void 0===f?void 0:f.call(h)}};e=ca(0);
|
|
140
|
-
var r=x(e);e=ca(8);var z=x(e),fa=ca(4),
|
|
140
|
+
var r=x(e);e=ca(8);var z=x(e),fa=ca(4),ea=x(fa);e=ca(16);var ha=x(e);e=ca(13);var ia=x(e);ca=ca(25);ca=x(ca);e=function(e){function x(e,f){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function");e=aa(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,e));e.emitter=f.emitter;Array.isArray(f.whitelist)&&(e.whitelist=f.whitelist.reduce(function(e,f){e[f]=!0;return e},{}));e.domNode.addEventListener("DOMNodeInserted",function(){});e.optimize();e.enable();return e}w(x,e);h(x,
|
|
141
141
|
[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1;this.optimize()}},{key:"deleteAt",value:function(e,h){var r=this.line(e),w=n(r,2);r=w[0];var z=w[1];w=this.line(e+h);w=n(w,1)[0];f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"deleteAt",this).call(this,e,h);if(null!=w&&r!==w&&0<z){if(r instanceof fa.BlockEmbed||w instanceof fa.BlockEmbed){this.optimize();return}if(r instanceof ia.default){if(e=r.newlineIndex(r.length(),!0),-1<e&&(r=r.split(e+
|
|
142
|
-
1),r===w)){this.optimize();return}}else w instanceof ia.default&&(e=w.newlineIndex(0),-1<e&&w.split(e+1));r.moveChildren(w,w.children.head instanceof
|
|
142
|
+
1),r===w)){this.optimize();return}}else w instanceof ia.default&&(e=w.newlineIndex(0),-1<e&&w.split(e+1));r.moveChildren(w,w.children.head instanceof ha.default?null:w.children.head);r.remove()}this.optimize()}},{key:"enable",value:function(){this.domNode.setAttribute("contenteditable",0<arguments.length&&void 0!==arguments[0]?arguments[0]:!0)}},{key:"formatAt",value:function(e,h,n,r){if(null==this.whitelist||this.whitelist[n])f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"formatAt",
|
|
143
143
|
this).call(this,e,h,n,r),this.optimize()}},{key:"insertAt",value:function(e,h,n){if(null==n||null==this.whitelist||this.whitelist[h])e>=this.length()?null==n||null==r.default.query(h,r.default.Scope.BLOCK)?(e=r.default.create(this.statics.defaultChild),this.appendChild(e),null==n&&h.endsWith("\n")&&(h=h.slice(0,-1)),e.insertAt(0,h,n)):(h=r.default.create(h,n),this.appendChild(h)):f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertAt",this).call(this,e,h,n),this.optimize()}},{key:"insertBefore",
|
|
144
|
-
value:function(e,h){if(e.statics.scope===r.default.Scope.INLINE_BLOT){var n=r.default.create(this.statics.defaultChild);n.appendChild(e);e=n}f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,e,h)}},{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(y,e)}},{key:"lines",value:function(){return function
|
|
145
|
-
f,h){y(e)?n.push(e):e instanceof r.default.Container&&(n=n.concat(
|
|
144
|
+
value:function(e,h){if(e.statics.scope===r.default.Scope.INLINE_BLOT){var n=r.default.create(this.statics.defaultChild);n.appendChild(e);e=n}f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,e,h)}},{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(y,e)}},{key:"lines",value:function(){return function va(e,f,h){var n=[],w=h;e.children.forEachAt(f,h,function(e,
|
|
145
|
+
f,h){y(e)?n.push(e):e instanceof r.default.Container&&(n=n.concat(va(e,f,w)));w-=h});return n}(this,0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,1<arguments.length&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,e,h),0<
|
|
146
146
|
e.length&&this.emitter.emit(z.default.events.SCROLL_OPTIMIZE,e,h))}},{key:"path",value:function(e){return f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var h=z.default.sources.USER;"string"===typeof e&&(h=e);Array.isArray(e)||(e=this.observer.takeRecords());0<e.length&&this.emitter.emit(z.default.events.SCROLL_BEFORE_UPDATE,h,e);f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"update",
|
|
147
|
-
this).call(this,e.concat([]));0<e.length&&this.emitter.emit(z.default.events.SCROLL_UPDATE,h,e)}}}]);return x}(r.default.Scroll);e.blotName="scroll";e.className="ql-editor";e.tagName="DIV";e.defaultChild="block";e.allowedChildren=[
|
|
147
|
+
this).call(this,e.concat([]));0<e.length&&this.emitter.emit(z.default.events.SCROLL_UPDATE,h,e)}}}]);return x}(r.default.Scroll);e.blotName="scroll";e.className="ql-editor";e.tagName="DIV";e.defaultChild="block";e.allowedChildren=[ea.default,fa.BlockEmbed,ca.default];ba.default=e},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f,h){f in e?Object.defineProperty(e,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):e[f]=h;return e}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
148
148
|
return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}function n(e,f){var h,n=e===Ba.keys.LEFT?"prefix":"suffix";return h={key:e,shiftKey:f,altKey:null},aa(h,n,/^$/),aa(h,"handler",function(h){var n=
|
|
149
|
-
h.index;e===Ba.keys.RIGHT&&(n+=h.length+1);n=this.quill.getLeaf(n);if(!(
|
|
150
|
-
n=
|
|
151
|
-
this.quill.getLength()-h)){var n={},r=0,w=this.quill.getLine(e.index);w=
|
|
152
|
-
h=
|
|
153
|
-
"\n",n,
|
|
154
|
-
var z=w.newlineIndex(x,!0)+1;f=w.newlineIndex(f+x+r);f=w.domNode.textContent.slice(z,f).split("\n");x=0;f.forEach(function(f,y){e?(w.insertAt(z+x,h.TAB),x+=h.TAB.length,0===y?n+=h.TAB.length:r+=h.TAB.length):f.startsWith(h.TAB)&&(w.deleteAt(z+x,h.TAB.length),x-=h.TAB.length,0===y?n-=h.TAB.length:r-=h.TAB.length);x+=f.length+1});this.quill.update(
|
|
155
|
-
h){this.quill.format(e,!h.format[e],
|
|
156
|
-
ba.SHORTKEY=ba.default=void 0;var ia="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},
|
|
157
|
-
x["return"])x["return"]()}finally{if(r)throw w;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),la=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(21);var na=x(e);e=ca(11);var
|
|
158
|
-
x(e);e=ca(5);var
|
|
149
|
+
h.index;e===Ba.keys.RIGHT&&(n+=h.length+1);n=this.quill.getLeaf(n);if(!(ma(n,1)[0]instanceof va.default.Embed))return!0;e===Ba.keys.LEFT?f?this.quill.setSelection(h.index-1,h.length+1,oa.default.sources.USER):this.quill.setSelection(h.index-1,oa.default.sources.USER):f?this.quill.setSelection(h.index,h.length+1,oa.default.sources.USER):this.quill.setSelection(h.index+h.length+1,oa.default.sources.USER);return!1}),h}function h(e,f){if(!(0===e.index||1>=this.quill.getLength())){var h=this.quill.getLine(e.index),
|
|
150
|
+
n=ma(h,1)[0];h={};if(0===f.offset){var r=this.quill.getLine(e.index-1);r=ma(r,1)[0];null!=r&&1<r.length()&&(h=n.formats(),n=this.quill.getFormat(e.index-1,1),h=ra.default.attributes.diff(h,n)||{})}f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(f.prefix)?2:1;this.quill.deleteText(e.index-f,f,oa.default.sources.USER);0<Object.keys(h).length&&this.quill.formatLine(e.index-f,f,h,oa.default.sources.USER);this.quill.focus()}}function f(e,f){var h=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(f.suffix)?2:1;if(!(e.index>=
|
|
151
|
+
this.quill.getLength()-h)){var n={},r=0,w=this.quill.getLine(e.index);w=ma(w,1)[0];f.offset>=w.length()-1&&(f=this.quill.getLine(e.index+1),f=ma(f,1)[0])&&(n=w.formats(),r=this.quill.getFormat(e.index,1),n=ra.default.attributes.diff(n,r)||{},r=f.length());this.quill.deleteText(e.index,h,oa.default.sources.USER);0<Object.keys(n).length&&this.quill.formatLine(e.index+r-1,h,n,oa.default.sources.USER)}}function r(e){var f=this.quill.getLines(e),h={};1<f.length&&(h=f[0].formats(),f=f[f.length-1].formats(),
|
|
152
|
+
h=ra.default.attributes.diff(f,h)||{});this.quill.deleteText(e,oa.default.sources.USER);0<Object.keys(h).length&&this.quill.formatLine(e.index,1,h,oa.default.sources.USER);this.quill.setSelection(e.index,oa.default.sources.SILENT);this.quill.focus()}function z(e,f){var h=this;0<e.length&&this.quill.scroll.deleteAt(e.index,e.length);var n=Object.keys(f.format).reduce(function(e,h){va.default.query(h,va.default.Scope.BLOCK)&&!Array.isArray(f.format[h])&&(e[h]=f.format[h]);return e},{});this.quill.insertText(e.index,
|
|
153
|
+
"\n",n,oa.default.sources.USER);this.quill.setSelection(e.index+1,oa.default.sources.SILENT);this.quill.focus();Object.keys(f.format).forEach(function(e){null==n[e]&&(Array.isArray(f.format[e])||"link"!==e&&h.quill.format(e,f.format[e],oa.default.sources.USER))})}function fa(e){return{key:Ba.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(f){var h=va.default.query("code-block"),n=f.index,r=f.length;f=this.quill.scroll.descendant(h,n);f=ma(f,2);var w=f[0],x=f[1];if(null!=w){f=this.quill.getIndex(w);
|
|
154
|
+
var z=w.newlineIndex(x,!0)+1;f=w.newlineIndex(f+x+r);f=w.domNode.textContent.slice(z,f).split("\n");x=0;f.forEach(function(f,y){e?(w.insertAt(z+x,h.TAB),x+=h.TAB.length,0===y?n+=h.TAB.length:r+=h.TAB.length):f.startsWith(h.TAB)&&(w.deleteAt(z+x,h.TAB.length),x-=h.TAB.length,0===y?n-=h.TAB.length:r-=h.TAB.length);x+=f.length+1});this.quill.update(oa.default.sources.USER);this.quill.setSelection(n,r,oa.default.sources.SILENT)}}}}function ea(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(f,
|
|
155
|
+
h){this.quill.format(e,!h.format[e],oa.default.sources.USER)}}}function ha(e){if("string"===typeof e||"number"===typeof e)return ha({key:e});"object"===("undefined"===typeof e?"undefined":ia(e))&&(e=(0,na.default)(e,!1));if("string"===typeof e.key)if(null!=Ba.keys[e.key.toUpperCase()])e.key=Ba.keys[e.key.toUpperCase()];else if(1===e.key.length)e.key=e.key.toUpperCase().charCodeAt(0);else return null;e.shortKey&&(e[xa]=e.shortKey,delete e.shortKey);return e}Object.defineProperty(ba,"__esModule",{value:!0});
|
|
156
|
+
ba.SHORTKEY=ba.default=void 0;var ia="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},ma=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!f||h.length!==f);n=!0);}catch(ya){r=!0,w=ya}finally{try{if(!n&&
|
|
157
|
+
x["return"])x["return"]()}finally{if(r)throw w;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),la=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(21);var na=x(e);e=ca(11);var qa=x(e);e=ca(3);var sa=x(e);e=ca(2);var Ea=x(e);e=ca(20);var ra=x(e);e=ca(0);var va=
|
|
158
|
+
x(e);e=ca(5);var oa=x(e);e=ca(10);e=x(e);ca=ca(9);ca=x(ca);var ua=(0,e.default)("quill:keyboard"),xa=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",Ba=function(e){function n(e,x){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");var y=w(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,x));y.bindings={};Object.keys(y.options.bindings).forEach(function(f){("list autofill"!==f||null==e.scroll.whitelist||e.scroll.whitelist.list)&&y.options.bindings[f]&&y.addBinding(y.options.bindings[f])});
|
|
159
159
|
y.addBinding({key:n.keys.ENTER,shiftKey:null},z);y.addBinding({key:n.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){});/Firefox/i.test(navigator.userAgent)?(y.addBinding({key:n.keys.BACKSPACE},{collapsed:!0},h),y.addBinding({key:n.keys.DELETE},{collapsed:!0},f)):(y.addBinding({key:n.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},h),y.addBinding({key:n.keys.DELETE},{collapsed:!0,suffix:/^.?$/},f));y.addBinding({key:n.keys.BACKSPACE},{collapsed:!1},r);y.addBinding({key:n.keys.DELETE},{collapsed:!1},
|
|
160
|
-
r);y.addBinding({key:n.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},h);y.listen();return y}y(n,e);la(n,null,[{key:"match",value:function(e,f){f=
|
|
161
|
-
|
|
162
|
-
if(null!=r&&e.quill.hasFocus()){var w=e.quill.getLine(r.index),x=
|
|
163
|
-
f.collapsed!==
|
|
164
|
-
!0!==f.handler.call(e,r,
|
|
165
|
-
"list"],handler:function(e,f){if(f.collapsed&&0!==f.offset)return!0;this.quill.format("indent","-1",
|
|
166
|
-
"remove tab":{key:Ba.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,
|
|
167
|
-
handler:function(e,f){this.quill.format("list",!1,
|
|
168
|
-
this.quill.setSelection(e.index+1,
|
|
169
|
-
collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,f){var h=f.prefix.length,n=this.quill.getLine(e.index),r=
|
|
170
|
-
{list:f});this.quill.updateContents(f,
|
|
171
|
-
!1),"embed left shift":n(Ba.keys.LEFT,!0),"embed right":n(Ba.keys.RIGHT,!1),"embed right shift":n(Ba.keys.RIGHT,!0)}};ba.default=Ba;ba.SHORTKEY=
|
|
160
|
+
r);y.addBinding({key:n.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},h);y.listen();return y}y(n,e);la(n,null,[{key:"match",value:function(e,f){f=ha(f);return["altKey","ctrlKey","metaKey","shiftKey"].some(function(h){return!!f[h]!==e[h]&&null!==f[h]})?!1:f.key===(e.which||e.keyCode)}}]);la(n,[{key:"addBinding",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=
|
|
161
|
+
ha(e);if(null==n||null==n.key)return ua.warn("Attempted to add invalid keyboard binding",n);"function"===typeof f&&(f={handler:f});"function"===typeof h&&(h={handler:h});n=(0,sa.default)(n,f,h);this.bindings[n.key]=this.bindings[n.key]||[];this.bindings[n.key].push(n)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(f){if(!f.defaultPrevented){var h=(e.bindings[f.which||f.keyCode]||[]).filter(function(e){return n.match(f,e)});if(0!==h.length){var r=e.quill.getSelection();
|
|
162
|
+
if(null!=r&&e.quill.hasFocus()){var w=e.quill.getLine(r.index),x=ma(w,2);w=x[0];x=x[1];var z=e.quill.getLeaf(r.index),y=ma(z,2);z=y[0];y=y[1];var aa=0===r.length?[z,y]:e.quill.getLeaf(r.index+r.length),da=ma(aa,2);aa=da[0];da=da[1];z=z instanceof va.default.Text?z.value().slice(0,y):"";y=aa instanceof va.default.Text?aa.value().slice(da):"";var ba={collapsed:0===r.length,empty:0===r.length&&1>=w.length(),format:e.quill.getFormat(r),offset:x,prefix:z,suffix:y};h.some(function(f){if(null!=f.collapsed&&
|
|
163
|
+
f.collapsed!==ba.collapsed||null!=f.empty&&f.empty!==ba.empty||null!=f.offset&&f.offset!==ba.offset)return!1;if(Array.isArray(f.format)){if(f.format.every(function(e){return null==ba.format[e]}))return!1}else if("object"===ia(f.format)&&!Object.keys(f.format).every(function(e){return!0===f.format[e]?null!=ba.format[e]:!1===f.format[e]?null==ba.format[e]:(0,qa.default)(f.format[e],ba.format[e])}))return!1;return null!=f.prefix&&!f.prefix.test(ba.prefix)||null!=f.suffix&&!f.suffix.test(ba.suffix)?!1:
|
|
164
|
+
!0!==f.handler.call(e,r,ba)})&&f.preventDefault()}}}})}}]);return n}(ca.default);Ba.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};Ba.DEFAULTS={bindings:{bold:ea("bold"),italic:ea("italic"),underline:ea("underline"),indent:{key:Ba.keys.TAB,format:["blockquote","indent","list"],handler:function(e,f){if(f.collapsed&&0!==f.offset)return!0;this.quill.format("indent","+1",oa.default.sources.USER)}},outdent:{key:Ba.keys.TAB,shiftKey:!0,format:["blockquote","indent",
|
|
165
|
+
"list"],handler:function(e,f){if(f.collapsed&&0!==f.offset)return!0;this.quill.format("indent","-1",oa.default.sources.USER)}},"outdent backspace":{key:Ba.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,f){null!=f.format.indent?this.quill.format("indent","-1",oa.default.sources.USER):null!=f.format.list&&this.quill.format("list",!1,oa.default.sources.USER)}},"indent code-block":fa(!0),"outdent code-block":fa(!1),
|
|
166
|
+
"remove tab":{key:Ba.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,oa.default.sources.USER)}},tab:{key:Ba.keys.TAB,handler:function(e){this.quill.history.cutoff();var f=(new Ea.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(f,oa.default.sources.USER);this.quill.history.cutoff();this.quill.setSelection(e.index+1,oa.default.sources.SILENT)}},"list empty enter":{key:Ba.keys.ENTER,collapsed:!0,format:["list"],empty:!0,
|
|
167
|
+
handler:function(e,f){this.quill.format("list",!1,oa.default.sources.USER);f.format.indent&&this.quill.format("indent",!1,oa.default.sources.USER)}},"checklist enter":{key:Ba.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var f=this.quill.getLine(e.index),h=ma(f,2);f=h[0];h=h[1];var n=(0,sa.default)({},f.formats(),{list:"checked"});f=(new Ea.default).retain(e.index).insert("\n",n).retain(f.length()-h-1).retain(1,{list:"unchecked"});this.quill.updateContents(f,oa.default.sources.USER);
|
|
168
|
+
this.quill.setSelection(e.index+1,oa.default.sources.SILENT);this.quill.scrollIntoView()}},"header enter":{key:Ba.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,f){var h=this.quill.getLine(e.index),n=ma(h,2);h=n[0];n=n[1];f=(new Ea.default).retain(e.index).insert("\n",f.format).retain(h.length()-n-1).retain(1,{header:null});this.quill.updateContents(f,oa.default.sources.USER);this.quill.setSelection(e.index+1,oa.default.sources.SILENT);this.quill.scrollIntoView()}},"list autofill":{key:" ",
|
|
169
|
+
collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,f){var h=f.prefix.length,n=this.quill.getLine(e.index),r=ma(n,2);n=r[0];r=r[1];if(r>h)return!0;switch(f.prefix.trim()){case "[]":case "[ ]":f="unchecked";break;case "[x]":f="checked";break;case "-":case "*":f="bullet";break;default:f="ordered"}this.quill.insertText(e.index," ",oa.default.sources.USER);this.quill.history.cutoff();f=(new Ea.default).retain(e.index-r).delete(h+1).retain(n.length()-2-r).retain(1,
|
|
170
|
+
{list:f});this.quill.updateContents(f,oa.default.sources.USER);this.quill.history.cutoff();this.quill.setSelection(e.index-h,oa.default.sources.SILENT)}},"code exit":{key:Ba.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var f=this.quill.getLine(e.index),h=ma(f,2);f=h[0];h=h[1];e=(new Ea.default).retain(e.index+f.length()-h-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(e,oa.default.sources.USER)}},"embed left":n(Ba.keys.LEFT,
|
|
171
|
+
!1),"embed left shift":n(Ba.keys.LEFT,!0),"embed right":n(Ba.keys.RIGHT,!1),"embed right shift":n(Ba.keys.RIGHT,!0)}};ba.default=Ba;ba.SHORTKEY=xa},function(e,ba,ca){function x(e,h){if("function"!==typeof h&&null!==h)throw new TypeError("Super expression must either be null or a function, not "+typeof h);e.prototype=Object.create(h&&h.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});h&&(Object.setPrototypeOf?Object.setPrototypeOf(e,h):e.__proto__=h)}Object.defineProperty(ba,
|
|
172
172
|
"__esModule",{value:!0});var aa=function(){return function(e,h){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var f=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),y;!(n=(y=x.next()).done)&&(f.push(y.value),!h||f.length!==h);n=!0);}catch(la){r=!0,w=la}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;}}return f}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),w=function ka(e,h,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,
|
|
173
173
|
h);if(void 0===r){if(e=Object.getPrototypeOf(e),null!==e)return ka(e,h,n)}else{if("value"in r)return r.value;h=r.get;return void 0===h?void 0:h.call(n)}},y=function(){function e(e,h){for(var n=0;n<h.length;n++){var r=h[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}return function(h,n,r){n&&e(h.prototype,n);r&&e(h,r);return h}}(),n=(e=ca(0))&&e.__esModule?e:{default:e},h=(ca=ca(7))&&ca.__esModule?ca:{default:ca};ca=function(e){function r(e,
|
|
174
174
|
h){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");e=(r.__proto__||Object.getPrototypeOf(r)).call(this,e);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");e=!e||"object"!==typeof e&&"function"!==typeof e?this:e;e.selection=h;e.textNode=document.createTextNode(r.CONTENTS);e.domNode.appendChild(e.textNode);e._length=0;return e}x(r,e);y(r,null,[{key:"value",value:function(){}}]);y(r,[{key:"detach",value:function(){null!=this.parent&&
|
|
@@ -195,8 +195,8 @@ e.buildItem(f);h.appendChild(n);!0===f.selected&&e.selectItem(n)});this.containe
|
|
|
195
195
|
this.label.setAttribute("aria-expanded","false");this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!1,h=this.container.querySelector(".ql-selected");e!==h&&(null!=h&&h.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")):
|
|
196
196
|
this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),f&&("function"===typeof Event?this.select.dispatchEvent(new Event("change")):"object"===("undefined"===typeof Event?"undefined":x(Event))&&(f=document.createEvent("Event"),f.initEvent("change",!0,!0),this.select.dispatchEvent(f)),this.close())))}},{key:"update",value:function(){var e=void 0;if(-1<this.select.selectedIndex){var h=
|
|
197
197
|
this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex];this.selectItem(h)}else this.selectItem(null);this.label.classList.toggle("ql-active",null!=e&&e!==this.select.querySelector("option[selected]"))}}]);return e}();ba.default=ca},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(ba,"__esModule",{value:!0});e=ca(0);e=x(e);var aa=ca(5);aa=x(aa);var w=ca(4),y=x(w),n=ca(16);n=x(n);
|
|
198
|
-
var h=ca(25);h=x(h);var f=ca(24);f=x(f);var r=ca(35);r=x(r);var z=ca(6);z=x(z);var fa=ca(22);fa=x(fa);var
|
|
199
|
-
e.default.register(y.default,n.default,f.default,z.default,fa.default,
|
|
198
|
+
var h=ca(25);h=x(h);var f=ca(24);f=x(f);var r=ca(35);r=x(r);var z=ca(6);z=x(z);var fa=ca(22);fa=x(fa);var ea=ca(7);ea=x(ea);var ha=ca(55);ha=x(ha);var ia=ca(42);ia=x(ia);ca=ca(23);aa.default.register({"blots/block":y.default,"blots/block/embed":w.BlockEmbed,"blots/break":n.default,"blots/container":h.default,"blots/cursor":f.default,"blots/embed":r.default,"blots/inline":z.default,"blots/scroll":fa.default,"blots/text":ea.default,"modules/clipboard":ha.default,"modules/history":ia.default,"modules/keyboard":x(ca).default});
|
|
199
|
+
e.default.register(y.default,n.default,f.default,z.default,fa.default,ea.default);ba.default=aa.default},function(e,ba,ca){Object.defineProperty(ba,"__esModule",{value:!0});var x=ca(1);e=function(){function e(e){this.domNode=e;this.domNode[x.DATA_KEY]={blot:this}}Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0});e.create=function(e){if(null==this.tagName)throw new x.ParchmentError("Blot definition missing tagName");Array.isArray(this.tagName)?
|
|
200
200
|
("string"===typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),e="number"===typeof e?document.createElement(this.tagName[e-1]):-1<this.tagName.indexOf(e)?document.createElement(e):document.createElement(this.tagName[0])):e=document.createElement(this.tagName);this.className&&e.classList.add(this.className);return e};e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)};e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return x.create(e)};
|
|
201
201
|
e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this);delete this.domNode[x.DATA_KEY]};e.prototype.deleteAt=function(e,x){this.isolate(e,x).remove()};e.prototype.formatAt=function(e,y,n,h){e=this.isolate(e,y);null!=x.query(n,x.Scope.BLOT)&&h?e.wrap(n,h):null!=x.query(n,x.Scope.ATTRIBUTE)&&(y=x.create(this.statics.scope),e.wrap(y),y.format(n,h))};e.prototype.insertAt=function(e,y,n){y=null==n?x.create("text",y):x.create(y,n);e=this.split(e);this.parent.insertBefore(y,e)};e.prototype.insertInto=
|
|
202
202
|
function(e,x){void 0===x&&(x=null);null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,x);null!=x&&(n=x.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,x){e=this.split(e);e.split(x);return e};e.prototype.length=function(){return 1};e.prototype.offset=function(e){void 0===e&&(e=this.parent);return null==this.parent||this==e?0:this.parent.children.offset(this)+
|
|
@@ -232,11 +232,11 @@ this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo
|
|
|
232
232
|
ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,
|
|
233
233
|
enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}function n(e,f){var h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:!1;f.forEach(function(f){var n=document.createElement("option");f===h?n.setAttribute("selected","selected"):n.setAttribute("value",f);e.appendChild(n)})}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.BaseTooltip=void 0;var h=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=
|
|
234
234
|
n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}(),f=function Ba(e,f,h){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return Ba(e,f,h)}else{if("value"in n)return n.value;f=n.get;return void 0===f?void 0:f.call(h)}};e=ca(3);e=x(e);var r=ca(2),z=x(r);r=ca(8);var fa=x(r);r=ca(23);var ea=x(r);r=ca(34);r=x(r);
|
|
235
|
-
var ha=ca(59),ia=x(ha);ha=ca(60);var
|
|
235
|
+
var ha=ca(59),ia=x(ha);ha=ca(60);var ma=x(ha);ha=ca(28);var la=x(ha);ca=ca(61);ha=x(ca);var na=[!1,"center","right","justify"],qa="#000000 #e60000 #ff9900 #ffff00 #008a00 #0066cc #9933ff #ffffff #facccc #ffebcc #ffffcc #cce8cc #cce0f5 #ebd6ff #bbbbbb #f06666 #ffc266 #ffff66 #66b966 #66a3e0 #c285ff #888888 #a10000 #b26b00 #b2b200 #006100 #0047b2 #6b24b2 #444444 #5c0000 #663d00 #666600 #003700 #002966 #3d1466".split(" "),sa=[!1,"serif","monospace"],Ea=["1","2","3",!1],ra=["small",!1,"large","huge"];
|
|
236
236
|
ca=function(e){function r(e,f){aa(this,r);var h=w(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,f));e.emitter.listenDOM("click",document.body,function Ga(f){if(!document.body.contains(e.root))return document.body.removeEventListener("click",Ga);null==h.tooltip||h.tooltip.root.contains(f.target)||document.activeElement===h.tooltip.textbox||h.quill.hasFocus()||h.tooltip.hide();null!=h.pickers&&h.pickers.forEach(function(e){e.container.contains(f.target)||e.close()})});return h}y(r,e);h(r,
|
|
237
237
|
[{key:"addModule",value:function(e){var h=f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"addModule",this).call(this,e);"toolbar"===e&&this.extendToolbar(h);return h}},{key:"buildButtons",value:function(e,f){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(h){if(h.startsWith("ql-")&&(h=h.slice(3),null!=f[h]))if("direction"===h)e.innerHTML=f[h][""]+f[h].rtl;else if("string"===typeof f[h])e.innerHTML=f[h];else{var n=e.value||"";null!=n&&f[h][n]&&(e.innerHTML=
|
|
238
|
-
f[h][n])}})})}},{key:"buildPickers",value:function(e,f){var h=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&n(e,na),new
|
|
239
|
-
n(e,sa):e.classList.contains("ql-header")?n(e,Ea):e.classList.contains("ql-size")&&n(e,
|
|
238
|
+
f[h][n])}})})}},{key:"buildPickers",value:function(e,f){var h=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&n(e,na),new ma.default(e,f.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var h=e.classList.contains("ql-background")?"background":"color";null==e.querySelector("option")&&n(e,qa,"background"===h?"#ffffff":"#000000");return new ia.default(e,f[h])}null==e.querySelector("option")&&(e.classList.contains("ql-font")?
|
|
239
|
+
n(e,sa):e.classList.contains("ql-header")?n(e,Ea):e.classList.contains("ql-size")&&n(e,ra));return new la.default(e)});this.quill.on(fa.default.events.EDITOR_CHANGE,function(){h.pickers.forEach(function(e){e.update()})})}}]);return r}(r.default);ca.DEFAULTS=(0,e.default)(!0,{},r.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,f=this.container.querySelector("input.ql-image[type=file]");null==f&&(f=document.createElement("input"),
|
|
240
240
|
f.setAttribute("type","file"),f.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),f.classList.add("ql-image"),f.addEventListener("change",function(){if(null!=f.files&&null!=f.files[0]){var h=new FileReader;h.onload=function(h){var n=e.quill.getSelection(!0);e.quill.updateContents((new z.default).retain(n.index).delete(n.length).insert({image:h.target.result}),fa.default.sources.USER);e.quill.setSelection(n.index+1,fa.default.sources.SILENT);f.value=""};h.readAsDataURL(f.files[0])}}),
|
|
241
241
|
this.container.appendChild(f));f.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});e=function(e){function f(e,h){aa(this,f);e=w(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,e,h));e.textbox=e.root.querySelector('input[type="text"]');e.listen();return e}y(f,e);h(f,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(f){ea.default.match(f,"enter")?(e.save(),f.preventDefault()):ea.default.match(f,"escape")&&(e.cancel(),f.preventDefault())})}},
|
|
242
242
|
{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"link",f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden");this.root.classList.add("ql-editing");null!=f?this.textbox.value=f: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",
|
|
@@ -266,10 +266,10 @@ this.statics.value(this.domNode))};w.prototype.value=function(){return this.text
|
|
|
266
266
|
x){return this.substr(x||0,e.length)===e});String.prototype.endsWith||(String.prototype.endsWith=function(e,x){var aa=this.toString();if("number"!==typeof x||!isFinite(x)||Math.floor(x)!==x||x>aa.length)x=aa.length;x-=e.length;e=aa.indexOf(e,x);return-1!==e&&e===x});Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e,x){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");
|
|
267
267
|
for(var aa=Object(this),w=aa.length>>>0,y,n=0;n<w;n++)if(y=aa[n],e.call(x,y,n,aa))return y}});document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1);document.execCommand("autoUrlDetect",!1,!1)})},function(e){function x(e,r,x){if(e==r)return e?[[0,e]]:[];if(0>x||e.length<x)x=null;var y=aa(e,r),z=e.substring(0,y);e=e.substring(y);r=r.substring(y);y=w(e,r);var da=e.substring(e.length-y);e=e.substring(0,e.length-y);r=r.substring(0,r.length-y);e=ba(e,
|
|
268
268
|
r);z&&e.unshift([0,z]);da&&e.push([0,da]);n(e);null!=x&&(e=h(e,x));return e=f(e)}function ba(e,f){if(!e)return[[1,f]];if(!f)return[[-1,e]];var h=e.length>f.length?e:f;var n=e.length>f.length?f:e,r=h.indexOf(n);if(-1!=r)return h=[[1,h.substring(0,r)],[0,n],[1,h.substring(r+n.length)]],e.length>f.length&&(h[0][0]=h[2][0]=-1),h;if(1==n.length)return[[-1,e],[1,f]];if(h=y(e,f))return f=h[1],n=h[3],e=h[4],h=x(h[0],h[2]),f=x(f,n),h.concat([[0,e]],f);a:{h=e.length;n=f.length;r=Math.ceil((h+n)/2);for(var w=
|
|
269
|
-
2*r,z=Array(w),aa=Array(w),ba=0;ba<w;ba++)z[ba]=-1,aa[ba]=-1;z[r+1]=0;aa[r+1]=0;ba=h-n;for(var
|
|
270
|
-
|
|
271
|
-
0,n=Math.min(e.length,f.length),r=n,w=0;h<r;)e.substring(w,r)==f.substring(w,r)?w=h=r:n=r,r=Math.floor((n-h)/2+h);return r}function w(e,f){if(!e||!f||e.charAt(e.length-1)!=f.charAt(f.length-1))return 0;for(var h=0,n=Math.min(e.length,f.length),r=n,w=0;h<r;)e.substring(e.length-r,e.length-w)==f.substring(f.length-r,f.length-w)?w=h=r:n=r,r=Math.floor((n-h)/2+h);return r}function y(e,f){function h(e,f,h){for(var n=e.substring(h,h+Math.floor(e.length/4)),r=-1,x="",y,z,ba,da;-1!=(r=f.indexOf(n,r+1));){var
|
|
272
|
-
aa(e.substring(h),f.substring(r)),
|
|
269
|
+
2*r,z=Array(w),aa=Array(w),ba=0;ba<w;ba++)z[ba]=-1,aa[ba]=-1;z[r+1]=0;aa[r+1]=0;ba=h-n;for(var fa=0!=ba%2,ca=0,ea=0,ha=0,ia=0,ua=0;ua<r;ua++){for(var xa=-ua+ca;xa<=ua-ea;xa+=2){var Ba=r+xa;var Da=xa==-ua||xa!=ua&&z[Ba-1]<z[Ba+1]?z[Ba+1]:z[Ba-1]+1;for(var Aa=Da-xa;Da<h&&Aa<n&&e.charAt(Da)==f.charAt(Aa);)Da++,Aa++;z[Ba]=Da;if(Da>h)ea+=2;else if(Aa>n)ca+=2;else if(fa&&(Ba=r+ba-xa,0<=Ba&&Ba<w&&-1!=aa[Ba])){var Fa=h-aa[Ba];if(Da>=Fa){e=da(e,f,Da,Aa);break a}}}for(xa=-ua+ha;xa<=ua-ia;xa+=2){Ba=r+xa;Fa=
|
|
270
|
+
xa==-ua||xa!=ua&&aa[Ba-1]<aa[Ba+1]?aa[Ba+1]:aa[Ba-1]+1;for(Da=Fa-xa;Fa<h&&Da<n&&e.charAt(h-Fa-1)==f.charAt(n-Da-1);)Fa++,Da++;aa[Ba]=Fa;if(Fa>h)ia+=2;else if(Da>n)ha+=2;else if(!fa&&(Ba=r+ba-xa,0<=Ba&&Ba<w&&-1!=z[Ba]&&(Da=z[Ba],Aa=r+Da-Ba,Fa=h-Fa,Da>=Fa))){e=da(e,f,Da,Aa);break a}}}e=[[-1,e],[1,f]]}return e}function da(e,f,h,n){var r=e.substring(h),w=f.substring(n);e=x(e.substring(0,h),f.substring(0,n));r=x(r,w);return e.concat(r)}function aa(e,f){if(!e||!f||e.charAt(0)!=f.charAt(0))return 0;for(var h=
|
|
271
|
+
0,n=Math.min(e.length,f.length),r=n,w=0;h<r;)e.substring(w,r)==f.substring(w,r)?w=h=r:n=r,r=Math.floor((n-h)/2+h);return r}function w(e,f){if(!e||!f||e.charAt(e.length-1)!=f.charAt(f.length-1))return 0;for(var h=0,n=Math.min(e.length,f.length),r=n,w=0;h<r;)e.substring(e.length-r,e.length-w)==f.substring(f.length-r,f.length-w)?w=h=r:n=r,r=Math.floor((n-h)/2+h);return r}function y(e,f){function h(e,f,h){for(var n=e.substring(h,h+Math.floor(e.length/4)),r=-1,x="",y,z,ba,da;-1!=(r=f.indexOf(n,r+1));){var fa=
|
|
272
|
+
aa(e.substring(h),f.substring(r)),ca=w(e.substring(0,h),f.substring(0,r));x.length<ca+fa&&(x=f.substring(r-ca,r)+f.substring(r,r+fa),y=e.substring(0,h-ca),z=e.substring(h+fa),ba=f.substring(0,r-ca),da=f.substring(r+fa))}return 2*x.length>=e.length?[y,z,ba,da,x]:null}var n=e.length>f.length?e:f,r=e.length>f.length?f:e;if(4>n.length||2*r.length<n.length)return null;var x=h(n,r,Math.ceil(n.length/4));n=h(n,r,Math.ceil(n.length/2));if(x||n)x=n?x?x[4].length>n[4].length?x:n:n:x;else return null;e.length>
|
|
273
273
|
f.length?(e=x[0],f=x[1],n=x[2],r=x[3]):(n=x[0],r=x[1],e=x[2],f=x[3]);return[e,f,n,r,x[4]]}function n(e){e.push([0,""]);for(var f=0,h=0,r=0,x="",y="",z;f<e.length;)switch(e[f][0]){case 1:r++;y+=e[f][1];f++;break;case -1:h++;x+=e[f][1];f++;break;case 0:1<h+r?(0!==h&&0!==r&&(z=aa(y,x),0!==z&&(0<f-h-r&&0==e[f-h-r-1][0]?e[f-h-r-1][1]+=y.substring(0,z):(e.splice(0,0,[0,y.substring(0,z)]),f++),y=y.substring(z),x=x.substring(z)),z=w(y,x),0!==z&&(e[f][1]=y.substring(y.length-z)+e[f][1],y=y.substring(0,y.length-
|
|
274
274
|
z),x=x.substring(0,x.length-z))),0===h?e.splice(f-r,h+r,[1,y]):0===r?e.splice(f-h,h+r,[-1,x]):e.splice(f-h-r,h+r,[-1,x],[1,y]),f=f-h-r+(h?1:0)+(r?1:0)+1):0!==f&&0==e[f-1][0]?(e[f-1][1]+=e[f][1],e.splice(f,1)):f++,h=r=0,y=x=""}""===e[e.length-1][1]&&e.pop();h=!1;for(f=1;f<e.length-1;)0==e[f-1][0]&&0==e[f+1][0]&&(e[f][1].substring(e[f][1].length-e[f-1][1].length)==e[f-1][1]?(e[f][1]=e[f-1][1]+e[f][1].substring(0,e[f][1].length-e[f-1][1].length),e[f+1][1]=e[f-1][1]+e[f+1][1],e.splice(f-1,1),h=!0):e[f][1].substring(0,
|
|
275
275
|
e[f+1][1].length)==e[f+1][1]&&(e[f-1][1]+=e[f+1][1],e[f][1]=e[f][1].substring(e[f+1][1].length)+e[f+1][1],e.splice(f+1,1),h=!0)),f++;h&&n(e)}function h(e,f){a:{var h=e;if(0===f)var n=[0,h];else{var w=0;for(n=0;n<h.length;n++){var x=h[n];if(-1===x[0]||0===x[0]){var y=w+x[1].length;if(f===y){n=[n+1,h];break a}if(f<y){h=h.slice();w=f-w;f=[x[0],x[1].slice(0,w)];x=[x[0],x[1].slice(w)];h.splice(n,1,f,x);n=[n+1,h];break a}w=y}}throw Error("cursor_pos is out of bounds!");}}h=n[1];n=n[0];f=h[n];x=h[n+1];return null==
|
|
@@ -283,29 +283,29 @@ da.prototype.on=function(e,n,h){n=new ba(n,h||this);e=w?w+e:e;this._events[e]?th
|
|
|
283
283
|
if(!n)return 0===--this._eventsCount?this._events=new x:delete this._events[e],this;var r=this._events[e];if(r.fn)r.fn!==n||f&&!r.once||h&&r.context!==h||(0===--this._eventsCount?this._events=new x:delete this._events[e]);else{for(var y=0,aa=[],ba=r.length;y<ba;y++)(r[y].fn!==n||f&&!r[y].once||h&&r[y].context!==h)&&aa.push(r[y]);aa.length?this._events[e]=1===aa.length?aa[0]:aa:0===--this._eventsCount?this._events=new x:delete this._events[e]}return this};da.prototype.removeAllListeners=function(e){e?
|
|
284
284
|
(e=w?w+e:e,this._events[e]&&(0===--this._eventsCount?this._events=new x:delete this._events[e])):(this._events=new x,this._eventsCount=0);return this};da.prototype.off=da.prototype.removeListener;da.prototype.addListener=da.prototype.on;da.prototype.setMaxListeners=function(){return this};da.prefixed=w;da.EventEmitter=da;"undefined"!==typeof e&&(e.exports=da)},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f,h){f in e?Object.defineProperty(e,f,{value:h,enumerable:!0,
|
|
285
285
|
configurable:!0,writable:!0}):e[f]=h;return e}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,
|
|
286
|
-
f):e.__proto__=f)}function n(e,f,h){return"object"===("undefined"===typeof f?"undefined":na(f))?Object.keys(f).reduce(function(e,h){return n(e,h,f[h])},e):e.reduce(function(e,n){return n.attributes&&n.attributes[f]?e.push(n):e.insert(n.insert,(0,Ea.default)({},aa({},f,h),n.attributes))},new
|
|
287
|
-
e.ops[n];if("string"!==typeof r.insert)break;h=r.insert+h}return h.slice(-1*f.length)===f}function r(e){if(0===e.childNodes.length)return!1;e=h(e);return-1<["block","list-item"].indexOf(e.display)}function z(e,f,h){return e.nodeType===e.TEXT_NODE?h.reduce(function(f,h){return h(e,f)},new
|
|
288
|
-
f){return f(r,e)},w));return n.concat(w)},new
|
|
289
|
-
h||h.attrName!==f&&h.keyName!==f||(h=za[f],x[h.attrName]=h.value(e)||void 0)});0<Object.keys(x).length&&(f=n(f,x));return f}function ha(e,f){var h=
|
|
290
|
-
function
|
|
286
|
+
f):e.__proto__=f)}function n(e,f,h){return"object"===("undefined"===typeof f?"undefined":na(f))?Object.keys(f).reduce(function(e,h){return n(e,h,f[h])},e):e.reduce(function(e,n){return n.attributes&&n.attributes[f]?e.push(n):e.insert(n.insert,(0,Ea.default)({},aa({},f,h),n.attributes))},new ra.default)}function h(e){return e.nodeType!==Node.ELEMENT_NODE?{}:e["__ql-computed-style"]||(e["__ql-computed-style"]=window.getComputedStyle(e))}function f(e,f){for(var h="",n=e.ops.length-1;0<=n&&h.length<f.length;--n){var r=
|
|
287
|
+
e.ops[n];if("string"!==typeof r.insert)break;h=r.insert+h}return h.slice(-1*f.length)===f}function r(e){if(0===e.childNodes.length)return!1;e=h(e);return-1<["block","list-item"].indexOf(e.display)}function z(e,f,h){return e.nodeType===e.TEXT_NODE?h.reduce(function(f,h){return h(e,f)},new ra.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(n,r){var w=z(r,f,h);r.nodeType===e.ELEMENT_NODE&&(w=f.reduce(function(e,f){return f(r,e)},w),w=(r["__ql-matcher"]||[]).reduce(function(e,
|
|
288
|
+
f){return f(r,e)},w));return n.concat(w)},new ra.default):new ra.default}function fa(e,f,h){return n(h,e,!0)}function ea(e,f){var h=va.default.Attributor.Attribute.keys(e),r=va.default.Attributor.Class.keys(e),w=va.default.Attributor.Style.keys(e),x={};h.concat(r).concat(w).forEach(function(f){var h=va.default.query(f,va.default.Scope.ATTRIBUTE);if(null!=h&&(x[h.attrName]=h.value(e),x[h.attrName]))return;h=Ja[f];null==h||h.attrName!==f&&h.keyName!==f||(x[h.attrName]=h.value(e)||void 0);h=za[f];null==
|
|
289
|
+
h||h.attrName!==f&&h.keyName!==f||(h=za[f],x[h.attrName]=h.value(e)||void 0)});0<Object.keys(x).length&&(f=n(f,x));return f}function ha(e,f){var h=va.default.query(e);if(null==h)return f;if(h.prototype instanceof va.default.Embed){var r={},w=h.value(e);null!=w&&(r[h.blotName]=w,f=(new ra.default).insert(r,h.formats(e)))}else"function"===typeof h.formats&&(f=n(f,h.blotName,h.formats(e)));return f}function ia(e,h){f(h,"\n")||(r(e)||0<h.length()&&e.nextSibling&&r(e.nextSibling))&&h.insert("\n");return h}
|
|
290
|
+
function ma(e,n){if(r(e)&&null!=e.nextElementSibling&&!f(n,"\n\n")){var w=e.offsetHeight+parseFloat(h(e).marginTop)+parseFloat(h(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*w&&n.insert("\n")}return n}function la(e,f){var n=e.data;if("O:P"===e.parentNode.tagName)return f.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return f;if(!h(e.parentNode).whiteSpace.startsWith("pre")){var w=function(e,f){f=f.replace(/[^\u00a0]/g,"");return 1>f.length&&
|
|
291
291
|
e?" ":f};n=n.replace(/\r\n/g," ").replace(/\n/g," ");n=n.replace(/\s\s+/g,w.bind(w,!0));if(null==e.previousSibling&&r(e.parentNode)||null!=e.previousSibling&&r(e.previousSibling))n=n.replace(/^\s+/,w.bind(w,!1));if(null==e.nextSibling&&r(e.parentNode)||null!=e.nextSibling&&r(e.nextSibling))n=n.replace(/\s+$/,w.bind(w,!1))}return f.insert(n)}Object.defineProperty(ba,"__esModule",{value:!0});ba.matchText=ba.matchSpacing=ba.matchNewline=ba.matchBlot=ba.matchAttributor=ba.default=void 0;var na="function"===
|
|
292
|
-
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},
|
|
293
|
-
}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),sa=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(3);var Ea=x(e);e=ca(2);var
|
|
294
|
-
ca(26);var Fa=ca(38),Ga=ca(39);ca=ca(40);var Ca=(0,e.default)("quill:clipboard"),Ia=[[Node.TEXT_NODE,la],[Node.TEXT_NODE,ia],["br",function(e,h){f(h,"\n")||h.insert("\n");return h}],[Node.ELEMENT_NODE,ia],[Node.ELEMENT_NODE,ha],[Node.ELEMENT_NODE,
|
|
295
|
-
(f=n(f,r));0<parseFloat(w.textIndent||0)&&(f=(new
|
|
296
|
-
Ja=[
|
|
297
|
-
n.container.setAttribute("contenteditable",!0);n.container.setAttribute("tabindex",-1);n.matchers=[];Ia.concat(n.options.matchers).forEach(function(e){e=
|
|
298
|
-
if(e[Aa.default.blotName]){var h=this.container.innerText;this.container.innerHTML="";return(new
|
|
299
|
-
void 0!==arguments[2]?arguments[2]:
|
|
300
|
-
this.container.focus();this.quill.selection.update(
|
|
301
|
-
break;default:[].forEach.call(e.container.querySelectorAll(r),function(e){e["__ql-matcher"]=e["__ql-matcher"]||[];e["__ql-matcher"].push(w)})}});return[f,h]}}]);return h}(
|
|
292
|
+
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},qa=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),y;!(n=(y=x.next()).done)&&(h.push(y.value),!f||h.length!==f);n=!0);}catch(Pa){r=!0,w=Pa}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;
|
|
293
|
+
}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),sa=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(3);var Ea=x(e);e=ca(2);var ra=x(e);e=ca(0);var va=x(e);e=ca(5);var oa=x(e);e=ca(10);e=x(e);var ua=ca(9);ua=x(ua);var xa=ca(36),Ba=ca(37),Da=ca(13),Aa=x(Da);Da=
|
|
294
|
+
ca(26);var Fa=ca(38),Ga=ca(39);ca=ca(40);var Ca=(0,e.default)("quill:clipboard"),Ia=[[Node.TEXT_NODE,la],[Node.TEXT_NODE,ia],["br",function(e,h){f(h,"\n")||h.insert("\n");return h}],[Node.ELEMENT_NODE,ia],[Node.ELEMENT_NODE,ha],[Node.ELEMENT_NODE,ma],[Node.ELEMENT_NODE,ea],[Node.ELEMENT_NODE,function(e,f){var r={},w=e.style||{};w.fontStyle&&"italic"===h(e).fontStyle&&(r.italic=!0);w.fontWeight&&(h(e).fontWeight.startsWith("bold")||700<=parseInt(h(e).fontWeight))&&(r.bold=!0);0<Object.keys(r).length&&
|
|
295
|
+
(f=n(f,r));0<parseFloat(w.textIndent||0)&&(f=(new ra.default).insert("\t").concat(f));return f}],["li",function(e,h){var n=va.default.query(e);if(null==n||"list-item"!==n.blotName||!f(h,"\n"))return h;n=-1;for(e=e.parentNode;!e.classList.contains("ql-clipboard");)"list"===(va.default.query(e)||{}).blotName&&(n+=1),e=e.parentNode;return 0>=n?h:h.compose((new ra.default).retain(h.length()-1).retain(1,{indent:n}))}],["b",fa.bind(fa,"bold")],["i",fa.bind(fa,"italic")],["style",function(){return new ra.default}]],
|
|
296
|
+
Ja=[xa.AlignAttribute,Fa.DirectionAttribute].reduce(function(e,f){e[f.keyName]=f;return e},{}),za=[xa.AlignStyle,Ba.BackgroundStyle,Da.ColorStyle,Fa.DirectionStyle,Ga.FontStyle,ca.SizeStyle].reduce(function(e,f){e[f.keyName]=f;return e},{});ca=function(e){function h(e,f){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");var n=w(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,e,f));n.quill.root.addEventListener("paste",n.onPaste.bind(n));n.container=n.quill.addContainer("ql-clipboard");
|
|
297
|
+
n.container.setAttribute("contenteditable",!0);n.container.setAttribute("tabindex",-1);n.matchers=[];Ia.concat(n.options.matchers).forEach(function(e){e=qa(e,2);var h=e[1];(f.matchVisual||h!==ma)&&n.addMatcher(e[0],h)});return n}y(h,e);sa(h,[{key:"addMatcher",value:function(e,f){this.matchers.push([e,f])}},{key:"convert",value:function(e){if("string"===typeof e)return this.container.innerHTML=e.replace(/>\r?\n +</g,"><"),this.convert();e=this.quill.getFormat(this.quill.selection.savedRange.index);
|
|
298
|
+
if(e[Aa.default.blotName]){var h=this.container.innerText;this.container.innerHTML="";return(new ra.default).insert(h,aa({},Aa.default.blotName,e[Aa.default.blotName]))}e=this.prepareMatching();e=qa(e,2);e=z(this.container,e[0],e[1]);f(e,"\n")&&null==e.ops[e.ops.length-1].attributes&&(e=e.compose((new ra.default).retain(e.length()-1).delete(1)));Ca.log("convert",this.container.innerHTML,e);this.container.innerHTML="";return e}},{key:"dangerouslyPasteHTML",value:function(e,f){var h=2<arguments.length&&
|
|
299
|
+
void 0!==arguments[2]?arguments[2]:oa.default.sources.API;if("string"===typeof e)this.quill.setContents(this.convert(e),f),this.quill.setSelection(0,oa.default.sources.SILENT);else{var n=this.convert(f);this.quill.updateContents((new ra.default).retain(e).concat(n),h);this.quill.setSelection(e+n.length(),oa.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var f=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var h=this.quill.getSelection(),n=(new ra.default).retain(h.index),r=this.quill.scrollingContainer.scrollTop;
|
|
300
|
+
this.container.focus();this.quill.selection.update(oa.default.sources.SILENT);setTimeout(function(){n=n.concat(f.convert()).delete(h.length);f.quill.updateContents(n,oa.default.sources.USER);f.quill.setSelection(n.length()-h.length,oa.default.sources.SILENT);f.quill.scrollingContainer.scrollTop=r;f.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,f=[],h=[];this.matchers.forEach(function(n){n=qa(n,2);var r=n[0],w=n[1];switch(r){case Node.TEXT_NODE:h.push(w);break;case Node.ELEMENT_NODE:f.push(w);
|
|
301
|
+
break;default:[].forEach.call(e.container.querySelectorAll(r),function(e){e["__ql-matcher"]=e["__ql-matcher"]||[];e["__ql-matcher"].push(w)})}});return[f,h]}}]);return h}(ua.default);ca.DEFAULTS={matchers:[],matchVisual:!0};ba.default=ca;ba.matchAttributor=ea;ba.matchBlot=ha;ba.matchNewline=ia;ba.matchSpacing=ma;ba.matchText=la},function(e,ba,ca){function x(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=
|
|
302
302
|
Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(ba,"__esModule",{value:!0});var aa=function(){function e(e,h){for(var f=0;f<h.length;f++){var n=h[f];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(n,h,f){h&&e(n.prototype,h);f&&e(n,f);return n}}(),w=function r(e,h,f){null===e&&(e=Function.prototype);
|
|
303
303
|
var n=Object.getOwnPropertyDescriptor(e,h);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return r(e,h,f)}else{if("value"in n)return n.value;h=n.get;return void 0===h?void 0:h.call(f)}};e=function(e){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");var e=(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==
|
|
304
304
|
typeof e?this:e}x(h,e);aa(h,[{key:"optimize",value:function(e){w(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"optimize",this).call(this,e);this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return w(h.__proto__||Object.getPrototypeOf(h),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]);return h}(function(e){return e&&e.__esModule?e:{default:e}}(ca(6)).default);e.blotName="bold";e.tagName=["STRONG",
|
|
305
305
|
"B"];ba.default=e},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f,h){f in e?Object.defineProperty(e,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):e[f]=h;return e}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+
|
|
306
306
|
typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}function n(e,f,h){var n=document.createElement("button");n.setAttribute("type","button");n.classList.add("ql-"+f);null!=h&&(n.value=h);e.appendChild(n)}function h(e,h){Array.isArray(h[0])||(h=[h]);h.forEach(function(h){var r=document.createElement("span");r.classList.add("ql-formats");h.forEach(function(e){if("string"===
|
|
307
307
|
typeof e)n(r,e);else{var h=Object.keys(e)[0];e=e[h];Array.isArray(e)?f(r,h,e):n(r,h,e)}});e.appendChild(r)})}function f(e,f,h){var n=document.createElement("select");n.classList.add("ql-"+f);h.forEach(function(e){var f=document.createElement("option");!1!==e?f.setAttribute("value",e):f.setAttribute("selected","selected");n.appendChild(f)});e.appendChild(n)}Object.defineProperty(ba,"__esModule",{value:!0});ba.addControls=ba.default=void 0;var r=function(){return function(e,f){if(Array.isArray(e))return e;
|
|
308
|
-
if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),y;!(n=(y=x.next()).done)&&(h.push(y.value),!f||h.length!==f);n=!0);}catch(
|
|
308
|
+
if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),y;!(n=(y=x.next()).done)&&(h.push(y.value),!f||h.length!==f);n=!0);}catch(oa){r=!0,w=oa}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),z=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,
|
|
309
309
|
n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(2);var fa=x(e);e=ca(0);var ea=x(e);e=ca(5);var ha=x(e);e=ca(10);e=x(e);ca=ca(9);ca=x(ca);var ia=(0,e.default)("quill:toolbar");ca=function(e){function f(e,n){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");var x=w(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,e,n));Array.isArray(x.options.container)?(n=document.createElement("div"),h(n,x.options.container),e.container.parentNode.insertBefore(n,
|
|
310
310
|
e.container),x.container=n):x.container="string"===typeof x.options.container?document.querySelector(x.options.container):x.options.container;if(!(x.container instanceof HTMLElement)){var y;return y=ia.error("Container required for toolbar",x.options),w(x,y)}x.container.classList.add("ql-toolbar");x.controls=[];x.handlers={};Object.keys(x.options.handlers).forEach(function(e){x.addHandler(e,x.options.handlers[e])});[].forEach.call(x.container.querySelectorAll("button, select"),function(e){x.attach(e)});
|
|
311
311
|
x.quill.on(ha.default.events.EDITOR_CHANGE,function(e,f){e===ha.default.events.SELECTION_CHANGE&&x.update(f)});x.quill.on(ha.default.events.SCROLL_OPTIMIZE,function(){var e=x.quill.selection.getRange();e=r(e,1)[0];x.update(e)});return x}y(f,e);z(f,[{key:"addHandler",value:function(e,f){this.handlers[e]=f}},{key:"attach",value:function(e){var f=this,h=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(h){h=h.slice(3);"BUTTON"===e.tagName&&e.setAttribute("type","button");if(null==
|
|
@@ -327,17 +327,17 @@ this.quill=x;this.boundsContainer=w||document.body;this.root=x.addContainer("ql-
|
|
|
327
327
|
w+"px";this.root.style.top=x+"px";this.root.classList.remove("ql-flip");var n=this.boundsContainer.getBoundingClientRect(),h=this.root.getBoundingClientRect(),f=0;h.right>n.right&&(f=n.right-h.right,this.root.style.left=w+f+"px");h.left<n.left&&(f=n.left-h.left,this.root.style.left=w+f+"px");h.bottom>n.bottom&&(this.root.style.top=x-(e.bottom-e.top+(h.bottom-h.top))+"px",this.root.classList.add("ql-flip"));return f}},{key:"show",value:function(){this.root.classList.remove("ql-editing");this.root.classList.remove("ql-hidden")}}]);
|
|
328
328
|
return e}();ba.default=e},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=
|
|
329
329
|
Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}Object.defineProperty(ba,"__esModule",{value:!0});var n=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),y;!(n=(y=x.next()).done)&&(h.push(y.value),!f||h.length!==f);n=!0);}catch(Ba){r=!0,w=Ba}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;
|
|
330
|
-
}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),h=function
|
|
331
|
-
n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(3);e=x(e);var r=ca(8),z=x(r);r=ca(43);var fa=x(r),ea=ca(27),ha=x(ea),ia=ca(15);ca=ca(41);var
|
|
332
|
-
return e}y(h,e);f(h,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow");this.buildButtons([].slice.call(e.container.querySelectorAll("button")),
|
|
330
|
+
}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),h=function va(e,f,h){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return va(e,f,h)}else{if("value"in n)return n.value;f=n.get;return void 0===f?void 0:f.call(h)}},f=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,
|
|
331
|
+
n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}();e=ca(3);e=x(e);var r=ca(8),z=x(r);r=ca(43);var fa=x(r),ea=ca(27),ha=x(ea),ia=ca(15);ca=ca(41);var ma=x(ca),la=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];ca=function(e){function h(e,f){aa(this,h);null!=f.modules.toolbar&&null==f.modules.toolbar.container&&(f.modules.toolbar.container=la);e=w(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,e,f));e.quill.container.classList.add("ql-snow");
|
|
332
|
+
return e}y(h,e);f(h,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow");this.buildButtons([].slice.call(e.container.querySelectorAll("button")),ma.default);this.buildPickers([].slice.call(e.container.querySelectorAll("select")),ma.default);this.tooltip=new na(this.quill,this.options.bounds);e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(f,h){e.handlers.link.call(e,!h.format.link)})}}]);return h}(fa.default);ca.DEFAULTS=
|
|
333
333
|
(0,e.default)(!0,{},fa.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?(e=this.quill.getSelection(),null!=e&&0!=e.length&&(e=this.quill.getText(e),/^\S+@\S+\.\S+$/.test(e)&&0!==e.indexOf("mailto:")&&(e="mailto:"+e),this.quill.theme.tooltip.edit("link",e))):this.quill.format("link",!1)}}}}});var na=function(e){function r(e,f){aa(this,r);e=w(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,f));e.preview=e.root.querySelector("a.ql-preview");return e}y(r,e);f(r,[{key:"listen",
|
|
334
334
|
value:function(){var e=this;h(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"listen",this).call(this);this.root.querySelector("a.ql-action").addEventListener("click",function(f){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent);f.preventDefault()});this.root.querySelector("a.ql-remove").addEventListener("click",function(f){if(null!=e.linkRange){var h=e.linkRange;e.restoreFocus();e.quill.formatText(h,"link",!1,z.default.sources.USER);delete e.linkRange}f.preventDefault();
|
|
335
335
|
e.hide()});this.quill.on(z.default.events.SELECTION_CHANGE,function(f,h,r){if(null!=f){if(0===f.length&&r===z.default.sources.USER){if(h=e.quill.scroll.descendant(ha.default,f.index),r=n(h,2),h=r[0],r=r[1],null!=h){e.linkRange=new ia.Range(f.index-r,h.length());f=ha.default.formats(h.domNode);e.preview.textContent=f;e.preview.setAttribute("href",f);e.show();e.position(e.quill.getBounds(e.linkRange));return}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){h(r.prototype.__proto__||
|
|
336
336
|
Object.getPrototypeOf(r.prototype),"show",this).call(this);this.root.removeAttribute("data-mode")}}]);return r}(r.BaseTooltip);na.TEMPLATE='<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a><input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL"><a class="ql-action"></a><a class="ql-remove"></a>';ba.default=ca},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(ba,"__esModule",{value:!0});
|
|
337
|
-
e=ca(29);e=x(e);var aa=ca(36),w=ca(38),y=ca(64),n=ca(65);n=x(n);var h=ca(66);h=x(h);var f=ca(67),r=x(f),z=ca(37),fa=ca(26),ea=ca(39),ha=ca(40),ia=ca(56);ia=x(ia);var
|
|
337
|
+
e=ca(29);e=x(e);var aa=ca(36),w=ca(38),y=ca(64),n=ca(65);n=x(n);var h=ca(66);h=x(h);var f=ca(67),r=x(f),z=ca(37),fa=ca(26),ea=ca(39),ha=ca(40),ia=ca(56);ia=x(ia);var ma=ca(68);ma=x(ma);var la=ca(27);la=x(la);var na=ca(69);na=x(na);var qa=ca(70);qa=x(qa);var sa=ca(71);sa=x(sa);var Ea=ca(72);Ea=x(Ea);var ra=ca(73);ra=x(ra);var va=ca(13),oa=x(va),ua=ca(74);ua=x(ua);var xa=ca(75);xa=x(xa);var Ba=ca(57);Ba=x(Ba);var Da=ca(41);Da=x(Da);var Aa=ca(28);Aa=x(Aa);var Fa=ca(59);Fa=x(Fa);var Ga=ca(60);Ga=x(Ga);
|
|
338
338
|
var Ca=ca(61);Ca=x(Ca);var Ia=ca(108);Ia=x(Ia);ca=ca(62);ca=x(ca);e.default.register({"attributors/attribute/direction":w.DirectionAttribute,"attributors/class/align":aa.AlignClass,"attributors/class/background":z.BackgroundClass,"attributors/class/color":fa.ColorClass,"attributors/class/direction":w.DirectionClass,"attributors/class/font":ea.FontClass,"attributors/class/size":ha.SizeClass,"attributors/style/align":aa.AlignStyle,"attributors/style/background":z.BackgroundStyle,"attributors/style/color":fa.ColorStyle,
|
|
339
|
-
"attributors/style/direction":w.DirectionStyle,"attributors/style/font":ea.FontStyle,"attributors/style/size":ha.SizeStyle},!0);e.default.register({"formats/align":aa.AlignClass,"formats/direction":w.DirectionClass,"formats/indent":y.IndentClass,"formats/background":z.BackgroundStyle,"formats/color":fa.ColorStyle,"formats/font":ea.FontClass,"formats/size":ha.SizeClass,"formats/blockquote":n.default,"formats/code-block":
|
|
340
|
-
"formats/code":
|
|
339
|
+
"attributors/style/direction":w.DirectionStyle,"attributors/style/font":ea.FontStyle,"attributors/style/size":ha.SizeStyle},!0);e.default.register({"formats/align":aa.AlignClass,"formats/direction":w.DirectionClass,"formats/indent":y.IndentClass,"formats/background":z.BackgroundStyle,"formats/color":fa.ColorStyle,"formats/font":ea.FontClass,"formats/size":ha.SizeClass,"formats/blockquote":n.default,"formats/code-block":oa.default,"formats/header":h.default,"formats/list":r.default,"formats/bold":ia.default,
|
|
340
|
+
"formats/code":va.Code,"formats/italic":ma.default,"formats/link":la.default,"formats/script":na.default,"formats/strike":qa.default,"formats/underline":sa.default,"formats/image":Ea.default,"formats/video":ra.default,"formats/list/item":f.ListItem,"modules/formula":ua.default,"modules/syntax":xa.default,"modules/toolbar":Ba.default,"themes/bubble":Ia.default,"themes/snow":ca.default,"ui/icons":Da.default,"ui/picker":Aa.default,"ui/icon-picker":Ga.default,"ui/color-picker":Fa.default,"ui/tooltip":Ca.default},
|
|
341
341
|
!0);ba.default=e.default},function(e,ba,ca){function x(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(ba,"__esModule",{value:!0});ba.IndentClass=void 0;var aa=function(){function e(e,h){for(var f=0;f<h.length;f++){var n=h[f];
|
|
342
342
|
n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(n,h,f){h&&e(n.prototype,h);f&&e(n,f);return n}}(),w=function r(e,h,f){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,h);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return r(e,h,f)}else{if("value"in n)return n.value;h=n.get;return void 0===h?void 0:h.call(f)}};e=function(e){return e&&e.__esModule?e:{default:e}}(ca(0));e=new (function(e){function h(){if(!(this instanceof
|
|
343
343
|
h))throw new TypeError("Cannot call a class as a function");var e=(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?this:e}x(h,e);aa(h,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var f=this.value(e)||0;n="+1"===n?f+1:f-1}return 0===n?(this.remove(e),!0):w(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"add",this).call(this,
|
|
@@ -347,8 +347,8 @@ var e=(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments);if(!this)thr
|
|
|
347
347
|
typeof x);e.prototype=Object.create(x&&x.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});x&&(Object.setPrototypeOf?Object.setPrototypeOf(e,x):e.__proto__=x)}Object.defineProperty(ba,"__esModule",{value:!0});var aa=function(){function e(e,n){for(var h=0;h<n.length;h++){var f=n[h];f.enumerable=f.enumerable||!1;f.configurable=!0;"value"in f&&(f.writable=!0);Object.defineProperty(e,f.key,f)}}return function(w,n,h){n&&e(w.prototype,n);h&&e(w,h);return w}}();e=function(e){function w(){if(!(this instanceof
|
|
348
348
|
w))throw new TypeError("Cannot call a class as a function");var e=(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?this:e}x(w,e);aa(w,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]);return w}(function(e){return e&&e.__esModule?e:{default:e}}(ca(4)).default);e.blotName="header";e.tagName="H1 H2 H3 H4 H5 H6".split(" ");
|
|
349
349
|
ba.default=e},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=Object.create(f&&
|
|
350
|
-
f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.ListItem=void 0;var n=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}(),h=function
|
|
351
|
-
e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return
|
|
350
|
+
f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.ListItem=void 0;var n=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,n);return f}}(),h=function ma(e,f,h){null===
|
|
351
|
+
e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return ma(e,f,h)}else{if("value"in n)return n.value;f=n.get;return void 0===f?void 0:f.call(h)}};e=ca(0);var f=x(e);e=ca(4);e=x(e);ca=ca(25);ca=x(ca);var r=function(e){function r(){aa(this,r);return w(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}y(r,e);n(r,[{key:"format",value:function(e,n){e!==z.blotName||n?h(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),
|
|
352
352
|
"format",this).call(this,e,n):this.replaceWith(f.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():h(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,f){this.parent.isolate(this.offset(this.parent),this.length());if(e===this.parent.statics.blotName)return this.parent.replaceWith(e,f),this;this.parent.unwrap();return h(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),
|
|
353
353
|
"replaceWith",this).call(this,e,f)}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:h(r.__proto__||Object.getPrototypeOf(r),"formats",this).call(this,e)}}]);return r}(e.default);r.blotName="list-item";r.tagName="LI";var z=function(e){function x(e){function h(h){if(h.target.parentNode===e){var r=n.statics.formats(e);h=f.default.find(h.target);"checked"===r?h.format("list","unchecked"):"unchecked"===r&&h.format("list","checked")}}aa(this,x);var n=w(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,
|
|
354
354
|
e));e.addEventListener("touchstart",h);e.addEventListener("mousedown",h);return n}y(x,e);n(x,null,[{key:"create",value:function(e){var f="ordered"===e?"OL":"UL";f=h(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,f);"checked"!==e&&"unchecked"!==e||f.setAttribute("data-checked","checked"===e);return f}},{key:"formats",value:function(e){if("OL"===e.tagName)return"ordered";if("UL"===e.tagName)return e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":
|
|
@@ -373,7 +373,7 @@ n=["height","width"];ca=function(e){function f(){if(!(this instanceof f))throw n
|
|
|
373
373
|
Object.getPrototypeOf(f.prototype),"format",this).call(this,e,r)}}],[{key:"create",value:function(e){var n=w(f.__proto__||Object.getPrototypeOf(f),"create",this).call(this,e);n.setAttribute("frameborder","0");n.setAttribute("allowfullscreen",!0);n.setAttribute("src",this.sanitize(e));return n}},{key:"formats",value:function(e){return n.reduce(function(f,n){e.hasAttribute(n)&&(f[n]=e.getAttribute(n));return f},{})}},{key:"sanitize",value:function(e){return y.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]);
|
|
374
374
|
return f}(e.BlockEmbed);ca.blotName="video";ca.className="ql-video";ca.tagName="IFRAME";ba.default=ca},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+
|
|
375
375
|
typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.FormulaBlot=void 0;var n=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}return function(f,h,n){h&&e(f.prototype,h);n&&e(f,
|
|
376
|
-
n);return f}}(),h=function
|
|
376
|
+
n);return f}}(),h=function ma(e,f,h){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return ma(e,f,h)}else{if("value"in n)return n.value;f=n.get;return void 0===f?void 0:f.call(h)}};e=ca(35);e=x(e);var f=ca(5),r=x(f);ca=ca(9);ca=x(ca);var z=function(e){function f(){aa(this,f);return w(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}y(f,e);n(f,null,[{key:"create",value:function(e){var n=h(f.__proto__||
|
|
377
377
|
Object.getPrototypeOf(f),"create",this).call(this,e);"string"===typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e));return n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]);return f}(e.default);z.blotName="formula";z.className="ql-formula";z.tagName="SPAN";ca=function(e){function f(){aa(this,f);var e=w(this,(f.__proto__||Object.getPrototypeOf(f)).call(this));if(null==window.katex)throw Error("Formula module requires KaTeX.");
|
|
378
378
|
return e}y(f,e);n(f,null,[{key:"register",value:function(){r.default.register(z,!0)}}]);return f}(ca.default);ba.FormulaBlot=z;ba.default=ca},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function y(e,f){if("function"!==
|
|
379
379
|
typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}Object.defineProperty(ba,"__esModule",{value:!0});ba.default=ba.CodeToken=ba.CodeBlock=void 0;var n=function(){function e(e,f){for(var h=0;h<f.length;h++){var n=f[h];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in
|