vue-html2canvas
Version:
Vue mixin for Html2Canvas
1 lines • 172 kB
JavaScript
module.exports=function(A){function e(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return A[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var t={};return e.m=A,e.c=t,e.d=function(A,t,r){e.o(A,t)||Object.defineProperty(A,t,{configurable:!1,enumerable:!0,get:r})},e.n=function(A){var t=A&&A.__esModule?function(){return A.default}:function(){return A};return e.d(t,"a",t),t},e.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},e.p="",e(e.s=28)}([function(A,e){function t(){throw Error("setTimeout has not been defined")}function r(){throw Error("clearTimeout has not been defined")}function n(A){if(c===setTimeout)return setTimeout(A,0);if((c===t||!c)&&setTimeout)return c=setTimeout,setTimeout(A,0);try{return c(A,0)}catch(e){try{return c.call(null,A,0)}catch(e){return c.call(this,A,0)}}}function B(A){if(l===clearTimeout)return clearTimeout(A);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(A);try{return l(A)}catch(e){try{return l.call(null,A)}catch(e){return l.call(this,A)}}}function o(){g&&Q&&(g=!1,Q.length?w=Q.concat(w):U=-1,w.length&&a())}function a(){if(!g){var A=n(o);g=!0;for(var e=w.length;e;){for(Q=w,w=[];++U<e;)Q&&Q[U].run();U=-1,e=w.length}Q=null,g=!1,B(A)}}function s(A,e){this.fun=A,this.array=e}function i(){}var c,l,u=A.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:t}catch(A){c=t}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(A){l=r}}();var Q,w=[],g=!1,U=-1;u.nextTick=function(A){var e=Array(arguments.length-1);if(arguments.length>1)for(var t=1;arguments.length>t;t++)e[t-1]=arguments[t];w.push(new s(A,e)),1!==w.length||g||n(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=i,u.addListener=i,u.once=i,u.off=i,u.removeListener=i,u.removeAllListeners=i,u.emit=i,u.prependListener=i,u.prependOnceListener=i,u.listeners=function(A){return[]},u.binding=function(A){throw Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(A){throw Error("process.chdir is not supported")},u.umask=function(){return 0}},function(A,e,t){"use strict";function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function A(A,e){var t=[],r=!0,n=!1,B=void 0;try{for(var o,a=A[Symbol.iterator]();!(r=(o=a.next()).done)&&(t.push(o.value),!e||t.length!==e);r=!0);}catch(A){n=!0,B=A}finally{try{!r&&a.return&&a.return()}finally{if(n)throw B}}return t}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return A(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),B=function(){function A(A,e){for(var t=0;e.length>t;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),o=/^#([a-f0-9]{3})$/i,a=function(A){var e=A.match(o);return!!e&&[parseInt(e[1][0]+e[1][0],16),parseInt(e[1][1]+e[1][1],16),parseInt(e[1][2]+e[1][2],16),null]},s=/^#([a-f0-9]{6})$/i,i=function(A){var e=A.match(s);return!!e&&[parseInt(e[1].substring(0,2),16),parseInt(e[1].substring(2,4),16),parseInt(e[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(A){var e=A.match(c);return!!e&&[+e[1],+e[2],+e[3],null]},u=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/,Q=function(A){var e=A.match(u);return!(!e||4>=e.length)&&[+e[1],+e[2],+e[3],+e[4]]},w=function(A){return[Math.min(A[0],255),Math.min(A[1],255),Math.min(A[2],255),A.length>3?A[3]:null]},g=function(A){var e=d[A.toLowerCase()];return e||!1},U=function(){function A(e){r(this,A);var t=Array.isArray(e)?w(e):a(e)||l(e)||Q(e)||g(e)||i(e)||[0,0,0,null],B=n(t,4),o=B[0],s=B[1],c=B[2],u=B[3];this.r=o,this.g=s,this.b=c,this.a=u}return B(A,[{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+")"}}]),A}();e.default=U;var d={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]};e.TRANSPARENT=new U([0,0,0,0])},function(A,e,t){"use strict";(function(A){function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.calculateLengthFromValueWithUnit=e.LENGTH_TYPE=void 0;var n=function(){function A(A,e){for(var t=0;e.length>t;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),B=t(4),o=(function(A){}(B),e.LENGTH_TYPE={PX:0,PERCENTAGE:1}),a=function(){function e(t){r(this,e),this.type="%"===t.substr(t.length-1)?o.PERCENTAGE:o.PX;var n=parseFloat(t);"production"!==A.env.NODE_ENV&&isNaN(n)&&console.error('Invalid value given for Length: "'+t+'"'),this.value=isNaN(n)?0:n}return n(e,[{key:"isPercentage",value:function(){return this.type===o.PERCENTAGE}},{key:"getAbsoluteValue",value:function(A){return this.isPercentage()?A*(this.value/100):this.value}}],[{key:"create",value:function(A){return new e(A)}}]),e}();e.default=a;var s=function A(e){var t=e.parent;return t?A(t):parseFloat(e.style.font.fontSize)};e.calculateLengthFromValueWithUnit=function(A,e,t){switch(t){case"px":case"%":return new a(e+t);case"em":case"rem":var r=new a(e);return r.value*="em"===t?parseFloat(A.style.font.fontSize):s(A),r;default:return new a("0")}}}).call(e,t(0))},function(A,e,t){"use strict";(function(A){function r(A){return A&&A.__esModule?A:{default:A}}function n(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.parseBoundCurves=e.calculatePaddingBoxPath=e.calculateBorderBoxPath=e.parsePathForBorder=e.parseDocumentSize=e.calculateContentBox=e.calculatePaddingBox=e.parseBounds=e.Bounds=void 0;var B=function(){function A(A,e){for(var t=0;e.length>t;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),o=t(8),a=r(o),s=t(34),i=r(s),c=e.Bounds=function(){function A(e,t,r,B){n(this,A),this.left=e,this.top=t,this.width=r,this.height=B}return B(A,null,[{key:"fromClientRect",value:function(e,t,r){return new A(e.left+t,e.top+r,e.width,e.height)}}]),A}(),l=(e.parseBounds=function(A,e,t){return c.fromClientRect(A.getBoundingClientRect(),e,t)},e.calculatePaddingBox=function(A,e){return new c(A.left+e[3].borderWidth,A.top+e[0].borderWidth,A.width-(e[1].borderWidth+e[3].borderWidth),A.height-(e[0].borderWidth+e[2].borderWidth))},e.calculateContentBox=function(A,e,t){var r=e[0].value,n=e[1].value,B=e[2].value,o=e[3].value;return new c(A.left+o+t[3].borderWidth,A.top+r+t[0].borderWidth,A.width-(t[1].borderWidth+t[3].borderWidth+o+n),A.height-(t[0].borderWidth+t[2].borderWidth+r+B))},e.parseDocumentSize=function(e){var t=e.body,r=e.documentElement;if(!t||!r)throw Error("production"!==A.env.NODE_ENV?"Unable to get document size":"");var n=Math.max(Math.max(t.scrollWidth,r.scrollWidth),Math.max(t.offsetWidth,r.offsetWidth),Math.max(t.clientWidth,r.clientWidth)),B=Math.max(Math.max(t.scrollHeight,r.scrollHeight),Math.max(t.offsetHeight,r.offsetHeight),Math.max(t.clientHeight,r.clientHeight));return new c(0,0,n,B)},e.parsePathForBorder=function(A,e){switch(e){case 0:return l(A.topLeftOuter,A.topLeftInner,A.topRightOuter,A.topRightInner);case 1:return l(A.topRightOuter,A.topRightInner,A.bottomRightOuter,A.bottomRightInner);case 2:return l(A.bottomRightOuter,A.bottomRightInner,A.bottomLeftOuter,A.bottomLeftInner);case 3:default:return l(A.bottomLeftOuter,A.bottomLeftInner,A.topLeftOuter,A.topLeftInner)}},function(A,e,t,r){var n=[];return n.push(A instanceof i.default?A.subdivide(.5,!1):A),n.push(t instanceof i.default?t.subdivide(.5,!0):t),n.push(r instanceof i.default?r.subdivide(.5,!0).reverse():r),n.push(e instanceof i.default?e.subdivide(.5,!1).reverse():e),n}),u=(e.calculateBorderBoxPath=function(A){return[A.topLeftOuter,A.topRightOuter,A.bottomRightOuter,A.bottomLeftOuter]},e.calculatePaddingBoxPath=function(A){return[A.topLeftInner,A.topRightInner,A.bottomRightInner,A.bottomLeftInner]},e.parseBoundCurves=function(A,e,t){var r=t[u.TOP_LEFT][0].getAbsoluteValue(A.width),n=t[u.TOP_LEFT][1].getAbsoluteValue(A.height),B=t[u.TOP_RIGHT][0].getAbsoluteValue(A.width),o=t[u.TOP_RIGHT][1].getAbsoluteValue(A.height),s=t[u.BOTTOM_RIGHT][0].getAbsoluteValue(A.width),i=t[u.BOTTOM_RIGHT][1].getAbsoluteValue(A.height),c=t[u.BOTTOM_LEFT][0].getAbsoluteValue(A.width),l=t[u.BOTTOM_LEFT][1].getAbsoluteValue(A.height),w=[];w.push((r+B)/A.width),w.push((c+s)/A.width),w.push((n+l)/A.height),w.push((o+i)/A.height);var g=Math.max.apply(Math,w);g>1&&(r/=g,n/=g,B/=g,o/=g,s/=g,i/=g,c/=g,l/=g);var U=A.width-B,d=A.height-i,C=A.width-s,F=A.height-l;return{topLeftOuter:r>0||n>0?Q(A.left,A.top,r,n,u.TOP_LEFT):new a.default(A.left,A.top),topLeftInner:r>0||n>0?Q(A.left+e[3].borderWidth,A.top+e[0].borderWidth,Math.max(0,r-e[3].borderWidth),Math.max(0,n-e[0].borderWidth),u.TOP_LEFT):new a.default(A.left+e[3].borderWidth,A.top+e[0].borderWidth),topRightOuter:B>0||o>0?Q(A.left+U,A.top,B,o,u.TOP_RIGHT):new a.default(A.left+A.width,A.top),topRightInner:B>0||o>0?Q(A.left+Math.min(U,A.width+e[3].borderWidth),A.top+e[0].borderWidth,U>A.width+e[3].borderWidth?0:B-e[3].borderWidth,o-e[0].borderWidth,u.TOP_RIGHT):new a.default(A.left+A.width-e[1].borderWidth,A.top+e[0].borderWidth),bottomRightOuter:s>0||i>0?Q(A.left+C,A.top+d,s,i,u.BOTTOM_RIGHT):new a.default(A.left+A.width,A.top+A.height),bottomRightInner:s>0||i>0?Q(A.left+Math.min(C,A.width-e[3].borderWidth),A.top+Math.min(d,A.height+e[0].borderWidth),Math.max(0,s-e[1].borderWidth),i-e[2].borderWidth,u.BOTTOM_RIGHT):new a.default(A.left+A.width-e[1].borderWidth,A.top+A.height-e[2].borderWidth),bottomLeftOuter:c>0||l>0?Q(A.left,A.top+F,c,l,u.BOTTOM_LEFT):new a.default(A.left,A.top+A.height),bottomLeftInner:c>0||l>0?Q(A.left+e[3].borderWidth,A.top+F,Math.max(0,c-e[3].borderWidth),l-e[2].borderWidth,u.BOTTOM_LEFT):new a.default(A.left+e[3].borderWidth,A.top+A.height-e[2].borderWidth)}},{TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_RIGHT:2,BOTTOM_LEFT:3}),Q=function(A,e,t,r,n){var B=(Math.sqrt(2)-1)/3*4,o=t*B,s=r*B,c=A+t,l=e+r;switch(n){case u.TOP_LEFT:return new i.default(new a.default(A,l),new a.default(A,l-s),new a.default(c-o,e),new a.default(c,e));case u.TOP_RIGHT:return new i.default(new a.default(A,e),new a.default(A+o,e),new a.default(c,l-s),new a.default(c,l));case u.BOTTOM_RIGHT:return new i.default(new a.default(c,e),new a.default(c,e+s),new a.default(A+o,l),new a.default(A,l));case u.BOTTOM_LEFT:default:return new i.default(new a.default(c,l),new a.default(c-o,l),new a.default(A,e+s),new a.default(A,e))}}}).call(e,t(0))},function(A,e,t){"use strict";(function(A){function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function A(A,e){for(var t=0;e.length>t;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),B=t(1),o=function(A){return A&&A.__esModule?A:{default:A}}(B),a=t(5),s=t(6),i=t(13),c=t(35),l=t(36),u=t(37),Q=t(38),w=t(39),g=t(40),U=t(9),d=t(41),C=t(42),F=t(19),f=t(18),E=t(20),h=t(12),H=t(43),p=t(21),N=t(44),I=t(45),K=t(46),T=t(47),m=t(3),v=t(22),b=t(15),y=["INPUT","TEXTAREA","SELECT"],L=function(){function e(t,n,B,a){var L=this;r(this,e),this.parent=n,this.tagName=t.tagName,this.index=a,this.childNodes=[],this.listItems=[],"number"==typeof t.start&&(this.listStart=t.start);var S=t.ownerDocument.defaultView,D=S.pageXOffset,O=S.pageYOffset,M=S.getComputedStyle(t,null),R=(0,l.parseDisplay)(M.display),P="radio"===t.type||"checkbox"===t.type,X=(0,E.parsePosition)(M.position);if(this.style={background:P?v.INPUT_BACKGROUND:(0,s.parseBackground)(M,B),border:P?v.INPUT_BORDERS:(0,i.parseBorder)(M),borderRadius:(t instanceof S.HTMLInputElement||t instanceof HTMLInputElement)&&P?(0,v.getInputBorderRadius)(t):(0,c.parseBorderRadius)(M),color:P?v.INPUT_COLOR:new o.default(M.color),display:R,float:(0,u.parseCSSFloat)(M.float),font:(0,Q.parseFont)(M),letterSpacing:(0,w.parseLetterSpacing)(M.letterSpacing),listStyle:R===l.DISPLAY.LIST_ITEM?(0,U.parseListStyle)(M):null,lineBreak:(0,g.parseLineBreak)(M.lineBreak),margin:(0,d.parseMargin)(M),opacity:parseFloat(M.opacity),overflow:-1===y.indexOf(t.tagName)?(0,C.parseOverflow)(M.overflow):C.OVERFLOW.HIDDEN,overflowWrap:(0,F.parseOverflowWrap)(M.overflowWrap?M.overflowWrap:M.wordWrap),padding:(0,f.parsePadding)(M),position:X,textDecoration:(0,h.parseTextDecoration)(M),textShadow:(0,H.parseTextShadow)(M.textShadow),textTransform:(0,p.parseTextTransform)(M.textTransform),transform:(0,N.parseTransform)(M),visibility:(0,I.parseVisibility)(M.visibility),wordBreak:(0,K.parseWordBreak)(M.wordBreak),zIndex:(0,T.parseZIndex)(X!==E.POSITION.STATIC?M.zIndex:"auto")},this.isTransformed()&&(t.style.transform="matrix(1,0,0,1,0,0)"),R===l.DISPLAY.LIST_ITEM){var z=(0,b.getListOwner)(this);if(z){var V=z.listItems.length;z.listItems.push(this),this.listIndex=t.hasAttribute("value")&&"number"==typeof t.value?t.value:0===V?"number"==typeof z.listStart?z.listStart:1:z.listItems[V-1].listIndex+1}}"IMG"===t.tagName&&t.addEventListener("load",function(){L.bounds=(0,m.parseBounds)(t,D,O),L.curvedBounds=(0,m.parseBoundCurves)(L.bounds,L.style.border,L.style.borderRadius)}),this.image=_(t,B),this.bounds=P?(0,v.reformatInputBounds)((0,m.parseBounds)(t,D,O)):(0,m.parseBounds)(t,D,O),this.curvedBounds=(0,m.parseBoundCurves)(this.bounds,this.style.border,this.style.borderRadius),"production"!==A.env.NODE_ENV&&(this.name=t.tagName.toLowerCase()+(t.id?"#"+t.id:"")+(""+t.className).split(" ").map(function(A){return A.length?"."+A:""}).join(""))}return n(e,[{key:"getClipPaths",value:function(){var A=this.parent?this.parent.getClipPaths():[];return this.style.overflow!==C.OVERFLOW.VISIBLE?A.concat([(0,m.calculatePaddingBoxPath)(this.curvedBounds)]):A}},{key:"isInFlow",value:function(){return this.isRootElement()&&!this.isFloating()&&!this.isAbsolutelyPositioned()}},{key:"isVisible",value:function(){return!(0,a.contains)(this.style.display,l.DISPLAY.NONE)&&this.style.opacity>0&&this.style.visibility===I.VISIBILITY.VISIBLE}},{key:"isAbsolutelyPositioned",value:function(){return this.style.position!==E.POSITION.STATIC&&this.style.position!==E.POSITION.RELATIVE}},{key:"isPositioned",value:function(){return this.style.position!==E.POSITION.STATIC}},{key:"isFloating",value:function(){return this.style.float!==u.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,l.DISPLAY.INLINE)||(0,a.contains)(this.style.display,l.DISPLAY.INLINE_BLOCK)||(0,a.contains)(this.style.display,l.DISPLAY.INLINE_FLEX)||(0,a.contains)(this.style.display,l.DISPLAY.INLINE_GRID)||(0,a.contains)(this.style.display,l.DISPLAY.INLINE_LIST_ITEM)||(0,a.contains)(this.style.display,l.DISPLAY.INLINE_TABLE)}},{key:"isInlineBlockOrInlineTable",value:function(){return(0,a.contains)(this.style.display,l.DISPLAY.INLINE_BLOCK)||(0,a.contains)(this.style.display,l.DISPLAY.INLINE_TABLE)}}]),e}();e.default=L;var _=function(A,e){if(A instanceof A.ownerDocument.defaultView.SVGSVGElement||A instanceof SVGSVGElement){var t=new XMLSerializer;return e.loadImage("data:image/svg+xml,"+encodeURIComponent(t.serializeToString(A)))}switch(A.tagName){case"IMG":var r=A;return e.loadImage(r.currentSrc||r.src);case"CANVAS":return e.loadCanvas(A);case"IFRAME":var n=A.getAttribute("data-html2canvas-internal-iframe-key");if(n)return n}return null}}).call(e,t(0))},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.contains=function(A,e){return 0!=(A&e)},e.distance=function(A,e){return Math.sqrt(A*A+e*e)},e.copyCSSStyles=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);"content"!==r&&e.style.setProperty(r,A.getPropertyValue(r))}return e},e.SMALL_IMAGE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},function(A,e,t){"use strict";(function(A){function r(A){return A&&A.__esModule?A:{default:A}}function n(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.parseBackgroundImage=e.parseBackground=e.calculateBackgroundRepeatPath=e.calculateBackgroundPosition=e.calculateBackgroungPositioningArea=e.calculateBackgroungPaintingArea=e.calculateGradientBackgroundSize=e.calculateBackgroundSize=e.BACKGROUND_ORIGIN=e.BACKGROUND_CLIP=e.BACKGROUND_SIZE=e.BACKGROUND_REPEAT=void 0;var B=t(1),o=r(B),a=t(2),s=r(a),i=t(33),c=r(i),l=t(8),u=r(l),Q=t(3),w=t(18),g=e.BACKGROUND_REPEAT={REPEAT:0,NO_REPEAT:1,REPEAT_X:2,REPEAT_Y:3},U=e.BACKGROUND_SIZE={AUTO:0,CONTAIN:1,COVER:2,LENGTH:3},d=e.BACKGROUND_CLIP={BORDER_BOX:0,PADDING_BOX:1,CONTENT_BOX:2},C=e.BACKGROUND_ORIGIN=d,F=function A(e){switch(n(this,A),e){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 s.default(e)}},f=(e.calculateBackgroundSize=function(A,e,t){var r=0,n=0,B=A.size;if(B[0].size===U.CONTAIN||B[0].size===U.COVER){var o=t.width/t.height,a=e.width/e.height;return a>o!=(B[0].size===U.COVER)?new c.default(t.width,t.width/a):new c.default(t.height*a,t.height)}return B[0].value&&(r=B[0].value.getAbsoluteValue(t.width)),B[0].size===U.AUTO&&B[1].size===U.AUTO?n=e.height:B[1].size===U.AUTO?n=r/e.width*e.height:B[1].value&&(n=B[1].value.getAbsoluteValue(t.height)),B[0].size===U.AUTO&&(r=n/e.height*e.width),new c.default(r,n)},e.calculateGradientBackgroundSize=function(A,e){var t=A.size,r=t[0].value?t[0].value.getAbsoluteValue(e.width):e.width,n=t[1].value?t[1].value.getAbsoluteValue(e.height):t[0].value?r:e.height;return new c.default(r,n)},new F("auto")),E=(e.calculateBackgroungPaintingArea=function(A,e){switch(e){case d.BORDER_BOX:return(0,Q.calculateBorderBoxPath)(A);case d.PADDING_BOX:default:return(0,Q.calculatePaddingBoxPath)(A)}},e.calculateBackgroungPositioningArea=function(A,e,t,r){var n=(0,Q.calculatePaddingBox)(e,r);switch(A){case C.BORDER_BOX:return e;case C.CONTENT_BOX:var B=t[w.PADDING_SIDES.LEFT].getAbsoluteValue(e.width),o=t[w.PADDING_SIDES.RIGHT].getAbsoluteValue(e.width),a=t[w.PADDING_SIDES.TOP].getAbsoluteValue(e.width),s=t[w.PADDING_SIDES.BOTTOM].getAbsoluteValue(e.width);return new Q.Bounds(n.left+B,n.top+a,n.width-B-o,n.height-a-s);case C.PADDING_BOX:default:return n}},e.calculateBackgroundPosition=function(A,e,t){return new u.default(A[0].getAbsoluteValue(t.width-e.width),A[1].getAbsoluteValue(t.height-e.height))},e.calculateBackgroundRepeatPath=function(A,e,t,r,n){switch(A.repeat){case g.REPEAT_X:return[new u.default(Math.round(n.left),Math.round(r.top+e.y)),new u.default(Math.round(n.left+n.width),Math.round(r.top+e.y)),new u.default(Math.round(n.left+n.width),Math.round(t.height+r.top+e.y)),new u.default(Math.round(n.left),Math.round(t.height+r.top+e.y))];case g.REPEAT_Y:return[new u.default(Math.round(r.left+e.x),Math.round(n.top)),new u.default(Math.round(r.left+e.x+t.width),Math.round(n.top)),new u.default(Math.round(r.left+e.x+t.width),Math.round(n.height+n.top)),new u.default(Math.round(r.left+e.x),Math.round(n.height+n.top))];case g.NO_REPEAT:return[new u.default(Math.round(r.left+e.x),Math.round(r.top+e.y)),new u.default(Math.round(r.left+e.x+t.width),Math.round(r.top+e.y)),new u.default(Math.round(r.left+e.x+t.width),Math.round(r.top+e.y+t.height)),new u.default(Math.round(r.left+e.x),Math.round(r.top+e.y+t.height))];default:return[new u.default(Math.round(n.left),Math.round(n.top)),new u.default(Math.round(n.left+n.width),Math.round(n.top)),new u.default(Math.round(n.left+n.width),Math.round(n.height+n.top)),new u.default(Math.round(n.left),Math.round(n.height+n.top))]}},e.parseBackground=function(A,e){return{backgroundColor:new o.default(A.backgroundColor),backgroundImage:p(A,e),backgroundClip:E(A.backgroundClip),backgroundOrigin:h(A.backgroundOrigin)}},function(A){switch(A){case"padding-box":return d.PADDING_BOX;case"content-box":return d.CONTENT_BOX}return d.BORDER_BOX}),h=function(A){switch(A){case"padding-box":return C.PADDING_BOX;case"content-box":return C.CONTENT_BOX}return C.BORDER_BOX},H=function(e){switch(e.trim()){case"no-repeat":return g.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return g.REPEAT_X;case"repeat-y":case"no-repeat repeat":return g.REPEAT_Y;case"repeat":return g.REPEAT}return"production"!==A.env.NODE_ENV&&console.error('Invalid background-repeat value "'+e+'"'),g.REPEAT},p=function(A,e){var t=K(A.backgroundImage).map(function(A){if("url"===A.method){var t=e.loadImage(A.args[0]);A.args=t?[t]:[]}return A}),r=A.backgroundPosition.split(","),n=A.backgroundRepeat.split(","),B=A.backgroundSize.split(",");return t.map(function(A,e){var t=(B[e]||"auto").trim().split(" ").map(N),o=(r[e]||"auto").trim().split(" ").map(I);return{source:A,repeat:H("string"==typeof n[e]?n[e]:n[0]),size:2>t.length?[t[0],f]:[t[0],t[1]],position:2>o.length?[o[0],o[0]]:[o[0],o[1]]}})},N=function(A){return"auto"===A?f:new F(A)},I=function(A){switch(A){case"bottom":case"right":return new s.default("100%");case"left":case"top":return new s.default("0%");case"auto":return new s.default("0")}return new s.default(A)},K=e.parseBackgroundImage=function(A){var e=/^\s$/,t=[],r=[],n="",B=null,o="",a=0,s=0,i=function(){var A="";if(n){'"'===o.substr(0,1)&&(o=o.substr(1,o.length-2)),o&&r.push(o.trim());var e=n.indexOf("-",1)+1;"-"===n.substr(0,1)&&e>0&&(A=n.substr(0,e).toLowerCase(),n=n.substr(e)),n=n.toLowerCase(),"none"!==n&&t.push({prefix:A,method:n,args:r})}r=[],n=o=""};return A.split("").forEach(function(A){if(0!==a||!e.test(A)){switch(A){case'"':B?B===A&&(B=null):B=A;break;case"(":if(B)break;if(0===a)return void(a=1);s++;break;case")":if(B)break;if(1===a){if(0===s)return a=0,void i();s--}break;case",":if(B)break;if(0===a)return void i();if(1===a&&0===s&&!n.match(/^url$/i))return r.push(o.trim()),void(o="")}0===a?n+=A:o+=A}}),i(),t}}).call(e,t(0))},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.PATH={VECTOR:0,BEZIER_CURVE:1,CIRCLE:2}},function(A,e,t){"use strict";(function(A){function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=t(7);e.default=function e(t,B){r(this,e),this.type=n.PATH.VECTOR,this.x=t,this.y=B,"production"!==A.env.NODE_ENV&&(isNaN(t)&&console.error("Invalid x value given for Vector"),isNaN(B)&&console.error("Invalid y value given for Vector"))}}).call(e,t(0))},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseListStyle=e.parseListStyleType=e.LIST_STYLE_TYPE=e.LIST_STYLE_POSITION=void 0;var r=t(6),n=e.LIST_STYLE_POSITION={INSIDE:0,OUTSIDE:1},B=e.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},o=e.parseListStyleType=function(A){switch(A){case"disc":return B.DISC;case"circle":return B.CIRCLE;case"square":return B.SQUARE;case"decimal":return B.DECIMAL;case"cjk-decimal":return B.CJK_DECIMAL;case"decimal-leading-zero":return B.DECIMAL_LEADING_ZERO;case"lower-roman":return B.LOWER_ROMAN;case"upper-roman":return B.UPPER_ROMAN;case"lower-greek":return B.LOWER_GREEK;case"lower-alpha":return B.LOWER_ALPHA;case"upper-alpha":return B.UPPER_ALPHA;case"arabic-indic":return B.ARABIC_INDIC;case"armenian":return B.ARMENIAN;case"bengali":return B.BENGALI;case"cambodian":return B.CAMBODIAN;case"cjk-earthly-branch":return B.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return B.CJK_HEAVENLY_STEM;case"cjk-ideographic":return B.CJK_IDEOGRAPHIC;case"devanagari":return B.DEVANAGARI;case"ethiopic-numeric":return B.ETHIOPIC_NUMERIC;case"georgian":return B.GEORGIAN;case"gujarati":return B.GUJARATI;case"gurmukhi":return B.GURMUKHI;case"hebrew":return B.HEBREW;case"hiragana":return B.HIRAGANA;case"hiragana-iroha":return B.HIRAGANA_IROHA;case"japanese-formal":return B.JAPANESE_FORMAL;case"japanese-informal":return B.JAPANESE_INFORMAL;case"kannada":return B.KANNADA;case"katakana":return B.KATAKANA;case"katakana-iroha":return B.KATAKANA_IROHA;case"khmer":return B.KHMER;case"korean-hangul-formal":return B.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return B.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return B.KOREAN_HANJA_INFORMAL;case"lao":return B.LAO;case"lower-armenian":return B.LOWER_ARMENIAN;case"malayalam":return B.MALAYALAM;case"mongolian":return B.MONGOLIAN;case"myanmar":return B.MYANMAR;case"oriya":return B.ORIYA;case"persian":return B.PERSIAN;case"simp-chinese-formal":return B.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return B.SIMP_CHINESE_INFORMAL;case"tamil":return B.TAMIL;case"telugu":return B.TELUGU;case"thai":return B.THAI;case"tibetan":return B.TIBETAN;case"trad-chinese-formal":return B.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return B.TRAD_CHINESE_INFORMAL;case"upper-armenian":return B.UPPER_ARMENIAN;case"disclosure-open":return B.DISCLOSURE_OPEN;case"disclosure-closed":return B.DISCLOSURE_CLOSED;case"none":default:return B.NONE}},a=(e.parseListStyle=function(A){var e=(0,r.parseBackgroundImage)(A.getPropertyValue("list-style-image"));return{listStyleType:o(A.getPropertyValue("list-style-type")),listStyleImage:e.length?e[0]:null,listStylePosition:a(A.getPropertyValue("list-style-position"))}},function(A){switch(A){case"inside":return n.INSIDE;case"outside":default:return n.OUTSIDE}})},function(A,e,t){"use strict";function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function n(A,e,t){return A.length>0?e+t.toUpperCase():A}Object.defineProperty(e,"__esModule",{value:!0});var B=function(){function A(A,e){for(var t=0;e.length>t;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),o=t(21),a=t(23);e.default=function(){function A(e,t,n){r(this,A),this.text=e,this.parent=t,this.bounds=n}return B(A,null,[{key:"fromTextNode",value:function(e,t){var r=i(e.data,t.style.textTransform);return new A(r,t,(0,a.parseTextBounds)(r,t,e))}}]),A}();var s=/(^|\s|:|-|\(|\))([a-z])/g,i=function(A,e){switch(e){case o.TEXT_TRANSFORM.LOWERCASE:return A.toLowerCase();case o.TEXT_TRANSFORM.CAPITALIZE:return A.replace(s,n);case o.TEXT_TRANSFORM.UPPERCASE:return A.toUpperCase();default:return A}}},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=t(24),n=function(A){if(A.createRange){var e=A.createRange();if(e.getBoundingClientRect){var t=A.createElement("boundtest");t.style.height="123px",t.style.display="block",A.body.appendChild(t),e.selectNode(t);var r=e.getBoundingClientRect(),n=Math.round(r.height);if(A.body.removeChild(t),123===n)return!0}}return!1},B=function(A,e){var t=new Image,r=A.createElement("canvas"),n=r.getContext("2d");return new Promise(function(A){t.src=e;var B=function(){try{n.drawImage(t,0,0),r.toDataURL()}catch(e){return A(!1)}return A(!0)};t.onload=B,t.onerror=function(){return A(!1)},!0===t.complete&&setTimeout(function(){B()},500)})},o=function(){return void 0!==(new Image).crossOrigin},a=function(){return"string"==typeof(new XMLHttpRequest).responseType},s=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(e,0,0),t.toDataURL()}catch(A){return!1}return!0},i=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},c=function(A){var e=A.createElement("canvas");e.width=100,e.height=100;var t=e.getContext("2d");t.fillStyle="rgb(0, 255, 0)",t.fillRect(0,0,100,100);var n=new Image,B=e.toDataURL();n.src=B;var o=(0,r.createForeignObjectSVG)(100,100,0,0,n);return t.fillStyle="red",t.fillRect(0,0,100,100),(0,r.loadSerializedSVG)(o).then(function(e){t.drawImage(e,0,0);var n=t.getImageData(0,0,100,100).data;t.fillStyle="red",t.fillRect(0,0,100,100);var o=A.createElement("div");return o.style.backgroundImage="url("+B+")",o.style.height="100px",i(n)?(0,r.loadSerializedSVG)((0,r.createForeignObjectSVG)(100,100,0,0,o)):Promise.reject(!1)}).then(function(A){return t.drawImage(A,0,0),i(t.getImageData(0,0,100,100).data)}).catch(function(A){return!1})},l={get SUPPORT_RANGE_BOUNDS(){var A=n(document);return Object.defineProperty(l,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=s(document);return Object.defineProperty(l,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_BASE64_DRAWING(){return function(A){var e=B(document,A);return Object.defineProperty(l,"SUPPORT_BASE64_DRAWING",{value:function(){return e}}),e}},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?c(document):Promise.resolve(!1);return Object.defineProperty(l,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=o();return Object.defineProperty(l,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A=a();return Object.defineProperty(l,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(l,"SUPPORT_CORS_XHR",{value:A}),A}};e.default=l},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseTextDecoration=e.TEXT_DECORATION_LINE=e.TEXT_DECORATION=e.TEXT_DECORATION_STYLE=void 0;var r=t(1),n=function(A){return A&&A.__esModule?A:{default:A}}(r),B=e.TEXT_DECORATION_STYLE={SOLID:0,DOUBLE:1,DOTTED:2,DASHED:3,WAVY:4},o=e.TEXT_DECORATION={NONE:null},a=e.TEXT_DECORATION_LINE={UNDERLINE:1,OVERLINE:2,LINE_THROUGH:3,BLINK:4},s=function(A){switch(A){case"underline":return a.UNDERLINE;case"overline":return a.OVERLINE;case"line-through":return a.LINE_THROUGH}return a.BLINK},i=function(A){return"none"===A?null:A.split(" ").map(s)},c=function(A){switch(A){case"double":return B.DOUBLE;case"dotted":return B.DOTTED;case"dashed":return B.DASHED;case"wavy":return B.WAVY}return B.SOLID};e.parseTextDecoration=function(A){var e=i(A.textDecorationLine?A.textDecorationLine:A.textDecoration);return null===e?o.NONE:{textDecorationLine:e,textDecorationColor:A.textDecorationColor?new n.default(A.textDecorationColor):null,textDecorationStyle:c(A.textDecorationStyle)}}},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseBorder=e.BORDER_SIDES=e.BORDER_STYLE=void 0;var r=t(1),n=function(A){return A&&A.__esModule?A:{default:A}}(r),B=e.BORDER_STYLE={NONE:0,SOLID:1},o=e.BORDER_SIDES={TOP:0,RIGHT:1,BOTTOM:2,LEFT:3},a=Object.keys(o).map(function(A){return A.toLowerCase()}),s=function(A){switch(A){case"none":return B.NONE}return B.SOLID};e.parseBorder=function(A){return a.map(function(e){var t=new n.default(A.getPropertyValue("border-"+e+"-color")),r=s(A.getPropertyValue("border-"+e+"-style")),B=parseFloat(A.getPropertyValue("border-"+e+"-width"));return{borderColor:t,borderStyle:r,borderWidth:isNaN(B)?0:B}})}},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});for(var r=(e.toCodePoints=function(A){for(var e=[],t=0,r=A.length;r>t;){var n=A.charCodeAt(t++);if(n<55296||56319<n||r<=t)e.push(n);else{var B=A.charCodeAt(t++);56320==(64512&B)?e.push(((1023&n)<<10)+(1023&B)+65536):(e.push(n),t--)}}return e},e.fromCodePoint=function(){if(String.fromCodePoint)return String.fromCodePoint.apply(String,arguments);var A=arguments.length;if(!A)return"";for(var e=[],t=-1,r="";++t<A;){var n=arguments.length>t?arguments[t]:void 0;n>65535?(n-=65536,e.push(55296+(n>>10),n%1024+56320)):e.push(n),(t+1===A||e.length>16384)&&(r+=String.fromCharCode.apply(String,e),e.length=0)}return r},"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),n="undefined"==typeof Uint8Array?[]:new Uint8Array(256),B=0;r.length>B;B++)n[r.charCodeAt(B)]=B;e.decode=function(A){var e=.75*A.length,t=A.length,r=void 0,B=0,o=void 0,a=void 0,s=void 0,i=void 0;"="===A[A.length-1]&&(e--,"="===A[A.length-2]&&e--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(e):Array(e),l=Array.isArray(c)?c:new Uint8Array(c);for(r=0;t>r;r+=4)o=n[A.charCodeAt(r)],a=n[A.charCodeAt(r+1)],s=n[A.charCodeAt(r+2)],i=n[A.charCodeAt(r+3)],l[B++]=o<<2|a>>4,l[B++]=(15&a)<<4|s>>2,l[B++]=(3&s)<<6|63&i;return c},e.polyUint16Array=function(A){for(var e=A.length,t=[],r=0;e>r;r+=2)t.push(A[r+1]<<8|A[r]);return t},e.polyUint32Array=function(A){for(var e=A.length,t=[],r=0;e>r;r+=4)t.push(A[r+3]<<24|A[r+2]<<16|A[r+1]<<8|A[r]);return t}},function(A,e,t){"use strict";function r(A){return A&&A.__esModule?A:{default:A}}Object.defineProperty(e,"__esModule",{value:!0}),e.createCounterText=e.inlineListItemElement=e.getListOwner=void 0;var n=t(5),B=t(4),o=r(B),a=t(10),s=r(a),i=t(9),c=t(25),l=["OL","UL","MENU"],u=(e.getListOwner=function(A){var e=A.parent;if(!e)return null;do{if(-1!==l.indexOf(e.tagName))return e;e=e.parent}while(e);return A.parent},e.inlineListItemElement=function(A,e,t){var r=e.style.listStyle;if(r){var B=A.ownerDocument.defaultView.getComputedStyle(A,null),a=A.ownerDocument.createElement("html2canvaswrapper");switch((0,n.copyCSSStyles)(B,a),a.style.position="absolute",a.style.bottom="auto",a.style.display="block",a.style.letterSpacing="normal",r.listStylePosition){case i.LIST_STYLE_POSITION.OUTSIDE:a.style.left="auto",a.style.right=A.ownerDocument.defaultView.innerWidth-e.bounds.left-e.style.margin[1].getAbsoluteValue(e.bounds.width)+7+"px",a.style.textAlign="right";break;case i.LIST_STYLE_POSITION.INSIDE:a.style.left=e.bounds.left-e.style.margin[3].getAbsoluteValue(e.bounds.width)+"px",a.style.right="auto",a.style.textAlign="left"}var c=void 0,l=e.style.margin[0].getAbsoluteValue(e.bounds.width),u=r.listStyleImage;if(u)if("url"===u.method){var Q=A.ownerDocument.createElement("img");Q.src=u.args[0],a.style.top=e.bounds.top-l+"px",a.style.width="auto",a.style.height="auto",a.appendChild(Q)}else{var w=.5*parseFloat(e.style.font.fontSize);a.style.top=e.bounds.top-l+e.bounds.height-1.5*w+"px",a.style.width=w+"px",a.style.height=w+"px",a.style.backgroundImage=B.listStyleImage}else"number"==typeof e.listIndex&&(c=A.ownerDocument.createTextNode(E(e.listIndex,r.listStyleType,!0)),a.appendChild(c),a.style.top=e.bounds.top-l+"px");var g=A.ownerDocument.body;g.appendChild(a),c?(e.childNodes.push(s.default.fromTextNode(c,e)),g.removeChild(a)):e.childNodes.push(new o.default(a,e,t,0))}},{integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]}),Q={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},w={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},g={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},U=function(A,e,t,r,n,B){return e>A||A>t?E(A,n,B.length>0):r.integers.reduce(function(e,t,n){for(;A>=t;)A-=t,e+=r.values[n];return e},"")+B},d=function(A,e,t,r){var n="";do{t||A--,n=r(A)+n,A/=e}while(A*e>=e);return n},C=function(A,e,t,r,n){var B=t-e+1;return(0>A?"-":"")+(d(Math.abs(A),B,r,function(A){return(0,c.fromCodePoint)(Math.floor(A%B)+e)})+n)},F=function(A,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:". ",r=e.length;return d(Math.abs(A),r,!1,function(A){return e[Math.floor(A%r)]})+t},f=function(A,e,t,r,B,o){if(-9999>A||A>9999)return E(A,i.LIST_STYLE_TYPE.CJK_DECIMAL,B.length>0);var a=Math.abs(A),s=B;if(0===a)return e[0]+s;for(var c=0;a>0&&4>=c;c++){var l=a%10;0===l&&(0,n.contains)(o,1)&&""!==s?s=e[l]+s:l>1||1===l&&0===c||1===l&&1===c&&(0,n.contains)(o,2)||1===l&&1===c&&(0,n.contains)(o,4)&&A>100||1===l&&c>1&&(0,n.contains)(o,8)?s=e[l]+(c>0?t[c-1]:"")+s:1===l&&c>0&&(s=t[c-1]+s),a=Math.floor(a/10)}return(0>A?r:"")+s},E=e.createCounterText=function(A,e,t){var r=t?". ":"",n=t?"、":"",B=t?", ":"";switch(e){case i.LIST_STYLE_TYPE.DISC:return"•";case i.LIST_STYLE_TYPE.CIRCLE:return"◦";case i.LIST_STYLE_TYPE.SQUARE:return"◾";case i.LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:var o=C(A,48,57,!0,r);return 4>o.length?"0"+o:o;case i.LIST_STYLE_TYPE.CJK_DECIMAL:return F(A,"〇一二三四五六七八九",n);case i.LIST_STYLE_TYPE.LOWER_ROMAN:return U(A,1,3999,u,i.LIST_STYLE_TYPE.DECIMAL,r).toLowerCase();case i.LIST_STYLE_TYPE.UPPER_ROMAN:return U(A,1,3999,u,i.LIST_STYLE_TYPE.DECIMAL,r);case i.LIST_STYLE_TYPE.LOWER_GREEK:return C(A,945,969,!1,r);case i.LIST_STYLE_TYPE.LOWER_ALPHA:return C(A,97,122,!1,r);case i.LIST_STYLE_TYPE.UPPER_ALPHA:return C(A,65,90,!1,r);case i.LIST_STYLE_TYPE.ARABIC_INDIC:return C(A,1632,1641,!0,r);case i.LIST_STYLE_TYPE.ARMENIAN:case i.LIST_STYLE_TYPE.UPPER_ARMENIAN:return U(A,1,9999,Q,i.LIST_STYLE_TYPE.DECIMAL,r);case i.LIST_STYLE_TYPE.LOWER_ARMENIAN:return U(A,1,9999,Q,i.LIST_STYLE_TYPE.DECIMAL,r).toLowerCase();case i.LIST_STYLE_TYPE.BENGALI:return C(A,2534,2543,!0,r);case i.LIST_STYLE_TYPE.CAMBODIAN:case i.LIST_STYLE_TYPE.KHMER:return C(A,6112,6121,!0,r);case i.LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:return F(A,"子丑寅卯辰巳午未申酉戌亥",n);case i.LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:return F(A,"甲乙丙丁戊己庚辛壬癸",n);case i.LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:case i.LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:return f(A,"零一二三四五六七八九","十百千萬","負",n,14);case i.LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:return f(A,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",n,15);case i.LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:return f(A,"零一二三四五六七八九","十百千萬","负",n,14);case i.LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:return f(A,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",n,15);case i.LIST_STYLE_TYPE.JAPANESE_INFORMAL:return f(A,"〇一二三四五六七八九","十百千万","マイナス",n,0);case i.LIST_STYLE_TYPE.JAPANESE_FORMAL:return f(A,"零壱弐参四伍六七八九","拾百千万","マイナス",n,7);case i.LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:return f(A,"영일이삼사오육칠팔구","십백천만","마이너스 ",B,7);case i.LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:return f(A,"零一二三四五六七八九","十百千萬","마이너스 ",B,0);case i.LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:return f(A,"零壹貳參四五六七八九","拾百千","마이너스 ",B,7);case i.LIST_STYLE_TYPE.DEVANAGARI:return C(A,2406,2415,!0,r);case i.LIST_STYLE_TYPE.GEORGIAN:return U(A,1,19999,g,i.LIST_STYLE_TYPE.DECIMAL,r);case i.LIST_STYLE_TYPE.GUJARATI:return C(A,2790,2799,!0,r);case i.LIST_STYLE_TYPE.GURMUKHI:return C(A,2662,2671,!0,r);case i.LIST_STYLE_TYPE.HEBREW:return U(A,1,10999,w,i.LIST_STYLE_TYPE.DECIMAL,r);case i.LIST_STYLE_TYPE.HIRAGANA:return F(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case i.LIST_STYLE_TYPE.HIRAGANA_IROHA:return F(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case i.LIST_STYLE_TYPE.KANNADA:return C(A,3302,3311,!0,r);case i.LIST_STYLE_TYPE.KATAKANA:return F(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case i.LIST_STYLE_TYPE.KATAKANA_IROHA:return F(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case i.LIST_STYLE_TYPE.LAO:return C(A,3792,3801,!0,r);case i.LIST_STYLE_TYPE.MONGOLIAN:return C(A,6160,6169,!0,r);case i.LIST_STYLE_TYPE.MYANMAR:return C(A,4160,4169,!0,r);case i.LIST_STYLE_TYPE.ORIYA:return C(A,2918,2927,!0,r);case i.LIST_STYLE_TYPE.PERSIAN:return C(A,1776,1785,!0,r);case i.LIST_STYLE_TYPE.TAMIL:return C(A,3046,3055,!0,r);case i.LIST_STYLE_TYPE.TELUGU:return C(A,3174,3183,!0,r);case i.LIST_STYLE_TYPE.THAI:return C(A,3664,3673,!0,r);case i.LIST_STYLE_TYPE.TIBETAN:return C(A,3872,3881,!0,r);case i.LIST_STYLE_TYPE.DECIMAL:default:return C(A,48,57,!0,r)}}},function(A,e,t){"use strict";function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function A(A,e){for(var t=0;e.length>t;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(A,r.key,r)}}return function(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}}(),B=t(7),o=t(12),a=function(A,e){var t=Math.max.apply(null,A.colorStops.map(function(A){return A.stop})),r=1/Math.max(1,t);A.colorStops.forEach(function(A){e.addColorStop(r*A.stop,""+A.color)})};e.default=function(){function A(e){r(this,A),this.canvas=e||document.createElement("canvas")}return n(A,[{key:"render",value:function(A){this.ctx=this.canvas.getContext("2d"),this.options=A,this.canvas.width=Math.floor(A.width*A.scale),this.canvas.height=Math.floor(A.height*A.scale),this.canvas.style.width=A.width+"px",this.canvas.style.height=A.height+"px",this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-A.x,-A.y),this.ctx.textBaseline="bottom",A.logger.log("Canvas renderer initialized ("+A.width+"x"+A.height+" at "+A.x+","+A.y+") with scale "+this.options.scale)}},{key:"clip",value:function(A,e){var t=this;A.length&&(this.ctx.save(),A.forEach(function(A){t.path(A),t.ctx.clip()})),e(),A.length&&this.ctx.restore()}},{key:"drawImage",value:function(A,e,t){this.ctx.drawImage(A,e.left,e.top,e.width,e.height,t.left,t.top,t.width,t.height)}},{key:"drawShape",value:function(A,e){this.path(A),this.ctx.fillStyle=""+e,this.ctx.fill()}},{key:"fill",value:function(A){this.ctx.fillStyle=""+A,this.ctx.fill()}},{key:"getTarget",value:function(){return this.canvas.getContext("2d").setTransform(1,0,0,1,0,0),Promise.resolve(this.canvas)}},{key:"path",value:function(A){var e=this;this.ctx.beginPath(),Array.isArray(A)?A.forEach(function(A,t){var r=A.type===B.PATH.VECTOR?A:A.start;0===t?e.ctx.moveTo(r.x,r.y):e.ctx.lineTo(r.x,r.y),A.type===B.PATH.BEZIER_CURVE&&e.ctx.bezierCurveTo(A.startControl.x,A.startControl.y,A.endControl.x,A.endControl.y,A.end.x,A.end.y)}):this.ctx.arc(A.x+A.radius,A.y+A.radius,A.radius,0,2*Math.PI,!0),this.ctx.closePath()}},{key:"rectangle",value:function(A,e,t,r,n){this.ctx.fillStyle=""+n,this.ctx.fillRect(A,e,t,r)}},{key:"renderLinearGradient",value:function(A,e){var t=this.ctx.createLinearGradient(A.left+e.direction.x1,A.top+e.direction.y1,A.left+e.direction.x0,A.top+e.direction.y0);a(e,t),this.ctx.fillStyle=t,this.ctx.fillRect(A.left,A.top,A.width,A.height)}},{key:"renderRadialGradient",value:function(A,e){var t=this,r=A.left+e.center.x,n=A.top+e.center.y,B=this.ctx.createRadialGradient(r,n,0,r,n,e.radius.x);if(B)if(a(e,B),this.ctx.fillStyle=B,e.radius.x!==e.radius.y){var o=A.left+.5*A.width,s=A.top+.5*A.height,i=e.radius.y/e.radius.x,c=1/i;this.transform(o,s,[1,0,0,i,0,0],function(){return t.ctx.fillRect(A.left,c*(A.top-s)+s,A.width,A.height*c)})}else this.ctx.fillRect(A.left,A.top,A.width,A.height)}},{key:"renderRepeat",value:function(A,e,t,r,n){this.path(A),this.ctx.fillStyle=this.ctx.createPattern(this.resizeImage(e,t),"repeat"),this.ctx.translate(r,n),this.ctx.fill(),this.ctx.translate(-r,-n)}},{key:"renderTextNode",value:function(A,e,t,r,n){var B=this;this.ctx.font=[t.fontStyle,t.fontVariant,t.fontWeight,t.fontSize,t.fontFamily].join(" "),A.forEach(function(A){if(B.ctx.fillStyle=""+e,n&&A.text.trim().length?n.slice(0).reverse().forEach(function(e){B.ctx.shadowColor=""+e.color,B.ctx.shadowOffsetX=e.offsetX*B.options.scale,B.ctx.shadowOffsetY=e.offsetY*B.options.scale,B.ctx.shadowBlur=e.blur,B.ctx.fillText(A.text,A.bounds.left,A.bounds.top+A.bounds.height)}):B.ctx.fillText(A.text,A.bounds.left,A.bounds.top+A.bounds.height),null!==r){var a=r.textDecorationColor||e;r.textDecorationLine.forEach(function(e){switch(e){case o.TEXT_DECORATION_LINE.UNDERLINE:var r=B.options.fontMetrics.getMetrics(t),n=r.baseline;B.rectangle(A.bounds.left,Math.round(A.bounds.top+n),A.bounds.width,1,a);break;case o.TEXT_DECORATION_LINE.OVERLINE:B.rectangle(A.bounds.left,Math.round(A.bounds.top),A.bounds.width,1,a);break;case o.TEXT_DECORATION_LINE.LINE_THROUGH:var s=B.options.fontMetrics.getMetrics(t),i=s.middle;B.rectangle(A.bounds.left,Math.ceil(A.bounds.top+i),A.bounds.width,1,a)}})}})}},{key:"resizeImage",value:function(A,e){if(A.width===e.width&&A.height===e.height)return A;var t=this.canvas.ownerDocument.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(A,0,0,A.width,A.height,0,0,e.width,e.height),t}},{key:"setOpacity",value:function(A){this.ctx.globalAlpha=A}},{key:"transform",value:function(A,e,t,r){this.ctx.save(),this.ctx.translate(A,e),this.ctx.transform(t[0],t[1],t[2],t[3],t[4],t[5]),