Download assets/renderers-CAT2F87m.js from theforecastingcompany/t0-alpha-playground: direct link, hf CLI and curl.
- Browser
- Download file 34 kB
-
https://huggingface.co/spaces/theforecastingcompany/t0-alpha-playground/resolve/main/assets/renderers-CAT2F87m.js
- Command line
-
hf download hf://spaces/theforecastingcompany/t0-alpha-playground/assets/renderers-CAT2F87m.js
-
curl -L -o renderers-CAT2F87m.js https://huggingface.co/spaces/theforecastingcompany/t0-alpha-playground/resolve/main/assets/renderers-CAT2F87m.js
34 kB
| import{bn as D,a as _i,bo as K,bp as ji,bq as Wt,q as V,X as B,e as qi,C as Xi,g as Vt,p as $,br as Ki,aN as Ji,h as J,bs as gi,i as Wi,I as Qi,bt as yi,J as $i,b5 as tr,L as ir,aR as rr,bu as ct,bv as er,bw as ar,bx as nr,by as sr,bz as or,bA as fr,bB as ur,bC as hr,bD as vr,E as M,bE as dr,bF as cr,W as Qt,bG as lr,c as pr,bH as _r,bI as mi,bJ as Bt,bK as gr,n as yr,bL as mr,bM as xr,l as br,o as Dt,bN as Y,bO as Lr,a0 as wr,bP as xi,_ as Ir,bQ as vt,bR as bi,B as ot,bS as At,aQ as Sr,bT as Li,as as Ct,bU as Tr,bV as Rr,bW as Ar,bX as Cr,bY as ft,bZ as mt,w as Pr,b_ as Nr,v as kr,r as xt,b$ as Er,a1 as Vr,c0 as Br,c1 as Dr}from"./graphic-DeMuFa6Q.js";var bt=Math.sin,Lt=Math.cos,wi=Math.PI,O=Math.PI*2,Mr=180/wi,Ii=(function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,i){this._add("M",t,i)},r.prototype.lineTo=function(t,i){this._add("L",t,i)},r.prototype.bezierCurveTo=function(t,i,e,a,n,s){this._add("C",t,i,e,a,n,s)},r.prototype.quadraticCurveTo=function(t,i,e,a){this._add("Q",t,i,e,a)},r.prototype.arc=function(t,i,e,a,n,s){this.ellipse(t,i,e,e,0,a,n,s)},r.prototype.ellipse=function(t,i,e,a,n,s,f,o){var u=f-s,h=!o,v=Math.abs(u),d=D(v-O)||(h?u>=O:-u>=O),c=u>0?u%O:u%O+O,p=!1;d?p=!0:D(v)?p=!1:p=c>=wi==!!h;var l=t+e*Lt(s),g=i+a*bt(s);this._start&&this._add("M",l,g);var y=Math.round(n*Mr);if(d){var x=1/this._p,m=(h?1:-1)*(O-x);this._add("A",e,a,y,1,+h,t+e*Lt(s+m),i+a*bt(s+m)),x>.01&&this._add("A",e,a,y,0,+h,l,g)}else{var _=t+e*Lt(f),I=i+a*bt(f);this._add("A",e,a,y,+p,+h,_,I)}},r.prototype.rect=function(t,i,e,a){this._add("M",t,i),this._add("l",e,0),this._add("l",0,a),this._add("l",-e,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,i,e,a,n,s,f,o,u){for(var h=[],v=this._p,d=1;d<arguments.length;d++){var c=arguments[d];if(isNaN(c)){this._invalid=!0;return}h.push(Math.round(c*v)/v)}this._d.push(t+h.join(" ")),this._start=t==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r})(),Mt="none",Or=Math.round;function Hr(r){var t=r.fill;return t!=null&&t!==Mt}function Ur(r){var t=r.stroke;return t!=null&&t!==Mt}var Pt=["lineCap","miterLimit","lineJoin"],Gr=V(Pt,function(r){return"stroke-"+r.toLowerCase()});function Fr(r,t,i,e){var a=t.opacity==null?1:t.opacity;if(i instanceof _i){r("opacity",a);return}if(Hr(t)){var n=K(t.fill);r("fill",n.color);var s=t.fillOpacity!=null?t.fillOpacity*n.opacity*a:n.opacity*a;s<1&&r("fill-opacity",s)}else r("fill",Mt);if(Ur(t)){var f=K(t.stroke);r("stroke",f.color);var o=t.strokeNoScale?i.getLineScale():1,u=o?(t.lineWidth||0)/o:0,h=t.strokeOpacity!=null?t.strokeOpacity*f.opacity*a:f.opacity*a,v=t.strokeFirst;if(u!==1&&r("stroke-width",u),v&&r("paint-order",v?"stroke":"fill"),h<1&&r("stroke-opacity",h),t.lineDash){var d=ji(i),c=d[0],p=d[1];c&&(p=Or(p||0),r("stroke-dasharray",c.join(",")),(p||e)&&r("stroke-dashoffset",p))}for(var l=0;l<Pt.length;l++){var g=Pt[l];if(t[g]!==Wt[g]){var y=t[g]||Wt[g];y&&r(Gr[l],y)}}}}var Si="http://www.w3.org/2000/svg",Ti="http://www.w3.org/1999/xlink",zr="http://www.w3.org/2000/xmlns/",Yr="http://www.w3.org/XML/1998/namespace",$t="ecmeta_";function Ri(r){return document.createElementNS(Si,r)}function S(r,t,i,e,a){return{tag:r,attrs:i||{},children:e,text:a,key:t}}function Zr(r,t){var i=[];if(t)for(var e in t){var a=t[e],n=e;a!==!1&&(a!==!0&&a!=null&&(n+='="'+a+'"'),i.push(n))}return"<"+r+" "+i.join(" ")+">"}function jr(r){return"</"+r+">"}function Ot(r,t){t=t||{};var i=t.newline?` | |
| `:"";function e(a){var n=a.children,s=a.tag,f=a.attrs,o=a.text;return Zr(s,f)+(s!=="style"?qi(o):o||"")+(n?""+i+V(n,function(u){return e(u)}).join(i)+i:"")+jr(s)}return e(r)}function qr(r,t,i){i=i||{};var e=i.newline?` | |
| `:"",a=" {"+e,n=e+"}",s=V(B(r),function(o){return o+a+V(B(r[o]),function(u){return u+":"+r[o][u]+";"}).join(e)+n}).join(e),f=V(B(t),function(o){return"@keyframes "+o+a+V(B(t[o]),function(u){return u+a+V(B(t[o][u]),function(h){var v=t[o][u][h];return h==="d"&&(v='path("'+v+'")'),h+":"+v+";"}).join(e)+n}).join(e)+n}).join(e);return!s&&!f?"":["<![CDATA[",s,f,"]]>"].join(e)}function Nt(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ti(r,t,i,e){return S("svg","root",{width:r,height:t,xmlns:Si,"xmlns:xlink":Ti,version:"1.1",baseProfile:"full",viewBox:e?"0 0 "+r+" "+t:!1},i)}var Xr=0;function Ai(){return Xr++}var ii={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},U="transform-origin";function Kr(r,t,i){var e=J({},r.shape);J(e,t),r.buildPath(i,e);var a=new Ii;return a.reset(yi(r)),i.rebuildPath(a,1),a.generateStr(),a.getStr()}function Jr(r,t){var i=t.originX,e=t.originY;(i||e)&&(r[U]=i+"px "+e+"px")}var Wr={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Ci(r,t){var i=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[i]=r,i}function Qr(r,t,i){var e=r.shape.paths,a={},n,s;if(Vt(e,function(o){var u=Nt(i.zrId);u.animation=!0,lt(o,{},u,!0);var h=u.cssAnims,v=u.cssNodes,d=B(h),c=d.length;if(c){s=d[c-1];var p=h[s];for(var l in p){var g=p[l];a[l]=a[l]||{d:""},a[l].d+=g.d||""}for(var y in v){var x=v[y].animation;x.indexOf(s)>=0&&(n=x)}}}),!!n){t.d=!1;var f=Ci(a,i);return n.replace(s,f)}}function ri(r){return $(r)?ii[r]?"cubic-bezier("+ii[r]+")":Ki(r)?r:"":""}function lt(r,t,i,e){var a=r.animators,n=a.length,s=[];if(r instanceof Xi){var f=Qr(r,t,i);if(f)s.push(f);else if(!n)return}else if(!n)return;for(var o={},u=0;u<n;u++){var h=a[u],v=[h.getMaxTime()/1e3+"s"],d=ri(h.getClip().easing),c=h.getDelay();d?v.push(d):v.push("linear"),c&&v.push(c/1e3+"s"),h.getLoop()&&v.push("infinite");var p=v.join(" ");o[p]=o[p]||[p,[]],o[p][1].push(h)}function l(x){var m=x[1],_=m.length,I={},A={},L={},P="animation-timing-function";function T(it,rt,qt){for(var et=it.getTracks(),Zi=it.getMaxTime(),_t=0;_t<et.length;_t++){var gt=et[_t];if(gt.needsAnimate()){var Xt=gt.keyframes,at=gt.propName;if(qt&&(at=qt(at)),at)for(var yt=0;yt<Xt.length;yt++){var nt=Xt[yt],st=Math.round(nt.time/Zi*100)+"%",Kt=ri(nt.easing),Jt=nt.rawValue;($(Jt)||Qi(Jt))&&(rt[st]=rt[st]||{},rt[st][at]=nt.rawValue,Kt&&(rt[st][P]=Kt))}}}}for(var b=0;b<_;b++){var C=m[b],k=C.targetName;k?k==="shape"&&T(C,A):!e&&T(C,I)}for(var w in I){var N={};Ji(N,r),J(N,I[w]);var Z=gi(N),j=I[w][P];L[w]=Z?{transform:Z}:{},Jr(L[w],N),j&&(L[w][P]=j)}var F,zt=!0;for(var w in A){L[w]=L[w]||{};var Yt=!F,j=A[w][P];Yt&&(F=new $i);var Gi=F.len();F.reset(),L[w].d=Kr(r,A[w],F);var Fi=F.len();if(!Yt&&Gi!==Fi){zt=!1;break}j&&(L[w][P]=j)}if(!zt)for(var w in L)delete L[w].d;if(!e)for(var b=0;b<_;b++){var C=m[b],k=C.targetName;k==="style"&&T(C,L,function(et){return Wr[et]})}for(var tt=B(L),Zt=!0,pt,b=1;b<tt.length;b++){var jt=tt[b-1],zi=tt[b];if(L[jt][U]!==L[zi][U]){Zt=!1;break}pt=L[jt][U]}if(Zt&&pt){for(var w in L)L[w][U]&&delete L[w][U];t[U]=pt}if(Wi(tt,function(it){return B(L[it]).length>0}).length){var Yi=Ci(L,i);return Yi+" "+x[0]+" both"}}for(var g in o){var f=l(o[g]);f&&s.push(f)}if(s.length){var y=i.zrId+"-cls-"+Ai();i.cssNodes["."+y]={animation:s.join(",")},t.class=y}}function $r(r,t,i){if(!r.ignore)if(r.isSilent()){var e={"pointer-events":"none"};ei(e,t,i)}else{var a=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},n=a.fill;if(!n){var s=r.style&&r.style.fill,f=r.states.select&&r.states.select.style&&r.states.select.style.fill,o=r.currentStates.indexOf("select")>=0&&f||s;o&&(n=tr(o))}var u=a.lineWidth;if(u){var h=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/h}var e={cursor:"pointer"};n&&(e.fill=n),a.stroke&&(e.stroke=a.stroke),u&&(e["stroke-width"]=u),ei(e,t,i)}}function ei(r,t,i,e){var a=JSON.stringify(r),n=i.cssStyleCache[a];n||(n=i.zrId+"-cls-"+Ai(),i.cssStyleCache[a]=n,i.cssNodes["."+n+":hover"]=r),t.class=t.class?t.class+" "+n:n}var W=Math.round;function Pi(r){return r&&$(r.src)}function Ni(r){return r&&yr(r.toDataURL)}function Ht(r,t,i,e){Fr(function(a,n){var s=a==="fill"||a==="stroke";s&&mi(n)?Ei(t,r,a,e):s&&Bt(n)?Vi(i,r,a,e):r[a]=n,s&&e.ssr&&n==="none"&&(r["pointer-events"]="visible")},t,i,!1),se(i,r,e)}function Ut(r,t){var i=gr(t);i&&(i.each(function(e,a){e!=null&&(r[($t+a).toLowerCase()]=e+"")}),t.isSilent()&&(r[$t+"silent"]="true"))}function ai(r){return D(r[0]-1)&&D(r[1])&&D(r[2])&&D(r[3]-1)}function te(r){return D(r[4])&&D(r[5])}function Gt(r,t,i){if(t&&!(te(t)&&ai(t))){var e=1e4;r.transform=ai(t)?"translate("+W(t[4]*e)/e+" "+W(t[5]*e)/e+")":_r(t)}}function ni(r,t,i){for(var e=r.points,a=[],n=0;n<e.length;n++)a.push(W(e[n][0]*i)/i),a.push(W(e[n][1]*i)/i);t.points=a.join(" ")}function si(r){return!r.smooth}function ie(r){var t=V(r,function(i){return typeof i=="string"?[i,i]:i});return function(i,e,a){for(var n=0;n<t.length;n++){var s=t[n],f=i[s[0]];f!=null&&(e[s[1]]=W(f*a)/a)}}}var re={circle:[ie(["cx","cy","r"])],polyline:[ni,si],polygon:[ni,si]};function ee(r){for(var t=r.animators,i=0;i<t.length;i++)if(t[i].targetName==="shape")return!0;return!1}function ki(r,t){var i=r.style,e=r.shape,a=re[r.type],n={},s=t.animation,f="path",o=r.style.strokePercent,u=t.compress&&yi(r)||4;if(a&&!t.willUpdate&&!(a[1]&&!a[1](e))&&!(s&&ee(r))&&!(o<1)){f=r.type;var h=Math.pow(10,u);a[0](e,n,h)}else{var v=!r.path||r.shapeChanged();r.path||r.createPathProxy();var d=r.path;v&&(d.beginPath(),r.buildPath(d,r.shape),r.pathUpdated());var c=d.getVersion(),p=r,l=p.__svgPathBuilder;(p.__svgPathVersion!==c||!l||o!==p.__svgPathStrokePercent)&&(l||(l=p.__svgPathBuilder=new Ii),l.reset(u),d.rebuildPath(l,o),l.generateStr(),p.__svgPathVersion=c,p.__svgPathStrokePercent=o),n.d=l.getStr()}return Gt(n,r.transform),Ht(n,i,r,t),Ut(n,r),t.animation&<(r,n,t),t.emphasis&&$r(r,n,t),S(f,r.id+"",n)}function ae(r,t){var i=r.style,e=i.image;if(e&&!$(e)&&(Pi(e)?e=e.src:Ni(e)&&(e=e.toDataURL())),!!e){var a=i.x||0,n=i.y||0,s=i.width,f=i.height,o={href:e,width:s,height:f};return a&&(o.x=a),n&&(o.y=n),Gt(o,r.transform),Ht(o,i,r,t),Ut(o,r),t.animation&<(r,o,t),S("image",r.id+"",o)}}function ne(r,t){var i=r.style,e=i.text;if(e!=null&&(e+=""),!(!e||isNaN(i.x)||isNaN(i.y))){var a=i.font||er,n=i.x||0,s=ar(i.y||0,nr(a),i.textBaseline),f=sr[i.textAlign]||i.textAlign,o={"dominant-baseline":"central","text-anchor":f};if(or(i)){var u="",h=i.fontStyle,v=fr(i.fontSize);if(!parseFloat(v))return;var d=i.fontFamily||ur,c=i.fontWeight;u+="font-size:"+v+";font-family:"+d+";",h&&h!=="normal"&&(u+="font-style:"+h+";"),c&&c!=="normal"&&(u+="font-weight:"+c+";"),o.style=u}else o.style="font: "+a;return e.match(/\s/)&&(o["xml:space"]="preserve"),n&&(o.x=n),s&&(o.y=s),Gt(o,r.transform),Ht(o,i,r,t),Ut(o,r),t.animation&<(r,o,t),S("text",r.id+"",o,void 0,e)}}function oi(r,t){if(r instanceof ir)return ki(r,t);if(r instanceof _i)return ae(r,t);if(r instanceof rr)return ne(r,t)}function se(r,t,i){var e=r.style;if(mr(e)){var a=xr(r),n=i.shadowCache,s=n[a];if(!s){var f=r.getGlobalScale(),o=f[0],u=f[1];if(!o||!u)return;var h=e.shadowOffsetX||0,v=e.shadowOffsetY||0,d=e.shadowBlur,c=K(e.shadowColor),p=c.opacity,l=c.color,g=d/2/o,y=d/2/u,x=g+" "+y;s=i.zrId+"-s"+i.shadowIdx++,i.defs[s]=S("filter",s,{id:s,x:"-100%",y:"-100%",width:"300%",height:"300%"},[S("feDropShadow","",{dx:h/o,dy:v/u,stdDeviation:x,"flood-color":l,"flood-opacity":p})]),n[a]=s}t.filter=ct(s)}}function Ei(r,t,i,e){var a=r[i],n,s={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(hr(a))n="linearGradient",s.x1=a.x,s.y1=a.y,s.x2=a.x2,s.y2=a.y2;else if(vr(a))n="radialGradient",s.cx=M(a.x,.5),s.cy=M(a.y,.5),s.r=M(a.r,.5);else return;for(var f=a.colorStops,o=[],u=0,h=f.length;u<h;++u){var v=dr(f[u].offset)*100+"%",d=f[u].color,c=K(d),p=c.color,l=c.opacity,g={offset:v};g["stop-color"]=p,l<1&&(g["stop-opacity"]=l),o.push(S("stop",u+"",g))}var y=S(n,"",s,o),x=Ot(y),m=e.gradientCache,_=m[x];_||(_=e.zrId+"-g"+e.gradientIdx++,m[x]=_,s.id=_,e.defs[_]=S(n,_,s,o)),t[i]=ct(_)}function Vi(r,t,i,e){var a=r.style[i],n=r.getBoundingRect(),s={},f=a.repeat,o=f==="no-repeat",u=f==="repeat-x",h=f==="repeat-y",v;if(cr(a)){var d=a.imageWidth,c=a.imageHeight,p=void 0,l=a.image;if($(l)?p=l:Pi(l)?p=l.src:Ni(l)&&(p=l.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Qt(d,g),Qt(c,g)}else if(d==null||c==null){var y=function(b,C){if(b){var k=b.elm,w=d||C.width,N=c||C.height;b.tag==="pattern"&&(u?(N=1,w/=n.width):h&&(w=1,N/=n.height)),b.attrs.width=w,b.attrs.height=N,k&&(k.setAttribute("width",w),k.setAttribute("height",N))}},x=lr(p,null,r,function(b){o||y(A,b),y(v,b)});x&&x.width&&x.height&&(d=d||x.width,c=c||x.height)}v=S("image","img",{href:p,width:d,height:c}),s.width=d,s.height=c}else a.svgElement&&(v=pr(a.svgElement),s.width=a.svgWidth,s.height=a.svgHeight);if(v){var m,_;o?m=_=1:u?(_=1,m=s.width/n.width):h?(m=1,_=s.height/n.height):s.patternUnits="userSpaceOnUse",m!=null&&!isNaN(m)&&(s.width=m),_!=null&&!isNaN(_)&&(s.height=_);var I=gi(a);I&&(s.patternTransform=I);var A=S("pattern","",s,[v]),L=Ot(A),P=e.patternCache,T=P[L];T||(T=e.zrId+"-p"+e.patternIdx++,P[L]=T,s.id=T,A=e.defs[T]=S("pattern",T,s,[v])),t[i]=ct(T)}}function oe(r,t,i){var e=i.clipPathCache,a=i.defs,n=e[r.id];if(!n){n=i.zrId+"-c"+i.clipPathIdx++;var s={id:n};e[r.id]=n,a[n]=S("clipPath",n,s,[ki(r,i)])}t["clip-path"]=ct(n)}function fi(r){return document.createTextNode(r)}function G(r,t,i){r.insertBefore(t,i)}function ui(r,t){r.removeChild(t)}function hi(r,t){r.appendChild(t)}function Bi(r){return r.parentNode}function Di(r){return r.nextSibling}function wt(r,t){r.textContent=t}var vi=58,fe=120,ue=S("","");function kt(r){return r===void 0}function E(r){return r!==void 0}function he(r,t,i){for(var e={},a=t;a<=i;++a){var n=r[a].key;n!==void 0&&(e[n]=a)}return e}function q(r,t){var i=r.key===t.key,e=r.tag===t.tag;return e&&i}function Q(r){var t,i=r.children,e=r.tag;if(E(e)){var a=r.elm=Ri(e);if(Ft(ue,r),br(i))for(t=0;t<i.length;++t){var n=i[t];n!=null&&hi(a,Q(n))}else E(r.text)&&!Dt(r.text)&&hi(a,fi(r.text))}else r.elm=fi(r.text);return r.elm}function Mi(r,t,i,e,a){for(;e<=a;++e){var n=i[e];n!=null&&G(r,Q(n),t)}}function dt(r,t,i,e){for(;i<=e;++i){var a=t[i];if(a!=null)if(E(a.tag)){var n=Bi(a.elm);ui(n,a.elm)}else ui(r,a.elm)}}function Ft(r,t){var i,e=t.elm,a=r&&r.attrs||{},n=t.attrs||{};if(a!==n){for(i in n){var s=n[i],f=a[i];f!==s&&(s===!0?e.setAttribute(i,""):s===!1?e.removeAttribute(i):i==="style"?e.style.cssText=s:i.charCodeAt(0)!==fe?e.setAttribute(i,s):i==="xmlns:xlink"||i==="xmlns"?e.setAttributeNS(zr,i,s):i.charCodeAt(3)===vi?e.setAttributeNS(Yr,i,s):i.charCodeAt(5)===vi?e.setAttributeNS(Ti,i,s):e.setAttribute(i,s))}for(i in a)i in n||e.removeAttribute(i)}}function ve(r,t,i){for(var e=0,a=0,n=t.length-1,s=t[0],f=t[n],o=i.length-1,u=i[0],h=i[o],v,d,c,p;e<=n&&a<=o;)s==null?s=t[++e]:f==null?f=t[--n]:u==null?u=i[++a]:h==null?h=i[--o]:q(s,u)?(z(s,u),s=t[++e],u=i[++a]):q(f,h)?(z(f,h),f=t[--n],h=i[--o]):q(s,h)?(z(s,h),G(r,s.elm,Di(f.elm)),s=t[++e],h=i[--o]):q(f,u)?(z(f,u),G(r,f.elm,s.elm),f=t[--n],u=i[++a]):(kt(v)&&(v=he(t,e,n)),d=v[u.key],kt(d)?G(r,Q(u),s.elm):(c=t[d],c.tag!==u.tag?G(r,Q(u),s.elm):(z(c,u),t[d]=void 0,G(r,c.elm,s.elm))),u=i[++a]);(e<=n||a<=o)&&(e>n?(p=i[o+1]==null?null:i[o+1].elm,Mi(r,p,i,a,o)):dt(r,t,e,n))}function z(r,t){var i=t.elm=r.elm,e=r.children,a=t.children;r!==t&&(Ft(r,t),kt(t.text)?E(e)&&E(a)?e!==a&&ve(i,e,a):E(a)?(E(r.text)&&wt(i,""),Mi(i,null,a,0,a.length-1)):E(e)?dt(i,e,0,e.length-1):E(r.text)&&wt(i,""):r.text!==t.text&&(E(e)&&dt(i,e,0,e.length-1),wt(i,t.text)))}function de(r,t){if(q(r,t))z(r,t);else{var i=r.elm,e=Bi(i);Q(t),e!==null&&(G(e,t.elm,Di(i)),dt(e,[r],0,0))}return t}var ce=0,le=(function(){function r(t,i,e){if(this.type="svg",this.configLayer=pe(),this.storage=i,this._opts=e=J({},e),this.root=t,this._id="zr"+ce++,this._oldVNode=ti(e.width,e.height),t&&!e.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=Ri("svg");Ft(null,this._oldVNode),a.appendChild(n),t.appendChild(a)}this.resize(e.width,e.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",de(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return oi(t,Nt(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var i=this.storage.getDisplayList(!0),e=this._width,a=this._height,n=Nt(this._id);n.animation=t.animation,n.willUpdate=t.willUpdate,n.compress=t.compress,n.emphasis=t.emphasis,n.ssr=this._opts.ssr;var s=[],f=this._bgVNode=_e(e,a,this._backgroundColor,n);f&&s.push(f);var o=t.compress?null:this._mainVNode=S("g","main",{},[]);this._paintList(i,n,o?o.children:s),o&&s.push(o);var u=V(B(n.defs),function(d){return n.defs[d]});if(u.length&&s.push(S("defs","defs",{},u)),t.animation){var h=qr(n.cssNodes,n.cssAnims,{newline:!0});if(h){var v=S("style","stl",{},[],h);s.push(v)}}return ti(e,a,s,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},Ot(this.renderToVNode({animation:M(t.cssAnimation,!0),emphasis:M(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:M(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,i,e){for(var a=t.length,n=[],s=0,f,o,u=0,h=0;h<a;h++){var v=t[h];if(!v.invisible){var d=v.__clipPaths,c=d&&d.length||0,p=o&&o.length||0,l=void 0;for(l=Math.max(c-1,p-1);l>=0&&!(d&&o&&d[l]===o[l]);l--);for(var g=p-1;g>l;g--)s--,f=n[s-1];for(var y=l+1;y<c;y++){var x={};oe(d[y],x,i);var m=S("g","clip-g-"+u++,x,[]);(f?f.children:e).push(m),n[s++]=m,f=m}o=d;var _=oi(v,i);_&&(f?f.children:e).push(_)}}},r.prototype.resize=function(t,i){var e=this._opts,a=this.root,n=this._viewport;if(t!=null&&(e.width=t),i!=null&&(e.height=i),a&&n&&(n.style.display="none",t=Y(a,0,e),i=Y(a,1,e),n.style.display=""),this._width!==t||this._height!==i){if(this._width=t,this._height=i,n){var s=n.style;s.width=t+"px",s.height=i+"px"}if(Bt(this._backgroundColor))this.refresh();else{var f=this._svgDom;f&&(f.setAttribute("width",t),f.setAttribute("height",i));var o=this._bgVNode&&this._bgVNode.elm;o&&(o.setAttribute("width",t),o.setAttribute("height",i))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(t){var i=this.renderToString(),e="data:image/svg+xml;";return t?(i=Lr(i),i&&e+"base64,"+i):e+"charset=UTF-8,"+encodeURIComponent(i)},r})();function pe(r){return function(){}}function _e(r,t,i,e){var a;if(i&&i!=="none")if(a=S("rect","bg",{width:r,height:t,x:"0",y:"0"}),mi(i))Ei({fill:i},a.attrs,"fill",e);else if(Bt(i))Vi({style:{fill:i},dirty:wr,getBoundingRect:function(){return{width:r,height:t}}},a.attrs,"fill",e);else{var n=K(i),s=n.color,f=n.opacity;a.attrs.fill=s,f<1&&(a.attrs["fill-opacity"]=f)}return a}function Ie(r){r.registerPainter("svg",le)}function di(r,t,i){var e=Ct.createCanvas(),a=t.getWidth(),n=t.getHeight(),s=e.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=a+"px",s.height=n+"px",e.setAttribute("data-zr-dom-id",r)),e.width=a*i,e.height=n*i,e}function It(r){return!r.__cursors.get(xi)}function ci(r){var t=r.__cursors.get(xi);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var Oi=(function(r){Ir(t,r);function t(i,e,a){var n=r.call(this)||this;n.motionBlur=!1,n.lastFrameAlpha=.7,n.dpr=1,n.virtual=!1,n.config={},n.zlevel=0,n.zlevel2=vt,n.maxRepaintRectCount=5,n.__dirty=!0,n.__firstTimePaint=!0,n.__prevIdx={startIdx:0,endIdx:0};var s;a=a||Li,typeof i=="string"?s=di(i,e,a):Dt(i)&&(s=i,i=s.id),n.id=i,n.dom=s;var f=s.style;return f&&(bi(s),s.onselectstart=function(){return!1},f.padding="0",f.margin="0",f.borderWidth="0"),n.painter=e,n.dpr=a,n}return t.prototype.afterBrush=function(){this.__prevIdx=ci(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var i=this.dpr;this.domBack=di("back-"+this.id,this.painter,i),this.ctxBack=this.domBack.getContext("2d"),i!==1&&this.ctxBack.scale(i,i)},t.prototype.createRepaintRects=function(i,e,a,n){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s=[],f=this.maxRepaintRectCount,o=!1,u=new ot(0,0,0,0);function h(_){if(!(!_.isFinite()||_.isZero()))if(s.length===0){var I=new ot(0,0,0,0);I.copy(_),s.push(I)}else{for(var A=!1,L=1/0,P=0,T=0;T<s.length;++T){var b=s[T];if(b.intersect(_)){var C=new ot(0,0,0,0);C.copy(b),C.union(_),s[T]=C,A=!0;break}else if(o){u.copy(_),u.union(b);var k=_.width*_.height,w=b.width*b.height,N=u.width*u.height,Z=N-k-w;Z<L&&(L=Z,P=T)}}if(o&&(s[P].union(_),A=!0),!A){var I=new ot(0,0,0,0);I.copy(_),s.push(I)}o||(o=s.length>=f)}}for(var v=ci(this),d=v.startIdx;d<v.endIdx;++d){var c=i[d];if(c){var p=c.shouldBePainted(a,n,!0,!0),l=c.__isRendered&&(c.__dirty&At||!p)?c.getPrevPaintRect():null;l&&h(l);var g=p&&(c.__dirty&At||!c.__isRendered)?c.getPaintRect():null;g&&h(g)}}for(var y=this.__prevIdx,d=y.startIdx;d<y.endIdx;++d){var c=e[d],p=c&&c.shouldBePainted(a,n,!0,!0);if(c&&(!p||!c.__zr)&&c.__isRendered){var l=c.getPrevPaintRect();l&&h(l)}}var x;do{x=!1;for(var d=0;d<s.length;){if(s[d].isZero()){s.splice(d,1);continue}for(var m=d+1;m<s.length;)s[d].intersect(s[m])?(x=!0,s[d].union(s[m]),s.splice(m,1)):m++;d++}}while(x);return this._paintRects=s,s},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(i,e){var a=this.dpr,n=this.dom,s=n.style,f=this.domBack;s&&(s.width=i+"px",s.height=e+"px"),n.width=i*a,n.height=e*a,f&&(f.width=i*a,f.height=e*a,a!==1&&this.ctxBack.scale(a,a))},t.prototype.clear=function(i,e,a){var n=this.dom,s=this.ctx,f=n.width,o=n.height;e=e||this.clearColor;var u=this.motionBlur&&!i,h=this.lastFrameAlpha,v=this.dpr,d=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,f/v,o/v));var c=this.domBack;function p(l,g,y,x){if(s.clearRect(l,g,y,x),e&&e!=="transparent"){var m=void 0;if(Tr(e)){var _=e.global||e.__width===y&&e.__height===x;m=_&&e.__canvasGradient||Rr(s,e,{x:0,y:0,width:y,height:x}),e.__canvasGradient=m,e.__width=y,e.__height=x}else Ar(e)&&(e.scaleX=e.scaleX||v,e.scaleY=e.scaleY||v,m=Cr(s,e,{dirty:function(){d.setUnpainted(),d.painter.refresh()}}));s.save(),s.fillStyle=m||e,s.fillRect(l,g,y,x),s.restore()}u&&(s.save(),s.globalAlpha=h,s.drawImage(c,l,g,y,x),s.restore())}!a||u?p(0,0,f,o):a.length&&Vt(a,function(l){p(l.x*v,l.y*v,l.width*v,l.height*v)})},t})(Sr),li=1e5,H=314159,St=void 0,ge=1,Tt=2;function ye(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function me(r,t){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function pi(r,t,i,e){var a=new Oi(r,t,t.dpr);return a.zlevel=i,a.zlevel2=e,a.__builtin__=!0,Hi(a),a}function Hi(r){r.__cursorStack=[],r.__cursors=Vr()}function xe(r){return r.startIdx=r.drawIdx=r.endIdx=r.endIdxNew=0,r.used=!1,r.first=r.last=NaN,r.notClearIdx=-1,r}function be(r,t){var i=r.__cursors,e=+t;return i.get(e)||(r.__cursorStack.push(e),i.set(e,xe({key:e})))}function ut(r,t){for(var i=r.__cursorStack,e=0;e<i.length;e++)t(r.__cursors.get(i[e]))}function Rt(r,t){var i=r.layers;return i[t]||(i[t]=new Array(3))}function R(r,t,i){for(var e=r.layerStack,a=0;a<e.length;a++){var n=e[a].zl,s=e[a].zl2,f=r.layers[n][s];(!i||(!(i&X)||f.__builtin__)&&(!(i&Et)||!f.__builtin__)&&(!(i&Ui)||f!==r.hoverlayer))&&t(f,n,s,a)}}var X=1,Et=2,Ui=4,ht=X|Ui,Le=(function(){function r(t,i,e,a){this.type="canvas",this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas",this._i={layerStack:[],layers:[]};var n=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=e=J({},e||{}),this.dpr=e.devicePixelRatio||Li,this._singleCanvas=n,this.root=t;var s=t.style;if(s&&(bi(t),t.innerHTML=""),this.storage=i,this._prevDisplayList=[],n){var o=t,u=o.width,h=o.height;e.width!=null&&(u=e.width),e.height!=null&&(h=e.height),this.dpr=e.devicePixelRatio||1,o.width=u*this.dpr,o.height=h*this.dpr,this._width=u,this._height=h;var v=pi(o,this,H,vt);v.initContext(),this._insertLayer(v,H,vt,!0),this._domRoot=t}else{this._width=Y(t,0,e),this._height=Y(t,1,e);var f=this._domRoot=me(this._width,this._height);t.appendChild(f)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var i;t&&!Dt(t)?i={paintAll:!!t}:i=t||{};var e=M(i.refresh,!0),a=M(i.refreshHover,!1);if(a&&(this._hoverLayerDirty=Tt),!e)return a&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var n=this.storage.getDisplayList(!0);this._updateLayerStatus(n,i.paintAll),this._redrawId=Math.random();var s=this._prevDisplayList;this._paintList(n,s,this._redrawId);var f=this._backgroundColor;return R(this._i,function(o,u,h,v){o.refresh&&o.refresh(v===0?f:null)},Et),this._opts.useDirtyRect&&(this._prevDisplayList=n.slice()),this},r.prototype._paintHoverList=function(t){var i=this._i.hoverlayer,e=this._hoverLayerDirty;if(this._hoverLayerDirty=St,e!==St&&(!i&&e===Tt&&(i=this._i.hoverlayer=this._ensureLayer(li)),!!i)){i.clear();for(var a={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},n,s=0,f=t.length;s<f;s++){var o=t[s];if(o.__inHover){n||(n=i.ctx,n.save());var u=o.__hoverStyle,h=void 0;u&&(h=o.style,o.style=u),ft(n,o,a),u&&(o.style=h)}}n&&(mt(n,a),n.restore())}},r.prototype.getHoverLayer=function(){return this._ensureLayer(li)},r.prototype.paintOne=function(t,i){Pr(t,i)},r.prototype._paintList=function(t,i,e){if(this._redrawId===e){var a=this._doPaintList(t,i);if(this._needsManuallyCompositing&&this._compositeManually(),a)R(this._i,function(s){s.afterBrush&&s.afterBrush()},ht),this._paintHoverList(t);else{var n=this;Nr(function(){n._paintList(t,i,e)})}}},r.prototype._compositeManually=function(){var t=this._ensureLayer(H).ctx,i=this._domRoot.width,e=this._domRoot.height;t.clearRect(0,0,i,e),R(this._i,function(a){a.virtual&&t.drawImage(a.dom,0,0,i,e)},X)},r.prototype._doPaintList=function(t,i){var e=this,a=!0;return R(this._i,function(n){var s=!1;if(ut(n,function(v){(v.drawIdx<v.endIdx||v.notClearIdx>=0)&&(s=!0)}),!(!s&&!n.__dirty)){var f=e._opts.useDirtyRect&&!It(n)?n.createRepaintRects(t,i,e._width,e._height):null,o=e._i.layerStack[0],u=!0;if(n.__dirty){u=!1,n.__dirty=!1;var h=n.zlevel===o.zl&&n.zlevel2===o.zl2?e._backgroundColor:null;n.clear(!1,h,f)}ut(n,function(v){var d=e._paintPerCursor(n,v,t,f,u);a=a&&d})}},ht),kr.wxa&&R(this._i,function(n){n&&n.ctx&&n.ctx.draw&&n.ctx.draw()}),a},r.prototype._paintPerCursor=function(t,i,e,a,n){var s=t.ctx;if(a)if(!a.length)i.drawIdx=i.endIdx;else for(var f=this.dpr,o=0;o<a.length;++o){var u=a[o];s.save(),s.beginPath(),s.rect(u.x*f,u.y*f,u.width*f,u.height*f),s.clip(),this._paintPerCursorInRect(t,i,e,u,n),s.restore()}else s.save(),this._paintPerCursorInRect(t,i,e,null,n),s.restore();return i.drawIdx>=i.endIdx},r.prototype._paintPerCursorInRect=function(t,i,e,a,n){for(var s={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:n}},f=t.ctx,o=It(t),u=o&&Ct.getTime(),h=i.drawIdx,v=i.notClearIdx,d=v>=0?Math.min(v,h):h;d<i.endIdx;d++){var c=e[d];if(!(d<h&&!c.notClear)){if(c.__inHover&&(this._hoverLayerDirty=Tt),a!=null){var p=c.getPaintRect();p&&p.intersect(a)&&(ft(f,c,s),c.setPrevPaintRect(p))}else ft(f,c,s);if(o){var l=Ct.getTime()-u;if(l>15){d++;break}}}}mt(f,s),i.drawIdx=Math.max(d,h)},r.prototype.getLayer=function(t,i){return this._ensureLayer(t,0,i)},r.prototype._ensureLayer=function(t,i,e){i=i||0;var a=this._singleCanvas;a&&!this._needsManuallyCompositing&&(t=H,i=0);var n=Rt(this._i,t)[i];return n||(n=pi("zr_"+t+"."+i,this,t,i),this._layerConfig[t]&&xt(n,this._layerConfig[t],!0),(e||a&&t!==H)&&(n.virtual=!0),this._insertLayer(n,t,i,!1),n.initContext()),n},r.prototype.insertLayer=function(t,i){this._insertLayer(i,t,0,!1)},r.prototype._insertLayer=function(t,i,e,a){var n=this._i,s=n.layers,f=n.layerStack,o=this._domRoot,u=null;if(!(s[i]&&s[i][e])&&ye(t)){for(var h=f.length,v=0;v<h&&(f[v].zl<i||f[v].zl===i&&f[v].zl2<e);)v++;if(v>0&&(u=Rt(n,f[v-1].zl)[f[v-1].zl2]),f.splice(v,0,{zl:i,zl2:e}),Rt(n,i)[e]=t,!a&&!t.virtual)if(u){var d=u.dom;d.nextSibling?o.insertBefore(t.dom,d.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(t,i){return R(this._i,function(e,a){t.call(i,e,a)})},r.prototype.eachBuiltinLayer=function(t,i){return R(this._i,function(e,a){t.call(i,e,a)},X)},r.prototype.eachOtherLayer=function(t,i){return R(this._i,function(e,a){t.call(i,e,a)},Et)},r.prototype.getLayers=function(){var t={};return R(this._i,function(i,e,a){t[i.id]=i}),t},r.prototype._updateLayerStatus=function(t,i){var e=this;if(e._singleCanvas)for(var a=1;a<t.length;a++){var n=t[a];if(n.zlevel!==t[a-1].zlevel||n.incremental){e._needsManuallyCompositing=!0;break}}R(e._i,function(g){g.__dirty=!1,ut(g,function(y){y.used=!1,y.endIdxNew=0,y.notClearIdx=-1})},ht);for(var s,f=null,o=null,u=!1,h=0,v=t.length;h<v;h++){var n=t[h],d=n.zlevel,c=n.incremental,p=void 0;if(s!==d&&(s=d,u=!1),c?(u=!0,p=Br):p=u?Dr:vt,(!f||d!==f.zlevel||p!==f.zlevel2)&&(f=e._ensureLayer(d,p),o=null,!f.__builtin__)){Er("ZLevel "+d+" has been used by unknown layer "+f.id);continue}if((!o||c!==o.key)&&(o=be(f,c),!o.used))if(o.used=!0,!i&&o.first===n.id){var l=h-o.startIdx;o.startIdx=h,o.drawIdx+=l,o.endIdx+=l}else f.__dirty=!0,o.first=n.id,o.startIdx=o.drawIdx=h,o.endIdx=h+1;o.endIdxNew=h+1,n.__dirty&At&&!n.__inHover&&((!c||!n.notClear&&h<o.drawIdx)&&(f.__dirty=!0),c&&n.notClear&&o.notClearIdx<0&&(o.notClearIdx=h))}R(e._i,function(g){for(var y=g.__cursorStack,x=g.__cursors,m=y.length-1;m>=0;m--){var _=x.get(y[m]);if(!_.used)g.__dirty=!0,x.removeKey(y[m]),y.splice(m,1);else{var I=_.endIdxNew;(It(g)?I<_.drawIdx:I!==_.endIdx||!I||t[I-1].id!==_.last)&&(g.__dirty=!0),_.endIdx=_.endIdxNew,_.last=I?t[I-1].id:NaN}}g.__dirty&&(ut(g,function(A){A.drawIdx=A.startIdx}),e._hoverLayerDirty===St&&(e._hoverLayerDirty=ge))},ht)},r.prototype.clear=function(){return R(this._i,function(t){t.clear(),Hi(t)},X),this},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,R(this._i,function(i){i.setUnpainted()})},r.prototype.configLayer=function(t,i){if(i){var e=this._layerConfig;e[t]?xt(e[t],i,!0):e[t]=i,R(this._i,function(a,n){xt(a,e[n],!0)})}},r.prototype.delLayer=function(t){for(var i=this._i.layerStack,e=this._i.layers,a=i.length-1;a>=0;a--){var n=i[a];if(n.zl===t){var s=e[t][n.zl2];if(s.__builtin__)continue;if(i.splice(a,1),e[t][n.zl2]=void 0,!s.virtual){var f=s.dom.parentNode;f&&f.removeChild(s.dom)}}}},r.prototype.resize=function(t,i){if(this._domRoot.style){var e=this._domRoot;e.style.display="none";var a=this._opts,n=this.root;t!=null&&(a.width=t),i!=null&&(a.height=i),t=Y(n,0,a),i=Y(n,1,a),e.style.display="",(this._width!==t||i!==this._height)&&(e.style.width=t+"px",e.style.height=i+"px",R(this._i,function(s){s.resize(t,i)}),this.refresh({paintAll:!0})),this._width=t,this._height=i}else{if(t==null||i==null)return;this._width=t,this._height=i,this._ensureLayer(H).resize(t,i)}return this},r.prototype.clearLayer=function(t){Vt(this._i.layers[t],function(i){i&&!i.__builtin__&&i.clear()})},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[H][0].dom;var i=new Oi("image",this,t.pixelRatio||this.dpr);i.initContext(),i.clear(!1,t.backgroundColor||this._backgroundColor);var e=i.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var a=i.dom.width,n=i.dom.height;R(this._i,function(v){v.__builtin__?e.drawImage(v.dom,0,0,a,n):v.renderToCanvas&&(e.save(),v.renderToCanvas(e),e.restore())})}else{for(var s={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},f=this.storage.getDisplayList(!0),o=0,u=f.length;o<u;o++){var h=f[o];ft(e,h,s)}mt(e,s)}return i.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})();function Se(r){r.registerPainter("canvas",Le)}export{Se as CanvasRenderer,Ie as SVGRenderer}; | |