import{d as A,r as e,P as t,o as r,c as B,g as n,f as s,h as o,w as i,j as a,l as c,t as Q,u as g,m as w,n as l,F as u,k as U,e as C,x as F,a4 as h,a5 as d,a6 as f}from"./index.012ca997.js";import{b as p}from"./browser.c7be5676.js";import{_ as H}from"./plugin-vue_export-helper.21dcd24c.js";
/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var E=function(A,e){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=e[t])})(A,e)};function I(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=A}E(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}var y=function(){return y=Object.assign||function(A){for(var e,t=1,r=arguments.length;t<r;t++)for(var B in e=arguments[t])Object.prototype.hasOwnProperty.call(e,B)&&(A[B]=e[B]);return A},y.apply(this,arguments)};function K(A,e,t,r){return new(t||(t=Promise))((function(B,n){function s(A){try{i(r.next(A))}catch(e){n(e)}}function o(A){try{i(r.throw(A))}catch(e){n(e)}}function i(A){var e;A.done?B(A.value):(e=A.value,e instanceof t?e:new t((function(A){A(e)}))).then(s,o)}i((r=r.apply(A,e||[])).next())}))}function m(A,e){var t,r,B,n,s={label:0,sent:function(){if(1&B[0])throw B[1];return B[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(B=2&n[0]?r.return:n[0]?r.throw||((B=r.return)&&B.call(r),0):r.next)&&!(B=B.call(r,n[1])).done)return B;switch(r=0,B&&(n=[2&n[0],B.value]),n[0]){case 0:case 1:B=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,r=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(B=s.trys,(B=B.length>0&&B[B.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!B||n[1]>B[0]&&n[1]<B[3])){s.label=n[1];break}if(6===n[0]&&s.label<B[1]){s.label=B[1],B=n;break}if(B&&s.label<B[2]){s.label=B[2],s.ops.push(n);break}B[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(A,s)}catch(o){n=[6,o],r=0}finally{t=B=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,o])}}}function L(A,e,t){if(t||2===arguments.length)for(var r,B=0,n=e.length;B<n;B++)!r&&B in e||(r||(r=Array.prototype.slice.call(e,0,B)),r[B]=e[B]);return A.concat(r||e)}for(var v=function(){function A(A,e,t,r){this.left=A,this.top=e,this.width=t,this.height=r}return A.prototype.add=function(e,t,r,B){return new A(this.left+e,this.top+t,this.width+r,this.height+B)},A.fromClientRect=function(e,t){return new A(t.left+e.windowBounds.left,t.top+e.windowBounds.top,t.width,t.height)},A.fromDOMRectList=function(e,t){var r=Array.from(t).find((function(A){return 0!==A.width}));return r?new A(r.left+e.windowBounds.left,r.top+e.windowBounds.top,r.width,r.height):A.EMPTY},A.EMPTY=new A(0,0,0,0),A}(),b=function(A,e){return v.fromClientRect(A,e.getBoundingClientRect())},D=function(A){for(var e=[],t=0,r=A.length;t<r;){var B=A.charCodeAt(t++);if(B>=55296&&B<=56319&&t<r){var n=A.charCodeAt(t++);56320==(64512&n)?e.push(((1023&B)<<10)+(1023&n)+65536):(e.push(B),t--)}else e.push(B)}return e},x=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var r=[],B=-1,n="";++B<t;){var s=A[B];s<=65535?r.push(s):(s-=65536,r.push(55296+(s>>10),s%1024+56320)),(B+1===t||r.length>16384)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n},M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S="undefined"==typeof Uint8Array?[]:new Uint8Array(256),T=0;T<M.length;T++)S[M.charCodeAt(T)]=T;for(var G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O="undefined"==typeof Uint8Array?[]:new Uint8Array(256),V=0;V<G.length;V++)O[G.charCodeAt(V)]=V;for(var k=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},R=function(){function A(A,e,t,r,B,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=B,this.data=n}return A.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A<this.highStart)return e=2080+(A>>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P="undefined"==typeof Uint8Array?[]:new Uint8Array(256),X=0;X<N.length;X++)P[N.charCodeAt(X)]=X;var J,Y,W,Z,_,q,j,z,$=10,AA=13,eA=15,tA=17,rA=18,BA=19,nA=20,sA=21,oA=22,iA=24,aA=25,cA=26,QA=27,gA=28,wA=30,lA=32,uA=33,UA=34,CA=35,FA=37,hA=38,dA=39,fA=40,pA=42,HA=[9001,65288],EA=(Z=function(A){var e,t,r,B,n,s=.75*A.length,o=A.length,i=0;"="===A[A.length-1]&&(s--,"="===A[A.length-2]&&s--);var a="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(s):new Array(s),c=Array.isArray(a)?a:new Uint8Array(a);for(e=0;e<o;e+=4)t=O[A.charCodeAt(e)],r=O[A.charCodeAt(e+1)],B=O[A.charCodeAt(e+2)],n=O[A.charCodeAt(e+3)],c[i++]=t<<2|r>>4,c[i++]=(15&r)<<4|B>>2,c[i++]=(3&B)<<6|63&n;return a}(" "),_=Array.isArray(Z)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=4)t.push(A[r+3]<<24|A[r+2]<<16|A[r+1]<<8|A[r]);return t}(Z):new Uint32Array(Z),q=Array.isArray(Z)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t}(Z):new Uint16Array(Z),j=k(q,12,_[4]/2),z=2===_[5]?k(q,(24+_[4])/2):(J=_,Y=Math.ceil((24+_[4])/4),J.slice?J.slice(Y,W):new Uint32Array(Array.prototype.slice.call(J,Y,W))),new R(_[0],_[1],_[2],_[3],j,z)),IA=[wA,36],yA=[1,2,3,5],KA=[$,8],mA=[QA,cA],LA=yA.concat(KA),vA=[hA,dA,fA,UA,CA],bA=[eA,AA],DA=function(A,e,t,r){var B=r[t];if(Array.isArray(A)?-1!==A.indexOf(B):A===B)for(var n=t;n<=r.length;){if((i=r[++n])===e)return!0;if(i!==$)break}if(B===$)for(n=t;n>0;){var s=r[--n];if(Array.isArray(A)?-1!==A.indexOf(s):A===s)for(var o=t;o<=r.length;){var i;if((i=r[++o])===e)return!0;if(i!==$)break}if(s!==$)break}return!1},xA=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r!==$)return r;t--}return 0},MA=function(A,e,t,r,B){if(0===t[r])return"×";var n=r-1;if(Array.isArray(B)&&!0===B[n])return"×";var s=n-1,o=n+1,i=e[n],a=s>=0?e[s]:0,c=e[o];if(2===i&&3===c)return"×";if(-1!==yA.indexOf(i))return"!";if(-1!==yA.indexOf(c))return"×";if(-1!==KA.indexOf(c))return"×";if(8===xA(n,e))return"÷";if(11===EA.get(A[n]))return"×";if((i===lA||i===uA)&&11===EA.get(A[o]))return"×";if(7===i||7===c)return"×";if(9===i)return"×";if(-1===[$,AA,eA].indexOf(i)&&9===c)return"×";if(-1!==[tA,rA,BA,iA,gA].indexOf(c))return"×";if(xA(n,e)===oA)return"×";if(DA(23,oA,n,e))return"×";if(DA([tA,rA],sA,n,e))return"×";if(DA(12,12,n,e))return"×";if(i===$)return"÷";if(23===i||23===c)return"×";if(16===c||16===i)return"÷";if(-1!==[AA,eA,sA].indexOf(c)||14===i)return"×";if(36===a&&-1!==bA.indexOf(i))return"×";if(i===gA&&36===c)return"×";if(c===nA)return"×";if(-1!==IA.indexOf(c)&&i===aA||-1!==IA.indexOf(i)&&c===aA)return"×";if(i===QA&&-1!==[FA,lA,uA].indexOf(c)||-1!==[FA,lA,uA].indexOf(i)&&c===cA)return"×";if(-1!==IA.indexOf(i)&&-1!==mA.indexOf(c)||-1!==mA.indexOf(i)&&-1!==IA.indexOf(c))return"×";if(-1!==[QA,cA].indexOf(i)&&(c===aA||-1!==[oA,eA].indexOf(c)&&e[o+1]===aA)||-1!==[oA,eA].indexOf(i)&&c===aA||i===aA&&-1!==[aA,gA,iA].indexOf(c))return"×";if(-1!==[aA,gA,iA,tA,rA].indexOf(c))for(var Q=n;Q>=0;){if((g=e[Q])===aA)return"×";if(-1===[gA,iA].indexOf(g))break;Q--}if(-1!==[QA,cA].indexOf(c))for(Q=-1!==[tA,rA].indexOf(i)?s:n;Q>=0;){var g;if((g=e[Q])===aA)return"×";if(-1===[gA,iA].indexOf(g))break;Q--}if(hA===i&&-1!==[hA,dA,UA,CA].indexOf(c)||-1!==[dA,UA].indexOf(i)&&-1!==[dA,fA].indexOf(c)||-1!==[fA,CA].indexOf(i)&&c===fA)return"×";if(-1!==vA.indexOf(i)&&-1!==[nA,cA].indexOf(c)||-1!==vA.indexOf(c)&&i===QA)return"×";if(-1!==IA.indexOf(i)&&-1!==IA.indexOf(c))return"×";if(i===iA&&-1!==IA.indexOf(c))return"×";if(-1!==IA.concat(aA).indexOf(i)&&c===oA&&-1===HA.indexOf(A[o])||-1!==IA.concat(aA).indexOf(c)&&i===rA)return"×";if(41===i&&41===c){for(var w=t[n],l=1;w>0&&41===e[--w];)l++;if(l%2!=0)return"×"}return i===lA&&c===uA?"×":"÷"},SA=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=function(A,e){void 0===e&&(e="strict");var t=[],r=[],B=[];return A.forEach((function(A,n){var s=EA.get(A);if(s>50?(B.push(!0),s-=50):B.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(A))return r.push(n),t.push(16);if(4===s||11===s){if(0===n)return r.push(n),t.push(wA);var o=t[n-1];return-1===LA.indexOf(o)?(r.push(r[n-1]),t.push(o)):(r.push(n),t.push(wA))}return r.push(n),31===s?t.push("strict"===e?sA:FA):s===pA||29===s?t.push(wA):43===s?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(FA):t.push(wA):void t.push(s)})),[r,t,B]}(A,e.lineBreak),r=t[0],B=t[1],n=t[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(B=B.map((function(A){return-1!==[aA,wA,pA].indexOf(A)?FA:A})));var s="keep-all"===e.wordBreak?n.map((function(e,t){return e&&A[t]>=19968&&A[t]<=40959})):void 0;return[r,B,s]},TA=function(){function A(A,e,t,r){this.codePoints=A,this.required="!"===e,this.start=t,this.end=r}return A.prototype.slice=function(){return x.apply(void 0,this.codePoints.slice(this.start,this.end))},A}(),GA=function(A){return A>=48&&A<=57},OA=function(A){return GA(A)||A>=65&&A<=70||A>=97&&A<=102},VA=function(A){return 10===A||9===A||32===A},kA=function(A){return function(A){return function(A){return A>=97&&A<=122}(A)||function(A){return A>=65&&A<=90}(A)}(A)||function(A){return A>=128}(A)||95===A},RA=function(A){return kA(A)||GA(A)||45===A},NA=function(A){return A>=0&&A<=8||11===A||A>=14&&A<=31||127===A},PA=function(A,e){return 92===A&&10!==e},XA=function(A,e,t){return 45===A?kA(e)||PA(e,t):!!kA(A)||!(92!==A||!PA(A,e))},JA=function(A,e,t){return 43===A||45===A?!!GA(e)||46===e&&GA(t):GA(46===A?e:A)},YA=function(A){var e=0,t=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(t=-1),e++);for(var r=[];GA(A[e]);)r.push(A[e++]);var B=r.length?parseInt(x.apply(void 0,r),10):0;46===A[e]&&e++;for(var n=[];GA(A[e]);)n.push(A[e++]);var s=n.length,o=s?parseInt(x.apply(void 0,n),10):0;69!==A[e]&&101!==A[e]||e++;var i=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(i=-1),e++);for(var a=[];GA(A[e]);)a.push(A[e++]);var c=a.length?parseInt(x.apply(void 0,a),10):0;return t*(B+o*Math.pow(10,-s))*Math.pow(10,i*c)},WA={type:2},ZA={type:3},_A={type:4},qA={type:13},jA={type:8},zA={type:21},$A={type:9},Ae={type:10},ee={type:11},te={type:12},re={type:14},Be={type:23},ne={type:1},se={type:25},oe={type:24},ie={type:26},ae={type:27},ce={type:28},Qe={type:29},ge={type:31},we={type:32},le=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(D(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==we;)A.push(e),e=this.consumeToken();return A},A.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case 34:return this.consumeStringToken(34);case 35:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),r=this.peekCodePoint(2);if(RA(e)||PA(t,r)){var B=XA(e,t,r)?2:1;return{type:5,value:this.consumeName(),flags:B}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),qA;break;case 39:return this.consumeStringToken(39);case 40:return WA;case 41:return ZA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),re;break;case 43:if(JA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 44:return _A;case 45:var n=A,s=this.peekCodePoint(0),o=this.peekCodePoint(1);if(JA(n,s,o))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(XA(n,s,o))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(45===s&&62===o)return this.consumeCodePoint(),this.consumeCodePoint(),oe;break;case 46:if(JA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var i=this.consumeCodePoint();if(42===i&&47===(i=this.consumeCodePoint()))return this.consumeToken();if(-1===i)return this.consumeToken()}break;case 58:return ie;case 59:return ae;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),se;break;case 64:var a=this.peekCodePoint(0),c=this.peekCodePoint(1),Q=this.peekCodePoint(2);if(XA(a,c,Q))return{type:7,value:this.consumeName()};break;case 91:return ce;case 92:if(PA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case 93:return Qe;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),jA;break;case 123:return ee;case 125:return te;case 117:case 85:var g=this.peekCodePoint(0),w=this.peekCodePoint(1);return 43!==g||!OA(w)&&63!==w||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),$A;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),zA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ae;break;case-1:return we}return VA(A)?(this.consumeWhiteSpace(),ge):GA(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):kA(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:x(A)}},A.prototype.consumeCodePoint=function(){var A=this._value.shift();return void 0===A?-1:A},A.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},A.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},A.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();OA(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;63===e&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t)return{type:30,start:parseInt(x.apply(void 0,A.map((function(A){return 63===A?48:A}))),16),end:parseInt(x.apply(void 0,A.map((function(A){return 63===A?70:A}))),16)};var r=parseInt(x.apply(void 0,A),16);if(45===this.peekCodePoint(0)&&OA(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var B=[];OA(e)&&B.length<6;)B.push(e),e=this.consumeCodePoint();return{type:30,start:r,end:parseInt(x.apply(void 0,B),16)}}return{type:30,start:r,end:r}},A.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:22,value:""};var e=this.peekCodePoint(0);if(39===e||34===e){var t=this.consumeStringToken(this.consumeCodePoint());return 0===t.type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),Be)}for(;;){var r=this.consumeCodePoint();if(-1===r||41===r)return{type:22,value:x.apply(void 0,A)};if(VA(r))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:x.apply(void 0,A)}):(this.consumeBadUrlRemnants(),Be);if(34===r||39===r||40===r||NA(r))return this.consumeBadUrlRemnants(),Be;if(92===r){if(!PA(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Be;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},A.prototype.consumeWhiteSpace=function(){for(;VA(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(41===A||-1===A)return;PA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e="";A>0;){var t=Math.min(5e4,A);e+=x.apply(void 0,this._value.splice(0,t)),A-=t}return this._value.shift(),e},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r=this._value[t];if(-1===r||void 0===r||r===A)return{type:0,value:e+=this.consumeStringSlice(t)};if(10===r)return this._value.splice(0,t),ne;if(92===r){var B=this._value[t+1];-1!==B&&void 0!==B&&(10===B?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):PA(r,B)&&(e+=this.consumeStringSlice(t),e+=x(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=4,t=this.peekCodePoint(0);for(43!==t&&45!==t||A.push(this.consumeCodePoint());GA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===t&&GA(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;GA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var B=this.peekCodePoint(2);if((69===t||101===t)&&((43===r||45===r)&&GA(B)||GA(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;GA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[YA(A),e]},A.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],r=this.peekCodePoint(0),B=this.peekCodePoint(1),n=this.peekCodePoint(2);return XA(r,B,n)?{type:15,number:e,flags:t,unit:this.consumeName()}:37===r?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(OA(A)){for(var e=x(A);OA(this.peekCodePoint(0))&&e.length<6;)e+=x(this.consumeCodePoint());VA(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||function(A){return A>=55296&&A<=57343}(t)||t>1114111?65533:t}return-1===A?65533:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(RA(e))A+=x(e);else{if(!PA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=x(this.consumeEscapedCodePoint())}}},A}(),ue=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new le;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var A=this.consumeToken();31===A.type;)A=this.consumeToken();if(32===A.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do{A=this.consumeToken()}while(31===A.type);if(32===A.type)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(32===e.type)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},A.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(32===t.type||Ee(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},A.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:18};;){var t=this.consumeToken();if(32===t.type||3===t.type)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var A=this._tokens.shift();return void 0===A?we:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),Ue=function(A){return 15===A.type},Ce=function(A){return 17===A.type},Fe=function(A){return 20===A.type},he=function(A){return 0===A.type},de=function(A,e){return Fe(A)&&A.value===e},fe=function(A){return 31!==A.type},pe=function(A){return 31!==A.type&&4!==A.type},He=function(A){var e=[],t=[];return A.forEach((function(A){if(4===A.type){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}31!==A.type&&t.push(A)})),t.length&&e.push(t),e},Ee=function(A,e){return 11===e&&12===A.type||(28===e&&29===A.type||2===e&&3===A.type)},Ie=function(A){return 17===A.type||15===A.type},ye=function(A){return 16===A.type||Ie(A)},Ke=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},me={type:17,number:0,flags:4},Le={type:16,number:50,flags:4},ve={type:16,number:100,flags:4},be=function(A,e,t){var r=A[0],B=A[1];return[De(r,e),De(void 0!==B?B:r,t)]},De=function(A,e){if(16===A.type)return A.number/100*e;if(Ue(A))switch(A.unit){case"rem":case"em":return 16*A.number;default:return A.number}return A.number},xe=function(A,e){if(15===e.type)switch(e.unit){case"deg":return Math.PI*e.number/180;case"grad":return Math.PI/200*e.number;case"rad":return e.number;case"turn":return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},Me=function(A){return 15===A.type&&("deg"===A.unit||"grad"===A.unit||"rad"===A.unit||"turn"===A.unit)},Se=function(A){switch(A.filter(Fe).map((function(A){return A.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[me,me];case"to top":case"bottom":return Te(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[me,ve];case"to right":case"left":return Te(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ve,ve];case"to bottom":case"top":return Te(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ve,me];case"to left":case"right":return Te(270)}return 0},Te=function(A){return Math.PI*A/180},Ge=function(A,e){if(18===e.type){var t=Je[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(A,e.values)}if(5===e.type){if(3===e.value.length){var r=e.value.substring(0,1),B=e.value.substring(1,2),n=e.value.substring(2,3);return ke(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),1)}if(4===e.value.length){r=e.value.substring(0,1),B=e.value.substring(1,2),n=e.value.substring(2,3);var s=e.value.substring(3,4);return ke(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),parseInt(s+s,16)/255)}if(6===e.value.length){r=e.value.substring(0,2),B=e.value.substring(2,4),n=e.value.substring(4,6);return ke(parseInt(r,16),parseInt(B,16),parseInt(n,16),1)}if(8===e.value.length){r=e.value.substring(0,2),B=e.value.substring(2,4),n=e.value.substring(4,6),s=e.value.substring(6,8);return ke(parseInt(r,16),parseInt(B,16),parseInt(n,16),parseInt(s,16)/255)}}if(20===e.type){var o=We[e.value.toUpperCase()];if(void 0!==o)return o}return We.TRANSPARENT},Oe=function(A){return 0==(255&A)},Ve=function(A){var e=255&A,t=255&A>>8,r=255&A>>16,B=255&A>>24;return e<255?"rgba("+B+","+r+","+t+","+e/255+")":"rgb("+B+","+r+","+t+")"},ke=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r)<<0)>>>0},Re=function(A,e){if(17===A.type)return A.number;if(16===A.type){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},Ne=function(A,e){var t=e.filter(pe);if(3===t.length){var r=t.map(Re),B=r[0],n=r[1],s=r[2];return ke(B,n,s,1)}if(4===t.length){var o=t.map(Re),i=(B=o[0],n=o[1],s=o[2],o[3]);return ke(B,n,s,i)}return 0};function Pe(A,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}var Xe=function(A,e){var t=e.filter(pe),r=t[0],B=t[1],n=t[2],s=t[3],o=(17===r.type?Te(r.number):xe(A,r))/(2*Math.PI),i=ye(B)?B.number/100:0,a=ye(n)?n.number/100:0,c=void 0!==s&&ye(s)?De(s,1):1;if(0===i)return ke(255*a,255*a,255*a,1);var Q=a<=.5?a*(i+1):a+i-a*i,g=2*a-Q,w=Pe(g,Q,o+1/3),l=Pe(g,Q,o),u=Pe(g,Q,o-1/3);return ke(255*w,255*l,255*u,c)},Je={hsl:Xe,hsla:Xe,rgb:Ne,rgba:Ne},Ye=function(A,e){return Ge(A,ue.create(e).parseComponentValue())},We={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Ze={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map((function(A){if(Fe(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},_e={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},qe=function(A,e){var t=Ge(A,e[0]),r=e[1];return r&&ye(r)?{color:t,stop:r}:{color:t,stop:null}},je=function(A,e){var t=A[0],r=A[A.length-1];null===t.stop&&(t.stop=me),null===r.stop&&(r.stop=ve);for(var B=[],n=0,s=0;s<A.length;s++){var o=A[s].stop;if(null!==o){var i=De(o,e);i>n?B.push(i):B.push(n),n=i}else B.push(null)}var a=null;for(s=0;s<B.length;s++){var c=B[s];if(null===c)null===a&&(a=s);else if(null!==a){for(var Q=s-a,g=(c-B[a-1])/(Q+1),w=1;w<=Q;w++)B[a+w-1]=g*w;a=null}}return A.map((function(A,t){return{color:A.color,stop:Math.max(Math.min(1,B[t]/e),0)}}))},ze=function(A,e,t){var r="number"==typeof A?A:function(A,e,t){var r=e/2,B=t/2,n=De(A[0],e)-r,s=B-De(A[1],t);return(Math.atan2(s,n)+2*Math.PI)%(2*Math.PI)}(A,e,t),B=Math.abs(e*Math.sin(r))+Math.abs(t*Math.cos(r)),n=e/2,s=t/2,o=B/2,i=Math.sin(r-Math.PI/2)*o,a=Math.cos(r-Math.PI/2)*o;return[B,n-a,n+a,s-i,s+i]},$e=function(A,e){return Math.sqrt(A*A+e*e)},At=function(A,e,t,r,B){return[[0,0],[0,e],[A,0],[A,e]].reduce((function(A,e){var n=e[0],s=e[1],o=$e(t-n,r-s);return(B?o<A.optimumDistance:o>A.optimumDistance)?{optimumCorner:e,optimumDistance:o}:A}),{optimumDistance:B?1/0:-1/0,optimumCorner:null}).optimumCorner},et=function(A,e){var t=Te(180),r=[];return He(e).forEach((function(e,B){if(0===B){var n=e[0];if(20===n.type&&-1!==["top","left","right","bottom"].indexOf(n.value))return void(t=Se(e));if(Me(n))return void(t=(xe(A,n)+Te(270))%Te(360))}var s=qe(A,e);r.push(s)})),{angle:t,stops:r,type:1}},tt=function(A,e){var t=0,r=3,B=[],n=[];return He(e).forEach((function(e,s){var o=!0;if(0===s?o=e.reduce((function(A,e){if(Fe(e))switch(e.value){case"center":return n.push(Le),!1;case"top":case"left":return n.push(me),!1;case"right":case"bottom":return n.push(ve),!1}else if(ye(e)||Ie(e))return n.push(e),!1;return A}),o):1===s&&(o=e.reduce((function(A,e){if(Fe(e))switch(e.value){case"circle":return t=0,!1;case"ellipse":return t=1,!1;case"contain":case"closest-side":return r=0,!1;case"farthest-side":return r=1,!1;case"closest-corner":return r=2,!1;case"cover":case"farthest-corner":return r=3,!1}else if(Ie(e)||ye(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return A}),o)),o){var i=qe(A,e);B.push(i)}})),{size:r,shape:t,stops:B,position:n,type:2}},rt=function(A,e){if(22===e.type){var t={url:e.value,type:0};return A.cache.addImage(e.value),t}if(18===e.type){var r=st[e.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return r(A,e.values)}throw new Error("Unsupported image type "+e.type)};var Bt,nt,st={"linear-gradient":function(A,e){var t=Te(180),r=[];return He(e).forEach((function(e,B){if(0===B){var n=e[0];if(20===n.type&&"to"===n.value)return void(t=Se(e));if(Me(n))return void(t=xe(A,n))}var s=qe(A,e);r.push(s)})),{angle:t,stops:r,type:1}},"-moz-linear-gradient":et,"-ms-linear-gradient":et,"-o-linear-gradient":et,"-webkit-linear-gradient":et,"radial-gradient":function(A,e){var t=0,r=3,B=[],n=[];return He(e).forEach((function(e,s){var o=!0;if(0===s){var i=!1;o=e.reduce((function(A,e){if(i)if(Fe(e))switch(e.value){case"center":return n.push(Le),A;case"top":case"left":return n.push(me),A;case"right":case"bottom":return n.push(ve),A}else(ye(e)||Ie(e))&&n.push(e);else if(Fe(e))switch(e.value){case"circle":return t=0,!1;case"ellipse":return t=1,!1;case"at":return i=!0,!1;case"closest-side":return r=0,!1;case"cover":case"farthest-side":return r=1,!1;case"contain":case"closest-corner":return r=2,!1;case"farthest-corner":return r=3,!1}else if(Ie(e)||ye(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return A}),o)}if(o){var a=qe(A,e);B.push(a)}})),{size:r,shape:t,stops:B,position:n,type:2}},"-moz-radial-gradient":tt,"-ms-radial-gradient":tt,"-o-radial-gradient":tt,"-webkit-radial-gradient":tt,"-webkit-gradient":function(A,e){var t=Te(180),r=[],B=1;return He(e).forEach((function(e,t){var n=e[0];if(0===t){if(Fe(n)&&"linear"===n.value)return void(B=1);if(Fe(n)&&"radial"===n.value)return void(B=2)}if(18===n.type)if("from"===n.name){var s=Ge(A,n.values[0]);r.push({stop:me,color:s})}else if("to"===n.name){s=Ge(A,n.values[0]);r.push({stop:ve,color:s})}else if("color-stop"===n.name){var o=n.values.filter(pe);if(2===o.length){s=Ge(A,o[1]);var i=o[0];Ce(i)&&r.push({stop:{type:16,number:100*i.number,flags:i.flags},color:s})}}})),1===B?{angle:(t+Te(180))%Te(360),stops:r,type:B}:{size:3,shape:0,stops:r,position:[],type:B}}},ot={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(A,e){if(0===e.length)return[];var t=e[0];return 20===t.type&&"none"===t.value?[]:e.filter((function(A){return pe(A)&&function(A){return!(20===A.type&&"none"===A.value||18===A.type&&!st[A.name])}(A)})).map((function(e){return rt(A,e)}))}},it={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map((function(A){if(Fe(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},at={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(A,e){return He(e).map((function(A){return A.filter(ye)})).map(Ke)}},ct={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(A,e){return He(e).map((function(A){return A.filter(Fe).map((function(A){return A.value})).join(" ")})).map(Qt)}},Qt=function(A){switch(A){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};(nt=Bt||(Bt={})).AUTO="auto",nt.CONTAIN="contain",nt.COVER="cover";var gt,wt,lt={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(A,e){return He(e).map((function(A){return A.filter(ut)}))}},ut=function(A){return Fe(A)||ye(A)},Ut=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Ct=Ut("top"),Ft=Ut("right"),ht=Ut("bottom"),dt=Ut("left"),ft=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:1,parse:function(A,e){return Ke(e.filter(ye))}}},pt=ft("top-left"),Ht=ft("top-right"),Et=ft("bottom-right"),It=ft("bottom-left"),yt=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Kt=yt("top"),mt=yt("right"),Lt=yt("bottom"),vt=yt("left"),bt=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return Ue(e)?e.number:0}}},Dt=bt("top"),xt=bt("right"),Mt=bt("bottom"),St=bt("left"),Tt={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Gt={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(A,e){return"rtl"===e?1:0}},Ot={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(A,e){return e.filter(Fe).reduce((function(A,e){return A|Vt(e.value)}),0)}},Vt=function(A){switch(A){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},kt={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Rt={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(A,e){return 20===e.type&&"normal"===e.value?0:17===e.type||15===e.type?e.number:0}};(wt=gt||(gt={})).NORMAL="normal",wt.STRICT="strict";var Nt,Pt,Xt={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){return"strict"===e?gt.STRICT:gt.NORMAL}},Jt={name:"line-height",initialValue:"normal",prefix:!1,type:4},Yt=function(A,e){return Fe(A)&&"normal"===A.value?1.2*e:17===A.type?e*A.number:ye(A)?De(A,e):e},Wt={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(A,e){return 20===e.type&&"none"===e.value?null:rt(A,e)}},Zt={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(A,e){return"inside"===e?0:1}},_t={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},qt=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:4}},jt=qt("top"),zt=qt("right"),$t=qt("bottom"),Ar=qt("left"),er={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(A,e){return e.filter(Fe).map((function(A){switch(A.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},tr={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){return"break-word"===e?"break-word":"normal"}},rr=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Br=rr("top"),nr=rr("right"),sr=rr("bottom"),or=rr("left"),ir={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(A,e){switch(e){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},ar={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(A,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},cr={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return 1===e.length&&de(e[0],"none")?[]:He(e).map((function(e){for(var t={color:We.TRANSPARENT,offsetX:me,offsetY:me,blur:me},r=0,B=0;B<e.length;B++){var n=e[B];Ie(n)?(0===r?t.offsetX=n:1===r?t.offsetY=n:t.blur=n,r++):t.color=Ge(A,n)}return t}))}},Qr={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},gr={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(A,e){if(20===e.type&&"none"===e.value)return null;if(18===e.type){var t=wr[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},wr={matrix:function(A){var e=A.filter((function(A){return 17===A.type})).map((function(A){return A.number}));return 6===e.length?e:null},matrix3d:function(A){var e=A.filter((function(A){return 17===A.type})).map((function(A){return A.number})),t=e[0],r=e[1];e[2],e[3];var B=e[4],n=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var s=e[12],o=e[13];return e[14],e[15],16===e.length?[t,r,B,n,s,o]:null}},lr={type:16,number:50,flags:4},ur=[lr,lr],Ur={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(A,e){var t=e.filter(ye);return 2!==t.length?ur:[t[0],t[1]]}},Cr={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"hidden":return 1;case"collapse":return 2;default:return 0}}};(Pt=Nt||(Nt={})).NORMAL="normal",Pt.BREAK_ALL="break-all",Pt.KEEP_ALL="keep-all";for(var Fr={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"break-all":return Nt.BREAK_ALL;case"keep-all":return Nt.KEEP_ALL;default:return Nt.NORMAL}}},hr={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(A,e){if(20===e.type)return{auto:!0,order:0};if(Ce(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},dr=function(A,e){if(15===e.type)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")},fr={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(A,e){return Ce(e)?e.number:1}},pr={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Hr={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(A,e){return e.filter(Fe).map((function(A){switch(A.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(A){return 0!==A}))}},Er={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(A,e){var t=[],r=[];return e.forEach((function(A){switch(A.type){case 20:case 0:t.push(A.value);break;case 17:t.push(A.number.toString());break;case 4:r.push(t.join(" ")),t.length=0}})),t.length&&r.push(t.join(" ")),r.map((function(A){return-1===A.indexOf(" ")?A:"'"+A+"'"}))}},Ir={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},yr={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(A,e){return Ce(e)?e.number:Fe(e)&&"bold"===e.value?700:400}},Kr={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.filter(Fe).map((function(A){return A.value}))}},mr={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},Lr=function(A,e){return 0!=(A&e)},vr={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(A,e){if(0===e.length)return[];var t=e[0];return 20===t.type&&"none"===t.value?[]:e}},br={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return null;var t=e[0];if(20===t.type&&"none"===t.value)return null;for(var r=[],B=e.filter(fe),n=0;n<B.length;n++){var s=B[n],o=B[n+1];if(20===s.type){var i=o&&Ce(o)?o.number:1;r.push({counter:s.value,increment:i})}}return r}},Dr={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return[];for(var t=[],r=e.filter(fe),B=0;B<r.length;B++){var n=r[B],s=r[B+1];if(Fe(n)&&"none"!==n.value){var o=s&&Ce(s)?s.number:0;t.push({counter:n.value,reset:o})}}return t}},xr={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(A,e){return e.filter(Ue).map((function(e){return dr(A,e)}))}},Mr={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return null;var t=e[0];if(20===t.type&&"none"===t.value)return null;var r=[],B=e.filter(he);if(B.length%2!=0)return null;for(var n=0;n<B.length;n+=2){var s=B[n].value,o=B[n+1].value;r.push({open:s,close:o})}return r}},Sr=function(A,e,t){if(!A)return"";var r=A[Math.min(e,A.length-1)];return r?t?r.open:r.close:""},Tr={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return 1===e.length&&de(e[0],"none")?[]:He(e).map((function(e){for(var t={color:255,offsetX:me,offsetY:me,blur:me,spread:me,inset:!1},r=0,B=0;B<e.length;B++){var n=e[B];de(n,"inset")?t.inset=!0:Ie(n)?(0===r?t.offsetX=n:1===r?t.offsetY=n:2===r?t.blur=n:t.spread=n,r++):t.color=Ge(A,n)}return t}))}},Gr={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(A,e){var t=[];return e.filter(Fe).forEach((function(A){switch(A.value){case"stroke":t.push(1);break;case"fill":t.push(0);break;case"markers":t.push(2)}})),[0,1,2].forEach((function(A){-1===t.indexOf(A)&&t.push(A)})),t}},Or={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Vr={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return Ue(e)?e.number:0}},kr=function(){function A(A,e){var t,r;this.animationDuration=Pr(A,xr,e.animationDuration),this.backgroundClip=Pr(A,Ze,e.backgroundClip),this.backgroundColor=Pr(A,_e,e.backgroundColor),this.backgroundImage=Pr(A,ot,e.backgroundImage),this.backgroundOrigin=Pr(A,it,e.backgroundOrigin),this.backgroundPosition=Pr(A,at,e.backgroundPosition),this.backgroundRepeat=Pr(A,ct,e.backgroundRepeat),this.backgroundSize=Pr(A,lt,e.backgroundSize),this.borderTopColor=Pr(A,Ct,e.borderTopColor),this.borderRightColor=Pr(A,Ft,e.borderRightColor),this.borderBottomColor=Pr(A,ht,e.borderBottomColor),this.borderLeftColor=Pr(A,dt,e.borderLeftColor),this.borderTopLeftRadius=Pr(A,pt,e.borderTopLeftRadius),this.borderTopRightRadius=Pr(A,Ht,e.borderTopRightRadius),this.borderBottomRightRadius=Pr(A,Et,e.borderBottomRightRadius),this.borderBottomLeftRadius=Pr(A,It,e.borderBottomLeftRadius),this.borderTopStyle=Pr(A,Kt,e.borderTopStyle),this.borderRightStyle=Pr(A,mt,e.borderRightStyle),this.borderBottomStyle=Pr(A,Lt,e.borderBottomStyle),this.borderLeftStyle=Pr(A,vt,e.borderLeftStyle),this.borderTopWidth=Pr(A,Dt,e.borderTopWidth),this.borderRightWidth=Pr(A,xt,e.borderRightWidth),this.borderBottomWidth=Pr(A,Mt,e.borderBottomWidth),this.borderLeftWidth=Pr(A,St,e.borderLeftWidth),this.boxShadow=Pr(A,Tr,e.boxShadow),this.color=Pr(A,Tt,e.color),this.direction=Pr(A,Gt,e.direction),this.display=Pr(A,Ot,e.display),this.float=Pr(A,kt,e.cssFloat),this.fontFamily=Pr(A,Er,e.fontFamily),this.fontSize=Pr(A,Ir,e.fontSize),this.fontStyle=Pr(A,mr,e.fontStyle),this.fontVariant=Pr(A,Kr,e.fontVariant),this.fontWeight=Pr(A,yr,e.fontWeight),this.letterSpacing=Pr(A,Rt,e.letterSpacing),this.lineBreak=Pr(A,Xt,e.lineBreak),this.lineHeight=Pr(A,Jt,e.lineHeight),this.listStyleImage=Pr(A,Wt,e.listStyleImage),this.listStylePosition=Pr(A,Zt,e.listStylePosition),this.listStyleType=Pr(A,_t,e.listStyleType),this.marginTop=Pr(A,jt,e.marginTop),this.marginRight=Pr(A,zt,e.marginRight),this.marginBottom=Pr(A,$t,e.marginBottom),this.marginLeft=Pr(A,Ar,e.marginLeft),this.opacity=Pr(A,fr,e.opacity);var B=Pr(A,er,e.overflow);this.overflowX=B[0],this.overflowY=B[B.length>1?1:0],this.overflowWrap=Pr(A,tr,e.overflowWrap),this.paddingTop=Pr(A,Br,e.paddingTop),this.paddingRight=Pr(A,nr,e.paddingRight),this.paddingBottom=Pr(A,sr,e.paddingBottom),this.paddingLeft=Pr(A,or,e.paddingLeft),this.paintOrder=Pr(A,Gr,e.paintOrder),this.position=Pr(A,ar,e.position),this.textAlign=Pr(A,ir,e.textAlign),this.textDecorationColor=Pr(A,pr,null!==(t=e.textDecorationColor)&&void 0!==t?t:e.color),this.textDecorationLine=Pr(A,Hr,null!==(r=e.textDecorationLine)&&void 0!==r?r:e.textDecoration),this.textShadow=Pr(A,cr,e.textShadow),this.textTransform=Pr(A,Qr,e.textTransform),this.transform=Pr(A,gr,e.transform),this.transformOrigin=Pr(A,Ur,e.transformOrigin),this.visibility=Pr(A,Cr,e.visibility),this.webkitTextStrokeColor=Pr(A,Or,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=Pr(A,Vr,e.webkitTextStrokeWidth),this.wordBreak=Pr(A,Fr,e.wordBreak),this.zIndex=Pr(A,hr,e.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},A.prototype.isTransparent=function(){return Oe(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return 0!==this.position},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return 0!==this.float},A.prototype.isInlineLevel=function(){return Lr(this.display,4)||Lr(this.display,33554432)||Lr(this.display,268435456)||Lr(this.display,536870912)||Lr(this.display,67108864)||Lr(this.display,134217728)},A}(),Rr=function(A,e){this.content=Pr(A,vr,e.content),this.quotes=Pr(A,Mr,e.quotes)},Nr=function(A,e){this.counterIncrement=Pr(A,br,e.counterIncrement),this.counterReset=Pr(A,Dr,e.counterReset)},Pr=function(A,e,t){var r=new le,B=null!=t?t.toString():e.initialValue;r.write(B);var n=new ue(r.read());switch(e.type){case 2:var s=n.parseComponentValue();return e.parse(A,Fe(s)?s.value:e.initialValue);case 0:return e.parse(A,n.parseComponentValue());case 1:return e.parse(A,n.parseComponentValues());case 4:return n.parseComponentValue();case 3:switch(e.format){case"angle":return xe(A,n.parseComponentValue());case"color":return Ge(A,n.parseComponentValue());case"image":return rt(A,n.parseComponentValue());case"length":var o=n.parseComponentValue();return Ie(o)?o:me;case"length-percentage":var i=n.parseComponentValue();return ye(i)?i:me;case"time":return dr(A,n.parseComponentValue())}}},Xr=function(A,e){var t=function(A){switch(A.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(A);return 1===t||e===t},Jr=function(A,e){this.context=A,this.textNodes=[],this.elements=[],this.flags=0,Xr(e,3),this.styles=new kr(A,window.getComputedStyle(e,null)),YB(e)&&(this.styles.animationDuration.some((function(A){return A>0}))&&(e.style.animationDuration="0s"),null!==this.styles.transform&&(e.style.transform="none")),this.bounds=b(this.context,e),Xr(e,4)&&(this.flags|=16)},Yr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Zr=0;Zr<Yr.length;Zr++)Wr[Yr.charCodeAt(Zr)]=Zr;for(var _r=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},qr=function(){function A(A,e,t,r,B,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=B,this.data=n}return A.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A<this.highStart)return e=2080+(A>>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),jr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),$r=0;$r<jr.length;$r++)zr[jr.charCodeAt($r)]=$r;var AB,eB,tB=8,rB=9,BB=11,nB=12,sB=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var r=[],B=-1,n="";++B<t;){var s=A[B];s<=65535?r.push(s):(s-=65536,r.push(55296+(s>>10),s%1024+56320)),(B+1===t||r.length>16384)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n},oB=function(A,e){var t=function(A){var e,t,r,B,n,s=.75*A.length,o=A.length,i=0;"="===A[A.length-1]&&(s--,"="===A[A.length-2]&&s--);var a="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(s):new Array(s),c=Array.isArray(a)?a:new Uint8Array(a);for(e=0;e<o;e+=4)t=Wr[A.charCodeAt(e)],r=Wr[A.charCodeAt(e+1)],B=Wr[A.charCodeAt(e+2)],n=Wr[A.charCodeAt(e+3)],c[i++]=t<<2|r>>4,c[i++]=(15&r)<<4|B>>2,c[i++]=(3&B)<<6|63&n;return a}(A),r=Array.isArray(t)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=4)t.push(A[r+3]<<24|A[r+2]<<16|A[r+1]<<8|A[r]);return t}(t):new Uint32Array(t),B=Array.isArray(t)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t}(t):new Uint16Array(t),n=_r(B,12,r[4]/2),s=2===r[5]?_r(B,(24+r[4])/2):function(A,e,t){return A.slice?A.slice(e,t):new Uint32Array(Array.prototype.slice.call(A,e,t))}(r,Math.ceil((24+r[4])/4));return new qr(r[0],r[1],r[2],r[3],n,s)}(" "),iB=function(A){return oB.get(A)},aB=function(A,e,t){var r=t-2,B=e[r],n=e[t-1],s=e[t];if(2===n&&3===s)return"×";if(2===n||3===n||4===n)return"÷";if(2===s||3===s||4===s)return"÷";if(n===tB&&-1!==[tB,rB,BB,nB].indexOf(s))return"×";if(!(n!==BB&&n!==rB||s!==rB&&10!==s))return"×";if((n===nB||10===n)&&10===s)return"×";if(13===s||5===s)return"×";if(7===s)return"×";if(1===n)return"×";if(13===n&&14===s){for(;5===B;)B=e[--r];if(14===B)return"×"}if(15===n&&15===s){for(var o=0;15===B;)o++,B=e[--r];if(o%2==0)return"×"}return"÷"},cB=function(A){var e=function(A){for(var e=[],t=0,r=A.length;t<r;){var B=A.charCodeAt(t++);if(B>=55296&&B<=56319&&t<r){var n=A.charCodeAt(t++);56320==(64512&n)?e.push(((1023&B)<<10)+(1023&n)+65536):(e.push(B),t--)}else e.push(B)}return e}(A),t=e.length,r=0,B=0,n=e.map(iB);return{next:function(){if(r>=t)return{done:!0,value:null};for(var A="×";r<t&&"×"===(A=aB(0,n,++r)););if("×"!==A||r===t){var s=sB.apply(null,e.slice(B,r));return B=r,{value:s,done:!1}}return{done:!0,value:null}}}},QB=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},gB=function(A,e,t,r,B){var n="http://www.w3.org/2000/svg",s=document.createElementNS(n,"svg"),o=document.createElementNS(n,"foreignObject");return s.setAttributeNS(null,"width",A.toString()),s.setAttributeNS(null,"height",e.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",t.toString()),o.setAttributeNS(null,"y",r.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(o),o.appendChild(B),s},wB=function(A){return new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))}))},lB={get SUPPORT_RANGE_BOUNDS(){var A=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(),B=Math.round(r.height);if(A.body.removeChild(t),123===B)return!0}}return!1}(document);return Object.defineProperty(lB,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_WORD_BREAKING(){var A=lB.SUPPORT_RANGE_BOUNDS&&function(A){var e=A.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",A.body.appendChild(e);var t=A.createRange();e.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var r=e.firstChild,B=D(r.data).map((function(A){return x(A)})),n=0,s={},o=B.every((function(A,e){t.setStart(r,n),t.setEnd(r,n+A.length);var B=t.getBoundingClientRect();n+=A.length;var o=B.x>s.x||B.y>s.y;return s=B,0===e||o}));return A.body.removeChild(e),o}(document);return Object.defineProperty(lB,"SUPPORT_WORD_BREAKING",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(e,0,0),t.toDataURL()}catch(B){return!1}return!0}(document);return Object.defineProperty(lB,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?function(A){var e=A.createElement("canvas"),t=100;e.width=t,e.height=t;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,t,t);var B=new Image,n=e.toDataURL();B.src=n;var s=gB(t,t,0,0,B);return r.fillStyle="red",r.fillRect(0,0,t,t),wB(s).then((function(e){r.drawImage(e,0,0);var B=r.getImageData(0,0,t,t).data;r.fillStyle="red",r.fillRect(0,0,t,t);var s=A.createElement("div");return s.style.backgroundImage="url("+n+")",s.style.height="100px",QB(B)?wB(gB(t,t,0,0,s)):Promise.reject(!1)})).then((function(A){return r.drawImage(A,0,0),QB(r.getImageData(0,0,t,t).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(lB,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=void 0!==(new Image).crossOrigin;return Object.defineProperty(lB,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(lB,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(lB,"SUPPORT_CORS_XHR",{value:A}),A},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var A=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(lB,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:A}),A}},uB=function(A,e){this.text=A,this.bounds=e},UB=function(A,e){var t=e.ownerDocument;if(t){var r=t.createElement("html2canvaswrapper");r.appendChild(e.cloneNode(!0));var B=e.parentNode;if(B){B.replaceChild(r,e);var n=b(A,r);return r.firstChild&&B.replaceChild(r.firstChild,r),n}}return v.EMPTY},CB=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var B=r.createRange();return B.setStart(A,e),B.setEnd(A,e+t),B},FB=function(A){if(lB.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(A)).map((function(A){return A.segment}))}return function(A){for(var e,t=cB(A),r=[];!(e=t.next()).done;)e.value&&r.push(e.value.slice());return r}(A)},hB=function(A,e){return 0!==e.letterSpacing?FB(A):function(A,e){if(lB.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(A)).map((function(A){return A.segment}))}return fB(A,e)}(A,e)},dB=[32,160,4961,65792,65793,4153,4241],fB=function(A,e){for(var t,r=function(A,e){var t=D(A),r=SA(t,e),B=r[0],n=r[1],s=r[2],o=t.length,i=0,a=0;return{next:function(){if(a>=o)return{done:!0,value:null};for(var A="×";a<o&&"×"===(A=MA(t,n,B,++a,s)););if("×"!==A||a===o){var e=new TA(t,A,i,a);return i=a,{value:e,done:!1}}return{done:!0,value:null}}}}(A,{lineBreak:e.lineBreak,wordBreak:"break-word"===e.overflowWrap?"break-word":e.wordBreak}),B=[],n=function(){if(t.value){var A=t.value.slice(),e=D(A),r="";e.forEach((function(A){-1===dB.indexOf(A)?r+=x(A):(r.length&&B.push(r),B.push(x(A)),r="")})),r.length&&B.push(r)}};!(t=r.next()).done;)n();return B},pB=function(A,e,t){this.text=HB(e.data,t.textTransform),this.textBounds=function(A,e,t,r){var B=hB(e,t),n=[],s=0;return B.forEach((function(e){if(t.textDecorationLine.length||e.trim().length>0)if(lB.SUPPORT_RANGE_BOUNDS){var B=CB(r,s,e.length).getClientRects();if(B.length>1){var o=FB(e),i=0;o.forEach((function(e){n.push(new uB(e,v.fromDOMRectList(A,CB(r,i+s,e.length).getClientRects()))),i+=e.length}))}else n.push(new uB(e,v.fromDOMRectList(A,B)))}else{var a=r.splitText(e.length);n.push(new uB(e,UB(A,r))),r=a}else lB.SUPPORT_RANGE_BOUNDS||(r=r.splitText(e.length));s+=e.length})),n}(A,this.text,t,e)},HB=function(A,e){switch(e){case 1:return A.toLowerCase();case 3:return A.replace(EB,IB);case 2:return A.toUpperCase();default:return A}},EB=/(^|\s|:|-|\(|\))([a-z])/g,IB=function(A,e,t){return A.length>0?e+t.toUpperCase():A},yB=function(A){function e(e,t){var r=A.call(this,e,t)||this;return r.src=t.currentSrc||t.src,r.intrinsicWidth=t.naturalWidth,r.intrinsicHeight=t.naturalHeight,r.context.cache.addImage(r.src),r}return I(e,A),e}(Jr),KB=function(A){function e(e,t){var r=A.call(this,e,t)||this;return r.canvas=t,r.intrinsicWidth=t.width,r.intrinsicHeight=t.height,r}return I(e,A),e}(Jr),mB=function(A){function e(e,t){var r=A.call(this,e,t)||this,B=new XMLSerializer,n=b(e,t);return t.setAttribute("width",n.width+"px"),t.setAttribute("height",n.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(B.serializeToString(t)),r.intrinsicWidth=t.width.baseVal.value,r.intrinsicHeight=t.height.baseVal.value,r.context.cache.addImage(r.svg),r}return I(e,A),e}(Jr),LB=function(A){function e(e,t){var r=A.call(this,e,t)||this;return r.value=t.value,r}return I(e,A),e}(Jr),vB=function(A){function e(e,t){var r=A.call(this,e,t)||this;return r.start=t.start,r.reversed="boolean"==typeof t.reversed&&!0===t.reversed,r}return I(e,A),e}(Jr),bB=[{type:15,flags:0,unit:"px",number:3}],DB=[{type:16,flags:0,number:50}],xB="password",MB=function(A){function e(e,t){var r,B,n,s=A.call(this,e,t)||this;switch(s.type=t.type.toLowerCase(),s.checked=t.checked,s.value=0===(B=(r=t).type===xB?new Array(r.value.length+1).join("•"):r.value).length?r.placeholder||"":B,"checkbox"!==s.type&&"radio"!==s.type||(s.styles.backgroundColor=3739148031,s.styles.borderTopColor=s.styles.borderRightColor=s.styles.borderBottomColor=s.styles.borderLeftColor=2779096575,s.styles.borderTopWidth=s.styles.borderRightWidth=s.styles.borderBottomWidth=s.styles.borderLeftWidth=1,s.styles.borderTopStyle=s.styles.borderRightStyle=s.styles.borderBottomStyle=s.styles.borderLeftStyle=1,s.styles.backgroundClip=[0],s.styles.backgroundOrigin=[0],s.bounds=(n=s.bounds).width>n.height?new v(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width<n.height?new v(n.left,n.top+(n.height-n.width)/2,n.width,n.width):n),s.type){case"checkbox":s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=bB;break;case"radio":s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=DB}return s}return I(e,A),e}(Jr),SB=function(A){function e(e,t){var r=A.call(this,e,t)||this,B=t.options[t.selectedIndex||0];return r.value=B&&B.text||"",r}return I(e,A),e}(Jr),TB=function(A){function e(e,t){var r=A.call(this,e,t)||this;return r.value=t.value,r}return I(e,A),e}(Jr),GB=function(A){function e(e,t){var r=A.call(this,e,t)||this;r.src=t.src,r.width=parseInt(t.width,10)||0,r.height=parseInt(t.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.documentElement){r.tree=RB(e,t.contentWindow.document.documentElement);var B=t.contentWindow.document.documentElement?Ye(e,getComputedStyle(t.contentWindow.document.documentElement).backgroundColor):We.TRANSPARENT,n=t.contentWindow.document.body?Ye(e,getComputedStyle(t.contentWindow.document.body).backgroundColor):We.TRANSPARENT;r.backgroundColor=Oe(B)?Oe(n)?r.styles.backgroundColor:n:B}}catch(s){}return r}return I(e,A),e}(Jr),OB=["OL","UL","MENU"],VB=function(A,e,t,r){for(var B=e.firstChild,n=void 0;B;B=n)if(n=B.nextSibling,XB(B)&&B.data.trim().length>0)t.textNodes.push(new pB(A,B,t.styles));else if(JB(B))if(sn(B)&&B.assignedNodes)B.assignedNodes().forEach((function(e){return VB(A,e,t,r)}));else{var s=kB(A,B);s.styles.isVisible()&&(NB(B,s,r)?s.flags|=4:PB(s.styles)&&(s.flags|=2),-1!==OB.indexOf(B.tagName)&&(s.flags|=8),t.elements.push(s),B.slot,B.shadowRoot?VB(A,B.shadowRoot,s,r):Bn(B)||jB(B)||nn(B)||VB(A,B,s,r))}},kB=function(A,e){return en(e)?new yB(A,e):$B(e)?new KB(A,e):jB(e)?new mB(A,e):ZB(e)?new LB(A,e):_B(e)?new vB(A,e):qB(e)?new MB(A,e):nn(e)?new SB(A,e):Bn(e)?new TB(A,e):tn(e)?new GB(A,e):new Jr(A,e)},RB=function(A,e){var t=kB(A,e);return t.flags|=4,VB(A,e,t,t),t},NB=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||zB(A)&&t.styles.isTransparent()},PB=function(A){return A.isPositioned()||A.isFloating()},XB=function(A){return A.nodeType===Node.TEXT_NODE},JB=function(A){return A.nodeType===Node.ELEMENT_NODE},YB=function(A){return JB(A)&&void 0!==A.style&&!WB(A)},WB=function(A){return"object"==typeof A.className},ZB=function(A){return"LI"===A.tagName},_B=function(A){return"OL"===A.tagName},qB=function(A){return"INPUT"===A.tagName},jB=function(A){return"svg"===A.tagName},zB=function(A){return"BODY"===A.tagName},$B=function(A){return"CANVAS"===A.tagName},An=function(A){return"VIDEO"===A.tagName},en=function(A){return"IMG"===A.tagName},tn=function(A){return"IFRAME"===A.tagName},rn=function(A){return"STYLE"===A.tagName},Bn=function(A){return"TEXTAREA"===A.tagName},nn=function(A){return"SELECT"===A.tagName},sn=function(A){return"SLOT"===A.tagName},on=function(A){return A.tagName.indexOf("-")>0},an=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},A.prototype.getCounterValues=function(A){var e=this.counters[A];return e||[]},A.prototype.pop=function(A){var e=this;A.forEach((function(A){return e.counters[A].pop()}))},A.prototype.parse=function(A){var e=this,t=A.counterIncrement,r=A.counterReset,B=!0;null!==t&&t.forEach((function(A){var t=e.counters[A.counter];t&&0!==A.increment&&(B=!1,t.length||t.push(1),t[Math.max(0,t.length-1)]+=A.increment)}));var n=[];return B&&r.forEach((function(A){var t=e.counters[A.counter];n.push(A.counter),t||(t=e.counters[A.counter]=[]),t.push(A.reset)})),n},A}(),cn={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"]},Qn={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},gn={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},wn={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},ln=function(A,e,t,r,B,n){return A<e||A>t?hn(A,B,n.length>0):r.integers.reduce((function(e,t,B){for(;A>=t;)A-=t,e+=r.values[B];return e}),"")+n},un=function(A,e,t,r){var B="";do{t||A--,B=r(A)+B,A/=e}while(A*e>=e);return B},Un=function(A,e,t,r,B){var n=t-e+1;return(A<0?"-":"")+(un(Math.abs(A),n,r,(function(A){return x(Math.floor(A%n)+e)}))+B)},Cn=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return un(Math.abs(A),r,!1,(function(A){return e[Math.floor(A%r)]}))+t},Fn=function(A,e,t,r,B,n){if(A<-9999||A>9999)return hn(A,4,B.length>0);var s=Math.abs(A),o=B;if(0===s)return e[0]+o;for(var i=0;s>0&&i<=4;i++){var a=s%10;0===a&&Lr(n,1)&&""!==o?o=e[a]+o:a>1||1===a&&0===i||1===a&&1===i&&Lr(n,2)||1===a&&1===i&&Lr(n,4)&&A>100||1===a&&i>1&&Lr(n,8)?o=e[a]+(i>0?t[i-1]:"")+o:1===a&&i>0&&(o=t[i-1]+o),s=Math.floor(s/10)}return(A<0?r:"")+o},hn=function(A,e,t){var r=t?". ":"",B=t?"、":"",n=t?", ":"",s=t?" ":"";switch(e){case 0:return"•"+s;case 1:return"◦"+s;case 2:return"◾"+s;case 5:var o=Un(A,48,57,!0,r);return o.length<4?"0"+o:o;case 4:return Cn(A,"〇一二三四五六七八九",B);case 6:return ln(A,1,3999,cn,3,r).toLowerCase();case 7:return ln(A,1,3999,cn,3,r);case 8:return Un(A,945,969,!1,r);case 9:return Un(A,97,122,!1,r);case 10:return Un(A,65,90,!1,r);case 11:return Un(A,1632,1641,!0,r);case 12:case 49:return ln(A,1,9999,Qn,3,r);case 35:return ln(A,1,9999,Qn,3,r).toLowerCase();case 13:return Un(A,2534,2543,!0,r);case 14:case 30:return Un(A,6112,6121,!0,r);case 15:return Cn(A,"子丑寅卯辰巳午未申酉戌亥",B);case 16:return Cn(A,"甲乙丙丁戊己庚辛壬癸",B);case 17:case 48:return Fn(A,"零一二三四五六七八九","十百千萬","負",B,14);case 47:return Fn(A,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",B,15);case 42:return Fn(A,"零一二三四五六七八九","十百千萬","负",B,14);case 41:return Fn(A,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",B,15);case 26:return Fn(A,"〇一二三四五六七八九","十百千万","マイナス",B,0);case 25:return Fn(A,"零壱弐参四伍六七八九","拾百千万","マイナス",B,7);case 31:return Fn(A,"영일이삼사오육칠팔구","십백천만","마이너스",n,7);case 33:return Fn(A,"零一二三四五六七八九","十百千萬","마이너스",n,0);case 32:return Fn(A,"零壹貳參四五六七八九","拾百千","마이너스",n,7);case 18:return Un(A,2406,2415,!0,r);case 20:return ln(A,1,19999,wn,3,r);case 21:return Un(A,2790,2799,!0,r);case 22:return Un(A,2662,2671,!0,r);case 22:return ln(A,1,10999,gn,3,r);case 23:return Cn(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Cn(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Un(A,3302,3311,!0,r);case 28:return Cn(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",B);case 29:return Cn(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",B);case 34:return Un(A,3792,3801,!0,r);case 37:return Un(A,6160,6169,!0,r);case 38:return Un(A,4160,4169,!0,r);case 39:return Un(A,2918,2927,!0,r);case 40:return Un(A,1776,1785,!0,r);case 43:return Un(A,3046,3055,!0,r);case 44:return Un(A,3174,3183,!0,r);case 45:return Un(A,3664,3673,!0,r);case 46:return Un(A,3872,3881,!0,r);default:return Un(A,48,57,!0,r)}},dn=function(){function A(A,e,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new an,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return A.prototype.toIFrame=function(A,e){var t=this,r=Hn(A,e);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var B=A.defaultView.pageXOffset,n=A.defaultView.pageYOffset,s=r.contentWindow,o=s.document,i=yn(r).then((function(){return K(t,void 0,void 0,(function(){var A,t;return m(this,(function(B){switch(B.label){case 0:return this.scrolledElements.forEach(bn),s&&(s.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||s.scrollY===e.top&&s.scrollX===e.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-e.left,s.scrollY-e.top,0,0))),A=this.options.onclone,void 0===(t=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:B.sent(),B.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,In(o)]:[3,4];case 3:B.sent(),B.label=4;case 4:return"function"==typeof A?[2,Promise.resolve().then((function(){return A(o,t)})).then((function(){return r}))]:[2,r]}}))}))}));return o.open(),o.write(Ln(document.doctype)+"<html></html>"),vn(this.referenceElement.ownerDocument,B,n),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),i},A.prototype.createElementClone=function(A){if(Xr(A,2),$B(A))return this.createCanvasClone(A);if(An(A))return this.createVideoClone(A);if(rn(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return en(e)&&(en(A)&&A.currentSrc&&A.currentSrc!==A.src&&(e.src=A.currentSrc,e.srcset=""),"lazy"===e.loading&&(e.loading="eager")),on(e)?this.createCustomElementClone(e):e},A.prototype.createCustomElementClone=function(A){var e=document.createElement("html2canvascustomelement");return mn(A.style,e),e},A.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce((function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A}),""),r=A.cloneNode(!1);return r.textContent=t,r}}catch(B){if(this.context.logger.error("Unable to access cssRules property",B),"SecurityError"!==B.name)throw B}return A.cloneNode(!1)},A.prototype.createCanvasClone=function(A){var e;if(this.options.inlineImages&&A.ownerDocument){var t=A.ownerDocument.createElement("img");try{return t.src=A.toDataURL(),t}catch(i){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var r=A.cloneNode(!1);try{r.width=A.width,r.height=A.height;var B=A.getContext("2d"),n=r.getContext("2d");if(n)if(!this.options.allowTaint&&B)n.putImageData(B.getImageData(0,0,A.width,A.height),0,0);else{var s=null!==(e=A.getContext("webgl2"))&&void 0!==e?e:A.getContext("webgl");if(s){var o=s.getContextAttributes();!1===(null==o?void 0:o.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}n.drawImage(A,0,0)}return r}catch(i){this.context.logger.info("Unable to clone canvas as it is tainted",A)}return r},A.prototype.createVideoClone=function(A){var e=A.ownerDocument.createElement("canvas");e.width=A.offsetWidth,e.height=A.offsetHeight;var t=e.getContext("2d");try{return t&&(t.drawImage(A,0,0,e.width,e.height),this.options.allowTaint||t.getImageData(0,0,e.width,e.height)),e}catch(B){this.context.logger.info("Unable to clone video as it is tainted",A)}var r=A.ownerDocument.createElement("canvas");return r.width=A.offsetWidth,r.height=A.offsetHeight,r},A.prototype.appendChildNode=function(A,e,t){JB(e)&&("SCRIPT"===e.tagName||e.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e))||this.options.copyStyles&&JB(e)&&rn(e)||A.appendChild(this.cloneNode(e,t))},A.prototype.cloneChildNodes=function(A,e,t){for(var r=this,B=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;B;B=B.nextSibling)if(JB(B)&&sn(B)&&"function"==typeof B.assignedNodes){var n=B.assignedNodes();n.length&&n.forEach((function(A){return r.appendChildNode(e,A,t)}))}else this.appendChildNode(e,B,t)},A.prototype.cloneNode=function(A,e){if(XB(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var t=A.ownerDocument.defaultView;if(t&&JB(A)&&(YB(A)||WB(A))){var r=this.createElementClone(A);r.style.transitionProperty="none";var B=t.getComputedStyle(A),n=t.getComputedStyle(A,":before"),s=t.getComputedStyle(A,":after");this.referenceElement===A&&YB(r)&&(this.clonedReferenceElement=r),zB(r)&&Mn(r);var o=this.counters.parse(new Nr(this.context,B)),i=this.resolvePseudoContent(A,r,n,AB.BEFORE);on(A)&&(e=!0),An(A)||this.cloneChildNodes(A,r,e),i&&r.insertBefore(i,r.firstChild);var a=this.resolvePseudoContent(A,r,s,AB.AFTER);return a&&r.appendChild(a),this.counters.pop(o),(B&&(this.options.copyStyles||WB(A))&&!tn(A)||e)&&mn(B,r),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([r,A.scrollLeft,A.scrollTop]),(Bn(A)||nn(A))&&(Bn(r)||nn(r))&&(r.value=A.value),r}return A.cloneNode(!1)},A.prototype.resolvePseudoContent=function(A,e,t,r){var B=this;if(t){var n=t.content,s=e.ownerDocument;if(s&&n&&"none"!==n&&"-moz-alt-content"!==n&&"none"!==t.display){this.counters.parse(new Nr(this.context,t));var o=new Rr(this.context,t),i=s.createElement("html2canvaspseudoelement");mn(t,i),o.content.forEach((function(e){if(0===e.type)i.appendChild(s.createTextNode(e.value));else if(22===e.type){var t=s.createElement("img");t.src=e.value,t.style.opacity="1",i.appendChild(t)}else if(18===e.type){if("attr"===e.name){var r=e.values.filter(Fe);r.length&&i.appendChild(s.createTextNode(A.getAttribute(r[0].value)||""))}else if("counter"===e.name){var n=e.values.filter(pe),a=n[0],c=n[1];if(a&&Fe(a)){var Q=B.counters.getCounterValue(a.value),g=c&&Fe(c)?_t.parse(B.context,c.value):3;i.appendChild(s.createTextNode(hn(Q,g,!1)))}}else if("counters"===e.name){var w=e.values.filter(pe),l=(a=w[0],w[1]);c=w[2];if(a&&Fe(a)){var u=B.counters.getCounterValues(a.value),U=c&&Fe(c)?_t.parse(B.context,c.value):3,C=l&&0===l.type?l.value:"",F=u.map((function(A){return hn(A,U,!1)})).join(C);i.appendChild(s.createTextNode(F))}}}else if(20===e.type)switch(e.value){case"open-quote":i.appendChild(s.createTextNode(Sr(o.quotes,B.quoteDepth++,!0)));break;case"close-quote":i.appendChild(s.createTextNode(Sr(o.quotes,--B.quoteDepth,!1)));break;default:i.appendChild(s.createTextNode(e.value))}})),i.className=Dn+" "+xn;var a=r===AB.BEFORE?" "+Dn:" "+xn;return WB(e)?e.className.baseValue+=a:e.className+=a,i}}},A.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},A}();(eB=AB||(AB={}))[eB.BEFORE=0]="BEFORE",eB[eB.AFTER=1]="AFTER";var fn,pn,Hn=function(A,e){var t=A.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute("data-html2canvas-ignore","true"),A.body.appendChild(t),t},En=function(A){return new Promise((function(e){A.complete?e():A.src?(A.onload=e,A.onerror=e):e()}))},In=function(A){return Promise.all([].slice.call(A.images,0).map(En))},yn=function(A){return new Promise((function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var B=r.document;r.onload=A.onload=function(){r.onload=A.onload=null;var t=setInterval((function(){B.body.childNodes.length>0&&"complete"===B.readyState&&(clearInterval(t),e(A))}),50)}}))},Kn=["all","d","content"],mn=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);-1===Kn.indexOf(r)&&e.style.setProperty(r,A.getPropertyValue(r))}return e},Ln=function(A){var e="";return A&&(e+="<!DOCTYPE ",A.name&&(e+=A.name),A.internalSubset&&(e+=A.internalSubset),A.publicId&&(e+='"'+A.publicId+'"'),A.systemId&&(e+='"'+A.systemId+'"'),e+=">"),e},vn=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},bn=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},Dn="___html2canvas___pseudoelement_before",xn="___html2canvas___pseudoelement_after",Mn=function(A){Sn(A,"."+Dn+':before{\n    content: "" !important;\n    display: none !important;\n}\n         .'+xn+':after{\n    content: "" !important;\n    display: none !important;\n}')},Sn=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}},Tn=function(){function A(){}return A.getOrigin=function(e){var t=A._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},A.isSameOrigin=function(e){return A.getOrigin(e)===A._origin},A.setContext=function(e){A._link=e.document.createElement("a"),A._origin=A.getOrigin(e.location.href)},A._origin="about:blank",A}(),Gn=function(){function A(A,e){this.context=A,this._options=e,this._cache={}}return A.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)?e:Xn(A)||Rn(A)?((this._cache[A]=this.loadImage(A)).catch((function(){})),e):e},A.prototype.match=function(A){return this._cache[A]},A.prototype.loadImage=function(A){return K(this,void 0,void 0,(function(){var e,t,r,B,n=this;return m(this,(function(s){switch(s.label){case 0:return e=Tn.isSameOrigin(A),t=!Nn(A)&&!0===this._options.useCORS&&lB.SUPPORT_CORS_IMAGES&&!e,r=!Nn(A)&&!e&&!Xn(A)&&"string"==typeof this._options.proxy&&lB.SUPPORT_CORS_XHR&&!t,e||!1!==this._options.allowTaint||Nn(A)||Xn(A)||r||t?(B=A,r?[4,this.proxy(B)]:[3,2]):[2];case 1:B=s.sent(),s.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise((function(A,e){var r=new Image;r.onload=function(){return A(r)},r.onerror=e,(Pn(B)||t)&&(r.crossOrigin="anonymous"),r.src=B,!0===r.complete&&setTimeout((function(){return A(r)}),500),n._options.imageTimeout>0&&setTimeout((function(){return e("Timed out ("+n._options.imageTimeout+"ms) loading image")}),n._options.imageTimeout)}))];case 3:return[2,s.sent()]}}))}))},A.prototype.has=function(A){return void 0!==this._cache[A]},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise((function(B,n){var s=lB.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(200===o.status)if("text"===s)B(o.response);else{var A=new FileReader;A.addEventListener("load",(function(){return B(A.result)}),!1),A.addEventListener("error",(function(A){return n(A)}),!1),A.readAsDataURL(o.response)}else n("Failed to proxy resource "+r+" with status code "+o.status)},o.onerror=n;var i=t.indexOf("?")>-1?"&":"?";if(o.open("GET",""+t+i+"url="+encodeURIComponent(A)+"&responseType="+s),"text"!==s&&o instanceof XMLHttpRequest&&(o.responseType=s),e._options.imageTimeout){var a=e._options.imageTimeout;o.timeout=a,o.ontimeout=function(){return n("Timed out ("+a+"ms) proxying "+r)}}o.send()}))},A}(),On=/^data:image\/svg\+xml/i,Vn=/^data:image\/.*;base64,/i,kn=/^data:image\/.*/i,Rn=function(A){return lB.SUPPORT_SVG_DRAWING||!Jn(A)},Nn=function(A){return kn.test(A)},Pn=function(A){return Vn.test(A)},Xn=function(A){return"blob"===A.substr(0,4)},Jn=function(A){return"svg"===A.substr(-3).toLowerCase()||On.test(A)},Yn=function(){function A(A,e){this.type=0,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),Wn=function(A,e,t){return new Yn(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},Zn=function(){function A(A,e,t,r){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return A.prototype.subdivide=function(e,t){var r=Wn(this.start,this.startControl,e),B=Wn(this.startControl,this.endControl,e),n=Wn(this.endControl,this.end,e),s=Wn(r,B,e),o=Wn(B,n,e),i=Wn(s,o,e);return t?new A(this.start,r,s,i):new A(i,o,n,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),_n=function(A){return 1===A.type},qn=function(A){var e=A.styles,t=A.bounds,r=be(e.borderTopLeftRadius,t.width,t.height),B=r[0],n=r[1],s=be(e.borderTopRightRadius,t.width,t.height),o=s[0],i=s[1],a=be(e.borderBottomRightRadius,t.width,t.height),c=a[0],Q=a[1],g=be(e.borderBottomLeftRadius,t.width,t.height),w=g[0],l=g[1],u=[];u.push((B+o)/t.width),u.push((w+c)/t.width),u.push((n+l)/t.height),u.push((i+Q)/t.height);var U=Math.max.apply(Math,u);U>1&&(B/=U,n/=U,o/=U,i/=U,c/=U,Q/=U,w/=U,l/=U);var C=t.width-o,F=t.height-Q,h=t.width-c,d=t.height-l,f=e.borderTopWidth,p=e.borderRightWidth,H=e.borderBottomWidth,E=e.borderLeftWidth,I=De(e.paddingTop,A.bounds.width),y=De(e.paddingRight,A.bounds.width),K=De(e.paddingBottom,A.bounds.width),m=De(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=B>0||n>0?jn(t.left+E/3,t.top+f/3,B-E/3,n-f/3,fn.TOP_LEFT):new Yn(t.left+E/3,t.top+f/3),this.topRightBorderDoubleOuterBox=B>0||n>0?jn(t.left+C,t.top+f/3,o-p/3,i-f/3,fn.TOP_RIGHT):new Yn(t.left+t.width-p/3,t.top+f/3),this.bottomRightBorderDoubleOuterBox=c>0||Q>0?jn(t.left+h,t.top+F,c-p/3,Q-H/3,fn.BOTTOM_RIGHT):new Yn(t.left+t.width-p/3,t.top+t.height-H/3),this.bottomLeftBorderDoubleOuterBox=w>0||l>0?jn(t.left+E/3,t.top+d,w-E/3,l-H/3,fn.BOTTOM_LEFT):new Yn(t.left+E/3,t.top+t.height-H/3),this.topLeftBorderDoubleInnerBox=B>0||n>0?jn(t.left+2*E/3,t.top+2*f/3,B-2*E/3,n-2*f/3,fn.TOP_LEFT):new Yn(t.left+2*E/3,t.top+2*f/3),this.topRightBorderDoubleInnerBox=B>0||n>0?jn(t.left+C,t.top+2*f/3,o-2*p/3,i-2*f/3,fn.TOP_RIGHT):new Yn(t.left+t.width-2*p/3,t.top+2*f/3),this.bottomRightBorderDoubleInnerBox=c>0||Q>0?jn(t.left+h,t.top+F,c-2*p/3,Q-2*H/3,fn.BOTTOM_RIGHT):new Yn(t.left+t.width-2*p/3,t.top+t.height-2*H/3),this.bottomLeftBorderDoubleInnerBox=w>0||l>0?jn(t.left+2*E/3,t.top+d,w-2*E/3,l-2*H/3,fn.BOTTOM_LEFT):new Yn(t.left+2*E/3,t.top+t.height-2*H/3),this.topLeftBorderStroke=B>0||n>0?jn(t.left+E/2,t.top+f/2,B-E/2,n-f/2,fn.TOP_LEFT):new Yn(t.left+E/2,t.top+f/2),this.topRightBorderStroke=B>0||n>0?jn(t.left+C,t.top+f/2,o-p/2,i-f/2,fn.TOP_RIGHT):new Yn(t.left+t.width-p/2,t.top+f/2),this.bottomRightBorderStroke=c>0||Q>0?jn(t.left+h,t.top+F,c-p/2,Q-H/2,fn.BOTTOM_RIGHT):new Yn(t.left+t.width-p/2,t.top+t.height-H/2),this.bottomLeftBorderStroke=w>0||l>0?jn(t.left+E/2,t.top+d,w-E/2,l-H/2,fn.BOTTOM_LEFT):new Yn(t.left+E/2,t.top+t.height-H/2),this.topLeftBorderBox=B>0||n>0?jn(t.left,t.top,B,n,fn.TOP_LEFT):new Yn(t.left,t.top),this.topRightBorderBox=o>0||i>0?jn(t.left+C,t.top,o,i,fn.TOP_RIGHT):new Yn(t.left+t.width,t.top),this.bottomRightBorderBox=c>0||Q>0?jn(t.left+h,t.top+F,c,Q,fn.BOTTOM_RIGHT):new Yn(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=w>0||l>0?jn(t.left,t.top+d,w,l,fn.BOTTOM_LEFT):new Yn(t.left,t.top+t.height),this.topLeftPaddingBox=B>0||n>0?jn(t.left+E,t.top+f,Math.max(0,B-E),Math.max(0,n-f),fn.TOP_LEFT):new Yn(t.left+E,t.top+f),this.topRightPaddingBox=o>0||i>0?jn(t.left+Math.min(C,t.width-p),t.top+f,C>t.width+p?0:Math.max(0,o-p),Math.max(0,i-f),fn.TOP_RIGHT):new Yn(t.left+t.width-p,t.top+f),this.bottomRightPaddingBox=c>0||Q>0?jn(t.left+Math.min(h,t.width-E),t.top+Math.min(F,t.height-H),Math.max(0,c-p),Math.max(0,Q-H),fn.BOTTOM_RIGHT):new Yn(t.left+t.width-p,t.top+t.height-H),this.bottomLeftPaddingBox=w>0||l>0?jn(t.left+E,t.top+Math.min(d,t.height-H),Math.max(0,w-E),Math.max(0,l-H),fn.BOTTOM_LEFT):new Yn(t.left+E,t.top+t.height-H),this.topLeftContentBox=B>0||n>0?jn(t.left+E+m,t.top+f+I,Math.max(0,B-(E+m)),Math.max(0,n-(f+I)),fn.TOP_LEFT):new Yn(t.left+E+m,t.top+f+I),this.topRightContentBox=o>0||i>0?jn(t.left+Math.min(C,t.width+E+m),t.top+f+I,C>t.width+E+m?0:o-E+m,i-(f+I),fn.TOP_RIGHT):new Yn(t.left+t.width-(p+y),t.top+f+I),this.bottomRightContentBox=c>0||Q>0?jn(t.left+Math.min(h,t.width-(E+m)),t.top+Math.min(F,t.height+f+I),Math.max(0,c-(p+y)),Q-(H+K),fn.BOTTOM_RIGHT):new Yn(t.left+t.width-(p+y),t.top+t.height-(H+K)),this.bottomLeftContentBox=w>0||l>0?jn(t.left+E+m,t.top+d,Math.max(0,w-(E+m)),l-(H+K),fn.BOTTOM_LEFT):new Yn(t.left+E+m,t.top+t.height-(H+K))};(pn=fn||(fn={}))[pn.TOP_LEFT=0]="TOP_LEFT",pn[pn.TOP_RIGHT=1]="TOP_RIGHT",pn[pn.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",pn[pn.BOTTOM_LEFT=3]="BOTTOM_LEFT";var jn=function(A,e,t,r,B){var n=(Math.sqrt(2)-1)/3*4,s=t*n,o=r*n,i=A+t,a=e+r;switch(B){case fn.TOP_LEFT:return new Zn(new Yn(A,a),new Yn(A,a-o),new Yn(i-s,e),new Yn(i,e));case fn.TOP_RIGHT:return new Zn(new Yn(A,e),new Yn(A+s,e),new Yn(i,a-o),new Yn(i,a));case fn.BOTTOM_RIGHT:return new Zn(new Yn(i,e),new Yn(i,e+o),new Yn(A+s,a),new Yn(A,a));case fn.BOTTOM_LEFT:default:return new Zn(new Yn(i,a),new Yn(i-s,a),new Yn(A,e+o),new Yn(A,e))}},zn=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},$n=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},As=function(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6},es=function(A,e){this.path=A,this.target=e,this.type=1},ts=function(A){this.opacity=A,this.type=2,this.target=6},rs=function(A){return 1===A.type},Bs=function(A,e){return A.length===e.length&&A.some((function(A,t){return A===e[t]}))},ns=function(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},ss=function(){function A(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new qn(this.container),this.container.styles.opacity<1&&this.effects.push(new ts(this.container.styles.opacity)),null!==this.container.styles.transform){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,B=this.container.styles.transform;this.effects.push(new As(t,r,B))}if(0!==this.container.styles.overflowX){var n=zn(this.curves),s=$n(this.curves);Bs(n,s)?this.effects.push(new es(n,6)):(this.effects.push(new es(n,2)),this.effects.push(new es(s,4)))}}return A.prototype.getEffects=function(A){for(var e=-1===[2,3].indexOf(this.container.styles.position),t=this.parent,r=this.effects.slice(0);t;){var B=t.effects.filter((function(A){return!rs(A)}));if(e||0!==t.container.styles.position||!t.parent){if(r.unshift.apply(r,B),e=-1===[2,3].indexOf(t.container.styles.position),0!==t.container.styles.overflowX){var n=zn(t.curves),s=$n(t.curves);Bs(n,s)||r.unshift(new es(s,6))}}else r.unshift.apply(r,B);t=t.parent}return r.filter((function(e){return Lr(e.target,A)}))},A}(),os=function(A,e,t,r){A.container.elements.forEach((function(B){var n=Lr(B.flags,4),s=Lr(B.flags,2),o=new ss(B,A);Lr(B.styles.display,2048)&&r.push(o);var i=Lr(B.flags,8)?[]:r;if(n||s){var a=n||B.styles.isPositioned()?t:e,c=new ns(o);if(B.styles.isPositioned()||B.styles.opacity<1||B.styles.isTransformed()){var Q=B.styles.zIndex.order;if(Q<0){var g=0;a.negativeZIndex.some((function(A,e){return Q>A.element.container.styles.zIndex.order?(g=e,!1):g>0})),a.negativeZIndex.splice(g,0,c)}else if(Q>0){var w=0;a.positiveZIndex.some((function(A,e){return Q>=A.element.container.styles.zIndex.order?(w=e+1,!1):w>0})),a.positiveZIndex.splice(w,0,c)}else a.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else B.styles.isFloating()?a.nonPositionedFloats.push(c):a.nonPositionedInlineLevel.push(c);os(o,c,n?c:t,i)}else B.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),os(o,e,t,i);Lr(B.flags,8)&&is(B,i)}))},is=function(A,e){for(var t=A instanceof vB?A.start:1,r=A instanceof vB&&A.reversed,B=0;B<e.length;B++){var n=e[B];n.container instanceof LB&&"number"==typeof n.container.value&&0!==n.container.value&&(t=n.container.value),n.listValue=hn(t,n.container.styles.listStyleType,!0),t+=r?-1:1}},as=function(A,e){switch(e){case 0:return Qs(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return Qs(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return Qs(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);default:return Qs(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}},cs=function(A,e){var t=[];return _n(A)?t.push(A.subdivide(.5,!1)):t.push(A),_n(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},Qs=function(A,e,t,r){var B=[];return _n(A)?B.push(A.subdivide(.5,!1)):B.push(A),_n(t)?B.push(t.subdivide(.5,!0)):B.push(t),_n(r)?B.push(r.subdivide(.5,!0).reverse()):B.push(r),_n(e)?B.push(e.subdivide(.5,!1).reverse()):B.push(e),B},gs=function(A){var e=A.bounds,t=A.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},ws=function(A){var e=A.styles,t=A.bounds,r=De(e.paddingLeft,t.width),B=De(e.paddingRight,t.width),n=De(e.paddingTop,t.width),s=De(e.paddingBottom,t.width);return t.add(r+e.borderLeftWidth,n+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+B),-(e.borderTopWidth+e.borderBottomWidth+n+s))},ls=function(A,e,t){var r,B,n=(r=Fs(A.styles.backgroundOrigin,e),B=A,0===r?B.bounds:2===r?ws(B):gs(B)),s=function(A,e){return 0===A?e.bounds:2===A?ws(e):gs(e)}(Fs(A.styles.backgroundClip,e),A),o=Cs(Fs(A.styles.backgroundSize,e),t,n),i=o[0],a=o[1],c=be(Fs(A.styles.backgroundPosition,e),n.width-i,n.height-a);return[hs(Fs(A.styles.backgroundRepeat,e),c,o,n,s),Math.round(n.left+c[0]),Math.round(n.top+c[1]),i,a]},us=function(A){return Fe(A)&&A.value===Bt.AUTO},Us=function(A){return"number"==typeof A},Cs=function(A,e,t){var r=e[0],B=e[1],n=e[2],s=A[0],o=A[1];if(!s)return[0,0];if(ye(s)&&o&&ye(o))return[De(s,t.width),De(o,t.height)];var i=Us(n);if(Fe(s)&&(s.value===Bt.CONTAIN||s.value===Bt.COVER))return Us(n)?t.width/t.height<n!=(s.value===Bt.COVER)?[t.width,t.width/n]:[t.height*n,t.height]:[t.width,t.height];var a=Us(r),c=Us(B),Q=a||c;if(us(s)&&(!o||us(o)))return a&&c?[r,B]:i||Q?Q&&i?[a?r:B*n,c?B:r/n]:[a?r:t.width,c?B:t.height]:[t.width,t.height];if(i){var g=0,w=0;return ye(s)?g=De(s,t.width):ye(o)&&(w=De(o,t.height)),us(s)?g=w*n:o&&!us(o)||(w=g/n),[g,w]}var l=null,u=null;if(ye(s)?l=De(s,t.width):o&&ye(o)&&(u=De(o,t.height)),null===l||o&&!us(o)||(u=a&&c?l/r*B:t.height),null!==u&&us(s)&&(l=a&&c?u/B*r:t.width),null!==l&&null!==u)return[l,u];throw new Error("Unable to calculate background-size for element")},Fs=function(A,e){var t=A[e];return void 0===t?A[0]:t},hs=function(A,e,t,r,B){var n=e[0],s=e[1],o=t[0],i=t[1];switch(A){case 2:return[new Yn(Math.round(r.left),Math.round(r.top+s)),new Yn(Math.round(r.left+r.width),Math.round(r.top+s)),new Yn(Math.round(r.left+r.width),Math.round(i+r.top+s)),new Yn(Math.round(r.left),Math.round(i+r.top+s))];case 3:return[new Yn(Math.round(r.left+n),Math.round(r.top)),new Yn(Math.round(r.left+n+o),Math.round(r.top)),new Yn(Math.round(r.left+n+o),Math.round(r.height+r.top)),new Yn(Math.round(r.left+n),Math.round(r.height+r.top))];case 1:return[new Yn(Math.round(r.left+n),Math.round(r.top+s)),new Yn(Math.round(r.left+n+o),Math.round(r.top+s)),new Yn(Math.round(r.left+n+o),Math.round(r.top+s+i)),new Yn(Math.round(r.left+n),Math.round(r.top+s+i))];default:return[new Yn(Math.round(B.left),Math.round(B.top)),new Yn(Math.round(B.left+B.width),Math.round(B.top)),new Yn(Math.round(B.left+B.width),Math.round(B.height+B.top)),new Yn(Math.round(B.left),Math.round(B.height+B.top))]}},ds=function(){function A(A){this._data={},this._document=A}return A.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),r=this._document.createElement("img"),B=this._document.createElement("span"),n=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=e,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",n.appendChild(t),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",B.style.fontFamily=A,B.style.fontSize=e,B.style.margin="0",B.style.padding="0",B.appendChild(this._document.createTextNode("Hidden Text")),t.appendChild(B),t.appendChild(r);var s=r.offsetTop-B.offsetTop+2;t.removeChild(B),t.appendChild(this._document.createTextNode("Hidden Text")),t.style.lineHeight="normal",r.style.verticalAlign="super";var o=r.offsetTop-t.offsetTop+2;return n.removeChild(t),{baseline:s,middle:o}},A.prototype.getMetrics=function(A,e){var t=A+" "+e;return void 0===this._data[t]&&(this._data[t]=this.parseMetrics(A,e)),this._data[t]},A}(),fs=function(A,e){this.context=A,this.options=e},ps=function(A){function e(e,t){var r=A.call(this,e,t)||this;return r._activeEffects=[],r.canvas=t.canvas?t.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),t.canvas||(r.canvas.width=Math.floor(t.width*t.scale),r.canvas.height=Math.floor(t.height*t.scale),r.canvas.style.width=t.width+"px",r.canvas.style.height=t.height+"px"),r.fontMetrics=new ds(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-t.x,-t.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),r}return I(e,A),e.prototype.applyEffects=function(A){for(var e=this;this._activeEffects.length;)this.popEffect();A.forEach((function(A){return e.applyEffect(A)}))},e.prototype.applyEffect=function(A){this.ctx.save(),function(A){return 2===A.type}(A)&&(this.ctx.globalAlpha=A.opacity),function(A){return 0===A.type}(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),rs(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return K(this,void 0,void 0,(function(){return m(this,(function(e){switch(e.label){case 0:return A.element.container.styles.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.renderNode=function(A){return K(this,void 0,void 0,(function(){return m(this,(function(e){switch(e.label){case 0:return Lr(A.container.flags,16),A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return e.sent(),[4,this.renderNodeContent(A)];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype.renderTextWithLetterSpacing=function(A,e,t){var r=this;0===e?this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+t):FB(A.text).reduce((function(e,B){return r.ctx.fillText(B,e,A.bounds.top+t),e+r.ctx.measureText(B).width}),A.bounds.left)},e.prototype.createFontStyle=function(A){var e=A.fontVariant.filter((function(A){return"normal"===A||"small-caps"===A})).join(""),t=Ks(A.fontFamily).join(", "),r=Ue(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,e,A.fontWeight,r,t].join(" "),t,r]},e.prototype.renderTextNode=function(A,e){return K(this,void 0,void 0,(function(){var t,r,B,n,s,o,i,a,c=this;return m(this,(function(Q){return t=this.createFontStyle(e),r=t[0],B=t[1],n=t[2],this.ctx.font=r,this.ctx.direction=1===e.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(B,n),o=s.baseline,i=s.middle,a=e.paintOrder,A.textBounds.forEach((function(A){a.forEach((function(t){switch(t){case 0:c.ctx.fillStyle=Ve(e.color),c.renderTextWithLetterSpacing(A,e.letterSpacing,o);var r=e.textShadow;r.length&&A.text.trim().length&&(r.slice(0).reverse().forEach((function(t){c.ctx.shadowColor=Ve(t.color),c.ctx.shadowOffsetX=t.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=t.offsetY.number*c.options.scale,c.ctx.shadowBlur=t.blur.number,c.renderTextWithLetterSpacing(A,e.letterSpacing,o)})),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),e.textDecorationLine.length&&(c.ctx.fillStyle=Ve(e.textDecorationColor||e.color),e.textDecorationLine.forEach((function(e){switch(e){case 1:c.ctx.fillRect(A.bounds.left,Math.round(A.bounds.top+o),A.bounds.width,1);break;case 2:c.ctx.fillRect(A.bounds.left,Math.round(A.bounds.top),A.bounds.width,1);break;case 3:c.ctx.fillRect(A.bounds.left,Math.ceil(A.bounds.top+i),A.bounds.width,1)}})));break;case 1:e.webkitTextStrokeWidth&&A.text.trim().length&&(c.ctx.strokeStyle=Ve(e.webkitTextStrokeColor),c.ctx.lineWidth=e.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(A.text,A.bounds.left,A.bounds.top+o)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}}))})),[2]}))}))},e.prototype.renderReplacedElement=function(A,e,t){if(t&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var r=ws(A),B=$n(e);this.path(B),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return K(this,void 0,void 0,(function(){var t,r,B,n,s,o,i,a,c,Q,g,w,l,u,U,C,F,h;return m(this,(function(d){switch(d.label){case 0:this.applyEffects(A.getEffects(4)),t=A.container,r=A.curves,B=t.styles,n=0,s=t.textNodes,d.label=1;case 1:return n<s.length?(o=s[n],[4,this.renderTextNode(o,B)]):[3,4];case 2:d.sent(),d.label=3;case 3:return n++,[3,1];case 4:if(!(t instanceof yB))return[3,8];d.label=5;case 5:return d.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return U=d.sent(),this.renderReplacedElement(t,r,U),[3,8];case 7:return d.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof KB&&this.renderReplacedElement(t,r,t.canvas),!(t instanceof mB))return[3,12];d.label=9;case 9:return d.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return U=d.sent(),this.renderReplacedElement(t,r,U),[3,12];case 11:return d.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof GB&&t.tree?[4,new e(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}).render(t.tree)]:[3,14];case 13:i=d.sent(),t.width&&t.height&&this.ctx.drawImage(i,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),d.label=14;case 14:if(t instanceof MB&&(a=Math.min(t.bounds.width,t.bounds.height),"checkbox"===t.type?t.checked&&(this.ctx.save(),this.path([new Yn(t.bounds.left+.39363*a,t.bounds.top+.79*a),new Yn(t.bounds.left+.16*a,t.bounds.top+.5549*a),new Yn(t.bounds.left+.27347*a,t.bounds.top+.44071*a),new Yn(t.bounds.left+.39694*a,t.bounds.top+.5649*a),new Yn(t.bounds.left+.72983*a,t.bounds.top+.23*a),new Yn(t.bounds.left+.84*a,t.bounds.top+.34085*a),new Yn(t.bounds.left+.39363*a,t.bounds.top+.79*a)]),this.ctx.fillStyle=Ve(707406591),this.ctx.fill(),this.ctx.restore()):"radio"===t.type&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+a/2,t.bounds.top+a/2,a/4,0,2*Math.PI,!0),this.ctx.fillStyle=Ve(707406591),this.ctx.fill(),this.ctx.restore())),Hs(t)&&t.value.length){switch(c=this.createFontStyle(B),F=c[0],Q=c[1],g=this.fontMetrics.getMetrics(F,Q).baseline,this.ctx.font=F,this.ctx.fillStyle=Ve(B.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Is(t.styles.textAlign),h=ws(t),w=0,t.styles.textAlign){case 1:w+=h.width/2;break;case 2:w+=h.width}l=h.add(w,0,0,-h.height/2+1),this.ctx.save(),this.path([new Yn(h.left,h.top),new Yn(h.left+h.width,h.top),new Yn(h.left+h.width,h.top+h.height),new Yn(h.left,h.top+h.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new uB(t.value,l),B.letterSpacing,g),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Lr(t.styles.display,2048))return[3,20];if(null===t.styles.listStyleImage)return[3,19];if(0!==(u=t.styles.listStyleImage).type)return[3,18];U=void 0,C=u.url,d.label=15;case 15:return d.trys.push([15,17,,18]),[4,this.context.cache.match(C)];case 16:return U=d.sent(),this.ctx.drawImage(U,t.bounds.left-(U.width+10),t.bounds.top),[3,18];case 17:return d.sent(),this.context.logger.error("Error loading list-style-image "+C),[3,18];case 18:return[3,20];case 19:A.listValue&&-1!==t.styles.listStyleType&&(F=this.createFontStyle(B)[0],this.ctx.font=F,this.ctx.fillStyle=Ve(B.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",h=new v(t.bounds.left,t.bounds.top+De(t.styles.paddingTop,t.bounds.width),t.bounds.width,Yt(B.lineHeight,B.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new uB(A.listValue,h),B.letterSpacing,Yt(B.lineHeight,B.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),d.label=20;case 20:return[2]}}))}))},e.prototype.renderStackContent=function(A){return K(this,void 0,void 0,(function(){var e,t,r,B,n,s,o,i,a,c,Q,g,w,l,u;return m(this,(function(U){switch(U.label){case 0:return Lr(A.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:U.sent(),e=0,t=A.negativeZIndex,U.label=2;case 2:return e<t.length?(u=t[e],[4,this.renderStack(u)]):[3,5];case 3:U.sent(),U.label=4;case 4:return e++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:U.sent(),r=0,B=A.nonInlineLevel,U.label=7;case 7:return r<B.length?(u=B[r],[4,this.renderNode(u)]):[3,10];case 8:U.sent(),U.label=9;case 9:return r++,[3,7];case 10:n=0,s=A.nonPositionedFloats,U.label=11;case 11:return n<s.length?(u=s[n],[4,this.renderStack(u)]):[3,14];case 12:U.sent(),U.label=13;case 13:return n++,[3,11];case 14:o=0,i=A.nonPositionedInlineLevel,U.label=15;case 15:return o<i.length?(u=i[o],[4,this.renderStack(u)]):[3,18];case 16:U.sent(),U.label=17;case 17:return o++,[3,15];case 18:a=0,c=A.inlineLevel,U.label=19;case 19:return a<c.length?(u=c[a],[4,this.renderNode(u)]):[3,22];case 20:U.sent(),U.label=21;case 21:return a++,[3,19];case 22:Q=0,g=A.zeroOrAutoZIndexOrTransformedOrOpacity,U.label=23;case 23:return Q<g.length?(u=g[Q],[4,this.renderStack(u)]):[3,26];case 24:U.sent(),U.label=25;case 25:return Q++,[3,23];case 26:w=0,l=A.positiveZIndex,U.label=27;case 27:return w<l.length?(u=l[w],[4,this.renderStack(u)]):[3,30];case 28:U.sent(),U.label=29;case 29:return w++,[3,27];case 30:return[2]}}))}))},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var e=this;A.forEach((function(A,t){var r=_n(A)?A.start:A;0===t?e.ctx.moveTo(r.x,r.y):e.ctx.lineTo(r.x,r.y),_n(A)&&e.ctx.bezierCurveTo(A.startControl.x,A.startControl.y,A.endControl.x,A.endControl.y,A.end.x,A.end.y)}))},e.prototype.renderRepeat=function(A,e,t,r){this.path(A),this.ctx.fillStyle=e,this.ctx.translate(t,r),this.ctx.fill(),this.ctx.translate(-t,-r)},e.prototype.resizeImage=function(A,e,t){var r;if(A.width===e&&A.height===t)return A;var B=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return B.width=Math.max(1,e),B.height=Math.max(1,t),B.getContext("2d").drawImage(A,0,0,A.width,A.height,0,0,e,t),B},e.prototype.renderBackgroundImage=function(A){return K(this,void 0,void 0,(function(){var e,t,r,B,n,s;return m(this,(function(o){switch(o.label){case 0:e=A.styles.backgroundImage.length-1,t=function(t){var B,n,s,o,i,a,c,Q,g,w,l,u,U,C,F,h,d,f,p,H,E,I,y,K,L,v,b,D,x,M,S;return m(this,(function(m){switch(m.label){case 0:if(0!==t.type)return[3,5];B=void 0,n=t.url,m.label=1;case 1:return m.trys.push([1,3,,4]),[4,r.context.cache.match(n)];case 2:return B=m.sent(),[3,4];case 3:return m.sent(),r.context.logger.error("Error loading background-image "+n),[3,4];case 4:return B&&(s=ls(A,e,[B.width,B.height,B.width/B.height]),h=s[0],I=s[1],y=s[2],p=s[3],H=s[4],C=r.ctx.createPattern(r.resizeImage(B,p,H),"repeat"),r.renderRepeat(h,C,I,y)),[3,6];case 5:1===t.type?(o=ls(A,e,[null,null,null]),h=o[0],I=o[1],y=o[2],p=o[3],H=o[4],i=ze(t.angle,p,H),a=i[0],c=i[1],Q=i[2],g=i[3],w=i[4],(l=document.createElement("canvas")).width=p,l.height=H,u=l.getContext("2d"),U=u.createLinearGradient(c,g,Q,w),je(t.stops,a).forEach((function(A){return U.addColorStop(A.stop,Ve(A.color))})),u.fillStyle=U,u.fillRect(0,0,p,H),p>0&&H>0&&(C=r.ctx.createPattern(l,"repeat"),r.renderRepeat(h,C,I,y))):function(A){return 2===A.type}(t)&&(F=ls(A,e,[null,null,null]),h=F[0],d=F[1],f=F[2],p=F[3],H=F[4],E=0===t.position.length?[Le]:t.position,I=De(E[0],p),y=De(E[E.length-1],H),K=function(A,e,t,r,B){var n=0,s=0;switch(A.size){case 0:0===A.shape?n=s=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-B)):1===A.shape&&(n=Math.min(Math.abs(e),Math.abs(e-r)),s=Math.min(Math.abs(t),Math.abs(t-B)));break;case 2:if(0===A.shape)n=s=Math.min($e(e,t),$e(e,t-B),$e(e-r,t),$e(e-r,t-B));else if(1===A.shape){var o=Math.min(Math.abs(t),Math.abs(t-B))/Math.min(Math.abs(e),Math.abs(e-r)),i=At(r,B,e,t,!0),a=i[0],c=i[1];s=o*(n=$e(a-e,(c-t)/o))}break;case 1:0===A.shape?n=s=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-B)):1===A.shape&&(n=Math.max(Math.abs(e),Math.abs(e-r)),s=Math.max(Math.abs(t),Math.abs(t-B)));break;case 3:if(0===A.shape)n=s=Math.max($e(e,t),$e(e,t-B),$e(e-r,t),$e(e-r,t-B));else if(1===A.shape){o=Math.max(Math.abs(t),Math.abs(t-B))/Math.max(Math.abs(e),Math.abs(e-r));var Q=At(r,B,e,t,!1);a=Q[0],c=Q[1],s=o*(n=$e(a-e,(c-t)/o))}}return Array.isArray(A.size)&&(n=De(A.size[0],r),s=2===A.size.length?De(A.size[1],B):n),[n,s]}(t,I,y,p,H),L=K[0],v=K[1],L>0&&v>0&&(b=r.ctx.createRadialGradient(d+I,f+y,0,d+I,f+y,L),je(t.stops,2*L).forEach((function(A){return b.addColorStop(A.stop,Ve(A.color))})),r.path(h),r.ctx.fillStyle=b,L!==v?(D=A.bounds.left+.5*A.bounds.width,x=A.bounds.top+.5*A.bounds.height,S=1/(M=v/L),r.ctx.save(),r.ctx.translate(D,x),r.ctx.transform(1,0,0,M,0,0),r.ctx.translate(-D,-x),r.ctx.fillRect(d,S*(f-x)+x,p,H*S),r.ctx.restore()):r.ctx.fill())),m.label=6;case 6:return e--,[2]}}))},r=this,B=0,n=A.styles.backgroundImage.slice(0).reverse(),o.label=1;case 1:return B<n.length?(s=n[B],[5,t(s)]):[3,4];case 2:o.sent(),o.label=3;case 3:return B++,[3,1];case 4:return[2]}}))}))},e.prototype.renderSolidBorder=function(A,e,t){return K(this,void 0,void 0,(function(){return m(this,(function(r){return this.path(as(t,e)),this.ctx.fillStyle=Ve(A),this.ctx.fill(),[2]}))}))},e.prototype.renderDoubleBorder=function(A,e,t,r){return K(this,void 0,void 0,(function(){var B,n;return m(this,(function(s){switch(s.label){case 0:return e<3?[4,this.renderSolidBorder(A,t,r)]:[3,2];case 1:return s.sent(),[2];case 2:return B=function(A,e){switch(e){case 0:return Qs(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return Qs(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return Qs(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);default:return Qs(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}}(r,t),this.path(B),this.ctx.fillStyle=Ve(A),this.ctx.fill(),n=function(A,e){switch(e){case 0:return Qs(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return Qs(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return Qs(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);default:return Qs(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}}(r,t),this.path(n),this.ctx.fill(),[2]}}))}))},e.prototype.renderNodeBackgroundAndBorders=function(A){return K(this,void 0,void 0,(function(){var e,t,r,B,n,s,o,i,a=this;return m(this,(function(c){switch(c.label){case 0:return this.applyEffects(A.getEffects(2)),e=A.container.styles,t=!Oe(e.backgroundColor)||e.backgroundImage.length,r=[{style:e.borderTopStyle,color:e.borderTopColor,width:e.borderTopWidth},{style:e.borderRightStyle,color:e.borderRightColor,width:e.borderRightWidth},{style:e.borderBottomStyle,color:e.borderBottomColor,width:e.borderBottomWidth},{style:e.borderLeftStyle,color:e.borderLeftColor,width:e.borderLeftWidth}],B=Es(Fs(e.backgroundClip,0),A.curves),t||e.boxShadow.length?(this.ctx.save(),this.path(B),this.ctx.clip(),Oe(e.backgroundColor)||(this.ctx.fillStyle=Ve(e.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),e.boxShadow.slice(0).reverse().forEach((function(e){a.ctx.save();var t,r,B,n,s,o=zn(A.curves),i=e.inset?0:1e4,c=(t=o,r=-i+(e.inset?1:-1)*e.spread.number,B=(e.inset?1:-1)*e.spread.number,n=e.spread.number*(e.inset?-2:2),s=e.spread.number*(e.inset?-2:2),t.map((function(A,e){switch(e){case 0:return A.add(r,B);case 1:return A.add(r+n,B);case 2:return A.add(r+n,B+s);case 3:return A.add(r,B+s)}return A})));e.inset?(a.path(o),a.ctx.clip(),a.mask(c)):(a.mask(o),a.ctx.clip(),a.path(c)),a.ctx.shadowOffsetX=e.offsetX.number+i,a.ctx.shadowOffsetY=e.offsetY.number,a.ctx.shadowColor=Ve(e.color),a.ctx.shadowBlur=e.blur.number,a.ctx.fillStyle=e.inset?Ve(e.color):"rgba(0,0,0,1)",a.ctx.fill(),a.ctx.restore()})),c.label=2;case 2:n=0,s=0,o=r,c.label=3;case 3:return s<o.length?0!==(i=o[s]).style&&!Oe(i.color)&&i.width>0?2!==i.style?[3,5]:[4,this.renderDashedDottedBorder(i.color,i.width,n,A.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==i.style?[3,7]:[4,this.renderDashedDottedBorder(i.color,i.width,n,A.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==i.style?[3,9]:[4,this.renderDoubleBorder(i.color,i.width,n,A.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(i.color,n,A.curves)];case 10:c.sent(),c.label=11;case 11:n++,c.label=12;case 12:return s++,[3,3];case 13:return[2]}}))}))},e.prototype.renderDashedDottedBorder=function(A,e,t,r,B){return K(this,void 0,void 0,(function(){var n,s,o,i,a,c,Q,g,w,l,u,U,C,F,h,d;return m(this,(function(f){return this.ctx.save(),n=function(A,e){switch(e){case 0:return cs(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return cs(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return cs(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);default:return cs(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}}(r,t),s=as(r,t),2===B&&(this.path(s),this.ctx.clip()),_n(s[0])?(o=s[0].start.x,i=s[0].start.y):(o=s[0].x,i=s[0].y),_n(s[1])?(a=s[1].end.x,c=s[1].end.y):(a=s[1].x,c=s[1].y),Q=0===t||2===t?Math.abs(o-a):Math.abs(i-c),this.ctx.beginPath(),3===B?this.formatPath(n):this.formatPath(s.slice(0,2)),g=e<3?3*e:2*e,w=e<3?2*e:e,3===B&&(g=e,w=e),l=!0,Q<=2*g?l=!1:Q<=2*g+w?(g*=u=Q/(2*g+w),w*=u):(U=Math.floor((Q+w)/(g+w)),C=(Q-U*g)/(U-1),w=(F=(Q-(U+1)*g)/U)<=0||Math.abs(w-C)<Math.abs(w-F)?C:F),l&&(3===B?this.ctx.setLineDash([0,g+w]):this.ctx.setLineDash([g,w])),3===B?(this.ctx.lineCap="round",this.ctx.lineWidth=e):this.ctx.lineWidth=2*e+1.1,this.ctx.strokeStyle=Ve(A),this.ctx.stroke(),this.ctx.setLineDash([]),2===B&&(_n(s[0])&&(h=s[3],d=s[0],this.ctx.beginPath(),this.formatPath([new Yn(h.end.x,h.end.y),new Yn(d.start.x,d.start.y)]),this.ctx.stroke()),_n(s[1])&&(h=s[1],d=s[2],this.ctx.beginPath(),this.formatPath([new Yn(h.end.x,h.end.y),new Yn(d.start.x,d.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},e.prototype.render=function(A){return K(this,void 0,void 0,(function(){var e;return m(this,(function(t){switch(t.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Ve(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=new ss(A,null),B=new ns(r),os(r,B,B,n=[]),is(r.container,n),e=B,[4,this.renderStack(e)];case 1:return t.sent(),this.applyEffects([]),[2,this.canvas]}var r,B,n}))}))},e}(fs),Hs=function(A){return A instanceof TB||(A instanceof SB||A instanceof MB&&"radio"!==A.type&&"checkbox"!==A.type)},Es=function(A,e){switch(A){case 0:return zn(e);case 2:return function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]}(e);default:return $n(e)}},Is=function(A){switch(A){case 1:return"center";case 2:return"right";default:return"left"}},ys=["-apple-system","system-ui"],Ks=function(A){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?A.filter((function(A){return-1===ys.indexOf(A)})):A},ms=function(A){function e(e,t){var r=A.call(this,e,t)||this;return r.canvas=t.canvas?t.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=t,r.canvas.width=Math.floor(t.width*t.scale),r.canvas.height=Math.floor(t.height*t.scale),r.canvas.style.width=t.width+"px",r.canvas.style.height=t.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-t.x,-t.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),r}return I(e,A),e.prototype.render=function(A){return K(this,void 0,void 0,(function(){var e,t;return m(this,(function(r){switch(r.label){case 0:return e=gB(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,Ls(e)];case 1:return t=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Ve(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(t,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},e}(fs),Ls=function(A){return new Promise((function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))}))},vs=function(){function A(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return A.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,L([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},A.prototype.getTime=function(){return Date.now()-this.start},A.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,L([this.id,this.getTime()+"ms"],A))},A.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,L([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},A.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,L([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},A.instances={},A}(),bs=function(){function A(e,t){var r;this.windowBounds=t,this.instanceName="#"+A.instanceCount++,this.logger=new vs({id:this.instanceName,enabled:e.logging}),this.cache=null!==(r=e.cache)&&void 0!==r?r:new Gn(this,e)}return A.instanceCount=1,A}();"undefined"!=typeof window&&Tn.setContext(window);var Ds=function(A,e){return K(void 0,void 0,void 0,(function(){var t,r,B,n,s,o,i,a,c,Q,g,w,l,u,U,C,F,h,d,f,p,H,E,I,K,L,D,x,M,S,T,G,O,V,k,R,N,P;return m(this,(function(m){switch(m.label){case 0:if(!A||"object"!=typeof A)return[2,Promise.reject("Invalid element provided as first argument")];if(!(t=A.ownerDocument))throw new Error("Element is not attached to a Document");if(!(r=t.defaultView))throw new Error("Document is not attached to a Window");return B={allowTaint:null!==(H=e.allowTaint)&&void 0!==H&&H,imageTimeout:null!==(E=e.imageTimeout)&&void 0!==E?E:15e3,proxy:e.proxy,useCORS:null!==(I=e.useCORS)&&void 0!==I&&I},n=y({logging:null===(K=e.logging)||void 0===K||K,cache:e.cache},B),s={windowWidth:null!==(L=e.windowWidth)&&void 0!==L?L:r.innerWidth,windowHeight:null!==(D=e.windowHeight)&&void 0!==D?D:r.innerHeight,scrollX:null!==(x=e.scrollX)&&void 0!==x?x:r.pageXOffset,scrollY:null!==(M=e.scrollY)&&void 0!==M?M:r.pageYOffset},o=new v(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),i=new bs(n,o),a=null!==(S=e.foreignObjectRendering)&&void 0!==S&&S,c={allowTaint:null!==(T=e.allowTaint)&&void 0!==T&&T,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:a,copyStyles:a},i.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),Q=new dn(i,A,c),(g=Q.clonedReferenceElement)?[4,Q.toIFrame(t,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return w=m.sent(),l=zB(g)||"HTML"===g.tagName?function(A){var e=A.body,t=A.documentElement;if(!e||!t)throw new Error("Unable to get document size");var r=Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),B=Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight));return new v(0,0,r,B)}(g.ownerDocument):b(i,g),u=l.width,U=l.height,C=l.left,F=l.top,h=xs(i,g,e.backgroundColor),d={canvas:e.canvas,backgroundColor:h,scale:null!==(O=null!==(G=e.scale)&&void 0!==G?G:r.devicePixelRatio)&&void 0!==O?O:1,x:(null!==(V=e.x)&&void 0!==V?V:0)+C,y:(null!==(k=e.y)&&void 0!==k?k:0)+F,width:null!==(R=e.width)&&void 0!==R?R:Math.ceil(u),height:null!==(N=e.height)&&void 0!==N?N:Math.ceil(U)},a?(i.logger.debug("Document cloned, using foreign object rendering"),[4,new ms(i,d).render(g)]):[3,3];case 2:return f=m.sent(),[3,5];case 3:return i.logger.debug("Document cloned, element located at "+C+","+F+" with size "+u+"x"+U+" using computed rendering"),i.logger.debug("Starting DOM parsing"),p=RB(i,g),h===p.styles.backgroundColor&&(p.styles.backgroundColor=We.TRANSPARENT),i.logger.debug("Starting renderer for element at "+d.x+","+d.y+" with size "+d.width+"x"+d.height),[4,new ps(i,d).render(p)];case 4:f=m.sent(),m.label=5;case 5:return(null===(P=e.removeContainer)||void 0===P||P)&&(dn.destroy(w)||i.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),i.logger.debug("Finished rendering"),[2,f]}}))}))},xs=function(A,e,t){var r=e.ownerDocument,B=r.documentElement?Ye(A,getComputedStyle(r.documentElement).backgroundColor):We.TRANSPARENT,n=r.body?Ye(A,getComputedStyle(r.body).backgroundColor):We.TRANSPARENT,s="string"==typeof t?Ye(A,t):null===t?We.TRANSPARENT:4294967295;return e===r.documentElement?Oe(B)?Oe(n)?s:n:B:s};const Ms=A({setup(A){const H=e({title:t.getTitle(),data:{},list:[],infoList:[],qrcode:"",preview:{index:0,show:!1,loading:!1}});function E(A){const e=H.list[A];d({url:e.path+"?timestamp="+(new Date).getTime(),success:t=>{if(200===t.statusCode){const r=f("cardbg"+A);r.drawImage(t.tempFilePath,0,0,720,1214),r.draw(),setTimeout((()=>{const t=document.getElementById("card"+A);var r,B;t&&(r=t,B={useCORS:!1},void 0===B&&(B={}),Ds(r,B)).then((A=>{e.showPath=A.toDataURL("image/png")}))}),500)}},fail:()=>{e.showed=!1},complete:()=>{setTimeout((()=>{H.preview.loading=!1}),1e3)}})}function I(A){const e=H.list[A];var t,r,B,n,s,o;if(!e.showed&&!H.preview.loading)if(H.preview.loading=!0,e.showed=!0,H.qrcode)E(A);else if("miniprogram"===window.__wxjs_environment&&H.data.appletCode){var i=H.data.appletCode;t=i,r=function(A){H.qrcode=A},n=document.createElement("CANVAS"),s=n.getContext("2d"),(o=new Image).crossOrigin="Anonymous",o.onload=function(){n.height=o.height,n.width=o.width,s.drawImage(o,0,0);var A=n.toDataURL(B||"image/png");r.call(this,A),n=null},o.src=t,E(A)}else p.toDataURL("https://"+H.data.mallLink+".edstao.com",{width:160,height:160,margin:1}).then((e=>{H.qrcode=e,E(A)})).catch((()=>{H.preview.loading=!1}))}function y(A){H.preview.index=A,I(A)}function K(){t.goBack()}return r((()=>{B.storeCard({link:n("subdomain")}).then((A=>{H.data=A,H.list=A.cards,H.infoList=[{name:"商城名称：",value:H.data.mallName},{name:"商城网址：",value:H.data.mallLink+".edstao.com"},{name:"联系电话：",value:H.data.mallContact},{name:"门店地址：",value:H.data.storeAddress}]}))})),(A,e)=>{const t=C("van-icon"),r=F,B=C("van-sticky"),n=C("van-image"),d=h,f=C("van-grid-item"),p=C("van-grid"),E=C("van-image-preview"),m=C("van-overlay");return s(),o(r,{class:"bg-max bg-gray"},{default:i((()=>[a(B,null,{default:i((()=>[a(r,{class:"justify-center bg-white sh pd-px-20 mg-b-20"},{default:i((()=>[a(t,{class:"top-left",name:"arrow-left",onClick:K}),a(r,{class:"top-center"},{default:i((()=>[c(Q(g(H).title),1)])),_:1})])),_:1})])),_:1}),a(p,{"column-num":2,gutter:5,class:"bg-gray pd-b-px-60"},{default:i((()=>[(s(!0),w(u,null,l(g(H).list,((A,e)=>(s(),o(f,{onClick:A=>function(A){H.preview.index=A,H.preview.show=!0,I(A)}(e)},{default:i((()=>[a(r,{class:"text-center bg-white mg-v-px-10-m"},{default:i((()=>[a(n,{src:A.path,width:"322rpx",height:"543rpx","loading-icon":"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default1.png","icon-size":"322rpx"},null,8,["src"]),a(r,null,{default:i((()=>[c(Q(A.name),1)])),_:2},1024)])),_:2},1024),U(" 这个部分是卡片的实体部分，我置底了 "),A.showed?(s(),o(r,{key:0,class:"card",id:"card"+e},{default:i((()=>[a(d,{style:{width:"720px",height:"1214px"},id:"cardbg"+e,"canvas-id":"cardbg"+e},null,8,["id","canvas-id"]),a(r,{class:"info flex"},{default:i((()=>[a(r,null,{default:i((()=>[a(n,{width:"160px",height:"160px",src:g(H).qrcode,"loading-icon":"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default1.png","icon-size":"160px"},null,8,["src"]),a(r,{class:"tip"},{default:i((()=>[c("扫码获取更多活动信息")])),_:1})])),_:1}),a(r,{class:"detail"},{default:i((()=>[(s(!0),w(u,null,l(g(H).infoList,(A=>(s(),o(r,{class:"flex"},{default:i((()=>[a(r,{class:"name"},{default:i((()=>[c(Q(A.name),1)])),_:2},1024),a(r,{class:"value"},{default:i((()=>[c(Q(A.value),1)])),_:2},1024)])),_:2},1024)))),256))])),_:2},1024)])),_:2},1024)])),_:2},1032,["id"])):U("v-if",!0)])),_:2},1032,["onClick"])))),256))])),_:1}),a(r,{class:"fixed-bottom text-center bg-white pd-30 br-t",style:{"z-index":"1"}},{default:i((()=>[c("点击查高清图")])),_:1}),a(E,{show:g(H).preview.show,"onUpdate:show":e[0]||(e[0]=A=>g(H).preview.show=A),"start-position":g(H).preview.index,closeable:"",images:g(H).list.map((A=>A.showPath)),onChange:y,showIndex:!1},null,8,["show","start-position","images"]),U(" 因为生成卡片会卡，所以加载完一张之后，再让用户操作 "),a(m,{show:g(H).preview.loading,style:{"z-index":"2003"}},null,8,["show"])])),_:1})}}});var Ss=H(Ms,[["__scopeId","data-v-2746652f"]]);export{Ss as default};
