(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["simpleMindMap"]=e():t["simpleMindMap"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){function e(e){for(var n,i,A=e[0],o=e[1],s=0,a=[];sc)if(s=a[c++],s!=s)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},"09d9":function(t,e,n){var r=n("9a1c").isArray;t.exports={copyOptions:function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n},ensureFlagExists:function(t,e){t in e&&"boolean"===typeof e[t]||(e[t]=!1)},ensureSpacesExists:function(t){(!("spaces"in t)||"number"!==typeof t.spaces&&"string"!==typeof t.spaces)&&(t.spaces=0)},ensureAlwaysArrayExists:function(t){"alwaysArray"in t&&("boolean"===typeof t.alwaysArray||r(t.alwaysArray))||(t.alwaysArray=!1)},ensureKeyExists:function(t,e){t+"Key"in e&&"string"===typeof e[t+"Key"]||(e[t+"Key"]=e.compact?"_"+t:t)},checkFnExists:function(t,e){return t+"Fn"in e}}},"0cca":function(t,e,n){var r=n("5e8c"),i=n("6e16"),A=n("54be"),o=n("f2fc");t.exports=function(t,e,n,s){s||(s={});var a=s.enumerable,l=void 0!==s.name?s.name:e;if(r(n)&&A(n,l,s),s.global)a?t[e]=n:o(e,n);else{try{s.unsafe?t[e]&&(a=!0):delete t[e]}catch(c){}a?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},"0e26":function(t,e,n){var r=n("fe11"),i=n("6bd1"),A=r("keys");t.exports=function(t){return A[t]||(A[t]=i(t))}},1:function(t,e){},"10ad":function(t,e,n){var r,i,A=n("a83d"),o={on:function(){},parse:function(){}},s=n("09d9"),a=n("9a1c").isArray,l=!0;function c(t){return r=s.copyOptions(t),s.ensureFlagExists("ignoreDeclaration",r),s.ensureFlagExists("ignoreInstruction",r),s.ensureFlagExists("ignoreAttributes",r),s.ensureFlagExists("ignoreText",r),s.ensureFlagExists("ignoreComment",r),s.ensureFlagExists("ignoreCdata",r),s.ensureFlagExists("ignoreDoctype",r),s.ensureFlagExists("compact",r),s.ensureFlagExists("alwaysChildren",r),s.ensureFlagExists("addParent",r),s.ensureFlagExists("trim",r),s.ensureFlagExists("nativeType",r),s.ensureFlagExists("nativeTypeAttributes",r),s.ensureFlagExists("sanitize",r),s.ensureFlagExists("instructionHasAttributes",r),s.ensureFlagExists("captureSpacesBetweenElements",r),s.ensureAlwaysArrayExists(r),s.ensureKeyExists("declaration",r),s.ensureKeyExists("instruction",r),s.ensureKeyExists("attributes",r),s.ensureKeyExists("text",r),s.ensureKeyExists("comment",r),s.ensureKeyExists("cdata",r),s.ensureKeyExists("doctype",r),s.ensureKeyExists("type",r),s.ensureKeyExists("name",r),s.ensureKeyExists("elements",r),s.ensureKeyExists("parent",r),s.checkFnExists("doctype",r),s.checkFnExists("instruction",r),s.checkFnExists("cdata",r),s.checkFnExists("comment",r),s.checkFnExists("text",r),s.checkFnExists("instructionName",r),s.checkFnExists("elementName",r),s.checkFnExists("attributeName",r),s.checkFnExists("attributeValue",r),s.checkFnExists("attributes",r),r}function u(t){var e=Number(t);if(!isNaN(e))return e;var n=t.toLowerCase();return"true"===n||"false"!==n&&t}function h(t,e){var n;if(r.compact){if(!i[r[t+"Key"]]&&(a(r.alwaysArray)?-1!==r.alwaysArray.indexOf(r[t+"Key"]):r.alwaysArray)&&(i[r[t+"Key"]]=[]),i[r[t+"Key"]]&&!a(i[r[t+"Key"]])&&(i[r[t+"Key"]]=[i[r[t+"Key"]]]),t+"Fn"in r&&"string"===typeof e&&(e=r[t+"Fn"](e,i)),"instruction"===t&&("instructionFn"in r||"instructionNameFn"in r))for(n in e)if(e.hasOwnProperty(n))if("instructionFn"in r)e[n]=r.instructionFn(e[n],n,i);else{var A=e[n];delete e[n],e[r.instructionNameFn(n,A,i)]=A}a(i[r[t+"Key"]])?i[r[t+"Key"]].push(e):i[r[t+"Key"]]=e}else{i[r.elementsKey]||(i[r.elementsKey]=[]);var o={};if(o[r.typeKey]=t,"instruction"===t){for(n in e)if(e.hasOwnProperty(n))break;o[r.nameKey]="instructionNameFn"in r?r.instructionNameFn(n,e,i):n,r.instructionHasAttributes?(o[r.attributesKey]=e[n][r.attributesKey],"instructionFn"in r&&(o[r.attributesKey]=r.instructionFn(o[r.attributesKey],n,i))):("instructionFn"in r&&(e[n]=r.instructionFn(e[n],n,i)),o[r.instructionKey]=e[n])}else t+"Fn"in r&&(e=r[t+"Fn"](e,i)),o[r[t+"Key"]]=e;r.addParent&&(o[r.parentKey]=i),i[r.elementsKey].push(o)}}function d(t){var e;if("attributesFn"in r&&t&&(t=r.attributesFn(t,i)),(r.trim||"attributeValueFn"in r||"attributeNameFn"in r||r.nativeTypeAttributes)&&t)for(e in t)if(t.hasOwnProperty(e)&&(r.trim&&(t[e]=t[e].trim()),r.nativeTypeAttributes&&(t[e]=u(t[e])),"attributeValueFn"in r&&(t[e]=r.attributeValueFn(t[e],e,i)),"attributeNameFn"in r)){var n=t[e];delete t[e],t[r.attributeNameFn(e,t[e],i)]=n}return t}function f(t){var e={};if(t.body&&("xml"===t.name.toLowerCase()||r.instructionHasAttributes)){var n,A=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;while(null!==(n=A.exec(t.body)))e[n[1]]=n[2]||n[3]||n[4];e=d(e)}if("xml"===t.name.toLowerCase()){if(r.ignoreDeclaration)return;i[r.declarationKey]={},Object.keys(e).length&&(i[r.declarationKey][r.attributesKey]=e),r.addParent&&(i[r.declarationKey][r.parentKey]=i)}else{if(r.ignoreInstruction)return;r.trim&&(t.body=t.body.trim());var o={};r.instructionHasAttributes&&Object.keys(e).length?(o[t.name]={},o[t.name][r.attributesKey]=e):o[t.name]=t.body,h("instruction",o)}}function p(t,e){var n;if("object"===typeof t&&(e=t.attributes,t=t.name),e=d(e),"elementNameFn"in r&&(t=r.elementNameFn(t,i)),r.compact){var A;if(n={},!r.ignoreAttributes&&e&&Object.keys(e).length)for(A in n[r.attributesKey]={},e)e.hasOwnProperty(A)&&(n[r.attributesKey][A]=e[A]);!(t in i)&&(a(r.alwaysArray)?-1!==r.alwaysArray.indexOf(t):r.alwaysArray)&&(i[t]=[]),i[t]&&!a(i[t])&&(i[t]=[i[t]]),a(i[t])?i[t].push(n):i[t]=n}else i[r.elementsKey]||(i[r.elementsKey]=[]),n={},n[r.typeKey]="element",n[r.nameKey]=t,!r.ignoreAttributes&&e&&Object.keys(e).length&&(n[r.attributesKey]=e),r.alwaysChildren&&(n[r.elementsKey]=[]),i[r.elementsKey].push(n);n[r.parentKey]=i,i=n}function g(t){r.ignoreText||(t.trim()||r.captureSpacesBetweenElements)&&(r.trim&&(t=t.trim()),r.nativeType&&(t=u(t)),r.sanitize&&(t=t.replace(/&/g,"&").replace(//g,">")),h("text",t))}function m(t){r.ignoreComment||(r.trim&&(t=t.trim()),h("comment",t))}function w(t){var e=i[r.parentKey];r.addParent||delete i[r.parentKey],i=e}function y(t){r.ignoreCdata||(r.trim&&(t=t.trim()),h("cdata",t))}function v(t){r.ignoreDoctype||(t=t.replace(/^ /,""),r.trim&&(t=t.trim()),h("doctype",t))}function b(t){t.note=t}t.exports=function(t,e){var n=l?A.parser(!0,{}):n=new o.Parser("UTF-8"),s={};if(i=s,r=c(e),l?(n.opt={strictEntities:!0},n.onopentag=p,n.ontext=g,n.oncomment=m,n.onclosetag=w,n.onerror=b,n.oncdata=y,n.ondoctype=v,n.onprocessinginstruction=f):(n.on("startElement",p),n.on("text",g),n.on("comment",m),n.on("endElement",w),n.on("error",b)),l)n.write(t).close();else if(!n.parse(t))throw new Error("XML parsing error: "+n.getError());if(s[r.elementsKey]){var a=s[r.elementsKey];delete s[r.elementsKey],s[r.elementsKey]=a,delete s.text}return s}},"14cc":function(t,e){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?r:n)(e)}},"1a33":function(t,e,n){var r=n("46ab");t.exports=r({}.isPrototypeOf)},"1a89":function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},"1fb5":function(t,e,n){"use strict";e.byteLength=c,e.toByteArray=h,e.fromByteArray=p;for(var r=[],i=[],A="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");-1===n&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function c(t){var e=l(t),n=e[0],r=e[1];return 3*(n+r)/4-r}function u(t,e,n){return 3*(e+n)/4-n}function h(t){var e,n,r=l(t),o=r[0],s=r[1],a=new A(u(t,o,s)),c=0,h=s>0?o-4:o;for(n=0;n>16&255,a[c++]=e>>8&255,a[c++]=255&e;return 2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,a[c++]=255&e),1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,a[c++]=e>>8&255,a[c++]=255&e),a}function d(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function f(t,e,n){for(var r,i=[],A=e;Aa?a:s+o));return 1===i?(e=t[n-1],A.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],A.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),A.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},2347:function(t,e,n){var r=n("2ed3");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"23a2":function(t,e,n){var r,i,A=n("1a89"),o=n("9431"),s=A.process,a=A.Deno,l=s&&s.versions||a&&a.version,c=l&&l.v8;c&&(r=c.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(r=o.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),t.exports=i},"279c":function(t,e,n){var r,i,A,o=n("f1a2"),s=n("1a89"),a=n("feb8"),l=n("f770"),c=n("4d80"),u=n("660c"),h=n("0e26"),d=n("6797"),f="Object already initialized",p=s.TypeError,g=s.WeakMap,m=function(t){return A(t)?i(t):r(t,{})},w=function(t){return function(e){var n;if(!a(e)||(n=i(e)).type!==t)throw p("Incompatible receiver, "+t+" required");return n}};if(o||u.state){var y=u.state||(u.state=new g);y.get=y.get,y.has=y.has,y.set=y.set,r=function(t,e){if(y.has(t))throw p(f);return e.facade=t,y.set(t,e),e},i=function(t){return y.get(t)||{}},A=function(t){return y.has(t)}}else{var v=h("state");d[v]=!0,r=function(t,e){if(c(t,v))throw p(f);return e.facade=t,l(t,v,e),e},i=function(t){return c(t,v)?t[v]:{}},A=function(t){return c(t,v)}}t.exports={set:r,get:i,has:A,enforce:m,getterFor:w}},"27bf":function(t,e,n){"use strict";t.exports=o;var r=n("b19a"),i=Object.create(n("3a7c"));function A(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length79&&o<83;r({target:"Array",proto:!0,forced:!a||l},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},"2c63":function(t,e,n){t.exports=n("dc14")},"2c9d":function(t,e,n){var r=n("46ab"),i=n("5e8c"),A=n("660c"),o=r(Function.toString);i(A.inspectSource)||(A.inspectSource=function(t){return o(t)}),t.exports=A.inspectSource},"2ed3":function(t,e,n){var r=n("23a2"),i=n("8af8");t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"2f2d":function(t,e,n){var r=n("8af8");t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3475:function(t,e,n){var r=n("1a89"),i=n("dacf").f,A=n("f770"),o=n("0cca"),s=n("f2fc"),a=n("44b2"),l=n("afc0");t.exports=function(t,e){var n,c,u,h,d,f,p=t.target,g=t.global,m=t.stat;if(c=g?r:m?r[p]||s(p,{}):(r[p]||{}).prototype,c)for(u in e){if(d=e[u],t.dontCallGetSet?(f=i(c,u),h=f&&f.value):h=c[u],n=l(g?u:p+(m?".":"#")+u,t.forced),!n&&void 0!==h){if(typeof d==typeof h)continue;a(d,h)}(t.sham||h&&h.sham)&&A(d,"sham",!0),o(c,u,d,t)}}},"361f":function(t,e,n){"use strict";var r=n("b257"),i=n("4d80"),A=n("f770"),o=n("1a33"),s=n("bbea"),a=n("44b2"),l=n("ef7a"),c=n("ce2e"),u=n("899a"),h=n("d898"),d=n("6c12"),f=n("7e07"),p=n("8d5c"),g=n("ec82");t.exports=function(t,e,n,m){var w="stackTraceLimit",y=m?2:1,v=t.split("."),b=v[v.length-1],B=r.apply(null,v);if(B){var C=B.prototype;if(!g&&i(C,"cause")&&delete C.cause,!n)return B;var x=r("Error"),_=e((function(t,e){var n=u(m?e:t,void 0),r=m?new B(t):new B;return void 0!==n&&A(r,"message",n),f&&A(r,"stack",d(r.stack,2)),this&&o(C,this)&&c(r,this,_),arguments.length>y&&h(r,arguments[y]),r}));if(_.prototype=C,"Error"!==b?s?s(_,x):a(_,x,{name:!0}):p&&w in B&&(l(_,B,w),l(_,B,"prepareStackTrace")),a(_,B),!g)try{C.name!==b&&A(C,"name",b),C.constructor=_}catch(E){}return _}}},"364c":function(t,e,n){var r=n("424c"),i=n("1a89");t.exports="process"==r(i.process)},"3a7c":function(t,e,n){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===m(t)}function i(t){return"boolean"===typeof t}function A(t){return null===t}function o(t){return null==t}function s(t){return"number"===typeof t}function a(t){return"string"===typeof t}function l(t){return"symbol"===typeof t}function c(t){return void 0===t}function u(t){return"[object RegExp]"===m(t)}function h(t){return"object"===typeof t&&null!==t}function d(t){return"[object Date]"===m(t)}function f(t){return"[object Error]"===m(t)||t instanceof Error}function p(t){return"function"===typeof t}function g(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t}function m(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=i,e.isNull=A,e.isNullOrUndefined=o,e.isNumber=s,e.isString=a,e.isSymbol=l,e.isUndefined=c,e.isRegExp=u,e.isObject=h,e.isDate=d,e.isError=f,e.isFunction=p,e.isPrimitive=g,e.isBuffer=n("b639").Buffer.isBuffer},"3fb5":function(t,e){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},"424c":function(t,e,n){var r=n("46ab"),i=r({}.toString),A=r("".slice);t.exports=function(t){return A(i(t),8,-1)}},"429b":function(t,e,n){t.exports=n("faa1").EventEmitter},4362:function(t,e,n){e.nextTick=function(t){var e=Array.prototype.slice.call(arguments);e.shift(),setTimeout((function(){t.apply(null,e)}),0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,r="/";e.cwd=function(){return r},e.chdir=function(e){t||(t=n("df7c")),r=t.resolve(e,r)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},"443d":function(t,e){t.exports=function(t){return null===t||void 0===t}},"44b2":function(t,e,n){var r=n("4d80"),i=n("bac8"),A=n("dacf"),o=n("6e16");t.exports=function(t,e,n){for(var s=i(e),a=o.f,l=A.f,c=0;c1)return t.map((function(t){return d(t)}));var n=t[0];if("string"!==typeof n.blotName&&"string"!==typeof n.attrName)throw new i("Invalid definition");if("abstract"===n.blotName)throw new i("Cannot register abstract class");if(l[n.blotName||n.attrName]=n,"string"===typeof n.keyName)o[n.keyName]=n;else if(null!=n.className&&(s[n.className]=n),null!=n.tagName){Array.isArray(n.tagName)?n.tagName=n.tagName.map((function(t){return t.toUpperCase()})):n.tagName=n.tagName.toUpperCase();var r=Array.isArray(n.tagName)?n.tagName:[n.tagName];r.forEach((function(t){null!=a[t]&&null!=n.className||(a[t]=n)}))}return n}e.DATA_KEY="__blot",function(t){t[t["TYPE"]=3]="TYPE",t[t["LEVEL"]=12]="LEVEL",t[t["ATTRIBUTE"]=13]="ATTRIBUTE",t[t["BLOT"]=14]="BLOT",t[t["INLINE"]=7]="INLINE",t[t["BLOCK"]=11]="BLOCK",t[t["BLOCK_BLOT"]=10]="BLOCK_BLOT",t[t["INLINE_BLOT"]=6]="INLINE_BLOT",t[t["BLOCK_ATTRIBUTE"]=9]="BLOCK_ATTRIBUTE",t[t["INLINE_ATTRIBUTE"]=5]="INLINE_ATTRIBUTE",t[t["ANY"]=15]="ANY"}(A=e.Scope||(e.Scope={})),e.create=c,e.find=u,e.query=h,e.register=d},function(t,e,n){var r=n(51),i=n(11),A=n(3),o=n(20),s=String.fromCharCode(0),a=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};a.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"===typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},a.prototype["delete"]=function(t){return t<=0?this:this.push({delete:t})},a.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"===typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},a.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=A(!0,{},t),"object"===typeof n){if("number"===typeof t["delete"]&&"number"===typeof n["delete"])return this.ops[e-1]={delete:n["delete"]+t["delete"]},this;if("number"===typeof n["delete"]&&null!=t.insert&&(e-=1,n=this.ops[e-1],"object"!==typeof n))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"===typeof t.insert&&"string"===typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"===typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"===typeof t.retain&&"number"===typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"===typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},a.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},a.prototype.filter=function(t){return this.ops.filter(t)},a.prototype.forEach=function(t){this.ops.forEach(t)},a.prototype.map=function(t){return this.ops.map(t)},a.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){var i=t(r)?e:n;i.push(r)})),[e,n]},a.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},a.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+o.length(e):e.delete?t-e.delete:t}),0)},a.prototype.length=function(){return this.reduce((function(t,e){return t+o.length(e)}),0)},a.prototype.slice=function(t,e){t=t||0,"number"!==typeof e&&(e=1/0);var n=[],r=o.iterator(this.ops),i=0;while(i0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},a.prototype.diff=function(t,e){if(this.ops===t.ops)return new a;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"===typeof n.insert?n.insert:s;var r=e===t?"on":"with";throw new Error("diff() called "+r+" non-document")})).join("")})),A=new a,l=r(n[0],n[1],e),c=o.iterator(this.ops),u=o.iterator(t.ops);return l.forEach((function(t){var e=t[1].length;while(e>0){var n=0;switch(t[0]){case r.INSERT:n=Math.min(u.peekLength(),e),A.push(u.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),A["delete"](n);break;case r.EQUAL:n=Math.min(c.peekLength(),u.peekLength(),e);var s=c.next(n),a=u.next(n);i(s.insert,a.insert)?A.retain(n,o.attributes.diff(s.attributes,a.attributes)):A.push(a)["delete"](n);break}e-=n}})),A.chop()},a.prototype.eachLine=function(t,e){e=e||"\n";var n=o.iterator(this.ops),r=new a,i=0;while(n.hasNext()){if("insert"!==n.peekType())return;var A=n.peek(),s=o.length(A)-n.peekLength(),l="string"===typeof A.insert?A.insert.indexOf(e,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(!1===t(r,n.next(1).attributes||{},i))return;i+=1,r=new a}}r.length()>0&&t(r,{},i)},a.prototype.transform=function(t,e){if(e=!!e,"number"===typeof t)return this.transformPosition(t,e);var n=o.iterator(this.ops),r=o.iterator(t.ops),i=new a;while(n.hasNext()||r.hasNext())if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var A=Math.min(n.peekLength(),r.peekLength()),s=n.next(A),l=r.next(A);if(s["delete"])continue;l["delete"]?i.push(l):i.retain(A,o.attributes.transform(s.attributes,l.attributes,e))}else i.retain(o.length(n.next()));return i.chop()},a.prototype.transformPosition=function(t,e){e=!!e;var n=o.iterator(this.ops),r=0;while(n.hasNext()&&r<=t){var i=n.peekLength(),A=n.peekType();n.next(),"delete"!==A?("insert"===A&&(r0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-b)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var A=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},A}}]),e}(c.default.Block);function x(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"===typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:x(t.parent,e))}C.blotName="block",C.tagName="P",C.defaultChild="break",C.allowedChildren=[f.default,c.default.Embed,g.default],e.bubbleFormats=x,e.BlockEmbed=B,e.default=C},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){var n=[],r=!0,i=!1,A=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0)if(n.push(o.value),e&&n.length===e)break}catch(a){i=!0,A=a}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw A}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(E(this,t),this.options=N(e,r),this.container=this.options.container,null==this.container)return F.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new u.default,this.scroll=p.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new l.default(this.scroll),this.selection=new m.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(u.default.events.EDITOR_CHANGE,(function(t){t===u.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(u.default.events.SCROLL_UPDATE,(function(t,e){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;S.call(n,(function(){return n.editor.update(null,e,i)}),t)}));var A=this.clipboard.convert("
"+i+"


");this.setContents(A),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return A(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),b.default.level(t)}},{key:"find",value:function(t){return t.__quill||p.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&F.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!==typeof t){var i=t.attrName||t.blotName;"string"===typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||F.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?p.default.register(e):t.startsWith("modules")&&"function"===typeof e.register&&e.register()}}]),A(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"===typeof t){var n=t;t=document.createElement("div"),t.classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,A=U(t,e,n),o=i(A,4);return t=o[0],e=o[1],n=o[3],S.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;return S.call(this,(function(){var r=n.getSelection(!0),i=new s.default;if(null==r)return i;if(p.default.query(t,p.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,_({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,_({},t,e))}return n.setSelection(r,u.default.sources.SILENT),i}),r)}},{key:"formatLine",value:function(t,e,n,r,A){var o=this,s=void 0,a=U(t,e,n,r,A),l=i(a,4);return t=l[0],e=l[1],s=l[2],A=l[3],S.call(this,(function(){return o.editor.formatLine(t,e,s)}),A,t,0)}},{key:"formatText",value:function(t,e,n,r,A){var o=this,s=void 0,a=U(t,e,n,r,A),l=i(a,4);return t=l[0],e=l[1],s=l[2],A=l[3],S.call(this,(function(){return o.editor.formatText(t,e,s)}),A,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"===typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=U(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"===typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!==typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=U(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var i=this,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return S.call(this,(function(){return i.editor.insertEmbed(e,n,r)}),A,e)}},{key:"insertText",value:function(t,e,n,r,A){var o=this,s=void 0,a=U(t,0,n,r,A),l=i(a,4);return t=l[0],s=l[2],A=l[3],S.call(this,(function(){return o.editor.insertText(t,e,s)}),A,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,A=U(t,e,n),o=i(A,4);return t=o[0],e=o[1],n=o[3],S.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return S.call(this,(function(){t=new s.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),A=i.ops[i.ops.length-1];null!=A&&"string"===typeof A.insert&&"\n"===A.insert[A.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1));var o=r.compose(i);return o}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var A=U(e,n,r),o=i(A,4);e=o[0],n=o[1],r=o[3],this.selection.setRange(new g.Range(e,n),r),r!==u.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API,n=(new s.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return S.call(this,(function(){return t=new s.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function N(t,e){if(e=(0,y.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e),e.theme&&e.theme!==L.DEFAULTS.theme){if(e.theme=L.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=C.default;var n=(0,y.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(e.modules)),i=r.reduce((function(t,e){var n=L.import("modules/"+e);return null==n?F.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,y.default)(!0,{},L.DEFAULTS,{modules:i},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"===typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function S(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===u.default.sources.USER)return new s.default;var i=null==n?null:this.getSelection(),A=this.editor.delta,o=t();if(null!=i&&(!0===n&&(n=i.index),null==r?i=k(i,o,e):0!==r&&(i=k(i,n,r,e)),this.setSelection(i,u.default.sources.SILENT)),o.length()>0){var a,l,c=[u.default.events.TEXT_CHANGE,o,A,e];if((a=this.emitter).emit.apply(a,[u.default.events.EDITOR_CHANGE].concat(c)),e!==u.default.sources.SILENT)(l=this.emitter).emit.apply(l,c)}return o}function U(t,e,n,i,A){var o={};return"number"===typeof t.index&&"number"===typeof t.length?"number"!==typeof e?(A=i,i=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!==typeof e&&(A=i,i=n,n=e,e=0),"object"===("undefined"===typeof n?"undefined":r(n))?(o=n,A=i):"string"===typeof n&&(null!=i?o[n]=i:A=n),A=A||u.default.sources.API,[t,e,o,A]}function k(t,e,n,r){if(null==t)return null;var A=void 0,o=void 0;if(e instanceof s.default){var a=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==u.default.sources.USER)})),l=i(a,2);A=l[0],o=l[1]}else{var c=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),h=i(c,2);A=h[0],o=h[1]}return new g.Range(A,o-A)}L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=u.default.events,L.sources=u.default.sources,L.version="1.3.6",L.imports={delta:s.default,parchment:p.default,"core/module":d.default,"core/theme":C.default},e.expandConfig=N,e.overload=U,e.default=L},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),i=e.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function A(t){if(r.indexOf(t)<=r.indexOf(i)){for(var e,n=arguments.length,A=Array(n>1?n-1:0),o=1;o0&&"number"!==typeof t[0]))}function l(t,e,n){var l,c;if(s(t)||s(e))return!1;if(t.prototype!==e.prototype)return!1;if(A(t))return!!A(e)&&(t=r.call(t),e=r.call(e),o(t,e,n));if(a(t)){if(!a(e))return!1;if(t.length!==e.length)return!1;for(l=0;l=0;l--)if(u[l]!=h[l])return!1;for(l=u.length-1;l>=0;l--)if(c=u[l],!o(t[c],e[c],n))return!1;return typeof t===typeof e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){var n=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE));return null!=n&&(null==this.whitelist||("string"===typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var r=function(){function t(t,e){var n=[],r=!0,i=!1,A=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0)if(n.push(o.value),e&&n.length===e)break}catch(a){i=!0,A=a}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw A}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n=t+n)){var o=this.newlineIndex(t,!0)+1,s=A-o+1,a=this.isolate(o,s),c=a.next;a.format(r,i),c instanceof e&&c.formatAt(0,t-o+n-s,r,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var i=this.descendant(p.default,t),A=r(i,2),o=A[0],s=A[1];o.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(l.default.create("text","\n")),A(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){A(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=l.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof l.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=A(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(u.default);b.blotName="code-block",b.tagName="PRE",b.TAB=" ",e.Code=v,e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){var n=[],r=!0,i=!1,A=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0)if(n.push(o.value),e&&n.length===e)break}catch(a){i=!0,A=a}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw A}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A=function(){function t(t,e){for(var n=0;n=A&&!c.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,c);var h=e.scroll.line(t),d=i(h,2),f=d[0],p=d[1],w=(0,_.default)({},(0,g.bubbleFormats)(f));if(f instanceof m.default){var y=f.descendant(u.default.Leaf,p),v=i(y,1),b=v[0];w=(0,_.default)(w,(0,g.bubbleFormats)(b))}a=l.default.attributes.diff(w,a)||{}}else if("object"===r(o.insert)){var B=Object.keys(o.insert)[0];if(null==B)return t;e.scroll.insertAt(t,B,o.insert[B])}A+=s}return Object.keys(a).forEach((function(n){e.scroll.formatAt(t,s,n,a[n])})),t+s}),0),t.reduce((function(t,n){return"number"===typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new s.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var A=n.scroll.lines(t,Math.max(e,1)),o=e;A.forEach((function(e){var A=e.length();if(e instanceof d.default){var s=t-e.offset(n.scroll),a=e.newlineIndex(s+o)-s+1;e.formatAt(s,a,i,r[i])}else e.format(i,r[i]);o-=A}))}})),this.scroll.optimize(),this.update((new s.default).retain(t).retain(e,(0,b.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e,i,r[i])})),this.update((new s.default).retain(t).retain(e,(0,b.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new s.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=i(t,1),A=e[0];A instanceof m.default?n.push(A):A instanceof u.default.Leaf&&r.push(A)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(u.default.Leaf,t,e));var A=[n,r].map((function(t){if(0===t.length)return{};var e=(0,g.bubbleFormats)(t.shift());while(Object.keys(e).length>0){var n=t.shift();if(null==n)return e;e=U((0,g.bubbleFormats)(n),e)}return e}));return _.default.apply(_.default,A)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"===typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new s.default).retain(t).insert(F({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e.length,i,r[i])})),this.update((new s.default).retain(t).insert(e,(0,b.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===m.default.blotName&&(!(t.children.length>1)&&t.children.head instanceof y.default)}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),A=i(r,2),o=A[0],a=A[1],l=0,c=new s.default;null!=o&&(l=o instanceof d.default?o.newlineIndex(a)-a+1:o.length()-a,c=o.delta().slice(a,a+l-1).insert("\n"));var u=this.getContents(t,e+l),h=u.diff((new s.default).insert(n).concat(c)),f=(new s.default).retain(t).concat(h);return this.applyDelta(f)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(N)&&u.default.find(e[0].target)){var i=u.default.find(e[0].target),A=(0,g.bubbleFormats)(i),o=i.offset(this.scroll),a=e[0].oldValue.replace(p.default.CONTENTS,""),l=(new s.default).insert(a),c=(new s.default).insert(i.value()),h=(new s.default).retain(o).concat(l.diff(c,n));t=h.reduce((function(t,e){return e.insert?t.insert(e.insert,A):t.push(e)}),new s.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,C.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();function U(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}function k(t){return t.reduce((function(t,e){if(1===e.insert){var n=(0,b.default)(e.attributes);return delete n["image"],t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||(e=(0,b.default)(e),e.attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"===typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)}),new s.default)}e.default=S},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var r=function(){function t(t,e){var n=[],r=!0,i=!1,A=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0)if(n.push(o.value),e&&n.length===e)break}catch(a){i=!0,A=a}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw A}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;m(this,t),this.index=e,this.length=n},v=function(){function t(e,n){var r=this;m(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new y(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,h.default.sources.USER),1)})),this.emitter.on(h.default.events.EDITOR_CHANGE,(function(t,e){t===h.default.events.TEXT_CHANGE&&e.length()>0&&r.update(h.default.sources.SILENT)})),this.emitter.on(h.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(h.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(e){}}))}})),this.emitter.on(h.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,A=n.startOffset,o=n.endNode,s=n.endOffset;r.setNativeRange(i,A,o,s)}})),this.update(h.default.sources.SILENT)}return i(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(h.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var i=void 0,A=this.scroll.leaf(t),o=r(A,2),s=o[0],a=o[1];if(null==s)return null;var l=s.position(a,!0),c=r(l,2);i=c[0],a=c[1];var u=document.createRange();if(e>0){u.setStart(i,a);var h=this.scroll.leaf(t+e),d=r(h,2);if(s=d[0],a=d[1],null==s)return null;var f=s.position(a,!0),p=r(f,2);return i=p[0],a=p[1],u.setEnd(i,a),u.getBoundingClientRect()}var g="left",m=void 0;return i instanceof Text?(a0&&(g="right")),{bottom:m.top+m.height,height:m.height,left:m[g],right:m[g],top:m.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return w.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();if(null==t)return[null,null];var e=this.normalizedToRange(t);return[e,t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map((function(t){var n=r(t,2),i=n[0],A=n[1],s=o.default.find(i,!0),a=s.offset(e.scroll);return 0===A?a:s instanceof o.default.Container?a+s.length():a+s.index(i,A)})),A=Math.min(Math.max.apply(Math,g(i)),this.scroll.length()-1),s=Math.min.apply(Math,[A].concat(g(i)));return new y(s,A-s)}},{key:"normalizeNative",value:function(t){if(!b(this.root,t.startContainer)||!t.collapsed&&!b(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){var e=t.node,n=t.offset;while(!(e instanceof Text)&&e.childNodes.length>0)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],i=[],A=this.scroll.length();return n.forEach((function(t,n){t=Math.min(A-1,t);var o=void 0,s=e.scroll.leaf(t),a=r(s,2),l=a[0],c=a[1],u=l.position(c,0!==n),h=r(u,2);o=h[0],c=h[1],i.push(o,c)})),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var i=this.scroll.length()-1,A=this.scroll.line(Math.min(e.index,i)),o=r(A,1),s=o[0],a=s;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,i)),c=r(l,1);a=c[0]}if(null!=s&&null!=a){var u=t.getBoundingClientRect();n.topu.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(w.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var A=document.getSelection();if(null!=A)if(null!=t){this.hasFocus()||this.root.focus();var o=(this.getNativeRange()||{}).native;if(null==o||i||t!==o.startContainer||e!==o.startOffset||n!==o.endContainer||r!==o.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,r),A.removeAllRanges(),A.addRange(s)}}else A.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.default.sources.API;if("string"===typeof e&&(n=e,e=!1),w.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,g(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.default.sources.USER,e=this.lastRange,n=this.getRange(),i=r(n,2),A=i[0],o=i[1];if(this.lastRange=A,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,c.default)(e,this.lastRange)){var s;!this.composing&&null!=o&&o.native.collapsed&&o.start.node!==this.cursor.textNode&&this.cursor.restore();var l,u=[h.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];if((s=this.emitter).emit.apply(s,[h.default.events.EDITOR_CHANGE].concat(u)),t!==h.default.sources.SILENT)(l=this.emitter).emit.apply(l,u)}}}]),t}();function b(t,e){try{e.parentNode}catch(n){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=y,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return t={},t[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=A.Scope.INLINE_BLOT,e}(i.default);e.default=o},function(t,e,n){var r=n(11),i=n(3),A={attributes:{compose:function(t,e,n){"object"!==typeof t&&(t={}),"object"!==typeof e&&(e={});var r=i(!0,{},e);for(var A in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[A]&&void 0===e[A]&&(r[A]=t[A]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!==typeof t&&(t={}),"object"!==typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,i){return r(t[i],e[i])||(n[i]=void 0===e[i]?null:e[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!==typeof t)return e;if("object"===typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new o(t)},length:function(t){return"number"===typeof t["delete"]?t["delete"]:"number"===typeof t.retain?t.retain:"string"===typeof t.insert?t.insert.length:1}};function o(t){this.ops=t,this.index=0,this.offset=0}o.prototype.hasNext=function(){return this.peekLength()<1/0},o.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=A.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"===typeof e["delete"])return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"===typeof e.retain?i.retain=t:"string"===typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}return{retain:1/0}},o.prototype.peek=function(){return this.ops[this.index]},o.prototype.peekLength=function(){return this.ops[this.index]?A.length(this.ops[this.index])-this.offset:1/0},o.prototype.peekType=function(){return this.ops[this.index]?"number"===typeof this.ops[this.index]["delete"]?"delete":"number"===typeof this.ops[this.index].retain?"retain":"insert":"retain"},t.exports=A},function(t,n){var r=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,r,i;try{n=Map}catch(u){n=function(){}}try{r=Set}catch(u){r=function(){}}try{i=Promise}catch(u){i=function(){}}function A(o,s,a,l,u){"object"===typeof s&&(a=s.depth,l=s.prototype,u=s.includeNonEnumerable,s=s.circular);var h=[],d=[],f="undefined"!=typeof e;function p(o,a){if(null===o)return null;if(0===a)return o;var g,m;if("object"!=typeof o)return o;if(t(o,n))g=new n;else if(t(o,r))g=new r;else if(t(o,i))g=new i((function(t,e){o.then((function(e){t(p(e,a-1))}),(function(t){e(p(t,a-1))}))}));else if(A.__isArray(o))g=[];else if(A.__isRegExp(o))g=new RegExp(o.source,c(o)),o.lastIndex&&(g.lastIndex=o.lastIndex);else if(A.__isDate(o))g=new Date(o.getTime());else{if(f&&e.isBuffer(o))return g=new e(o.length),o.copy(g),g;t(o,Error)?g=Object.create(o):"undefined"==typeof l?(m=Object.getPrototypeOf(o),g=Object.create(m)):(g=Object.create(l),m=l)}if(s){var w=h.indexOf(o);if(-1!=w)return d[w];h.push(o),d.push(g)}for(var y in t(o,n)&&o.forEach((function(t,e){var n=p(e,a-1),r=p(t,a-1);g.set(n,r)})),t(o,r)&&o.forEach((function(t){var e=p(t,a-1);g.add(e)})),o){var v;m&&(v=Object.getOwnPropertyDescriptor(m,y)),v&&null==v.set||(g[y]=p(o[y],a-1))}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(o);for(y=0;y0){if(s instanceof c.BlockEmbed||h instanceof c.BlockEmbed)return void this.optimize();if(s instanceof p.default){var f=s.newlineIndex(s.length(),!0);if(f>-1&&(s=s.split(f+1),s===h))return void this.optimize()}else if(h instanceof p.default){var g=h.newlineIndex(0);g>-1&&h.split(g+1)}var m=h.children.head instanceof d.default?null:h.children.head;s.moveChildren(h,m),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,i){(null==this.whitelist||this.whitelist[r])&&(A(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==s.default.query(n,s.default.Scope.BLOCK)){var i=s.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var o=s.default.create(n,r);this.appendChild(o)}else A(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===s.default.Scope.INLINE_BLOT){var r=s.default.create(this.statics.defaultChild);r.appendChild(t),t=r}A(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(B,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,r){var i=[],A=r;return e.children.forEachAt(n,r,(function(e,n,r){B(e)?i.push(e):e instanceof s.default.Container&&(i=i.concat(t(e,n,A))),A-=r})),i};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(A(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(l.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return A(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=l.default.sources.USER;"string"===typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(l.default.events.SCROLL_BEFORE_UPDATE,n,t),A(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(l.default.events.SCROLL_UPDATE,n,t)}}}]),e}(s.default.Scroll);C.blotName="scroll",C.className="ql-editor",C.tagName="DIV",C.defaultChild="block",C.allowedChildren=[u.default,c.BlockEmbed,m.default],e.default=C},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){var n=[],r=!0,i=!1,A=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0)if(n.push(o.value),e&&n.length===e)break}catch(a){i=!0,A=a}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw A}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=P(t);if(null==r||null==r.key)return N.warn("Attempted to add invalid keyboard binding",r);"function"===typeof e&&(e={handler:e}),"function"===typeof n&&(n={handler:n}),r=(0,u.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var A=n.which||n.keyCode,o=(t.bindings[A]||[]).filter((function(t){return e.match(n,t)}));if(0!==o.length){var s=t.quill.getSelection();if(null!=s&&t.quill.hasFocus()){var a=t.quill.getLine(s.index),c=i(a,2),u=c[0],h=c[1],d=t.quill.getLeaf(s.index),f=i(d,2),p=f[0],g=f[1],w=0===s.length?[p,g]:t.quill.getLeaf(s.index+s.length),y=i(w,2),v=y[0],b=y[1],B=p instanceof m.default.Text?p.value().slice(0,g):"",C=v instanceof m.default.Text?v.value().slice(b):"",x={collapsed:0===s.length,empty:0===s.length&&u.length()<=1,format:t.quill.getFormat(s),offset:h,prefix:B,suffix:C},_=o.some((function(e){if(null!=e.collapsed&&e.collapsed!==x.collapsed)return!1;if(null!=e.empty&&e.empty!==x.empty)return!1;if(null!=e.offset&&e.offset!==x.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==x.format[t]})))return!1}else if("object"===r(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=x.format[t]:!1===e.format[t]?null==x.format[t]:(0,l.default)(e.format[t],x.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(x.prefix))&&(!(null!=e.suffix&&!e.suffix.test(x.suffix))&&!0!==e.handler.call(t,s,x))}));_&&n.preventDefault()}}}}))}}]),e}(C.default);function k(t,e){var n,r=t===U.keys.LEFT?"prefix":"suffix";return n={key:t,shiftKey:e,altKey:null},_(n,r,/^$/),_(n,"handler",(function(n){var r=n.index;t===U.keys.RIGHT&&(r+=n.length+1);var A=this.quill.getLeaf(r),o=i(A,1),s=o[0];return!(s instanceof m.default.Embed)||(t===U.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,y.default.sources.USER):this.quill.setSelection(n.index-1,y.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,y.default.sources.USER):this.quill.setSelection(n.index+n.length+1,y.default.sources.USER),!1)})),n}function Q(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=i(n,1),A=r[0],o={};if(0===e.offset){var s=this.quill.getLine(t.index-1),a=i(s,1),l=a[0];if(null!=l&&l.length()>1){var c=A.formats(),u=this.quill.getFormat(t.index-1,1);o=p.default.attributes.diff(c,u)||{}}}var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-h,h,y.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-h,h,o,y.default.sources.USER),this.quill.focus()}}function I(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},A=0,o=this.quill.getLine(t.index),s=i(o,1),a=s[0];if(e.offset>=a.length()-1){var l=this.quill.getLine(t.index+1),c=i(l,1),u=c[0];if(u){var h=a.formats(),d=this.quill.getFormat(t.index,1);r=p.default.attributes.diff(h,d)||{},A=u.length()}}this.quill.deleteText(t.index,n,y.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+A-1,n,r,y.default.sources.USER)}}function T(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),i=e[e.length-1].formats();n=p.default.attributes.diff(i,r)||{}}this.quill.deleteText(t,y.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,y.default.sources.USER),this.quill.setSelection(t.index,y.default.sources.SILENT),this.quill.focus()}function O(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce((function(t,n){return m.default.query(n,m.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",r,y.default.sources.USER),this.quill.setSelection(t.index+1,y.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],y.default.sources.USER))}))}function M(t){return{key:U.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=m.default.query("code-block"),r=e.index,A=e.length,o=this.quill.scroll.descendant(n,r),s=i(o,2),a=s[0],l=s[1];if(null!=a){var c=this.quill.getIndex(a),u=a.newlineIndex(l,!0)+1,h=a.newlineIndex(c+l+A),d=a.domNode.textContent.slice(u,h).split("\n");l=0,d.forEach((function(e,i){t?(a.insertAt(u+l,n.TAB),l+=n.TAB.length,0===i?r+=n.TAB.length:A+=n.TAB.length):e.startsWith(n.TAB)&&(a.deleteAt(u+l,n.TAB.length),l-=n.TAB.length,0===i?r-=n.TAB.length:A-=n.TAB.length),l+=e.length+1})),this.quill.update(y.default.sources.USER),this.quill.setSelection(r,A,y.default.sources.SILENT)}}}}function D(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],y.default.sources.USER)}}}function P(t){if("string"===typeof t||"number"===typeof t)return P({key:t});if("object"===("undefined"===typeof t?"undefined":r(t))&&(t=(0,s.default)(t,!1)),"string"===typeof t.key)if(null!=U.keys[t.key.toUpperCase()])t.key=U.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[S]=t.shortKey,delete t.shortKey),t}U.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},U.DEFAULTS={bindings:{bold:D("bold"),italic:D("italic"),underline:D("underline"),indent:{key:U.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",y.default.sources.USER)}},outdent:{key:U.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",y.default.sources.USER)}},"outdent backspace":{key:U.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",y.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,y.default.sources.USER)}},"indent code-block":M(!0),"outdent code-block":M(!1),"remove tab":{key:U.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,y.default.sources.USER)}},tab:{key:U.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new d.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,y.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,y.default.sources.SILENT)}},"list empty enter":{key:U.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,y.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,y.default.sources.USER)}},"checklist enter":{key:U.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],A=n[1],o=(0,u.default)({},r.formats(),{list:"checked"}),s=(new d.default).retain(t.index).insert("\n",o).retain(r.length()-A-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,y.default.sources.USER),this.quill.setSelection(t.index+1,y.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:U.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=i(n,2),A=r[0],o=r[1],s=(new d.default).retain(t.index).insert("\n",e.format).retain(A.length()-o-1).retain(1,{header:null});this.quill.updateContents(s,y.default.sources.USER),this.quill.setSelection(t.index+1,y.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),A=i(r,2),o=A[0],s=A[1];if(s>n)return!0;var a=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(t.index," ",y.default.sources.USER),this.quill.history.cutoff();var l=(new d.default).retain(t.index-s).delete(n+1).retain(o.length()-2-s).retain(1,{list:a});this.quill.updateContents(l,y.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,y.default.sources.SILENT)}},"code exit":{key:U.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],A=n[1],o=(new d.default).retain(t.index+r.length()-A-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(o,y.default.sources.USER)}},"embed left":k(U.keys.LEFT,!1),"embed left shift":k(U.keys.LEFT,!0),"embed right":k(U.keys.RIGHT,!1),"embed right shift":k(U.keys.RIGHT,!0)}},e.default=U,e.SHORTKEY=S},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){var n=[],r=!0,i=!1,A=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0)if(n.push(o.value),e&&n.length===e)break}catch(a){i=!0,A=a}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw A}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var A=Object.getPrototypeOf(e);return null===A?void 0:t(A,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},A=function(){function t(t,e){for(var n=0;n-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=u,e.sanitize=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"===typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"===typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=N(r),A=n(5),o=N(A),s=n(4),a=N(s),l=n(16),c=N(l),u=n(25),h=N(u),d=n(24),f=N(d),p=n(35),g=N(p),m=n(6),w=N(m),y=n(22),v=N(y),b=n(7),B=N(b),C=n(55),x=N(C),_=n(42),E=N(_),F=n(23),L=N(F);function N(t){return t&&t.__esModule?t:{default:t}}o.default.register({"blots/block":a.default,"blots/block/embed":s.BlockEmbed,"blots/break":c.default,"blots/container":h.default,"blots/cursor":f.default,"blots/embed":g.default,"blots/inline":w.default,"blots/scroll":v.default,"blots/text":B.default,"modules/clipboard":x.default,"modules/history":E.default,"modules/keyboard":L.default}),i.default.register(a.default,c.default,f.default,w.default,v.default,B.default),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"===typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"===typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){var n=this.isolate(t,e);n.remove()},t.prototype.formatAt=function(t,e,n,i){var A=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&i)A.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var o=r.create(this.statics.scope);A.wrap(o),o.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?r.create("text",e):r.create(e,n),A=this.split(t);this.parent.insertBefore(i,A)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"===typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"===typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),i=n(32),A=n(33),o=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=A.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=o.query(e,o.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(12);function A(t,e){var n=t.getAttribute("class")||"";return n.split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){var e=A(t,this.keyName);e.forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=A(t,this.keyName)[0]||"",n=e.slice(this.keyName.length+1);return this.canAdd(t,n)?n:""},e}(i.default);e.default=o},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(12);function A(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){var e=t.split(":");return e[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[A(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[A(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[A(this.keyName)];return this.canAdd(t,e)?e:""},e}(i.default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nr&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(l.default);function p(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"===typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=A.default.query(t,A.default.Scope.BLOCK)})))}function g(t){var e=t.reduce((function(t,e){return t+=e.delete||0,t}),0),n=t.length()-e;return p(t)&&(n-=1),n}f.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=f,e.getLastChangeIndex=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,c.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=I(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,c.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",c.default.sources.USER),this.quill.setSelection(r+2,c.default.sources.USER)}break;default:}this.textbox.value="",this.hide()}}]),e}(B.default);function I(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t}function T(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}e.BaseTooltip=Q,e.default=k},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){var e,n=this.iterator();while(e=n())if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){var e=0,n=this.head;while(null!=n){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);var n,r=this.iterator();while(n=r()){var i=n.length();if(ts?n(r,t-s,Math.min(e,s+l-t)):n(r,0,Math.min(l,t+e-s)),s+=l}}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){var n,r=this.iterator();while(n=r())e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),A=n(1),o={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=100,a=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,o),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,i){this.update(),t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);var o=[].slice.call(this.observer.takeRecords());while(o.length>0)e.push(o.pop());for(var a=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[A.DATA_KEY].mutations&&(t.domNode[A.DATA_KEY].mutations=[]),e&&a(t.parent))},l=function(t){null!=t.domNode[A.DATA_KEY]&&null!=t.domNode[A.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(l),t.optimize(n))},c=e,u=0;c.length>0;u+=1){if(u>=s)throw new Error("[Parchment] Maximum optimize iterations reached");c.forEach((function(t){var e=A.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(A.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=A.find(t,!1);a(e,!1),e instanceof i.default&&e.children.forEach((function(t){a(t,!1)}))}))):"attributes"===t.type&&a(e.prev)),a(e))})),this.children.forEach(l),c=[].slice.call(this.observer.takeRecords()),o=c.slice();while(o.length>0)e.push(o.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),e=e||this.observer.takeRecords(),e.map((function(t){var e=A.find(t.target,!0);return null==e?null:null==e.domNode[A.DATA_KEY].mutations?(e.domNode[A.DATA_KEY].mutations=[t],e):(e.domNode[A.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[A.DATA_KEY]&&t.update(t.domNode[A.DATA_KEY].mutations||[],n)})),null!=this.domNode[A.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[A.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=A.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),A=n(1);function o(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var A=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),A.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,i){if(null!=this.formats()[r]||A.query(r,A.Scope.ATTRIBUTE)){var o=this.isolate(e,n);o.format(r,i)}else t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&o(r,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=A.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),A=n(1),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var r=A.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=A.query(n,A.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,i){null!=A.query(r,A.Scope.BLOCK)?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=A.query(n,A.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var i=this.split(e),o=A.create(n,r);i.parent.insertBefore(o,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=A.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=o},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,i){0===e&&n===this.length()?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(i.default);e.default=A},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),A=n(1),o=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e["normalize"]&&(e=e["normalize"]()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=A.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=A.Scope.INLINE_BLOT,e}(i.default);e.default=o},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)===!e?e:i.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!==typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!==typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],A=0;Ae.length?t:e,l=t.length>e.length?e:t,c=a.indexOf(l);if(-1!=c)return o=[[r,a.substring(0,c)],[i,l],[r,a.substring(c+l.length)]],t.length>e.length&&(o[0][0]=o[2][0]=n),o;if(1==l.length)return[[n,t],[r,e]];var h=u(t,e);if(h){var d=h[0],f=h[1],p=h[2],g=h[3],m=h[4],w=A(d,p),y=A(f,g);return w.concat([[i,m]],y)}return s(t,e)}function s(t,e){for(var i=t.length,A=e.length,o=Math.ceil((i+A)/2),s=o,l=2*o,c=new Array(l),u=new Array(l),h=0;hi)g+=2;else if(B>A)p+=2;else if(f){var C=s+d-v;if(C>=0&&C=x)return a(t,e,F,B)}}}for(var _=-y+m;_<=y-w;_+=2){C=s+_;x=_==-y||_!=y&&u[C-1]i)w+=2;else if(E>A)m+=2;else if(!f){b=s+d-_;if(b>=0&&b=x)return a(t,e,F,B)}}}}return[[n,t],[r,e]]}function a(t,e,n,r){var i=t.substring(0,n),o=e.substring(0,r),s=t.substring(n),a=e.substring(r),l=A(i,o),c=A(s,a);return l.concat(c)}function l(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;var n=0,r=Math.min(t.length,e.length),i=r,A=0;while(ne.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,i,A,o,u]:null}var A,o,s,a,u,h=i(n,r,Math.ceil(n.length/4)),d=i(n,r,Math.ceil(n.length/2));if(!h&&!d)return null;A=d?h&&h[4].length>d[4].length?h:d:h,t.length>e.length?(o=A[0],s=A[1],a=A[2],u=A[3]):(a=A[0],u=A[1],o=A[2],s=A[3]);var f=A[4];return[o,s,a,u,f]}function h(t){t.push([i,""]);var e,A=0,o=0,s=0,a="",u="";while(A1?(0!==o&&0!==s&&(e=l(u,a),0!==e&&(A-o-s>0&&t[A-o-s-1][0]==i?t[A-o-s-1][1]+=u.substring(0,e):(t.splice(0,0,[i,u.substring(0,e)]),A++),u=u.substring(e),a=a.substring(e)),e=c(u,a),0!==e&&(t[A][1]=u.substring(u.length-e)+t[A][1],u=u.substring(0,u.length-e),a=a.substring(0,a.length-e))),0===o?t.splice(A-s,o+s,[r,u]):0===s?t.splice(A-o,o+s,[n,a]):t.splice(A-o-s,o+s,[n,a],[r,u]),A=A-o-s+(o?1:0)+(s?1:0)+1):0!==A&&t[A-1][0]==i?(t[A-1][1]+=t[A][1],t.splice(A,1)):A++,s=0,o=0,a="",u="";break}""===t[t.length-1][1]&&t.pop();var d=!1;A=1;while(A0&&r.splice(A+2,0,[s[0],a]),m(r,A,3)}return t}function g(t){for(var e=!1,A=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},o=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},s=2;s0&&a.push(t[s]);return a}function m(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[b.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new l.default).insert(n,F({},b.default.blotName,e[b.default.blotName]))}var r=this.prepareMatching(),A=i(r,2),o=A[0],s=A[1],a=R(this.container,o,s);return P(a,"\n")&&null==a.ops[a.ops.length-1].attributes&&(a=a.compose((new l.default).retain(a.length()-1).delete(1))),U.log("convert",this.container.innerHTML,a),this.container.innerHTML="",a}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.default.sources.API;if("string"===typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,d.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new l.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),d.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new l.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(d.default.sources.SILENT),setTimeout((function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,d.default.sources.USER),e.quill.setSelection(r.length()-n.length,d.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(r){var A=i(r,2),o=A[0],s=A[1];switch(o){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(o),(function(t){t[k]=t[k]||[],t[k].push(s)}));break}})),[e,n]}}]),e}(m.default);function M(t,e,n){return"object"===("undefined"===typeof e?"undefined":r(e))?Object.keys(e).reduce((function(t,n){return M(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,s.default)({},F({},e,n),r.attributes))}),new l.default)}function D(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function P(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length-1}function R(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new l.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(r,i){var A=R(i,e,n);return i.nodeType===t.ELEMENT_NODE&&(A=e.reduce((function(t,e){return e(i,t)}),A),A=(i[k]||[]).reduce((function(t,e){return e(i,t)}),A)),r.concat(A)}),new l.default):new l.default}function j(t,e,n){return M(n,t,!0)}function z(t,e){var n=u.default.Attributor.Attribute.keys(t),r=u.default.Attributor.Class.keys(t),i=u.default.Attributor.Style.keys(t),A={};return n.concat(r).concat(i).forEach((function(e){var n=u.default.query(e,u.default.Scope.ATTRIBUTE);null!=n&&(A[n.attrName]=n.value(t),A[n.attrName])||(n=I[e],null==n||n.attrName!==e&&n.keyName!==e||(A[n.attrName]=n.value(t)||void 0),n=T[e],null==n||n.attrName!==e&&n.keyName!==e||(n=T[e],A[n.attrName]=n.value(t)||void 0))})),Object.keys(A).length>0&&(e=M(e,A)),e}function q(t,e){var n=u.default.query(t);if(null==n)return e;if(n.prototype instanceof u.default.Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new l.default).insert(r,n.formats(t)))}else"function"===typeof n.formats&&(e=M(e,n.blotName,n.formats(t)));return e}function K(t,e){return P(e,"\n")||e.insert("\n"),e}function G(){return new l.default}function V(t,e){var n=u.default.query(t);if(null==n||"list-item"!==n.blotName||!P(e,"\n"))return e;var r=-1,i=t.parentNode;while(!i.classList.contains("ql-clipboard"))"list"===(u.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?e:e.compose((new l.default).retain(e.length()-1).retain(1,{indent:r}))}function W(t,e){return P(e,"\n")||(H(t)||e.length()>0&&t.nextSibling&&H(t.nextSibling))&&e.insert("\n"),e}function Y(t,e){if(H(t)&&null!=t.nextElementSibling&&!P(e,"\n\n")){var n=t.offsetHeight+parseFloat(D(t).marginTop)+parseFloat(D(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function X(t,e){var n={},r=t.style||{};return r.fontStyle&&"italic"===D(t).fontStyle&&(n.italic=!0),r.fontWeight&&(D(t).fontWeight.startsWith("bold")||parseInt(D(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=M(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new l.default).insert("\t").concat(e)),e}function J(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!D(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return e=e.replace(/[^\u00a0]/g,""),e.length<1&&t?" ":e};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&H(t.parentNode)||null!=t.previousSibling&&H(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&H(t.parentNode)||null!=t.nextSibling&&H(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}O.DEFAULTS={matchers:[],matchVisual:!0},e.default=O,e.matchAttributor=z,e.matchBlot=q,e.matchNewline=W,e.matchSpacing=Y,e.matchText=J},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nr.right&&(A=r.right-i.right,this.root.style.left=e+A+"px"),i.leftr.bottom){var o=i.bottom-i.top,s=t.bottom-t.top+o;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return A}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=A},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){var n=[],r=!0,i=!1,A=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0)if(n.push(o.value),e&&n.length===e)break}catch(a){i=!0,A=a}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw A}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var A=Object.getPrototypeOf(e);return null===A?void 0:t(A,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},A=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=B},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29),i=nt(r),A=n(36),o=n(38),s=n(64),a=n(65),l=nt(a),c=n(66),u=nt(c),h=n(67),d=nt(h),f=n(37),p=n(26),g=n(39),m=n(40),w=n(56),y=nt(w),v=n(68),b=nt(v),B=n(27),C=nt(B),x=n(69),_=nt(x),E=n(70),F=nt(E),L=n(71),N=nt(L),S=n(72),U=nt(S),k=n(73),Q=nt(k),I=n(13),T=nt(I),O=n(74),M=nt(O),D=n(75),P=nt(D),H=n(57),R=nt(H),j=n(41),z=nt(j),q=n(28),K=nt(q),G=n(59),V=nt(G),W=n(60),Y=nt(W),X=n(61),J=nt(X),Z=n(108),$=nt(Z),tt=n(62),et=nt(tt);function nt(t){return t&&t.__esModule?t:{default:t}}i.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":A.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":g.FontClass,"attributors/class/size":m.SizeClass,"attributors/style/align":A.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":g.FontStyle,"attributors/style/size":m.SizeStyle},!0),i.default.register({"formats/align":A.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":s.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":g.FontClass,"formats/size":m.SizeClass,"formats/blockquote":l.default,"formats/code-block":T.default,"formats/header":u.default,"formats/list":d.default,"formats/bold":y.default,"formats/code":I.Code,"formats/italic":b.default,"formats/link":C.default,"formats/script":_.default,"formats/strike":F.default,"formats/underline":N.default,"formats/image":U.default,"formats/video":Q.default,"formats/list/item":h.ListItem,"modules/formula":M.default,"modules/syntax":P.default,"modules/toolbar":R.default,"themes/bubble":$.default,"themes/snow":et.default,"ui/icons":z.default,"ui/picker":K.default,"ui/icon-picker":Y.default,"ui/color-picker":V.default,"ui/tooltip":J.default},!0),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var r=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return h({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,n){if(t instanceof g)i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),A=this.split(r);A.parent.insertBefore(t,A)}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(c.default);m.blotName="list",m.scope=o.default.Scope.BLOCK_BLOT,m.tagName=["OL","UL"],m.defaultChild="list-item",m.allowedChildren=[g],e.ListItem=g,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(56),i=A(r);function A(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var l=function(t){function e(){return o(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),e}(i.default);l.blotName="italic",l.tagName=["EM","I"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"===typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return h.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,s.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(o.default.Embed);d.blotName="image",d.tagName="IMG",e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return h.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return s.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(A.BlockEmbed);d.blotName="video",d.className="ql-video",d.tagName="IFRAME",e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var r=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(h.default);m.className="ql-syntax";var w=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),y=function(t){function e(t,n){f(this,e);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!==typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(i),i=setTimeout((function(){r.highlight(),i=null}),r.options.interval)})),r.highlight(),r}return g(e,t),r(e,null,[{key:"register",value:function(){a.default.register(w,!0),a.default.register(m,!0)}}]),r(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(m).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=e&&this.quill.setSelection(e,a.default.sources.SILENT)}}}]),e}(c.default);y.DEFAULTS={highlight:function(){return null==window.hljs?null:function(t){var e=window.hljs.highlightAuto(t);return e.value}}(),interval:1e3},e.CodeBlock=m,e.CodeToken=w,e.default=y},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var A=Object.getPrototypeOf(e);return null===A?void 0:t(A,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},i=function(){function t(t,e){for(var n=0;n0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var A=r.quill.getLines(e.index,e.length);if(1===A.length)r.position(r.quill.getBounds(e));else{var o=A[A.length-1],s=r.quill.getIndex(o),l=Math.min(o.length()-1,e.index+e.length-s),c=r.quill.getBounds(new u.Range(s,l));r.position(c)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return m(e,t),i(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),e}(l.BaseTooltip);v.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=v,e.default=y},function(t,e,n){t.exports=n(63)}])["default"]}))}).call(this,n("b639").Buffer)},"50f5":function(t,e,n){var r=n("ed00"),i=Math.max,A=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):A(n,e)}},"51a6":function(t,e,n){var r=n("b895"),i=n("d0dc"),A=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,A)}},5265:function(t,e,n){var r=n("8d5c"),i=n("8af8");t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},"54be":function(t,e,n){var r=n("8af8"),i=n("5e8c"),A=n("4d80"),o=n("8d5c"),s=n("d665").CONFIGURABLE,a=n("2c9d"),l=n("279c"),c=l.enforce,u=l.get,h=Object.defineProperty,d=o&&!r((function(){return 8!==h((function(){}),"length",{value:8}).length})),f=String(String).split("String"),p=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!A(t,"name")||s&&t.name!==e)&&(o?h(t,"name",{value:e,configurable:!0}):t.name=e),d&&n&&A(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&A(n,"constructor")&&n.constructor?o&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var r=c(t);return A(r,"source")||(r.source=f.join("string"==typeof e?e:"")),t};Function.prototype.toString=p((function(){return i(this)&&u(this).source||a(this)}),"toString")},"5afb":function(t,e,n){"use strict";var r=n("8af8");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},"5ba9":function(t,e,n){},"5e1a":function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n("8707").Buffer,A=n(1);function o(t,e,n){t.copy(e,n)}t.exports=function(){function t(){r(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";var e=this.head,n=""+e.data;while(e=e.next)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;var e=i.allocUnsafe(t>>>0),n=this.head,r=0;while(n)o(n.data,e,r),r+=n.data.length,n=n.next;return e},t}(),A&&A.inspect&&A.inspect.custom&&(t.exports.prototype[A.inspect.custom]=function(){var t=A.inspect({length:this.length});return this.constructor.name+" "+t})},"5e89":function(t,e,n){(function(e,n,r){var i;!function(e){t.exports=e()}((function(){return function t(e,n,r){function A(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof i&&i;if(!a&&l)return i(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};e[s][0].call(u.exports,(function(t){var n=e[s][1][t];return A(n||t)}),u,u.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof i&&i,s=0;s>2,s=(3&e)<<4|n>>4,a=1>6:64,l=2>4,n=(15&o)<<4|(s=A.indexOf(t.charAt(l++)))>>2,r=(3&s)<<6|(a=A.indexOf(t.charAt(l++))),h[c++]=e,64!==s&&(h[c++]=n),64!==a&&(h[c++]=r);return h}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var r=t("./external"),i=t("./stream/DataWorker"),A=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function s(t,e,n,r,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var t=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,n){return t.pipe(new A).pipe(new o("uncompressedSize")).pipe(e.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var r=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var r=t("./utils"),i=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==r.getTypeOf(t)?function(t,e,n,r){var A=i,o=r+n;t^=-1;for(var s=r;s>>8^A[255&(t^e[s])];return-1^t}(0|e,t,t.length,0):function(t,e,n,r){var A=i,o=r+n;t^=-1;for(var s=r;s>>8^A[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length,0):0}},{"./utils":32}],5:[function(t,e,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,e,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:r}},{lie:37}],7:[function(t,e,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),A=t("./utils"),o=t("./stream/GenericWorker"),s=r?"uint8array":"array";function a(t,e){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}n.magic="\b\0",A.inherits(a,o),a.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(A.transformTo(s,t.data),!1)},a.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},a.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},n.compressWorker=function(t){return new a("Deflate",t)},n.uncompressWorker=function(){return new a("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function r(t,e){var n,r="";for(n=0;n>>=8;return r}function i(t,e,n,i,o,c){var u,h,d=t.file,f=t.compression,p=c!==s.utf8encode,g=A.transformTo("string",c(d.name)),m=A.transformTo("string",s.utf8encode(d.name)),w=d.comment,y=A.transformTo("string",c(w)),v=A.transformTo("string",s.utf8encode(w)),b=m.length!==d.name.length,B=v.length!==w.length,C="",x="",_="",E=d.dir,F=d.date,L={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(L.crc32=t.crc32,L.compressedSize=t.compressedSize,L.uncompressedSize=t.uncompressedSize);var N=0;e&&(N|=8),p||!b&&!B||(N|=2048);var S=0,U=0;E&&(S|=16),"UNIX"===o?(U=798,S|=function(t,e){var n=t;return t||(n=e?16893:33204),(65535&n)<<16}(d.unixPermissions,E)):(U=20,S|=function(t){return 63&(t||0)}(d.dosPermissions)),u=F.getUTCHours(),u<<=6,u|=F.getUTCMinutes(),u<<=5,u|=F.getUTCSeconds()/2,h=F.getUTCFullYear()-1980,h<<=4,h|=F.getUTCMonth()+1,h<<=5,h|=F.getUTCDate(),b&&(x=r(1,1)+r(a(g),4)+m,C+="up"+r(x.length,2)+x),B&&(_=r(1,1)+r(a(y),4)+v,C+="uc"+r(_.length,2)+_);var k="";return k+="\n\0",k+=r(N,2),k+=f.magic,k+=r(u,2),k+=r(h,2),k+=r(L.crc32,4),k+=r(L.compressedSize,4),k+=r(L.uncompressedSize,4),k+=r(g.length,2),k+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+k+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(U,2)+k+r(y.length,2)+"\0\0\0\0"+r(S,4)+r(i,4)+g+C+y}}var A=t("../utils"),o=t("../stream/GenericWorker"),s=t("../utf8"),a=t("../crc32"),l=t("../signature");function c(t,e,n,r){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}A.inherits(c,o),c.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,o.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-r-1))/n:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return l.DATA_DESCRIPTOR+r(t.crc32,4)+r(t.compressedSize,4)+r(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return r.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,n){"use strict";var r=t("./Uint8ArrayReader");function i(t){r.call(this,t)}t("../utils").inherits(i,r),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var r=t("./DataReader");function i(t){r.call(this,t)}t("../utils").inherits(i,r),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var r=t("./ArrayReader");function i(t){r.call(this,t)}t("../utils").inherits(i,r),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var r=t("../utils"),i=t("../support"),A=t("./ArrayReader"),o=t("./StringReader"),s=t("./NodeBufferReader"),a=t("./Uint8ArrayReader");e.exports=function(t){var e=r.getTypeOf(t);return r.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new s(t):i.uint8array?new a(r.transformTo("uint8array",t)):new A(r.transformTo("array",t)):new o(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,n){"use strict";var r=t("./GenericWorker"),i=t("../utils");function A(t){r.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(A,r),A.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=A},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var r=t("./GenericWorker"),i=t("../crc32");function A(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(A,r),A.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=A},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var r=t("../utils"),i=t("./GenericWorker");function A(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}r.inherits(A,i),A.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=A},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var r=t("../utils"),i=t("./GenericWorker");function A(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=r.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}r.inherits(A,i),A.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},A.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},A.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},A.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=A},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function r(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n "+t:t}},e.exports=r},{}],29:[function(t,n,r){"use strict";var i=t("../utils"),A=t("./ConvertWorker"),o=t("./GenericWorker"),s=t("../base64"),a=t("../support"),l=t("../external"),c=null;if(a.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function u(t,n){return new l.Promise((function(r,A){var o=[],a=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",(function(t,e){o.push(t),n&&n(e)})).on("error",(function(t){o=[],A(t)})).on("end",(function(){try{var t=function(t,e,n){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),n);case"base64":return s.encode(e);default:return i.transformTo(t,e)}}(l,function(t,n){var r,i=0,A=null,o=0;for(r=0;r>>6:(n<65536?e[o++]=224|n>>>12:(e[o++]=240|n>>>18,e[o++]=128|n>>>12&63),e[o++]=128|n>>>6&63),e[o++]=128|63&n);return e}(t)},n.utf8decode=function(t){return i.nodebuffer?r.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,i,A,o=t.length,a=new Array(2*o);for(e=n=0;e>10&1023,a[n++]=56320|1023&i)}return a.length!==n&&(a.subarray?a=a.subarray(0,n):a.length=n),r.applyFromCharCode(a)}(t=r.transformTo(i.uint8array?"uint8array":"array",t))},r.inherits(l,o),l.prototype.processChunk=function(t){var e=r.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var A=e;(e=new Uint8Array(A.length+this.leftOver.length)).set(this.leftOver,0),e.set(A,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var o=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+s[t[n]]>e?n:e}(e),a=e;o!==e.length&&(i.uint8array?(a=e.subarray(0,o),this.leftOver=e.subarray(o,e.length)):(a=e.slice(0,o),this.leftOver=e.slice(o,e.length))),this.push({data:n.utf8decode(a),meta:t.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(c,o),c.prototype.processChunk=function(t){this.push({data:n.utf8encode(t.data),meta:t.meta})},n.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var r=t("./support"),i=t("./base64"),A=t("./nodejsUtils"),o=t("./external");function s(t){return t}function a(t,e){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var e,n,r,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(n<65536?e[o++]=224|n>>>12:(e[o++]=240|n>>>18,e[o++]=128|n>>>12&63),e[o++]=128|n>>>6&63),e[o++]=128|63&n);return e},n.buf2binstring=function(t){return a(t,t.length)},n.binstring2buf=function(t){for(var e=new r.Buf8(t.length),n=0,i=e.length;n>10&1023,l[r++]=56320|1023&i)}return a(l,r)},n.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+o[t[n]]>e?n:e}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){for(var i=65535&t|0,A=t>>>16&65535|0,o=0;0!==n;){for(n-=o=2e3>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e,n,i){var A=r,o=i+n;t^=-1;for(var s=i;s>>8^A[255&(t^e[s])];return-1^t}},{}],46:[function(t,e,n){"use strict";var r,i=t("../utils/common"),A=t("./trees"),o=t("./adler32"),s=t("./crc32"),a=t("./messages"),l=0,c=4,u=0,h=-2,d=-1,f=4,p=2,g=8,m=9,w=286,y=30,v=19,b=2*w+1,B=15,C=3,x=258,_=x+C+1,E=42,F=113,L=1,N=2,S=3,U=4;function k(t,e){return t.msg=a[e],e}function Q(t){return(t<<1)-(4t.avail_out&&(n=t.avail_out),0!==n&&(i.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function O(t,e){A._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,T(t.strm)}function M(t,e){t.pending_buf[t.pending++]=e}function D(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function P(t,e){var n,r,i=t.max_chain_length,A=t.strstart,o=t.prev_length,s=t.nice_match,a=t.strstart>t.w_size-_?t.strstart-(t.w_size-_):0,l=t.window,c=t.w_mask,u=t.prev,h=t.strstart+x,d=l[A+o-1],f=l[A+o];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(l[(n=e)+o]===f&&l[n+o-1]===d&&l[n]===l[A]&&l[++n]===l[A+1]){A+=2,n++;do{}while(l[++A]===l[++n]&&l[++A]===l[++n]&&l[++A]===l[++n]&&l[++A]===l[++n]&&l[++A]===l[++n]&&l[++A]===l[++n]&&l[++A]===l[++n]&&l[++A]===l[++n]&&Aa&&0!=--i);return o<=t.lookahead?o:t.lookahead}function H(t){var e,n,r,A,a,l,c,u,h,d,f=t.w_size;do{if(A=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-_)){for(i.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=n=t.hash_size;r=t.head[--e],t.head[e]=f<=r?r-f:0,--n;);for(e=n=f;r=t.prev[--e],t.prev[e]=f<=r?r-f:0,--n;);A+=f}if(0===t.strm.avail_in)break;if(l=t.strm,c=t.window,u=t.strstart+t.lookahead,h=A,d=void 0,d=l.avail_in,h=C)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<=C&&(t.ins_h=(t.ins_h<=C)if(r=A._tr_tally(t,t.strstart-t.match_start,t.match_length-C),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=C){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=C&&(t.ins_h=(t.ins_h<=C&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-C,r=A._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-C),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===l)return L;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,O(t,!1),0===t.strm.avail_out))return L;if(t.strstart-t.block_start>=t.w_size-_&&(O(t,!1),0===t.strm.avail_out))return L}return t.insert=0,e===c?(O(t,!0),0===t.strm.avail_out?S:U):(t.strstart>t.block_start&&(O(t,!1),t.strm.avail_out),L)})),new z(4,4,8,4,R),new z(4,5,16,8,R),new z(4,6,32,32,R),new z(4,4,16,16,j),new z(8,16,32,32,j),new z(8,16,128,128,j),new z(8,32,128,256,j),new z(32,128,258,1024,j),new z(32,258,258,4096,j)],n.deflateInit=function(t,e){return V(t,e,g,15,8,0)},n.deflateInit2=V,n.deflateReset=G,n.deflateResetKeep=K,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?h:(t.state.gzhead=e,u):h},n.deflate=function(t,e){var n,i,o,a;if(!t||!t.state||5>8&255),M(i,i.gzhead.time>>16&255),M(i,i.gzhead.time>>24&255),M(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),M(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(M(i,255&i.gzhead.extra.length),M(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(M(i,0),M(i,0),M(i,0),M(i,0),M(i,0),M(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),M(i,3),i.status=F);else{var d=g+(i.w_bits-8<<4)<<8;d|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=F,D(i,d),0!==i.strstart&&(D(i,t.adler>>>16),D(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),T(t),o=i.pending,i.pending!==i.pending_buf_size));)M(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),T(t),o=i.pending,i.pending===i.pending_buf_size)){a=1;break}a=i.gzindexo&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===a&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),T(t),o=i.pending,i.pending===i.pending_buf_size)){a=1;break}a=i.gzindexo&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===a&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&T(t),i.pending+2<=i.pending_buf_size&&(M(i,255&t.adler),M(i,t.adler>>8&255),t.adler=0,i.status=F)):i.status=F),0!==i.pending){if(T(t),0===t.avail_out)return i.last_flush=-1,u}else if(0===t.avail_in&&Q(e)<=Q(n)&&e!==c)return k(t,-5);if(666===i.status&&0!==t.avail_in)return k(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==l&&666!==i.status){var f=2===i.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===l)return L;break}if(t.match_length=0,n=A._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(O(t,!1),0===t.strm.avail_out))return L}return t.insert=0,e===c?(O(t,!0),0===t.strm.avail_out?S:U):t.last_lit&&(O(t,!1),0===t.strm.avail_out)?L:N}(i,e):3===i.strategy?function(t,e){for(var n,r,i,o,s=t.window;;){if(t.lookahead<=x){if(H(t),t.lookahead<=x&&e===l)return L;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=C&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=C?(n=A._tr_tally(t,1,t.match_length-C),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=A._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(O(t,!1),0===t.strm.avail_out))return L}return t.insert=0,e===c?(O(t,!0),0===t.strm.avail_out?S:U):t.last_lit&&(O(t,!1),0===t.strm.avail_out)?L:N}(i,e):r[i.level].func(i,e);if(f!==S&&f!==U||(i.status=666),f===L||f===S)return 0===t.avail_out&&(i.last_flush=-1),u;if(f===N&&(1===e?A._tr_align(i):5!==e&&(A._tr_stored_block(i,0,0,!1),3===e&&(I(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),T(t),0===t.avail_out))return i.last_flush=-1,u}return e!==c?u:i.wrap<=0?1:(2===i.wrap?(M(i,255&t.adler),M(i,t.adler>>8&255),M(i,t.adler>>16&255),M(i,t.adler>>24&255),M(i,255&t.total_in),M(i,t.total_in>>8&255),M(i,t.total_in>>16&255),M(i,t.total_in>>24&255)):(D(i,t.adler>>>16),D(i,65535&t.adler)),T(t),0=n.w_size&&(0===s&&(I(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new i.Buf8(n.w_size),i.arraySet(d,e,f-n.w_size,n.w_size,0),e=d,f=n.w_size),a=t.avail_in,l=t.next_in,c=t.input,t.avail_in=f,t.next_in=0,t.input=e,H(n);n.lookahead>=C;){for(r=n.strstart,A=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=v=y>>>24,f-=v,0===(v=y>>>16&255))E[A++]=65535&y;else{if(!(16&v)){if(0==(64&v)){y=p[(65535&y)+(d&(1<>>=v,f-=v),f<15&&(d+=_[r++]<>>=v=y>>>24,f-=v,!(16&(v=y>>>16&255))){if(0==(64&v)){y=g[(65535&y)+(d&(1<>>=v,f-=v,(v=A-o)>3,d&=(1<<(f-=b<<3))-1,t.next_in=r,t.next_out=A,t.avail_in=r>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function m(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=h,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new r.Buf32(d),e.distcode=e.distdyn=new r.Buf32(f),e.sane=1,e.back=-1,c):u}function w(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,m(t)):u}function y(t,e){var n,r;return t&&t.state?(r=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=o.wsize?(r.arraySet(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(A=o.wsize-o.wnext)&&(A=i),r.arraySet(o.window,e,n-i,A,o.wnext),(i-=A)?(r.arraySet(o.window,e,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=A,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=A(n.check,H,2,0),b=v=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&v)<<8)+(v>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&v)){t.msg="unknown compression method",n.mode=30;break}if(b-=4,T=8+(15&(v>>>=4)),0===n.wbits)n.wbits=T;else if(T>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(H[0]=255&v,H[1]=v>>>8&255,n.check=A(n.check,H,2,0)),b=v=0,n.mode=3;case 3:for(;b<32;){if(0===w)break t;w--,v+=d[g++]<>>8&255,H[2]=v>>>16&255,H[3]=v>>>24&255,n.check=A(n.check,H,4,0)),b=v=0,n.mode=4;case 4:for(;b<16;){if(0===w)break t;w--,v+=d[g++]<>8),512&n.flags&&(H[0]=255&v,H[1]=v>>>8&255,n.check=A(n.check,H,2,0)),b=v=0,n.mode=5;case 5:if(1024&n.flags){for(;b<16;){if(0===w)break t;w--,v+=d[g++]<>>8&255,n.check=A(n.check,H,2,0)),b=v=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(w<(E=n.length)&&(E=w),E&&(n.head&&(T=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,d,g,E,T)),512&n.flags&&(n.check=A(n.check,d,E,g)),w-=E,g+=E,n.length-=E),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===w)break t;for(E=0;T=d[g+E++],n.head&&T&&n.length<65536&&(n.head.name+=String.fromCharCode(T)),T&&E>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;b<32;){if(0===w)break t;w--,v+=d[g++]<>>=7&b,b-=7&b,n.mode=27;break}for(;b<3;){if(0===w)break t;w--,v+=d[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(x(n),n.mode=20,6!==e)break;v>>>=2,b-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}v>>>=2,b-=2;break;case 14:for(v>>>=7&b,b-=7&b;b<32;){if(0===w)break t;w--,v+=d[g++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&v,b=v=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(E=n.length){if(w>>=5,b-=5,n.ndist=1+(31&v),v>>>=5,b-=5,n.ncode=4+(15&v),v>>>=4,b-=4,286>>=3,b-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},O=s(0,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,O){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,U=65535&P,!((N=P>>>24)<=b);){if(0===w)break t;w--,v+=d[g++]<>>=N,b-=N,n.lens[n.have++]=U;else{if(16===U){for(D=N+2;b>>=N,b-=N,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}T=n.lens[n.have-1],E=3+(3&v),v>>>=2,b-=2}else if(17===U){for(D=N+3;b>>=N)),v>>>=3,b-=3}else{for(D=N+7;b>>=N)),v>>>=7,b-=7}if(n.have+E>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;E--;)n.lens[n.have++]=T}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,M={bits:n.lenbits},O=s(a,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,O){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},O=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,O){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(6<=w&&258<=y){t.next_out=m,t.avail_out=y,t.next_in=g,t.avail_in=w,n.hold=v,n.bits=b,o(t,C),m=t.next_out,f=t.output,y=t.avail_out,g=t.next_in,d=t.input,w=t.avail_in,v=n.hold,b=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;S=(P=n.lencode[v&(1<>>16&255,U=65535&P,!((N=P>>>24)<=b);){if(0===w)break t;w--,v+=d[g++]<>k)])>>>16&255,U=65535&P,!(k+(N=P>>>24)<=b);){if(0===w)break t;w--,v+=d[g++]<>>=k,b-=k,n.back+=k}if(v>>>=N,b-=N,n.back+=N,n.length=U,0===S){n.mode=26;break}if(32&S){n.back=-1,n.mode=12;break}if(64&S){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&S,n.mode=22;case 22:if(n.extra){for(D=n.extra;b>>=n.extra,b-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;S=(P=n.distcode[v&(1<>>16&255,U=65535&P,!((N=P>>>24)<=b);){if(0===w)break t;w--,v+=d[g++]<>k)])>>>16&255,U=65535&P,!(k+(N=P>>>24)<=b);){if(0===w)break t;w--,v+=d[g++]<>>=k,b-=k,n.back+=k}if(v>>>=N,b-=N,n.back+=N,64&S){t.msg="invalid distance code",n.mode=30;break}n.offset=U,n.extra=15&S,n.mode=24;case 24:if(n.extra){for(D=n.extra;b>>=n.extra,b-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===y)break t;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}F=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),L=n.window}else L=f,F=m-n.offset,E=n.length;for(yw?(v=M[D+u[x]],Q[I+u[x]]):(v=96,0),d=1<>N)+(f-=d)]=y<<24|v<<16|b|0,0!==f;);for(d=1<>=1;if(0!==d?(k&=d-1,k+=d):k=0,x++,0==--T[C]){if(C===E)break;C=e[n+u[x]]}if(F>>7)]}function M(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function D(t,e,n){t.bi_valid>p-n?(t.bi_buf|=e<>p-t.bi_valid,t.bi_valid+=n-p):(t.bi_buf|=e<>>=1,n<<=1,0<--e;);return n>>>1}function R(t,e,n){var r,i,A=new Array(f+1),o=0;for(r=1;r<=f;r++)A[r]=o=o+n[r-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=H(A[s]++,s))}}function j(t){var e;for(e=0;e>1;1<=n;n--)K(t,A,n);for(i=a;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],K(t,A,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,A[2*i]=A[2*n]+A[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,A[2*n+1]=A[2*r+1]=i,t.heap[1]=i++,K(t,A,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,r,i,A,o,s,a=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,u=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,g=e.stat_desc.max_length,m=0;for(A=0;A<=f;A++)t.bl_count[A]=0;for(a[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n>=7;r>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return i;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return A;for(e=32;e>>3,(s=t.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&-1!==e?J(t,e,n,r):4===t.strategy||s===o?(D(t,2+(r?1:0),3),G(t,_,E)):(D(t,4+(r?1:0),3),function(t,e,n,r){var i;for(D(t,e-257,5),D(t,n-1,5),D(t,r-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(L[n]+l+1)]++,t.dyn_dtree[2*O(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){D(t,2,3),P(t,m,_),function(t){16===t.bi_valid?(M(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,i){(function(t){!function(t,e){"use strict";if(!t.setImmediate){var n,i,A,o,s=1,a={},l=!1,c=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,n="[object process]"==={}.toString.call(t.process)?function(t){r.nextTick((function(){d(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?(o="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",f,!1):t.attachEvent("onmessage",f),function(e){t.postMessage(o+e,"*")}):t.MessageChannel?((A=new MessageChannel).port1.onmessage=function(t){d(t.data)},function(t){A.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(i=c.documentElement,function(t){var e=c.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):function(t){setTimeout(d,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r=200&&e.status<=299}function u(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var h,d,f=o.saveAs||("object"!==("undefined"==typeof window?"undefined":i()(window))||window!==o?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,n){var r=o.URL||o.webkitURL,i=document.createElement("a");e=e||t.name||"download",i.download=e,i.rel="noopener","string"==typeof t?(i.href=t,i.origin!==location.origin?c(i.href)?l(t,e,n):u(i,i.target="_blank"):u(i)):(i.href=r.createObjectURL(t),setTimeout((function(){r.revokeObjectURL(i.href)}),4e4),setTimeout((function(){u(i)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download","string"==typeof t)if(c(t))l(t,e,n);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout((function(){u(r)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!==i()(e)&&(a.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,n),e)}:function(t,e,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof t)return l(t,e,n);var A="application/octet-stream"===t.type,s=/constructor/i.test(o.HTMLElement)||o.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||A&&s)&&"object"===("undefined"==typeof FileReader?"undefined":i()(FileReader))){var c=new FileReader;c.onloadend=function(){var t=c.result;t=a?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=t:location=t,r=null},c.readAsDataURL(t)}else{var u=o.URL||o.webkitURL,h=u.createObjectURL(t);r?r.location=h:location.href=h,r=null,setTimeout((function(){u.revokeObjectURL(h)}),4e4)}}); /** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function p(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],r=0;r255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),n=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==n.length&&(n="0"+n),"#"+t+e+n /** * @license * Joseph Myers does not specify a particular license for his work. * * Author: Joseph Myers * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js * * Modified by: Owen Leong */}}function g(t,e){var n=t[0],r=t[1],i=t[2],A=t[3];n=w(n,r,i,A,e[0],7,-680876936),A=w(A,n,r,i,e[1],12,-389564586),i=w(i,A,n,r,e[2],17,606105819),r=w(r,i,A,n,e[3],22,-1044525330),n=w(n,r,i,A,e[4],7,-176418897),A=w(A,n,r,i,e[5],12,1200080426),i=w(i,A,n,r,e[6],17,-1473231341),r=w(r,i,A,n,e[7],22,-45705983),n=w(n,r,i,A,e[8],7,1770035416),A=w(A,n,r,i,e[9],12,-1958414417),i=w(i,A,n,r,e[10],17,-42063),r=w(r,i,A,n,e[11],22,-1990404162),n=w(n,r,i,A,e[12],7,1804603682),A=w(A,n,r,i,e[13],12,-40341101),i=w(i,A,n,r,e[14],17,-1502002290),n=y(n,r=w(r,i,A,n,e[15],22,1236535329),i,A,e[1],5,-165796510),A=y(A,n,r,i,e[6],9,-1069501632),i=y(i,A,n,r,e[11],14,643717713),r=y(r,i,A,n,e[0],20,-373897302),n=y(n,r,i,A,e[5],5,-701558691),A=y(A,n,r,i,e[10],9,38016083),i=y(i,A,n,r,e[15],14,-660478335),r=y(r,i,A,n,e[4],20,-405537848),n=y(n,r,i,A,e[9],5,568446438),A=y(A,n,r,i,e[14],9,-1019803690),i=y(i,A,n,r,e[3],14,-187363961),r=y(r,i,A,n,e[8],20,1163531501),n=y(n,r,i,A,e[13],5,-1444681467),A=y(A,n,r,i,e[2],9,-51403784),i=y(i,A,n,r,e[7],14,1735328473),n=v(n,r=y(r,i,A,n,e[12],20,-1926607734),i,A,e[5],4,-378558),A=v(A,n,r,i,e[8],11,-2022574463),i=v(i,A,n,r,e[11],16,1839030562),r=v(r,i,A,n,e[14],23,-35309556),n=v(n,r,i,A,e[1],4,-1530992060),A=v(A,n,r,i,e[4],11,1272893353),i=v(i,A,n,r,e[7],16,-155497632),r=v(r,i,A,n,e[10],23,-1094730640),n=v(n,r,i,A,e[13],4,681279174),A=v(A,n,r,i,e[0],11,-358537222),i=v(i,A,n,r,e[3],16,-722521979),r=v(r,i,A,n,e[6],23,76029189),n=v(n,r,i,A,e[9],4,-640364487),A=v(A,n,r,i,e[12],11,-421815835),i=v(i,A,n,r,e[15],16,530742520),n=b(n,r=v(r,i,A,n,e[2],23,-995338651),i,A,e[0],6,-198630844),A=b(A,n,r,i,e[7],10,1126891415),i=b(i,A,n,r,e[14],15,-1416354905),r=b(r,i,A,n,e[5],21,-57434055),n=b(n,r,i,A,e[12],6,1700485571),A=b(A,n,r,i,e[3],10,-1894986606),i=b(i,A,n,r,e[10],15,-1051523),r=b(r,i,A,n,e[1],21,-2054922799),n=b(n,r,i,A,e[8],6,1873313359),A=b(A,n,r,i,e[15],10,-30611744),i=b(i,A,n,r,e[6],15,-1560198380),r=b(r,i,A,n,e[13],21,1309151649),n=b(n,r,i,A,e[4],6,-145523070),A=b(A,n,r,i,e[11],10,-1120210379),i=b(i,A,n,r,e[2],15,718787259),r=b(r,i,A,n,e[9],21,-343485551),t[0]=N(n,t[0]),t[1]=N(r,t[1]),t[2]=N(i,t[2]),t[3]=N(A,t[3])}function m(t,e,n,r,i,A){return e=N(N(e,t),N(r,A)),N(e<>>32-i,n)}function w(t,e,n,r,i,A,o){return m(e&n|~e&r,t,e,i,A,o)}function y(t,e,n,r,i,A,o){return m(e&r|n&~r,t,e,i,A,o)}function v(t,e,n,r,i,A,o){return m(e^n^r,t,e,i,A,o)}function b(t,e,n,r,i,A,o){return m(n^(e|~r),t,e,i,A,o)}function B(t){var e,n=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)g(r,C(t.substring(e-64,e)));t=t.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(g(r,i),e=0;e<16;e++)i[e]=0;return i[14]=8*n,g(r,i),r}function C(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}h=o.atob.bind(o),d=o.btoa.bind(o);var x="0123456789abcdef".split("");function _(t){for(var e="",n=0;n<4;n++)e+=x[t>>8*n+4&15]+x[t>>8*n&15];return e}function E(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function F(t){return B(t).map(E).join("")}var L="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e>16)+(e>>16)+(n>>16)<<16|65535&n}return t+e&4294967295} /** * @license * FPDF is released under a permissive license: there is no usage restriction. * You may embed it freely in your application (commercial or not), with or * without modifications. * * Reference: http://www.fpdf.org/en/script/script37.php */function S(t,e){var n,r,i,A;if(t!==n){for(var o=(i=t,A=1+(256/t.length>>0),new Array(A+1).join(i)),s=[],a=0;a<256;a++)s[a]=a;var l=0;for(a=0;a<256;a++){var c=s[a];l=(l+c+o.charCodeAt(a))%256,s[a]=s[l],s[l]=c}n=t,r=s}else s=r;var u=e.length,h=0,d=0,f="";for(a=0;a€/\f©þdSiz";var A=(e+this.padding).substr(0,32),o=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(A,o),this.P=-(1+(255^i)),this.encryptionKey=F(A+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=S(this.encryptionKey,this.padding)}function Q(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",n=t.length,r=0;r126?"#"+("0"+i.toString(16)).slice(-2):t[r]}return e}function I(t){if("object"!==i()(t))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,n,r){if(r=r||!1,"string"!=typeof t||"function"!=typeof n||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var i=Math.random().toString(35);return e[t][i]=[n,!!r],i},this.unsubscribe=function(t){for(var n in e)if(e[n][t])return delete e[n][t],0===Object.keys(e[n]).length&&delete e[n],!0;return!1},this.publish=function(n){if(e.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var A in e[n]){var s=e[n][A];try{s[0].apply(t,r)}catch(n){o.console&&a.error("jsPDF PubSub Error",n.message,n)}s[1]&&i.push(A)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function T(t){if(!(this instanceof T))return new T(t);var e="opacity,stroke-opacity".split(",");for(var n in t)t.hasOwnProperty(n)&&e.indexOf(n)>=0&&(this[n]=t[n]);this.id="",this.objectNumber=-1}function O(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function M(t,e,n,r,i){if(!(this instanceof M))return new M(t,e,n,r,i);this.type="axial"===t?2:3,this.coords=e,this.colors=n,O.call(this,r,i)}function D(t,e,n,r,i){if(!(this instanceof D))return new D(t,e,n,r,i);this.boundingBox=t,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,O.call(this,r,i)}function P(t){var e,n="string"==typeof arguments[0]?arguments[0]:"p",r=arguments[1],A=arguments[2],s=arguments[3],l=[],c=1,u=16,h="S",g=null;"object"===i()(t=t||{})&&(n=t.orientation,r=t.unit||r,A=t.format||A,s=t.compress||t.compressPdf||s,null!==(g=t.encryption||null)&&(g.userPassword=g.userPassword||"",g.ownerPassword=g.ownerPassword||"",g.userPermissions=g.userPermissions||[]),c="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(e=t.precision),void 0!==t.floatPrecision&&(u=t.floatPrecision),h=t.defaultPathOperation||"S"),l=t.filters||(!0===s?["FlateEncode"]:l),r=r||"mm",n=(""+(n||"P")).toLowerCase();var m=t.putOnlyUsedFonts||!1,w={},y={internal:{},__private__:{}};y.__private__.PubSub=I;var v="1.3",b=y.__private__.getPdfVersion=function(){return v};y.__private__.setPdfVersion=function(t){v=t};var B={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};y.__private__.getPageFormats=function(){return B};var C=y.__private__.getPageFormat=function(t){return B[t]};A=A||"a4";var x={COMPAT:"compat",ADVANCED:"advanced"},_=x.COMPAT;function E(){this.saveGraphicsState(),ut(new Kt(Et,0,0,-Et,0,Hn()*Et).toString()+" cm"),this.setFontSize(this.getFontSize()/Et),h="n",_=x.ADVANCED}function F(){this.restoreGraphicsState(),h="S",_=x.COMPAT}var L=y.__private__.combineFontStyleAndFontWeight=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw new Error("Invalid Combination of fontweight and fontstyle");return e&&(t=400==e||"normal"===e?"italic"===t?"italic":"normal":700!=e&&"bold"!==e||"normal"!==t?(700==e?"bold":e)+""+t:"bold"),t};y.advancedAPI=function(t){var e=_===x.COMPAT;return e&&E.call(this),"function"!=typeof t||(t(this),e&&F.call(this)),this},y.compatAPI=function(t){var e=_===x.ADVANCED;return e&&F.call(this),"function"!=typeof t||(t(this),e&&E.call(this)),this},y.isAdvancedAPI=function(){return _===x.ADVANCED};var N,S=function(t){if(_!==x.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},U=y.roundToPrecision=y.__private__.roundToPrecision=function(t,n){var r=e||n;if(isNaN(t)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(r).replace(/0+$/,"")};N=y.hpf=y.__private__.hpf="number"==typeof u?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return U(t,u)}:"smart"===u?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return U(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return U(t,16)};var O=y.f2=y.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return U(t,2)},H=y.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return U(t,3)},R=y.scale=y.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return _===x.COMPAT?t*Et:_===x.ADVANCED?t:void 0},j=function(t){return _===x.COMPAT?Hn()-t:_===x.ADVANCED?t:void 0},z=function(t){return R(j(t))};y.__private__.setPrecision=y.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(e=parseInt(t,10))};var q,K="00000000000000000000000000000000",G=y.__private__.getFileId=function(){return K},V=y.__private__.setFileId=function(t){return K=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():K.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==g&&(Ve=new k(g.userPermissions,g.userPassword,g.ownerPassword,K)),K};y.setFileId=function(t){return V(t),this},y.getFileId=function(){return G()};var W=y.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),n=e<0?"+":"-",r=Math.floor(Math.abs(e/60)),i=Math.abs(e%60),A=[n,$(r),"'",$(i),"'"].join("");return["D:",t.getFullYear(),$(t.getMonth()+1),$(t.getDate()),$(t.getHours()),$(t.getMinutes()),$(t.getSeconds()),A].join("")},Y=y.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),n=parseInt(t.substr(6,2),10)-1,r=parseInt(t.substr(8,2),10),i=parseInt(t.substr(10,2),10),A=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(e,n,r,i,A,o,0)},X=y.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=W(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return q=e},J=y.__private__.getCreationDate=function(t){var e=q;return"jsDate"===t&&(e=Y(q)),e};y.setCreationDate=function(t){return X(t),this},y.getCreationDate=function(t){return J(t)};var Z,$=y.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},tt=y.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},et=0,nt=[],rt=[],it=0,At=[],ot=[],st=!1,at=rt,lt=function(){et=0,it=0,rt=[],nt=[],At=[],$t=Xt(),te=Xt()};y.__private__.setCustomOutputDestination=function(t){st=!0,at=t};var ct=function(t){st||(at=t)};y.__private__.resetCustomOutputDestination=function(){st=!1,at=rt};var ut=y.__private__.out=function(t){return t=t.toString(),it+=t.length+1,at.push(t),at},ht=y.__private__.write=function(t){return ut(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},dt=y.__private__.getArrayBuffer=function(t){for(var e=t.length,n=new ArrayBuffer(e),r=new Uint8Array(n);e--;)r[e]=t.charCodeAt(e);return n},ft=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];y.__private__.getStandardFonts=function(){return ft};var pt=t.fontSize||16;y.__private__.setFontSize=y.setFontSize=function(t){return pt=_===x.ADVANCED?t/Et:t,this};var gt,mt=y.__private__.getFontSize=y.getFontSize=function(){return _===x.COMPAT?pt:pt*Et},wt=t.R2L||!1;y.__private__.setR2L=y.setR2L=function(t){return wt=t,this},y.__private__.getR2L=y.getR2L=function(){return wt};var yt,vt=y.__private__.setZoomMode=function(t){var e=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))gt=t;else if(isNaN(t)){if(-1===e.indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');gt=t}else gt=parseInt(t,10)};y.__private__.getZoomMode=function(){return gt};var bt,Bt=y.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');yt=t};y.__private__.getPageMode=function(){return yt};var Ct=y.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');bt=t};y.__private__.getLayoutMode=function(){return bt},y.__private__.setDisplayMode=y.setDisplayMode=function(t,e,n){return vt(t),Ct(e),Bt(n),this};var xt={title:"",subject:"",author:"",keywords:"",creator:""};y.__private__.getDocumentProperty=function(t){if(-1===Object.keys(xt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return xt[t]},y.__private__.getDocumentProperties=function(){return xt},y.__private__.setDocumentProperties=y.setProperties=y.setDocumentProperties=function(t){for(var e in xt)xt.hasOwnProperty(e)&&t[e]&&(xt[e]=t[e]);return this},y.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(xt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return xt[t]=e};var _t,Et,Ft,Lt,Nt,St={},Ut={},kt=[],Qt={},It={},Tt={},Ot={},Mt=null,Dt=0,Pt=[],Ht=new I(y),Rt=t.hotfixes||[],jt={},zt={},qt=[],Kt=function t(e,n,r,i,A,o){if(!(this instanceof t))return new t(e,n,r,i,A,o);isNaN(e)&&(e=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(i)&&(i=1),isNaN(A)&&(A=0),isNaN(o)&&(o=0),this._matrix=[e,n,r,i,A,o]};Object.defineProperty(Kt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Kt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Kt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Kt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Kt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Kt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Kt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Kt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Kt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Kt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Kt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Kt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Kt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Kt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Kt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Kt.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Kt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(N).join(t)},Kt.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,n=t.sx*this.shy+t.shy*this.sy,r=t.shx*this.sx+t.sy*this.shx,i=t.shx*this.shy+t.sy*this.sy,A=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new Kt(e,n,r,i,A,o)},Kt.prototype.decompose=function(){var t=this.sx,e=this.shy,n=this.shx,r=this.sy,i=this.tx,A=this.ty,o=Math.sqrt(t*t+e*e),s=(t/=o)*n+(e/=o)*r;n-=t*s,r-=e*s;var a=Math.sqrt(n*n+r*r);return s/=a,t*(r/=a)>16&255,r=l>>8&255,A=255&l}if(void 0===r||void 0===o&&n===r&&r===A)if("string"==typeof n)e=n+" "+s[0];else switch(t.precision){case 2:e=O(n/255)+" "+s[0];break;case 3:default:e=H(n/255)+" "+s[0]}else if(void 0===o||"object"===i()(o)){if(o&&!isNaN(o.a)&&0===o.a)return["1.","1.","1.",s[1]].join(" ");if("string"==typeof n)e=[n,r,A,s[1]].join(" ");else switch(t.precision){case 2:e=[O(n/255),O(r/255),O(A/255),s[1]].join(" ");break;default:case 3:e=[H(n/255),H(r/255),H(A/255),s[1]].join(" ")}}else if("string"==typeof n)e=[n,r,A,o,s[2]].join(" ");else switch(t.precision){case 2:e=[O(n),O(r),O(A),O(o),s[2]].join(" ");break;case 3:default:e=[H(n),H(r),H(A),H(o),s[2]].join(" ")}return e},re=y.__private__.getFilters=function(){return l},ie=y.__private__.putStream=function(t){var e=(t=t||{}).data||"",n=t.filters||re(),r=t.alreadyAppliedFilters||[],i=t.addLength1||!1,A=e.length,o=t.objectId,s=function(t){return t};if(null!==g&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==g&&(s=Ve.encryptor(o,0));var a={};!0===n&&(n=["FlateEncode"]);var l=t.additionalKeyValues||[],c=(a=void 0!==P.API.processDataByFilters?P.API.processDataByFilters(e,n):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==a.data.length&&(l.push({key:"Length",value:a.data.length}),!0===i&&l.push({key:"Length1",value:A})),0!=c.length)if(c.split("/").length-1==1)l.push({key:"Filter",value:c});else{l.push({key:"Filter",value:"["+c+"]"});for(var u=0;u>"),0!==a.data.length&&(ut("stream"),ut(s(a.data)),ut("endstream"))},Ae=y.__private__.putPage=function(t){var e=t.number,n=t.data,r=t.objId,i=t.contentsObjId;Jt(r,!0),ut("<>"),ut("endobj");var A=n.join("\n");return _===x.ADVANCED&&(A+="\nQ"),Jt(i,!0),ie({data:A,filters:re(),objectId:i}),ut("endobj"),r},oe=y.__private__.putPages=function(){var t,e,n=[];for(t=1;t<=Dt;t++)Pt[t].objId=Xt(),Pt[t].contentsObjId=Xt();for(t=1;t<=Dt;t++)n.push(Ae({number:t,data:ot[t],objId:Pt[t].objId,contentsObjId:Pt[t].contentsObjId,mediaBox:Pt[t].mediaBox,cropBox:Pt[t].cropBox,bleedBox:Pt[t].bleedBox,trimBox:Pt[t].trimBox,artBox:Pt[t].artBox,userUnit:Pt[t].userUnit,rootDictionaryObjId:$t,resourceDictionaryObjId:te}));Jt($t,!0),ut("<>"),ut("endobj"),Ht.publish("postPutPages")},se=function(t){Ht.publish("putFont",{font:t,out:ut,newObject:Yt,putStream:ie}),!0!==t.isAlreadyPutted&&(t.objectNumber=Yt(),ut("<<"),ut("/Type /Font"),ut("/BaseFont /"+Q(t.postScriptName)),ut("/Subtype /Type1"),"string"==typeof t.encoding&&ut("/Encoding /"+t.encoding),ut("/FirstChar 32"),ut("/LastChar 255"),ut(">>"),ut("endobj"))},ae=function(){for(var t in St)St.hasOwnProperty(t)&&(!1===m||!0===m&&w.hasOwnProperty(t))&&se(St[t])},le=function(t){t.objectNumber=Yt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[N(t.x),N(t.y),N(t.x+t.width),N(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var n=t.pages[1].join("\n");ie({data:n,additionalKeyValues:e,objectId:t.objectNumber}),ut("endobj")},ce=function(){for(var t in jt)jt.hasOwnProperty(t)&&le(jt[t])},ue=function(t,e){var n,r=[],i=1/(e-1);for(n=0;n<1;n+=i)r.push(n);if(r.push(1),0!=t[0].offset){var A={offset:0,color:t[0].color};t.unshift(A)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var s="",a=0,l=0;lt[a+1].offset;)a++;var c=t[a].offset,u=(n-c)/(t[a+1].offset-c),h=t[a].color,d=t[a+1].color;s+=tt(Math.round((1-u)*h[0]+u*d[0]).toString(16))+tt(Math.round((1-u)*h[1]+u*d[1]).toString(16))+tt(Math.round((1-u)*h[2]+u*d[2]).toString(16))}return s.trim()},he=function(t,e){e||(e=21);var n=Yt(),r=ue(t.colors,e),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+e+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ie({data:r,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:n}),ut("endobj"),t.objectNumber=Yt(),ut("<< /ShadingType "+t.type),ut("/ColorSpace /DeviceRGB");var A="/Coords ["+N(parseFloat(t.coords[0]))+" "+N(parseFloat(t.coords[1]))+" ";2===t.type?A+=N(parseFloat(t.coords[2]))+" "+N(parseFloat(t.coords[3])):A+=N(parseFloat(t.coords[2]))+" "+N(parseFloat(t.coords[3]))+" "+N(parseFloat(t.coords[4]))+" "+N(parseFloat(t.coords[5])),ut(A+="]"),t.matrix&&ut("/Matrix ["+t.matrix.toString()+"]"),ut("/Function "+n+" 0 R"),ut("/Extend [true true]"),ut(">>"),ut("endobj")},de=function(t,e){var n=Xt(),r=Yt();e.push({resourcesOid:n,objectOid:r}),t.objectNumber=r;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+t.boundingBox.map(N).join(" ")+"]"}),i.push({key:"XStep",value:N(t.xStep)}),i.push({key:"YStep",value:N(t.yStep)}),i.push({key:"Resources",value:n+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),ie({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),ut("endobj")},fe=function(t){var e;for(e in Qt)Qt.hasOwnProperty(e)&&(Qt[e]instanceof M?he(Qt[e]):Qt[e]instanceof D&&de(Qt[e],t))},pe=function(t){for(var e in t.objectNumber=Yt(),ut("<<"),t)switch(e){case"opacity":ut("/ca "+O(t[e]));break;case"stroke-opacity":ut("/CA "+O(t[e]))}ut(">>"),ut("endobj")},ge=function(){var t;for(t in Tt)Tt.hasOwnProperty(t)&&pe(Tt[t])},me=function(){for(var t in ut("/XObject <<"),jt)jt.hasOwnProperty(t)&&jt[t].objectNumber>=0&&ut("/"+t+" "+jt[t].objectNumber+" 0 R");Ht.publish("putXobjectDict"),ut(">>")},we=function(){Ve.oid=Yt(),ut("<<"),ut("/Filter /Standard"),ut("/V "+Ve.v),ut("/R "+Ve.r),ut("/U <"+Ve.toHexString(Ve.U)+">"),ut("/O <"+Ve.toHexString(Ve.O)+">"),ut("/P "+Ve.P),ut(">>"),ut("endobj")},ye=function(){for(var t in ut("/Font <<"),St)St.hasOwnProperty(t)&&(!1===m||!0===m&&w.hasOwnProperty(t))&&ut("/"+t+" "+St[t].objectNumber+" 0 R");ut(">>")},ve=function(){if(Object.keys(Qt).length>0){for(var t in ut("/Shading <<"),Qt)Qt.hasOwnProperty(t)&&Qt[t]instanceof M&&Qt[t].objectNumber>=0&&ut("/"+t+" "+Qt[t].objectNumber+" 0 R");Ht.publish("putShadingPatternDict"),ut(">>")}},be=function(t){if(Object.keys(Qt).length>0){for(var e in ut("/Pattern <<"),Qt)Qt.hasOwnProperty(e)&&Qt[e]instanceof y.TilingPattern&&Qt[e].objectNumber>=0&&Qt[e].objectNumber>")}},Be=function(){if(Object.keys(Tt).length>0){var t;for(t in ut("/ExtGState <<"),Tt)Tt.hasOwnProperty(t)&&Tt[t].objectNumber>=0&&ut("/"+t+" "+Tt[t].objectNumber+" 0 R");Ht.publish("putGStateDict"),ut(">>")}},Ce=function(t){Jt(t.resourcesOid,!0),ut("<<"),ut("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ye(),ve(),be(t.objectOid),Be(),me(),ut(">>"),ut("endobj")},xe=function(){var t=[];ae(),ge(),ce(),fe(t),Ht.publish("putResources"),t.forEach(Ce),Ce({resourcesOid:te,objectOid:Number.MAX_SAFE_INTEGER}),Ht.publish("postPutResources")},_e=function(){Ht.publish("putAdditionalObjects");for(var t=0;t>8&&(a=!0);t=s.join("")}for(n=t.length;void 0===a&&0!==n;)t.charCodeAt(n-1)>>8&&(a=!0),n--;if(!a)return t;for(s=e.noBOM?[]:[254,255],n=0,r=t.length;n>8)>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(c),s.push(l-(c<<8))}return String.fromCharCode.apply(void 0,s)},Ue=y.__private__.pdfEscape=y.pdfEscape=function(t,e){return Se(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ke=y.__private__.beginPage=function(t){ot[++Dt]=[],Pt[Dt]={objId:0,contentsObjId:0,userUnit:Number(c),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},Te(Dt),ct(ot[Z])},Qe=function(t,e){var r,i,o;switch(n=e||n,"string"==typeof t&&(r=C(t.toLowerCase()),Array.isArray(r)&&(i=r[0],o=r[1])),Array.isArray(t)&&(i=t[0]*Et,o=t[1]*Et),isNaN(i)&&(i=A[0],o=A[1]),(i>14400||o>14400)&&(a.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),o=Math.min(14400,o)),A=[i,o],n.substr(0,1)){case"l":o>i&&(A=[o,i]);break;case"p":i>o&&(A=[o,i])}ke(A),pn(dn),ut(Cn),0!==Nn&&ut(Nn+" J"),0!==Sn&&ut(Sn+" j"),Ht.publish("addPage",{pageNumber:Dt})},Ie=function(t){t>0&&t<=Dt&&(ot.splice(t,1),Pt.splice(t,1),Dt--,Z>Dt&&(Z=Dt),this.setPage(Z))},Te=function(t){t>0&&t<=Dt&&(Z=t)},Oe=y.__private__.getNumberOfPages=y.getNumberOfPages=function(){return ot.length-1},Me=function(t,e,n){var r,i=void 0;return n=n||{},t=void 0!==t?t:St[_t].fontName,e=void 0!==e?e:St[_t].fontStyle,r=t.toLowerCase(),void 0!==Ut[r]&&void 0!==Ut[r][e]?i=Ut[r][e]:void 0!==Ut[t]&&void 0!==Ut[t][e]?i=Ut[t][e]:!1===n.disableWarning&&a.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),i||n.noFallback||null==(i=Ut.times[e])&&(i=Ut.times.normal),i},De=y.__private__.putInfo=function(){var t=Yt(),e=function(t){return t};for(var n in null!==g&&(e=Ve.encryptor(t,0)),ut("<<"),ut("/Producer ("+Ue(e("jsPDF "+P.version))+")"),xt)xt.hasOwnProperty(n)&&xt[n]&&ut("/"+n.substr(0,1).toUpperCase()+n.substr(1)+" ("+Ue(e(xt[n]))+")");ut("/CreationDate ("+Ue(e(q))+")"),ut(">>"),ut("endobj")},Pe=y.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||$t;switch(Yt(),ut("<<"),ut("/Type /Catalog"),ut("/Pages "+e+" 0 R"),gt||(gt="fullwidth"),gt){case"fullwidth":ut("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ut("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ut("/OpenAction [3 0 R /Fit]");break;case"original":ut("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+gt;"%"===n.substr(n.length-1)&&(gt=parseInt(gt)/100),"number"==typeof gt&&ut("/OpenAction [3 0 R /XYZ null null "+O(gt)+"]")}switch(bt||(bt="continuous"),bt){case"continuous":ut("/PageLayout /OneColumn");break;case"single":ut("/PageLayout /SinglePage");break;case"two":case"twoleft":ut("/PageLayout /TwoColumnLeft");break;case"tworight":ut("/PageLayout /TwoColumnRight")}yt&&ut("/PageMode /"+yt),Ht.publish("putCatalog"),ut(">>"),ut("endobj")},He=y.__private__.putTrailer=function(){ut("trailer"),ut("<<"),ut("/Size "+(et+1)),ut("/Root "+et+" 0 R"),ut("/Info "+(et-1)+" 0 R"),null!==g&&ut("/Encrypt "+Ve.oid+" 0 R"),ut("/ID [ <"+K+"> <"+K+"> ]"),ut(">>")},Re=y.__private__.putHeader=function(){ut("%PDF-"+v),ut("%ºß¬à")},je=y.__private__.putXRef=function(){var t="0000000000";ut("xref"),ut("0 "+(et+1)),ut("0000000000 65535 f ");for(var e=1;e<=et;e++)"function"==typeof nt[e]?ut((t+nt[e]()).slice(-10)+" 00000 n "):void 0!==nt[e]?ut((t+nt[e]).slice(-10)+" 00000 n "):ut("0000000000 00000 n ")},ze=y.__private__.buildDocument=function(){lt(),ct(rt),Ht.publish("buildDocument"),Re(),oe(),_e(),xe(),null!==g&&we(),De(),Pe();var t=it;return je(),He(),ut("startxref"),ut(""+t),ut("%%EOF"),ct(ot[Z]),rt.join("\n")},qe=y.__private__.getBlob=function(t){return new Blob([dt(t)],{type:"application/pdf"})},Ke=y.output=y.__private__.output=Ne((function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return ze();case"save":y.save(e.filename);break;case"arraybuffer":return dt(ze());case"blob":return qe(ze());case"bloburi":case"bloburl":if(void 0!==o.URL&&"function"==typeof o.URL.createObjectURL)return o.URL&&o.URL.createObjectURL(qe(ze()))||void 0;a.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var n="",r=ze();try{n=d(r)}catch(t){n=d(unescape(encodeURIComponent(r)))}return"data:application/pdf;filename="+e.filename+";base64,"+n;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(o)){var i="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",A=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';e.pdfObjectUrl&&(i=e.pdfObjectUrl,A="");var s='