import{c as Hn,b as Qt,d as UB,r as ke,x as Ne,aT as vn,aU as In,Y as mn,X as yn,w as Kn,g as Ln,v as bn,a as H,I as gt,Z as wt,ac as ut,ad as Dn,W as Sn,k as xn,D as FB,M as Tn,y as On,z as Mn,ap as Gn,L as Rn,a0 as Vn,F as lt,aV as ft,a4 as Ct,aW as Nn,E as wr,aq as Pn}from"./index-971588a5.js";import{M as Xn}from"./index-1b54b9d7.js";import"./index-0c6f164a.js";import"./index-a1fa647c.js";const[Jn,qA]=Hn("notice-bar"),_n={text:String,mode:String,color:String,delay:Qt(1),speed:Qt(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};var kn=UB({name:Jn,props:_n,emits:["close","replay"],setup(e,{emit:A,slots:r}){let t=0,B=0,n;const s=ke(),i=ke(),a=Ne({show:!0,offset:0,duration:0}),o=()=>{if(r["left-icon"])return r["left-icon"]();if(e.leftIcon)return H(gt,{class:qA("left-icon"),name:e.leftIcon},null)},c=()=>{if(e.mode==="closeable")return"cross";if(e.mode==="link")return"arrow"},Q=d=>{e.mode==="closeable"&&(a.show=!1,A("close",d))},g=()=>{if(r["right-icon"])return r["right-icon"]();const d=c();if(d)return H(gt,{name:d,class:qA("right-icon"),onClick:Q},null)},f=()=>{a.offset=t,a.duration=0,Dn(()=>{ut(()=>{a.offset=-B,a.duration=(B+t)/+e.speed,A("replay")})})},u=()=>{const d=e.scrollable===!1&&!e.wrapable,l={transform:a.offset?`translateX(${a.offset}px)`:"",transitionDuration:`${a.duration}s`};return H("div",{ref:s,role:"marquee",class:qA("wrap")},[H("div",{ref:i,style:l,class:[qA("content"),{"van-ellipsis":d}],onTransitionend:f},[r.default?r.default():e.text])])},w=()=>{const{delay:d,speed:l,scrollable:C}=e,m=Sn(d)?+d*1e3:0;t=0,B=0,a.offset=0,a.duration=0,clearTimeout(n),n=setTimeout(()=>{if(!s.value||!i.value||C===!1)return;const v=wt(s).width,E=wt(i).width;(C||E>v)&&ut(()=>{t=v,B=E,a.offset=-B,a.duration=B/+l})},m)};return vn(w),In(w),mn("pageshow",w),yn({reset:w}),Kn(()=>[e.text,e.scrollable],w),()=>{const{color:d,wrapable:l,background:C}=e;return Ln(H("div",{role:"alert",class:qA({wrapable:l}),style:{color:d,background:C}},[o(),u(),g()]),[[bn,a.show]])}}});const Ut=xn(kn),Wn="_back_1uhmc_1",Yn="_container_1uhmc_16",Zn="_content_1uhmc_22",qn="_opacityBg_1uhmc_27",zn="_leftContent_1uhmc_32",jn="_leftBg_1uhmc_37",$n="_leftBg2_1uhmc_48",As="_types_1uhmc_58",es="_type_1uhmc_58",rs="_typeActive_1uhmc_78",ts="_typeImg_1uhmc_78",Bs="_scaleBtn_1uhmc_1",ns="_typeIcon_1uhmc_92",ss="_center_1uhmc_103",as="_musicContent_1uhmc_118",is="_searchNotice_1uhmc_129",os="_searchNoticeShow_1uhmc_138",cs="_musicItem_1uhmc_141",Qs="_disableNotic_1uhmc_154",gs="_musicActive_1uhmc_158",ws="_musicAvtor_1uhmc_168",us="_musicInfo_1uhmc_182",ls="_musicName_1uhmc_185",fs="_noticeBar_1uhmc_190",Cs="_musicDes_1uhmc_194",Us="_musicFavitor_1uhmc_199",Fs="_musicAuthor_1uhmc_211",hs="_musicIcon_1uhmc_219",ds="_right_1uhmc_223",Es="_staff_1uhmc_238",ps="_rightBtns_1uhmc_241",Hs="_loadingWrap_1uhmc_282",vs="_empty_1uhmc_287",Is="_displayIcon_1uhmc_1",L={back:Wn,container:Yn,content:Zn,opacityBg:qn,leftContent:zn,leftBg:jn,leftBg2:$n,types:As,type:es,typeActive:rs,typeImg:ts,scaleBtn:Bs,typeIcon:ns,center:ss,musicContent:as,searchNotice:is,searchNoticeShow:os,musicItem:cs,disableNotic:Qs,musicActive:gs,musicAvtor:ws,musicInfo:us,musicName:ls,noticeBar:fs,musicDes:Cs,musicFavitor:Us,musicAuthor:Fs,musicIcon:hs,right:ds,"right-musicName":"_right-musicName_1uhmc_230",staff:Es,rightBtns:ps,loadingWrap:Hs,empty:vs,displayIcon:Is},ms=""+new URL("icon_back-b80c2fc2.svg",import.meta.url).href,ys=""+new URL("icon_down-27184904.svg",import.meta.url).href,Ks=""+new URL("icon_jianpu-80bd16a8.svg",import.meta.url).href,Ls=""+new URL("icon_jianpuActive-17580202.svg",import.meta.url).href,bs="data:image/png;base64, ",Ds={icon_start:bs};/*!
 * 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 Tr=function(e,A){return Tr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var B in t)Object.prototype.hasOwnProperty.call(t,B)&&(r[B]=t[B])},Tr(e,A)};function nA(e,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");Tr(e,A);function r(){this.constructor=e}e.prototype=A===null?Object.create(A):(r.prototype=A.prototype,new r)}var Or=function(){return Or=Object.assign||function(A){for(var r,t=1,B=arguments.length;t<B;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(A[n]=r[n])}return A},Or.apply(this,arguments)};function W(e,A,r,t){function B(n){return n instanceof r?n:new r(function(s){s(n)})}return new(r||(r=Promise))(function(n,s){function i(c){try{o(t.next(c))}catch(Q){s(Q)}}function a(c){try{o(t.throw(c))}catch(Q){s(Q)}}function o(c){c.done?n(c.value):B(c.value).then(i,a)}o((t=t.apply(e,A||[])).next())})}function _(e,A){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},t,B,n,s;return s={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(o){return function(c){return a([o,c])}}function a(o){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,B&&(n=o[0]&2?B.return:o[0]?B.throw||((n=B.return)&&n.call(B),0):B.next)&&!(n=n.call(B,o[1])).done)return n;switch(B=0,n&&(o=[o[0]&2,n.value]),o[0]){case 0:case 1:n=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,B=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){r.label=o[1];break}if(o[0]===6&&r.label<n[1]){r.label=n[1],n=o;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(o);break}n[2]&&r.ops.pop(),r.trys.pop();continue}o=A.call(e,r)}catch(c){o=[6,c],B=0}finally{t=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function Ue(e,A,r){if(r||arguments.length===2)for(var t=0,B=A.length,n;t<B;t++)(n||!(t in A))&&(n||(n=Array.prototype.slice.call(A,0,t)),n[t]=A[t]);return e.concat(n||A)}var lA=function(){function e(A,r,t,B){this.left=A,this.top=r,this.width=t,this.height=B}return e.prototype.add=function(A,r,t,B){return new e(this.left+A,this.top+r,this.width+t,this.height+B)},e.fromClientRect=function(A,r){return new e(r.left+A.windowBounds.left,r.top+A.windowBounds.top,r.width,r.height)},e.fromDOMRectList=function(A,r){var t=Array.from(r).find(function(B){return B.width!==0});return t?new e(t.left+A.windowBounds.left,t.top+A.windowBounds.top,t.width,t.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),tr=function(e,A){return lA.fromClientRect(e,A.getBoundingClientRect())},Ss=function(e){var A=e.body,r=e.documentElement;if(!A||!r)throw new Error("Unable to get document size");var t=Math.max(Math.max(A.scrollWidth,r.scrollWidth),Math.max(A.offsetWidth,r.offsetWidth),Math.max(A.clientWidth,r.clientWidth)),B=Math.max(Math.max(A.scrollHeight,r.scrollHeight),Math.max(A.offsetHeight,r.offsetHeight),Math.max(A.clientHeight,r.clientHeight));return new lA(0,0,t,B)},Br=function(e){for(var A=[],r=0,t=e.length;r<t;){var B=e.charCodeAt(r++);if(B>=55296&&B<=56319&&r<t){var n=e.charCodeAt(r++);(n&64512)===56320?A.push(((B&1023)<<10)+(n&1023)+65536):(A.push(B),r--)}else A.push(B)}return A},M=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var t=[],B=-1,n="";++B<r;){var s=e[B];s<=65535?t.push(s):(s-=65536,t.push((s>>10)+55296,s%1024+56320)),(B+1===r||t.length>16384)&&(n+=String.fromCharCode.apply(String,t),t.length=0)}return n},Ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Fe=0;Fe<Ft.length;Fe++)xs[Ft.charCodeAt(Fe)]=Fe;var ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ee=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var he=0;he<ht.length;he++)ee[ht.charCodeAt(he)]=he;var Ts=function(e){var A=e.length*.75,r=e.length,t,B=0,n,s,i,a;e[e.length-1]==="="&&(A--,e[e.length-2]==="="&&A--);var o=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(A):new Array(A),c=Array.isArray(o)?o:new Uint8Array(o);for(t=0;t<r;t+=4)n=ee[e.charCodeAt(t)],s=ee[e.charCodeAt(t+1)],i=ee[e.charCodeAt(t+2)],a=ee[e.charCodeAt(t+3)],c[B++]=n<<2|s>>4,c[B++]=(s&15)<<4|i>>2,c[B++]=(i&3)<<6|a&63;return o},Os=function(e){for(var A=e.length,r=[],t=0;t<A;t+=2)r.push(e[t+1]<<8|e[t]);return r},Ms=function(e){for(var A=e.length,r=[],t=0;t<A;t+=4)r.push(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]);return r},xA=5,Bt=6+5,ur=2,Gs=Bt-xA,hB=65536>>xA,Rs=1<<xA,lr=Rs-1,Vs=1024>>xA,Ns=hB+Vs,Ps=Ns,Xs=32,Js=Ps+Xs,_s=65536>>Bt,ks=1<<Gs,Ws=ks-1,dt=function(e,A,r){return e.slice?e.slice(A,r):new Uint16Array(Array.prototype.slice.call(e,A,r))},Ys=function(e,A,r){return e.slice?e.slice(A,r):new Uint32Array(Array.prototype.slice.call(e,A,r))},Zs=function(e,A){var r=Ts(e),t=Array.isArray(r)?Ms(r):new Uint32Array(r),B=Array.isArray(r)?Os(r):new Uint16Array(r),n=24,s=dt(B,n/2,t[4]/2),i=t[5]===2?dt(B,(n+t[4])/2):Ys(t,Math.ceil((n+t[4])/4));return new qs(t[0],t[1],t[2],t[3],s,i)},qs=function(){function e(A,r,t,B,n,s){this.initialValue=A,this.errorValue=r,this.highStart=t,this.highValueIndex=B,this.index=n,this.data=s}return e.prototype.get=function(A){var r;if(A>=0){if(A<55296||A>56319&&A<=65535)return r=this.index[A>>xA],r=(r<<ur)+(A&lr),this.data[r];if(A<=65535)return r=this.index[hB+(A-55296>>xA)],r=(r<<ur)+(A&lr),this.data[r];if(A<this.highStart)return r=Js-_s+(A>>Bt),r=this.index[r],r+=A>>xA&Ws,r=this.index[r],r=(r<<ur)+(A&lr),this.data[r];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var de=0;de<Et.length;de++)zs[Et.charCodeAt(de)]=de;var js=" ",pt=50,$s=1,dB=2,EB=3,Aa=4,ea=5,Ht=7,pB=8,vt=9,dA=10,Mr=11,It=12,Gr=13,ra=14,re=15,Rr=16,Ee=17,zA=18,ta=19,mt=20,Vr=21,jA=22,fr=23,MA=24,$=25,te=26,Be=27,GA=28,Ba=29,DA=30,na=31,pe=32,He=33,Nr=34,Pr=35,Xr=36,we=37,Jr=38,Pe=39,Xe=40,Cr=41,HB=42,sa=43,aa=[9001,65288],vB="!",I="×",ve="÷",_r=Zs(js),gA=[DA,Xr],kr=[$s,dB,EB,ea],IB=[dA,pB],yt=[Be,te],ia=kr.concat(IB),Kt=[Jr,Pe,Xe,Nr,Pr],oa=[re,Gr],ca=function(e,A){A===void 0&&(A="strict");var r=[],t=[],B=[];return e.forEach(function(n,s){var i=_r.get(n);if(i>pt?(B.push(!0),i-=pt):B.push(!1),["normal","auto","loose"].indexOf(A)!==-1&&[8208,8211,12316,12448].indexOf(n)!==-1)return t.push(s),r.push(Rr);if(i===Aa||i===Mr){if(s===0)return t.push(s),r.push(DA);var a=r[s-1];return ia.indexOf(a)===-1?(t.push(t[s-1]),r.push(a)):(t.push(s),r.push(DA))}if(t.push(s),i===na)return r.push(A==="strict"?Vr:we);if(i===HB||i===Ba)return r.push(DA);if(i===sa)return n>=131072&&n<=196605||n>=196608&&n<=262141?r.push(we):r.push(DA);r.push(i)}),[t,r,B]},Ur=function(e,A,r,t){var B=t[r];if(Array.isArray(e)?e.indexOf(B)!==-1:e===B)for(var n=r;n<=t.length;){n++;var s=t[n];if(s===A)return!0;if(s!==dA)break}if(B===dA)for(var n=r;n>0;){n--;var i=t[n];if(Array.isArray(e)?e.indexOf(i)!==-1:e===i)for(var a=r;a<=t.length;){a++;var s=t[a];if(s===A)return!0;if(s!==dA)break}if(i!==dA)break}return!1},Lt=function(e,A){for(var r=e;r>=0;){var t=A[r];if(t===dA)r--;else return t}return 0},Qa=function(e,A,r,t,B){if(r[t]===0)return I;var n=t-1;if(Array.isArray(B)&&B[n]===!0)return I;var s=n-1,i=n+1,a=A[n],o=s>=0?A[s]:0,c=A[i];if(a===dB&&c===EB)return I;if(kr.indexOf(a)!==-1)return vB;if(kr.indexOf(c)!==-1||IB.indexOf(c)!==-1)return I;if(Lt(n,A)===pB)return ve;if(_r.get(e[n])===Mr||(a===pe||a===He)&&_r.get(e[i])===Mr||a===Ht||c===Ht||a===vt||[dA,Gr,re].indexOf(a)===-1&&c===vt||[Ee,zA,ta,MA,GA].indexOf(c)!==-1||Lt(n,A)===jA||Ur(fr,jA,n,A)||Ur([Ee,zA],Vr,n,A)||Ur(It,It,n,A))return I;if(a===dA)return ve;if(a===fr||c===fr)return I;if(c===Rr||a===Rr)return ve;if([Gr,re,Vr].indexOf(c)!==-1||a===ra||o===Xr&&oa.indexOf(a)!==-1||a===GA&&c===Xr||c===mt||gA.indexOf(c)!==-1&&a===$||gA.indexOf(a)!==-1&&c===$||a===Be&&[we,pe,He].indexOf(c)!==-1||[we,pe,He].indexOf(a)!==-1&&c===te||gA.indexOf(a)!==-1&&yt.indexOf(c)!==-1||yt.indexOf(a)!==-1&&gA.indexOf(c)!==-1||[Be,te].indexOf(a)!==-1&&(c===$||[jA,re].indexOf(c)!==-1&&A[i+1]===$)||[jA,re].indexOf(a)!==-1&&c===$||a===$&&[$,GA,MA].indexOf(c)!==-1)return I;if([$,GA,MA,Ee,zA].indexOf(c)!==-1)for(var Q=n;Q>=0;){var g=A[Q];if(g===$)return I;if([GA,MA].indexOf(g)!==-1)Q--;else break}if([Be,te].indexOf(c)!==-1)for(var Q=[Ee,zA].indexOf(a)!==-1?s:n;Q>=0;){var g=A[Q];if(g===$)return I;if([GA,MA].indexOf(g)!==-1)Q--;else break}if(Jr===a&&[Jr,Pe,Nr,Pr].indexOf(c)!==-1||[Pe,Nr].indexOf(a)!==-1&&[Pe,Xe].indexOf(c)!==-1||[Xe,Pr].indexOf(a)!==-1&&c===Xe||Kt.indexOf(a)!==-1&&[mt,te].indexOf(c)!==-1||Kt.indexOf(c)!==-1&&a===Be||gA.indexOf(a)!==-1&&gA.indexOf(c)!==-1||a===MA&&gA.indexOf(c)!==-1||gA.concat($).indexOf(a)!==-1&&c===jA&&aa.indexOf(e[i])===-1||gA.concat($).indexOf(c)!==-1&&a===zA)return I;if(a===Cr&&c===Cr){for(var f=r[n],u=1;f>0&&(f--,A[f]===Cr);)u++;if(u%2!==0)return I}return a===pe&&c===He?I:ve},ga=function(e,A){A||(A={lineBreak:"normal",wordBreak:"normal"});var r=ca(e,A.lineBreak),t=r[0],B=r[1],n=r[2];(A.wordBreak==="break-all"||A.wordBreak==="break-word")&&(B=B.map(function(i){return[$,DA,HB].indexOf(i)!==-1?we:i}));var s=A.wordBreak==="keep-all"?n.map(function(i,a){return i&&e[a]>=19968&&e[a]<=40959}):void 0;return[t,B,s]},wa=function(){function e(A,r,t,B){this.codePoints=A,this.required=r===vB,this.start=t,this.end=B}return e.prototype.slice=function(){return M.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),ua=function(e,A){var r=Br(e),t=ga(r,A),B=t[0],n=t[1],s=t[2],i=r.length,a=0,o=0;return{next:function(){if(o>=i)return{done:!0,value:null};for(var c=I;o<i&&(c=Qa(r,n,B,++o,s))===I;);if(c!==I||o===i){var Q=new wa(r,c,a,o);return a=o,{value:Q,done:!1}}return{done:!0,value:null}}}},la=1,fa=2,fe=4,bt=8,We=10,Dt=47,ie=92,Ca=9,Ua=32,Ie=34,$A=61,Fa=35,ha=36,da=37,me=39,ye=40,Ae=41,Ea=95,z=45,pa=33,Ha=60,va=62,Ia=64,ma=91,ya=93,Ka=61,La=123,Ke=63,ba=125,St=124,Da=126,Sa=128,xt=65533,Fr=42,SA=43,xa=44,Ta=58,Oa=59,ue=46,Ma=0,Ga=8,Ra=11,Va=14,Na=31,Pa=127,aA=-1,mB=48,yB=97,KB=101,Xa=102,Ja=117,_a=122,LB=65,bB=69,DB=70,ka=85,Wa=90,k=function(e){return e>=mB&&e<=57},Ya=function(e){return e>=55296&&e<=57343},RA=function(e){return k(e)||e>=LB&&e<=DB||e>=yB&&e<=Xa},Za=function(e){return e>=yB&&e<=_a},qa=function(e){return e>=LB&&e<=Wa},za=function(e){return Za(e)||qa(e)},ja=function(e){return e>=Sa},Le=function(e){return e===We||e===Ca||e===Ua},Ye=function(e){return za(e)||ja(e)||e===Ea},Tt=function(e){return Ye(e)||k(e)||e===z},$a=function(e){return e>=Ma&&e<=Ga||e===Ra||e>=Va&&e<=Na||e===Pa},hA=function(e,A){return e!==ie?!1:A!==We},be=function(e,A,r){return e===z?Ye(A)||hA(A,r):Ye(e)?!0:!!(e===ie&&hA(e,A))},hr=function(e,A,r){return e===SA||e===z?k(A)?!0:A===ue&&k(r):k(e===ue?A:e)},Ai=function(e){var A=0,r=1;(e[A]===SA||e[A]===z)&&(e[A]===z&&(r=-1),A++);for(var t=[];k(e[A]);)t.push(e[A++]);var B=t.length?parseInt(M.apply(void 0,t),10):0;e[A]===ue&&A++;for(var n=[];k(e[A]);)n.push(e[A++]);var s=n.length,i=s?parseInt(M.apply(void 0,n),10):0;(e[A]===bB||e[A]===KB)&&A++;var a=1;(e[A]===SA||e[A]===z)&&(e[A]===z&&(a=-1),A++);for(var o=[];k(e[A]);)o.push(e[A++]);var c=o.length?parseInt(M.apply(void 0,o),10):0;return r*(B+i*Math.pow(10,-s))*Math.pow(10,a*c)},ei={type:2},ri={type:3},ti={type:4},Bi={type:13},ni={type:8},si={type:21},ai={type:9},ii={type:10},oi={type:11},ci={type:12},Qi={type:14},De={type:23},gi={type:1},wi={type:25},ui={type:24},li={type:26},fi={type:27},Ci={type:28},Ui={type:29},Fi={type:31},Wr={type:32},SB=function(){function e(){this._value=[]}return e.prototype.write=function(A){this._value=this._value.concat(Br(A))},e.prototype.read=function(){for(var A=[],r=this.consumeToken();r!==Wr;)A.push(r),r=this.consumeToken();return A},e.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case Ie:return this.consumeStringToken(Ie);case Fa:var r=this.peekCodePoint(0),t=this.peekCodePoint(1),B=this.peekCodePoint(2);if(Tt(r)||hA(t,B)){var n=be(r,t,B)?fa:la,s=this.consumeName();return{type:5,value:s,flags:n}}break;case ha:if(this.peekCodePoint(0)===$A)return this.consumeCodePoint(),Bi;break;case me:return this.consumeStringToken(me);case ye:return ei;case Ae:return ri;case Fr:if(this.peekCodePoint(0)===$A)return this.consumeCodePoint(),Qi;break;case SA:if(hr(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case xa:return ti;case z:var i=A,a=this.peekCodePoint(0),o=this.peekCodePoint(1);if(hr(i,a,o))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(be(i,a,o))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(a===z&&o===va)return this.consumeCodePoint(),this.consumeCodePoint(),ui;break;case ue:if(hr(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case Dt:if(this.peekCodePoint(0)===Fr)for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(c===Fr&&(c=this.consumeCodePoint(),c===Dt))return this.consumeToken();if(c===aA)return this.consumeToken()}break;case Ta:return li;case Oa:return fi;case Ha:if(this.peekCodePoint(0)===pa&&this.peekCodePoint(1)===z&&this.peekCodePoint(2)===z)return this.consumeCodePoint(),this.consumeCodePoint(),wi;break;case Ia:var Q=this.peekCodePoint(0),g=this.peekCodePoint(1),f=this.peekCodePoint(2);if(be(Q,g,f)){var s=this.consumeName();return{type:7,value:s}}break;case ma:return Ci;case ie:if(hA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case ya:return Ui;case Ka:if(this.peekCodePoint(0)===$A)return this.consumeCodePoint(),ni;break;case La:return oi;case ba:return ci;case Ja:case ka:var u=this.peekCodePoint(0),w=this.peekCodePoint(1);return u===SA&&(RA(w)||w===Ke)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case St:if(this.peekCodePoint(0)===$A)return this.consumeCodePoint(),ai;if(this.peekCodePoint(0)===St)return this.consumeCodePoint(),si;break;case Da:if(this.peekCodePoint(0)===$A)return this.consumeCodePoint(),ii;break;case aA:return Wr}return Le(A)?(this.consumeWhiteSpace(),Fi):k(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):Ye(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:M(A)}},e.prototype.consumeCodePoint=function(){var A=this._value.shift();return typeof A>"u"?-1:A},e.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},e.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},e.prototype.consumeUnicodeRangeToken=function(){for(var A=[],r=this.consumeCodePoint();RA(r)&&A.length<6;)A.push(r),r=this.consumeCodePoint();for(var t=!1;r===Ke&&A.length<6;)A.push(r),r=this.consumeCodePoint(),t=!0;if(t){var B=parseInt(M.apply(void 0,A.map(function(a){return a===Ke?mB:a})),16),n=parseInt(M.apply(void 0,A.map(function(a){return a===Ke?DB:a})),16);return{type:30,start:B,end:n}}var s=parseInt(M.apply(void 0,A),16);if(this.peekCodePoint(0)===z&&RA(this.peekCodePoint(1))){this.consumeCodePoint(),r=this.consumeCodePoint();for(var i=[];RA(r)&&i.length<6;)i.push(r),r=this.consumeCodePoint();var n=parseInt(M.apply(void 0,i),16);return{type:30,start:s,end:n}}else return{type:30,start:s,end:s}},e.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return A.toLowerCase()==="url"&&this.peekCodePoint(0)===ye?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===ye?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},e.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===aA)return{type:22,value:""};var r=this.peekCodePoint(0);if(r===me||r===Ie){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===aA||this.peekCodePoint(0)===Ae)?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),De)}for(;;){var B=this.consumeCodePoint();if(B===aA||B===Ae)return{type:22,value:M.apply(void 0,A)};if(Le(B))return this.consumeWhiteSpace(),this.peekCodePoint(0)===aA||this.peekCodePoint(0)===Ae?(this.consumeCodePoint(),{type:22,value:M.apply(void 0,A)}):(this.consumeBadUrlRemnants(),De);if(B===Ie||B===me||B===ye||$a(B))return this.consumeBadUrlRemnants(),De;if(B===ie)if(hA(B,this.peekCodePoint(0)))A.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),De;else A.push(B)}},e.prototype.consumeWhiteSpace=function(){for(;Le(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===Ae||A===aA)return;hA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(A){for(var r=5e4,t="";A>0;){var B=Math.min(r,A);t+=M.apply(void 0,this._value.splice(0,B)),A-=B}return this._value.shift(),t},e.prototype.consumeStringToken=function(A){var r="",t=0;do{var B=this._value[t];if(B===aA||B===void 0||B===A)return r+=this.consumeStringSlice(t),{type:0,value:r};if(B===We)return this._value.splice(0,t),gi;if(B===ie){var n=this._value[t+1];n!==aA&&n!==void 0&&(n===We?(r+=this.consumeStringSlice(t),t=-1,this._value.shift()):hA(B,n)&&(r+=this.consumeStringSlice(t),r+=M(this.consumeEscapedCodePoint()),t=-1))}t++}while(!0)},e.prototype.consumeNumber=function(){var A=[],r=fe,t=this.peekCodePoint(0);for((t===SA||t===z)&&A.push(this.consumeCodePoint());k(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var B=this.peekCodePoint(1);if(t===ue&&k(B))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),r=bt;k(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),B=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((t===bB||t===KB)&&((B===SA||B===z)&&k(n)||k(B)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),r=bt;k(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[Ai(A),r]},e.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),r=A[0],t=A[1],B=this.peekCodePoint(0),n=this.peekCodePoint(1),s=this.peekCodePoint(2);if(be(B,n,s)){var i=this.consumeName();return{type:15,number:r,flags:t,unit:i}}return B===da?(this.consumeCodePoint(),{type:16,number:r,flags:t}):{type:17,number:r,flags:t}},e.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(RA(A)){for(var r=M(A);RA(this.peekCodePoint(0))&&r.length<6;)r+=M(this.consumeCodePoint());Le(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(r,16);return t===0||Ya(t)||t>1114111?xt:t}return A===aA?xt:A},e.prototype.consumeName=function(){for(var A="";;){var r=this.consumeCodePoint();if(Tt(r))A+=M(r);else if(hA(r,this.peekCodePoint(0)))A+=M(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(r),A}},e}(),xB=function(){function e(A){this._tokens=A}return e.create=function(A){var r=new SB;return r.write(A),new e(r.read())},e.parseValue=function(A){return e.create(A).parseComponentValue()},e.parseValues=function(A){return e.create(A).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===31;)A=this.consumeToken();if(A.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var r=this.consumeComponentValue();do A=this.consumeToken();while(A.type===31);if(A.type===32)return r;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var A=[];;){var r=this.consumeComponentValue();if(r.type===32)return A;A.push(r),A.push()}},e.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},e.prototype.consumeSimpleBlock=function(A){for(var r={type:A,values:[]},t=this.consumeToken();;){if(t.type===32||di(t,A))return r;this.reconsumeToken(t),r.values.push(this.consumeComponentValue()),t=this.consumeToken()}},e.prototype.consumeFunction=function(A){for(var r={name:A.value,values:[],type:18};;){var t=this.consumeToken();if(t.type===32||t.type===3)return r;this.reconsumeToken(t),r.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var A=this._tokens.shift();return typeof A>"u"?Wr:A},e.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},e}(),Ce=function(e){return e.type===15},YA=function(e){return e.type===17},S=function(e){return e.type===20},hi=function(e){return e.type===0},Yr=function(e,A){return S(e)&&e.value===A},TB=function(e){return e.type!==31},WA=function(e){return e.type!==31&&e.type!==4},iA=function(e){var A=[],r=[];return e.forEach(function(t){if(t.type===4){if(r.length===0)throw new Error("Error parsing function args, zero tokens for arg");A.push(r),r=[];return}t.type!==31&&r.push(t)}),r.length&&A.push(r),A},di=function(e,A){return A===11&&e.type===12||A===28&&e.type===29?!0:A===2&&e.type===3},IA=function(e){return e.type===17||e.type===15},R=function(e){return e.type===16||IA(e)},OB=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},J={type:17,number:0,flags:fe},nt={type:16,number:50,flags:fe},EA={type:16,number:100,flags:fe},ne=function(e,A,r){var t=e[0],B=e[1];return[x(t,A),x(typeof B<"u"?B:t,r)]},x=function(e,A){if(e.type===16)return e.number/100*A;if(Ce(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},MB="deg",GB="grad",RB="rad",VB="turn",nr={name:"angle",parse:function(e,A){if(A.type===15)switch(A.unit){case MB:return Math.PI*A.number/180;case GB:return Math.PI/200*A.number;case RB:return A.number;case VB:return Math.PI*2*A.number}throw new Error("Unsupported angle type")}},NB=function(e){return e.type===15&&(e.unit===MB||e.unit===GB||e.unit===RB||e.unit===VB)},PB=function(e){var A=e.filter(S).map(function(r){return r.value}).join(" ");switch(A){case"to bottom right":case"to right bottom":case"left top":case"top left":return[J,J];case"to top":case"bottom":return rA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[J,EA];case"to right":case"left":return rA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[EA,EA];case"to bottom":case"top":return rA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[EA,J];case"to left":case"right":return rA(270)}return 0},rA=function(e){return Math.PI*e/180},HA={name:"color",parse:function(e,A){if(A.type===18){var r=Ei[A.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return r(e,A.values)}if(A.type===5){if(A.value.length===3){var t=A.value.substring(0,1),B=A.value.substring(1,2),n=A.value.substring(2,3);return pA(parseInt(t+t,16),parseInt(B+B,16),parseInt(n+n,16),1)}if(A.value.length===4){var t=A.value.substring(0,1),B=A.value.substring(1,2),n=A.value.substring(2,3),s=A.value.substring(3,4);return pA(parseInt(t+t,16),parseInt(B+B,16),parseInt(n+n,16),parseInt(s+s,16)/255)}if(A.value.length===6){var t=A.value.substring(0,2),B=A.value.substring(2,4),n=A.value.substring(4,6);return pA(parseInt(t,16),parseInt(B,16),parseInt(n,16),1)}if(A.value.length===8){var t=A.value.substring(0,2),B=A.value.substring(2,4),n=A.value.substring(4,6),s=A.value.substring(6,8);return pA(parseInt(t,16),parseInt(B,16),parseInt(n,16),parseInt(s,16)/255)}}if(A.type===20){var i=uA[A.value.toUpperCase()];if(typeof i<"u")return i}return uA.TRANSPARENT}},vA=function(e){return(255&e)===0},N=function(e){var A=255&e,r=255&e>>8,t=255&e>>16,B=255&e>>24;return A<255?"rgba("+B+","+t+","+r+","+A/255+")":"rgb("+B+","+t+","+r+")"},pA=function(e,A,r,t){return(e<<24|A<<16|r<<8|Math.round(t*255)<<0)>>>0},Ot=function(e,A){if(e.type===17)return e.number;if(e.type===16){var r=A===3?1:255;return A===3?e.number/100*r:Math.round(e.number/100*r)}return 0},Mt=function(e,A){var r=A.filter(WA);if(r.length===3){var t=r.map(Ot),B=t[0],n=t[1],s=t[2];return pA(B,n,s,1)}if(r.length===4){var i=r.map(Ot),B=i[0],n=i[1],s=i[2],a=i[3];return pA(B,n,s,a)}return 0};function dr(e,A,r){return r<0&&(r+=1),r>=1&&(r-=1),r<1/6?(A-e)*r*6+e:r<1/2?A:r<2/3?(A-e)*6*(2/3-r)+e:e}var Gt=function(e,A){var r=A.filter(WA),t=r[0],B=r[1],n=r[2],s=r[3],i=(t.type===17?rA(t.number):nr.parse(e,t))/(Math.PI*2),a=R(B)?B.number/100:0,o=R(n)?n.number/100:0,c=typeof s<"u"&&R(s)?x(s,1):1;if(a===0)return pA(o*255,o*255,o*255,1);var Q=o<=.5?o*(a+1):o+a-o*a,g=o*2-Q,f=dr(g,Q,i+1/3),u=dr(g,Q,i),w=dr(g,Q,i-1/3);return pA(f*255,u*255,w*255,c)},Ei={hsl:Gt,hsla:Gt,rgb:Mt,rgba:Mt},oe=function(e,A){return HA.parse(e,xB.create(A).parseComponentValue())},uA={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},pi={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,A){return A.map(function(r){if(S(r))switch(r.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Hi={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},sr=function(e,A){var r=HA.parse(e,A[0]),t=A[1];return t&&R(t)?{color:r,stop:t}:{color:r,stop:null}},Rt=function(e,A){var r=e[0],t=e[e.length-1];r.stop===null&&(r.stop=J),t.stop===null&&(t.stop=EA);for(var B=[],n=0,s=0;s<e.length;s++){var i=e[s].stop;if(i!==null){var a=x(i,A);a>n?B.push(a):B.push(n),n=a}else B.push(null)}for(var o=null,s=0;s<B.length;s++){var c=B[s];if(c===null)o===null&&(o=s);else if(o!==null){for(var Q=s-o,g=B[o-1],f=(c-g)/(Q+1),u=1;u<=Q;u++)B[o+u-1]=f*u;o=null}}return e.map(function(w,d){var l=w.color;return{color:l,stop:Math.max(Math.min(1,B[d]/A),0)}})},vi=function(e,A,r){var t=A/2,B=r/2,n=x(e[0],A)-t,s=B-x(e[1],r);return(Math.atan2(s,n)+Math.PI*2)%(Math.PI*2)},Ii=function(e,A,r){var t=typeof e=="number"?e:vi(e,A,r),B=Math.abs(A*Math.sin(t))+Math.abs(r*Math.cos(t)),n=A/2,s=r/2,i=B/2,a=Math.sin(t-Math.PI/2)*i,o=Math.cos(t-Math.PI/2)*i;return[B,n-o,n+o,s-a,s+a]},BA=function(e,A){return Math.sqrt(e*e+A*A)},Vt=function(e,A,r,t,B){var n=[[0,0],[0,A],[e,0],[e,A]];return n.reduce(function(s,i){var a=i[0],o=i[1],c=BA(r-a,t-o);return(B?c<s.optimumDistance:c>s.optimumDistance)?{optimumCorner:i,optimumDistance:c}:s},{optimumDistance:B?1/0:-1/0,optimumCorner:null}).optimumCorner},mi=function(e,A,r,t,B){var n=0,s=0;switch(e.size){case 0:e.shape===0?n=s=Math.min(Math.abs(A),Math.abs(A-t),Math.abs(r),Math.abs(r-B)):e.shape===1&&(n=Math.min(Math.abs(A),Math.abs(A-t)),s=Math.min(Math.abs(r),Math.abs(r-B)));break;case 2:if(e.shape===0)n=s=Math.min(BA(A,r),BA(A,r-B),BA(A-t,r),BA(A-t,r-B));else if(e.shape===1){var i=Math.min(Math.abs(r),Math.abs(r-B))/Math.min(Math.abs(A),Math.abs(A-t)),a=Vt(t,B,A,r,!0),o=a[0],c=a[1];n=BA(o-A,(c-r)/i),s=i*n}break;case 1:e.shape===0?n=s=Math.max(Math.abs(A),Math.abs(A-t),Math.abs(r),Math.abs(r-B)):e.shape===1&&(n=Math.max(Math.abs(A),Math.abs(A-t)),s=Math.max(Math.abs(r),Math.abs(r-B)));break;case 3:if(e.shape===0)n=s=Math.max(BA(A,r),BA(A,r-B),BA(A-t,r),BA(A-t,r-B));else if(e.shape===1){var i=Math.max(Math.abs(r),Math.abs(r-B))/Math.max(Math.abs(A),Math.abs(A-t)),Q=Vt(t,B,A,r,!1),o=Q[0],c=Q[1];n=BA(o-A,(c-r)/i),s=i*n}break}return Array.isArray(e.size)&&(n=x(e.size[0],t),s=e.size.length===2?x(e.size[1],B):n),[n,s]},yi=function(e,A){var r=rA(180),t=[];return iA(A).forEach(function(B,n){if(n===0){var s=B[0];if(s.type===20&&s.value==="to"){r=PB(B);return}else if(NB(s)){r=nr.parse(e,s);return}}var i=sr(e,B);t.push(i)}),{angle:r,stops:t,type:1}},Se=function(e,A){var r=rA(180),t=[];return iA(A).forEach(function(B,n){if(n===0){var s=B[0];if(s.type===20&&["top","left","right","bottom"].indexOf(s.value)!==-1){r=PB(B);return}else if(NB(s)){r=(nr.parse(e,s)+rA(270))%rA(360);return}}var i=sr(e,B);t.push(i)}),{angle:r,stops:t,type:1}},Ki=function(e,A){var r=rA(180),t=[],B=1,n=0,s=3,i=[];return iA(A).forEach(function(a,o){var c=a[0];if(o===0){if(S(c)&&c.value==="linear"){B=1;return}else if(S(c)&&c.value==="radial"){B=2;return}}if(c.type===18){if(c.name==="from"){var Q=HA.parse(e,c.values[0]);t.push({stop:J,color:Q})}else if(c.name==="to"){var Q=HA.parse(e,c.values[0]);t.push({stop:EA,color:Q})}else if(c.name==="color-stop"){var g=c.values.filter(WA);if(g.length===2){var Q=HA.parse(e,g[1]),f=g[0];YA(f)&&t.push({stop:{type:16,number:f.number*100,flags:f.flags},color:Q})}}}}),B===1?{angle:(r+rA(180))%rA(360),stops:t,type:B}:{size:s,shape:n,stops:t,position:i,type:B}},XB="closest-side",JB="farthest-side",_B="closest-corner",kB="farthest-corner",WB="circle",YB="ellipse",ZB="cover",qB="contain",Li=function(e,A){var r=0,t=3,B=[],n=[];return iA(A).forEach(function(s,i){var a=!0;if(i===0){var o=!1;a=s.reduce(function(Q,g){if(o)if(S(g))switch(g.value){case"center":return n.push(nt),Q;case"top":case"left":return n.push(J),Q;case"right":case"bottom":return n.push(EA),Q}else(R(g)||IA(g))&&n.push(g);else if(S(g))switch(g.value){case WB:return r=0,!1;case YB:return r=1,!1;case"at":return o=!0,!1;case XB:return t=0,!1;case ZB:case JB:return t=1,!1;case qB:case _B:return t=2,!1;case kB:return t=3,!1}else if(IA(g)||R(g))return Array.isArray(t)||(t=[]),t.push(g),!1;return Q},a)}if(a){var c=sr(e,s);B.push(c)}}),{size:t,shape:r,stops:B,position:n,type:2}},xe=function(e,A){var r=0,t=3,B=[],n=[];return iA(A).forEach(function(s,i){var a=!0;if(i===0?a=s.reduce(function(c,Q){if(S(Q))switch(Q.value){case"center":return n.push(nt),!1;case"top":case"left":return n.push(J),!1;case"right":case"bottom":return n.push(EA),!1}else if(R(Q)||IA(Q))return n.push(Q),!1;return c},a):i===1&&(a=s.reduce(function(c,Q){if(S(Q))switch(Q.value){case WB:return r=0,!1;case YB:return r=1,!1;case qB:case XB:return t=0,!1;case JB:return t=1,!1;case _B:return t=2,!1;case ZB:case kB:return t=3,!1}else if(IA(Q)||R(Q))return Array.isArray(t)||(t=[]),t.push(Q),!1;return c},a)),a){var o=sr(e,s);B.push(o)}}),{size:t,shape:r,stops:B,position:n,type:2}},bi=function(e){return e.type===1},Di=function(e){return e.type===2},st={name:"image",parse:function(e,A){if(A.type===22){var r={url:A.value,type:0};return e.cache.addImage(A.value),r}if(A.type===18){var t=zB[A.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return t(e,A.values)}throw new Error("Unsupported image type "+A.type)}};function Si(e){return!(e.type===20&&e.value==="none")&&(e.type!==18||!!zB[e.name])}var zB={"linear-gradient":yi,"-moz-linear-gradient":Se,"-ms-linear-gradient":Se,"-o-linear-gradient":Se,"-webkit-linear-gradient":Se,"radial-gradient":Li,"-moz-radial-gradient":xe,"-ms-radial-gradient":xe,"-o-radial-gradient":xe,"-webkit-radial-gradient":xe,"-webkit-gradient":Ki},xi={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,A){if(A.length===0)return[];var r=A[0];return r.type===20&&r.value==="none"?[]:A.filter(function(t){return WA(t)&&Si(t)}).map(function(t){return st.parse(e,t)})}},Ti={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,A){return A.map(function(r){if(S(r))switch(r.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Oi={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,A){return iA(A).map(function(r){return r.filter(R)}).map(OB)}},Mi={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,A){return iA(A).map(function(r){return r.filter(S).map(function(t){return t.value}).join(" ")}).map(Gi)}},Gi=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},kA;(function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"})(kA||(kA={}));var Ri={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,A){return iA(A).map(function(r){return r.filter(Vi)})}},Vi=function(e){return S(e)||R(e)},ar=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Ni=ar("top"),Pi=ar("right"),Xi=ar("bottom"),Ji=ar("left"),ir=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(A,r){return OB(r.filter(R))}}},_i=ir("top-left"),ki=ir("top-right"),Wi=ir("bottom-right"),Yi=ir("bottom-left"),or=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,r){switch(r){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Zi=or("top"),qi=or("right"),zi=or("bottom"),ji=or("left"),cr=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,r){return Ce(r)?r.number:0}}},$i=cr("top"),Ao=cr("right"),eo=cr("bottom"),ro=cr("left"),to={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Bo={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,A){switch(A){case"rtl":return 1;case"ltr":default:return 0}}},no={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,A){return A.filter(S).reduce(function(r,t){return r|so(t.value)},0)}},so=function(e){switch(e){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},ao={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},io={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,A){return A.type===20&&A.value==="normal"?0:A.type===17||A.type===15?A.number:0}},Ze;(function(e){e.NORMAL="normal",e.STRICT="strict"})(Ze||(Ze={}));var oo={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"strict":return Ze.STRICT;case"normal":default:return Ze.NORMAL}}},co={name:"line-height",initialValue:"normal",prefix:!1,type:4},Nt=function(e,A){return S(e)&&e.value==="normal"?1.2*A:e.type===17?A*e.number:R(e)?x(e,A):A},Qo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,A){return A.type===20&&A.value==="none"?null:st.parse(e,A)}},go={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,A){switch(A){case"inside":return 0;case"outside":default:return 1}}},Zr={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){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":return 22;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;case"none":default:return-1}}},Qr=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},wo=Qr("top"),uo=Qr("right"),lo=Qr("bottom"),fo=Qr("left"),Co={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,A){return A.filter(S).map(function(r){switch(r.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Uo={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"break-word":return"break-word";case"normal":default:return"normal"}}},gr=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Fo=gr("top"),ho=gr("right"),Eo=gr("bottom"),po=gr("left"),Ho={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,A){switch(A){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},vo={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,A){switch(A){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Io={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,A){return A.length===1&&Yr(A[0],"none")?[]:iA(A).map(function(r){for(var t={color:uA.TRANSPARENT,offsetX:J,offsetY:J,blur:J},B=0,n=0;n<r.length;n++){var s=r[n];IA(s)?(B===0?t.offsetX=s:B===1?t.offsetY=s:t.blur=s,B++):t.color=HA.parse(e,s)}return t})}},mo={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},yo={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,A){if(A.type===20&&A.value==="none")return null;if(A.type===18){var r=bo[A.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported transform function "'+A.name+'"');return r(A.values)}return null}},Ko=function(e){var A=e.filter(function(r){return r.type===17}).map(function(r){return r.number});return A.length===6?A:null},Lo=function(e){var A=e.filter(function(a){return a.type===17}).map(function(a){return a.number}),r=A[0],t=A[1];A[2],A[3];var B=A[4],n=A[5];A[6],A[7],A[8],A[9],A[10],A[11];var s=A[12],i=A[13];return A[14],A[15],A.length===16?[r,t,B,n,s,i]:null},bo={matrix:Ko,matrix3d:Lo},Pt={type:16,number:50,flags:fe},Do=[Pt,Pt],So={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,A){var r=A.filter(R);return r.length!==2?Do:[r[0],r[1]]}},xo={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},ce;(function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"})(ce||(ce={}));var To={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"break-all":return ce.BREAK_ALL;case"keep-all":return ce.KEEP_ALL;case"normal":default:return ce.NORMAL}}},Oo={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,A){if(A.type===20)return{auto:!0,order:0};if(YA(A))return{auto:!1,order:A.number};throw new Error("Invalid z-index number parsed")}},jB={name:"time",parse:function(e,A){if(A.type===15)switch(A.unit.toLowerCase()){case"s":return 1e3*A.number;case"ms":return A.number}throw new Error("Unsupported time type")}},Mo={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,A){return YA(A)?A.number:1}},Go={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ro={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,A){return A.filter(S).map(function(r){switch(r.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(r){return r!==0})}},Vo={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,A){var r=[],t=[];return A.forEach(function(B){switch(B.type){case 20:case 0:r.push(B.value);break;case 17:r.push(B.number.toString());break;case 4:t.push(r.join(" ")),r.length=0;break}}),r.length&&t.push(r.join(" ")),t.map(function(B){return B.indexOf(" ")===-1?B:"'"+B+"'"})}},No={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Po={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,A){if(YA(A))return A.number;if(S(A))switch(A.value){case"bold":return 700;case"normal":default:return 400}return 400}},Xo={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,A){return A.filter(S).map(function(r){return r.value})}},Jo={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},V=function(e,A){return(e&A)!==0},_o={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,A){if(A.length===0)return[];var r=A[0];return r.type===20&&r.value==="none"?[]:A}},ko={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,A){if(A.length===0)return null;var r=A[0];if(r.type===20&&r.value==="none")return null;for(var t=[],B=A.filter(TB),n=0;n<B.length;n++){var s=B[n],i=B[n+1];if(s.type===20){var a=i&&YA(i)?i.number:1;t.push({counter:s.value,increment:a})}}return t}},Wo={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,A){if(A.length===0)return[];for(var r=[],t=A.filter(TB),B=0;B<t.length;B++){var n=t[B],s=t[B+1];if(S(n)&&n.value!=="none"){var i=s&&YA(s)?s.number:0;r.push({counter:n.value,reset:i})}}return r}},Yo={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,A){return A.filter(Ce).map(function(r){return jB.parse(e,r)})}},Zo={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,A){if(A.length===0)return null;var r=A[0];if(r.type===20&&r.value==="none")return null;var t=[],B=A.filter(hi);if(B.length%2!==0)return null;for(var n=0;n<B.length;n+=2){var s=B[n].value,i=B[n+1].value;t.push({open:s,close:i})}return t}},Xt=function(e,A,r){if(!e)return"";var t=e[Math.min(A,e.length-1)];return t?r?t.open:t.close:""},qo={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,A){return A.length===1&&Yr(A[0],"none")?[]:iA(A).map(function(r){for(var t={color:255,offsetX:J,offsetY:J,blur:J,spread:J,inset:!1},B=0,n=0;n<r.length;n++){var s=r[n];Yr(s,"inset")?t.inset=!0:IA(s)?(B===0?t.offsetX=s:B===1?t.offsetY=s:B===2?t.blur=s:t.spread=s,B++):t.color=HA.parse(e,s)}return t})}},zo={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,A){var r=[0,1,2],t=[];return A.filter(S).forEach(function(B){switch(B.value){case"stroke":t.push(1);break;case"fill":t.push(0);break;case"markers":t.push(2);break}}),r.forEach(function(B){t.indexOf(B)===-1&&t.push(B)}),t}},jo={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},$o={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,A){return Ce(A)?A.number:0}},Ac=function(){function e(A,r){var t,B;this.animationDuration=h(A,Yo,r.animationDuration),this.backgroundClip=h(A,pi,r.backgroundClip),this.backgroundColor=h(A,Hi,r.backgroundColor),this.backgroundImage=h(A,xi,r.backgroundImage),this.backgroundOrigin=h(A,Ti,r.backgroundOrigin),this.backgroundPosition=h(A,Oi,r.backgroundPosition),this.backgroundRepeat=h(A,Mi,r.backgroundRepeat),this.backgroundSize=h(A,Ri,r.backgroundSize),this.borderTopColor=h(A,Ni,r.borderTopColor),this.borderRightColor=h(A,Pi,r.borderRightColor),this.borderBottomColor=h(A,Xi,r.borderBottomColor),this.borderLeftColor=h(A,Ji,r.borderLeftColor),this.borderTopLeftRadius=h(A,_i,r.borderTopLeftRadius),this.borderTopRightRadius=h(A,ki,r.borderTopRightRadius),this.borderBottomRightRadius=h(A,Wi,r.borderBottomRightRadius),this.borderBottomLeftRadius=h(A,Yi,r.borderBottomLeftRadius),this.borderTopStyle=h(A,Zi,r.borderTopStyle),this.borderRightStyle=h(A,qi,r.borderRightStyle),this.borderBottomStyle=h(A,zi,r.borderBottomStyle),this.borderLeftStyle=h(A,ji,r.borderLeftStyle),this.borderTopWidth=h(A,$i,r.borderTopWidth),this.borderRightWidth=h(A,Ao,r.borderRightWidth),this.borderBottomWidth=h(A,eo,r.borderBottomWidth),this.borderLeftWidth=h(A,ro,r.borderLeftWidth),this.boxShadow=h(A,qo,r.boxShadow),this.color=h(A,to,r.color),this.direction=h(A,Bo,r.direction),this.display=h(A,no,r.display),this.float=h(A,ao,r.cssFloat),this.fontFamily=h(A,Vo,r.fontFamily),this.fontSize=h(A,No,r.fontSize),this.fontStyle=h(A,Jo,r.fontStyle),this.fontVariant=h(A,Xo,r.fontVariant),this.fontWeight=h(A,Po,r.fontWeight),this.letterSpacing=h(A,io,r.letterSpacing),this.lineBreak=h(A,oo,r.lineBreak),this.lineHeight=h(A,co,r.lineHeight),this.listStyleImage=h(A,Qo,r.listStyleImage),this.listStylePosition=h(A,go,r.listStylePosition),this.listStyleType=h(A,Zr,r.listStyleType),this.marginTop=h(A,wo,r.marginTop),this.marginRight=h(A,uo,r.marginRight),this.marginBottom=h(A,lo,r.marginBottom),this.marginLeft=h(A,fo,r.marginLeft),this.opacity=h(A,Mo,r.opacity);var n=h(A,Co,r.overflow);this.overflowX=n[0],this.overflowY=n[n.length>1?1:0],this.overflowWrap=h(A,Uo,r.overflowWrap),this.paddingTop=h(A,Fo,r.paddingTop),this.paddingRight=h(A,ho,r.paddingRight),this.paddingBottom=h(A,Eo,r.paddingBottom),this.paddingLeft=h(A,po,r.paddingLeft),this.paintOrder=h(A,zo,r.paintOrder),this.position=h(A,vo,r.position),this.textAlign=h(A,Ho,r.textAlign),this.textDecorationColor=h(A,Go,(t=r.textDecorationColor)!==null&&t!==void 0?t:r.color),this.textDecorationLine=h(A,Ro,(B=r.textDecorationLine)!==null&&B!==void 0?B:r.textDecoration),this.textShadow=h(A,Io,r.textShadow),this.textTransform=h(A,mo,r.textTransform),this.transform=h(A,yo,r.transform),this.transformOrigin=h(A,So,r.transformOrigin),this.visibility=h(A,xo,r.visibility),this.webkitTextStrokeColor=h(A,jo,r.webkitTextStrokeColor),this.webkitTextStrokeWidth=h(A,$o,r.webkitTextStrokeWidth),this.wordBreak=h(A,To,r.wordBreak),this.zIndex=h(A,Oo,r.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return vA(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return V(this.display,4)||V(this.display,33554432)||V(this.display,268435456)||V(this.display,536870912)||V(this.display,67108864)||V(this.display,134217728)},e}(),ec=function(){function e(A,r){this.content=h(A,_o,r.content),this.quotes=h(A,Zo,r.quotes)}return e}(),Jt=function(){function e(A,r){this.counterIncrement=h(A,ko,r.counterIncrement),this.counterReset=h(A,Wo,r.counterReset)}return e}(),h=function(e,A,r){var t=new SB,B=r!==null&&typeof r<"u"?r.toString():A.initialValue;t.write(B);var n=new xB(t.read());switch(A.type){case 2:var s=n.parseComponentValue();return A.parse(e,S(s)?s.value:A.initialValue);case 0:return A.parse(e,n.parseComponentValue());case 1:return A.parse(e,n.parseComponentValues());case 4:return n.parseComponentValue();case 3:switch(A.format){case"angle":return nr.parse(e,n.parseComponentValue());case"color":return HA.parse(e,n.parseComponentValue());case"image":return st.parse(e,n.parseComponentValue());case"length":var i=n.parseComponentValue();return IA(i)?i:J;case"length-percentage":var a=n.parseComponentValue();return R(a)?a:J;case"time":return jB.parse(e,n.parseComponentValue())}break}},rc="data-html2canvas-debug",tc=function(e){var A=e.getAttribute(rc);switch(A){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},qr=function(e,A){var r=tc(e);return r===1||A===r},oA=function(){function e(A,r){if(this.context=A,this.textNodes=[],this.elements=[],this.flags=0,qr(r,3))debugger;this.styles=new Ac(A,window.getComputedStyle(r,null)),$r(r)&&(this.styles.animationDuration.some(function(t){return t>0})&&(r.style.animationDuration="0s"),this.styles.transform!==null&&(r.style.transform="none")),this.bounds=tr(this.context,r),qr(r,4)&&(this.flags|=16)}return e}(),Bc=" ",_t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",se=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Te=0;Te<_t.length;Te++)se[_t.charCodeAt(Te)]=Te;var nc=function(e){var A=e.length*.75,r=e.length,t,B=0,n,s,i,a;e[e.length-1]==="="&&(A--,e[e.length-2]==="="&&A--);var o=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(A):new Array(A),c=Array.isArray(o)?o:new Uint8Array(o);for(t=0;t<r;t+=4)n=se[e.charCodeAt(t)],s=se[e.charCodeAt(t+1)],i=se[e.charCodeAt(t+2)],a=se[e.charCodeAt(t+3)],c[B++]=n<<2|s>>4,c[B++]=(s&15)<<4|i>>2,c[B++]=(i&3)<<6|a&63;return o},sc=function(e){for(var A=e.length,r=[],t=0;t<A;t+=2)r.push(e[t+1]<<8|e[t]);return r},ac=function(e){for(var A=e.length,r=[],t=0;t<A;t+=4)r.push(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]);return r},TA=5,at=6+5,Er=2,ic=at-TA,$B=65536>>TA,oc=1<<TA,pr=oc-1,cc=1024>>TA,Qc=$B+cc,gc=Qc,wc=32,uc=gc+wc,lc=65536>>at,fc=1<<ic,Cc=fc-1,kt=function(e,A,r){return e.slice?e.slice(A,r):new Uint16Array(Array.prototype.slice.call(e,A,r))},Uc=function(e,A,r){return e.slice?e.slice(A,r):new Uint32Array(Array.prototype.slice.call(e,A,r))},Fc=function(e,A){var r=nc(e),t=Array.isArray(r)?ac(r):new Uint32Array(r),B=Array.isArray(r)?sc(r):new Uint16Array(r),n=24,s=kt(B,n/2,t[4]/2),i=t[5]===2?kt(B,(n+t[4])/2):Uc(t,Math.ceil((n+t[4])/4));return new hc(t[0],t[1],t[2],t[3],s,i)},hc=function(){function e(A,r,t,B,n,s){this.initialValue=A,this.errorValue=r,this.highStart=t,this.highValueIndex=B,this.index=n,this.data=s}return e.prototype.get=function(A){var r;if(A>=0){if(A<55296||A>56319&&A<=65535)return r=this.index[A>>TA],r=(r<<Er)+(A&pr),this.data[r];if(A<=65535)return r=this.index[$B+(A-55296>>TA)],r=(r<<Er)+(A&pr),this.data[r];if(A<this.highStart)return r=uc-lc+(A>>at),r=this.index[r],r+=A>>TA&Cc,r=this.index[r],r=(r<<Er)+(A&pr),this.data[r];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Wt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Oe=0;Oe<Wt.length;Oe++)dc[Wt.charCodeAt(Oe)]=Oe;var Ec=1,Hr=2,vr=3,Yt=4,Zt=5,pc=7,qt=8,Ir=9,mr=10,zt=11,jt=12,$t=13,AB=14,yr=15,Hc=function(e){for(var A=[],r=0,t=e.length;r<t;){var B=e.charCodeAt(r++);if(B>=55296&&B<=56319&&r<t){var n=e.charCodeAt(r++);(n&64512)===56320?A.push(((B&1023)<<10)+(n&1023)+65536):(A.push(B),r--)}else A.push(B)}return A},vc=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var t=[],B=-1,n="";++B<r;){var s=e[B];s<=65535?t.push(s):(s-=65536,t.push((s>>10)+55296,s%1024+56320)),(B+1===r||t.length>16384)&&(n+=String.fromCharCode.apply(String,t),t.length=0)}return n},Ic=Fc(Bc),AA="×",Kr="÷",mc=function(e){return Ic.get(e)},yc=function(e,A,r){var t=r-2,B=A[t],n=A[r-1],s=A[r];if(n===Hr&&s===vr)return AA;if(n===Hr||n===vr||n===Yt||s===Hr||s===vr||s===Yt)return Kr;if(n===qt&&[qt,Ir,zt,jt].indexOf(s)!==-1||(n===zt||n===Ir)&&(s===Ir||s===mr)||(n===jt||n===mr)&&s===mr||s===$t||s===Zt||s===pc||n===Ec)return AA;if(n===$t&&s===AB){for(;B===Zt;)B=A[--t];if(B===AB)return AA}if(n===yr&&s===yr){for(var i=0;B===yr;)i++,B=A[--t];if(i%2===0)return AA}return Kr},Kc=function(e){var A=Hc(e),r=A.length,t=0,B=0,n=A.map(mc);return{next:function(){if(t>=r)return{done:!0,value:null};for(var s=AA;t<r&&(s=yc(A,n,++t))===AA;);if(s!==AA||t===r){var i=vc.apply(null,A.slice(B,t));return B=t,{value:i,done:!1}}return{done:!0,value:null}}}},Lc=function(e){for(var A=Kc(e),r=[],t;!(t=A.next()).done;)t.value&&r.push(t.value.slice());return r},bc=function(e){var A=123;if(e.createRange){var r=e.createRange();if(r.getBoundingClientRect){var t=e.createElement("boundtest");t.style.height=A+"px",t.style.display="block",e.body.appendChild(t),r.selectNode(t);var B=r.getBoundingClientRect(),n=Math.round(B.height);if(e.body.removeChild(t),n===A)return!0}}return!1},Dc=function(e){var A=e.createElement("boundtest");A.style.width="50px",A.style.display="block",A.style.fontSize="12px",A.style.letterSpacing="0px",A.style.wordSpacing="0px",e.body.appendChild(A);var r=e.createRange();A.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var t=A.firstChild,B=Br(t.data).map(function(a){return M(a)}),n=0,s={},i=B.every(function(a,o){r.setStart(t,n),r.setEnd(t,n+a.length);var c=r.getBoundingClientRect();n+=a.length;var Q=c.x>s.x||c.y>s.y;return s=c,o===0?!0:Q});return e.body.removeChild(A),i},Sc=function(){return typeof new Image().crossOrigin<"u"},xc=function(){return typeof new XMLHttpRequest().responseType=="string"},Tc=function(e){var A=new Image,r=e.createElement("canvas"),t=r.getContext("2d");if(!t)return!1;A.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{t.drawImage(A,0,0),r.toDataURL()}catch(B){return!1}return!0},eB=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},Oc=function(e){var A=e.createElement("canvas"),r=100;A.width=r,A.height=r;var t=A.getContext("2d");if(!t)return Promise.reject(!1);t.fillStyle="rgb(0, 255, 0)",t.fillRect(0,0,r,r);var B=new Image,n=A.toDataURL();B.src=n;var s=zr(r,r,0,0,B);return t.fillStyle="red",t.fillRect(0,0,r,r),rB(s).then(function(i){t.drawImage(i,0,0);var a=t.getImageData(0,0,r,r).data;t.fillStyle="red",t.fillRect(0,0,r,r);var o=e.createElement("div");return o.style.backgroundImage="url("+n+")",o.style.height=r+"px",eB(a)?rB(zr(r,r,0,0,o)):Promise.reject(!1)}).then(function(i){return t.drawImage(i,0,0),eB(t.getImageData(0,0,r,r).data)}).catch(function(){return!1})},zr=function(e,A,r,t,B){var n="http://www.w3.org/2000/svg",s=document.createElementNS(n,"svg"),i=document.createElementNS(n,"foreignObject");return s.setAttributeNS(null,"width",e.toString()),s.setAttributeNS(null,"height",A.toString()),i.setAttributeNS(null,"width","100%"),i.setAttributeNS(null,"height","100%"),i.setAttributeNS(null,"x",r.toString()),i.setAttributeNS(null,"y",t.toString()),i.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(i),i.appendChild(B),s},rB=function(e){return new Promise(function(A,r){var t=new Image;t.onload=function(){return A(t)},t.onerror=r,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},X={get SUPPORT_RANGE_BOUNDS(){var e=bc(document);return Object.defineProperty(X,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=X.SUPPORT_RANGE_BOUNDS&&Dc(document);return Object.defineProperty(X,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=Tc(document);return Object.defineProperty(X,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from=="function"&&typeof window.fetch=="function"?Oc(document):Promise.resolve(!1);return Object.defineProperty(X,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=Sc();return Object.defineProperty(X,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=xc();return Object.defineProperty(X,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(X,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(X,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Qe=function(){function e(A,r){this.text=A,this.bounds=r}return e}(),Mc=function(e,A,r,t){var B=Vc(A,r),n=[],s=0;return B.forEach(function(i){if(r.textDecorationLine.length||i.trim().length>0)if(X.SUPPORT_RANGE_BOUNDS){var a=tB(t,s,i.length).getClientRects();if(a.length>1){var o=it(i),c=0;o.forEach(function(g){n.push(new Qe(g,lA.fromDOMRectList(e,tB(t,c+s,g.length).getClientRects()))),c+=g.length})}else n.push(new Qe(i,lA.fromDOMRectList(e,a)))}else{var Q=t.splitText(i.length);n.push(new Qe(i,Gc(e,t))),t=Q}else X.SUPPORT_RANGE_BOUNDS||(t=t.splitText(i.length));s+=i.length}),n},Gc=function(e,A){var r=A.ownerDocument;if(r){var t=r.createElement("html2canvaswrapper");t.appendChild(A.cloneNode(!0));var B=A.parentNode;if(B){B.replaceChild(t,A);var n=tr(e,t);return t.firstChild&&B.replaceChild(t.firstChild,t),n}}return lA.EMPTY},tB=function(e,A,r){var t=e.ownerDocument;if(!t)throw new Error("Node has no owner document");var B=t.createRange();return B.setStart(e,A),B.setEnd(e,A+r),B},it=function(e){if(X.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(A.segment(e)).map(function(r){return r.segment})}return Lc(e)},Rc=function(e,A){if(X.SUPPORT_NATIVE_TEXT_SEGMENTATION){var r=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(r.segment(e)).map(function(t){return t.segment})}return Pc(e,A)},Vc=function(e,A){return A.letterSpacing!==0?it(e):Rc(e,A)},Nc=[32,160,4961,65792,65793,4153,4241],Pc=function(e,A){for(var r=ua(e,{lineBreak:A.lineBreak,wordBreak:A.overflowWrap==="break-word"?"break-word":A.wordBreak}),t=[],B,n=function(){if(B.value){var s=B.value.slice(),i=Br(s),a="";i.forEach(function(o){Nc.indexOf(o)===-1?a+=M(o):(a.length&&t.push(a),t.push(M(o)),a="")}),a.length&&t.push(a)}};!(B=r.next()).done;)n();return t},Xc=function(){function e(A,r,t){this.text=Jc(r.data,t.textTransform),this.textBounds=Mc(A,this.text,t,r)}return e}(),Jc=function(e,A){switch(A){case 1:return e.toLowerCase();case 3:return e.replace(_c,kc);case 2:return e.toUpperCase();default:return e}},_c=/(^|\s|:|-|\(|\))([a-z])/g,kc=function(e,A,r){return e.length>0?A+r.toUpperCase():e},An=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this;return B.src=t.currentSrc||t.src,B.intrinsicWidth=t.naturalWidth,B.intrinsicHeight=t.naturalHeight,B.context.cache.addImage(B.src),B}return A}(oA),en=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this;return B.canvas=t,B.intrinsicWidth=t.width,B.intrinsicHeight=t.height,B}return A}(oA),rn=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this,n=new XMLSerializer,s=tr(r,t);return t.setAttribute("width",s.width+"px"),t.setAttribute("height",s.height+"px"),B.svg="data:image/svg+xml,"+encodeURIComponent(n.serializeToString(t)),B.intrinsicWidth=t.width.baseVal.value,B.intrinsicHeight=t.height.baseVal.value,B.context.cache.addImage(B.svg),B}return A}(oA),tn=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this;return B.value=t.value,B}return A}(oA),jr=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this;return B.start=t.start,B.reversed=typeof t.reversed=="boolean"&&t.reversed===!0,B}return A}(oA),Wc=[{type:15,flags:0,unit:"px",number:3}],Yc=[{type:16,flags:0,number:50}],Zc=function(e){return e.width>e.height?new lA(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new lA(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},qc=function(e){var A=e.type===zc?new Array(e.value.length+1).join("•"):e.value;return A.length===0?e.placeholder||"":A},qe="checkbox",ze="radio",zc="password",BB=707406591,ot=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this;switch(B.type=t.type.toLowerCase(),B.checked=t.checked,B.value=qc(t),(B.type===qe||B.type===ze)&&(B.styles.backgroundColor=3739148031,B.styles.borderTopColor=B.styles.borderRightColor=B.styles.borderBottomColor=B.styles.borderLeftColor=2779096575,B.styles.borderTopWidth=B.styles.borderRightWidth=B.styles.borderBottomWidth=B.styles.borderLeftWidth=1,B.styles.borderTopStyle=B.styles.borderRightStyle=B.styles.borderBottomStyle=B.styles.borderLeftStyle=1,B.styles.backgroundClip=[0],B.styles.backgroundOrigin=[0],B.bounds=Zc(B.bounds)),B.type){case qe:B.styles.borderTopRightRadius=B.styles.borderTopLeftRadius=B.styles.borderBottomRightRadius=B.styles.borderBottomLeftRadius=Wc;break;case ze:B.styles.borderTopRightRadius=B.styles.borderTopLeftRadius=B.styles.borderBottomRightRadius=B.styles.borderBottomLeftRadius=Yc;break}return B}return A}(oA),Bn=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this,n=t.options[t.selectedIndex||0];return B.value=n&&n.text||"",B}return A}(oA),nn=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this;return B.value=t.value,B}return A}(oA),sn=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this;B.src=t.src,B.width=parseInt(t.width,10)||0,B.height=parseInt(t.height,10)||0,B.backgroundColor=B.styles.backgroundColor;try{if(t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.documentElement){B.tree=on(r,t.contentWindow.document.documentElement);var n=t.contentWindow.document.documentElement?oe(r,getComputedStyle(t.contentWindow.document.documentElement).backgroundColor):uA.TRANSPARENT,s=t.contentWindow.document.body?oe(r,getComputedStyle(t.contentWindow.document.body).backgroundColor):uA.TRANSPARENT;B.backgroundColor=vA(n)?vA(s)?B.styles.backgroundColor:s:n}}catch(i){}return B}return A}(oA),jc=["OL","UL","MENU"],Je=function(e,A,r,t){for(var B=A.firstChild,n=void 0;B;B=n)if(n=B.nextSibling,cn(B)&&B.data.trim().length>0)r.textNodes.push(new Xc(e,B,r.styles));else if(_A(B))if(un(B)&&B.assignedNodes)B.assignedNodes().forEach(function(i){return Je(e,i,r,t)});else{var s=an(e,B);s.styles.isVisible()&&($c(B,s,t)?s.flags|=4:AQ(s.styles)&&(s.flags|=2),jc.indexOf(B.tagName)!==-1&&(s.flags|=8),r.elements.push(s),B.slot,B.shadowRoot?Je(e,B.shadowRoot,s,t):!je(B)&&!Qn(B)&&!$e(B)&&Je(e,B,s,t))}},an=function(e,A){return At(A)?new An(e,A):gn(A)?new en(e,A):Qn(A)?new rn(e,A):eQ(A)?new tn(e,A):rQ(A)?new jr(e,A):tQ(A)?new ot(e,A):$e(A)?new Bn(e,A):je(A)?new nn(e,A):wn(A)?new sn(e,A):new oA(e,A)},on=function(e,A){var r=an(e,A);return r.flags|=4,Je(e,A,r,r),r},$c=function(e,A,r){return A.styles.isPositionedWithZIndex()||A.styles.opacity<1||A.styles.isTransformed()||ct(e)&&r.styles.isTransparent()},AQ=function(e){return e.isPositioned()||e.isFloating()},cn=function(e){return e.nodeType===Node.TEXT_NODE},_A=function(e){return e.nodeType===Node.ELEMENT_NODE},$r=function(e){return _A(e)&&typeof e.style<"u"&&!_e(e)},_e=function(e){return typeof e.className=="object"},eQ=function(e){return e.tagName==="LI"},rQ=function(e){return e.tagName==="OL"},tQ=function(e){return e.tagName==="INPUT"},BQ=function(e){return e.tagName==="HTML"},Qn=function(e){return e.tagName==="svg"},ct=function(e){return e.tagName==="BODY"},gn=function(e){return e.tagName==="CANVAS"},nB=function(e){return e.tagName==="VIDEO"},At=function(e){return e.tagName==="IMG"},wn=function(e){return e.tagName==="IFRAME"},sB=function(e){return e.tagName==="STYLE"},nQ=function(e){return e.tagName==="SCRIPT"},je=function(e){return e.tagName==="TEXTAREA"},$e=function(e){return e.tagName==="SELECT"},un=function(e){return e.tagName==="SLOT"},aB=function(e){return e.tagName.indexOf("-")>0},sQ=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(A){var r=this.counters[A];return r&&r.length?r[r.length-1]:1},e.prototype.getCounterValues=function(A){var r=this.counters[A];return r||[]},e.prototype.pop=function(A){var r=this;A.forEach(function(t){return r.counters[t].pop()})},e.prototype.parse=function(A){var r=this,t=A.counterIncrement,B=A.counterReset,n=!0;t!==null&&t.forEach(function(i){var a=r.counters[i.counter];a&&i.increment!==0&&(n=!1,a.length||a.push(1),a[Math.max(0,a.length-1)]+=i.increment)});var s=[];return n&&B.forEach(function(i){var a=r.counters[i.counter];s.push(i.counter),a||(a=r.counters[i.counter]=[]),a.push(i.reset)}),s},e}(),iB={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"]},oB={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},aQ={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},iQ={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},VA=function(e,A,r,t,B,n){return e<A||e>r?le(e,B,n.length>0):t.integers.reduce(function(s,i,a){for(;e>=i;)e-=i,s+=t.values[a];return s},"")+n},ln=function(e,A,r,t){var B="";do r||e--,B=t(e)+B,e/=A;while(e*A>=A);return B},O=function(e,A,r,t,B){var n=r-A+1;return(e<0?"-":"")+(ln(Math.abs(e),n,t,function(s){return M(Math.floor(s%n)+A)})+B)},bA=function(e,A,r){r===void 0&&(r=". ");var t=A.length;return ln(Math.abs(e),t,!1,function(B){return A[Math.floor(B%t)]})+r},XA=1,UA=2,FA=4,ae=8,wA=function(e,A,r,t,B,n){if(e<-9999||e>9999)return le(e,4,B.length>0);var s=Math.abs(e),i=B;if(s===0)return A[0]+i;for(var a=0;s>0&&a<=4;a++){var o=s%10;o===0&&V(n,XA)&&i!==""?i=A[o]+i:o>1||o===1&&a===0||o===1&&a===1&&V(n,UA)||o===1&&a===1&&V(n,FA)&&e>100||o===1&&a>1&&V(n,ae)?i=A[o]+(a>0?r[a-1]:"")+i:o===1&&a>0&&(i=r[a-1]+i),s=Math.floor(s/10)}return(e<0?t:"")+i},cB="十百千萬",QB="拾佰仟萬",gB="マイナス",Lr="마이너스",le=function(e,A,r){var t=r?". ":"",B=r?"、":"",n=r?", ":"",s=r?" ":"";switch(A){case 0:return"•"+s;case 1:return"◦"+s;case 2:return"◾"+s;case 5:var i=O(e,48,57,!0,t);return i.length<4?"0"+i:i;case 4:return bA(e,"〇一二三四五六七八九",B);case 6:return VA(e,1,3999,iB,3,t).toLowerCase();case 7:return VA(e,1,3999,iB,3,t);case 8:return O(e,945,969,!1,t);case 9:return O(e,97,122,!1,t);case 10:return O(e,65,90,!1,t);case 11:return O(e,1632,1641,!0,t);case 12:case 49:return VA(e,1,9999,oB,3,t);case 35:return VA(e,1,9999,oB,3,t).toLowerCase();case 13:return O(e,2534,2543,!0,t);case 14:case 30:return O(e,6112,6121,!0,t);case 15:return bA(e,"子丑寅卯辰巳午未申酉戌亥",B);case 16:return bA(e,"甲乙丙丁戊己庚辛壬癸",B);case 17:case 48:return wA(e,"零一二三四五六七八九",cB,"負",B,UA|FA|ae);case 47:return wA(e,"零壹貳參肆伍陸柒捌玖",QB,"負",B,XA|UA|FA|ae);case 42:return wA(e,"零一二三四五六七八九",cB,"负",B,UA|FA|ae);case 41:return wA(e,"零壹贰叁肆伍陆柒捌玖",QB,"负",B,XA|UA|FA|ae);case 26:return wA(e,"〇一二三四五六七八九","十百千万",gB,B,0);case 25:return wA(e,"零壱弐参四伍六七八九","拾百千万",gB,B,XA|UA|FA);case 31:return wA(e,"영일이삼사오육칠팔구","십백천만",Lr,n,XA|UA|FA);case 33:return wA(e,"零一二三四五六七八九","十百千萬",Lr,n,0);case 32:return wA(e,"零壹貳參四五六七八九","拾百千",Lr,n,XA|UA|FA);case 18:return O(e,2406,2415,!0,t);case 20:return VA(e,1,19999,iQ,3,t);case 21:return O(e,2790,2799,!0,t);case 22:return O(e,2662,2671,!0,t);case 22:return VA(e,1,10999,aQ,3,t);case 23:return bA(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return bA(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return O(e,3302,3311,!0,t);case 28:return bA(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",B);case 29:return bA(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",B);case 34:return O(e,3792,3801,!0,t);case 37:return O(e,6160,6169,!0,t);case 38:return O(e,4160,4169,!0,t);case 39:return O(e,2918,2927,!0,t);case 40:return O(e,1776,1785,!0,t);case 43:return O(e,3046,3055,!0,t);case 44:return O(e,3174,3183,!0,t);case 45:return O(e,3664,3673,!0,t);case 46:return O(e,3872,3881,!0,t);case 3:default:return O(e,48,57,!0,t)}},fn="data-html2canvas-ignore",wB=function(){function e(A,r,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=r,this.counters=new sQ,this.quoteDepth=0,!r.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(r.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(A,r){var t=this,B=oQ(A,r);if(!B.contentWindow)return Promise.reject("Unable to find iframe window");var n=A.defaultView.pageXOffset,s=A.defaultView.pageYOffset,i=B.contentWindow,a=i.document,o=gQ(B).then(function(){return W(t,void 0,void 0,function(){var c,Q;return _(this,function(g){switch(g.label){case 0:return this.scrolledElements.forEach(fQ),i&&(i.scrollTo(r.left,r.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(i.scrollY!==r.top||i.scrollX!==r.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(i.scrollX-r.left,i.scrollY-r.top,0,0))),c=this.options.onclone,Q=this.clonedReferenceElement,typeof Q>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:g.sent(),g.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,QQ(a)]:[3,4];case 3:g.sent(),g.label=4;case 4:return typeof c=="function"?[2,Promise.resolve().then(function(){return c(a,Q)}).then(function(){return B})]:[2,B]}})})});return a.open(),a.write(uQ(document.doctype)+"<html></html>"),lQ(this.referenceElement.ownerDocument,n,s),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),o},e.prototype.createElementClone=function(A){if(qr(A,2))debugger;if(gn(A))return this.createCanvasClone(A);if(nB(A))return this.createVideoClone(A);if(sB(A))return this.createStyleClone(A);var r=A.cloneNode(!1);return At(r)&&(At(A)&&A.currentSrc&&A.currentSrc!==A.src&&(r.src=A.currentSrc,r.srcset=""),r.loading==="lazy"&&(r.loading="eager")),aB(r)?this.createCustomElementClone(r):r},e.prototype.createCustomElementClone=function(A){var r=document.createElement("html2canvascustomelement");return br(A.style,r),r},e.prototype.createStyleClone=function(A){try{var r=A.sheet;if(r&&r.cssRules){var t=[].slice.call(r.cssRules,0).reduce(function(n,s){return s&&typeof s.cssText=="string"?n+s.cssText:n},""),B=A.cloneNode(!1);return B.textContent=t,B}}catch(n){if(this.context.logger.error("Unable to access cssRules property",n),n.name!=="SecurityError")throw n}return A.cloneNode(!1)},e.prototype.createCanvasClone=function(A){var r;if(this.options.inlineImages&&A.ownerDocument){var t=A.ownerDocument.createElement("img");try{return t.src=A.toDataURL(),t}catch(o){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var B=A.cloneNode(!1);try{B.width=A.width,B.height=A.height;var n=A.getContext("2d"),s=B.getContext("2d");if(s)if(!this.options.allowTaint&&n)s.putImageData(n.getImageData(0,0,A.width,A.height),0,0);else{var i=(r=A.getContext("webgl2"))!==null&&r!==void 0?r:A.getContext("webgl");if(i){var a=i.getContextAttributes();(a==null?void 0:a.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}s.drawImage(A,0,0)}return B}catch(o){this.context.logger.info("Unable to clone canvas as it is tainted",A)}return B},e.prototype.createVideoClone=function(A){var r=A.ownerDocument.createElement("canvas");r.width=A.offsetWidth,r.height=A.offsetHeight;var t=r.getContext("2d");try{return t&&(t.drawImage(A,0,0,r.width,r.height),this.options.allowTaint||t.getImageData(0,0,r.width,r.height)),r}catch(n){this.context.logger.info("Unable to clone video as it is tainted",A)}var B=A.ownerDocument.createElement("canvas");return B.width=A.offsetWidth,B.height=A.offsetHeight,B},e.prototype.appendChildNode=function(A,r,t){(!_A(r)||!nQ(r)&&!r.hasAttribute(fn)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(r)))&&(!this.options.copyStyles||!_A(r)||!sB(r))&&A.appendChild(this.cloneNode(r,t))},e.prototype.cloneChildNodes=function(A,r,t){for(var B=this,n=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;n;n=n.nextSibling)if(_A(n)&&un(n)&&typeof n.assignedNodes=="function"){var s=n.assignedNodes();s.length&&s.forEach(function(i){return B.appendChildNode(r,i,t)})}else this.appendChildNode(r,n,t)},e.prototype.cloneNode=function(A,r){if(cn(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var t=A.ownerDocument.defaultView;if(t&&_A(A)&&($r(A)||_e(A))){var B=this.createElementClone(A);B.style.transitionProperty="none";var n=t.getComputedStyle(A),s=t.getComputedStyle(A,":before"),i=t.getComputedStyle(A,":after");this.referenceElement===A&&$r(B)&&(this.clonedReferenceElement=B),ct(B)&&FQ(B);var a=this.counters.parse(new Jt(this.context,n)),o=this.resolvePseudoContent(A,B,s,ge.BEFORE);aB(A)&&(r=!0),nB(A)||this.cloneChildNodes(A,B,r),o&&B.insertBefore(o,B.firstChild);var c=this.resolvePseudoContent(A,B,i,ge.AFTER);return c&&B.appendChild(c),this.counters.pop(a),(n&&(this.options.copyStyles||_e(A))&&!wn(A)||r)&&br(n,B),(A.scrollTop!==0||A.scrollLeft!==0)&&this.scrolledElements.push([B,A.scrollLeft,A.scrollTop]),(je(A)||$e(A))&&(je(B)||$e(B))&&(B.value=A.value),B}return A.cloneNode(!1)},e.prototype.resolvePseudoContent=function(A,r,t,B){var n=this;if(t){var s=t.content,i=r.ownerDocument;if(!(!i||!s||s==="none"||s==="-moz-alt-content"||t.display==="none")){this.counters.parse(new Jt(this.context,t));var a=new ec(this.context,t),o=i.createElement("html2canvaspseudoelement");br(t,o),a.content.forEach(function(Q){if(Q.type===0)o.appendChild(i.createTextNode(Q.value));else if(Q.type===22){var g=i.createElement("img");g.src=Q.value,g.style.opacity="1",o.appendChild(g)}else if(Q.type===18){if(Q.name==="attr"){var f=Q.values.filter(S);f.length&&o.appendChild(i.createTextNode(A.getAttribute(f[0].value)||""))}else if(Q.name==="counter"){var u=Q.values.filter(WA),w=u[0],d=u[1];if(w&&S(w)){var l=n.counters.getCounterValue(w.value),C=d&&S(d)?Zr.parse(n.context,d.value):3;o.appendChild(i.createTextNode(le(l,C,!1)))}}else if(Q.name==="counters"){var m=Q.values.filter(WA),w=m[0],v=m[1],d=m[2];if(w&&S(w)){var E=n.counters.getCounterValues(w.value),F=d&&S(d)?Zr.parse(n.context,d.value):3,y=v&&v.type===0?v.value:"",K=E.map(function(Y){return le(Y,F,!1)}).join(y);o.appendChild(i.createTextNode(K))}}}else if(Q.type===20)switch(Q.value){case"open-quote":o.appendChild(i.createTextNode(Xt(a.quotes,n.quoteDepth++,!0)));break;case"close-quote":o.appendChild(i.createTextNode(Xt(a.quotes,--n.quoteDepth,!1)));break;default:o.appendChild(i.createTextNode(Q.value))}}),o.className=et+" "+rt;var c=B===ge.BEFORE?" "+et:" "+rt;return _e(r)?r.className.baseValue+=c:r.className+=c,o}}},e.destroy=function(A){return A.parentNode?(A.parentNode.removeChild(A),!0):!1},e}(),ge;(function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"})(ge||(ge={}));var oQ=function(e,A){var r=e.createElement("iframe");return r.className="html2canvas-container",r.style.visibility="hidden",r.style.position="fixed",r.style.left="-10000px",r.style.top="0px",r.style.border="0",r.width=A.width.toString(),r.height=A.height.toString(),r.scrolling="no",r.setAttribute(fn,"true"),e.body.appendChild(r),r},cQ=function(e){return new Promise(function(A){if(e.complete){A();return}if(!e.src){A();return}e.onload=A,e.onerror=A})},QQ=function(e){return Promise.all([].slice.call(e.images,0).map(cQ))},gQ=function(e){return new Promise(function(A,r){var t=e.contentWindow;if(!t)return r("No window assigned for iframe");var B=t.document;t.onload=e.onload=function(){t.onload=e.onload=null;var n=setInterval(function(){B.body.childNodes.length>0&&B.readyState==="complete"&&(clearInterval(n),A(e))},50)}})},wQ=["all","d","content"],br=function(e,A){for(var r=e.length-1;r>=0;r--){var t=e.item(r);wQ.indexOf(t)===-1&&A.style.setProperty(t,e.getPropertyValue(t))}return A},uQ=function(e){var A="";return e&&(A+="<!DOCTYPE ",e.name&&(A+=e.name),e.internalSubset&&(A+=e.internalSubset),e.publicId&&(A+='"'+e.publicId+'"'),e.systemId&&(A+='"'+e.systemId+'"'),A+=">"),A},lQ=function(e,A,r){e&&e.defaultView&&(A!==e.defaultView.pageXOffset||r!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(A,r)},fQ=function(e){var A=e[0],r=e[1],t=e[2];A.scrollLeft=r,A.scrollTop=t},CQ=":before",UQ=":after",et="___html2canvas___pseudoelement_before",rt="___html2canvas___pseudoelement_after",uB=`{
    content: "" !important;
    display: none !important;
}`,FQ=function(e){hQ(e,"."+et+CQ+uB+`
         .`+rt+UQ+uB)},hQ=function(e,A){var r=e.ownerDocument;if(r){var t=r.createElement("style");t.textContent=A,e.appendChild(t)}},Cn=function(){function e(){}return e.getOrigin=function(A){var r=e._link;return r?(r.href=A,r.href=r.href,r.protocol+r.hostname+r.port):"about:blank"},e.isSameOrigin=function(A){return e.getOrigin(A)===e._origin},e.setContext=function(A){e._link=A.document.createElement("a"),e._origin=e.getOrigin(A.location.href)},e._origin="about:blank",e}(),dQ=function(){function e(A,r){this.context=A,this._options=r,this._cache={}}return e.prototype.addImage=function(A){var r=Promise.resolve();return this.has(A)||(Sr(A)||vQ(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),r},e.prototype.match=function(A){return this._cache[A]},e.prototype.loadImage=function(A){return W(this,void 0,void 0,function(){var r,t,B,n,s=this;return _(this,function(i){switch(i.label){case 0:return r=Cn.isSameOrigin(A),t=!Dr(A)&&this._options.useCORS===!0&&X.SUPPORT_CORS_IMAGES&&!r,B=!Dr(A)&&!r&&!Sr(A)&&typeof this._options.proxy=="string"&&X.SUPPORT_CORS_XHR&&!t,!r&&this._options.allowTaint===!1&&!Dr(A)&&!Sr(A)&&!B&&!t?[2]:(n=A,B?[4,this.proxy(n)]:[3,2]);case 1:n=i.sent(),i.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(a,o){var c=new Image;c.onload=function(){return a(c)},c.onerror=o,(IQ(n)||t)&&(c.crossOrigin="anonymous"),c.src=n,c.complete===!0&&setTimeout(function(){return a(c)},500),s._options.imageTimeout>0&&setTimeout(function(){return o("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,i.sent()]}})})},e.prototype.has=function(A){return typeof this._cache[A]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(A){var r=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var B=A.substring(0,256);return new Promise(function(n,s){var i=X.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(a.status===200)if(i==="text")n(a.response);else{var Q=new FileReader;Q.addEventListener("load",function(){return n(Q.result)},!1),Q.addEventListener("error",function(g){return s(g)},!1),Q.readAsDataURL(a.response)}else s("Failed to proxy resource "+B+" with status code "+a.status)},a.onerror=s;var o=t.indexOf("?")>-1?"&":"?";if(a.open("GET",""+t+o+"url="+encodeURIComponent(A)+"&responseType="+i),i!=="text"&&a instanceof XMLHttpRequest&&(a.responseType=i),r._options.imageTimeout){var c=r._options.imageTimeout;a.timeout=c,a.ontimeout=function(){return s("Timed out ("+c+"ms) proxying "+B)}}a.send()})},e}(),EQ=/^data:image\/svg\+xml/i,pQ=/^data:image\/.*;base64,/i,HQ=/^data:image\/.*/i,vQ=function(e){return X.SUPPORT_SVG_DRAWING||!mQ(e)},Dr=function(e){return HQ.test(e)},IQ=function(e){return pQ.test(e)},Sr=function(e){return e.substr(0,4)==="blob"},mQ=function(e){return e.substr(-3).toLowerCase()==="svg"||EQ.test(e)},U=function(){function e(A,r){this.type=0,this.x=A,this.y=r}return e.prototype.add=function(A,r){return new e(this.x+A,this.y+r)},e}(),NA=function(e,A,r){return new U(e.x+(A.x-e.x)*r,e.y+(A.y-e.y)*r)},Me=function(){function e(A,r,t,B){this.type=1,this.start=A,this.startControl=r,this.endControl=t,this.end=B}return e.prototype.subdivide=function(A,r){var t=NA(this.start,this.startControl,A),B=NA(this.startControl,this.endControl,A),n=NA(this.endControl,this.end,A),s=NA(t,B,A),i=NA(B,n,A),a=NA(s,i,A);return r?new e(this.start,t,s,a):new e(a,i,n,this.end)},e.prototype.add=function(A,r){return new e(this.start.add(A,r),this.startControl.add(A,r),this.endControl.add(A,r),this.end.add(A,r))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),eA=function(e){return e.type===1},yQ=function(){function e(A){var r=A.styles,t=A.bounds,B=ne(r.borderTopLeftRadius,t.width,t.height),n=B[0],s=B[1],i=ne(r.borderTopRightRadius,t.width,t.height),a=i[0],o=i[1],c=ne(r.borderBottomRightRadius,t.width,t.height),Q=c[0],g=c[1],f=ne(r.borderBottomLeftRadius,t.width,t.height),u=f[0],w=f[1],d=[];d.push((n+a)/t.width),d.push((u+Q)/t.width),d.push((s+w)/t.height),d.push((o+g)/t.height);var l=Math.max.apply(Math,d);l>1&&(n/=l,s/=l,a/=l,o/=l,Q/=l,g/=l,u/=l,w/=l);var C=t.width-a,m=t.height-g,v=t.width-Q,E=t.height-w,F=r.borderTopWidth,y=r.borderRightWidth,K=r.borderBottomWidth,p=r.borderLeftWidth,G=x(r.paddingTop,A.bounds.width),Y=x(r.paddingRight,A.bounds.width),j=x(r.paddingBottom,A.bounds.width),D=x(r.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=n>0||s>0?T(t.left+p/3,t.top+F/3,n-p/3,s-F/3,b.TOP_LEFT):new U(t.left+p/3,t.top+F/3),this.topRightBorderDoubleOuterBox=n>0||s>0?T(t.left+C,t.top+F/3,a-y/3,o-F/3,b.TOP_RIGHT):new U(t.left+t.width-y/3,t.top+F/3),this.bottomRightBorderDoubleOuterBox=Q>0||g>0?T(t.left+v,t.top+m,Q-y/3,g-K/3,b.BOTTOM_RIGHT):new U(t.left+t.width-y/3,t.top+t.height-K/3),this.bottomLeftBorderDoubleOuterBox=u>0||w>0?T(t.left+p/3,t.top+E,u-p/3,w-K/3,b.BOTTOM_LEFT):new U(t.left+p/3,t.top+t.height-K/3),this.topLeftBorderDoubleInnerBox=n>0||s>0?T(t.left+p*2/3,t.top+F*2/3,n-p*2/3,s-F*2/3,b.TOP_LEFT):new U(t.left+p*2/3,t.top+F*2/3),this.topRightBorderDoubleInnerBox=n>0||s>0?T(t.left+C,t.top+F*2/3,a-y*2/3,o-F*2/3,b.TOP_RIGHT):new U(t.left+t.width-y*2/3,t.top+F*2/3),this.bottomRightBorderDoubleInnerBox=Q>0||g>0?T(t.left+v,t.top+m,Q-y*2/3,g-K*2/3,b.BOTTOM_RIGHT):new U(t.left+t.width-y*2/3,t.top+t.height-K*2/3),this.bottomLeftBorderDoubleInnerBox=u>0||w>0?T(t.left+p*2/3,t.top+E,u-p*2/3,w-K*2/3,b.BOTTOM_LEFT):new U(t.left+p*2/3,t.top+t.height-K*2/3),this.topLeftBorderStroke=n>0||s>0?T(t.left+p/2,t.top+F/2,n-p/2,s-F/2,b.TOP_LEFT):new U(t.left+p/2,t.top+F/2),this.topRightBorderStroke=n>0||s>0?T(t.left+C,t.top+F/2,a-y/2,o-F/2,b.TOP_RIGHT):new U(t.left+t.width-y/2,t.top+F/2),this.bottomRightBorderStroke=Q>0||g>0?T(t.left+v,t.top+m,Q-y/2,g-K/2,b.BOTTOM_RIGHT):new U(t.left+t.width-y/2,t.top+t.height-K/2),this.bottomLeftBorderStroke=u>0||w>0?T(t.left+p/2,t.top+E,u-p/2,w-K/2,b.BOTTOM_LEFT):new U(t.left+p/2,t.top+t.height-K/2),this.topLeftBorderBox=n>0||s>0?T(t.left,t.top,n,s,b.TOP_LEFT):new U(t.left,t.top),this.topRightBorderBox=a>0||o>0?T(t.left+C,t.top,a,o,b.TOP_RIGHT):new U(t.left+t.width,t.top),this.bottomRightBorderBox=Q>0||g>0?T(t.left+v,t.top+m,Q,g,b.BOTTOM_RIGHT):new U(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=u>0||w>0?T(t.left,t.top+E,u,w,b.BOTTOM_LEFT):new U(t.left,t.top+t.height),this.topLeftPaddingBox=n>0||s>0?T(t.left+p,t.top+F,Math.max(0,n-p),Math.max(0,s-F),b.TOP_LEFT):new U(t.left+p,t.top+F),this.topRightPaddingBox=a>0||o>0?T(t.left+Math.min(C,t.width-y),t.top+F,C>t.width+y?0:Math.max(0,a-y),Math.max(0,o-F),b.TOP_RIGHT):new U(t.left+t.width-y,t.top+F),this.bottomRightPaddingBox=Q>0||g>0?T(t.left+Math.min(v,t.width-p),t.top+Math.min(m,t.height-K),Math.max(0,Q-y),Math.max(0,g-K),b.BOTTOM_RIGHT):new U(t.left+t.width-y,t.top+t.height-K),this.bottomLeftPaddingBox=u>0||w>0?T(t.left+p,t.top+Math.min(E,t.height-K),Math.max(0,u-p),Math.max(0,w-K),b.BOTTOM_LEFT):new U(t.left+p,t.top+t.height-K),this.topLeftContentBox=n>0||s>0?T(t.left+p+D,t.top+F+G,Math.max(0,n-(p+D)),Math.max(0,s-(F+G)),b.TOP_LEFT):new U(t.left+p+D,t.top+F+G),this.topRightContentBox=a>0||o>0?T(t.left+Math.min(C,t.width+p+D),t.top+F+G,C>t.width+p+D?0:a-p+D,o-(F+G),b.TOP_RIGHT):new U(t.left+t.width-(y+Y),t.top+F+G),this.bottomRightContentBox=Q>0||g>0?T(t.left+Math.min(v,t.width-(p+D)),t.top+Math.min(m,t.height+F+G),Math.max(0,Q-(y+Y)),g-(K+j),b.BOTTOM_RIGHT):new U(t.left+t.width-(y+Y),t.top+t.height-(K+j)),this.bottomLeftContentBox=u>0||w>0?T(t.left+p+D,t.top+E,Math.max(0,u-(p+D)),w-(K+j),b.BOTTOM_LEFT):new U(t.left+p+D,t.top+t.height-(K+j))}return e}(),b;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(b||(b={}));var T=function(e,A,r,t,B){var n=4*((Math.sqrt(2)-1)/3),s=r*n,i=t*n,a=e+r,o=A+t;switch(B){case b.TOP_LEFT:return new Me(new U(e,o),new U(e,o-i),new U(a-s,A),new U(a,A));case b.TOP_RIGHT:return new Me(new U(e,A),new U(e+s,A),new U(a,o-i),new U(a,o));case b.BOTTOM_RIGHT:return new Me(new U(a,A),new U(a,A+i),new U(e+s,o),new U(e,o));case b.BOTTOM_LEFT:default:return new Me(new U(a,o),new U(a-s,o),new U(e,A+i),new U(e,A))}},Ar=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},KQ=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},er=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},LQ=function(){function e(A,r,t){this.offsetX=A,this.offsetY=r,this.matrix=t,this.type=0,this.target=6}return e}(),Ge=function(){function e(A,r){this.path=A,this.target=r,this.type=1}return e}(),bQ=function(){function e(A){this.opacity=A,this.type=2,this.target=6}return e}(),DQ=function(e){return e.type===0},Un=function(e){return e.type===1},SQ=function(e){return e.type===2},lB=function(e,A){return e.length===A.length?e.some(function(r,t){return r===A[t]}):!1},xQ=function(e,A,r,t,B){return e.map(function(n,s){switch(s){case 0:return n.add(A,r);case 1:return n.add(A+t,r);case 2:return n.add(A+t,r+B);case 3:return n.add(A,r+B)}return n})},Fn=function(){function e(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),hn=function(){function e(A,r){if(this.container=A,this.parent=r,this.effects=[],this.curves=new yQ(this.container),this.container.styles.opacity<1&&this.effects.push(new bQ(this.container.styles.opacity)),this.container.styles.transform!==null){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,B=this.container.bounds.top+this.container.styles.transformOrigin[1].number,n=this.container.styles.transform;this.effects.push(new LQ(t,B,n))}if(this.container.styles.overflowX!==0){var s=Ar(this.curves),i=er(this.curves);lB(s,i)?this.effects.push(new Ge(s,6)):(this.effects.push(new Ge(s,2)),this.effects.push(new Ge(i,4)))}}return e.prototype.getEffects=function(A){for(var r=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,B=this.effects.slice(0);t;){var n=t.effects.filter(function(a){return!Un(a)});if(r||t.container.styles.position!==0||!t.parent){if(B.unshift.apply(B,n),r=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var s=Ar(t.curves),i=er(t.curves);lB(s,i)||B.unshift(new Ge(i,6))}}else B.unshift.apply(B,n);t=t.parent}return B.filter(function(a){return V(a.target,A)})},e}(),tt=function(e,A,r,t){e.container.elements.forEach(function(B){var n=V(B.flags,4),s=V(B.flags,2),i=new hn(B,e);V(B.styles.display,2048)&&t.push(i);var a=V(B.flags,8)?[]:t;if(n||s){var o=n||B.styles.isPositioned()?r:A,c=new Fn(i);if(B.styles.isPositioned()||B.styles.opacity<1||B.styles.isTransformed()){var Q=B.styles.zIndex.order;if(Q<0){var g=0;o.negativeZIndex.some(function(u,w){return Q>u.element.container.styles.zIndex.order?(g=w,!1):g>0}),o.negativeZIndex.splice(g,0,c)}else if(Q>0){var f=0;o.positiveZIndex.some(function(u,w){return Q>=u.element.container.styles.zIndex.order?(f=w+1,!1):f>0}),o.positiveZIndex.splice(f,0,c)}else o.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else B.styles.isFloating()?o.nonPositionedFloats.push(c):o.nonPositionedInlineLevel.push(c);tt(i,c,n?c:r,a)}else B.styles.isInlineLevel()?A.inlineLevel.push(i):A.nonInlineLevel.push(i),tt(i,A,r,a);V(B.flags,8)&&dn(B,a)})},dn=function(e,A){for(var r=e instanceof jr?e.start:1,t=e instanceof jr?e.reversed:!1,B=0;B<A.length;B++){var n=A[B];n.container instanceof tn&&typeof n.container.value=="number"&&n.container.value!==0&&(r=n.container.value),n.listValue=le(r,n.container.styles.listStyleType,!0),r+=t?-1:1}},TQ=function(e){var A=new hn(e,null),r=new Fn(A),t=[];return tt(A,r,r,t),dn(A.container,t),r},fB=function(e,A){switch(A){case 0:return tA(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return tA(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return tA(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return tA(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},OQ=function(e,A){switch(A){case 0:return tA(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return tA(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return tA(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return tA(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},MQ=function(e,A){switch(A){case 0:return tA(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return tA(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return tA(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return tA(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},GQ=function(e,A){switch(A){case 0:return Re(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Re(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Re(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return Re(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},Re=function(e,A){var r=[];return eA(e)?r.push(e.subdivide(.5,!1)):r.push(e),eA(A)?r.push(A.subdivide(.5,!0)):r.push(A),r},tA=function(e,A,r,t){var B=[];return eA(e)?B.push(e.subdivide(.5,!1)):B.push(e),eA(r)?B.push(r.subdivide(.5,!0)):B.push(r),eA(t)?B.push(t.subdivide(.5,!0).reverse()):B.push(t),eA(A)?B.push(A.subdivide(.5,!1).reverse()):B.push(A),B},En=function(e){var A=e.bounds,r=e.styles;return A.add(r.borderLeftWidth,r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth),-(r.borderTopWidth+r.borderBottomWidth))},rr=function(e){var A=e.styles,r=e.bounds,t=x(A.paddingLeft,r.width),B=x(A.paddingRight,r.width),n=x(A.paddingTop,r.width),s=x(A.paddingBottom,r.width);return r.add(t+A.borderLeftWidth,n+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+t+B),-(A.borderTopWidth+A.borderBottomWidth+n+s))},RQ=function(e,A){return e===0?A.bounds:e===2?rr(A):En(A)},VQ=function(e,A){return e===0?A.bounds:e===2?rr(A):En(A)},xr=function(e,A,r){var t=RQ(JA(e.styles.backgroundOrigin,A),e),B=VQ(JA(e.styles.backgroundClip,A),e),n=NQ(JA(e.styles.backgroundSize,A),r,t),s=n[0],i=n[1],a=ne(JA(e.styles.backgroundPosition,A),t.width-s,t.height-i),o=PQ(JA(e.styles.backgroundRepeat,A),a,n,t,B),c=Math.round(t.left+a[0]),Q=Math.round(t.top+a[1]);return[o,c,Q,s,i]},PA=function(e){return S(e)&&e.value===kA.AUTO},Ve=function(e){return typeof e=="number"},NQ=function(e,A,r){var t=A[0],B=A[1],n=A[2],s=e[0],i=e[1];if(!s)return[0,0];if(R(s)&&i&&R(i))return[x(s,r.width),x(i,r.height)];var a=Ve(n);if(S(s)&&(s.value===kA.CONTAIN||s.value===kA.COVER)){if(Ve(n)){var o=r.width/r.height;return o<n!=(s.value===kA.COVER)?[r.width,r.width/n]:[r.height*n,r.height]}return[r.width,r.height]}var c=Ve(t),Q=Ve(B),g=c||Q;if(PA(s)&&(!i||PA(i))){if(c&&Q)return[t,B];if(!a&&!g)return[r.width,r.height];if(g&&a){var f=c?t:B*n,u=Q?B:t/n;return[f,u]}var w=c?t:r.width,d=Q?B:r.height;return[w,d]}if(a){var l=0,C=0;return R(s)?l=x(s,r.width):R(i)&&(C=x(i,r.height)),PA(s)?l=C*n:(!i||PA(i))&&(C=l/n),[l,C]}var m=null,v=null;if(R(s)?m=x(s,r.width):i&&R(i)&&(v=x(i,r.height)),m!==null&&(!i||PA(i))&&(v=c&&Q?m/t*B:r.height),v!==null&&PA(s)&&(m=c&&Q?v/B*t:r.width),m!==null&&v!==null)return[m,v];throw new Error("Unable to calculate background-size for element")},JA=function(e,A){var r=e[A];return typeof r>"u"?e[0]:r},PQ=function(e,A,r,t,B){var n=A[0],s=A[1],i=r[0],a=r[1];switch(e){case 2:return[new U(Math.round(t.left),Math.round(t.top+s)),new U(Math.round(t.left+t.width),Math.round(t.top+s)),new U(Math.round(t.left+t.width),Math.round(a+t.top+s)),new U(Math.round(t.left),Math.round(a+t.top+s))];case 3:return[new U(Math.round(t.left+n),Math.round(t.top)),new U(Math.round(t.left+n+i),Math.round(t.top)),new U(Math.round(t.left+n+i),Math.round(t.height+t.top)),new U(Math.round(t.left+n),Math.round(t.height+t.top))];case 1:return[new U(Math.round(t.left+n),Math.round(t.top+s)),new U(Math.round(t.left+n+i),Math.round(t.top+s)),new U(Math.round(t.left+n+i),Math.round(t.top+s+a)),new U(Math.round(t.left+n),Math.round(t.top+s+a))];default:return[new U(Math.round(B.left),Math.round(B.top)),new U(Math.round(B.left+B.width),Math.round(B.top)),new U(Math.round(B.left+B.width),Math.round(B.height+B.top)),new U(Math.round(B.left),Math.round(B.height+B.top))]}},XQ="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",CB="Hidden Text",JQ=function(){function e(A){this._data={},this._document=A}return e.prototype.parseMetrics=function(A,r){var t=this._document.createElement("div"),B=this._document.createElement("img"),n=this._document.createElement("span"),s=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=r,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",s.appendChild(t),B.src=XQ,B.width=1,B.height=1,B.style.margin="0",B.style.padding="0",B.style.verticalAlign="baseline",n.style.fontFamily=A,n.style.fontSize=r,n.style.margin="0",n.style.padding="0",n.appendChild(this._document.createTextNode(CB)),t.appendChild(n),t.appendChild(B);var i=B.offsetTop-n.offsetTop+2;t.removeChild(n),t.appendChild(this._document.createTextNode(CB)),t.style.lineHeight="normal",B.style.verticalAlign="super";var a=B.offsetTop-t.offsetTop+2;return s.removeChild(t),{baseline:i,middle:a}},e.prototype.getMetrics=function(A,r){var t=A+" "+r;return typeof this._data[t]>"u"&&(this._data[t]=this.parseMetrics(A,r)),this._data[t]},e}(),pn=function(){function e(A,r){this.context=A,this.options=r}return e}(),_Q=1e4,kQ=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this;return B._activeEffects=[],B.canvas=t.canvas?t.canvas:document.createElement("canvas"),B.ctx=B.canvas.getContext("2d"),t.canvas||(B.canvas.width=Math.floor(t.width*t.scale),B.canvas.height=Math.floor(t.height*t.scale),B.canvas.style.width=t.width+"px",B.canvas.style.height=t.height+"px"),B.fontMetrics=new JQ(document),B.ctx.scale(B.options.scale,B.options.scale),B.ctx.translate(-t.x,-t.y),B.ctx.textBaseline="bottom",B._activeEffects=[],B.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),B}return A.prototype.applyEffects=function(r){for(var t=this;this._activeEffects.length;)this.popEffect();r.forEach(function(B){return t.applyEffect(B)})},A.prototype.applyEffect=function(r){this.ctx.save(),SQ(r)&&(this.ctx.globalAlpha=r.opacity),DQ(r)&&(this.ctx.translate(r.offsetX,r.offsetY),this.ctx.transform(r.matrix[0],r.matrix[1],r.matrix[2],r.matrix[3],r.matrix[4],r.matrix[5]),this.ctx.translate(-r.offsetX,-r.offsetY)),Un(r)&&(this.path(r.path),this.ctx.clip()),this._activeEffects.push(r)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(r){return W(this,void 0,void 0,function(){var t;return _(this,function(B){switch(B.label){case 0:return t=r.element.container.styles,t.isVisible()?[4,this.renderStackContent(r)]:[3,2];case 1:B.sent(),B.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(r){return W(this,void 0,void 0,function(){return _(this,function(t){switch(t.label){case 0:if(V(r.container.flags,16))debugger;return r.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(r)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(r)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(r,t,B){var n=this;if(t===0)this.ctx.fillText(r.text,r.bounds.left,r.bounds.top+B);else{var s=it(r.text);s.reduce(function(i,a){return n.ctx.fillText(a,i,r.bounds.top+B),i+n.ctx.measureText(a).width},r.bounds.left)}},A.prototype.createFontStyle=function(r){var t=r.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),B=zQ(r.fontFamily).join(", "),n=Ce(r.fontSize)?""+r.fontSize.number+r.fontSize.unit:r.fontSize.number+"px";return[[r.fontStyle,t,r.fontWeight,n,B].join(" "),B,n]},A.prototype.renderTextNode=function(r,t){return W(this,void 0,void 0,function(){var B,n,s,i,a,o,c,Q,g=this;return _(this,function(f){return B=this.createFontStyle(t),n=B[0],s=B[1],i=B[2],this.ctx.font=n,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(s,i),o=a.baseline,c=a.middle,Q=t.paintOrder,r.textBounds.forEach(function(u){Q.forEach(function(w){switch(w){case 0:g.ctx.fillStyle=N(t.color),g.renderTextWithLetterSpacing(u,t.letterSpacing,o);var d=t.textShadow;d.length&&u.text.trim().length&&(d.slice(0).reverse().forEach(function(l){g.ctx.shadowColor=N(l.color),g.ctx.shadowOffsetX=l.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=l.offsetY.number*g.options.scale,g.ctx.shadowBlur=l.blur.number,g.renderTextWithLetterSpacing(u,t.letterSpacing,o)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),t.textDecorationLine.length&&(g.ctx.fillStyle=N(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(l){switch(l){case 1:g.ctx.fillRect(u.bounds.left,Math.round(u.bounds.top+o),u.bounds.width,1);break;case 2:g.ctx.fillRect(u.bounds.left,Math.round(u.bounds.top),u.bounds.width,1);break;case 3:g.ctx.fillRect(u.bounds.left,Math.ceil(u.bounds.top+c),u.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&u.text.trim().length&&(g.ctx.strokeStyle=N(t.webkitTextStrokeColor),g.ctx.lineWidth=t.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(u.text,u.bounds.left,u.bounds.top+o)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(r,t,B){if(B&&r.intrinsicWidth>0&&r.intrinsicHeight>0){var n=rr(r),s=er(t);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(B,0,0,r.intrinsicWidth,r.intrinsicHeight,n.left,n.top,n.width,n.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(r){return W(this,void 0,void 0,function(){var t,B,n,s,i,a,C,C,o,c,Q,g,v,f,u,E,w,d,l,C,m,v,E;return _(this,function(F){switch(F.label){case 0:this.applyEffects(r.getEffects(4)),t=r.container,B=r.curves,n=t.styles,s=0,i=t.textNodes,F.label=1;case 1:return s<i.length?(a=i[s],[4,this.renderTextNode(a,n)]):[3,4];case 2:F.sent(),F.label=3;case 3:return s++,[3,1];case 4:if(!(t instanceof An))return[3,8];F.label=5;case 5:return F.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return C=F.sent(),this.renderReplacedElement(t,B,C),[3,8];case 7:return F.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof en&&this.renderReplacedElement(t,B,t.canvas),!(t instanceof rn))return[3,12];F.label=9;case 9:return F.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return C=F.sent(),this.renderReplacedElement(t,B,C),[3,12];case 11:return F.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof sn&&t.tree?(o=new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,o.render(t.tree)]):[3,14];case 13:c=F.sent(),t.width&&t.height&&this.ctx.drawImage(c,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),F.label=14;case 14:if(t instanceof ot&&(Q=Math.min(t.bounds.width,t.bounds.height),t.type===qe?t.checked&&(this.ctx.save(),this.path([new U(t.bounds.left+Q*.39363,t.bounds.top+Q*.79),new U(t.bounds.left+Q*.16,t.bounds.top+Q*.5549),new U(t.bounds.left+Q*.27347,t.bounds.top+Q*.44071),new U(t.bounds.left+Q*.39694,t.bounds.top+Q*.5649),new U(t.bounds.left+Q*.72983,t.bounds.top+Q*.23),new U(t.bounds.left+Q*.84,t.bounds.top+Q*.34085),new U(t.bounds.left+Q*.39363,t.bounds.top+Q*.79)]),this.ctx.fillStyle=N(BB),this.ctx.fill(),this.ctx.restore()):t.type===ze&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+Q/2,t.bounds.top+Q/2,Q/4,0,Math.PI*2,!0),this.ctx.fillStyle=N(BB),this.ctx.fill(),this.ctx.restore())),WQ(t)&&t.value.length){switch(g=this.createFontStyle(n),v=g[0],f=g[1],u=this.fontMetrics.getMetrics(v,f).baseline,this.ctx.font=v,this.ctx.fillStyle=N(n.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=ZQ(t.styles.textAlign),E=rr(t),w=0,t.styles.textAlign){case 1:w+=E.width/2;break;case 2:w+=E.width;break}d=E.add(w,0,0,-E.height/2+1),this.ctx.save(),this.path([new U(E.left,E.top),new U(E.left+E.width,E.top),new U(E.left+E.width,E.top+E.height),new U(E.left,E.top+E.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Qe(t.value,d),n.letterSpacing,u),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!V(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(l=t.styles.listStyleImage,l.type!==0)return[3,18];C=void 0,m=l.url,F.label=15;case 15:return F.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return C=F.sent(),this.ctx.drawImage(C,t.bounds.left-(C.width+10),t.bounds.top),[3,18];case 17:return F.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:r.listValue&&t.styles.listStyleType!==-1&&(v=this.createFontStyle(n)[0],this.ctx.font=v,this.ctx.fillStyle=N(n.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",E=new lA(t.bounds.left,t.bounds.top+x(t.styles.paddingTop,t.bounds.width),t.bounds.width,Nt(n.lineHeight,n.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Qe(r.listValue,E),n.letterSpacing,Nt(n.lineHeight,n.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),F.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(r){return W(this,void 0,void 0,function(){var t,B,l,n,s,l,i,a,l,o,c,l,Q,g,l,f,u,l,w,d,l;return _(this,function(C){switch(C.label){case 0:if(V(r.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(r.element)];case 1:C.sent(),t=0,B=r.negativeZIndex,C.label=2;case 2:return t<B.length?(l=B[t],[4,this.renderStack(l)]):[3,5];case 3:C.sent(),C.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(r.element)];case 6:C.sent(),n=0,s=r.nonInlineLevel,C.label=7;case 7:return n<s.length?(l=s[n],[4,this.renderNode(l)]):[3,10];case 8:C.sent(),C.label=9;case 9:return n++,[3,7];case 10:i=0,a=r.nonPositionedFloats,C.label=11;case 11:return i<a.length?(l=a[i],[4,this.renderStack(l)]):[3,14];case 12:C.sent(),C.label=13;case 13:return i++,[3,11];case 14:o=0,c=r.nonPositionedInlineLevel,C.label=15;case 15:return o<c.length?(l=c[o],[4,this.renderStack(l)]):[3,18];case 16:C.sent(),C.label=17;case 17:return o++,[3,15];case 18:Q=0,g=r.inlineLevel,C.label=19;case 19:return Q<g.length?(l=g[Q],[4,this.renderNode(l)]):[3,22];case 20:C.sent(),C.label=21;case 21:return Q++,[3,19];case 22:f=0,u=r.zeroOrAutoZIndexOrTransformedOrOpacity,C.label=23;case 23:return f<u.length?(l=u[f],[4,this.renderStack(l)]):[3,26];case 24:C.sent(),C.label=25;case 25:return f++,[3,23];case 26:w=0,d=r.positiveZIndex,C.label=27;case 27:return w<d.length?(l=d[w],[4,this.renderStack(l)]):[3,30];case 28:C.sent(),C.label=29;case 29:return w++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(r){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(r.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(r){this.ctx.beginPath(),this.formatPath(r),this.ctx.closePath()},A.prototype.formatPath=function(r){var t=this;r.forEach(function(B,n){var s=eA(B)?B.start:B;n===0?t.ctx.moveTo(s.x,s.y):t.ctx.lineTo(s.x,s.y),eA(B)&&t.ctx.bezierCurveTo(B.startControl.x,B.startControl.y,B.endControl.x,B.endControl.y,B.end.x,B.end.y)})},A.prototype.renderRepeat=function(r,t,B,n){this.path(r),this.ctx.fillStyle=t,this.ctx.translate(B,n),this.ctx.fill(),this.ctx.translate(-B,-n)},A.prototype.resizeImage=function(r,t,B){var n;if(r.width===t&&r.height===B)return r;var s=(n=this.canvas.ownerDocument)!==null&&n!==void 0?n:document,i=s.createElement("canvas");i.width=Math.max(1,t),i.height=Math.max(1,B);var a=i.getContext("2d");return a.drawImage(r,0,0,r.width,r.height,0,0,t,B),i},A.prototype.renderBackgroundImage=function(r){return W(this,void 0,void 0,function(){var t,B,n,s,i,a;return _(this,function(o){switch(o.label){case 0:t=r.styles.backgroundImage.length-1,B=function(c){var Q,g,f,G,Z,q,D,P,K,u,G,Z,q,D,P,w,d,l,C,m,v,E,F,y,K,p,G,Y,j,D,P,fA,Z,q,mA,sA,CA,yA,KA,cA,LA,QA;return _(this,function(OA){switch(OA.label){case 0:if(c.type!==0)return[3,5];Q=void 0,g=c.url,OA.label=1;case 1:return OA.trys.push([1,3,,4]),[4,n.context.cache.match(g)];case 2:return Q=OA.sent(),[3,4];case 3:return OA.sent(),n.context.logger.error("Error loading background-image "+g),[3,4];case 4:return Q&&(f=xr(r,t,[Q.width,Q.height,Q.width/Q.height]),G=f[0],Z=f[1],q=f[2],D=f[3],P=f[4],K=n.ctx.createPattern(n.resizeImage(Q,D,P),"repeat"),n.renderRepeat(G,K,Z,q)),[3,6];case 5:bi(c)?(u=xr(r,t,[null,null,null]),G=u[0],Z=u[1],q=u[2],D=u[3],P=u[4],w=Ii(c.angle,D,P),d=w[0],l=w[1],C=w[2],m=w[3],v=w[4],E=document.createElement("canvas"),E.width=D,E.height=P,F=E.getContext("2d"),y=F.createLinearGradient(l,m,C,v),Rt(c.stops,d).forEach(function(ZA){return y.addColorStop(ZA.stop,N(ZA.color))}),F.fillStyle=y,F.fillRect(0,0,D,P),D>0&&P>0&&(K=n.ctx.createPattern(E,"repeat"),n.renderRepeat(G,K,Z,q))):Di(c)&&(p=xr(r,t,[null,null,null]),G=p[0],Y=p[1],j=p[2],D=p[3],P=p[4],fA=c.position.length===0?[nt]:c.position,Z=x(fA[0],D),q=x(fA[fA.length-1],P),mA=mi(c,Z,q,D,P),sA=mA[0],CA=mA[1],sA>0&&CA>0&&(yA=n.ctx.createRadialGradient(Y+Z,j+q,0,Y+Z,j+q,sA),Rt(c.stops,sA*2).forEach(function(ZA){return yA.addColorStop(ZA.stop,N(ZA.color))}),n.path(G),n.ctx.fillStyle=yA,sA!==CA?(KA=r.bounds.left+.5*r.bounds.width,cA=r.bounds.top+.5*r.bounds.height,LA=CA/sA,QA=1/LA,n.ctx.save(),n.ctx.translate(KA,cA),n.ctx.transform(1,0,0,LA,0,0),n.ctx.translate(-KA,-cA),n.ctx.fillRect(Y,QA*(j-cA)+cA,D,P*QA),n.ctx.restore()):n.ctx.fill())),OA.label=6;case 6:return t--,[2]}})},n=this,s=0,i=r.styles.backgroundImage.slice(0).reverse(),o.label=1;case 1:return s<i.length?(a=i[s],[5,B(a)]):[3,4];case 2:o.sent(),o.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(r,t,B){return W(this,void 0,void 0,function(){return _(this,function(n){return this.path(fB(B,t)),this.ctx.fillStyle=N(r),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(r,t,B,n){return W(this,void 0,void 0,function(){var s,i;return _(this,function(a){switch(a.label){case 0:return t<3?[4,this.renderSolidBorder(r,B,n)]:[3,2];case 1:return a.sent(),[2];case 2:return s=OQ(n,B),this.path(s),this.ctx.fillStyle=N(r),this.ctx.fill(),i=MQ(n,B),this.path(i),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(r){return W(this,void 0,void 0,function(){var t,B,n,s,i,a,o,c,Q=this;return _(this,function(g){switch(g.label){case 0:return this.applyEffects(r.getEffects(2)),t=r.container.styles,B=!vA(t.backgroundColor)||t.backgroundImage.length,n=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],s=YQ(JA(t.backgroundClip,0),r.curves),B||t.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),vA(t.backgroundColor)||(this.ctx.fillStyle=N(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(r.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(f){Q.ctx.save();var u=Ar(r.curves),w=f.inset?0:_Q,d=xQ(u,-w+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(Q.path(u),Q.ctx.clip(),Q.mask(d)):(Q.mask(u),Q.ctx.clip(),Q.path(d)),Q.ctx.shadowOffsetX=f.offsetX.number+w,Q.ctx.shadowOffsetY=f.offsetY.number,Q.ctx.shadowColor=N(f.color),Q.ctx.shadowBlur=f.blur.number,Q.ctx.fillStyle=f.inset?N(f.color):"rgba(0,0,0,1)",Q.ctx.fill(),Q.ctx.restore()}),g.label=2;case 2:i=0,a=0,o=n,g.label=3;case 3:return a<o.length?(c=o[a],c.style!==0&&!vA(c.color)&&c.width>0?c.style!==2?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,i,r.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return c.style!==3?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,i,r.curves,3)];case 6:return g.sent(),[3,11];case 7:return c.style!==4?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,i,r.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,i,r.curves)];case 10:g.sent(),g.label=11;case 11:i++,g.label=12;case 12:return a++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(r,t,B,n,s){return W(this,void 0,void 0,function(){var i,a,o,c,Q,g,f,u,w,d,l,C,m,v,E,F,E,F;return _(this,function(y){return this.ctx.save(),i=GQ(n,B),a=fB(n,B),s===2&&(this.path(a),this.ctx.clip()),eA(a[0])?(o=a[0].start.x,c=a[0].start.y):(o=a[0].x,c=a[0].y),eA(a[1])?(Q=a[1].end.x,g=a[1].end.y):(Q=a[1].x,g=a[1].y),B===0||B===2?f=Math.abs(o-Q):f=Math.abs(c-g),this.ctx.beginPath(),s===3?this.formatPath(i):this.formatPath(a.slice(0,2)),u=t<3?t*3:t*2,w=t<3?t*2:t,s===3&&(u=t,w=t),d=!0,f<=u*2?d=!1:f<=u*2+w?(l=f/(2*u+w),u*=l,w*=l):(C=Math.floor((f+w)/(u+w)),m=(f-C*u)/(C-1),v=(f-(C+1)*u)/C,w=v<=0||Math.abs(w-m)<Math.abs(w-v)?m:v),d&&(s===3?this.ctx.setLineDash([0,u+w]):this.ctx.setLineDash([u,w])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=N(r),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(eA(a[0])&&(E=a[3],F=a[0],this.ctx.beginPath(),this.formatPath([new U(E.end.x,E.end.y),new U(F.start.x,F.start.y)]),this.ctx.stroke()),eA(a[1])&&(E=a[1],F=a[2],this.ctx.beginPath(),this.formatPath([new U(E.end.x,E.end.y),new U(F.start.x,F.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(r){return W(this,void 0,void 0,function(){var t;return _(this,function(B){switch(B.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=N(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=TQ(r),[4,this.renderStack(t)];case 1:return B.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(pn),WQ=function(e){return e instanceof nn||e instanceof Bn?!0:e instanceof ot&&e.type!==ze&&e.type!==qe},YQ=function(e,A){switch(e){case 0:return Ar(A);case 2:return KQ(A);case 1:default:return er(A)}},ZQ=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},qQ=["-apple-system","system-ui"],zQ=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(A){return qQ.indexOf(A)===-1}):e},jQ=function(e){nA(A,e);function A(r,t){var B=e.call(this,r,t)||this;return B.canvas=t.canvas?t.canvas:document.createElement("canvas"),B.ctx=B.canvas.getContext("2d"),B.options=t,B.canvas.width=Math.floor(t.width*t.scale),B.canvas.height=Math.floor(t.height*t.scale),B.canvas.style.width=t.width+"px",B.canvas.style.height=t.height+"px",B.ctx.scale(B.options.scale,B.options.scale),B.ctx.translate(-t.x,-t.y),B.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),B}return A.prototype.render=function(r){return W(this,void 0,void 0,function(){var t,B;return _(this,function(n){switch(n.label){case 0:return t=zr(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,r),[4,$Q(t)];case 1:return B=n.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=N(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(B,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(pn),$Q=function(e){return new Promise(function(A,r){var t=new Image;t.onload=function(){A(t)},t.onerror=r,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},Ag=function(){function e(A){var r=A.id,t=A.enabled;this.id=r,this.enabled=t,this.start=Date.now()}return e.prototype.debug=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ue([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ue([this.id,this.getTime()+"ms"],A))},e.prototype.warn=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ue([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.error=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ue([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.instances={},e}(),eg=function(){function e(A,r){var t;this.windowBounds=r,this.instanceName="#"+e.instanceCount++,this.logger=new Ag({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new dQ(this,A)}return e.instanceCount=1,e}(),rg=function(e,A){return A===void 0&&(A={}),tg(e,A)};typeof window<"u"&&Cn.setContext(window);var tg=function(e,A){return W(void 0,void 0,void 0,function(){var r,t,B,n,s,i,a,o,c,Q,g,f,u,w,d,l,C,m,v,E,y,F,y,K,p,G,Y,j,D,P,fA,Z,q,mA,sA,CA,yA,KA,cA,LA;return _(this,function(QA){switch(QA.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(r=e.ownerDocument,!r)throw new Error("Element is not attached to a Document");if(t=r.defaultView,!t)throw new Error("Document is not attached to a Window");return B={allowTaint:(K=A.allowTaint)!==null&&K!==void 0?K:!1,imageTimeout:(p=A.imageTimeout)!==null&&p!==void 0?p:15e3,proxy:A.proxy,useCORS:(G=A.useCORS)!==null&&G!==void 0?G:!1},n=Or({logging:(Y=A.logging)!==null&&Y!==void 0?Y:!0,cache:A.cache},B),s={windowWidth:(j=A.windowWidth)!==null&&j!==void 0?j:t.innerWidth,windowHeight:(D=A.windowHeight)!==null&&D!==void 0?D:t.innerHeight,scrollX:(P=A.scrollX)!==null&&P!==void 0?P:t.pageXOffset,scrollY:(fA=A.scrollY)!==null&&fA!==void 0?fA:t.pageYOffset},i=new lA(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),a=new eg(n,i),o=(Z=A.foreignObjectRendering)!==null&&Z!==void 0?Z:!1,c={allowTaint:(q=A.allowTaint)!==null&&q!==void 0?q:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:o,copyStyles:o},a.logger.debug("Starting document clone with size "+i.width+"x"+i.height+" scrolled to "+-i.left+","+-i.top),Q=new wB(a,e,c),g=Q.clonedReferenceElement,g?[4,Q.toIFrame(r,i)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=QA.sent(),u=ct(g)||BQ(g)?Ss(g.ownerDocument):tr(a,g),w=u.width,d=u.height,l=u.left,C=u.top,m=Bg(a,g,A.backgroundColor),v={canvas:A.canvas,backgroundColor:m,scale:(sA=(mA=A.scale)!==null&&mA!==void 0?mA:t.devicePixelRatio)!==null&&sA!==void 0?sA:1,x:((CA=A.x)!==null&&CA!==void 0?CA:0)+l,y:((yA=A.y)!==null&&yA!==void 0?yA:0)+C,width:(KA=A.width)!==null&&KA!==void 0?KA:Math.ceil(w),height:(cA=A.height)!==null&&cA!==void 0?cA:Math.ceil(d)},o?(a.logger.debug("Document cloned, using foreign object rendering"),y=new jQ(a,v),[4,y.render(g)]):[3,3];case 2:return E=QA.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+l+","+C+" with size "+w+"x"+d+" using computed rendering"),a.logger.debug("Starting DOM parsing"),F=on(a,g),m===F.styles.backgroundColor&&(F.styles.backgroundColor=uA.TRANSPARENT),a.logger.debug("Starting renderer for element at "+v.x+","+v.y+" with size "+v.width+"x"+v.height),y=new kQ(a,v),[4,y.render(F)];case 4:E=QA.sent(),QA.label=5;case 5:return(!((LA=A.removeContainer)!==null&&LA!==void 0)||LA)&&(wB.destroy(f)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,E]}})})},Bg=function(e,A,r){var t=A.ownerDocument,B=t.documentElement?oe(e,getComputedStyle(t.documentElement).backgroundColor):uA.TRANSPARENT,n=t.body?oe(e,getComputedStyle(t.body).backgroundColor):uA.TRANSPARENT,s=typeof r=="string"?oe(e,r):r===null?uA.TRANSPARENT:4294967295;return A===t.documentElement?vA(B)?vA(n)?s:n:B:s};const ng=e=>FB.post("/edu-app/musicSheetCategories/page",{data:e}),sg=e=>FB.post("/edu-app/musicSheet/page",{data:e}),Qg=UB({name:"co-ai",setup(){var f;const e=Ne({page:1,rows:999,subjectId:((f=Tn.user.data)==null?void 0:f.subjectId)||""}),A=Ne({page:1,rows:20,status:1,keyword:"",musicSheetCategoriesId:""}),r=Ne({typeIndex:0,musicIndex:0,isShowJianpu:!1,types:[],musics:[],loading:!0,finshed:!1,searchNoticeShow:!1,searchNotice:{left:"",top:"",width:"",height:""}}),t=ke(),B=()=>{Ct({api:"goBack"})},n=()=>{var w;let u=`${location.origin}/instrument?id=${(w=r.musics[r.musicIndex])==null?void 0:w.id}`;console.log(u),Ct({api:"openAccompanyWebView",content:{url:u,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0,c_orientation:0}})},s=async()=>{Nn({message:"正在保存",duration:0});try{rg(t.value,{backgroundColor:"#fff",allowTaint:!0,useCORS:!0}).then(async u=>{var w=u.toDataURL("image/png",1);setTimeout(()=>{wr("保存成功")},500);const d=await Pn({api:"savePicture",content:{base64:w}})}).catch(()=>{setTimeout(()=>{wr("保存失败")},500)})}catch(u){setTimeout(()=>{wr("保存失败")},500)}},i=async()=>{var u;try{const w=await ng({...e});w.code===200&&Array.isArray((u=w==null?void 0:w.data)==null?void 0:u.rows)&&(r.types=w.data.rows,!A.musicSheetCategoriesId&&r.types.length>0&&(A.musicSheetCategoriesId=r.types[0].id))}catch(w){console.log("🚀 ~ error:",w)}},a=async()=>{var u;r.loading=!0;try{const w=await sg({...A});w.code===200&&Array.isArray((u=w==null?void 0:w.data)==null?void 0:u.rows)&&(r.musics=[...r.musics,...w.data.rows],r.finshed=!w.data.next)}catch(w){console.log("🚀 ~ error:",w)}r.loading=!1},o=()=>{A.page=1,r.musics=[],a()},c=ke(),Q=()=>{r.loading||r.finshed||(A.page=A.page+1,a())},g=()=>{const u=document.querySelector(".searchNotice .van-field__control");if(u){const w=u.getBoundingClientRect();r.searchNotice.left=w.x+"px",r.searchNotice.top=w.y+"px",r.searchNotice.width=w.width+"px",r.searchNotice.height=w.height+"px"}};return On(async()=>{await i(),a();const u=new IntersectionObserver(w=>{w[0].intersectionRatio>0&&Q()});Mn(()=>{u.observe(c.value)}),Gn("webViewOnResume",()=>{o()}),g()}),()=>{var u;return H("div",{class:L.container},[H("div",{class:L.back,onClick:B},[H("img",{src:ms},null)]),H("div",{class:L.content},[H("div",{class:[L.leftContent]},[H("div",{class:L.leftBg2},null),H("div",{class:L.leftBg},null),H("div",{class:L.types},[r.types.map((w,d)=>H("div",{class:[L.type,A.musicSheetCategoriesId===w.id&&L.typeActive],onClick:()=>{A.musicSheetCategoriesId=w.id,o()}},[H("div",{class:L.typeImg},[H("img",{class:L.typeIcon,src:w.coverImg,onLoad:l=>{l.target.setAttribute("loaded","true")}},null)])]))]),H("div",{class:L.center},[H(Xn,{class:["searchNotice",r.searchNoticeShow?L.searchNoticeShow:""],shape:"round",background:"transparent",clearable:!1,placeholder:"请输入关键字",onFocus:()=>r.searchNoticeShow=!1,onBlur:w=>{A.keyword=w,requestAnimationFrame(()=>{requestAnimationFrame(()=>{r.searchNoticeShow=!0})})},onSearch:w=>{A.keyword=w,o()}},null),H("div",{class:L.musicContent},[r.musics.map((w,d)=>H("div",{class:[L.musicItem,r.musicIndex===d?L.musicActive:L.disableNotic],onClick:()=>r.musicIndex=d},[H("img",{class:L.musicAvtor,src:w.titleImg,onLoad:l=>{l.target.setAttribute("loaded","true")}},null),H("div",{class:L.musicInfo},[H("div",{class:L.musicName},[H(Ut,{text:w.musicSheetName,class:L.noticeBar,background:"none"},null)]),H("div",{class:L.musicDes},[H("div",{class:L.musicFavitor},[w.usedNum]),H("div",{class:[L.musicAuthor,"van-ellipsis"]},[w.composer])])])])),!r.finshed&&H("div",{ref:c,class:L.loadingWrap},[H(Rn,{color:"#259CFE"},null)]),!r.loading&&r.musics.length===0&&H("div",{class:L.empty},[H(Vn,{description:"暂无曲谱"},null)])])])]),H("div",{class:[L.opacityBg,L.right]},[H("div",{ref:t},[H("div",{class:L["right-musicName"]},[(u=r.musics[r.musicIndex])==null?void 0:u.musicSheetName]),r.isShowJianpu?H(lt,null,[H(ft,{name:"van-fade"},{default:()=>{var w,d;return[(d=(w=r.musics[r.musicIndex])==null?void 0:w.firstTone)==null?void 0:d.split(",").map((l,C)=>H("img",{class:L.staff,src:l+"?v="+Date.now(),key:l},null))]}})]):H(lt,null,[H(ft,{name:"van-fade"},{default:()=>{var w,d;return[(d=(w=r.musics[r.musicIndex])==null?void 0:w.musicImg)==null?void 0:d.split(",").map((l,C)=>H("img",{class:L.staff,src:l+"?v="+Date.now(),key:l,crossorigin:"anonymous"},null))]}})])]),H("div",{class:L.rightBtns},[H("img",{src:r.isShowJianpu?Ls:Ks,onClick:()=>r.isShowJianpu=!r.isShowJianpu},null),H("img",{src:ys,onClick:s},null),H("img",{src:Ds.icon_start,onClick:()=>n()},null)])])]),r.searchNotice.width&&r.searchNoticeShow&&H("div",{class:L.searchNotice,style:{...r.searchNotice}},[H(Ut,{text:A.keyword,color:"#333",background:"none"},null)])])}}});export{Qg as default};
