UNPKG

formio-export

Version:
1 lines 478 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define("formio-export",["_"],t):"object"==typeof exports?exports["formio-export"]=t(require("lodash")):e["formio-export"]=t(e._)}(window,function(e){return function(e){var t={};function A(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,A),r.l=!0,r.exports}return A.m=e,A.c=t,A.d=function(e,t,n){A.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},A.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},A.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return A.d(t,"a",t),t},A.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},A.p="",A(A.s=60)}([function(t,A){t.exports=e},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),r=s(A(0)),o=s(A(2)),i=s(A(9)),a=A(58);function s(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(t,A){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(this instanceof e))return new e(t,A);if(this.type="",this._options=r.default.cloneDeep(n),this._value=null,this._dims={},this._baseWidth=1,this._baseHeight=1,r.default.isObject(t)&&t.hasOwnProperty("type")){var i=r.default.cloneDeep(t);for(var a in i)this[a]=i[a]}if(null===A)return this;r.default.isPlainObject(A)?(this._value=o.default.getValue({data:A},this.key),r.default.isNil(this._value)&&!this.input&&(this._value=r.default.cloneDeep(A))):this._value=A}return n(e,[{key:"getLabel",value:function(){return this.legend||this.title||this.label||this.key}},{key:"emptyValue",value:function(){return r.default.isNil(this._options.emptyValue)?"":this._options.emptyValue}},{key:"toHtml",value:function(e){return(0,a.toHtml)(e,this)}},{key:"getDimensions",value:function(){return this._dims=(0,a.getDimensions)(this),this._dims}},{key:"hasComponents",value:function(){var e=this.columns&&Array.isArray(this.columns),t=this.rows&&Array.isArray(this.rows),A=this.components&&Array.isArray(this.components);return e||t||A}},{key:"updateDimensions",value:function(){this._width=1,this._height=1}},{key:"createComponent",value:function(e,t,A){return i.default.create(e,t,A)}},{key:"formatValue",value:function(){return r.default.isNil(this._value)?this.emptyValue():this._value.toString()}},{key:"isLayoutComponent",value:function(){return!1}}]),e}();t.default=c,e.exports=t.default},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=A(0),i=(n=o)&&n.__esModule?n:{default:n};var a={verifyProperties:function(e,t){return t=i.default.isPlainObject(t)?t:{},e=i.default.isPlainObject(e)?e:{},i.default.forEach(t,function(t,A){if(t.hasOwnProperty("default")&&!e.hasOwnProperty(A)&&(e[A]=t.default),t.required&&i.default.isNil(e[A]))throw new Error("[FormioExportUtils] invalid property ("+A+" is required)");if(t.hasOwnProperty("type")&&e.hasOwnProperty(A)&&!!!i.default.find(i.default.isArray(t.type)?t.type:[t.type],function(t){return a.isOfType(e[A],t)}))throw new Error("[FormioExportUtils] invalid property ("+A+" type is invalid)")}),e},isOfType:function(e,t){switch(t){case null:return i.default.isNull(e);case void 0:return i.default.isUndefined(e);case String:return i.default.isString(e);case Number:return i.default.isNumber(e);case Boolean:return i.default.isBoolean(e);case Array:return i.default.isArray(e);case Object:return i.default.isPlainObject(e);case Element:return i.default.isElement(e)||i.default.isObject(e)&&e.nodeType>0;case Function:return i.default.isFunction(e);case Date:return i.default.isDate(e);case RegExp:return i.default.isRegExp(e);case Error:return i.default.isError(e);case Symbol:return i.default.isSymbol(e);default:return console.warn("[FormioExportUtils] type not implemented"),!1}},isFormioForm:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i.default.isPlainObject(e)&&i.default.isArray(e.components)&&"form"===e.display},isFormioWizard:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i.default.isPlainObject(e)&&i.default.isArray(e.components)&&"wizard"===e.display},isFormioSubmission:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i.default.isPlainObject(e)&&i.default.isPlainObject(e.data)&&e.hasOwnProperty("_id")},getValue:function(e,t){var A=function e(A){if(i.default.isPlainObject(A)){if(i.default.has(A,t))return A[t];var n=null;return i.default.forOwn(A,function(t){var A=e(t);return!!i.default.isNil(A)||(n=A,!1)}),n}return null};return a.isFormioSubmission(e)?A(e.data):A(e)},interpolate:function(e,t){try{return i.default.template(e,{evaluate:/\{%(.+?)%\}/g,interpolate:/\{\{(.+?)\}\}/g,escape:/\{\{\{(.+?)\}\}\}/g})(t)}catch(A){return console.warn("Error interpolating template",A,e,t),null}},eachComponent:function(e,t,A,n,r){e&&(n=n||"",e.forEach(function(e){var o=e.columns&&Array.isArray(e.columns),s=e.rows&&Array.isArray(e.rows),c=e.components&&Array.isArray(e.components),l=!1,u=e.key?n?n+"."+e.key:e.key:"";r&&(e.parent=i.default.clone(r),delete e.parent.components,delete e.parent.componentMap,delete e.parent.columns,delete e.parent.rows),(A||e.tree||!o&&!s&&!c)&&(l=t(e,u));var f=function(){return e.key&&(["datagrid","container","editgrid"].includes(e.type)||e.tree)?u:e.key&&"form"===e.type?u+".data":n};l||(o?e.columns.forEach(function(n){return a.eachComponent(n.components,t,A,f(),r?e:null)}):s?e.rows.forEach(function(n){return n.forEach(function(n){return a.eachComponent(n.components,t,A,f(),r?e:null)})}):c&&a.eachComponent(e.components,t,A,f(),r?e:null))}))},createElement:function(e){for(var t=arguments.length,A=Array(t>1?t-1:0),n=1;n<t;n++)A[n-1]=arguments[n];var o=document.createElement(e),a={};return A[0]&&"object"===r(A[0])&&(a=A[0],A=A.slice(1)),a.style&&"object"===r(a.style)&&(a.style=i.default.map(a.style,function(e,t){return t+":"+e}).join(";")),a.hasOwnProperty("innerHTML")?(o.innerHTML=a.innerHTML,delete a.innerHTML):i.default.forEach(A,function(e){i.default.isString(e)?o.appendChild(document.createTextNode(e)):(i.default.isElement(e)||i.default.isObject(e)&&e.nodeType>0)&&o.appendChild(e)}),i.default.forEach(a,function(e,t){o.setAttribute(t,e)}),o}};t.default=a,e.exports=t.default},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),r=i(A(0)),o=i(A(1));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(e,A,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,A,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"formatValue",value:function(){return r.default.isEmpty(this._value)?this.emptyValue():r.default.isString(this._value)?this._value:this._value.toString()}}]),t}();t.default=a,e.exports=t.default},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),r=a(A(0)),o=a(A(1)),i=A(32);function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,A,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,A,n));if(o.components&&r.default.isArray(o.components)){var i=[];r.default.forEach(o.components,function(e){i.push(o.createComponent(e,A,n))}),o.components=i}return o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"toHtml",value:function(e){return(0,i.toHtml)(e,this)}}]),t}();t.default=s,e.exports=t.default},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=A(4),o=(n=r)&&n.__esModule?n:{default:n};var i=function(e){function t(e,A,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,A,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),t}();t.default=i,e.exports=t.default},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),o=A(1),i=(n=o)&&n.__esModule?n:{default:n},a=A(35);var s=function(e){function t(e,A,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,A,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),r(t,[{key:"toHtml",value:function(e){return(0,a.toHtml)(e,this)}}]),t}();t.default=s,e.exports=t.default},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),r=s(A(0)),o=s(A(2)),i=s(A(1)),a=A(41);function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,A,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,A,n));return r.multiple||(r._value=[r._value]),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toHtml",value:function(e){return(0,a.toHtml)(e,this)}},{key:"formatValues",value:function(){var e=this;if(r.default.isNil(this._value))return this.emptyValue();var t=[];return r.default.forEach(this._value,function(A){t.push(e.formatValue(A))}),t}},{key:"formatValue",value:function(e){if(r.default.isNil(e))return this.emptyValue();switch(this.dataSrc){case"url":return e;case"custom":case"resource":return r.default.isPlainObject(e)?o.default.interpolate(this.template,{item:e}):e;case"values":case"json":var t=this.valueProperty||"value",A=r.default.find(this.data[this.dataSrc],function(A){return A[t]===e});return r.default.isPlainObject(A)?o.default.interpolate(this.template,{item:A}):e;default:return e}}}]),t}();t.default=c,e.exports=t.default},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),r=i(A(0)),o=i(A(1));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(e,A,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,A,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"formatValue",value:function(){return r.default.isNil(this._value)?this.emptyValue():this._value.toLocaleString()}}]),t}();t.default=a,e.exports=t.default},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=H(A(3)),r=H(A(55)),o=H(A(54)),i=H(A(53)),a=H(A(52)),s=H(A(8)),c=H(A(51)),l=H(A(50)),u=H(A(49)),f=H(A(48)),d=H(A(47)),h=H(A(46)),p=H(A(45)),g=H(A(44)),B=H(A(7)),w=H(A(39)),m=H(A(38)),y=H(A(6)),v=H(A(33)),b=H(A(4)),Q=H(A(30)),C=H(A(26)),E=H(A(25)),U=H(A(21)),F=H(A(5)),_=H(A(17)),x=H(A(16));function H(e){return e&&e.__esModule?e:{default:e}}var T={textfield:n.default,textarea:r.default,email:o.default,password:i.default,phoneNumber:a.default,number:s.default,currency:c.default,datetime:l.default,day:u.default,time:f.default,address:d.default,checkbox:h.default,radio:p.default,selectboxes:g.default,select:B.default,resource:w.default,survey:m.default,file:y.default,signature:v.default,container:b.default,datagrid:Q.default,editgrid:C.default,columns:U.default,panel:F.default,fieldset:_.default,unknown:x.default,form:E.default,create:function(e,t,A){return e?T.hasOwnProperty(e.type)?new T[e.type](e,t,A):new x.default(e,t,A):null}};t.default=T,e.exports=t.default},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(function(e,t){try{throw new Error("[FormioExport] method not implemented")}catch(e){console.error(e),t(e)}})},e.exports=t.default},function(e,t,A){var n;"undefined"!=typeof self&&self,n=function(){return function(e){var t={};function A(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,A),r.l=!0,r.exports}return A.m=e,A.c=t,A.d=function(e,t,n){A.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},A.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return A.d(t,"a",t),t},A.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},A.p="",A(A.s=30)}([function(e,t){var A,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(A===setTimeout)return setTimeout(e,0);if((A===o||!A)&&setTimeout)return A=setTimeout,setTimeout(e,0);try{return A(e,0)}catch(t){try{return A.call(null,e,0)}catch(t){return A.call(this,e,0)}}}!function(){try{A="function"==typeof setTimeout?setTimeout:o}catch(e){A=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,c=[],l=!1,u=-1;function f(){l&&s&&(l=!1,s.length?c=s.concat(c):u=-1,c.length&&d())}function d(){if(!l){var e=a(f);l=!0;for(var t=c.length;t;){for(s=c,c=[];++u<t;)s&&s[u].run();u=-1,t=c.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)t[A-1]=arguments[A];c.push(new h(e,t)),1!==c.length||l||a(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var A=[],n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(A.push(i.value),!t||A.length!==t);n=!0);}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return A}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}();var o=/^#([a-f0-9]{3})$/i,i=function(e){var t=e.match(o);return!!t&&[parseInt(t[1][0]+t[1][0],16),parseInt(t[1][1]+t[1][1],16),parseInt(t[1][2]+t[1][2],16),null]},a=/^#([a-f0-9]{6})$/i,s=function(e){var t=e.match(a);return!!t&&[parseInt(t[1].substring(0,2),16),parseInt(t[1].substring(2,4),16),parseInt(t[1].substring(4,6),16),null]},c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,l=function(e){var t=e.match(c);return!!t&&[Number(t[1]),Number(t[2]),Number(t[3]),null]},u=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/,f=function(e){var t=e.match(u);return!!(t&&t.length>4)&&[Number(t[1]),Number(t[2]),Number(t[3]),Number(t[4])]},d=function(e){return[Math.min(e[0],255),Math.min(e[1],255),Math.min(e[2],255),e.length>3?e[3]:null]},h=function(e){var t=g[e.toLowerCase()];return t||!1},p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var A=Array.isArray(t)?d(t):i(t)||l(t)||f(t)||h(t)||s(t)||[0,0,0,null],r=n(A,4),o=r[0],a=r[1],c=r[2],u=r[3];this.r=o,this.g=a,this.b=c,this.a=u}return r(e,[{key:"isTransparent",value:function(){return 0===this.a}},{key:"toString",value:function(){return null!==this.a&&1!==this.a?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":"rgb("+this.r+","+this.g+","+this.b+")"}}]),e}();t.default=p;var g={transparent:[0,0,0,0],aliceblue:[240,248,255,null],antiquewhite:[250,235,215,null],aqua:[0,255,255,null],aquamarine:[127,255,212,null],azure:[240,255,255,null],beige:[245,245,220,null],bisque:[255,228,196,null],black:[0,0,0,null],blanchedalmond:[255,235,205,null],blue:[0,0,255,null],blueviolet:[138,43,226,null],brown:[165,42,42,null],burlywood:[222,184,135,null],cadetblue:[95,158,160,null],chartreuse:[127,255,0,null],chocolate:[210,105,30,null],coral:[255,127,80,null],cornflowerblue:[100,149,237,null],cornsilk:[255,248,220,null],crimson:[220,20,60,null],cyan:[0,255,255,null],darkblue:[0,0,139,null],darkcyan:[0,139,139,null],darkgoldenrod:[184,134,11,null],darkgray:[169,169,169,null],darkgreen:[0,100,0,null],darkgrey:[169,169,169,null],darkkhaki:[189,183,107,null],darkmagenta:[139,0,139,null],darkolivegreen:[85,107,47,null],darkorange:[255,140,0,null],darkorchid:[153,50,204,null],darkred:[139,0,0,null],darksalmon:[233,150,122,null],darkseagreen:[143,188,143,null],darkslateblue:[72,61,139,null],darkslategray:[47,79,79,null],darkslategrey:[47,79,79,null],darkturquoise:[0,206,209,null],darkviolet:[148,0,211,null],deeppink:[255,20,147,null],deepskyblue:[0,191,255,null],dimgray:[105,105,105,null],dimgrey:[105,105,105,null],dodgerblue:[30,144,255,null],firebrick:[178,34,34,null],floralwhite:[255,250,240,null],forestgreen:[34,139,34,null],fuchsia:[255,0,255,null],gainsboro:[220,220,220,null],ghostwhite:[248,248,255,null],gold:[255,215,0,null],goldenrod:[218,165,32,null],gray:[128,128,128,null],green:[0,128,0,null],greenyellow:[173,255,47,null],grey:[128,128,128,null],honeydew:[240,255,240,null],hotpink:[255,105,180,null],indianred:[205,92,92,null],indigo:[75,0,130,null],ivory:[255,255,240,null],khaki:[240,230,140,null],lavender:[230,230,250,null],lavenderblush:[255,240,245,null],lawngreen:[124,252,0,null],lemonchiffon:[255,250,205,null],lightblue:[173,216,230,null],lightcoral:[240,128,128,null],lightcyan:[224,255,255,null],lightgoldenrodyellow:[250,250,210,null],lightgray:[211,211,211,null],lightgreen:[144,238,144,null],lightgrey:[211,211,211,null],lightpink:[255,182,193,null],lightsalmon:[255,160,122,null],lightseagreen:[32,178,170,null],lightskyblue:[135,206,250,null],lightslategray:[119,136,153,null],lightslategrey:[119,136,153,null],lightsteelblue:[176,196,222,null],lightyellow:[255,255,224,null],lime:[0,255,0,null],limegreen:[50,205,50,null],linen:[250,240,230,null],magenta:[255,0,255,null],maroon:[128,0,0,null],mediumaquamarine:[102,205,170,null],mediumblue:[0,0,205,null],mediumorchid:[186,85,211,null],mediumpurple:[147,112,219,null],mediumseagreen:[60,179,113,null],mediumslateblue:[123,104,238,null],mediumspringgreen:[0,250,154,null],mediumturquoise:[72,209,204,null],mediumvioletred:[199,21,133,null],midnightblue:[25,25,112,null],mintcream:[245,255,250,null],mistyrose:[255,228,225,null],moccasin:[255,228,181,null],navajowhite:[255,222,173,null],navy:[0,0,128,null],oldlace:[253,245,230,null],olive:[128,128,0,null],olivedrab:[107,142,35,null],orange:[255,165,0,null],orangered:[255,69,0,null],orchid:[218,112,214,null],palegoldenrod:[238,232,170,null],palegreen:[152,251,152,null],paleturquoise:[175,238,238,null],palevioletred:[219,112,147,null],papayawhip:[255,239,213,null],peachpuff:[255,218,185,null],peru:[205,133,63,null],pink:[255,192,203,null],plum:[221,160,221,null],powderblue:[176,224,230,null],purple:[128,0,128,null],rebeccapurple:[102,51,153,null],red:[255,0,0,null],rosybrown:[188,143,143,null],royalblue:[65,105,225,null],saddlebrown:[139,69,19,null],salmon:[250,128,114,null],sandybrown:[244,164,96,null],seagreen:[46,139,87,null],seashell:[255,245,238,null],sienna:[160,82,45,null],silver:[192,192,192,null],skyblue:[135,206,235,null],slateblue:[106,90,205,null],slategray:[112,128,144,null],slategrey:[112,128,144,null],snow:[255,250,250,null],springgreen:[0,255,127,null],steelblue:[70,130,180,null],tan:[210,180,140,null],teal:[0,128,128,null],thistle:[216,191,216,null],tomato:[255,99,71,null],turquoise:[64,224,208,null],violet:[238,130,238,null],wheat:[245,222,179,null],white:[255,255,255,null],whitesmoke:[245,245,245,null],yellow:[255,255,0,null],yellowgreen:[154,205,50,null]};t.TRANSPARENT=new p([0,0,0,0])},function(e,t,A){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateLengthFromValueWithUnit=t.LENGTH_TYPE=void 0;var n,r=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),o=A(4);(n=o)&&n.__esModule;var i=t.LENGTH_TYPE={PX:0,PERCENTAGE:1},a=function(){function t(A){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="%"===A.substr(A.length-1)?i.PERCENTAGE:i.PX;var n=parseFloat(A);"production"!==e.env.NODE_ENV&&isNaN(n)&&console.error('Invalid value given for Length: "'+A+'"'),this.value=isNaN(n)?0:n}return r(t,[{key:"isPercentage",value:function(){return this.type===i.PERCENTAGE}},{key:"getAbsoluteValue",value:function(e){return this.isPercentage()?e*(this.value/100):this.value}}],[{key:"create",value:function(e){return new t(e)}}]),t}();t.default=a;t.calculateLengthFromValueWithUnit=function(e,t,A){switch(A){case"px":case"%":return new a(t+A);case"em":case"rem":var n=new a(t);return n.value*="em"===A?parseFloat(e.style.font.fontSize):function e(t){var A=t.parent;return A?e(A):parseFloat(t.style.font.fontSize)}(e),n;default:return new a("0")}}}).call(t,A(0))},function(e,t,A){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.parseBoundCurves=t.calculatePaddingBoxPath=t.calculateBorderBoxPath=t.parsePathForBorder=t.parseDocumentSize=t.calculateContentBox=t.calculatePaddingBox=t.parseBounds=t.Bounds=void 0;var n=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),r=i(A(9)),o=i(A(40));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.Bounds=function(){function e(t,A,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.left=t,this.top=A,this.width=n,this.height=r}return n(e,null,[{key:"fromClientRect",value:function(t,A,n){return new e(t.left+A,t.top+n,t.width,t.height)}}]),e}(),s=(t.parseBounds=function(e,t,A){return a.fromClientRect(e.getBoundingClientRect(),t,A)},t.calculatePaddingBox=function(e,t){return new a(e.left+t[3].borderWidth,e.top+t[0].borderWidth,e.width-(t[1].borderWidth+t[3].borderWidth),e.height-(t[0].borderWidth+t[2].borderWidth))},t.calculateContentBox=function(e,t,A){var n=t[0].value,r=t[1].value,o=t[2].value,i=t[3].value;return new a(e.left+i+A[3].borderWidth,e.top+n+A[0].borderWidth,e.width-(A[1].borderWidth+A[3].borderWidth+i+r),e.height-(A[0].borderWidth+A[2].borderWidth+n+o))},t.parseDocumentSize=function(t){var A=t.body,n=t.documentElement;if(!A||!n)throw new Error("production"!==e.env.NODE_ENV?"Unable to get document size":"");var r=Math.max(Math.max(A.scrollWidth,n.scrollWidth),Math.max(A.offsetWidth,n.offsetWidth),Math.max(A.clientWidth,n.clientWidth)),o=Math.max(Math.max(A.scrollHeight,n.scrollHeight),Math.max(A.offsetHeight,n.offsetHeight),Math.max(A.clientHeight,n.clientHeight));return new a(0,0,r,o)},t.parsePathForBorder=function(e,t){switch(t){case 0:return s(e.topLeftOuter,e.topLeftInner,e.topRightOuter,e.topRightInner);case 1:return s(e.topRightOuter,e.topRightInner,e.bottomRightOuter,e.bottomRightInner);case 2:return s(e.bottomRightOuter,e.bottomRightInner,e.bottomLeftOuter,e.bottomLeftInner);case 3:default:return s(e.bottomLeftOuter,e.bottomLeftInner,e.topLeftOuter,e.topLeftInner)}},function(e,t,A,n){var r=[];return e instanceof o.default?r.push(e.subdivide(.5,!1)):r.push(e),A instanceof o.default?r.push(A.subdivide(.5,!0)):r.push(A),n instanceof o.default?r.push(n.subdivide(.5,!0).reverse()):r.push(n),t instanceof o.default?r.push(t.subdivide(.5,!1).reverse()):r.push(t),r}),c=(t.calculateBorderBoxPath=function(e){return[e.topLeftOuter,e.topRightOuter,e.bottomRightOuter,e.bottomLeftOuter]},t.calculatePaddingBoxPath=function(e){return[e.topLeftInner,e.topRightInner,e.bottomRightInner,e.bottomLeftInner]},t.parseBoundCurves=function(e,t,A){var n=A[c.TOP_LEFT][0].getAbsoluteValue(e.width),o=A[c.TOP_LEFT][1].getAbsoluteValue(e.height),i=A[c.TOP_RIGHT][0].getAbsoluteValue(e.width),a=A[c.TOP_RIGHT][1].getAbsoluteValue(e.height),s=A[c.BOTTOM_RIGHT][0].getAbsoluteValue(e.width),u=A[c.BOTTOM_RIGHT][1].getAbsoluteValue(e.height),f=A[c.BOTTOM_LEFT][0].getAbsoluteValue(e.width),d=A[c.BOTTOM_LEFT][1].getAbsoluteValue(e.height),h=[];h.push((n+i)/e.width),h.push((f+s)/e.width),h.push((o+d)/e.height),h.push((a+u)/e.height);var p=Math.max.apply(Math,h);p>1&&(n/=p,o/=p,i/=p,a/=p,s/=p,u/=p,f/=p,d/=p);var g=e.width-i,B=e.height-u,w=e.width-s,m=e.height-d;return{topLeftOuter:n>0||o>0?l(e.left,e.top,n,o,c.TOP_LEFT):new r.default(e.left,e.top),topLeftInner:n>0||o>0?l(e.left+t[3].borderWidth,e.top+t[0].borderWidth,Math.max(0,n-t[3].borderWidth),Math.max(0,o-t[0].borderWidth),c.TOP_LEFT):new r.default(e.left+t[3].borderWidth,e.top+t[0].borderWidth),topRightOuter:i>0||a>0?l(e.left+g,e.top,i,a,c.TOP_RIGHT):new r.default(e.left+e.width,e.top),topRightInner:i>0||a>0?l(e.left+Math.min(g,e.width+t[3].borderWidth),e.top+t[0].borderWidth,g>e.width+t[3].borderWidth?0:i-t[3].borderWidth,a-t[0].borderWidth,c.TOP_RIGHT):new r.default(e.left+e.width-t[1].borderWidth,e.top+t[0].borderWidth),bottomRightOuter:s>0||u>0?l(e.left+w,e.top+B,s,u,c.BOTTOM_RIGHT):new r.default(e.left+e.width,e.top+e.height),bottomRightInner:s>0||u>0?l(e.left+Math.min(w,e.width-t[3].borderWidth),e.top+Math.min(B,e.height+t[0].borderWidth),Math.max(0,s-t[1].borderWidth),u-t[2].borderWidth,c.BOTTOM_RIGHT):new r.default(e.left+e.width-t[1].borderWidth,e.top+e.height-t[2].borderWidth),bottomLeftOuter:f>0||d>0?l(e.left,e.top+m,f,d,c.BOTTOM_LEFT):new r.default(e.left,e.top+e.height),bottomLeftInner:f>0||d>0?l(e.left+t[3].borderWidth,e.top+m,Math.max(0,f-t[3].borderWidth),d-t[2].borderWidth,c.BOTTOM_LEFT):new r.default(e.left+t[3].borderWidth,e.top+e.height-t[2].borderWidth)}},{TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_RIGHT:2,BOTTOM_LEFT:3}),l=function(e,t,A,n,i){var a=(Math.sqrt(2)-1)/3*4,s=A*a,l=n*a,u=e+A,f=t+n;switch(i){case c.TOP_LEFT:return new o.default(new r.default(e,f),new r.default(e,f-l),new r.default(u-s,t),new r.default(u,t));case c.TOP_RIGHT:return new o.default(new r.default(e,t),new r.default(e+s,t),new r.default(u,f-l),new r.default(u,f));case c.BOTTOM_RIGHT:return new o.default(new r.default(u,t),new r.default(u,t+l),new r.default(e+s,f),new r.default(e,f));case c.BOTTOM_LEFT:default:return new o.default(new r.default(u,f),new r.default(u-s,f),new r.default(e,t+l),new r.default(e,t))}}}).call(t,A(0))},function(e,t,A){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),o=A(1),i=(n=o)&&n.__esModule?n:{default:n},a=A(5),s=A(6),c=A(14),l=A(41),u=A(42),f=A(43),d=A(44),h=A(45),p=A(46),g=A(10),B=A(47),w=A(48),m=A(20),y=A(19),v=A(21),b=A(13),Q=A(49),C=A(22),E=A(50),U=A(51),F=A(52),_=A(53),x=A(3),H=A(23),T=A(16);var O=["INPUT","TEXTAREA","SELECT"],I=function(){function t(A,n,r,o){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.parent=n,this.tagName=A.tagName,this.index=o,this.childNodes=[],this.listItems=[],"number"==typeof A.start&&(this.listStart=A.start);var I=A.ownerDocument.defaultView,S=I.pageXOffset,P=I.pageYOffset,k=I.getComputedStyle(A,null),D=(0,u.parseDisplay)(k.display),M="radio"===A.type||"checkbox"===A.type,L=(0,v.parsePosition)(k.position);if(this.style={background:M?H.INPUT_BACKGROUND:(0,s.parseBackground)(k,r),border:M?H.INPUT_BORDERS:(0,c.parseBorder)(k),borderRadius:(A instanceof I.HTMLInputElement||A instanceof HTMLInputElement)&&M?(0,H.getInputBorderRadius)(A):(0,l.parseBorderRadius)(k),color:M?H.INPUT_COLOR:new i.default(k.color),display:D,float:(0,f.parseCSSFloat)(k.float),font:(0,d.parseFont)(k),letterSpacing:(0,h.parseLetterSpacing)(k.letterSpacing),listStyle:D===u.DISPLAY.LIST_ITEM?(0,g.parseListStyle)(k):null,lineBreak:(0,p.parseLineBreak)(k.lineBreak),margin:(0,B.parseMargin)(k),opacity:parseFloat(k.opacity),overflow:-1===O.indexOf(A.tagName)?(0,w.parseOverflow)(k.overflow):w.OVERFLOW.HIDDEN,overflowWrap:(0,m.parseOverflowWrap)(k.overflowWrap?k.overflowWrap:k.wordWrap),padding:(0,y.parsePadding)(k),position:L,textDecoration:(0,b.parseTextDecoration)(k),textShadow:(0,Q.parseTextShadow)(k.textShadow),textTransform:(0,C.parseTextTransform)(k.textTransform),transform:(0,E.parseTransform)(k),visibility:(0,U.parseVisibility)(k.visibility),wordBreak:(0,F.parseWordBreak)(k.wordBreak),zIndex:(0,_.parseZIndex)(L!==v.POSITION.STATIC?k.zIndex:"auto")},this.isTransformed()&&(A.style.transform="matrix(1,0,0,1,0,0)"),D===u.DISPLAY.LIST_ITEM){var R=(0,T.getListOwner)(this);if(R){var K=R.listItems.length;R.listItems.push(this),this.listIndex=A.hasAttribute("value")&&"number"==typeof A.value?A.value:0===K?"number"==typeof R.listStart?R.listStart:1:R.listItems[K-1].listIndex+1}}"IMG"===A.tagName&&A.addEventListener("load",function(){a.bounds=(0,x.parseBounds)(A,S,P),a.curvedBounds=(0,x.parseBoundCurves)(a.bounds,a.style.border,a.style.borderRadius)}),this.image=N(A,r),this.bounds=M?(0,H.reformatInputBounds)((0,x.parseBounds)(A,S,P)):(0,x.parseBounds)(A,S,P),this.curvedBounds=(0,x.parseBoundCurves)(this.bounds,this.style.border,this.style.borderRadius),"production"!==e.env.NODE_ENV&&(this.name=A.tagName.toLowerCase()+(A.id?"#"+A.id:"")+A.className.toString().split(" ").map(function(e){return e.length?"."+e:""}).join(""))}return r(t,[{key:"getClipPaths",value:function(){var e=this.parent?this.parent.getClipPaths():[];return this.style.overflow!==w.OVERFLOW.VISIBLE?e.concat([(0,x.calculatePaddingBoxPath)(this.curvedBounds)]):e}},{key:"isInFlow",value:function(){return this.isRootElement()&&!this.isFloating()&&!this.isAbsolutelyPositioned()}},{key:"isVisible",value:function(){return!(0,a.contains)(this.style.display,u.DISPLAY.NONE)&&this.style.opacity>0&&this.style.visibility===U.VISIBILITY.VISIBLE}},{key:"isAbsolutelyPositioned",value:function(){return this.style.position!==v.POSITION.STATIC&&this.style.position!==v.POSITION.RELATIVE}},{key:"isPositioned",value:function(){return this.style.position!==v.POSITION.STATIC}},{key:"isFloating",value:function(){return this.style.float!==f.FLOAT.NONE}},{key:"isRootElement",value:function(){return null===this.parent}},{key:"isTransformed",value:function(){return null!==this.style.transform}},{key:"isPositionedWithZIndex",value:function(){return this.isPositioned()&&!this.style.zIndex.auto}},{key:"isInlineLevel",value:function(){return(0,a.contains)(this.style.display,u.DISPLAY.INLINE)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_BLOCK)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_FLEX)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_GRID)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_LIST_ITEM)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_TABLE)}},{key:"isInlineBlockOrInlineTable",value:function(){return(0,a.contains)(this.style.display,u.DISPLAY.INLINE_BLOCK)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_TABLE)}}]),t}();t.default=I;var N=function(e,t){if(e instanceof e.ownerDocument.defaultView.SVGSVGElement||e instanceof SVGSVGElement){var A=new XMLSerializer;return t.loadImage("data:image/svg+xml,"+encodeURIComponent(A.serializeToString(e)))}switch(e.tagName){case"IMG":var n=e;return t.loadImage(n.currentSrc||n.src);case"CANVAS":var r=e;return t.loadCanvas(r);case"IFRAME":var o=e.getAttribute("data-html2canvas-internal-iframe-key");if(o)return o}return null}}).call(t,A(0))},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.contains=function(e,t){return 0!=(e&t)},t.distance=function(e,t){return Math.sqrt(e*e+t*t)},t.copyCSSStyles=function(e,t){for(var A=e.length-1;A>=0;A--){var n=e.item(A);"content"!==n&&t.style.setProperty(n,e.getPropertyValue(n))}return t},t.SMALL_IMAGE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},function(e,t,A){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.parseBackgroundImage=t.parseBackground=t.calculateBackgroundRepeatPath=t.calculateBackgroundPosition=t.calculateBackgroungPositioningArea=t.calculateBackgroungPaintingArea=t.calculateGradientBackgroundSize=t.calculateBackgroundSize=t.BACKGROUND_ORIGIN=t.BACKGROUND_CLIP=t.BACKGROUND_SIZE=t.BACKGROUND_REPEAT=void 0;var n=c(A(1)),r=c(A(2)),o=c(A(39)),i=c(A(9)),a=A(3),s=A(19);function c(e){return e&&e.__esModule?e:{default:e}}var l=t.BACKGROUND_REPEAT={REPEAT:0,NO_REPEAT:1,REPEAT_X:2,REPEAT_Y:3},u=t.BACKGROUND_SIZE={AUTO:0,CONTAIN:1,COVER:2,LENGTH:3},f=t.BACKGROUND_CLIP={BORDER_BOX:0,PADDING_BOX:1,CONTENT_BOX:2},d=t.BACKGROUND_ORIGIN=f,h=function e(t){switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t){case"contain":this.size=u.CONTAIN;break;case"cover":this.size=u.COVER;break;case"auto":this.size=u.AUTO;break;default:this.value=new r.default(t)}},p=(t.calculateBackgroundSize=function(e,t,A){var n=0,r=0,i=e.size;if(i[0].size===u.CONTAIN||i[0].size===u.COVER){var a=A.width/A.height,s=t.width/t.height;return a<s!=(i[0].size===u.COVER)?new o.default(A.width,A.width/s):new o.default(A.height*s,A.height)}return i[0].value&&(n=i[0].value.getAbsoluteValue(A.width)),i[0].size===u.AUTO&&i[1].size===u.AUTO?r=t.height:i[1].size===u.AUTO?r=n/t.width*t.height:i[1].value&&(r=i[1].value.getAbsoluteValue(A.height)),i[0].size===u.AUTO&&(n=r/t.height*t.width),new o.default(n,r)},t.calculateGradientBackgroundSize=function(e,t){var A=e.size,n=A[0].value?A[0].value.getAbsoluteValue(t.width):t.width,r=A[1].value?A[1].value.getAbsoluteValue(t.height):A[0].value?n:t.height;return new o.default(n,r)},new h("auto")),g=(t.calculateBackgroungPaintingArea=function(e,t){switch(t){case f.BORDER_BOX:return(0,a.calculateBorderBoxPath)(e);case f.PADDING_BOX:default:return(0,a.calculatePaddingBoxPath)(e)}},t.calculateBackgroungPositioningArea=function(e,t,A,n){var r=(0,a.calculatePaddingBox)(t,n);switch(e){case d.BORDER_BOX:return t;case d.CONTENT_BOX:var o=A[s.PADDING_SIDES.LEFT].getAbsoluteValue(t.width),i=A[s.PADDING_SIDES.RIGHT].getAbsoluteValue(t.width),c=A[s.PADDING_SIDES.TOP].getAbsoluteValue(t.width),l=A[s.PADDING_SIDES.BOTTOM].getAbsoluteValue(t.width);return new a.Bounds(r.left+o,r.top+c,r.width-o-i,r.height-c-l);case d.PADDING_BOX:default:return r}},t.calculateBackgroundPosition=function(e,t,A){return new i.default(e[0].getAbsoluteValue(A.width-t.width),e[1].getAbsoluteValue(A.height-t.height))},t.calculateBackgroundRepeatPath=function(e,t,A,n,r){switch(e.repeat){case l.REPEAT_X:return[new i.default(Math.round(r.left),Math.round(n.top+t.y)),new i.default(Math.round(r.left+r.width),Math.round(n.top+t.y)),new i.default(Math.round(r.left+r.width),Math.round(A.height+n.top+t.y)),new i.default(Math.round(r.left),Math.round(A.height+n.top+t.y))];case l.REPEAT_Y:return[new i.default(Math.round(n.left+t.x),Math.round(r.top)),new i.default(Math.round(n.left+t.x+A.width),Math.round(r.top)),new i.default(Math.round(n.left+t.x+A.width),Math.round(r.height+r.top)),new i.default(Math.round(n.left+t.x),Math.round(r.height+r.top))];case l.NO_REPEAT:return[new i.default(Math.round(n.left+t.x),Math.round(n.top+t.y)),new i.default(Math.round(n.left+t.x+A.width),Math.round(n.top+t.y)),new i.default(Math.round(n.left+t.x+A.width),Math.round(n.top+t.y+A.height)),new i.default(Math.round(n.left+t.x),Math.round(n.top+t.y+A.height))];default:return[new i.default(Math.round(r.left),Math.round(r.top)),new i.default(Math.round(r.left+r.width),Math.round(r.top)),new i.default(Math.round(r.left+r.width),Math.round(r.height+r.top)),new i.default(Math.round(r.left),Math.round(r.height+r.top))]}},t.parseBackground=function(e,t){return{backgroundColor:new n.default(e.backgroundColor),backgroundImage:w(e,t),backgroundClip:g(e.backgroundClip),backgroundOrigin:B(e.backgroundOrigin)}},function(e){switch(e){case"padding-box":return f.PADDING_BOX;case"content-box":return f.CONTENT_BOX}return f.BORDER_BOX}),B=function(e){switch(e){case"padding-box":return d.PADDING_BOX;case"content-box":return d.CONTENT_BOX}return d.BORDER_BOX},w=function(t,A){var n=v(t.backgroundImage).map(function(e){if("url"===e.method){var t=A.loadImage(e.args[0]);e.args=t?[t]:[]}return e}),r=t.backgroundPosition.split(","),o=t.backgroundRepeat.split(","),i=t.backgroundSize.split(",");return n.map(function(t,A){var n=(i[A]||"auto").trim().split(" ").map(m),a=(r[A]||"auto").trim().split(" ").map(y);return{source:t,repeat:function(t){switch(t.trim()){case"no-repeat":return l.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return l.REPEAT_X;case"repeat-y":case"no-repeat repeat":return l.REPEAT_Y;case"repeat":return l.REPEAT}return"production"!==e.env.NODE_ENV&&console.error('Invalid background-repeat value "'+t+'"'),l.REPEAT}("string"==typeof o[A]?o[A]:o[0]),size:n.length<2?[n[0],p]:[n[0],n[1]],position:a.length<2?[a[0],a[0]]:[a[0],a[1]]}})},m=function(e){return"auto"===e?p:new h(e)},y=function(e){switch(e){case"bottom":case"right":return new r.default("100%");case"left":case"top":return new r.default("0%");case"auto":return new r.default("0")}return new r.default(e)},v=t.parseBackgroundImage=function(e){var t=/^\s$/,A=[],n=[],r="",o=null,i="",a=0,s=0,c=function(){var e="";if(r){'"'===i.substr(0,1)&&(i=i.substr(1,i.length-2)),i&&n.push(i.trim());var t=r.indexOf("-",1)+1;"-"===r.substr(0,1)&&t>0&&(e=r.substr(0,t).toLowerCase(),r=r.substr(t)),"none"!==(r=r.toLowerCase())&&A.push({prefix:e,method:r,args:n})}n=[],r=i=""};return e.split("").forEach(function(e){if(0!==a||!t.test(e)){switch(e){case'"':o?o===e&&(o=null):o=e;break;case"(":if(o)break;if(0===a)return void(a=1);s++;break;case")":if(o)break;if(1===a){if(0===s)return a=0,void c();s--}break;case",":if(o)break;if(0===a)return void c();if(1===a&&0===s&&!r.match(/^url$/i))return n.push(i.trim()),void(i="")}0===a?r+=e:i+=e}}),c(),A}}).call(t,A(0))},function(e,t){var A;A=function(){return this}();try{A=A||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(A=window)}e.exports=A},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PATH={VECTOR:0,BEZIER_CURVE:1,CIRCLE:2}},function(e,t,A){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=A(8);t.default=function t(A,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.type=n.PATH.VECTOR,this.x=A,this.y=r,"production"!==e.env.NODE_ENV&&(isNaN(A)&&console.error("Invalid x value given for Vector"),isNaN(r)&&console.error("Invalid y value given for Vector"))}}).call(t,A(0))},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseListStyle=t.parseListStyleType=t.LIST_STYLE_TYPE=t.LIST_STYLE_POSITION=void 0;var n=A(6),r=t.LIST_STYLE_POSITION={INSIDE:0,OUTSIDE:1},o=t.LIST_STYLE_TYPE={NONE:-1,DISC:0,CIRCLE:1,SQUARE:2,DECIMAL:3,CJK_DECIMAL:4,DECIMAL_LEADING_ZERO:5,LOWER_ROMAN:6,UPPER_ROMAN:7,LOWER_GREEK:8,LOWER_ALPHA:9,UPPER_ALPHA:10,ARABIC_INDIC:11,ARMENIAN:12,BENGALI:13,CAMBODIAN:14,CJK_EARTHLY_BRANCH:15,CJK_HEAVENLY_STEM:16,CJK_IDEOGRAPHIC:17,DEVANAGARI:18,ETHIOPIC_NUMERIC:19,GEORGIAN:20,GUJARATI:21,GURMUKHI:22,HEBREW:22,HIRAGANA:23,HIRAGANA_IROHA:24,JAPANESE_FORMAL:25,JAPANESE_INFORMAL:26,KANNADA:27,KATAKANA:28,KATAKANA_IROHA:29,KHMER:30,KOREAN_HANGUL_FORMAL:31,KOREAN_HANJA_FORMAL:32,KOREAN_HANJA_INFORMAL:33,LAO:34,LOWER_ARMENIAN:35,MALAYALAM:36,MONGOLIAN:37,MYANMAR:38,ORIYA:39,PERSIAN:40,SIMP_CHINESE_FORMAL:41,SIMP_CHINESE_INFORMAL:42,TAMIL:43,TELUGU:44,THAI:45,TIBETAN:46,TRAD_CHINESE_FORMAL:47,TRAD_CHINESE_INFORMAL:48,UPPER_ARMENIAN:49,DISCLOSURE_OPEN:50,DISCLOSURE_CLOSED:51},i=t.parseListStyleType=function(e){switch(e){case"disc":return o.DISC;case"circle":return o.CIRCLE;case"square":return o.SQUARE;case"decimal":return o.DECIMAL;case"cjk-decimal":return o.CJK_DECIMAL;case"decimal-leading-zero":return o.DECIMAL_LEADING_ZERO;case"lower-roman":return o.LOWER_ROMAN;case"upper-roman":return o.UPPER_ROMAN;case"lower-greek":return o.LOWER_GREEK;case"lower-alpha":return o.LOWER_ALPHA;case"upper-alpha":return o.UPPER_ALPHA;case"arabic-indic":return o.ARABIC_INDIC;case"armenian":return o.ARMENIAN;case"bengali":return o.BENGALI;case"cambodian":return o.CAMBODIAN;case"cjk-earthly-branch":return o.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return o.CJK_HEAVENLY_STEM;case"cjk-ideographic":return o.CJK_IDEOGRAPHIC;case"devanagari":return o.DEVANAGARI;case"ethiopic-numeric":return o.ETHIOPIC_NUMERIC;case"georgian":return o.GEORGIAN;case"gujarati":return o.GUJARATI;case"gurmukhi":return o.GURMUKHI;case"hebrew":return o.HEBREW;case"hiragana":return o.HIRAGANA;case"hiragana-iroha":return o.HIRAGANA_IROHA;case"japanese-formal":return o.JAPANESE_FORMAL;case"japanese-informal":return o.JAPANESE_INFORMAL;case"kannada":return o.KANNADA;case"katakana":return o.KATAKANA;case"katakana-iroha":return o.KATAKANA_IROHA;case"khmer":return o.KHMER;case"korean-hangul-formal":return o.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return o.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return o.KOREAN_HANJA_INFORMAL;case"lao":return o.LAO;case"lower-armenian":return o.LOWER_ARMENIAN;case"malayalam":return o.MALAYALAM;case"mongolian":return o.MONGOLIAN;case"myanmar":return o.MYANMAR;case"oriya":return o.ORIYA;case"persian":return o.PERSIAN;case"simp-chinese-formal":return o.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return o.SIMP_CHINESE_INFORMAL;case"tamil":return o.TAMIL;case"telugu":return o.TELUGU;case"thai":return o.THAI;case"tibetan":return o.TIBETAN;case"trad-chinese-formal":return o.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return o.TRAD_CHINESE_INFORMAL;case"upper-armenian":return o.UPPER_ARMENIAN;case"disclosure-open":return o.DISCLOSURE_OPEN;case"disclosure-closed":return o.DISCLOSURE_CLOSED;case"none":default:return o.NONE}},a=(t.parseListStyle=function(e){var t=(0,n.parseBackgroundImage)(e.getPropertyValue("list-style-image"));return{listStyleType:i(e.getPropertyValue("list-style-type")),listStyleImage:t.length?t[0]:null,listStylePosition:a(e.getPropertyValue("list-style-position"))}},function(e){switch(e){case"inside":return r.INSIDE;case"outside":default:return r.OUTSIDE}})},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var A=0;A<t.length;A++){var n=t[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,A,n){return A&&e(t.prototype,A),n&&e(t,n),t}}(),r=A(22),o=A(24);var i=function(){function e(t,A,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.text=t,this.parent=A,this.bounds=n}return n(e,null,[{key:"fromTextNode",value:function(t,A){var n=s(t.data,A.style.textTransform);return new e(n,A,(0,o.parseTextBounds)(n,A,t))}}]),e}();t.default=i;var a=/(^|\s|:|-|\(|\))([a-z])/g,s=function(e,t){switch(t){case r.TEXT_TRANSFORM.LOWERCASE:return e.toLowerCase();case r.TEXT_TRANSFORM.CAPITALIZE:return e.replace(a,c);case r.TEXT_TRANSFORM.UPPERCASE:return e.toUpperCase();default:return e}};function c(e,t,A){return e.length>0?t+A.toUpperCase():e}},function(e,t,A){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=A(25),r=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},o={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var A=e.createElement("boundtest");A.style.height="123px",A.style.display="block",e.body.appendChild(A),t.selectNode(A);var n=t.getBoundingClientRect(),r=Math.round(n.height);if(e.body.removeChild(A),123===r)return!0}}return!1}(document);return Object.defineProperty(o,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,A=e.createElement("canvas"),n=A.getContext("2d");t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(t,0,0),A.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(o,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_BASE64_DRAWING(){return function(e){var t=function(e,t){var A=new Image,n=e.createElement("canvas"),r=n.getContext("2d");return new Promise(function(e){A.src=t;var o=function(){try{r.drawImage(A,0,0),n.toDataURL()}catch(t){return e(!1)}return e(!0)};A.onload=o,A.onerror=function(){return e(!1)},!0===A.complete&&setTimeout(function(){o()},500)})}(document,e);return Object.defineProperty(o,"SUPPORT_BASE64_DRAWING",{value:function(){return t}}),t}},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas");t.width=100,t.height=100;var A=t.getContext("2d");A.fillStyle="rgb(0, 255, 0)",A.fillRect(0,0,100,100);var o=new Image,i=t.toDataURL();o.src=i;var a=(0,n.createFore