@templmf/temp-solf-lmf 0.0.96 → 0.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/color-name@1.0.0/es2022/color-name.mjs +150 -0
- package/color-name@^1.0.0 +3 -0
- package/color-string@1.9.1/es2022/color-string.mjs +4 -0
- package/eventemitter3@5.0.4/es2022/eventemitter3.mjs +3 -0
- package/fecha@4.2.3/es2022/fecha.mjs +3 -0
- package/package.json +1 -1
- package/simple-swizzle@0.2.2/es2022/simple-swizzle.mjs +4 -0
- package/simple-swizzle@^0.2.2 +4 -0
- package/new/@antv/component@2.1.11/es2022/component.mjs +0 -15
- package/new/@antv/component@2.1.11/es2022/esm/animation.mjs +0 -3
- package/new/@antv/component@2.1.11/es2022/esm/core.mjs +0 -3
- package/new/@antv/component@2.1.11/es2022/esm/ui/axis/utils.mjs +0 -3
- package/new/@antv/component@2.1.11/es2022/esm/util/layout.mjs +0 -3
- package/new/@antv/g-canvas@2.0.0/es2022/g-canvas.mjs +0 -20
- package/new/@antv/g-lite@2.7.0/es2022/g-lite.mjs +0 -22
- package/new/@antv/g-math@3.1.0/es2022/g-math.mjs +0 -17
- package/new/@antv/g-plugin-dragndrop@2.1.1/es2022/g-plugin-dragndrop.mjs +0 -18
- package/new/@antv/g@6.3.1/es2022/g.mjs +0 -24
- package/new/bubblesets-js@^2.3.4 +0 -3
- package/new/html2canvas@1.4.1/es2022/html2canvas.mjs +0 -30
- package/new/html2canvas@v1.4.1 +0 -3
- package/new/svg-path-parser@1.1.0/es2022/svg-path-parser.mjs +0 -4
- package/new/svg-path-parser@^1.1.0 +0 -3
- package/new/tslib@2.8.1/es2022/tslib.mjs +0 -3
- package/new/tslib@^2.0.0 +0 -3
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/* esm.sh - @antv/component@2.1.11/esm/animation */
|
|
2
|
-
var pt=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var tr=Object.getOwnPropertyNames;var rr=Object.prototype.hasOwnProperty;var er=(t,r)=>{for(var e in r)pt(t,e,{get:r[e],enumerable:!0})},ct=(t,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of tr(r))!rr.call(t,n)&&n!==e&&pt(t,n,{get:()=>r[n],enumerable:!(a=Qt(r,n))||a.enumerable});return t},v=(t,r,e)=>(ct(t,r,"default"),e&&ct(e,r,"default"));import{__assign as I,__read as V}from"/tslib?target=es2022";import{isNil as ke}from"/@antv/util@^3.3.10?target=es2022";var h={};er(h,{BBox:()=>ht,PRIMILTIVE_ATTRIBUTES:()=>Ht,Selection:()=>kt,add:()=>L,addPrefix:()=>lt,applyStyleSheet:()=>be,applyToText:()=>Y,arrayInterpolate:()=>Dt,catmullRom2Bezier:()=>ee,classNames:()=>cr,copyAttributes:()=>ye,createOffscreenGroup:()=>ut,createTempText:()=>de,deepAssign:()=>vr,defined:()=>dr,degToRad:()=>nr,distance:()=>rt,ellipsisIt:()=>br,formatTime:()=>$t,getCallbackValue:()=>sr,getEventPos:()=>Mr,getEventViewportPos:()=>Sr,getFont:()=>xt,getLocalBBox:()=>ve,getMask:()=>Kt,getPrimitiveAttributes:()=>ne,getRenderBBox:()=>or,getShapeSpace:()=>he,getTimeDiff:()=>je,getTimeScale:()=>Ce,getTimeStart:()=>Ne,getTranslate:()=>Jt,groupBy:()=>Wr,hide:()=>D,ifNegative:()=>$r,ifPositive:()=>Jr,ifShow:()=>Hr,inRange:()=>zr,interpolate:()=>W,intersection:()=>Lr,isHorizontal:()=>xe,isInOffscreenGroup:()=>jr,isPrimitiveAttribute:()=>zt,isVertical:()=>_e,keyframeInterpolate:()=>kr,lineLen:()=>Yr,max:()=>P,maybeAppend:()=>se,measureTextWidth:()=>gr,mid:()=>Qr,min:()=>A,multi:()=>Zr,normalize:()=>Gr,numberInterpolate:()=>Ft,objectInterpolate:()=>Lt,omit:()=>te,parseDate:()=>G,parseHTML:()=>Br,parseHeightFromHTML:()=>Re,parsePosition:()=>He,parseSeriesAttr:()=>pe,path2marker:()=>Xt,percentTransform:()=>De,radToDeg:()=>ir,removePrefix:()=>et,renderExtDo:()=>Fr,renderHtmlExtDo:()=>Dr,replaceChildren:()=>Be,rotate:()=>Vr,sampling:()=>ie,scale:()=>C,scaleToPixel:()=>oe,select:()=>z,setMockMeasureTextWidth:()=>yr,show:()=>at,splitStyle:()=>Se,stringToHTML:()=>Nt,sub:()=>B,subStyleProps:()=>we,superStyleProps:()=>Me,svg2marker:()=>Oe,textOf:()=>_t,throttle:()=>Ae,timer:()=>Ie,toKNotation:()=>Kr,toLowercaseFirstLetter:()=>Vt,toPrecision:()=>Wt,toScientificNotation:()=>qr,toThousands:()=>Ur,toUppercaseFirstLetter:()=>R,transpose:()=>Le,traverse:()=>$,vertical:()=>Xr,visibility:()=>ft,wrapIt:()=>wr});function nr(t){return t*Math.PI/180}function ir(t){return Number((t*180/Math.PI).toPrecision(5))}import{__read as mt}from"/tslib?target=es2022";var ht=(function(){function t(r,e,a,n){r===void 0&&(r=0),e===void 0&&(e=0),a===void 0&&(a=0),n===void 0&&(n=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=r,this.y=e,this.width=a,this.height=n}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(r){return new t(r.x,r.y,r.width,r.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(r,e){return r>=this.left&&r<=this.right&&e>=this.top&&e<=this.bottom},t})();function or(t){var r=t.getRenderBounds(),e=mt(r.min,2),a=e[0],n=e[1],i=mt(r.max,2),o=i[0],f=i[1],u=o-a,l=f-n;return new ht(a,n,u,l)}import{__read as ar,__spreadArray as fr}from"/tslib?target=es2022";import{isFunction as ur}from"/@antv/util@^3.3.10?target=es2022";function sr(t,r){return ur(t)?t.apply(void 0,fr([],ar(r),!1)):t}import{__read as lr}from"/tslib?target=es2022";var cr=function(t,r){var e=function(n){return"".concat(r,"-").concat(n)},a=Object.fromEntries(Object.entries(t).map(function(n){var i=lr(n,2),o=i[0],f=i[1],u=e(f);return[o,{name:u,class:".".concat(u),id:"#".concat(u),toString:function(){return u}}]}));return Object.assign(a,{prefix:e}),a};import{__read as pr}from"/tslib?target=es2022";import{isPlainObject as vt,isArray as mr}from"/@antv/util@^3.3.10?target=es2022";var hr=5,dt=function(t,r,e,a){e===void 0&&(e=0),a===void 0&&(a=hr),Object.entries(r).forEach(function(n){var i=pr(n,2),o=i[0],f=i[1],u=t;Object.prototype.hasOwnProperty.call(r,o)&&(f?vt(f)?(vt(t[o])||(u[o]={}),e<a?dt(t[o],f,e+1,a):u[o]=r[o]):mr(f)?(u[o]=[],u[o]=u[o].concat(f)):u[o]=f:u[o]=f)})},vr=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];for(var a=0;a<r.length;a+=1)dt(t,r[a]);return t};var dr=function(t){return t!==void 0&&t!=null&&!Number.isNaN(t)};import{runtime as xr}from"/@antv/g@^6.1.11?target=es2022";import{memoize as _r}from"/@antv/util@^3.3.10?target=es2022";var U,ot;function yr(t){ot=t}var gr=_r(function(t,r){var e=r.fontSize,a=r.fontFamily,n=r.fontWeight,i=r.fontStyle,o=r.fontVariant;return ot?ot(t,e):(U||(U=xr.offscreenCanvasCreator.getOrCreateContext(void 0)),U.font=[i,o,n,"".concat(e,"px"),a].join(" "),U.measureText(t).width)},function(t,r){return[t,Object.values(r||xt(t)).join()].join("")},4096),xt=function(t){var r=t.style.fontFamily||"sans-serif",e=t.style.fontWeight||"normal",a=t.style.fontStyle||"normal",n=t.style.fontVariant,i=t.style.fontSize;return i=typeof i=="object"?i.value:i,{fontSize:i,fontFamily:r,fontWeight:e,fontStyle:a,fontVariant:n}};function _t(t){return t.nodeName==="text"?t:t.nodeName==="g"&&t.children.length===1&&t.children[0].nodeName==="text"?t.children[0]:null}function Y(t,r){var e=_t(t);e&&e.attr(r)}function br(t,r,e){e===void 0&&(e="..."),Y(t,{wordWrap:!0,wordWrapWidth:r,maxLines:1,textOverflow:e})}function wr(t,r,e,a){e===void 0&&(e=2),a===void 0&&(a="top"),Y(t,{wordWrap:!0,wordWrapWidth:r,maxLines:e,textBaseline:a})}function Mr(t){var r=t.canvas,e=t.touches,a=t.offsetX,n=t.offsetY;if(r){var i=r.x,o=r.y;return[i,o]}if(e){var f=e[0],u=f.clientX,l=f.clientY;return[u,l]}return a&&n?[a,n]:[0,0]}function Sr(t){var r=t.nativeEvent,e=t.touches,a=t.clientX,n=t.clientY;if(r)return[r.clientX,r.clientY];if(e){var i=e[0],o=i.clientX,f=i.clientY;return[o,f]}return typeof a=="number"&&typeof n=="number"?[a,n]:[0,0]}import{__assign as At}from"/tslib?target=es2022";import{isNumber as Pt,isString as jt}from"/@antv/util@^3.3.10?target=es2022";import{Circle as yt}from"/@antv/g@^6.1.11?target=es2022";import{CustomElement as wn}from"/@antv/g@^6.1.11?target=es2022";import{DisplayObject as Tn}from"/@antv/g@^6.1.11?target=es2022";import{Ellipse as gt}from"/@antv/g@^6.1.11?target=es2022";import{Group as q}from"/@antv/g@^6.1.11?target=es2022";import{HTML as K}from"/@antv/g@^6.1.11?target=es2022";import{Image as bt}from"/@antv/g@^6.1.11?target=es2022";import{Line as wt}from"/@antv/g@^6.1.11?target=es2022";import{Path as Mt}from"/@antv/g@^6.1.11?target=es2022";import{Polygon as St}from"/@antv/g@^6.1.11?target=es2022";import{Polyline as Tt}from"/@antv/g@^6.1.11?target=es2022";import{Rect as Et}from"/@antv/g@^6.1.11?target=es2022";import{__assign as Ot,__extends as Cr,__rest as Nr}from"/tslib?target=es2022";import{Text as Ir}from"/@antv/g@^6.1.11?target=es2022";import{__extends as Tr,__read as Er,__spreadArray as Or}from"/tslib?target=es2022";import{ElementEvent as Ar}from"/@antv/g@^6.1.11?target=es2022";function $(t,r){r(t),t.children&&t.children.forEach(function(e){e&&$(e,r)})}function at(t){ft(t,!0)}function D(t){ft(t,!1)}function ft(t,r){var e=r?"visible":"hidden";$(t,function(a){a.attr("visibility",e)})}var Pr=(function(t){Tr(r,t);function r(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var n=t.apply(this,Or([],Er(e),!1))||this;return n.isMutationObserved=!0,n.addEventListener(Ar.INSERTED,function(){D(n)}),n}return r})(q);function ut(t){var r=t.appendChild(new Pr({class:"offscreen"}));return D(r),r}function jr(t){for(var r=t;r;){if(r.className==="offscreen")return!0;r=r.parent}return!1}var J=(function(t){Cr(r,t);function r(e){e===void 0&&(e={});var a=e.style,n=Nr(e,["style"]);return t.call(this,Ot({style:Ot({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},a)},n))||this}return Object.defineProperty(r.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=ut(this)),this._offscreen},enumerable:!1,configurable:!0}),r.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},r})(Ir);function Fr(t){return typeof t=="function"?t():jt(t)||Pt(t)?new J({style:{text:String(t)}}):t}function Dr(t,r){return typeof t=="function"?t():jt(t)||Pt(t)?new K({style:At(At({pointerEvents:"auto"},r),{innerHTML:t})}):t}import{__read as Z}from"/tslib?target=es2022";function Q(t,r,e,a,n,i){return(t===r||Math.min(t,r)<=n&&n<=Math.max(t,r))&&(e===a||Math.min(e,a)<=i&&i<=Math.max(e,a))}function tt(t,r,e){var a=t;(!t.length||r<t[0]||r===t[0]&&e<t[1])&&(a[0]=r,a[1]=e)}function Lr(t,r,e,a){var n=Z(t,2),i=n[0],o=n[1],f=Z(r,2),u=f[0],l=f[1],m=Z(e,2),c=m[0],s=m[1],d=Z(a,2),p=d[0],g=d[1],x=[];if((g-s)*(u-i)===(l-o)*(p-c))(l-o)*(c-i)===(s-o)*(u-i)&&(Q(i,u,o,l,c,s)&&tt(x,c,s),Q(i,u,o,l,p,g)&&tt(x,p,g),Q(c,p,s,g,i,o)&&tt(x,i,o),Q(c,p,s,g,u,l)&&tt(x,u,l));else{var _=(c*(g-s)+o*(p-c)-s*(p-c)-i*(g-s))/((u-i)*(g-s)-(p-c)*(l-o)),w=(i*(l-o)+s*(u-i)-o*(u-i)-c*(l-o))/((p-c)*(l-o)-(u-i)*(g-s));_>=0&&_<=1&&w>=0&&w<=1&&(x[0]=i+_*(u-i),x[1]=o+_*(l-o))}return x}import{__read as Ct}from"/tslib?target=es2022";function Yr(t,r){var e=Ct(t,2),a=e[0],n=e[1],i=Ct(r,2),o=i[0],f=i[1];return Math.pow(Math.pow(a-o,2)+Math.pow(n-f,2),.5)}function Wr(t,r){return t.reduce(function(e,a){return(e[a[r]]=e[a[r]]||[]).push(a),e},{})}function Nt(t){var r=document.createElement("div");return r.innerHTML=t,r.firstChild}function Br(t){return typeof t=="string"?Nt(t):t}function Hr(t,r,e,a,n){return a===void 0&&(a=!0),n===void 0&&(n=function(i){i.node().removeChildren()}),t?e(r):(a&&n(r),null)}function zr(t,r,e,a,n){return a===void 0&&(a=!0),n===void 0&&(n=!1),a&&t===r||n&&t===e?!0:t>r&&t<e}import{__read as It}from"/tslib?target=es2022";var Ft=function(t,r){return function(e){return t*(1-e)+r*e}};function Dt(t,r){var e=r?r.length:0,a=t?Math.min(e,t.length):0;return function(n){var i=new Array(a),o=new Array(e),f=0;for(f=0;f<a;++f)i[f]=W(t[f],r[f]);for(;f<e;++f)o[f]=r[f];for(f=0;f<a;++f)o[f]=i[f](n);return o}}function Lt(t,r){t===void 0&&(t={}),r===void 0&&(r={});var e={},a={};return Object.entries(r).forEach(function(n){var i=It(n,2),o=i[0],f=i[1];o in t?e[o]=W(t[o],f):a[o]=f}),function(n){return Object.entries(e).forEach(function(i){var o=It(i,2),f=o[0],u=o[1];return a[f]=u(n)}),a}}function W(t,r){return typeof t=="number"&&typeof r=="number"?Ft(t,r):Array.isArray(t)&&Array.isArray(r)?Dt(t,r):typeof t=="object"&&typeof r=="object"?Lt(t,r):(function(e){return t})}import{__assign as Rr}from"/tslib?target=es2022";function kr(t,r,e,a){if(!a)return t.attr("__keyframe_data__",e),null;var n=a.duration,i=n===void 0?0:n,o=W(r,e),f=Math.ceil(+i/16),u=new Array(f).fill(0).map(function(l,m,c){return{__keyframe_data__:o(m/(c.length-1))}});return t.animate(u,Rr({fill:"both"},a))}v(h,Ho);import*as Ho from"./util/layout.mjs";import{__read as Yt}from"/tslib?target=es2022";function C(t,r){return[t[0]*r,t[1]*r]}function L(t,r){return[t[0]+r[0],t[1]+r[1]]}function B(t,r){return[t[0]-r[0],t[1]-r[1]]}function A(t,r){return[Math.min(t[0],r[0]),Math.min(t[1],r[1])]}function P(t,r){return[Math.max(t[0],r[0]),Math.max(t[1],r[1])]}function rt(t,r){return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function Gr(t){if(t[0]===0&&t[1]===0)return[0,0];var r=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/r,t[1]/r]}function Vr(t,r,e){var a=Yt(t,2),n=a[0],i=a[1],o=Yt(r,2),f=o[0],u=o[1],l=n-f,m=i-u,c=Math.sin(e),s=Math.cos(e);return[l*s-m*c+f,l*c+m*s+u]}function Xr(t,r){return r?[t[1],-t[0]]:[-t[1],t[0]]}function Wt(t,r){return+t.toPrecision(r)}function Ur(t){return t.toLocaleString()}function qr(t){return t.toExponential()}function Kr(t,r){return r===void 0&&(r=0),Math.abs(t)<1e3?String(t):"".concat(Wt(t/1e3,r).toLocaleString(),"K")}var $r=function(t,r,e){return t<0&&Number.isFinite(t)?r:e},Jr=function(t,r,e){return t>0&&Number.isFinite(t)?r:e},Zr=function(t,r){return t*r},Qr=function(t,r){return t/2+(r||0)/2};function te(t,r){var e={},a=Array.isArray(r)?r:[r];for(var n in t)a.includes(n)||(e[n]=t[n]);return e}import{__read as Bt}from"/tslib?target=es2022";function re(t,r,e,a){var n,i=[],o=!!a,f,u,l=[1/0,1/0],m=[-1/0,-1/0],c,s,d;if(o){n=Bt(a,2),l=n[0],m=n[1];for(var p=0,g=t.length;p<g;p+=1){var x=t[p];l=A(l,x),m=P(m,x)}}for(var p=0,_=t.length;p<_;p+=1){var x=t[p];if(p===0&&!e)d=x;else if(p===_-1&&!e)s=x,i.push(d),i.push(s);else{var w=[p?p-1:_-1,p-1][e?0:1];f=t[w],u=t[e?(p+1)%_:p+1];var b=[0,0];b=B(u,f),b=C(b,r);var S=rt(x,f),y=rt(x,u),O=S+y;O!==0&&(S/=O,y/=O);var E=C(b,-S),M=C(b,y);s=L(x,E),c=L(x,M),c=A(c,P(u,x)),c=P(c,A(u,x)),E=B(c,x),E=C(E,-S/y),s=L(x,E),s=A(s,P(f,x)),s=P(s,A(f,x)),M=B(x,s),M=C(M,y/S),c=L(x,M),o&&(s=P(s,l),s=A(s,m),c=P(c,l),c=A(c,m)),i.push(d),i.push(s),d=c}}return e&&i.push(i.shift()),i}function ee(t,r,e){var a;r===void 0&&(r=!1),e===void 0&&(e=[[0,0],[1,1]]);for(var n=!!r,i=[],o=0,f=t.length;o<f;o+=2)i.push([t[o],t[o+1]]);for(var u=re(i,.4,n,e),l=i.length,m=[],c,s,d,o=0;o<l-1;o+=1)c=u[o*2],s=u[o*2+1],d=i[o+1],m.push(["C",c[0],c[1],s[0],s[1],d[0],d[1]]);return n&&(c=u[l],s=u[l+1],a=Bt(i,1),d=a[0],m.push(["C",c[0],c[1],s[0],s[1],d[0],d[1]])),m}var Ht=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function zt(t){return Ht.includes(t)}function ne(t){var r={};for(var e in t)zt(e)&&(r[e]=t[e]);return r}function ie(t,r){if(t.length<=r)return t;for(var e=Math.floor(t.length/r),a=[],n=0;n<t.length;n+=e)a.push(t[n]);return a}function oe(t,r,e){e===void 0&&(e=!1);var a=t.getBBox(),n=a.width,i=a.height,o=r/Math.max(n,i);return e&&(t.style.transform="scale(".concat(o,")")),o}import{__classPrivateFieldGet as st,__read as N,__spreadArray as H,__values as ae}from"/tslib?target=es2022";import{flatten as fe}from"/@antv/util@^3.3.10?target=es2022";function Rt(t,r){var e=new Map;return t.forEach(function(a){var n=r(a);e.has(n)||e.set(n,[]),e.get(n).push(a)}),e}function ue(t){throw new Error(t)}var kt=(function(){function t(n,i,o,f,u,l,m){n===void 0&&(n=null),i===void 0&&(i=null),o===void 0&&(o=null),f===void 0&&(f=null),u===void 0&&(u=[null,null,null,null,null]),l===void 0&&(l=[]),m===void 0&&(m=[]),r.add(this),this._elements=Array.from(n),this._data=i,this._parent=o,this._document=f,this._enter=u[0],this._update=u[1],this._exit=u[2],this._merge=u[3],this._split=u[4],this._transitions=l,this._facetElements=m}t.prototype.selectAll=function(n){var i=typeof n=="string"?this._parent.querySelectorAll(n):n;return new e(i,null,this._elements[0],this._document)},t.prototype.selectFacetAll=function(n){var i=typeof n=="string"?this._parent.querySelectorAll(n):n;return new e(this._elements,null,this._parent,this._document,void 0,void 0,i)},t.prototype.select=function(n){var i=typeof n=="string"?this._parent.querySelectorAll(n)[0]||null:n;return new e([i],null,i,this._document)},t.prototype.append=function(n){var i=this,o=typeof n=="function"?n:function(){return i.createElement(n)},f=[];if(this._data!==null){for(var u=0;u<this._data.length;u++){var l=this._data[u],m=N(Array.isArray(l)?l:[l,null],2),c=m[0],s=m[1],d=o(c,u);d.__data__=c,s!==null&&(d.__fromElements__=s),this._parent.appendChild(d),f.push(d)}return new e(f,null,this._parent,this._document)}for(var u=0;u<this._elements.length;u++){var p=this._elements[u],c=p.__data__,d=o(c,u);p.appendChild(d),f.push(d)}return new e(f,null,f[0],this._document)},t.prototype.maybeAppend=function(n,i){var o=st(this,r,"m",a).call(this,n[0]==="#"?n:"#".concat(n),i);return o.attr("id",n),o},t.prototype.maybeAppendByClassName=function(n,i){var o=n.toString(),f=st(this,r,"m",a).call(this,o[0]==="."?o:".".concat(o),i);return f.attr("className",o),f},t.prototype.maybeAppendByName=function(n,i){var o=st(this,r,"m",a).call(this,'[name="'.concat(n,'"]'),i);return o.attr("name",n),o},t.prototype.data=function(n,i,o){var f,u;i===void 0&&(i=function(T){return T}),o===void 0&&(o=function(){return null});for(var l=[],m=[],c=new Set(this._elements),s=[],d=new Set,p=new Map(this._elements.map(function(T,F){return[i(T.__data__,F),T]})),g=new Map(this._facetElements.map(function(T,F){return[i(T.__data__,F),T]})),x=Rt(this._elements,function(T){return o(T.__data__)}),_=0;_<n.length;_++){var w=n[_],b=i(w,_),S=o(w,_);if(p.has(b)){var y=p.get(b);y.__data__=w,y.__facet__=!1,m.push(y),c.delete(y),p.delete(b)}else if(g.has(b)){var y=g.get(b);y.__data__=w,y.__facet__=!0,m.push(y),g.delete(b)}else if(x.has(b)){var O=x.get(b);s.push([w,O]);try{for(var E=(f=void 0,ae(O)),M=E.next();!M.done;M=E.next()){var y=M.value;c.delete(y)}}catch(T){f={error:T}}finally{try{M&&!M.done&&(u=E.return)&&u.call(E)}finally{if(f)throw f.error}}x.delete(b)}else if(p.has(S)){var y=p.get(S);y.__toData__?y.__toData__.push(w):y.__toData__=[w],d.add(y),c.delete(y)}else l.push(w)}var X=[new e([],l,this._parent,this._document),new e(m,null,this._parent,this._document),new e(c,null,this._parent,this._document),new e([],s,this._parent,this._document),new e(d,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,X)},t.prototype.merge=function(n){var i=H(H([],N(this._elements),!1),N(n._elements),!1),o=H(H([],N(this._transitions),!1),N(n._transitions),!1);return new e(i,null,this._parent,this._document,void 0,o)},t.prototype.createElement=function(n){if(this._document)return this._document.createElement(n,{});var i=e.registry[n];return i?new i:ue("Unknown node type: ".concat(n))},t.prototype.join=function(n,i,o,f,u){n===void 0&&(n=function(p){return p}),i===void 0&&(i=function(p){return p}),o===void 0&&(o=function(p){return p.remove()}),f===void 0&&(f=function(p){return p}),u===void 0&&(u=function(p){return p.remove()});var l=n(this._enter),m=i(this._update),c=o(this._exit),s=f(this._merge),d=u(this._split);return m.merge(l).merge(c).merge(s).merge(d)},t.prototype.remove=function(){for(var n=function(f){var u=i._elements[f],l=i._transitions[f];l?l.then(function(){return u.remove()}):u.remove()},i=this,o=0;o<this._elements.length;o++)n(o);return new e([],null,this._parent,this._document,void 0,this._transitions)},t.prototype.each=function(n){for(var i=0;i<this._elements.length;i++){var o=this._elements[i],f=o.__data__;n.call(o,f,i)}return this},t.prototype.attr=function(n,i){var o=typeof i!="function"?function(){return i}:i;return this.each(function(f,u){i!==void 0&&(this[n]=o.call(this,f,u))})},t.prototype.style=function(n,i,o){o===void 0&&(o=!0);var f=typeof i!="function"||!o?function(){return i}:i;return this.each(function(u,l){i!==void 0&&(this.style[n]=f.call(this,u,l))})},t.prototype.styles=function(n,i){return n===void 0&&(n={}),i===void 0&&(i=!0),this.each(function(o,f){var u=this;Object.entries(n).forEach(function(l){var m=N(l,2),c=m[0],s=m[1],d=typeof s!="function"||!i?function(){return s}:s;s!==void 0&&u.attr(c,d.call(u,o,f))})})},t.prototype.update=function(n,i){i===void 0&&(i=!0);var o=typeof n!="function"||!i?function(){return n}:n;return this.each(function(f,u){n&&this.update&&this.update(o.call(this,f,u))})},t.prototype.maybeUpdate=function(n,i){i===void 0&&(i=!0);var o=typeof n!="function"||!i?function(){return n}:n;return this.each(function(f,u){n&&this.update&&this.update(o.call(this,f,u))})},t.prototype.transition=function(n){var i=this._transitions,o=new Array(this._elements.length);return this.each(function(f,u){o[u]=n.call(this,f,u)}),this._transitions=fe(o),this},t.prototype.on=function(n,i){return this.each(function(){this.addEventListener(n,i)}),this},t.prototype.call=function(n){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return n.call.apply(n,H([this._parent,this],N(i),!1)),this},t.prototype.node=function(){return this._elements[0]},t.prototype.nodes=function(){return this._elements},t.prototype.transitions=function(){return this._transitions.filter(function(n){return!!n})},t.prototype.parent=function(){return this._parent};var r,e,a;return e=t,r=new WeakSet,a=function(i,o){var f=this._elements[0],u=f.querySelector(i);if(u)return new e([u],null,this._parent,this._document);var l=typeof o=="string"?this.createElement(o):o();return f.appendChild(l),new e([l],null,this._parent,this._document)},t.registry={g:q,rect:Et,circle:yt,path:Mt,text:J,ellipse:gt,image:bt,line:wt,polygon:St,polyline:Tt,html:K},t})();function z(t){return new kt([t],null,t,t.ownerDocument)}function se(t,r,e){return t.querySelector(r)?z(t).select(r):z(t).append(e)}import{isNumber as le,isArray as ce}from"/@antv/util@^3.3.10?target=es2022";function pe(t){if(le(t))return[t,t,t,t];if(ce(t)){var r=t.length;if(r===1)return[t[0],t[0],t[0],t[0]];if(r===2)return[t[0],t[1],t[0],t[1]];if(r===3)return[t[0],t[1],t[2],t[1]];if(r===4)return t}return[0,0,0,0]}import{__assign as Gt,__read as j,__values as me}from"/tslib?target=es2022";function he(t){var r=t&&t.getRenderBounds();if(!r)return{width:0,height:0};var e=r.getMax(),a=r.getMin();return{width:e[0]-a[0],height:e[1]-a[1]}}function ve(t){var r=t.getLocalBounds(),e=r.min,a=r.max,n=j([e,a],2),i=j(n[0],2),o=i[0],f=i[1],u=j(n[1],2),l=u[0],m=u[1];return{x:o,y:f,width:l-o,height:m-f,left:o,bottom:m,top:f,right:l}}function de(t,r){var e=z(t).append("text").node();return e.attr(Gt(Gt({},r),{visibility:"hidden"})),e}function xe(t,r){var e=j(t,2),a=e[0],n=e[1],i=j(r,2),o=i[0],f=i[1];return a!==o&&n===f}function _e(t,r){var e=j(t,2),a=e[0],n=e[1],i=j(r,2),o=i[0],f=i[1];return a===o&&n!==f}function ye(t,r){var e,a,n=r.attributes;try{for(var i=me(Object.entries(n)),o=i.next();!o.done;o=i.next()){var f=j(o.value,2),u=f[0],l=f[1];u!=="id"&&u!=="className"&&t.attr(u,l)}}catch(m){e={error:m}}finally{try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(e)throw e.error}}}function R(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function Vt(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}function lt(t,r){return"".concat(r).concat(R(t))}function et(t,r,e){var a;e===void 0&&(e=!0);var n=r||((a=t.match(/^([a-z][a-z0-9]+)/))===null||a===void 0?void 0:a[0])||"",i=t.replace(new RegExp("^(".concat(n,")")),"");return e?Vt(i):i}import{__read as k,__spreadArray as ge}from"/tslib?target=es2022";function be(t,r){Object.entries(r).forEach(function(e){var a=k(e,2),n=a[0],i=a[1];ge([t],k(t.querySelectorAll(n)),!1).filter(function(o){return o.matches(n)}).forEach(function(o){if(o){var f=o;f.style.cssText+=Object.entries(i).reduce(function(u,l){return"".concat(u).concat(l.join(":"),";")},"")}})})}var nt=function(t,r){if(!t?.startsWith(r))return!1;var e=t[r.length];return e>="A"&&e<="Z"};function we(t,r,e){e===void 0&&(e=!1);var a={};return Object.entries(t).forEach(function(n){var i=k(n,2),o=i[0],f=i[1];if(!(o==="className"||o==="class")){if(nt(o,"show")&&nt(et(o,"show"),r)!==e)o===lt(r,"show")?a[o]=f:a[o.replace(new RegExp(R(r)),"")]=f;else if(!nt(o,"show")&&nt(o,r)!==e){var u=et(o,r);u==="filter"&&typeof f=="function"||(a[u]=f)}}}),a}function Me(t,r){return Object.entries(t).reduce(function(e,a){var n=k(a,2),i=n[0],o=n[1];return i.startsWith("show")?e["show".concat(r).concat(i.slice(4))]=o:e["".concat(r).concat(R(i))]=o,e},{})}function Se(t,r){r===void 0&&(r=["x","y","class","className"]);var e=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],a={},n={};return Object.entries(t).forEach(function(i){var o=k(i,2),f=o[0],u=o[1];r.includes(f)||(e.indexOf(f)!==-1?n[f]=u:a[f]=u)}),[a,n]}import{__read as Te}from"/tslib?target=es2022";import Ee from"/svg-path-parser@^1.1.0?target=es2022";function Xt(t,r,e){return r===void 0&&(r=1024),e===void 0&&(e=1014),function(a,n,i){var o=Ee(t);return o.map(function(f){var u=[];u.push(f.relative===!0?f.code.toLowerCase():f.code.toUpperCase());var l=[[f.x1,f.y1],[f.x2,f.y2],[f.x,f.y]];return l.forEach(function(m){var c=Te(m,2),s=c[0],d=c[1];s!==void 0&&u.push(f.relative===!0?s/r*2*i:a-i+i*2*(s/r)),d!==void 0&&u.push(f.relative===!0?d/e*2*i:n-i+i*2*(d/e))}),u})}}function Oe(t){var r=/<path\s+d="(.*?)"/i.exec(t),e=/viewBox="\d+\s+\d+\s+(\d+)\s+(\d+)"/i.exec(t);if(r===null||r.length<2)return function(){return[]};var a=1024,n=1024;return e!==null&&e.length>=3&&(Number.isNaN(parseInt(e[1],10))||(a=parseInt(e[1],10)),Number.isNaN(parseInt(e[2],10))||(n=parseInt(e[2],10))),Xt(r[1],a,n)}function Ae(t,r){return t===void 0&&(t=0),r===void 0&&(r=!1),function(e,a,n){var i=n.value,o;typeof i=="function"&&(n.value=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];if(!o){var l=this;r&&i.apply(l,f),o=window.setTimeout(function(){i.apply(l,f),o=null},t)}})}}import{__read as qt}from"/tslib?target=es2022";var Ut=["year","month","day","hour","minute","second"],Pe=["YYYY","MM","DD","hh","mm","ss"];function G(t){return t instanceof Date?t:new Date(t)}function Kt(t){for(var r=qt(t,2),e=r[0],a=r[1],n=Ut.indexOf(e),i=Ut.indexOf(a),o="",f=n;f<=i;f+=1)if(o+=Pe[f],f<i){var u="-";f===2?u=" ":f>2&&(u=":"),o+=u}return o}function $t(t,r){var e={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),HH:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},a=r;return Object.keys(e).forEach(function(n){var i=e[n];a=a.replace(n,n==="YYYY"?"".concat(i):"".concat(i).padStart(2,"0"))}),a}function je(t,r){return G(t).getTime()-G(r).getTime()}function Ce(t,r){var e=qt([G(t),G(r)],2),a=e[0],n=e[1];return a.getFullYear()!==n.getFullYear()?"year":a.getMonth()!==n.getMonth()?"month":a.getDay()!==n.getDay()?"day":a.getHours()!==n.getHours()?"hour":a.getMinutes()!==n.getMinutes()?"minute":"second"}function Ne(t,r){var e=new Date(t),a={year:function(n){n.setMonth(0),n.setHours(0,0,0,0)},month:function(n){n.setDate(1),n.setHours(0,0,0,0)},day:function(n){return n.setHours(0,0,0,0)},hour:function(n){return n.setMinutes(0,0,0)},minute:function(n){return n.setSeconds(0,0)},second:function(n){return n.setMilliseconds(0)}};return a[r](e),$t(e,Kt(["year",r]))}function Ie(t){var r=localStorage.getItem("__debug__");return function(e,a,n){var i="[".concat(a,"] ").concat(t),o=n.value;typeof o=="function"&&(n.value=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];r&&console.time(i),o.apply(this,f),r&&console.timeEnd(i)})}}import{__read as Fe}from"/tslib?target=es2022";function Jt(t,r,e){var a=t.getBBox(),n=a.width,i=a.height,o=Fe([r,e].map(function(l,m){var c;return l.includes("%")?parseFloat(((c=l.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||c===void 0?void 0:c[0])||"0")/100*(m===0?n:i):l}),2),f=o[0],u=o[1];return[f,u]}function De(t,r){if(r)try{var e=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,a=r.replace(e,function(n,i,o){return"translate(".concat(Jt(t,i,o),")")});t.attr("transform",a)}catch{}}function Le(t){var r;return((r=t[0])===null||r===void 0?void 0:r.map(function(e,a){return t.map(function(n){return n[a]})}))||[]}import{__read as Ye,__spreadArray as We}from"/tslib?target=es2022";var Be=function(t,r){if(r==null){t.innerHTML="";return}t.replaceChildren?Array.isArray(r)?t.replaceChildren.apply(t,We([],Ye(r),!1)):t.replaceChildren(r):(t.innerHTML="",Array.isArray(r)?r.forEach(function(e){return t.appendChild(e)}):t.appendChild(r))};function He(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(r){return r[0]}):t.length>2?[t[0]]:t.split("")}import{__read as ze}from"/tslib?target=es2022";var Re=function(t){var r=new DOMParser,e=r.parseFromString(t,"text/html"),a=e.body.firstElementChild;if(console.log(a?.getClientRects(),11),!a)return 0;var n=a.getAttribute("style")||"",i=Object.fromEntries(n.split(";").map(function(x){return x.trim()}).filter(function(x){return x.includes(":")}).map(function(x){var _=ze(x.split(":").map(function(S){return S.trim()}),2),w=_[0],b=_[1];return[w.toLowerCase(),b]})),o=function(x){if(!x)return 0;var _=x.match(/([\d.]+)px/);return _?parseFloat(_[1]):0};if(i.height)return o(i.height);var f=o(i["font-size"])||16,u=i["line-height"],l;!u||u==="normal"?l=1.2*f:u.endsWith("px")?l=o(u):/^[\d.]+$/.test(u)?l=parseFloat(u)*f:l=f;var m=o(i["padding-top"]),c=o(i["padding-bottom"]);if(i.padding){var s=i.padding.split(/\s+/).map(o);s.length===1||s.length===2?(m=s[0],c=s[0]):(s.length===3||s.length===4)&&(m=s[0],c=s[2])}var d=o(i["border-top-width"]),p=o(i["border-bottom-width"]);if(i.border){var g=i.border.match(/([\d.]+)px/);g&&(d=parseFloat(g[1]),p=parseFloat(g[1]))}if(i["border-width"]){var s=i["border-width"].split(/\s+/).map(o);s.length===1||s.length===2?(d=s[0],p=s[0]):(s.length===3||s.length===4)&&(d=s[0],p=s[2])}return l+m+c+d+p};function Ge(t){return typeof t=="boolean"?!1:"enter"in t&&"update"in t&&"exit"in t}function va(t){if(!t)return{enter:!1,update:!1,exit:!1};var r=["enter","update","exit"],e=Object.fromEntries(Object.entries(t).filter(function(a){var n=V(a,1),i=n[0];return!r.includes(i)}));return Object.fromEntries(r.map(function(a){return Ge(t)?t[a]===!1?[a,!1]:[a,I(I({},t[a]),e)]:[a,e]}))}function Ve(t,r){t?t.finished.then(r):r()}function da(t,r){t.length===0?r():Promise.all(t.map(function(e){return e?.finished})).then(r)}function Zt(t,r){"update"in t?t.update(r):t.attr(r)}function Xe(t,r,e){if(r.length===0)return null;if(!e){var a=r.slice(-1)[0];return Zt(t,{style:a}),null}return t.animate(r,e)}function Ue(t,r){return!(t.nodeName!=="text"||r.nodeName!=="text"||t.attributes.text!==r.attributes.text)}function xa(t,r,e,a){if(a===void 0&&(a="destroy"),Ue(t,r))return t.remove(),[null];var n=function(){a==="destroy"?t.destroy():a==="hide"&&D(t),r.isVisible()&&at(r)};if(!e)return n(),[null];var i=e.duration,o=i===void 0?0:i,f=e.delay,u=f===void 0?0:f,l=Math.ceil(+o/2),m=+o/4,c=V(t.getGeometryBounds().center,2),s=c[0],d=c[1],p=V(r.getGeometryBounds().center,2),g=p[0],x=p[1],_=V([(s+g)/2-s,(d+x)/2-d],2),w=_[0],b=_[1],S=t.style.opacity,y=S===void 0?1:S,O=r.style.opacity,E=O===void 0?1:O,M=t.style.transform||"",X=r.style.transform||"",T=t.animate([{opacity:y,transform:"translate(0, 0) ".concat(M)},{opacity:0,transform:"translate(".concat(w,", ").concat(b,") ").concat(M)}],I(I({fill:"both"},e),{duration:u+l+m})),F=r.animate([{opacity:0,transform:"translate(".concat(-w,", ").concat(-b,") ").concat(X),offset:.01},{opacity:E,transform:"translate(0, 0) ".concat(X)}],I(I({fill:"both"},e),{duration:l+m,delay:u+l-m}));return Ve(F,n),[T,F]}function it(t,r,e){var a={},n={};return Object.entries(r).forEach(function(i){var o=V(i,2),f=o[0],u=o[1];if(!ke(u)){var l=t.style[f]||t.parsedStyle[f]||0;l!==u&&(a[f]=l,n[f]=u)}}),e?Xe(t,[a,n],I({fill:"both"},e)):(Zt(t,n),null)}function qe(t,r){return t.style.opacity||(t.style.opacity=0),it(t,{opacity:1},r)}function Ke(t,r){return t.style.opacity||(t.style.opacity=1),it(t,{opacity:0},r)}export{Xe as animate,qe as fadeIn,Ke as fadeOut,Ve as onAnimateFinished,da as onAnimatesFinished,va as parseAnimationOption,it as transition,xa as transitionShape};
|
|
3
|
-
//# sourceMappingURL=animation.mjs.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/* esm.sh - @antv/component@2.1.11/esm/core */
|
|
2
|
-
var ut=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames;var Zt=Object.prototype.hasOwnProperty;var Qt=(t,r)=>{for(var e in r)ut(t,e,{get:r[e],enumerable:!0})},ft=(t,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Jt(r))!Zt.call(t,n)&&n!==e&&ut(t,n,{get:()=>r[n],enumerable:!(a=$t(r,n))||a.enumerable});return t},v=(t,r,e)=>(ft(t,r,"default"),e&&ft(e,r,"default"));import{__extends as ke,__rest as Be}from"/tslib?target=es2022";import{Circle as st}from"/@antv/g@^6.1.11?target=es2022";import{CustomElement as pt}from"/@antv/g@^6.1.11?target=es2022";import{DisplayObject as Je}from"/@antv/g@^6.1.11?target=es2022";import{Ellipse as ct}from"/@antv/g@^6.1.11?target=es2022";import{Group as G}from"/@antv/g@^6.1.11?target=es2022";import{HTML as V}from"/@antv/g@^6.1.11?target=es2022";import{Image as lt}from"/@antv/g@^6.1.11?target=es2022";import{Line as ht}from"/@antv/g@^6.1.11?target=es2022";import{Path as mt}from"/@antv/g@^6.1.11?target=es2022";import{Polygon as vt}from"/@antv/g@^6.1.11?target=es2022";import{Polyline as dt}from"/@antv/g@^6.1.11?target=es2022";import{Rect as xt}from"/@antv/g@^6.1.11?target=es2022";import{__assign as _t,__extends as fr,__rest as ur}from"/tslib?target=es2022";import{Text as sr}from"/@antv/g@^6.1.11?target=es2022";import{__extends as rr,__read as er,__spreadArray as nr}from"/tslib?target=es2022";import{ElementEvent as or}from"/@antv/g@^6.1.11?target=es2022";function X(t,r){r(t),t.children&&t.children.forEach(function(e){e&&X(e,r)})}function tr(t){D(t,!0)}function U(t){D(t,!1)}function D(t,r){var e=r?"visible":"hidden";X(t,function(a){a.attr("visibility",e)})}var ir=(function(t){rr(r,t);function r(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var n=t.apply(this,nr([],er(e),!1))||this;return n.isMutationObserved=!0,n.addEventListener(or.INSERTED,function(){U(n)}),n}return r})(G);function L(t){var r=t.appendChild(new ir({class:"offscreen"}));return U(r),r}function ar(t){for(var r=t;r;){if(r.className==="offscreen")return!0;r=r.parent}return!1}var q=(function(t){fr(r,t);function r(e){e===void 0&&(e={});var a=e.style,n=ur(e,["style"]);return t.call(this,_t({style:_t({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},a)},n))||this}return Object.defineProperty(r.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=L(this)),this._offscreen},enumerable:!1,configurable:!0}),r.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},r})(sr);var m={};Qt(m,{BBox:()=>gt,PRIMILTIVE_ATTRIBUTES:()=>Yt,Selection:()=>kt,add:()=>I,addPrefix:()=>at,applyStyleSheet:()=>_e,applyToText:()=>F,arrayInterpolate:()=>Nt,catmullRom2Bezier:()=>Qr,classNames:()=>_r,copyAttributes:()=>de,createOffscreenGroup:()=>L,createTempText:()=>he,deepAssign:()=>K,defined:()=>wr,degToRad:()=>pr,distance:()=>tt,ellipsisIt:()=>Tr,formatTime:()=>Ut,getCallbackValue:()=>dr,getEventPos:()=>Pr,getEventViewportPos:()=>Cr,getFont:()=>Mt,getLocalBBox:()=>le,getMask:()=>Xt,getPrimitiveAttributes:()=>te,getRenderBBox:()=>lr,getShapeSpace:()=>ce,getTimeDiff:()=>Te,getTimeScale:()=>Ae,getTimeStart:()=>Pe,getTranslate:()=>qt,groupBy:()=>Lr,hide:()=>U,ifNegative:()=>Ur,ifPositive:()=>qr,ifShow:()=>Yr,inRange:()=>Wr,interpolate:()=>Y,intersection:()=>Ir,isHorizontal:()=>me,isInOffscreenGroup:()=>ar,isPrimitiveAttribute:()=>Wt,isVertical:()=>ve,keyframeInterpolate:()=>kr,lineLen:()=>Dr,max:()=>A,maybeAppend:()=>ae,measureTextWidth:()=>Er,mid:()=>$r,min:()=>T,multi:()=>Kr,normalize:()=>Br,numberInterpolate:()=>jt,objectInterpolate:()=>It,omit:()=>Jr,parseDate:()=>R,parseHTML:()=>Fr,parseHeightFromHTML:()=>ze,parsePosition:()=>Ye,parseSeriesAttr:()=>se,path2marker:()=>Rt,percentTransform:()=>Ne,radToDeg:()=>cr,removePrefix:()=>rt,renderExtDo:()=>jr,renderHtmlExtDo:()=>Nr,replaceChildren:()=>Fe,rotate:()=>Hr,sampling:()=>re,scale:()=>C,scaleToPixel:()=>ee,select:()=>k,setMockMeasureTextWidth:()=>Or,show:()=>tr,splitStyle:()=>be,stringToHTML:()=>Pt,sub:()=>W,subStyleProps:()=>ye,superStyleProps:()=>ge,svg2marker:()=>Se,textOf:()=>St,throttle:()=>Oe,timer:()=>Ce,toKNotation:()=>Xr,toLowercaseFirstLetter:()=>Ht,toPrecision:()=>Lt,toScientificNotation:()=>Vr,toThousands:()=>Gr,toUppercaseFirstLetter:()=>B,transpose:()=>Ie,traverse:()=>X,vertical:()=>Rr,visibility:()=>D,wrapIt:()=>Ar});function pr(t){return t*Math.PI/180}function cr(t){return Number((t*180/Math.PI).toPrecision(5))}import{__read as yt}from"/tslib?target=es2022";var gt=(function(){function t(r,e,a,n){r===void 0&&(r=0),e===void 0&&(e=0),a===void 0&&(a=0),n===void 0&&(n=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=r,this.y=e,this.width=a,this.height=n}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(r){return new t(r.x,r.y,r.width,r.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(r,e){return r>=this.left&&r<=this.right&&e>=this.top&&e<=this.bottom},t})();function lr(t){var r=t.getRenderBounds(),e=yt(r.min,2),a=e[0],n=e[1],o=yt(r.max,2),i=o[0],f=o[1],u=i-a,p=f-n;return new gt(a,n,u,p)}import{__read as hr,__spreadArray as mr}from"/tslib?target=es2022";import{isFunction as vr}from"/@antv/util@^3.3.10?target=es2022";function dr(t,r){return vr(t)?t.apply(void 0,mr([],hr(r),!1)):t}import{__read as xr}from"/tslib?target=es2022";var _r=function(t,r){var e=function(n){return"".concat(r,"-").concat(n)},a=Object.fromEntries(Object.entries(t).map(function(n){var o=xr(n,2),i=o[0],f=o[1],u=e(f);return[i,{name:u,class:".".concat(u),id:"#".concat(u),toString:function(){return u}}]}));return Object.assign(a,{prefix:e}),a};import{__read as yr}from"/tslib?target=es2022";import{isPlainObject as bt,isArray as gr}from"/@antv/util@^3.3.10?target=es2022";var br=5,wt=function(t,r,e,a){e===void 0&&(e=0),a===void 0&&(a=br),Object.entries(r).forEach(function(n){var o=yr(n,2),i=o[0],f=o[1],u=t;Object.prototype.hasOwnProperty.call(r,i)&&(f?bt(f)?(bt(t[i])||(u[i]={}),e<a?wt(t[i],f,e+1,a):u[i]=r[i]):gr(f)?(u[i]=[],u[i]=u[i].concat(f)):u[i]=f:u[i]=f)})},K=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];for(var a=0;a<r.length;a+=1)wt(t,r[a]);return t};var wr=function(t){return t!==void 0&&t!=null&&!Number.isNaN(t)};import{runtime as Mr}from"/@antv/g@^6.1.11?target=es2022";import{memoize as Sr}from"/@antv/util@^3.3.10?target=es2022";var $,ot;function Or(t){ot=t}var Er=Sr(function(t,r){var e=r.fontSize,a=r.fontFamily,n=r.fontWeight,o=r.fontStyle,i=r.fontVariant;return ot?ot(t,e):($||($=Mr.offscreenCanvasCreator.getOrCreateContext(void 0)),$.font=[o,i,n,"".concat(e,"px"),a].join(" "),$.measureText(t).width)},function(t,r){return[t,Object.values(r||Mt(t)).join()].join("")},4096),Mt=function(t){var r=t.style.fontFamily||"sans-serif",e=t.style.fontWeight||"normal",a=t.style.fontStyle||"normal",n=t.style.fontVariant,o=t.style.fontSize;return o=typeof o=="object"?o.value:o,{fontSize:o,fontFamily:r,fontWeight:e,fontStyle:a,fontVariant:n}};function St(t){return t.nodeName==="text"?t:t.nodeName==="g"&&t.children.length===1&&t.children[0].nodeName==="text"?t.children[0]:null}function F(t,r){var e=St(t);e&&e.attr(r)}function Tr(t,r,e){e===void 0&&(e="..."),F(t,{wordWrap:!0,wordWrapWidth:r,maxLines:1,textOverflow:e})}function Ar(t,r,e,a){e===void 0&&(e=2),a===void 0&&(a="top"),F(t,{wordWrap:!0,wordWrapWidth:r,maxLines:e,textBaseline:a})}function Pr(t){var r=t.canvas,e=t.touches,a=t.offsetX,n=t.offsetY;if(r){var o=r.x,i=r.y;return[o,i]}if(e){var f=e[0],u=f.clientX,p=f.clientY;return[u,p]}return a&&n?[a,n]:[0,0]}function Cr(t){var r=t.nativeEvent,e=t.touches,a=t.clientX,n=t.clientY;if(r)return[r.clientX,r.clientY];if(e){var o=e[0],i=o.clientX,f=o.clientY;return[i,f]}return typeof a=="number"&&typeof n=="number"?[a,n]:[0,0]}import{__assign as Ot}from"/tslib?target=es2022";import{isNumber as Et,isString as Tt}from"/@antv/util@^3.3.10?target=es2022";function jr(t){return typeof t=="function"?t():Tt(t)||Et(t)?new q({style:{text:String(t)}}):t}function Nr(t,r){return typeof t=="function"?t():Tt(t)||Et(t)?new V({style:Ot(Ot({pointerEvents:"auto"},r),{innerHTML:t})}):t}import{__read as J}from"/tslib?target=es2022";function Z(t,r,e,a,n,o){return(t===r||Math.min(t,r)<=n&&n<=Math.max(t,r))&&(e===a||Math.min(e,a)<=o&&o<=Math.max(e,a))}function Q(t,r,e){var a=t;(!t.length||r<t[0]||r===t[0]&&e<t[1])&&(a[0]=r,a[1]=e)}function Ir(t,r,e,a){var n=J(t,2),o=n[0],i=n[1],f=J(r,2),u=f[0],p=f[1],l=J(e,2),c=l[0],s=l[1],d=J(a,2),h=d[0],g=d[1],x=[];if((g-s)*(u-o)===(p-i)*(h-c))(p-i)*(c-o)===(s-i)*(u-o)&&(Z(o,u,i,p,c,s)&&Q(x,c,s),Z(o,u,i,p,h,g)&&Q(x,h,g),Z(c,h,s,g,o,i)&&Q(x,o,i),Z(c,h,s,g,u,p)&&Q(x,u,p));else{var y=(c*(g-s)+i*(h-c)-s*(h-c)-o*(g-s))/((u-o)*(g-s)-(h-c)*(p-i)),w=(o*(p-i)+s*(u-o)-i*(u-o)-c*(p-i))/((h-c)*(p-i)-(u-o)*(g-s));y>=0&&y<=1&&w>=0&&w<=1&&(x[0]=o+y*(u-o),x[1]=i+y*(p-i))}return x}import{__read as At}from"/tslib?target=es2022";function Dr(t,r){var e=At(t,2),a=e[0],n=e[1],o=At(r,2),i=o[0],f=o[1];return Math.pow(Math.pow(a-i,2)+Math.pow(n-f,2),.5)}function Lr(t,r){return t.reduce(function(e,a){return(e[a[r]]=e[a[r]]||[]).push(a),e},{})}function Pt(t){var r=document.createElement("div");return r.innerHTML=t,r.firstChild}function Fr(t){return typeof t=="string"?Pt(t):t}function Yr(t,r,e,a,n){return a===void 0&&(a=!0),n===void 0&&(n=function(o){o.node().removeChildren()}),t?e(r):(a&&n(r),null)}function Wr(t,r,e,a,n){return a===void 0&&(a=!0),n===void 0&&(n=!1),a&&t===r||n&&t===e?!0:t>r&&t<e}import{__read as Ct}from"/tslib?target=es2022";var jt=function(t,r){return function(e){return t*(1-e)+r*e}};function Nt(t,r){var e=r?r.length:0,a=t?Math.min(e,t.length):0;return function(n){var o=new Array(a),i=new Array(e),f=0;for(f=0;f<a;++f)o[f]=Y(t[f],r[f]);for(;f<e;++f)i[f]=r[f];for(f=0;f<a;++f)i[f]=o[f](n);return i}}function It(t,r){t===void 0&&(t={}),r===void 0&&(r={});var e={},a={};return Object.entries(r).forEach(function(n){var o=Ct(n,2),i=o[0],f=o[1];i in t?e[i]=Y(t[i],f):a[i]=f}),function(n){return Object.entries(e).forEach(function(o){var i=Ct(o,2),f=i[0],u=i[1];return a[f]=u(n)}),a}}function Y(t,r){return typeof t=="number"&&typeof r=="number"?jt(t,r):Array.isArray(t)&&Array.isArray(r)?Nt(t,r):typeof t=="object"&&typeof r=="object"?It(t,r):(function(e){return t})}import{__assign as zr}from"/tslib?target=es2022";function kr(t,r,e,a){if(!a)return t.attr("__keyframe_data__",e),null;var n=a.duration,o=n===void 0?0:n,i=Y(r,e),f=Math.ceil(+o/16),u=new Array(f).fill(0).map(function(p,l,c){return{__keyframe_data__:i(l/(c.length-1))}});return t.animate(u,zr({fill:"both"},a))}v(m,Ii);import*as Ii from"./util/layout.mjs";import{__read as Dt}from"/tslib?target=es2022";function C(t,r){return[t[0]*r,t[1]*r]}function I(t,r){return[t[0]+r[0],t[1]+r[1]]}function W(t,r){return[t[0]-r[0],t[1]-r[1]]}function T(t,r){return[Math.min(t[0],r[0]),Math.min(t[1],r[1])]}function A(t,r){return[Math.max(t[0],r[0]),Math.max(t[1],r[1])]}function tt(t,r){return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function Br(t){if(t[0]===0&&t[1]===0)return[0,0];var r=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/r,t[1]/r]}function Hr(t,r,e){var a=Dt(t,2),n=a[0],o=a[1],i=Dt(r,2),f=i[0],u=i[1],p=n-f,l=o-u,c=Math.sin(e),s=Math.cos(e);return[p*s-l*c+f,p*c+l*s+u]}function Rr(t,r){return r?[t[1],-t[0]]:[-t[1],t[0]]}function Lt(t,r){return+t.toPrecision(r)}function Gr(t){return t.toLocaleString()}function Vr(t){return t.toExponential()}function Xr(t,r){return r===void 0&&(r=0),Math.abs(t)<1e3?String(t):"".concat(Lt(t/1e3,r).toLocaleString(),"K")}var Ur=function(t,r,e){return t<0&&Number.isFinite(t)?r:e},qr=function(t,r,e){return t>0&&Number.isFinite(t)?r:e},Kr=function(t,r){return t*r},$r=function(t,r){return t/2+(r||0)/2};function Jr(t,r){var e={},a=Array.isArray(r)?r:[r];for(var n in t)a.includes(n)||(e[n]=t[n]);return e}import{__read as Ft}from"/tslib?target=es2022";function Zr(t,r,e,a){var n,o=[],i=!!a,f,u,p=[1/0,1/0],l=[-1/0,-1/0],c,s,d;if(i){n=Ft(a,2),p=n[0],l=n[1];for(var h=0,g=t.length;h<g;h+=1){var x=t[h];p=T(p,x),l=A(l,x)}}for(var h=0,y=t.length;h<y;h+=1){var x=t[h];if(h===0&&!e)d=x;else if(h===y-1&&!e)s=x,o.push(d),o.push(s);else{var w=[h?h-1:y-1,h-1][e?0:1];f=t[w],u=t[e?(h+1)%y:h+1];var b=[0,0];b=W(u,f),b=C(b,r);var O=tt(x,f),_=tt(x,u),N=O+_;N!==0&&(O/=N,_/=N);var E=C(b,-O),M=C(b,_);s=I(x,E),c=I(x,M),c=T(c,A(u,x)),c=A(c,T(u,x)),E=W(c,x),E=C(E,-O/_),s=I(x,E),s=T(s,A(f,x)),s=A(s,T(f,x)),M=W(x,s),M=C(M,_/O),c=I(x,M),i&&(s=A(s,p),s=T(s,l),c=A(c,p),c=T(c,l)),o.push(d),o.push(s),d=c}}return e&&o.push(o.shift()),o}function Qr(t,r,e){var a;r===void 0&&(r=!1),e===void 0&&(e=[[0,0],[1,1]]);for(var n=!!r,o=[],i=0,f=t.length;i<f;i+=2)o.push([t[i],t[i+1]]);for(var u=Zr(o,.4,n,e),p=o.length,l=[],c,s,d,i=0;i<p-1;i+=1)c=u[i*2],s=u[i*2+1],d=o[i+1],l.push(["C",c[0],c[1],s[0],s[1],d[0],d[1]]);return n&&(c=u[p],s=u[p+1],a=Ft(o,1),d=a[0],l.push(["C",c[0],c[1],s[0],s[1],d[0],d[1]])),l}var Yt=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function Wt(t){return Yt.includes(t)}function te(t){var r={};for(var e in t)Wt(e)&&(r[e]=t[e]);return r}function re(t,r){if(t.length<=r)return t;for(var e=Math.floor(t.length/r),a=[],n=0;n<t.length;n+=e)a.push(t[n]);return a}function ee(t,r,e){e===void 0&&(e=!1);var a=t.getBBox(),n=a.width,o=a.height,i=r/Math.max(n,o);return e&&(t.style.transform="scale(".concat(i,")")),i}import{__classPrivateFieldGet as it,__read as j,__spreadArray as z,__values as ne}from"/tslib?target=es2022";import{flatten as oe}from"/@antv/util@^3.3.10?target=es2022";function zt(t,r){var e=new Map;return t.forEach(function(a){var n=r(a);e.has(n)||e.set(n,[]),e.get(n).push(a)}),e}function ie(t){throw new Error(t)}var kt=(function(){function t(n,o,i,f,u,p,l){n===void 0&&(n=null),o===void 0&&(o=null),i===void 0&&(i=null),f===void 0&&(f=null),u===void 0&&(u=[null,null,null,null,null]),p===void 0&&(p=[]),l===void 0&&(l=[]),r.add(this),this._elements=Array.from(n),this._data=o,this._parent=i,this._document=f,this._enter=u[0],this._update=u[1],this._exit=u[2],this._merge=u[3],this._split=u[4],this._transitions=p,this._facetElements=l}t.prototype.selectAll=function(n){var o=typeof n=="string"?this._parent.querySelectorAll(n):n;return new e(o,null,this._elements[0],this._document)},t.prototype.selectFacetAll=function(n){var o=typeof n=="string"?this._parent.querySelectorAll(n):n;return new e(this._elements,null,this._parent,this._document,void 0,void 0,o)},t.prototype.select=function(n){var o=typeof n=="string"?this._parent.querySelectorAll(n)[0]||null:n;return new e([o],null,o,this._document)},t.prototype.append=function(n){var o=this,i=typeof n=="function"?n:function(){return o.createElement(n)},f=[];if(this._data!==null){for(var u=0;u<this._data.length;u++){var p=this._data[u],l=j(Array.isArray(p)?p:[p,null],2),c=l[0],s=l[1],d=i(c,u);d.__data__=c,s!==null&&(d.__fromElements__=s),this._parent.appendChild(d),f.push(d)}return new e(f,null,this._parent,this._document)}for(var u=0;u<this._elements.length;u++){var h=this._elements[u],c=h.__data__,d=i(c,u);h.appendChild(d),f.push(d)}return new e(f,null,f[0],this._document)},t.prototype.maybeAppend=function(n,o){var i=it(this,r,"m",a).call(this,n[0]==="#"?n:"#".concat(n),o);return i.attr("id",n),i},t.prototype.maybeAppendByClassName=function(n,o){var i=n.toString(),f=it(this,r,"m",a).call(this,i[0]==="."?i:".".concat(i),o);return f.attr("className",i),f},t.prototype.maybeAppendByName=function(n,o){var i=it(this,r,"m",a).call(this,'[name="'.concat(n,'"]'),o);return i.attr("name",n),i},t.prototype.data=function(n,o,i){var f,u;o===void 0&&(o=function(S){return S}),i===void 0&&(i=function(){return null});for(var p=[],l=[],c=new Set(this._elements),s=[],d=new Set,h=new Map(this._elements.map(function(S,nt){return[o(S.__data__,nt),S]})),g=new Map(this._facetElements.map(function(S,nt){return[o(S.__data__,nt),S]})),x=zt(this._elements,function(S){return i(S.__data__)}),y=0;y<n.length;y++){var w=n[y],b=o(w,y),O=i(w,y);if(h.has(b)){var _=h.get(b);_.__data__=w,_.__facet__=!1,l.push(_),c.delete(_),h.delete(b)}else if(g.has(b)){var _=g.get(b);_.__data__=w,_.__facet__=!0,l.push(_),g.delete(b)}else if(x.has(b)){var N=x.get(b);s.push([w,N]);try{for(var E=(f=void 0,ne(N)),M=E.next();!M.done;M=E.next()){var _=M.value;c.delete(_)}}catch(S){f={error:S}}finally{try{M&&!M.done&&(u=E.return)&&u.call(E)}finally{if(f)throw f.error}}x.delete(b)}else if(h.has(O)){var _=h.get(O);_.__toData__?_.__toData__.push(w):_.__toData__=[w],d.add(_),c.delete(_)}else p.push(w)}var Kt=[new e([],p,this._parent,this._document),new e(l,null,this._parent,this._document),new e(c,null,this._parent,this._document),new e([],s,this._parent,this._document),new e(d,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,Kt)},t.prototype.merge=function(n){var o=z(z([],j(this._elements),!1),j(n._elements),!1),i=z(z([],j(this._transitions),!1),j(n._transitions),!1);return new e(o,null,this._parent,this._document,void 0,i)},t.prototype.createElement=function(n){if(this._document)return this._document.createElement(n,{});var o=e.registry[n];return o?new o:ie("Unknown node type: ".concat(n))},t.prototype.join=function(n,o,i,f,u){n===void 0&&(n=function(h){return h}),o===void 0&&(o=function(h){return h}),i===void 0&&(i=function(h){return h.remove()}),f===void 0&&(f=function(h){return h}),u===void 0&&(u=function(h){return h.remove()});var p=n(this._enter),l=o(this._update),c=i(this._exit),s=f(this._merge),d=u(this._split);return l.merge(p).merge(c).merge(s).merge(d)},t.prototype.remove=function(){for(var n=function(f){var u=o._elements[f],p=o._transitions[f];p?p.then(function(){return u.remove()}):u.remove()},o=this,i=0;i<this._elements.length;i++)n(i);return new e([],null,this._parent,this._document,void 0,this._transitions)},t.prototype.each=function(n){for(var o=0;o<this._elements.length;o++){var i=this._elements[o],f=i.__data__;n.call(i,f,o)}return this},t.prototype.attr=function(n,o){var i=typeof o!="function"?function(){return o}:o;return this.each(function(f,u){o!==void 0&&(this[n]=i.call(this,f,u))})},t.prototype.style=function(n,o,i){i===void 0&&(i=!0);var f=typeof o!="function"||!i?function(){return o}:o;return this.each(function(u,p){o!==void 0&&(this.style[n]=f.call(this,u,p))})},t.prototype.styles=function(n,o){return n===void 0&&(n={}),o===void 0&&(o=!0),this.each(function(i,f){var u=this;Object.entries(n).forEach(function(p){var l=j(p,2),c=l[0],s=l[1],d=typeof s!="function"||!o?function(){return s}:s;s!==void 0&&u.attr(c,d.call(u,i,f))})})},t.prototype.update=function(n,o){o===void 0&&(o=!0);var i=typeof n!="function"||!o?function(){return n}:n;return this.each(function(f,u){n&&this.update&&this.update(i.call(this,f,u))})},t.prototype.maybeUpdate=function(n,o){o===void 0&&(o=!0);var i=typeof n!="function"||!o?function(){return n}:n;return this.each(function(f,u){n&&this.update&&this.update(i.call(this,f,u))})},t.prototype.transition=function(n){var o=this._transitions,i=new Array(this._elements.length);return this.each(function(f,u){i[u]=n.call(this,f,u)}),this._transitions=oe(i),this},t.prototype.on=function(n,o){return this.each(function(){this.addEventListener(n,o)}),this},t.prototype.call=function(n){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];return n.call.apply(n,z([this._parent,this],j(o),!1)),this},t.prototype.node=function(){return this._elements[0]},t.prototype.nodes=function(){return this._elements},t.prototype.transitions=function(){return this._transitions.filter(function(n){return!!n})},t.prototype.parent=function(){return this._parent};var r,e,a;return e=t,r=new WeakSet,a=function(o,i){var f=this._elements[0],u=f.querySelector(o);if(u)return new e([u],null,this._parent,this._document);var p=typeof i=="string"?this.createElement(i):i();return f.appendChild(p),new e([p],null,this._parent,this._document)},t.registry={g:G,rect:xt,circle:st,path:mt,text:q,ellipse:ct,image:lt,line:ht,polygon:vt,polyline:dt,html:V},t})();function k(t){return new kt([t],null,t,t.ownerDocument)}function ae(t,r,e){return t.querySelector(r)?k(t).select(r):k(t).append(e)}import{isNumber as fe,isArray as ue}from"/@antv/util@^3.3.10?target=es2022";function se(t){if(fe(t))return[t,t,t,t];if(ue(t)){var r=t.length;if(r===1)return[t[0],t[0],t[0],t[0]];if(r===2)return[t[0],t[1],t[0],t[1]];if(r===3)return[t[0],t[1],t[2],t[1]];if(r===4)return t}return[0,0,0,0]}import{__assign as Bt,__read as P,__values as pe}from"/tslib?target=es2022";function ce(t){var r=t&&t.getRenderBounds();if(!r)return{width:0,height:0};var e=r.getMax(),a=r.getMin();return{width:e[0]-a[0],height:e[1]-a[1]}}function le(t){var r=t.getLocalBounds(),e=r.min,a=r.max,n=P([e,a],2),o=P(n[0],2),i=o[0],f=o[1],u=P(n[1],2),p=u[0],l=u[1];return{x:i,y:f,width:p-i,height:l-f,left:i,bottom:l,top:f,right:p}}function he(t,r){var e=k(t).append("text").node();return e.attr(Bt(Bt({},r),{visibility:"hidden"})),e}function me(t,r){var e=P(t,2),a=e[0],n=e[1],o=P(r,2),i=o[0],f=o[1];return a!==i&&n===f}function ve(t,r){var e=P(t,2),a=e[0],n=e[1],o=P(r,2),i=o[0],f=o[1];return a===i&&n!==f}function de(t,r){var e,a,n=r.attributes;try{for(var o=pe(Object.entries(n)),i=o.next();!i.done;i=o.next()){var f=P(i.value,2),u=f[0],p=f[1];u!=="id"&&u!=="className"&&t.attr(u,p)}}catch(l){e={error:l}}finally{try{i&&!i.done&&(a=o.return)&&a.call(o)}finally{if(e)throw e.error}}}function B(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function Ht(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}function at(t,r){return"".concat(r).concat(B(t))}function rt(t,r,e){var a;e===void 0&&(e=!0);var n=r||((a=t.match(/^([a-z][a-z0-9]+)/))===null||a===void 0?void 0:a[0])||"",o=t.replace(new RegExp("^(".concat(n,")")),"");return e?Ht(o):o}import{__read as H,__spreadArray as xe}from"/tslib?target=es2022";function _e(t,r){Object.entries(r).forEach(function(e){var a=H(e,2),n=a[0],o=a[1];xe([t],H(t.querySelectorAll(n)),!1).filter(function(i){return i.matches(n)}).forEach(function(i){if(i){var f=i;f.style.cssText+=Object.entries(o).reduce(function(u,p){return"".concat(u).concat(p.join(":"),";")},"")}})})}var et=function(t,r){if(!t?.startsWith(r))return!1;var e=t[r.length];return e>="A"&&e<="Z"};function ye(t,r,e){e===void 0&&(e=!1);var a={};return Object.entries(t).forEach(function(n){var o=H(n,2),i=o[0],f=o[1];if(!(i==="className"||i==="class")){if(et(i,"show")&&et(rt(i,"show"),r)!==e)i===at(r,"show")?a[i]=f:a[i.replace(new RegExp(B(r)),"")]=f;else if(!et(i,"show")&&et(i,r)!==e){var u=rt(i,r);u==="filter"&&typeof f=="function"||(a[u]=f)}}}),a}function ge(t,r){return Object.entries(t).reduce(function(e,a){var n=H(a,2),o=n[0],i=n[1];return o.startsWith("show")?e["show".concat(r).concat(o.slice(4))]=i:e["".concat(r).concat(B(o))]=i,e},{})}function be(t,r){r===void 0&&(r=["x","y","class","className"]);var e=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],a={},n={};return Object.entries(t).forEach(function(o){var i=H(o,2),f=i[0],u=i[1];r.includes(f)||(e.indexOf(f)!==-1?n[f]=u:a[f]=u)}),[a,n]}import{__read as we}from"/tslib?target=es2022";import Me from"/svg-path-parser@^1.1.0?target=es2022";function Rt(t,r,e){return r===void 0&&(r=1024),e===void 0&&(e=1014),function(a,n,o){var i=Me(t);return i.map(function(f){var u=[];u.push(f.relative===!0?f.code.toLowerCase():f.code.toUpperCase());var p=[[f.x1,f.y1],[f.x2,f.y2],[f.x,f.y]];return p.forEach(function(l){var c=we(l,2),s=c[0],d=c[1];s!==void 0&&u.push(f.relative===!0?s/r*2*o:a-o+o*2*(s/r)),d!==void 0&&u.push(f.relative===!0?d/e*2*o:n-o+o*2*(d/e))}),u})}}function Se(t){var r=/<path\s+d="(.*?)"/i.exec(t),e=/viewBox="\d+\s+\d+\s+(\d+)\s+(\d+)"/i.exec(t);if(r===null||r.length<2)return function(){return[]};var a=1024,n=1024;return e!==null&&e.length>=3&&(Number.isNaN(parseInt(e[1],10))||(a=parseInt(e[1],10)),Number.isNaN(parseInt(e[2],10))||(n=parseInt(e[2],10))),Rt(r[1],a,n)}function Oe(t,r){return t===void 0&&(t=0),r===void 0&&(r=!1),function(e,a,n){var o=n.value,i;typeof o=="function"&&(n.value=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];if(!i){var p=this;r&&o.apply(p,f),i=window.setTimeout(function(){o.apply(p,f),i=null},t)}})}}import{__read as Vt}from"/tslib?target=es2022";var Gt=["year","month","day","hour","minute","second"],Ee=["YYYY","MM","DD","hh","mm","ss"];function R(t){return t instanceof Date?t:new Date(t)}function Xt(t){for(var r=Vt(t,2),e=r[0],a=r[1],n=Gt.indexOf(e),o=Gt.indexOf(a),i="",f=n;f<=o;f+=1)if(i+=Ee[f],f<o){var u="-";f===2?u=" ":f>2&&(u=":"),i+=u}return i}function Ut(t,r){var e={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),HH:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},a=r;return Object.keys(e).forEach(function(n){var o=e[n];a=a.replace(n,n==="YYYY"?"".concat(o):"".concat(o).padStart(2,"0"))}),a}function Te(t,r){return R(t).getTime()-R(r).getTime()}function Ae(t,r){var e=Vt([R(t),R(r)],2),a=e[0],n=e[1];return a.getFullYear()!==n.getFullYear()?"year":a.getMonth()!==n.getMonth()?"month":a.getDay()!==n.getDay()?"day":a.getHours()!==n.getHours()?"hour":a.getMinutes()!==n.getMinutes()?"minute":"second"}function Pe(t,r){var e=new Date(t),a={year:function(n){n.setMonth(0),n.setHours(0,0,0,0)},month:function(n){n.setDate(1),n.setHours(0,0,0,0)},day:function(n){return n.setHours(0,0,0,0)},hour:function(n){return n.setMinutes(0,0,0)},minute:function(n){return n.setSeconds(0,0)},second:function(n){return n.setMilliseconds(0)}};return a[r](e),Ut(e,Xt(["year",r]))}function Ce(t){var r=localStorage.getItem("__debug__");return function(e,a,n){var o="[".concat(a,"] ").concat(t),i=n.value;typeof i=="function"&&(n.value=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];r&&console.time(o),i.apply(this,f),r&&console.timeEnd(o)})}}import{__read as je}from"/tslib?target=es2022";function qt(t,r,e){var a=t.getBBox(),n=a.width,o=a.height,i=je([r,e].map(function(p,l){var c;return p.includes("%")?parseFloat(((c=p.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||c===void 0?void 0:c[0])||"0")/100*(l===0?n:o):p}),2),f=i[0],u=i[1];return[f,u]}function Ne(t,r){if(r)try{var e=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,a=r.replace(e,function(n,o,i){return"translate(".concat(qt(t,o,i),")")});t.attr("transform",a)}catch{}}function Ie(t){var r;return((r=t[0])===null||r===void 0?void 0:r.map(function(e,a){return t.map(function(n){return n[a]})}))||[]}import{__read as De,__spreadArray as Le}from"/tslib?target=es2022";var Fe=function(t,r){if(r==null){t.innerHTML="";return}t.replaceChildren?Array.isArray(r)?t.replaceChildren.apply(t,Le([],De(r),!1)):t.replaceChildren(r):(t.innerHTML="",Array.isArray(r)?r.forEach(function(e){return t.appendChild(e)}):t.appendChild(r))};function Ye(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(r){return r[0]}):t.length>2?[t[0]]:t.split("")}import{__read as We}from"/tslib?target=es2022";var ze=function(t){var r=new DOMParser,e=r.parseFromString(t,"text/html"),a=e.body.firstElementChild;if(console.log(a?.getClientRects(),11),!a)return 0;var n=a.getAttribute("style")||"",o=Object.fromEntries(n.split(";").map(function(x){return x.trim()}).filter(function(x){return x.includes(":")}).map(function(x){var y=We(x.split(":").map(function(O){return O.trim()}),2),w=y[0],b=y[1];return[w.toLowerCase(),b]})),i=function(x){if(!x)return 0;var y=x.match(/([\d.]+)px/);return y?parseFloat(y[1]):0};if(o.height)return i(o.height);var f=i(o["font-size"])||16,u=o["line-height"],p;!u||u==="normal"?p=1.2*f:u.endsWith("px")?p=i(u):/^[\d.]+$/.test(u)?p=parseFloat(u)*f:p=f;var l=i(o["padding-top"]),c=i(o["padding-bottom"]);if(o.padding){var s=o.padding.split(/\s+/).map(i);s.length===1||s.length===2?(l=s[0],c=s[0]):(s.length===3||s.length===4)&&(l=s[0],c=s[2])}var d=i(o["border-top-width"]),h=i(o["border-bottom-width"]);if(o.border){var g=o.border.match(/([\d.]+)px/);g&&(d=parseFloat(g[1]),h=parseFloat(g[1]))}if(o["border-width"]){var s=o["border-width"].split(/\s+/).map(i);s.length===1||s.length===2?(d=s[0],h=s[0]):(s.length===3||s.length===4)&&(d=s[0],h=s[2])}return p+l+c+d+h};function He(){D(this,this.attributes.visibility!=="hidden")}var Re=(function(t){ke(r,t);function r(e,a){a===void 0&&(a={});var n=t.call(this,K({},{style:a},e))||this;return n.initialized=!1,n._defaultOptions=a,n}return Object.defineProperty(r.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=L(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),r.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},r.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},r.prototype.attributeChangedCallback=function(e){e==="visibility"&&He.call(this)},r.prototype.update=function(e,a){var n;return this.attr(K({},this.attributes,e||{})),(n=this.render)===null||n===void 0?void 0:n.call(this,this.attributes,this,a)},r.prototype.clear=function(){this.removeChildren()},r.prototype.bindEvents=function(e,a){},r.prototype.getSubShapeStyle=function(e){var a=e.x,n=e.y,o=e.transform,i=e.transformOrigin,f=e.class,u=e.className,p=e.zIndex,l=Be(e,["x","y","transform","transformOrigin","class","className","zIndex"]);return l},r})(pt);export{Re as Component};
|
|
3
|
-
//# sourceMappingURL=core.mjs.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/* esm.sh - @antv/component@2.1.11/esm/ui/axis/utils */
|
|
2
|
-
var Lt=Object.defineProperty;var Tr=Object.getOwnPropertyDescriptor;var Er=Object.getOwnPropertyNames;var Lr=Object.prototype.hasOwnProperty;var Or=(t,r)=>{for(var e in r)Lt(t,e,{get:r[e],enumerable:!0})},Et=(t,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Er(r))!Lr.call(t,n)&&n!==e&&Lt(t,n,{get:()=>r[n],enumerable:!(a=Tr(r,n))||a.enumerable});return t},x=(t,r,e)=>(Et(t,r,"default"),e&&Et(e,r,"default"));import{__read as $,__values as xn}from"/tslib?target=es2022";var h={};Or(h,{BBox:()=>Nt,PRIMILTIVE_ATTRIBUTES:()=>or,Selection:()=>sr,add:()=>B,addPrefix:()=>At,applyStyleSheet:()=>Re,applyToText:()=>R,arrayInterpolate:()=>Jt,catmullRom2Bezier:()=>Ae,classNames:()=>dt,copyAttributes:()=>De,createOffscreenGroup:()=>yt,createTempText:()=>Ie,deepAssign:()=>Rr,defined:()=>Vr,degToRad:()=>j,distance:()=>ct,ellipsisIt:()=>Xr,formatTime:()=>xr,getCallbackValue:()=>Ct,getEventPos:()=>qr,getEventViewportPos:()=>Kr,getFont:()=>It,getLocalBBox:()=>Fe,getMask:()=>dr,getPrimitiveAttributes:()=>Se,getRenderBBox:()=>Cr,getShapeSpace:()=>ke,getTimeDiff:()=>qe,getTimeScale:()=>Ke,getTimeStart:()=>Ze,getTranslate:()=>gr,groupBy:()=>se,hide:()=>at,ifNegative:()=>ge,ifPositive:()=>ye,ifShow:()=>ce,inRange:()=>pe,interpolate:()=>V,intersection:()=>fe,isHorizontal:()=>je,isInOffscreenGroup:()=>ee,isPrimitiveAttribute:()=>ar,isVertical:()=>Be,keyframeInterpolate:()=>tr,lineLen:()=>ue,max:()=>N,maybeAppend:()=>Le,measureTextWidth:()=>Hr,mid:()=>be,min:()=>O,multi:()=>_e,normalize:()=>_t,numberInterpolate:()=>$t,objectInterpolate:()=>Qt,omit:()=>nr,parseDate:()=>U,parseHTML:()=>le,parseHeightFromHTML:()=>fn,parsePosition:()=>on,parseSeriesAttr:()=>D,path2marker:()=>mr,percentTransform:()=>Qe,radToDeg:()=>Nr,removePrefix:()=>pt,renderExtDo:()=>Ut,renderHtmlExtDo:()=>ae,replaceChildren:()=>nn,rotate:()=>ve,sampling:()=>Me,scale:()=>L,scaleToPixel:()=>fr,select:()=>Y,setMockMeasureTextWidth:()=>Yr,show:()=>Zr,splitStyle:()=>ze,stringToHTML:()=>Kt,sub:()=>z,subStyleProps:()=>pr,superStyleProps:()=>Ve,svg2marker:()=>He,textOf:()=>rt,throttle:()=>Xe,timer:()=>$e,toKNotation:()=>xe,toLowercaseFirstLetter:()=>cr,toPrecision:()=>er,toScientificNotation:()=>de,toThousands:()=>he,toUppercaseFirstLetter:()=>H,transpose:()=>tn,traverse:()=>ot,vertical:()=>bt,visibility:()=>gt,wrapIt:()=>Ur});function j(t){return t*Math.PI/180}function Nr(t){return Number((t*180/Math.PI).toPrecision(5))}import{__read as Ot}from"/tslib?target=es2022";var Nt=(function(){function t(r,e,a,n){r===void 0&&(r=0),e===void 0&&(e=0),a===void 0&&(a=0),n===void 0&&(n=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=r,this.y=e,this.width=a,this.height=n}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(r){return new t(r.x,r.y,r.width,r.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(r,e){return r>=this.left&&r<=this.right&&e>=this.top&&e<=this.bottom},t})();function Cr(t){var r=t.getRenderBounds(),e=Ot(r.min,2),a=e[0],n=e[1],i=Ot(r.max,2),o=i[0],f=i[1],u=o-a,s=f-n;return new Nt(a,n,u,s)}import{__read as kr,__spreadArray as Fr}from"/tslib?target=es2022";import{isFunction as Ir}from"/@antv/util@^3.3.10?target=es2022";function Ct(t,r){return Ir(t)?t.apply(void 0,Fr([],kr(r),!1)):t}import{__read as jr}from"/tslib?target=es2022";var dt=function(t,r){var e=function(n){return"".concat(r,"-").concat(n)},a=Object.fromEntries(Object.entries(t).map(function(n){var i=jr(n,2),o=i[0],f=i[1],u=e(f);return[o,{name:u,class:".".concat(u),id:"#".concat(u),toString:function(){return u}}]}));return Object.assign(a,{prefix:e}),a};import{__read as Br}from"/tslib?target=es2022";import{isPlainObject as kt,isArray as Dr}from"/@antv/util@^3.3.10?target=es2022";var Gr=5,Ft=function(t,r,e,a){e===void 0&&(e=0),a===void 0&&(a=Gr),Object.entries(r).forEach(function(n){var i=Br(n,2),o=i[0],f=i[1],u=t;Object.prototype.hasOwnProperty.call(r,o)&&(f?kt(f)?(kt(t[o])||(u[o]={}),e<a?Ft(t[o],f,e+1,a):u[o]=r[o]):Dr(f)?(u[o]=[],u[o]=u[o].concat(f)):u[o]=f:u[o]=f)})},Rr=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];for(var a=0;a<r.length;a+=1)Ft(t,r[a]);return t};var Vr=function(t){return t!==void 0&&t!=null&&!Number.isNaN(t)};import{runtime as zr}from"/@antv/g@^6.1.11?target=es2022";import{memoize as Wr}from"/@antv/util@^3.3.10?target=es2022";var tt,xt;function Yr(t){xt=t}var Hr=Wr(function(t,r){var e=r.fontSize,a=r.fontFamily,n=r.fontWeight,i=r.fontStyle,o=r.fontVariant;return xt?xt(t,e):(tt||(tt=zr.offscreenCanvasCreator.getOrCreateContext(void 0)),tt.font=[i,o,n,"".concat(e,"px"),a].join(" "),tt.measureText(t).width)},function(t,r){return[t,Object.values(r||It(t)).join()].join("")},4096),It=function(t){var r=t.style.fontFamily||"sans-serif",e=t.style.fontWeight||"normal",a=t.style.fontStyle||"normal",n=t.style.fontVariant,i=t.style.fontSize;return i=typeof i=="object"?i.value:i,{fontSize:i,fontFamily:r,fontWeight:e,fontStyle:a,fontVariant:n}};function rt(t){return t.nodeName==="text"?t:t.nodeName==="g"&&t.children.length===1&&t.children[0].nodeName==="text"?t.children[0]:null}function R(t,r){var e=rt(t);e&&e.attr(r)}function Xr(t,r,e){e===void 0&&(e="..."),R(t,{wordWrap:!0,wordWrapWidth:r,maxLines:1,textOverflow:e})}function Ur(t,r,e,a){e===void 0&&(e=2),a===void 0&&(a="top"),R(t,{wordWrap:!0,wordWrapWidth:r,maxLines:e,textBaseline:a})}function qr(t){var r=t.canvas,e=t.touches,a=t.offsetX,n=t.offsetY;if(r){var i=r.x,o=r.y;return[i,o]}if(e){var f=e[0],u=f.clientX,s=f.clientY;return[u,s]}return a&&n?[a,n]:[0,0]}function Kr(t){var r=t.nativeEvent,e=t.touches,a=t.clientX,n=t.clientY;if(r)return[r.clientX,r.clientY];if(e){var i=e[0],o=i.clientX,f=i.clientY;return[o,f]}return typeof a=="number"&&typeof n=="number"?[a,n]:[0,0]}import{__assign as Yt}from"/tslib?target=es2022";import{isNumber as Ht,isString as Xt}from"/@antv/util@^3.3.10?target=es2022";import{Circle as jt}from"/@antv/g@^6.1.11?target=es2022";import{CustomElement as Yn}from"/@antv/g@^6.1.11?target=es2022";import{DisplayObject as Un}from"/@antv/g@^6.1.11?target=es2022";import{Ellipse as Bt}from"/@antv/g@^6.1.11?target=es2022";import{Group as et}from"/@antv/g@^6.1.11?target=es2022";import{HTML as nt}from"/@antv/g@^6.1.11?target=es2022";import{Image as Dt}from"/@antv/g@^6.1.11?target=es2022";import{Line as Gt}from"/@antv/g@^6.1.11?target=es2022";import{Path as it}from"/@antv/g@^6.1.11?target=es2022";import{Polygon as Rt}from"/@antv/g@^6.1.11?target=es2022";import{Polyline as Vt}from"/@antv/g@^6.1.11?target=es2022";import{Rect as zt}from"/@antv/g@^6.1.11?target=es2022";import{__assign as Wt,__extends as ne,__rest as ie}from"/tslib?target=es2022";import{Text as oe}from"/@antv/g@^6.1.11?target=es2022";import{__extends as $r,__read as Jr,__spreadArray as Qr}from"/tslib?target=es2022";import{ElementEvent as te}from"/@antv/g@^6.1.11?target=es2022";function ot(t,r){r(t),t.children&&t.children.forEach(function(e){e&&ot(e,r)})}function Zr(t){gt(t,!0)}function at(t){gt(t,!1)}function gt(t,r){var e=r?"visible":"hidden";ot(t,function(a){a.attr("visibility",e)})}var re=(function(t){$r(r,t);function r(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var n=t.apply(this,Qr([],Jr(e),!1))||this;return n.isMutationObserved=!0,n.addEventListener(te.INSERTED,function(){at(n)}),n}return r})(et);function yt(t){var r=t.appendChild(new re({class:"offscreen"}));return at(r),r}function ee(t){for(var r=t;r;){if(r.className==="offscreen")return!0;r=r.parent}return!1}var ft=(function(t){ne(r,t);function r(e){e===void 0&&(e={});var a=e.style,n=ie(e,["style"]);return t.call(this,Wt({style:Wt({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},a)},n))||this}return Object.defineProperty(r.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=yt(this)),this._offscreen},enumerable:!1,configurable:!0}),r.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},r})(oe);function Ut(t){return typeof t=="function"?t():Xt(t)||Ht(t)?new ft({style:{text:String(t)}}):t}function ae(t,r){return typeof t=="function"?t():Xt(t)||Ht(t)?new nt({style:Yt(Yt({pointerEvents:"auto"},r),{innerHTML:t})}):t}import{__read as ut}from"/tslib?target=es2022";function st(t,r,e,a,n,i){return(t===r||Math.min(t,r)<=n&&n<=Math.max(t,r))&&(e===a||Math.min(e,a)<=i&&i<=Math.max(e,a))}function lt(t,r,e){var a=t;(!t.length||r<t[0]||r===t[0]&&e<t[1])&&(a[0]=r,a[1]=e)}function fe(t,r,e,a){var n=ut(t,2),i=n[0],o=n[1],f=ut(r,2),u=f[0],s=f[1],p=ut(e,2),c=p[0],l=p[1],v=ut(a,2),m=v[0],_=v[1],d=[];if((_-l)*(u-i)===(s-o)*(m-c))(s-o)*(c-i)===(l-o)*(u-i)&&(st(i,u,o,s,c,l)&<(d,c,l),st(i,u,o,s,m,_)&<(d,m,_),st(c,m,l,_,i,o)&<(d,i,o),st(c,m,l,_,u,s)&<(d,u,s));else{var y=(c*(_-l)+o*(m-c)-l*(m-c)-i*(_-l))/((u-i)*(_-l)-(m-c)*(s-o)),w=(i*(s-o)+l*(u-i)-o*(u-i)-c*(s-o))/((m-c)*(s-o)-(u-i)*(_-l));y>=0&&y<=1&&w>=0&&w<=1&&(d[0]=i+y*(u-i),d[1]=o+y*(s-o))}return d}import{__read as qt}from"/tslib?target=es2022";function ue(t,r){var e=qt(t,2),a=e[0],n=e[1],i=qt(r,2),o=i[0],f=i[1];return Math.pow(Math.pow(a-o,2)+Math.pow(n-f,2),.5)}function se(t,r){return t.reduce(function(e,a){return(e[a[r]]=e[a[r]]||[]).push(a),e},{})}function Kt(t){var r=document.createElement("div");return r.innerHTML=t,r.firstChild}function le(t){return typeof t=="string"?Kt(t):t}function ce(t,r,e,a,n){return a===void 0&&(a=!0),n===void 0&&(n=function(i){i.node().removeChildren()}),t?e(r):(a&&n(r),null)}function pe(t,r,e,a,n){return a===void 0&&(a=!0),n===void 0&&(n=!1),a&&t===r||n&&t===e?!0:t>r&&t<e}import{__read as Zt}from"/tslib?target=es2022";var $t=function(t,r){return function(e){return t*(1-e)+r*e}};function Jt(t,r){var e=r?r.length:0,a=t?Math.min(e,t.length):0;return function(n){var i=new Array(a),o=new Array(e),f=0;for(f=0;f<a;++f)i[f]=V(t[f],r[f]);for(;f<e;++f)o[f]=r[f];for(f=0;f<a;++f)o[f]=i[f](n);return o}}function Qt(t,r){t===void 0&&(t={}),r===void 0&&(r={});var e={},a={};return Object.entries(r).forEach(function(n){var i=Zt(n,2),o=i[0],f=i[1];o in t?e[o]=V(t[o],f):a[o]=f}),function(n){return Object.entries(e).forEach(function(i){var o=Zt(i,2),f=o[0],u=o[1];return a[f]=u(n)}),a}}function V(t,r){return typeof t=="number"&&typeof r=="number"?$t(t,r):Array.isArray(t)&&Array.isArray(r)?Jt(t,r):typeof t=="object"&&typeof r=="object"?Qt(t,r):(function(e){return t})}import{__assign as me}from"/tslib?target=es2022";function tr(t,r,e,a){if(!a)return t.attr("__keyframe_data__",e),null;var n=a.duration,i=n===void 0?0:n,o=V(r,e),f=Math.ceil(+i/16),u=new Array(f).fill(0).map(function(s,p,c){return{__keyframe_data__:o(p/(c.length-1))}});return t.animate(u,me({fill:"both"},a))}x(h,ua);import*as ua from"../../util/layout.mjs";import{__read as rr}from"/tslib?target=es2022";function L(t,r){return[t[0]*r,t[1]*r]}function B(t,r){return[t[0]+r[0],t[1]+r[1]]}function z(t,r){return[t[0]-r[0],t[1]-r[1]]}function O(t,r){return[Math.min(t[0],r[0]),Math.min(t[1],r[1])]}function N(t,r){return[Math.max(t[0],r[0]),Math.max(t[1],r[1])]}function ct(t,r){return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function _t(t){if(t[0]===0&&t[1]===0)return[0,0];var r=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/r,t[1]/r]}function ve(t,r,e){var a=rr(t,2),n=a[0],i=a[1],o=rr(r,2),f=o[0],u=o[1],s=n-f,p=i-u,c=Math.sin(e),l=Math.cos(e);return[s*l-p*c+f,s*c+p*l+u]}function bt(t,r){return r?[t[1],-t[0]]:[-t[1],t[0]]}function er(t,r){return+t.toPrecision(r)}function he(t){return t.toLocaleString()}function de(t){return t.toExponential()}function xe(t,r){return r===void 0&&(r=0),Math.abs(t)<1e3?String(t):"".concat(er(t/1e3,r).toLocaleString(),"K")}var ge=function(t,r,e){return t<0&&Number.isFinite(t)?r:e},ye=function(t,r,e){return t>0&&Number.isFinite(t)?r:e},_e=function(t,r){return t*r},be=function(t,r){return t/2+(r||0)/2};function nr(t,r){var e={},a=Array.isArray(r)?r:[r];for(var n in t)a.includes(n)||(e[n]=t[n]);return e}import{__read as ir}from"/tslib?target=es2022";function we(t,r,e,a){var n,i=[],o=!!a,f,u,s=[1/0,1/0],p=[-1/0,-1/0],c,l,v;if(o){n=ir(a,2),s=n[0],p=n[1];for(var m=0,_=t.length;m<_;m+=1){var d=t[m];s=O(s,d),p=N(p,d)}}for(var m=0,y=t.length;m<y;m+=1){var d=t[m];if(m===0&&!e)v=d;else if(m===y-1&&!e)l=d,i.push(v),i.push(l);else{var w=[m?m-1:y-1,m-1][e?0:1];f=t[w],u=t[e?(m+1)%y:m+1];var b=[0,0];b=z(u,f),b=L(b,r);var S=ct(d,f),g=ct(d,u),E=S+g;E!==0&&(S/=E,g/=E);var T=L(b,-S),A=L(b,g);l=B(d,T),c=B(d,A),c=O(c,N(u,d)),c=N(c,O(u,d)),T=z(c,d),T=L(T,-S/g),l=B(d,T),l=O(l,N(f,d)),l=N(l,O(f,d)),A=z(d,l),A=L(A,g/S),c=B(d,A),o&&(l=N(l,s),l=O(l,p),c=N(c,s),c=O(c,p)),i.push(v),i.push(l),v=c}}return e&&i.push(i.shift()),i}function Ae(t,r,e){var a;r===void 0&&(r=!1),e===void 0&&(e=[[0,0],[1,1]]);for(var n=!!r,i=[],o=0,f=t.length;o<f;o+=2)i.push([t[o],t[o+1]]);for(var u=we(i,.4,n,e),s=i.length,p=[],c,l,v,o=0;o<s-1;o+=1)c=u[o*2],l=u[o*2+1],v=i[o+1],p.push(["C",c[0],c[1],l[0],l[1],v[0],v[1]]);return n&&(c=u[s],l=u[s+1],a=ir(i,1),v=a[0],p.push(["C",c[0],c[1],l[0],l[1],v[0],v[1]])),p}var or=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function ar(t){return or.includes(t)}function Se(t){var r={};for(var e in t)ar(e)&&(r[e]=t[e]);return r}function Me(t,r){if(t.length<=r)return t;for(var e=Math.floor(t.length/r),a=[],n=0;n<t.length;n+=e)a.push(t[n]);return a}function fr(t,r,e){e===void 0&&(e=!1);var a=t.getBBox(),n=a.width,i=a.height,o=r/Math.max(n,i);return e&&(t.style.transform="scale(".concat(o,")")),o}import{__classPrivateFieldGet as wt,__read as F,__spreadArray as W,__values as Pe}from"/tslib?target=es2022";import{flatten as Te}from"/@antv/util@^3.3.10?target=es2022";function ur(t,r){var e=new Map;return t.forEach(function(a){var n=r(a);e.has(n)||e.set(n,[]),e.get(n).push(a)}),e}function Ee(t){throw new Error(t)}var sr=(function(){function t(n,i,o,f,u,s,p){n===void 0&&(n=null),i===void 0&&(i=null),o===void 0&&(o=null),f===void 0&&(f=null),u===void 0&&(u=[null,null,null,null,null]),s===void 0&&(s=[]),p===void 0&&(p=[]),r.add(this),this._elements=Array.from(n),this._data=i,this._parent=o,this._document=f,this._enter=u[0],this._update=u[1],this._exit=u[2],this._merge=u[3],this._split=u[4],this._transitions=s,this._facetElements=p}t.prototype.selectAll=function(n){var i=typeof n=="string"?this._parent.querySelectorAll(n):n;return new e(i,null,this._elements[0],this._document)},t.prototype.selectFacetAll=function(n){var i=typeof n=="string"?this._parent.querySelectorAll(n):n;return new e(this._elements,null,this._parent,this._document,void 0,void 0,i)},t.prototype.select=function(n){var i=typeof n=="string"?this._parent.querySelectorAll(n)[0]||null:n;return new e([i],null,i,this._document)},t.prototype.append=function(n){var i=this,o=typeof n=="function"?n:function(){return i.createElement(n)},f=[];if(this._data!==null){for(var u=0;u<this._data.length;u++){var s=this._data[u],p=F(Array.isArray(s)?s:[s,null],2),c=p[0],l=p[1],v=o(c,u);v.__data__=c,l!==null&&(v.__fromElements__=l),this._parent.appendChild(v),f.push(v)}return new e(f,null,this._parent,this._document)}for(var u=0;u<this._elements.length;u++){var m=this._elements[u],c=m.__data__,v=o(c,u);m.appendChild(v),f.push(v)}return new e(f,null,f[0],this._document)},t.prototype.maybeAppend=function(n,i){var o=wt(this,r,"m",a).call(this,n[0]==="#"?n:"#".concat(n),i);return o.attr("id",n),o},t.prototype.maybeAppendByClassName=function(n,i){var o=n.toString(),f=wt(this,r,"m",a).call(this,o[0]==="."?o:".".concat(o),i);return f.attr("className",o),f},t.prototype.maybeAppendByName=function(n,i){var o=wt(this,r,"m",a).call(this,'[name="'.concat(n,'"]'),i);return o.attr("name",n),o},t.prototype.data=function(n,i,o){var f,u;i===void 0&&(i=function(P){return P}),o===void 0&&(o=function(){return null});for(var s=[],p=[],c=new Set(this._elements),l=[],v=new Set,m=new Map(this._elements.map(function(P,k){return[i(P.__data__,k),P]})),_=new Map(this._facetElements.map(function(P,k){return[i(P.__data__,k),P]})),d=ur(this._elements,function(P){return o(P.__data__)}),y=0;y<n.length;y++){var w=n[y],b=i(w,y),S=o(w,y);if(m.has(b)){var g=m.get(b);g.__data__=w,g.__facet__=!1,p.push(g),c.delete(g),m.delete(b)}else if(_.has(b)){var g=_.get(b);g.__data__=w,g.__facet__=!0,p.push(g),_.delete(b)}else if(d.has(b)){var E=d.get(b);l.push([w,E]);try{for(var T=(f=void 0,Pe(E)),A=T.next();!A.done;A=T.next()){var g=A.value;c.delete(g)}}catch(P){f={error:P}}finally{try{A&&!A.done&&(u=T.return)&&u.call(T)}finally{if(f)throw f.error}}d.delete(b)}else if(m.has(S)){var g=m.get(S);g.__toData__?g.__toData__.push(w):g.__toData__=[w],v.add(g),c.delete(g)}else s.push(w)}var I=[new e([],s,this._parent,this._document),new e(p,null,this._parent,this._document),new e(c,null,this._parent,this._document),new e([],l,this._parent,this._document),new e(v,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,I)},t.prototype.merge=function(n){var i=W(W([],F(this._elements),!1),F(n._elements),!1),o=W(W([],F(this._transitions),!1),F(n._transitions),!1);return new e(i,null,this._parent,this._document,void 0,o)},t.prototype.createElement=function(n){if(this._document)return this._document.createElement(n,{});var i=e.registry[n];return i?new i:Ee("Unknown node type: ".concat(n))},t.prototype.join=function(n,i,o,f,u){n===void 0&&(n=function(m){return m}),i===void 0&&(i=function(m){return m}),o===void 0&&(o=function(m){return m.remove()}),f===void 0&&(f=function(m){return m}),u===void 0&&(u=function(m){return m.remove()});var s=n(this._enter),p=i(this._update),c=o(this._exit),l=f(this._merge),v=u(this._split);return p.merge(s).merge(c).merge(l).merge(v)},t.prototype.remove=function(){for(var n=function(f){var u=i._elements[f],s=i._transitions[f];s?s.then(function(){return u.remove()}):u.remove()},i=this,o=0;o<this._elements.length;o++)n(o);return new e([],null,this._parent,this._document,void 0,this._transitions)},t.prototype.each=function(n){for(var i=0;i<this._elements.length;i++){var o=this._elements[i],f=o.__data__;n.call(o,f,i)}return this},t.prototype.attr=function(n,i){var o=typeof i!="function"?function(){return i}:i;return this.each(function(f,u){i!==void 0&&(this[n]=o.call(this,f,u))})},t.prototype.style=function(n,i,o){o===void 0&&(o=!0);var f=typeof i!="function"||!o?function(){return i}:i;return this.each(function(u,s){i!==void 0&&(this.style[n]=f.call(this,u,s))})},t.prototype.styles=function(n,i){return n===void 0&&(n={}),i===void 0&&(i=!0),this.each(function(o,f){var u=this;Object.entries(n).forEach(function(s){var p=F(s,2),c=p[0],l=p[1],v=typeof l!="function"||!i?function(){return l}:l;l!==void 0&&u.attr(c,v.call(u,o,f))})})},t.prototype.update=function(n,i){i===void 0&&(i=!0);var o=typeof n!="function"||!i?function(){return n}:n;return this.each(function(f,u){n&&this.update&&this.update(o.call(this,f,u))})},t.prototype.maybeUpdate=function(n,i){i===void 0&&(i=!0);var o=typeof n!="function"||!i?function(){return n}:n;return this.each(function(f,u){n&&this.update&&this.update(o.call(this,f,u))})},t.prototype.transition=function(n){var i=this._transitions,o=new Array(this._elements.length);return this.each(function(f,u){o[u]=n.call(this,f,u)}),this._transitions=Te(o),this},t.prototype.on=function(n,i){return this.each(function(){this.addEventListener(n,i)}),this},t.prototype.call=function(n){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return n.call.apply(n,W([this._parent,this],F(i),!1)),this},t.prototype.node=function(){return this._elements[0]},t.prototype.nodes=function(){return this._elements},t.prototype.transitions=function(){return this._transitions.filter(function(n){return!!n})},t.prototype.parent=function(){return this._parent};var r,e,a;return e=t,r=new WeakSet,a=function(i,o){var f=this._elements[0],u=f.querySelector(i);if(u)return new e([u],null,this._parent,this._document);var s=typeof o=="string"?this.createElement(o):o();return f.appendChild(s),new e([s],null,this._parent,this._document)},t.registry={g:et,rect:zt,circle:jt,path:it,text:ft,ellipse:Bt,image:Dt,line:Gt,polygon:Rt,polyline:Vt,html:nt},t})();function Y(t){return new sr([t],null,t,t.ownerDocument)}function Le(t,r,e){return t.querySelector(r)?Y(t).select(r):Y(t).append(e)}import{isNumber as Oe,isArray as Ne}from"/@antv/util@^3.3.10?target=es2022";function D(t){if(Oe(t))return[t,t,t,t];if(Ne(t)){var r=t.length;if(r===1)return[t[0],t[0],t[0],t[0]];if(r===2)return[t[0],t[1],t[0],t[1]];if(r===3)return[t[0],t[1],t[2],t[1]];if(r===4)return t}return[0,0,0,0]}import{__assign as lr,__read as C,__values as Ce}from"/tslib?target=es2022";function ke(t){var r=t&&t.getRenderBounds();if(!r)return{width:0,height:0};var e=r.getMax(),a=r.getMin();return{width:e[0]-a[0],height:e[1]-a[1]}}function Fe(t){var r=t.getLocalBounds(),e=r.min,a=r.max,n=C([e,a],2),i=C(n[0],2),o=i[0],f=i[1],u=C(n[1],2),s=u[0],p=u[1];return{x:o,y:f,width:s-o,height:p-f,left:o,bottom:p,top:f,right:s}}function Ie(t,r){var e=Y(t).append("text").node();return e.attr(lr(lr({},r),{visibility:"hidden"})),e}function je(t,r){var e=C(t,2),a=e[0],n=e[1],i=C(r,2),o=i[0],f=i[1];return a!==o&&n===f}function Be(t,r){var e=C(t,2),a=e[0],n=e[1],i=C(r,2),o=i[0],f=i[1];return a===o&&n!==f}function De(t,r){var e,a,n=r.attributes;try{for(var i=Ce(Object.entries(n)),o=i.next();!o.done;o=i.next()){var f=C(o.value,2),u=f[0],s=f[1];u!=="id"&&u!=="className"&&t.attr(u,s)}}catch(p){e={error:p}}finally{try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(e)throw e.error}}}function H(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function cr(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}function At(t,r){return"".concat(r).concat(H(t))}function pt(t,r,e){var a;e===void 0&&(e=!0);var n=r||((a=t.match(/^([a-z][a-z0-9]+)/))===null||a===void 0?void 0:a[0])||"",i=t.replace(new RegExp("^(".concat(n,")")),"");return e?cr(i):i}import{__read as X,__spreadArray as Ge}from"/tslib?target=es2022";function Re(t,r){Object.entries(r).forEach(function(e){var a=X(e,2),n=a[0],i=a[1];Ge([t],X(t.querySelectorAll(n)),!1).filter(function(o){return o.matches(n)}).forEach(function(o){if(o){var f=o;f.style.cssText+=Object.entries(i).reduce(function(u,s){return"".concat(u).concat(s.join(":"),";")},"")}})})}var mt=function(t,r){if(!t?.startsWith(r))return!1;var e=t[r.length];return e>="A"&&e<="Z"};function pr(t,r,e){e===void 0&&(e=!1);var a={};return Object.entries(t).forEach(function(n){var i=X(n,2),o=i[0],f=i[1];if(!(o==="className"||o==="class")){if(mt(o,"show")&&mt(pt(o,"show"),r)!==e)o===At(r,"show")?a[o]=f:a[o.replace(new RegExp(H(r)),"")]=f;else if(!mt(o,"show")&&mt(o,r)!==e){var u=pt(o,r);u==="filter"&&typeof f=="function"||(a[u]=f)}}}),a}function Ve(t,r){return Object.entries(t).reduce(function(e,a){var n=X(a,2),i=n[0],o=n[1];return i.startsWith("show")?e["show".concat(r).concat(i.slice(4))]=o:e["".concat(r).concat(H(i))]=o,e},{})}function ze(t,r){r===void 0&&(r=["x","y","class","className"]);var e=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],a={},n={};return Object.entries(t).forEach(function(i){var o=X(i,2),f=o[0],u=o[1];r.includes(f)||(e.indexOf(f)!==-1?n[f]=u:a[f]=u)}),[a,n]}import{__read as We}from"/tslib?target=es2022";import Ye from"/svg-path-parser@^1.1.0?target=es2022";function mr(t,r,e){return r===void 0&&(r=1024),e===void 0&&(e=1014),function(a,n,i){var o=Ye(t);return o.map(function(f){var u=[];u.push(f.relative===!0?f.code.toLowerCase():f.code.toUpperCase());var s=[[f.x1,f.y1],[f.x2,f.y2],[f.x,f.y]];return s.forEach(function(p){var c=We(p,2),l=c[0],v=c[1];l!==void 0&&u.push(f.relative===!0?l/r*2*i:a-i+i*2*(l/r)),v!==void 0&&u.push(f.relative===!0?v/e*2*i:n-i+i*2*(v/e))}),u})}}function He(t){var r=/<path\s+d="(.*?)"/i.exec(t),e=/viewBox="\d+\s+\d+\s+(\d+)\s+(\d+)"/i.exec(t);if(r===null||r.length<2)return function(){return[]};var a=1024,n=1024;return e!==null&&e.length>=3&&(Number.isNaN(parseInt(e[1],10))||(a=parseInt(e[1],10)),Number.isNaN(parseInt(e[2],10))||(n=parseInt(e[2],10))),mr(r[1],a,n)}function Xe(t,r){return t===void 0&&(t=0),r===void 0&&(r=!1),function(e,a,n){var i=n.value,o;typeof i=="function"&&(n.value=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];if(!o){var s=this;r&&i.apply(s,f),o=window.setTimeout(function(){i.apply(s,f),o=null},t)}})}}import{__read as hr}from"/tslib?target=es2022";var vr=["year","month","day","hour","minute","second"],Ue=["YYYY","MM","DD","hh","mm","ss"];function U(t){return t instanceof Date?t:new Date(t)}function dr(t){for(var r=hr(t,2),e=r[0],a=r[1],n=vr.indexOf(e),i=vr.indexOf(a),o="",f=n;f<=i;f+=1)if(o+=Ue[f],f<i){var u="-";f===2?u=" ":f>2&&(u=":"),o+=u}return o}function xr(t,r){var e={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),HH:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},a=r;return Object.keys(e).forEach(function(n){var i=e[n];a=a.replace(n,n==="YYYY"?"".concat(i):"".concat(i).padStart(2,"0"))}),a}function qe(t,r){return U(t).getTime()-U(r).getTime()}function Ke(t,r){var e=hr([U(t),U(r)],2),a=e[0],n=e[1];return a.getFullYear()!==n.getFullYear()?"year":a.getMonth()!==n.getMonth()?"month":a.getDay()!==n.getDay()?"day":a.getHours()!==n.getHours()?"hour":a.getMinutes()!==n.getMinutes()?"minute":"second"}function Ze(t,r){var e=new Date(t),a={year:function(n){n.setMonth(0),n.setHours(0,0,0,0)},month:function(n){n.setDate(1),n.setHours(0,0,0,0)},day:function(n){return n.setHours(0,0,0,0)},hour:function(n){return n.setMinutes(0,0,0)},minute:function(n){return n.setSeconds(0,0)},second:function(n){return n.setMilliseconds(0)}};return a[r](e),xr(e,dr(["year",r]))}function $e(t){var r=localStorage.getItem("__debug__");return function(e,a,n){var i="[".concat(a,"] ").concat(t),o=n.value;typeof o=="function"&&(n.value=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];r&&console.time(i),o.apply(this,f),r&&console.timeEnd(i)})}}import{__read as Je}from"/tslib?target=es2022";function gr(t,r,e){var a=t.getBBox(),n=a.width,i=a.height,o=Je([r,e].map(function(s,p){var c;return s.includes("%")?parseFloat(((c=s.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||c===void 0?void 0:c[0])||"0")/100*(p===0?n:i):s}),2),f=o[0],u=o[1];return[f,u]}function Qe(t,r){if(r)try{var e=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,a=r.replace(e,function(n,i,o){return"translate(".concat(gr(t,i,o),")")});t.attr("transform",a)}catch{}}function tn(t){var r;return((r=t[0])===null||r===void 0?void 0:r.map(function(e,a){return t.map(function(n){return n[a]})}))||[]}import{__read as rn,__spreadArray as en}from"/tslib?target=es2022";var nn=function(t,r){if(r==null){t.innerHTML="";return}t.replaceChildren?Array.isArray(r)?t.replaceChildren.apply(t,en([],rn(r),!1)):t.replaceChildren(r):(t.innerHTML="",Array.isArray(r)?r.forEach(function(e){return t.appendChild(e)}):t.appendChild(r))};function on(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(r){return r[0]}):t.length>2?[t[0]]:t.split("")}import{__read as an}from"/tslib?target=es2022";var fn=function(t){var r=new DOMParser,e=r.parseFromString(t,"text/html"),a=e.body.firstElementChild;if(console.log(a?.getClientRects(),11),!a)return 0;var n=a.getAttribute("style")||"",i=Object.fromEntries(n.split(";").map(function(d){return d.trim()}).filter(function(d){return d.includes(":")}).map(function(d){var y=an(d.split(":").map(function(S){return S.trim()}),2),w=y[0],b=y[1];return[w.toLowerCase(),b]})),o=function(d){if(!d)return 0;var y=d.match(/([\d.]+)px/);return y?parseFloat(y[1]):0};if(i.height)return o(i.height);var f=o(i["font-size"])||16,u=i["line-height"],s;!u||u==="normal"?s=1.2*f:u.endsWith("px")?s=o(u):/^[\d.]+$/.test(u)?s=parseFloat(u)*f:s=f;var p=o(i["padding-top"]),c=o(i["padding-bottom"]);if(i.padding){var l=i.padding.split(/\s+/).map(o);l.length===1||l.length===2?(p=l[0],c=l[0]):(l.length===3||l.length===4)&&(p=l[0],c=l[2])}var v=o(i["border-top-width"]),m=o(i["border-bottom-width"]);if(i.border){var _=i.border.match(/([\d.]+)px/);_&&(v=parseFloat(_[1]),m=parseFloat(_[1]))}if(i["border-width"]){var l=i["border-width"].split(/\s+/).map(o);l.length===1||l.length===2?(v=l[0],m=l[0]):(l.length===3||l.length===4)&&(v=l[0],m=l[2])}return s+p+c+v+m};import{__read as St,__spreadArray as Ia}from"/tslib?target=es2022";import{isFunction as Ba}from"/@antv/util@^3.3.10?target=es2022";function yr(t,r){var e=r.startAngle,a=r.endAngle;return(a-e)*t+e}function Mt(t,r){if(r.type==="linear"){var e=St(r.startPos,2),a=e[0],n=e[1],i=St(r.endPos,2),o=i[0],f=i[1],u=St([o-a,f-n],2),s=u[0],p=u[1];return _t([s,p])}var c=j(yr(t,r));return[-Math.sin(c),Math.cos(c)]}function un(t,r,e){var a=Mt(t,e);return bt(a,r!=="positive")}function _r(t,r){return un(t,r.labelDirection,r)}import{__read as $a,__spreadArray as Ja}from"/tslib?target=es2022";import{get as tf}from"/@antv/util@^3.3.10?target=es2022";import{deepMix as br}from"/@antv/util@^3.3.10?target=es2022";var M={gridGroup:"grid-group",mainGroup:"main-group",lineGroup:"line-group",tickGroup:"tick-group",labelGroup:"label-group",titleGroup:"title-group",grid:"grid",line:"line",lineFirst:"line-first",lineSecond:"line-second",tick:"tick",tickItem:"tick-item",label:"label",labelItem:"label-item",title:"title"};var wr={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new it({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]},Ha=br({},wr,{style:{type:"arc"}}),Xa=br({},wr,{style:{}}),sn=dt({mainGroup:M.mainGroup,gridGroup:M.gridGroup,grid:M.grid,lineGroup:M.lineGroup,line:M.line,tickGroup:M.tickGroup,tick:M.tick,tickItem:M.tickItem,labelGroup:M.labelGroup,label:M.label,labelItem:M.labelItem,titleGroup:M.titleGroup,title:M.title,lineFirst:M.lineFirst,lineSecond:M.lineSecond},"axis");function Pt(t,r,e){return e?"".concat(t," ").concat(e,"axis-").concat(r):t}function qa(t,r,e){var a=t.classNamePrefix,n=a===void 0?"":a;return Pt(r.name,e,n)}function ln(t,r,e,a){return a&&t.attr("className",Pt(r.name,e,a)),t}function Ar(t){return Mt(0,t)[0]===0}import{__read as Tt}from"/tslib?target=es2022";var vt=(function(){function t(r,e,a,n){this.set(r,e,a,n)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(r,e,a){var n=this,i=n.x1,o=n.y1,f=n.x2,u=n.y2,s=Math.cos(r),p=Math.sin(r),c=e-e*s+a*p,l=a-e*p-a*s,v=[[s*i-p*u+c,p*i+s*u+l],[s*f-p*u+c,p*f+s*u+l],[s*i-p*o+c,p*i+s*o+l],[s*f-p*o+c,p*f+s*o+l]];return v},t.prototype.set=function(r,e,a,n){return a<r?(this.x2=r,this.x1=a):(this.x1=r,this.x2=a),n<e?(this.y2=e,this.y1=n):(this.y1=e,this.y2=n),this},t.prototype.defined=function(r){return this[r]!==Number.MAX_VALUE&&this[r]!==-Number.MAX_VALUE},t})();function q(t,r){var e=t.getEulerAngles()||0;t.setEulerAngles(0);var a=t.getBounds(),n=Tt(a.min,2),i=n[0],o=n[1],f=Tt(a.max,2),u=f[0],s=f[1],p=t.getBBox(),c=p.width,l=p.height,v=l,m=0,_=0,d=i,y=o,w=rt(t);if(w){v-=1.5;var b=w.style.textAlign,S=w.style.textBaseline;b==="center"?d=(i+u)/2:(b==="right"||b==="end")&&(d=u),S==="middle"?y=(o+s)/2:S==="bottom"&&(y=s)}var g=Tt(D(r),4),E=g[0],T=E===void 0?0:E,A=g[1],I=A===void 0?0:A,P=g[2],k=P===void 0?T:P,J=g[3],ht=J===void 0?I:J,Q=new vt((m+=i)-ht,(_+=o)-T,m+c+I,_+v+k);return t.setEulerAngles(e),Q.rotatedPoints(j(e),d,y)}function K(t,r){return r[0]<=Math.max(t[0][0],t[1][0])&&r[0]<=Math.min(t[0][0],t[1][0])&&r[1]<=Math.max(t[0][1],t[1][1])&&r[1]<=Math.min(t[0][1],t[1][1])}function Z(t,r,e){var a=(r[1]-t[1])*(e[0]-r[0])-(r[0]-t[0])*(e[1]-r[1]);return a===0?0:a<0?2:1}function cn(t,r){var e=Z(t[0],t[1],r[0]),a=Z(t[0],t[1],r[1]),n=Z(r[0],r[1],t[0]),i=Z(r[0],r[1],t[1]);return!!(e!==a&&n!==i||e===0&&K(t,r[0])||a===0&&K(t,r[1])||n===0&&K(r,t[0])||i===0&&K(r,t[1]))}function pn(t,r){var e=t.length;if(e<3)return!1;var a=[r,[9999,r[1]]],n=0,i=0;do{var o=[t[i],t[(i+1)%e]];if(cn(o,a)){if(Z(o[0],r,o[1])===0)return K(o,r);n++}i=(i+1)%e}while(i!==0);return!!(n&1)}function mn(t,r){return r.every(function(e){return pn(t,e)})}function Sr(t,r,e){var a=t.x1,n=t.x2,i=t.y1,o=t.y2,f=[[a,i],[n,i],[n,o],[a,o]],u=q(r,e);return mn(f,u)}import{__read as Mr,__values as vn}from"/tslib?target=es2022";function hn(t,r){var e=Mr(t,4),a=e[0],n=e[1],i=e[2],o=e[3],f=Mr(r,4),u=f[0],s=f[1],p=f[2],c=f[3],l=i-a,v=o-n,m=p-u,_=c-s,d=l*_-m*v;if(d===0)return!1;var y=d>0,w=a-u,b=n-s,S=l*b-v*w;if(S<0===y)return!1;var g=m*b-_*w;return!(g<0===y||S>d===y||g>d===y)}function dn(t,r){var e=[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]];return e.some(function(a){return hn(r,a)})}function Pr(t,r,e){var a,n,i=q(t,e).flat(1),o=q(r,e).flat(1),f=[[i[0],i[1],i[2],i[3]],[i[0],i[1],i[4],i[5]],[i[4],i[5],i[6],i[7]],[i[2],i[3],i[6],i[7]]];try{for(var u=vn(f),s=u.next();!s.done;s=u.next()){var p=s.value;if(dn(o,p))return!0}}catch(c){a={error:c}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(a)throw a.error}}return!1}function gn(t,r){var e=t.type,a=t.labelDirection,n=t.crossSize;if(!n)return!1;if(e==="arc"){var i=t.center,o=t.radius,f=$(i,2),u=f[0],s=f[1],p=a==="negative"?0:n,c=-o-p,l=o+p,v=$(D(r),4),m=v[0],_=v[1],d=v[2],y=v[3];return new vt(u+c-y,s+c-m,u+l+_,s+l+d)}var w=$(t.startPos,2),b=w[0],S=w[1],g=$(t.endPos,2),E=g[0],T=g[1],A=$(Ar(t)?[-r,0,r,0]:[0,r,0,-r],4),I=A[0],P=A[1],k=A[2],J=A[3],ht=_r(0,t),Q=L(ht,n),G=new vt(b,S,E,T);return G.x1+=J,G.y1+=I,G.x2+=P+Q[0],G.y2+=k+Q[1],G}function Af(t,r,e){var a,n,i=r.crossPadding,o=new Set,f=null,u=gn(r,i),s=function(m){return u?Sr(u,m):!0},p=function(m,_){return!m||!m.firstChild?!0:!Pr(m.firstChild,_.firstChild,D(e))};try{for(var c=xn(t),l=c.next();!l.done;l=c.next()){var v=l.value;s(v)?!f||p(f,v)?f=v:(o.add(f),o.add(v)):o.add(v)}}catch(m){a={error:m}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(a)throw a.error}}return Array.from(o)}function Mf(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var e=function(a){return a==="positive"?-1:1};return t.reduce(function(a,n){return a*e(n)},1)}export{ln as applyClassName,Af as boundTest,Pt as getAxisClassName,qa as getClassNameFromAttrs,Mf as getFactor};
|
|
3
|
-
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/* esm.sh - @antv/component@2.1.11/esm/util/layout */
|
|
2
|
-
import{__read as B}from"/tslib?target=es2022";import{__read as H}from"/tslib?target=es2022";import{__read as q}from"/tslib?target=es2022";var l=(function(){function e(t,r,s,n){t===void 0&&(t=0),r===void 0&&(r=0),s===void 0&&(s=0),n===void 0&&(n=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=r,this.width=s,this.height=n}return Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},e.prototype.isPointIn=function(t,r){return t>=this.left&&t<=this.right&&r>=this.top&&r<=this.bottom},e})();function w(e){for(var t=1/0,r=1/0,s=-1/0,n=-1/0,m=0;m<e.length;m++){var h=e[m],x=h.x,d=h.y,c=h.width,g=h.height,v=H([x+c,d+g],2),b=v[0],p=v[1];x<t&&(t=x),d<r&&(r=d),b>s&&(s=b),p>n&&(n=p)}return new l(t,r,s-t,n-r)}var A=function(e,t,r){var s=e.width,n=e.height,m=r.flexDirection,h=m===void 0?"row":m,x=r.flexWrap,d=x===void 0?"nowrap":x,c=r.justifyContent,g=c===void 0?"flex-start":c,v=r.alignContent,b=v===void 0?"flex-start":v,p=r.alignItems,J=p===void 0?"flex-start":p,u=h==="row",j=h==="row"||h==="column",C=u?j?[1,0]:[-1,0]:j?[0,1]:[0,-1],F=B([0,0],2),_=F[0],I=F[1],O=t.map(function(f){var o,a=f.width,i=f.height,Y=B([_,I],2),W=Y[0],k=Y[1];return o=B([_+a*C[0],I+i*C[1]],2),_=o[0],I=o[1],new l(W,k,a,i)}),y=w(O),R={"flex-start":0,"flex-end":u?s-y.width:n-y.height,center:u?(s-y.width)/2:(n-y.height)/2},P=O.map(function(f){var o=f.x,a=f.y,i=l.fromRect(f);return i.x=u?o+R[g]:o,i.y=u?a:a+R[g],i}),S=w(P),X=function(f){var o=B(u?["height",n]:["width",s],2),a=o[0],i=o[1];switch(J){case"flex-start":return 0;case"flex-end":return i-f[a];case"center":return i/2-f[a]/2;default:return 0}},z=P.map(function(f){var o=f.x,a=f.y,i=l.fromRect(f);return i.x=u?o:o+X(i),i.y=u?a+X(i):a,i}),L=z.map(function(f){var o,a,i=l.fromRect(f);return i.x+=(o=e.x)!==null&&o!==void 0?o:0,i.y+=(a=e.y)!==null&&a!==void 0?a:0,i});return L};var D=function(e,t,r){return[]};var N=(function(e,t,r){if(t.length===0)return[];var s={flex:A,grid:D},n=r.display in s?s[r.display]:null;return n?.call(null,e,t,r)||[]});export{N as calcLayout,A as flex,D as grid};
|
|
3
|
-
//# sourceMappingURL=layout.mjs.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* esm.sh - @antv/g-canvas@2.2.0 */
|
|
2
|
-
function re(n){"@babel/helpers - typeof";return re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},re(n)}function Ve(n,t){if(re(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var e=a.call(n,t||"default");if(re(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function Ce(n){var t=Ve(n,"string");return re(t)=="symbol"?t:t+""}function Je(n,t){for(var a=0;a<t.length;a++){var e=t[a];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,Ce(e.key),e)}}function j(n,t,a){return t&&Je(n.prototype,t),a&&Je(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n}function X(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ke(n){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ke(n)}function $e(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($e=function(){return!!n})()}function Ke(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Qe(n,t){if(t&&(re(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ke(n)}function se(n,t,a){return t=ke(t),Qe(n,$e()?Reflect.construct(t,a||[],ke(n).constructor):t.apply(n,a))}function Oe(n,t){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,e){return a.__proto__=e,a},Oe(n,t)}function fe(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&Oe(n,t)}import{AABB as Ae,CustomEvent as kr,CanvasEvent as Pr,Shape as T,Node as Cr,GradientType as tr,isPattern as Ee,AbstractRendererPlugin as Ie,findClosestClipPathTarget as Or,Point as Tr,isFillOrStrokeAffected as ye,getOrCalculatePathTotalLength as Mr,isDisplayObject as ve,setDOMSize as Sr,RenderReason as Ar,AbstractRenderer as _r,ImageLoader as br,DomInteraction as Rr,HTMLRenderer as Er}from"/@antv/g-lite@2.7.0/es2022/g-lite.mjs";import{DomInteraction as Ja,HTMLRenderer as Ka,ImageLoader as Qa}from"/@antv/g-lite@2.7.0/es2022/g-lite.mjs";function _(n,t,a){return(t=Ce(t))in n?Object.defineProperty(n,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[t]=a,n}function Ye(n,t){var a=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);t&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),a.push.apply(a,e)}return a}function ge(n){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Ye(Object(a),!0).forEach(function(e){_(n,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):Ye(Object(a)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))})}return n}function Ze(n){if(Array.isArray(n))return n}function qe(n,t){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var e,r,i,o,l=[],s=!0,f=!1;try{if(i=(a=a.call(n)).next,t===0){if(Object(a)!==a)return;s=!1}else for(;!(s=(e=i.call(a)).done)&&(l.push(e.value),l.length!==t);s=!0);}catch(u){f=!0,r=u}finally{try{if(!s&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(f)throw r}}return l}}function xe(n,t){(t==null||t>n.length)&&(t=n.length);for(var a=0,e=Array(t);a<t;a++)e[a]=n[a];return e}function Te(n,t){if(n){if(typeof n=="string")return xe(n,t);var a={}.toString.call(n).slice(8,-1);return a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set"?Array.from(n):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?xe(n,t):void 0}}function Ue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H(n,t){return Ze(n)||qe(n,t)||Te(n,t)||Ue()}function te(n,t){if(!{}.hasOwnProperty.call(n,t))throw new TypeError("attempted to use private field on non-instance");return n}var wr=0;function je(n){return"__private_"+wr+++"_"+n}import{mat4 as Q,vec3 as W}from"/gl-matrix@^3.4.3?target=es2022";import{isNil as $,arcToCubic as Dr,clamp as lr,isString as Fr}from"/@antv/util@^3.3.5?target=es2022";function We(n,t){var a=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=Te(n))||t&&n&&typeof n.length=="number"){a&&(n=a);var e=0,r=function(){};return{s:r,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(f){throw f},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,o=!0,l=!1;return{s:function(){a=a.call(n)},n:function(){var f=a.next();return o=f.done,f},e:function(f){l=!0,i=f},f:function(){try{o||a.return==null||a.return()}finally{if(l)throw i}}}}function Me(n,t){this.v=n,this.k=t}function z(n,t,a,e){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}z=function(o,l,s,f){function u(h,v){z(o,h,function(c){return this._invoke(h,v,c)})}l?r?r(o,l,{value:s,enumerable:!f,configurable:!f,writable:!f}):o[l]=s:(u("next",0),u("throw",1),u("return",2))},z(n,t,a,e)}function Pe(){var n,t,a=typeof Symbol=="function"?Symbol:{},e=a.iterator||"@@iterator",r=a.toStringTag||"@@toStringTag";function i(c,d,y,p){var m=d&&d.prototype instanceof l?d:l,g=Object.create(m.prototype);return z(g,"_invoke",(function(w,k,M){var S,C,O,P=0,b=M||[],A=!1,R={p:0,n:0,v:n,a:F,f:F.bind(n,4),d:function(E,I){return S=E,C=0,O=n,R.n=I,o}};function F(D,E){for(C=D,O=E,t=0;!A&&P&&!I&&t<b.length;t++){var I,L=b[t],N=R.p,V=L[2];D>3?(I=V===E)&&(O=L[(C=L[4])?5:(C=3,3)],L[4]=L[5]=n):L[0]<=N&&((I=D<2&&N<L[1])?(C=0,R.v=E,R.n=L[1]):N<V&&(I=D<3||L[0]>E||E>V)&&(L[4]=D,L[5]=E,R.n=V,C=0))}if(I||D>1)return o;throw A=!0,E}return function(D,E,I){if(P>1)throw TypeError("Generator is already running");for(A&&E===1&&F(E,I),C=E,O=I;(t=C<2?n:O)||!A;){S||(C?C<3?(C>1&&(R.n=-1),F(C,O)):R.n=O:R.v=O);try{if(P=2,S){if(C||(D="next"),t=S[D]){if(!(t=t.call(S,O)))throw TypeError("iterator result is not an object");if(!t.done)return t;O=t.value,C<2&&(C=0)}else C===1&&(t=S.return)&&t.call(S),C<2&&(O=TypeError("The iterator does not provide a '"+D+"' method"),C=1);S=n}else if((t=(A=R.n<0)?O:w.call(k,R))!==o)break}catch(L){S=n,C=1,O=L}finally{P=1}}return{value:t,done:A}}})(c,y,p),!0),g}var o={};function l(){}function s(){}function f(){}t=Object.getPrototypeOf;var u=[][e]?t(t([][e]())):(z(t={},e,function(){return this}),t),h=f.prototype=l.prototype=Object.create(u);function v(c){return Object.setPrototypeOf?Object.setPrototypeOf(c,f):(c.__proto__=f,z(c,r,"GeneratorFunction")),c.prototype=Object.create(h),c}return s.prototype=f,z(h,"constructor",f),z(f,"constructor",s),s.displayName="GeneratorFunction",z(f,r,"GeneratorFunction"),z(h),z(h,r,"Generator"),z(h,e,function(){return this}),z(h,"toString",function(){return"[object Generator]"}),(Pe=function(){return{w:i,m:v}})()}function we(n,t){function a(r,i,o,l){try{var s=n[r](i),f=s.value;return f instanceof Me?t.resolve(f.v).then(function(u){a("next",u,o,l)},function(u){a("throw",u,o,l)}):t.resolve(f).then(function(u){s.value=u,o(s)},function(u){return a("throw",u,o,l)})}catch(u){l(u)}}var e;this.next||(z(we.prototype),z(we.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),z(this,"_invoke",function(r,i,o){function l(){return new t(function(s,f){a(r,o,s,f)})}return e=e?e.then(l,l):l()},!0)}function Se(n,t,a,e,r){return new we(Pe().w(n,t,a,e),r||Promise)}function Xe(n,t,a,e,r){var i=Se(n,t,a,e,r);return i.next().then(function(o){return o.done?o.value:i.next()})}function er(n){var t=Object(n),a=[];for(var e in t)a.unshift(e);return function r(){for(;a.length;)if((e=a.pop())in t)return r.value=e,r.done=!1,r;return r.done=!0,r}}function Be(n){if(n!=null){var t=n[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],a=0;if(t)return t.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length))return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}}}throw new TypeError(re(n)+" is not iterable")}function de(){"use strict";var n=Pe(),t=n.m(de),a=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function e(o){var l=typeof o=="function"&&o.constructor;return!!l&&(l===a||(l.displayName||l.name)==="GeneratorFunction")}var r={throw:1,return:2,break:3,continue:3};function i(o){var l,s;return function(f){l||(l={stop:function(){return s(f.a,2)},catch:function(){return f.v},abrupt:function(h,v){return s(f.a,r[h],v)},delegateYield:function(h,v,c){return l.resultName=v,s(f.d,Be(h),c)},finish:function(h){return s(f.f,h)}},s=function(h,v,c){f.p=l.prev,f.n=l.next;try{return h(v,c)}finally{l.next=f.n}}),l.resultName&&(l[l.resultName]=f.v,l.resultName=void 0),l.sent=f.v,l.next=f.n;try{return o.call(this,l)}finally{f.p=l.prev,f.n=l.next}}}return(de=function(){return{wrap:function(s,f,u,h){return n.w(i(s),f,u,h&&h.reverse())},isGeneratorFunction:e,mark:n.m,awrap:function(s,f){return new Me(s,f)},AsyncIterator:we,async:function(s,f,u,h,v){return(e(f)?Se:Xe)(i(s),f,u,h,v)},keys:er,values:Be}})()}function rr(n,t,a,e,r,i,o){try{var l=n[i](o),s=l.value}catch(f){return void a(f)}l.done?t(s):Promise.resolve(s).then(e,r)}function Ne(n){return function(){var t=this,a=arguments;return new Promise(function(e,r){var i=n.apply(t,a);function o(s){rr(i,e,r,o,l,"next",s)}function l(s){rr(i,e,r,o,l,"throw",s)}o(void 0)})}}import{distance as sr,linePointToLine as Lr,cubicPointDistance as ar,quadPointDistance as Ir}from"/@antv/g-math@3.1.0/es2022/g-math.mjs";var B=je("renderState"),fr=(function(){function n(t){X(this,n),this.renderQueue=[],Object.defineProperty(this,B,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=Q.create(),this.dprMatrix=Q.create(),this.tmpMat4=Q.create(),this.vec3a=W.create(),this.vec3b=W.create(),this.vec3c=W.create(),this.vec3d=W.create(),this.canvasRendererPluginOptions=t}return j(n,[{key:"apply",value:function(a,e){var r=this;this.context=a;var i=this.context,o=i.config,l=i.camera,s=i.renderingService,f=i.renderingContext,u=i.pathGeneratorFactory,h=o.renderer.getConfig().enableRenderingOptimization;o.renderer.getConfig().enableDirtyCheck=!1,o.renderer.getConfig().enableDirtyRectangleRendering=!1,this.pathGeneratorFactory=u;var v=a.contextService,c=f.root.ownerDocument.defaultView;s.hooks.init.tap(n.tag,function(){var p=v.getDPR(),m=o.width,g=o.height,w=v.getContext();r.clearRect(w,0,0,m*p,g*p,o.background)}),s.hooks.destroy.tap(n.tag,function(){r.renderQueue=[],te(r,B)[B]={restoreStack:[],prevObject:null,currentContext:null}});var d=function(){var m,g=v.getContext(),w=v.getDPR(),k=o.width,M=o.height,S=r.canvasRendererPluginOptions,C=S.dirtyObjectNumThreshold,O=S.dirtyObjectRatioThreshold,P=s.getStats(),b=P.total,A=P.rendered,R=A/b;r.clearFullScreen=r.clearFullScreenLastFrame||!((m=c.context.renderingPlugins[1])!==null&&m!==void 0&&m.isFirstTimeRenderingFinished)||s.disableDirtyRectangleRendering()||A>C&&R>O,g&&(typeof g.resetTransform=="function"?g.resetTransform():g.setTransform(1,0,0,1,0,0),r.clearFullScreen&&r.clearRect(g,0,0,k*w,M*w,o.background))},y=function(m,g){for(var w=[m];w.length>0;){var k,M=w.pop();M.isVisible()&&!M.isCulled()&&(h?r.renderDisplayObjectOptimized(M,g,r.context,te(r,B)[B],e):r.renderDisplayObject(M,g,r.context,te(r,B)[B],e));for(var S=((k=M.sortable)===null||k===void 0||(k=k.sorted)===null||k===void 0?void 0:k.length)>0?M.sortable.sorted:M.childNodes,C=S.length-1;C>=0;C--)w.push(S[C])}};s.hooks.endFrame.tap(n.tag,function(){if(d(),f.root.childNodes.length===0){r.clearFullScreenLastFrame=!0;return}h=o.renderer.getConfig().enableRenderingOptimization,te(r,B)[B]={restoreStack:[],prevObject:null,currentContext:te(r,B)[B].currentContext},te(r,B)[B].currentContext.clear(),r.clearFullScreenLastFrame=!1;var p=v.getContext(),m=v.getDPR();if(Q.fromScaling(r.dprMatrix,[m,m,1]),Q.multiply(r.vpMatrix,r.dprMatrix,l.getOrthoMatrix()),r.clearFullScreen)h?(p.save(),y(f.root,p),p.restore()):y(f.root,p);else{var g=r.safeMergeAABB(r.mergeDirtyAABBs(r.renderQueue));if(Ae.isEmpty(g)){r.renderQueue=[];return}var w=r.convertAABB2Rect(g),k=w.x,M=w.y,S=w.width,C=w.height,O=W.transformMat4(r.vec3a,[k,M,0],r.vpMatrix),P=W.transformMat4(r.vec3b,[k+S,M,0],r.vpMatrix),b=W.transformMat4(r.vec3c,[k,M+C,0],r.vpMatrix),A=W.transformMat4(r.vec3d,[k+S,M+C,0],r.vpMatrix),R=Math.min(O[0],P[0],A[0],b[0]),F=Math.min(O[1],P[1],A[1],b[1]),D=Math.max(O[0],P[0],A[0],b[0]),E=Math.max(O[1],P[1],A[1],b[1]),I=Math.floor(R),L=Math.floor(F),N=Math.ceil(D-R),V=Math.ceil(E-F);p.save(),r.clearRect(p,I,L,N,V,o.background),p.beginPath(),p.rect(I,L,N,V),p.clip(),p.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]);var J=o.renderer.getConfig(),ie=J.enableDirtyRectangleRenderingDebug;ie&&c.dispatchEvent(new kr(Pr.DIRTY_RECTANGLE,{dirtyRect:{x:I,y:L,width:N,height:V}}));var ee=g.getMin(),oe=H(ee,2),he=oe[0],K=oe[1],Y=g.getMax(),ne=H(Y,2),ce=ne[0],q=ne[1],Z=f.root.ownerDocument.elementsFromBBox(he,K,ce,q);Z.sort(function(U,me){return U.sortable.renderOrder-me.sortable.renderOrder}).forEach(function(U){U&&U.isVisible()&&!U.isCulled()&&r.renderDisplayObject(U,p,r.context,te(r,B)[B],e)}),p.restore(),r.renderQueue.forEach(function(U){r.saveDirtyAABB(U)}),r.renderQueue=[]}te(r,B)[B].restoreStack.forEach(function(){p.restore()}),te(r,B)[B].restoreStack=[]}),s.hooks.render.tap(n.tag,function(p){r.clearFullScreen||r.renderQueue.push(p)})}},{key:"clearRect",value:function(a,e,r,i,o,l){a.clearRect(e,r,i,o),l&&(a.fillStyle=l,a.fillRect(e,r,i,o))}},{key:"renderDisplayObjectOptimized",value:function(a,e,r,i,o){var l=a.nodeName,s=!1,f=!1,u=this.context.styleRendererFactory[l],h=this.pathGeneratorFactory[l],v=a.parsedStyle.clipPath;if(v){s=!i.prevObject||!Q.exactEquals(v.getWorldTransform(),i.prevObject.getWorldTransform()),s&&(this.applyWorldTransform(e,v),i.prevObject=null);var c=this.pathGeneratorFactory[v.nodeName];c&&(e.save(),f=!0,e.beginPath(),c(e,v.parsedStyle),e.closePath(),e.clip())}if(u){s=!i.prevObject||!Q.exactEquals(a.getWorldTransform(),i.prevObject.getWorldTransform()),s&&this.applyWorldTransform(e,a);var d=!i.prevObject;if(!d){var y=i.prevObject.nodeName;l===T.TEXT?d=y!==T.TEXT:l===T.IMAGE?d=y!==T.IMAGE:d=y===T.TEXT||y===T.IMAGE}u.applyStyleToContext(e,a,d,i),i.prevObject=a}h&&(e.beginPath(),h(e,a.parsedStyle),l!==T.LINE&&l!==T.PATH&&l!==T.POLYLINE&&e.closePath()),u&&u.drawToContext(e,a,te(this,B)[B],this,o),f&&e.restore(),a.dirty(!1)}},{key:"renderDisplayObject",value:function(a,e,r,i,o){var l=a.nodeName,s=i.restoreStack[i.restoreStack.length-1];s&&!(a.compareDocumentPosition(s)&Cr.DOCUMENT_POSITION_CONTAINS)&&(e.restore(),i.restoreStack.pop());var f=this.context.styleRendererFactory[l],u=this.pathGeneratorFactory[l],h=a.parsedStyle.clipPath;if(h){this.applyWorldTransform(e,h);var v=this.pathGeneratorFactory[h.nodeName];v&&(e.save(),i.restoreStack.push(a),e.beginPath(),v(e,h.parsedStyle),e.closePath(),e.clip())}f&&(this.applyWorldTransform(e,a),e.save(),this.applyAttributesToContext(e,a)),u&&(e.beginPath(),u(e,a.parsedStyle),l!==T.LINE&&l!==T.PATH&&l!==T.POLYLINE&&e.closePath()),f&&(f.render(e,a.parsedStyle,a,r,this,o),e.restore()),a.dirty(!1)}},{key:"applyAttributesToContext",value:function(a,e){var r=e.parsedStyle,i=r.stroke,o=r.fill,l=r.opacity,s=r.lineDash,f=r.lineDashOffset;s&&a.setLineDash(s),$(f)||(a.lineDashOffset=f),$(l)||(a.globalAlpha*=l),!$(i)&&!Array.isArray(i)&&!i.isNone&&(a.strokeStyle=e.attributes.stroke),!$(o)&&!Array.isArray(o)&&!o.isNone&&(a.fillStyle=e.attributes.fill)}},{key:"convertAABB2Rect",value:function(a){var e=a.getMin(),r=a.getMax(),i=Math.floor(e[0]),o=Math.floor(e[1]),l=Math.ceil(r[0]),s=Math.ceil(r[1]),f=l-i,u=s-o;return{x:i,y:o,width:f,height:u}}},{key:"mergeDirtyAABBs",value:function(a){var e=new Ae;return a.forEach(function(r){var i=r.getRenderBounds();e.add(i);var o=r.renderable.dirtyRenderBounds;o&&e.add(o)}),e}},{key:"saveDirtyAABB",value:function(a){var e=a.renderable;e.dirtyRenderBounds||(e.dirtyRenderBounds=new Ae);var r=a.getRenderBounds();r&&e.dirtyRenderBounds.update(r.center,r.halfExtents)}},{key:"applyWorldTransform",value:function(a,e,r){r?(Q.copy(this.tmpMat4,e.getLocalTransform()),Q.multiply(this.tmpMat4,r,this.tmpMat4),Q.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(Q.copy(this.tmpMat4,e.getWorldTransform()),Q.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)),a.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var a=new Ae,e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return r.forEach(function(o){a.add(o)}),a}}])})();fr.tag="CanvasRenderer";function De(n,t,a,e,r,i,o){var l,s;if(n.image.nodeName==="rect"){var f=n.image.parsedStyle,u=f.width,h=f.height;s=e.contextService.getDPR();var v=e.config.offscreenCanvas;l=i.offscreenCanvasCreator.getOrCreateCanvas(v),l.width=u*s,l.height=h*s;var c=i.offscreenCanvasCreator.getOrCreateContext(v),d={restoreStack:[],prevObject:null,currentContext:new Map};n.image.forEach(function(p){r.renderDisplayObject(p,c,e,d,i)}),d.restoreStack.forEach(function(){c.restore()})}var y=o.getOrCreatePatternSync(t,n,a,l,s,t.getGeometryBounds().min,function(){t.dirty(),e.renderingService.dirty()});return y}function Fe(n,t,a,e){var r;if(n.type===tr.LinearGradient||n.type===tr.RadialGradient){var i=t.getGeometryBounds(),o=i&&i.halfExtents[0]*2||1,l=i&&i.halfExtents[1]*2||1,s=i&&i.min||[0,0];r=e.getOrCreateGradient(ge(ge({type:n.type},n.value),{},{min:s,width:o,height:l}),a)}return r}var _e=["shadowBlur","shadowOffsetX","shadowOffsetY"],nr=["lineCap","lineJoin","miterLimit"],G={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},ir={};function x(n,t,a,e){var r=e.has(t)?e.get(t):G[t];return r!==a&&(t==="lineDash"?n.setLineDash(a):n[t]=a,e.set(t,a)),r}var $r=(function(){function n(t){X(this,n),this.imagePool=t}return j(n,[{key:"applyAttributesToContext",value:function(a,e){}},{key:"render",value:function(a,e,r,i,o,l){}},{key:"applyCommonStyleToContext",value:function(a,e,r,i){var o=r?ir:i.prevObject.parsedStyle,l=e.parsedStyle;(r||l.opacity!==o.opacity)&&x(a,"globalAlpha",$(l.opacity)?G.globalAlpha:l.opacity,i.currentContext),(r||l.blend!==o.blend)&&x(a,"globalCompositeOperation",$(l.blend)?G.globalCompositeOperation:l.blend,i.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(a,e,r,i){var o=r?ir:i.prevObject.parsedStyle,l=e.parsedStyle,s=l.lineWidth,f=s===void 0?G.lineWidth:s,u=l.fill&&!l.fill.isNone,h=l.stroke&&!l.stroke.isNone&&f>0;if(h){if(r||e.attributes.stroke!==i.prevObject.attributes.stroke){var v=!$(l.stroke)&&!Array.isArray(l.stroke)&&!l.stroke.isNone?e.attributes.stroke:G.strokeStyle;x(a,"strokeStyle",v,i.currentContext)}(r||l.lineWidth!==o.lineWidth)&&x(a,"lineWidth",$(l.lineWidth)?G.lineWidth:l.lineWidth,i.currentContext),(r||l.lineDash!==o.lineDash)&&x(a,"lineDash",l.lineDash||G.lineDash,i.currentContext),(r||l.lineDashOffset!==o.lineDashOffset)&&x(a,"lineDashOffset",$(l.lineDashOffset)?G.lineDashOffset:l.lineDashOffset,i.currentContext);for(var c=0;c<nr.length;c++){var d=nr[c];(r||l[d]!==o[d])&&x(a,d,$(l[d])?G[d]:l[d],i.currentContext)}}if(u&&(r||e.attributes.fill!==i.prevObject.attributes.fill)){var y=!$(l.fill)&&!Array.isArray(l.fill)&&!l.fill.isNone?e.attributes.fill:G.fillStyle;x(a,"fillStyle",y,i.currentContext)}}},{key:"applyStyleToContext",value:function(a,e,r,i){var o=e.nodeName;this.applyCommonStyleToContext(a,e,r,i),o===T.IMAGE||this.applyStrokeFillStyleToContext(a,e,r,i)}},{key:"applyShadowAndFilterStyleToContext",value:function(a,e,r,i){var o=e.parsedStyle;if(r){x(a,"shadowColor",o.shadowColor.toString(),i.currentContext);for(var l=0;l<_e.length;l++){var s=_e[l];x(a,s,o[s]||G[s],i.currentContext)}}o.filter&&o.filter.length&&x(a,"filter",e.attributes.filter,i.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(a,e,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(e){x(a,"shadowColor",G.shadowColor,i.currentContext);for(var l=0;l<_e.length;l++){var s=_e[l];x(a,s,G[s],i.currentContext)}}if(r)if(e&&o){var f=a.filter;!$(f)&&f.indexOf("drop-shadow")>-1&&x(a,"filter",f.replace(/drop-shadow\([^)]*\)/,"").trim()||G.filter,i.currentContext)}else x(a,"filter",G.filter,i.currentContext)}},{key:"fillToContext",value:function(a,e,r,i,o){var l=this,s=e.parsedStyle,f=s.fill,u=s.fillRule,h=null;if(Array.isArray(f)&&f.length>0)f.forEach(function(c){var d=x(a,"fillStyle",Fe(c,e,a,l.imagePool),r.currentContext);h=h??d,u?a.fill(u):a.fill()});else{if(Ee(f)){var v=De(f,e,a,e.ownerDocument.defaultView.context,i,o,this.imagePool);v&&(a.fillStyle=v,h=!0)}u?a.fill(u):a.fill()}h!==null&&x(a,"fillStyle",h,r.currentContext)}},{key:"strokeToContext",value:function(a,e,r,i,o){var l=this,s=e.parsedStyle.stroke,f=null;if(Array.isArray(s)&&s.length>0)s.forEach(function(v){var c=x(a,"strokeStyle",Fe(v,e,a,l.imagePool),r.currentContext);f=f??c,a.stroke()});else{if(Ee(s)){var u=De(s,e,a,e.ownerDocument.defaultView.context,i,o,this.imagePool);if(u){var h=x(a,"strokeStyle",u,r.currentContext);f=f??h}}a.stroke()}f!==null&&x(a,"strokeStyle",f,r.currentContext)}},{key:"drawToContext",value:function(a,e,r,i,o){var l,s=e.nodeName,f=e.parsedStyle,u=f.opacity,h=u===void 0?G.globalAlpha:u,v=f.fillOpacity,c=v===void 0?G.fillOpacity:v,d=f.strokeOpacity,y=d===void 0?G.strokeOpacity:d,p=f.lineWidth,m=p===void 0?G.lineWidth:p,g=f.fill&&!f.fill.isNone,w=f.stroke&&!f.stroke.isNone&&m>0;if(!(!g&&!w)){var k=!$(f.shadowColor)&&f.shadowBlur>0,M=f.shadowType==="inner",S=((l=f.fill)===null||l===void 0?void 0:l.alpha)===0,C=!!(f.filter&&f.filter.length),O=k&&w&&(s===T.PATH||s===T.LINE||s===T.POLYLINE||S||M),P=null;if(g){O||this.applyShadowAndFilterStyleToContext(a,e,k,r);var b=h*c;P=x(a,"globalAlpha",b,r.currentContext),this.fillToContext(a,e,r,i,o),O||this.clearShadowAndFilterStyleForContext(a,k,C,r)}if(w){var A=!1,R=h*y,F=x(a,"globalAlpha",R,r.currentContext);if(P=g?P:F,O&&(this.applyShadowAndFilterStyleToContext(a,e,k,r),A=!0,M)){var D=a.globalCompositeOperation;a.globalCompositeOperation="source-atop",this.strokeToContext(a,e,r,i,o),a.globalCompositeOperation=D,this.clearShadowAndFilterStyleForContext(a,k,C,r,!0)}this.strokeToContext(a,e,r,i,o),A&&this.clearShadowAndFilterStyleForContext(a,k,C,r)}P!==null&&x(a,"globalAlpha",P,r.currentContext)}}}])})(),ae=(function(n){function t(){return X(this,t),se(this,t,arguments)}return fe(t,n),j(t,[{key:"render",value:function(e,r,i,o,l,s){var f=r.fill,u=r.fillRule,h=r.opacity,v=h===void 0?1:h,c=r.fillOpacity,d=c===void 0?1:c,y=r.stroke,p=r.strokeOpacity,m=p===void 0?1:p,g=r.lineWidth,w=g===void 0?1:g,k=r.lineCap,M=r.lineJoin,S=r.shadowType,C=r.shadowColor,O=r.shadowBlur,P=r.filter,b=r.miterLimit,A=f&&!f.isNone,R=y&&!y.isNone&&w>0,F=f?.alpha===0,D=!!(P&&P.length),E=!$(C)&&O>0,I=i.nodeName,L=S==="inner",N=R&&E&&(I===T.PATH||I===T.LINE||I===T.POLYLINE||F||L);A&&(e.globalAlpha=v*d,N||Le(i,e,E),ur(e,i,f,u,o,l,s,this.imagePool),N||this.clearShadowAndFilter(e,D,E)),R&&(e.globalAlpha=v*m,e.lineWidth=w,$(b)||(e.miterLimit=b),$(k)||(e.lineCap=k),$(M)||(e.lineJoin=M),N&&(L&&(e.globalCompositeOperation="source-atop"),Le(i,e,!0),L&&(He(e,i,y,o,l,s,this.imagePool),e.globalCompositeOperation=G.globalCompositeOperation,this.clearShadowAndFilter(e,D,!0))),He(e,i,y,o,l,s,this.imagePool))}},{key:"clearShadowAndFilter",value:function(e,r,i){if(i&&(e.shadowColor="transparent",e.shadowBlur=0),r){var o=e.filter;!$(o)&&o.indexOf("drop-shadow")>-1&&(e.filter=o.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])})($r);function Le(n,t,a){var e=n.parsedStyle,r=e.filter,i=e.shadowColor,o=e.shadowBlur,l=e.shadowOffsetX,s=e.shadowOffsetY;r&&r.length&&(t.filter=n.style.filter),a&&(t.shadowColor=i.toString(),t.shadowBlur=o||0,t.shadowOffsetX=l||0,t.shadowOffsetY=s||0)}function ur(n,t,a,e,r,i,o,l){var s=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(a)?a.forEach(function(f){n.fillStyle=Fe(f,t,n,l),s||(e?n.fill(e):n.fill())}):(Ee(a)&&(n.fillStyle=De(a,t,n,r,i,o,l)),s||(e?n.fill(e):n.fill()))}function He(n,t,a,e,r,i,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(a)?a.forEach(function(s){n.strokeStyle=Fe(s,t,n,o),l||n.stroke()}):(Ee(a)&&(n.strokeStyle=De(a,t,n,e,r,i,o)),l||n.stroke())}function xr(n,t){var a=H(n,4),e=a[0],r=a[1],i=a[2],o=a[3],l=H(t,4),s=l[0],f=l[1],u=l[2],h=l[3],v=Math.max(e,s),c=Math.max(r,f),d=Math.min(e+i,s+u),y=Math.min(r+o,f+h);return d<=v||y<=c?null:[v,c,d-v,y-c]}function Wr(n,t){var a=W.transformMat4(W.create(),[n[0],n[1],0],t),e=W.transformMat4(W.create(),[n[0]+n[2],n[1],0],t),r=W.transformMat4(W.create(),[n[0],n[1]+n[3],0],t),i=W.transformMat4(W.create(),[n[0]+n[2],n[1]+n[3],0],t);return[Math.min(a[0],e[0],r[0],i[0]),Math.min(a[1],e[1],r[1],i[1]),Math.max(a[0],e[0],r[0],i[0])-Math.min(a[0],e[0],r[0],i[0]),Math.max(a[1],e[1],r[1],i[1])-Math.min(a[1],e[1],r[1],i[1])]}var vr=(function(n){function t(){return X(this,t),se(this,t,arguments)}return fe(t,n),j(t,[{key:"renderDownSampled",value:function(e,r,i,o){var l=o.src,s=o.imageCache;if(!s.downSampled){this.imagePool.createDownSampledImage(l,i).then(function(){i.ownerDocument&&(i.dirty(),i.ownerDocument.defaultView.context.renderingService.dirty())}).catch(function(f){console.error(f)});return}e.drawImage(s.downSampled,Math.floor(o.drawRect[0]),Math.floor(o.drawRect[1]),Math.ceil(o.drawRect[2]),Math.ceil(o.drawRect[3]))}},{key:"renderTile",value:function(e,r,i,o){var l=o.src,s=o.imageCache,f=o.imageRect,u=o.drawRect,h=s.size,v=e.getTransform(),c=v.a,d=v.b,y=v.c,p=v.d,m=v.e,g=v.f;if(e.resetTransform(),!(s!=null&&s.gridSize)){this.imagePool.createImageTiles(l,[],function(){i.ownerDocument&&(i.dirty(),i.ownerDocument.defaultView.context.renderingService.dirty())},i).catch(function(E){console.error(E)});return}for(var w=[h[0]/f[2],h[1]/f[3]],k=[s.tileSize[0]/w[0],s.tileSize[1]/w[1]],M=[Math.floor((u[0]-f[0])/k[0]),Math.ceil((u[0]+u[2]-f[0])/k[0])],S=M[0],C=M[1],O=[Math.floor((u[1]-f[1])/k[1]),Math.ceil((u[1]+u[3]-f[1])/k[1])],P=O[0],b=O[1],A=P;A<=b;A++)for(var R=S;R<=C;R++){var F=s.tiles[A][R];if(F){var D=[Math.floor(f[0]+F.tileX*k[0]),Math.floor(f[1]+F.tileY*k[1]),Math.ceil(k[0]),Math.ceil(k[1])];e.drawImage(F.data,D[0],D[1],D[2],D[3])}}e.setTransform(c,d,y,p,m,g)}},{key:"render",value:function(e,r,i){var o=r.x,l=o===void 0?0:o,s=r.y,f=s===void 0?0:s,u=r.width,h=r.height,v=r.src,c=r.shadowColor,d=r.shadowBlur,y=this.imagePool.getImageSync(v,i),p=y?.img,m=u,g=h;if(p){m||(m=p.width),g||(g=p.height);var w=!$(c)&&d>0;Le(i,e,w);try{var k=i.ownerDocument.defaultView.getContextService().getDomElement(),M=k.width,S=k.height,C=e.getTransform(),O=C.a,P=C.b,b=C.c,A=C.d,R=C.e,F=C.f,D=Q.fromValues(O,b,0,0,P,A,0,0,0,0,1,0,R,F,0,1),E=Wr([l,f,m,g],D),I=xr([0,0,M,S],E);if(!I)return;if(!i.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){t.renderFull(e,r,i,{image:p,drawRect:[l,f,m,g]});return}var L=E[2]/y.size[0];if(L<(y.downSamplingRate||.5)){this.renderDownSampled(e,r,i,{src:v,imageCache:y,drawRect:[l,f,m,g]});return}if(!ImagePool.isSupportTile){t.renderFull(e,r,i,{image:p,drawRect:[l,f,m,g]});return}this.renderTile(e,r,i,{src:v,imageCache:y,imageRect:E,drawRect:I})}catch{}}}},{key:"drawToContext",value:function(e,r,i,o,l){this.render(e,r.parsedStyle,r)}}],[{key:"renderFull",value:function(e,r,i,o){e.drawImage(o.image,Math.floor(o.drawRect[0]),Math.floor(o.drawRect[1]),Math.ceil(o.drawRect[2]),Math.ceil(o.drawRect[3]))}}])})(ae),hr=(function(n){function t(){return X(this,t),se(this,t,arguments)}return fe(t,n),j(t,[{key:"render",value:function(e,r,i,o,l,s){i.getBounds();var f=r.lineWidth,u=f===void 0?1:f,h=r.textAlign,v=h===void 0?"start":h,c=r.textBaseline,d=c===void 0?"alphabetic":c,y=r.lineJoin,p=y===void 0?"miter":y,m=r.miterLimit,g=m===void 0?10:m,w=r.letterSpacing,k=w===void 0?0:w,M=r.stroke,S=r.fill,C=r.fillRule,O=r.fillOpacity,P=O===void 0?1:O,b=r.strokeOpacity,A=b===void 0?1:b,R=r.opacity,F=R===void 0?1:R,D=r.metrics,E=r.x,I=E===void 0?0:E,L=r.y,N=L===void 0?0:L,V=r.dx,J=r.dy,ie=r.shadowColor,ee=r.shadowBlur,oe=r.textDecorationLine,he=D.font,K=D.lines,Y=D.height,ne=D.lineHeight,ce=D.lineMetrics;e.font=he,e.lineWidth=u,e.textAlign=v==="middle"?"center":v;var q=d;q==="alphabetic"&&(q="bottom"),e.lineJoin=p,$(g)||(e.miterLimit=g);var Z=N;d==="middle"?Z+=-Y/2-ne/2:d==="bottom"||d==="alphabetic"||d==="ideographic"?Z+=-Y:(d==="top"||d==="hanging")&&(Z+=-ne);var U=I+(V||0);Z+=J||0,K.length===1&&(q==="bottom"?(q="middle",Z-=.5*Y):q==="top"&&(q="middle",Z+=.5*Y)),e.textBaseline=q;var me=!$(ie)&&ee>0;Le(i,e,me);for(var le=0;le<K.length;le++){var ze=u/2+U;Z+=ne,!$(M)&&!M.isNone&&u&&this.drawLetterSpacing(e,i,K[le],ce[le],v,ze,Z,k,S,C,P,M,A,F,!0,o,l,s),$(S)||this.drawLetterSpacing(e,i,K[le],ce[le],v,ze,Z,k,S,C,P,M,A,F,!1,o,l,s)}oe&&oe!=="none"&&this.drawTextDecorations(e,r,i,K,ne,U,N+(J||0),o,l,s)}},{key:"drawLetterSpacing",value:function(e,r,i,o,l,s,f,u,h,v,c,d,y,p,m,g,w,k){if(u===0){m?this.strokeText(e,r,i,s,f,d,y,g,w,k):this.fillText(e,r,i,s,f,h,v,c,p,g,w,k);return}var M=e.textAlign;e.textAlign="left";var S=s;l==="center"||l==="middle"?S=s-o.width/2:(l==="right"||l==="end")&&(S=s-o.width);for(var C=Array.from(i),O=e.measureText(i).width,P=0,b=0;b<C.length;++b){var A=C[b];m?this.strokeText(e,r,A,S,f,d,y,g,w,k):this.fillText(e,r,A,S,f,h,v,c,p,g,w,k),P=e.measureText(i.substring(b+1)).width,S+=O-P+u,O=P}e.textAlign=M}},{key:"fillText",value:function(e,r,i,o,l,s,f,u,h,v,c,d){ur(e,r,s,f,v,c,d,this.imagePool,!0);var y,p=!$(u)&&u!==1;p&&(y=e.globalAlpha,e.globalAlpha=u*h),e.fillText(i,o,l),p&&(e.globalAlpha=y)}},{key:"strokeText",value:function(e,r,i,o,l,s,f,u,h,v){He(e,r,s,u,h,v,this.imagePool,!0);var c,d=!$(f)&&f!==1;d&&(c=e.globalAlpha,e.globalAlpha=f),e.strokeText(i,o,l),d&&(e.globalAlpha=c)}},{key:"drawTextDecorations",value:function(e,r,i,o,l,s,f,u,h,v){var c=r.textDecorationLine,d=r.textDecorationColor,y=r.textDecorationStyle,p=r.textDecorationThickness,m=p===void 0?1:p,g=r.textAlign,w=g===void 0?"start":g,k=r.lineWidth,M=k===void 0?1:k,S=r.metrics;if(!(!c||c==="none")){var C=S.lineMetrics,O=c.split(" ");switch(e.lineWidth=m,d&&(e.strokeStyle="rgba(".concat(d.r,", ").concat(d.g,", ").concat(d.b,", ").concat(d.alpha,")")),y){case"dashed":e.setLineDash([5,5]);break;case"dotted":e.setLineDash([2,2]);break;case"wavy":e.setLineDash([]);break;default:e.setLineDash([]);break}var P=f,b=r.textBaseline,A=b===void 0?"alphabetic":b;A==="middle"?P+=-S.height/2-l/2:A==="bottom"||A==="alphabetic"||A==="ideographic"?P+=-S.height:(A==="top"||A==="hanging")&&(P+=-l);for(var R=0;R<o.length;R++){P+=l;var F=C[R];if(F){var D=M/2,E=s,I=s+F.width;w==="center"||w==="middle"?(E=s-F.width/2,I=s+F.width/2):(w==="right"||w==="end")&&(E=s-F.width,I=s),E+=D,I+=D;var L=We(O),N;try{for(L.s();!(N=L.n()).done;){var V=N.value,J=P;switch(V){case"underline":J+=2;break;case"overline":J-=l-2;break;case"line-through":J-=l/2;break;default:continue}y==="wavy"?this.drawWavyLine(e,E,I,J):(e.beginPath(),e.moveTo(E,J),e.lineTo(I,J),e.stroke())}}catch(ie){L.e(ie)}finally{L.f()}}}e.setLineDash([])}}},{key:"drawWavyLine",value:function(e,r,i,o){var l=2,s=10,f=Math.floor((i-r)/s);e.beginPath(),e.moveTo(r,o);for(var u=0;u<f;u++){var h=r+u*s+s/4,v=o+l,c=r+u*s+s/2,d=o;e.quadraticCurveTo(h,v,c,d);var y=r+u*s+s*3/4,p=o-l,m=r+(u+1)*s,g=o;e.quadraticCurveTo(y,p,m,g)}e.stroke()}},{key:"drawToContext",value:function(e,r,i,o,l){this.render(e,r.parsedStyle,r,r.ownerDocument.defaultView.context,o,l)}}])})(ae),cr=(function(n){function t(){var a,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return X(this,t),a=se(this,t),a.name="canvas-renderer",a.options=e,a}return fe(t,n),j(t,[{key:"init",value:function(){var e,r=ge({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),i=this.context.imagePool,o=new ae(i),l=(e={},_(_(_(_(_(_(_(_(_(_(e,T.CIRCLE,o),T.ELLIPSE,o),T.RECT,o),T.IMAGE,new vr(i)),T.TEXT,new hr(i)),T.LINE,o),T.POLYLINE,o),T.POLYGON,o),T.PATH,o),T.GROUP,void 0),_(_(_(e,T.HTML,void 0),T.MESH,void 0),T.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=l,this.context.styleRendererFactory=l,this.addRenderingPlugin(new fr(r))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])})(Ie),Ba=Object.freeze({__proto__:null,CircleRenderer:ae,DefaultRenderer:ae,EllipseRenderer:ae,ImageRenderer:vr,LineRenderer:ae,PathRenderer:ae,Plugin:cr,PolygonRenderer:ae,PolylineRenderer:ae,RectRenderer:ae,TextRenderer:hr}),Br=W.create(),Nr=W.create(),Gr=W.create(),Hr=Q.create(),dr=(function(){function n(){var t=this;X(this,n),this.isHit=function(a,e,r,i){var o=t.context.pointInPathPickerFactory[a.nodeName];if(o){var l=Q.invert(Hr,r),s=W.transformMat4(Nr,W.set(Gr,e[0],e[1],0),l);if(o(a,new Tr(s[0],s[1]),i,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(a,e){var r=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),i=t.context.pathGeneratorFactory[a.nodeName];return i&&(r.beginPath(),i(r,a.parsedStyle),r.closePath()),r.isPointInPath(e.x,e.y)}}return j(n,[{key:"apply",value:function(a,e){var r,i=this,o=a.renderingService,l=a.renderingContext;this.context=a,this.runtime=e;var s=(r=l.root)===null||r===void 0?void 0:r.ownerDocument;o.hooks.pick.tapPromise(n.tag,(function(){var f=Ne(de().mark(function u(h){return de().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.abrupt("return",i.pick(s,h));case 1:case"end":return v.stop()}},u)}));return function(u){return f.apply(this,arguments)}})()),o.hooks.pickSync.tap(n.tag,function(f){return i.pick(s,f)})}},{key:"pick",value:function(a,e){var r=e.topmost,i=e.position,o=i.x,l=i.y,s=W.set(Br,o,l,0),f=a.elementsFromBBox(s[0],s[1],s[0],s[1]),u=[],h=We(f),v;try{for(h.s();!(v=h.n()).done;){var c=v.value,d=c.getWorldTransform(),y=this.isHit(c,s,d,!1);if(y){var p=Or(c);if(p){var m=p.parsedStyle.clipPath,g=this.isHit(m,s,m.getWorldTransform(),!0);if(g){if(r)return e.picked=[c],e;u.push(c)}}else{if(r)return e.picked=[c],e;u.push(c)}}}}catch(w){h.e(w)}finally{h.f()}return e.picked=u,e}}])})();dr.tag="CanvasPicker";function zr(n,t,a){var e=n.parsedStyle,r=e.cx,i=r===void 0?0:r,o=e.cy,l=o===void 0?0:o,s=e.r,f=e.fill,u=e.stroke,h=e.lineWidth,v=h===void 0?1:h,c=e.increasedLineWidthForHitTesting,d=c===void 0?0:c,y=e.pointerEvents,p=y===void 0?"auto":y,m=(v+d)/2,g=sr(i,l,t.x,t.y),w=ye(p,f,u),k=H(w,2),M=k[0],S=k[1];return M&&S||a?g<=s+m:M?g<=s:S?g>=s-m&&g<=s+m:!1}function be(n,t,a,e){return n/(a*a)+t/(e*e)}function Vr(n,t,a){var e=n.parsedStyle,r=e.cx,i=r===void 0?0:r,o=e.cy,l=o===void 0?0:o,s=e.rx,f=e.ry,u=e.fill,h=e.stroke,v=e.lineWidth,c=v===void 0?1:v,d=e.increasedLineWidthForHitTesting,y=d===void 0?0:d,p=e.pointerEvents,m=p===void 0?"auto":p,g=t.x,w=t.y,k=ye(m,u,h),M=H(k,2),S=M[0],C=M[1],O=(c+y)/2,P=(g-i)*(g-i),b=(w-l)*(w-l);return S&&C||a?be(P,b,s+O,f+O)<=1:S?be(P,b,s,f)<=1:C?be(P,b,s-O,f-O)>=1&&be(P,b,s+O,f+O)<=1:!1}function pe(n,t,a,e,r,i){return r>=n&&r<=n+a&&i>=t&&i<=t+e}function Jr(n,t,a,e,r,i,o){var l=r/2;return pe(n-l,t-l,a,r,i,o)||pe(n+a-l,t-l,r,e,i,o)||pe(n+l,t+e-l,a,r,i,o)||pe(n-l,t+l,r,e,i,o)}function Re(n,t,a,e,r,i,o,l){var s=(Math.atan2(l-t,o-n)+Math.PI*2)%(Math.PI*2),f={x:n+a*Math.cos(s),y:t+a*Math.sin(s)};return sr(f.x,f.y,o,l)<=i/2}function ue(n,t,a,e,r,i,o){var l=Math.min(n,a),s=Math.max(n,a),f=Math.min(t,e),u=Math.max(t,e),h=r/2;return i>=l-h&&i<=s+h&&o>=f-h&&o<=u+h?Lr(n,t,a,e,i,o)<=r/2:!1}function pr(n,t,a,e,r){var i=n.length;if(i<2)return!1;for(var o=0;o<i-1;o++){var l=n[o][0],s=n[o][1],f=n[o+1][0],u=n[o+1][1];if(ue(l,s,f,u,t,a,e))return!0}if(r){var h=n[0],v=n[i-1];if(ue(h[0],h[1],v[0],v[1],t,a,e))return!0}return!1}var Kr=1e-6;function Ge(n){return Math.abs(n)<Kr?0:n<0?-1:1}function Qr(n,t,a){return(a[0]-n[0])*(t[1]-n[1])===(t[0]-n[0])*(a[1]-n[1])&&Math.min(n[0],t[0])<=a[0]&&a[0]<=Math.max(n[0],t[0])&&Math.min(n[1],t[1])<=a[1]&&a[1]<=Math.max(n[1],t[1])}function yr(n,t,a){var e=!1,r=n.length;if(r<=2)return!1;for(var i=0;i<r;i++){var o=n[i],l=n[(i+1)%r];if(Qr(o,l,[t,a]))return!0;Ge(o[1]-a)>0!=Ge(l[1]-a)>0&&Ge(t-(a-o[1])*(o[0]-l[0])/(o[1]-l[1])-o[0])<0&&(e=!e)}return e}function or(n,t,a){for(var e=!1,r=0;r<n.length;r++){var i=n[r];if(e=yr(i,t,a),e)break}return e}function Yr(n,t,a){var e=n.parsedStyle,r=e.x1,i=e.y1,o=e.x2,l=e.y2,s=e.lineWidth,f=s===void 0?1:s,u=e.increasedLineWidthForHitTesting,h=u===void 0?0:u,v=e.pointerEvents,c=v===void 0?"auto":v,d=e.fill,y=e.stroke,p=ye(c,d,y),m=H(p,2),g=m[1];return!g&&!a||!f?!1:ue(r,i,o,l,f+h,t.x,t.y)}function Zr(n,t,a,e,r){for(var i=!1,o=t/2,l=0;l<n.length;l++){var s=n[l],f=s.currentPoint,u=s.params,h=s.prePoint,v=s.box;if(!(v&&!pe(v.x-o,v.y-o,v.width+t,v.height+t,a,e)))switch(s.command){case"L":case"Z":if(i=ue(h[0],h[1],f[0],f[1],t,a,e),i)return!0;break;case"Q":var c=Ir(h[0],h[1],u[1],u[2],u[3],u[4],a,e);if(i=c<=t/2,i)return!0;break;case"C":var d=ar(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],a,e,r);if(i=d<=t/2,i)return!0;break;case"A":s.cubicParams||(s.cubicParams=Dr(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var y=s.cubicParams,p=h,m=0;m<y.length;m+=6){var g=ar(p[0],p[1],y[m],y[m+1],y[m+2],y[m+3],y[m+4],y[m+5],a,e,r);if(p=[y[m+4],y[m+5]],i=g<=t/2,i)return!0}break}}return i}function qr(n,t,a,e,r,i){var o=n.parsedStyle,l=o.lineWidth,s=l===void 0?1:l,f=o.increasedLineWidthForHitTesting,u=f===void 0?0:f,h=o.stroke,v=o.fill,c=o.d,d=o.pointerEvents,y=d===void 0?"auto":d,p=c.segments,m=c.hasArc,g=c.polylines,w=c.polygons,k=ye(y,w?.length&&v,h),M=H(k,2),S=M[0],C=M[1],O=Mr(n),P=!1;return S||a?(m?P=e(n,t):P=or(w,t.x,t.y)||or(g,t.x,t.y),P):((C||a)&&(P=Zr(p,s+u,t.x,t.y,O)),P)}function Ur(n,t,a){var e=n.parsedStyle,r=e.stroke,i=e.fill,o=e.lineWidth,l=o===void 0?1:o,s=e.increasedLineWidthForHitTesting,f=s===void 0?0:s,u=e.points,h=e.pointerEvents,v=h===void 0?"auto":h,c=ye(v,i,r),d=H(c,2),y=d[0],p=d[1],m=!1;return(p||a)&&(m=pr(u.points,l+f,t.x,t.y,!0)),!m&&(y||a)&&(m=yr(u.points,t.x,t.y)),m}function jr(n,t,a){var e=n.parsedStyle,r=e.lineWidth,i=r===void 0?1:r,o=e.increasedLineWidthForHitTesting,l=o===void 0?0:o,s=e.points,f=e.pointerEvents,u=f===void 0?"auto":f,h=e.fill,v=e.stroke,c=ye(u,h,v),d=H(c,2),y=d[1];return!y&&!a||!i?!1:pr(s.points,i+l,t.x,t.y,!1)}function Xr(n,t,a,e,r){var i=n.parsedStyle,o=i.radius,l=i.fill,s=i.stroke,f=i.lineWidth,u=f===void 0?1:f,h=i.increasedLineWidthForHitTesting,v=h===void 0?0:h,c=i.x,d=c===void 0?0:c,y=i.y,p=y===void 0?0:y,m=i.width,g=i.height,w=i.pointerEvents,k=w===void 0?"auto":w,M=ye(k,l,s),S=H(M,2),C=S[0],O=S[1],P=o&&o.some(function(F){return F!==0}),b=u+v;if(P){var R=!1;return(O||a)&&(R=et(d,p,m,g,o.map(function(F){return lr(F,0,Math.min(Math.abs(m)/2,Math.abs(g)/2))}),b,t.x,t.y)),!R&&(C||a)&&(R=e(n,t)),R}else{var A=b/2;if(C&&O||a)return pe(d-A,p-A,m+A,g+A,t.x,t.y);if(C)return pe(d,p,m,g,t.x,t.y);if(O)return Jr(d,p,m,g,b,t.x,t.y)}return!1}function et(n,t,a,e,r,i,o,l){var s=H(r,4),f=s[0],u=s[1],h=s[2],v=s[3];return ue(n+f,t,n+a-u,t,i,o,l)||ue(n+a,t+u,n+a,t+e-h,i,o,l)||ue(n+a-h,t+e,n+v,t+e,i,o,l)||ue(n,t+e-v,n,t+f,i,o,l)||Re(n+a-u,t+u,u,1.5*Math.PI,2*Math.PI,i,o,l)||Re(n+a-h,t+e-h,h,0,.5*Math.PI,i,o,l)||Re(n+v,t+e-v,v,.5*Math.PI,Math.PI,i,o,l)||Re(n+f,t+f,f,Math.PI,1.5*Math.PI,i,o,l)}function rt(n,t,a,e,r,i){var o=n.parsedStyle,l=o.pointerEvents,s=l===void 0?"auto":l,f=o.x,u=f===void 0?0:f,h=o.y,v=h===void 0?0:h,c=o.width,d=o.height;if(s==="non-transparent-pixel"){var y=r.config.offscreenCanvas,p=i.offscreenCanvasCreator.getOrCreateCanvas(y),m=i.offscreenCanvasCreator.getOrCreateContext(y,{willReadFrequently:!0});p.width=c,p.height=d,r.defaultStyleRendererFactory[T.IMAGE].render(m,ge(ge({},n.parsedStyle),{},{x:0,y:0}),n,void 0,void 0,void 0);var g=m.getImageData(t.x-u,t.y-v,1,1).data;return g.every(function(w){return w!==0})}return!0}function tt(n,t,a,e){var r=n.getGeometryBounds();return t.x>=r.min[0]&&t.y>=r.min[1]&&t.x<=r.max[0]&&t.y<=r.max[1]}var mr=(function(n){function t(){var a;X(this,t);for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return a=se(this,t,[].concat(r)),a.name="canvas-picker",a}return fe(t,n),j(t,[{key:"init",value:function(){var e,r=(e={},_(_(_(_(_(_(_(_(_(_(e,T.CIRCLE,zr),T.ELLIPSE,Vr),T.RECT,Xr),T.LINE,Yr),T.POLYLINE,jr),T.POLYGON,Ur),T.PATH,qr),T.TEXT,tt),T.GROUP,null),T.IMAGE,rt),_(_(e,T.HTML,null),T.MESH,null));this.context.pointInPathPickerFactory=r,this.addRenderingPlugin(new dr)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])})(Ie),Na=Object.freeze({__proto__:null,Plugin:mr});function at(n,t){var a=t.cx,e=a===void 0?0:a,r=t.cy,i=r===void 0?0:r,o=t.r;n.arc(e,i,o,0,Math.PI*2,!1)}function nt(n,t){var a=t.cx,e=a===void 0?0:a,r=t.cy,i=r===void 0?0:r,o=t.rx,l=t.ry;if(n.ellipse)n.ellipse(e,i,o,l,0,0,Math.PI*2,!1);else{var s=o>l?o:l,f=o>l?1:o/l,u=o>l?l/o:1;n.save(),n.scale(f,u),n.arc(e,i,s,0,Math.PI*2)}}function it(n,t){var a=t.x1,e=t.y1,r=t.x2,i=t.y2,o=t.markerStart,l=t.markerEnd,s=t.markerStartOffset,f=t.markerEndOffset,u=0,h=0,v=0,c=0,d=0,y,p;o&&ve(o)&&s&&(y=r-a,p=i-e,d=Math.atan2(p,y),u=Math.cos(d)*(s||0),h=Math.sin(d)*(s||0)),l&&ve(l)&&f&&(y=a-r,p=e-i,d=Math.atan2(p,y),v=Math.cos(d)*(f||0),c=Math.sin(d)*(f||0)),n.moveTo(a+u,e+h),n.lineTo(r+v,i+c)}function ot(n,t){var a=t.markerStart,e=t.markerEnd,r=t.markerStartOffset,i=t.markerEndOffset,o=t.d,l=o.absolutePath,s=o.segments,f=0,u=0,h=0,v=0,c=0,d,y;if(a&&ve(a)&&r){var p=a.parentNode.getStartTangent(),m=H(p,2),g=m[0],w=m[1];d=g[0]-w[0],y=g[1]-w[1],c=Math.atan2(y,d),f=Math.cos(c)*(r||0),u=Math.sin(c)*(r||0)}if(e&&ve(e)&&i){var k=e.parentNode.getEndTangent(),M=H(k,2),S=M[0],C=M[1];d=S[0]-C[0],y=S[1]-C[1],c=Math.atan2(y,d),h=Math.cos(c)*(i||0),v=Math.sin(c)*(i||0)}for(var O=0;O<l.length;O++){var P=l[O],b=P[0],A=l[O+1],R=O===0&&(f!==0||u!==0),F=(O===l.length-1||A&&(A[0]==="M"||A[0]==="Z"))&&h!==0&&v!==0,D=R?[f,u]:[0,0],E=H(D,2),I=E[0],L=E[1],N=F?[h,v]:[0,0],V=H(N,2),J=V[0],ie=V[1];switch(b){case"M":n.moveTo(P[1]+I,P[2]+L);break;case"L":n.lineTo(P[1]+J,P[2]+ie);break;case"Q":n.quadraticCurveTo(P[1],P[2],P[3]+J,P[4]+ie);break;case"C":n.bezierCurveTo(P[1],P[2],P[3],P[4],P[5]+J,P[6]+ie);break;case"A":{var ee=s[O].arcParams,oe=ee.cx,he=ee.cy,K=ee.rx,Y=ee.ry,ne=ee.startAngle,ce=ee.endAngle,q=ee.xRotation,Z=ee.sweepFlag;if(n.ellipse)n.ellipse(oe,he,K,Y,q,ne,ce,!!(1-Z));else{var U=K>Y?K:Y,me=K>Y?1:K/Y,le=K>Y?Y/K:1;n.translate(oe,he),n.rotate(q),n.scale(me,le),n.arc(0,0,U,ne,ce,!!(1-Z)),n.scale(1/me,1/le),n.rotate(-q),n.translate(-oe,-he)}F&&n.lineTo(P[6]+h,P[7]+v);break}case"Z":n.closePath();break}}}function lt(n,t){var a=t.markerStart,e=t.markerEnd,r=t.markerStartOffset,i=t.markerEndOffset,o=t.points.points,l=o.length,s=o[0][0],f=o[0][1],u=o[l-1][0],h=o[l-1][1],v=0,c=0,d=0,y=0,p=0,m,g;a&&ve(a)&&r&&(m=o[1][0]-o[0][0],g=o[1][1]-o[0][1],p=Math.atan2(g,m),v=Math.cos(p)*(r||0),c=Math.sin(p)*(r||0)),e&&ve(e)&&i&&(m=o[l-1][0]-o[0][0],g=o[l-1][1]-o[0][1],p=Math.atan2(g,m),d=Math.cos(p)*(i||0),y=Math.sin(p)*(i||0)),n.moveTo(s+(v||d),f+(c||y));for(var w=1;w<l-1;w++){var k=o[w];n.lineTo(k[0],k[1])}n.lineTo(u,h)}function st(n,t){var a=t.markerStart,e=t.markerEnd,r=t.markerStartOffset,i=t.markerEndOffset,o=t.points.points,l=o.length,s=o[0][0],f=o[0][1],u=o[l-1][0],h=o[l-1][1],v=0,c=0,d=0,y=0,p=0,m,g;a&&ve(a)&&r&&(m=o[1][0]-o[0][0],g=o[1][1]-o[0][1],p=Math.atan2(g,m),v=Math.cos(p)*(r||0),c=Math.sin(p)*(r||0)),e&&ve(e)&&i&&(m=o[l-2][0]-o[l-1][0],g=o[l-2][1]-o[l-1][1],p=Math.atan2(g,m),d=Math.cos(p)*(i||0),y=Math.sin(p)*(i||0)),n.moveTo(s+v,f+c);for(var w=1;w<l-1;w++){var k=o[w];n.lineTo(k[0],k[1])}n.lineTo(u+d,h+y)}function ft(n,t){var a=t.x,e=a===void 0?0:a,r=t.y,i=r===void 0?0:r,o=t.radius,l=t.width,s=t.height,f=l,u=s,h=o&&o.some(function(M){return M!==0});if(!h)n.rect(e,i,f,u);else{var v=l>0?1:-1,c=s>0?1:-1,d=v+c===0,y=o.map(function(M){return lr(M,0,Math.min(Math.abs(f)/2,Math.abs(u)/2))}),p=H(y,4),m=p[0],g=p[1],w=p[2],k=p[3];n.moveTo(v*m+e,i),n.lineTo(f-v*g+e,i),g!==0&&n.arc(f-v*g+e,c*g+i,g,-c*Math.PI/2,v>0?0:Math.PI,d),n.lineTo(f+e,u-c*w+i),w!==0&&n.arc(f-v*w+e,u-c*w+i,w,v>0?0:Math.PI,c>0?Math.PI/2:1.5*Math.PI,d),n.lineTo(v*k+e,u+i),k!==0&&n.arc(v*k+e,u-c*k+i,k,c>0?Math.PI/2:-Math.PI/2,v>0?Math.PI:0,d),n.lineTo(e,c*m+i),m!==0&&n.arc(v*m+e,c*m+i,m,v>0?Math.PI:0,c>0?Math.PI*1.5:Math.PI/2,d)}}var gr=(function(n){function t(){var a;X(this,t);for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return a=se(this,t,[].concat(r)),a.name="canvas-path-generator",a}return fe(t,n),j(t,[{key:"init",value:function(){var e,r=(e={},_(_(_(_(_(_(_(_(_(_(e,T.CIRCLE,at),T.ELLIPSE,nt),T.RECT,ft),T.LINE,it),T.POLYLINE,st),T.POLYGON,lt),T.PATH,ot),T.TEXT,void 0),T.GROUP,void 0),T.IMAGE,void 0),_(_(_(e,T.HTML,void 0),T.MESH,void 0),T.FRAGMENT,void 0));this.context.pathGeneratorFactory=r}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])})(Ie),Ga=Object.freeze({__proto__:null,Plugin:gr}),ut=(function(){function n(t){X(this,n),this.renderingContext=t.renderingContext,this.canvasConfig=t.config}return j(n,[{key:"init",value:function(){var a=this.canvasConfig,e=a.container,r=a.canvas;if(r)this.$canvas=r,e&&r.parentElement!==e&&e.appendChild(r),this.$container=r.parentElement,this.canvasConfig.container=this.$container;else if(e&&(this.$container=Fr(e)?document.getElementById(e):e,this.$container)){var i=document.createElement("canvas");this.$container.appendChild(i),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=i}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(a,e){var r=this.canvasConfig.devicePixelRatio;this.dpr=r,this.$canvas&&(this.$canvas.width=this.dpr*a,this.$canvas.height=this.dpr*e,Sr(this.$canvas,a,e)),this.renderingContext.renderReasons.add(Ar.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(a){this.$container&&this.$container.style&&(this.$container.style.cursor=a)}},{key:"toDataURL",value:(function(){var t=Ne(de().mark(function e(){var r,i,o,l=arguments;return de().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return r=l.length>0&&l[0]!==void 0?l[0]:{},i=r.type,o=r.encoderOptions,s.abrupt("return",this.context.canvas.toDataURL(i,o));case 1:case"end":return s.stop()}},e,this)}));function a(){return t.apply(this,arguments)}return a})()}])})(),vt=(function(n){function t(){var a;X(this,t);for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return a=se(this,t,[].concat(r)),a.name="canvas-context-register",a}return fe(t,n),j(t,[{key:"init",value:function(){this.context.ContextService=ut}},{key:"destroy",value:function(){delete this.context.ContextService}}])})(Ie),Ha=(function(n){function t(a){var e;return X(this,t),e=se(this,t,[a]),e.registerPlugin(new vt),e.registerPlugin(new br.Plugin),e.registerPlugin(new gr),e.registerPlugin(new cr),e.registerPlugin(new Rr.Plugin),e.registerPlugin(new mr),e.registerPlugin(new Er.Plugin),e}return fe(t,n),j(t)})(_r);export{Ga as CanvasPathGenerator,Na as CanvasPicker,Ba as CanvasRenderer,Ja as DomInteraction,Ka as HTMLRenderer,Qa as ImageLoader,Ha as Renderer};
|
|
5
|
-
/*! Bundled license information:
|
|
6
|
-
|
|
7
|
-
@babel/runtime/helpers/esm/regenerator.js:
|
|
8
|
-
(*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *)
|
|
9
|
-
|
|
10
|
-
@antv/g-canvas/dist/index.esm.js:
|
|
11
|
-
(*!
|
|
12
|
-
* @antv/g-canvas
|
|
13
|
-
* @description A renderer implemented by Canvas 2D API
|
|
14
|
-
* @version 2.2.0
|
|
15
|
-
* @date 12/24/2025, 11:55:53 AM
|
|
16
|
-
* @author AntVis
|
|
17
|
-
* @docs https://g.antv.antgroup.com/
|
|
18
|
-
*)
|
|
19
|
-
*/
|
|
20
|
-
//# sourceMappingURL=g-canvas.mjs.map
|