UNPKG

@weoil/datav-vue3

Version:
16 lines 264 kB
(function(D,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(D=typeof globalThis!="undefined"?globalThis:D||self,t(D["@kjgl/datav-vue3"]={},D.Vue))})(this,function(D,t){"use strict";var gm=Object.defineProperty,pm=Object.defineProperties;var mm=Object.getOwnPropertyDescriptors;var ea=Object.getOwnPropertySymbols;var ym=Object.prototype.hasOwnProperty,vm=Object.prototype.propertyIsEnumerable;var ta=(D,t,ne)=>t in D?gm(D,t,{enumerable:!0,configurable:!0,writable:!0,value:ne}):D[t]=ne,ve=(D,t)=>{for(var ne in t||(t={}))ym.call(t,ne)&&ta(D,ne,t[ne]);if(ea)for(var ne of ea(t))vm.call(t,ne)&&ta(D,ne,t[ne]);return D},be=(D,t)=>pm(D,mm(t));function ne(e,i){return arguments.length===1?parseInt((Math.random()*e+1).toString(),10):parseInt((Math.random()*(i-e+1)+e).toString(),10)}function na(e,i,o){let n;return function(){clearTimeout(n),n=setTimeout(()=>{i.call(o,...arguments)},e)}}function ra(e,i){const o=window.MutationObserver,n=new o(i);return n.observe(e,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0}),n}function Qe(e,i){const o=Math.abs(e[0]-i[0]),n=Math.abs(e[1]-i[1]);return Math.sqrt(o*o+n*n)}function we(e,i,o,n){return[e+Math.cos(n)*o,i+Math.sin(n)*o]}function oa(e){return e.filter(i=>typeof i=="number")}function aa(e){return e=oa(e),e.reduce((i,o)=>i+o,0)}function ia(e,i){const o=Math.abs(e.x-i.x),n=Math.abs(e.y-i.y);return Math.sqrt(o*o+n*n)}function Tn(e){const o=new Array(e.length-1).fill(0).map((n,r)=>[e[r],e[r+1]]).map(n=>ia(n[0],n[1]));return aa(o)}function la(e){return`${e.x},${e.y}`}function jn(e){return e.map(la).join(" ")}function de(e){return(e?"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx":"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx").replace(/[xy]/g,i=>{const o=Math.random()*16|0;return(i==="x"?o:o&3|8).toString(16)})}function z(e,i){for(const o in i){if(e[o]&&typeof e[o]=="object"){z(e[o],i[o]);continue}if(typeof i[o]=="object"){e[o]=I(i[o],!0);continue}e[o]=i[o]}return e}function I(e,i){if(!e)return e;const{parse:o,stringify:n}=JSON;if(!i)return o(n(e));const r=e instanceof Array?[]:{};if(e&&typeof e=="object")for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(e[a]&&typeof e[a]=="object"?r[a]=I(e[a],!0):r[a]=e[a]);return r}const H=(e,i,o)=>{const n=t.ref(0),r=t.ref(0);let a,l=null,s=null;const c=($=!0)=>new Promise(C=>{t.nextTick(()=>{s=e.value,n.value=e.value?e.value.clientWidth:0,r.value=e.value?e.value.clientHeight:0,e.value?(!n.value||!r.value)&&console.warn("DataV: Component width or height is 0px, rendering abnormality may occur!"):console.warn("DataV: Failed to get dom node, component rendering may be abnormal!"),typeof i=="function"&&$&&i(),C(!0)})}),d=()=>{a=na(100,c,globalThis)},u=()=>{l=ra(s,a),window.addEventListener("resize",a)},_=()=>{!l||(l.disconnect(),l.takeRecords(),l=null,window.removeEventListener("resize",a))},p=async()=>{await c(!1),d(),u(),typeof o=="function"&&o()};return t.onMounted(()=>{p()}),t.onUnmounted(()=>{_()}),{width:n,height:r,initWH:c}};var bm=(()=>`.dv-conical-column-chart{width:100%;height:100%}.dv-conical-column-chart text{text-anchor:middle} `)();const sa=["width","height"],ca=["d","fill"],da=["fill","x","y"],fa=["xlink:href","width","height","x","y"],ua=["fill","x","y"],zn={__name:"index",props:{config:{type:Object,default:()=>({})}},setup(e){const i=e,o=t.ref(null),{width:n,height:r}=H(o,s,l),a=t.reactive({defaultConfig:{data:[],img:[],fontSize:12,imgSideLength:30,columnColor:"rgba(0, 194, 255, 0.4)",textColor:"#fff",showValue:!1},mergedConfig:null,column:[]});t.watch(()=>i.config,()=>{c()},{deep:!0});function l(){c()}function s(){c()}function c(){d(),u(),_()}function d(){a.mergedConfig=z(I(a.defaultConfig,!0),i.config||{})}function u(){let{data:p}=a.mergedConfig;p=I(p,!0),p.sort(({value:C},{value:S})=>C>S?-1:C<S?1:0);const $=p[0]?p[0].value:10;p=p.map(C=>be(ve({},C),{percent:C.value/$})),a.mergedConfig.data=p}function _(){const{imgSideLength:p,fontSize:$,data:C}=a.mergedConfig,S=C.length,E=n.value/(S+1),B=r.value-p-$-5,A=r.value-$-5;a.column=C.map((x,b)=>{const{percent:f}=x,m=E*(b+1),v=E*b,g=E*(b+2),y=A-B*f,h=B*f*.6+y,w=` M${v}, ${A} Q${m}, ${h} ${m},${y} M${m},${y} Q${m}, ${h} ${g},${A} L${v}, ${A} Z `,k=(A+y)/2+$/2;return be(ve({},x),{d:w,x:m,y,textY:k})})}return(p,$)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"conicalColumnChart",ref:o,class:"dv-conical-column-chart"},[(t.openBlock(),t.createElementBlock("svg",{width:t.unref(n),height:t.unref(r)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.column,(C,S)=>(t.openBlock(),t.createElementBlock("g",{key:S},[t.createElementVNode("path",{d:C.d,fill:a.mergedConfig.columnColor},null,8,ca),t.createElementVNode("text",{style:t.normalizeStyle(`fontSize:${a.mergedConfig.fontSize}px`),fill:a.mergedConfig.textColor,x:C.x,y:t.unref(r)-4},t.toDisplayString(C.name),13,da),a.mergedConfig.img.length?(t.openBlock(),t.createElementBlock("image",{key:0,"xlink:href":a.mergedConfig.img[S%a.mergedConfig.img.length],width:a.mergedConfig.imgSideLength,height:a.mergedConfig.imgSideLength,x:C.x-a.mergedConfig.imgSideLength/2,y:C.y-a.mergedConfig.imgSideLength},null,8,fa)):t.createCommentVNode("",!0),a.mergedConfig.showValue?(t.openBlock(),t.createElementBlock("text",{key:1,style:t.normalizeStyle(`fontSize:${a.mergedConfig.fontSize}px`),fill:a.mergedConfig.textColor,x:C.x,y:C.textY},t.toDisplayString(C.value),13,ua)):t.createCommentVNode("",!0)]))),128))],8,sa))],512))}},Ke={install(e){e.component("DvConicalColumnChart",zn)}};var xm=(()=>`.dv-percent-pond{position:relative;display:flex;flex-direction:column}.dv-percent-pond svg{position:absolute;left:0px;top:0px;width:100%;height:100%}.dv-percent-pond polyline{transition:all .3s}.dv-percent-pond text{font-size:25px;font-weight:700;text-anchor:middle;dominant-baseline:middle} `)();const ha=["id"],ga=["offset","stop-color"],pa=["id","x2"],ma=["offset","stop-color"],ya=["x","y","rx","ry","stroke-width","stroke","width","height"],va=["stroke-width","stroke-dasharray","stroke","points"],ba=["stroke","fill","x","y"],In={__name:"index",props:{config:{type:Object,default:()=>({})}},setup(e){const i=e,o=de(),n=t.ref(null),r=t.reactive({gradientId1:`percent-pond-gradientId1-${o}`,gradientId2:`percent-pond-gradientId2-${o}`,width:0,height:0,defaultConfig:{value:0,colors:["#3DE7C9","#00BAFF"],borderWidth:3,borderGap:3,lineDash:[5,1],textColor:"#fff",borderRadius:5,localGradient:!1,formatter:"{value}%"},mergedConfig:null}),a=t.computed(()=>{if(!r.mergedConfig)return 0;const{borderWidth:E}=r.mergedConfig;return r.width-E}),l=t.computed(()=>{if(!r.mergedConfig)return 0;const{borderWidth:E}=r.mergedConfig;return r.height-E}),s=t.computed(()=>{const E=r.height/2;if(!r.mergedConfig)return`0, ${E} 0, ${E}`;const{borderWidth:B,borderGap:A,value:x}=r.mergedConfig,b=(r.width-(B+A)*2)/100*x;return` ${B+A}, ${E} ${B+A+b}, ${E+.001} `}),c=t.computed(()=>{if(!r.mergedConfig)return 0;const{borderWidth:E,borderGap:B}=r.mergedConfig;return r.height-(E+B)*2}),d=t.computed(()=>{if(!r.mergedConfig)return[];const{colors:E}=r.mergedConfig,B=E.length,A=100/(B-1);return E.map((x,b)=>[A*b,x])}),u=t.computed(()=>r.mergedConfig&&r.mergedConfig.localGradient?r.gradientId1:r.gradientId2),_=t.computed(()=>{if(!r.mergedConfig)return"100%";const{value:E}=r.mergedConfig;return`${200-E}%`}),p=t.computed(()=>{if(!r.mergedConfig)return"";const{value:E,formatter:B}=r.mergedConfig;return B.replace("{value}",E)});t.watch(()=>i.config,()=>{S()},{deep:!0}),t.onMounted(()=>{$()});async function $(){await C(),i.config&&S()}async function C(){await t.nextTick();const{clientWidth:E,clientHeight:B}=n.value;r.width=E,r.height=B}function S(){r.mergedConfig=z(I(r.defaultConfig,!0),i.config||{})}return(E,B)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"percentPond",ref:n,class:"dv-percent-pond"},[(t.openBlock(),t.createElementBlock("svg",null,[t.createElementVNode("defs",null,[t.createElementVNode("linearGradient",{id:r.gradientId1,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(d),A=>(t.openBlock(),t.createElementBlock("stop",{key:A[0],offset:`${A[0]}%`,"stop-color":A[1]},null,8,ga))),128))],8,ha),t.createElementVNode("linearGradient",{id:r.gradientId2,x1:"0%",y1:"0%",x2:t.unref(_),y2:"0%"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(d),A=>(t.openBlock(),t.createElementBlock("stop",{key:A[0],offset:`${A[0]}%`,"stop-color":A[1]},null,8,ma))),128))],8,pa)]),t.createElementVNode("rect",{x:r.mergedConfig?r.mergedConfig.borderWidth/2:"0",y:r.mergedConfig?r.mergedConfig.borderWidth/2:"0",rx:r.mergedConfig?r.mergedConfig.borderRadius:"0",ry:r.mergedConfig?r.mergedConfig.borderRadius:"0",fill:"transparent","stroke-width":r.mergedConfig?r.mergedConfig.borderWidth:"0",stroke:`url(#${r.gradientId1})`,width:t.unref(a)>0?t.unref(a):0,height:t.unref(l)>0?t.unref(l):0},null,8,ya),t.createElementVNode("polyline",{"stroke-width":t.unref(c),"stroke-dasharray":r.mergedConfig?r.mergedConfig.lineDash.join(","):"0",stroke:`url(#${t.unref(u)})`,points:t.unref(s)},null,8,va),t.createElementVNode("text",{stroke:r.mergedConfig?r.mergedConfig.textColor:"#fff",fill:r.mergedConfig?r.mergedConfig.textColor:"#fff",x:r.width/2,y:r.height/2},t.toDisplayString(t.unref(p)),9,ba)]))],512))}},Je={install(e){e.component("DvPercentPond",In)}};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ze={},U={exports:{}};(function(e){function i(o){return o&&o.__esModule?o:{default:o}}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(U);var Un={},se={exports:{}};(function(e){function i(o,n,r){return n in o?Object.defineProperty(o,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[n]=r,o}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(se);var Z={exports:{}},qn={exports:{}},dn={exports:{}};(function(e){function i(o,n){(n==null||n>o.length)&&(n=o.length);for(var r=0,a=new Array(n);r<n;r++)a[r]=o[r];return a}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(dn),function(e){var i=dn.exports;function o(n){if(Array.isArray(n))return i(n)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}(qn);var Xn={exports:{}};(function(e){function i(o){if(typeof Symbol!="undefined"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(Xn);var fn={exports:{}};(function(e){var i=dn.exports;function o(n,r){if(!!n){if(typeof n=="string")return i(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return i(n,r)}}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(fn);var Yn={exports:{}};(function(e){function i(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(Yn),function(e){var i=qn.exports,o=Xn.exports,n=fn.exports,r=Yn.exports;function a(l){return i(l)||o(l)||n(l)||r()}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports}(Z);var Pe={exports:{}};(function(e){function i(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(Pe);var K={},Qn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new Map([["transparent","rgba(0,0,0,0)"],["black","#000000"],["silver","#C0C0C0"],["gray","#808080"],["white","#FFFFFF"],["maroon","#800000"],["red","#FF0000"],["purple","#800080"],["fuchsia","#FF00FF"],["green","#008000"],["lime","#00FF00"],["olive","#808000"],["yellow","#FFFF00"],["navy","#000080"],["blue","#0000FF"],["teal","#008080"],["aqua","#00FFFF"],["aliceblue","#f0f8ff"],["antiquewhite","#faebd7"],["aquamarine","#7fffd4"],["azure","#f0ffff"],["beige","#f5f5dc"],["bisque","#ffe4c4"],["blanchedalmond","#ffebcd"],["blueviolet","#8a2be2"],["brown","#a52a2a"],["burlywood","#deb887"],["cadetblue","#5f9ea0"],["chartreuse","#7fff00"],["chocolate","#d2691e"],["coral","#ff7f50"],["cornflowerblue","#6495ed"],["cornsilk","#fff8dc"],["crimson","#dc143c"],["cyan","#00ffff"],["darkblue","#00008b"],["darkcyan","#008b8b"],["darkgoldenrod","#b8860b"],["darkgray","#a9a9a9"],["darkgreen","#006400"],["darkgrey","#a9a9a9"],["darkkhaki","#bdb76b"],["darkmagenta","#8b008b"],["darkolivegreen","#556b2f"],["darkorange","#ff8c00"],["darkorchid","#9932cc"],["darkred","#8b0000"],["darksalmon","#e9967a"],["darkseagreen","#8fbc8f"],["darkslateblue","#483d8b"],["darkslategray","#2f4f4f"],["darkslategrey","#2f4f4f"],["darkturquoise","#00ced1"],["darkviolet","#9400d3"],["deeppink","#ff1493"],["deepskyblue","#00bfff"],["dimgray","#696969"],["dimgrey","#696969"],["dodgerblue","#1e90ff"],["firebrick","#b22222"],["floralwhite","#fffaf0"],["forestgreen","#228b22"],["gainsboro","#dcdcdc"],["ghostwhite","#f8f8ff"],["gold","#ffd700"],["goldenrod","#daa520"],["greenyellow","#adff2f"],["grey","#808080"],["honeydew","#f0fff0"],["hotpink","#ff69b4"],["indianred","#cd5c5c"],["indigo","#4b0082"],["ivory","#fffff0"],["khaki","#f0e68c"],["lavender","#e6e6fa"],["lavenderblush","#fff0f5"],["lawngreen","#7cfc00"],["lemonchiffon","#fffacd"],["lightblue","#add8e6"],["lightcoral","#f08080"],["lightcyan","#e0ffff"],["lightgoldenrodyellow","#fafad2"],["lightgray","#d3d3d3"],["lightgreen","#90ee90"],["lightgrey","#d3d3d3"],["lightpink","#ffb6c1"],["lightsalmon","#ffa07a"],["lightseagreen","#20b2aa"],["lightskyblue","#87cefa"],["lightslategray","#778899"],["lightslategrey","#778899"],["lightsteelblue","#b0c4de"],["lightyellow","#ffffe0"],["limegreen","#32cd32"],["linen","#faf0e6"],["magenta","#ff00ff"],["mediumaquamarine","#66cdaa"],["mediumblue","#0000cd"],["mediumorchid","#ba55d3"],["mediumpurple","#9370db"],["mediumseagreen","#3cb371"],["mediumslateblue","#7b68ee"],["mediumspringgreen","#00fa9a"],["mediumturquoise","#48d1cc"],["mediumvioletred","#c71585"],["midnightblue","#191970"],["mintcream","#f5fffa"],["mistyrose","#ffe4e1"],["moccasin","#ffe4b5"],["navajowhite","#ffdead"],["oldlace","#fdf5e6"],["olivedrab","#6b8e23"],["orange","#ffa500"],["orangered","#ff4500"],["orchid","#da70d6"],["palegoldenrod","#eee8aa"],["palegreen","#98fb98"],["paleturquoise","#afeeee"],["palevioletred","#db7093"],["papayawhip","#ffefd5"],["peachpuff","#ffdab9"],["peru","#cd853f"],["pink","#ffc0cb"],["plum","#dda0dd"],["powderblue","#b0e0e6"],["rosybrown","#bc8f8f"],["royalblue","#4169e1"],["saddlebrown","#8b4513"],["salmon","#fa8072"],["sandybrown","#f4a460"],["seagreen","#2e8b57"],["seashell","#fff5ee"],["sienna","#a0522d"],["skyblue","#87ceeb"],["slateblue","#6a5acd"],["slategray","#708090"],["slategrey","#708090"],["snow","#fffafa"],["springgreen","#00ff7f"],["steelblue","#4682b4"],["tan","#d2b48c"],["thistle","#d8bfd8"],["tomato","#ff6347"],["turquoise","#40e0d0"],["violet","#ee82ee"],["wheat","#f5deb3"],["whitesmoke","#f5f5f5"],["yellowgreen","#9acd32"]]);e.default=i})(Qn),function(e){var i=U.exports;Object.defineProperty(e,"__esModule",{value:!0}),e.getRgbValue=d,e.getRgbaValue=p,e.getOpacity=$,e.toRgb=C,e.toHex=S,e.getColorFromRgbValue=E,e.darken=B,e.lighten=A,e.fade=x,e.default=void 0;var o=i(Z.exports),n=i(Qn),r=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,a=/^(rgb|rgba|RGB|RGBA)/,l=/^(rgba|RGBA)/;function s(f){var m=r.test(f),v=a.test(f);return m||v?f:(f=c(f),f||(console.error("Color: Invalid color!"),!1))}function c(f){return f?n.default.has(f)?n.default.get(f):!1:(console.error("getColorByKeywords: Missing parameters!"),!1)}function d(f){if(!f)return console.error("getRgbValue: Missing parameters!"),!1;if(f=s(f),!f)return!1;var m=r.test(f),v=a.test(f),g=f.toLowerCase();if(m)return u(g);if(v)return _(g)}function u(f){return f=f.replace("#",""),f.length===3&&(f=Array.from(f).map(function(m){return m+m}).join("")),f=f.split(""),new Array(3).fill(0).map(function(m,v){return parseInt("0x".concat(f[v*2]).concat(f[v*2+1]))})}function _(f){return f.replace(/rgb\(|rgba\(|\)/g,"").split(",").slice(0,3).map(function(m){return parseInt(m)})}function p(f){if(!f)return console.error("getRgbaValue: Missing parameters!"),!1;var m=d(f);return m?(m.push($(f)),m):!1}function $(f){if(!f)return console.error("getOpacity: Missing parameters!"),!1;if(f=s(f),!f)return!1;var m=l.test(f);return m?(f=f.toLowerCase(),Number(f.split(",").slice(-1)[0].replace(/[)|\s]/g,""))):1}function C(f,m){if(!f)return console.error("toRgb: Missing parameters!"),!1;var v=d(f);if(!v)return!1;var g=typeof m=="number";return g?"rgba("+v.join(",")+",".concat(m,")"):"rgb("+v.join(",")+")"}function S(f){return f?r.test(f)?f:(f=d(f),f?"#"+f.map(function(m){return Number(m).toString(16)}).map(function(m){return m==="0"?"00":m}).join(""):!1):(console.error("toHex: Missing parameters!"),!1)}function E(f){if(!f)return console.error("getColorFromRgbValue: Missing parameters!"),!1;var m=f.length;if(m!==3&&m!==4)return console.error("getColorFromRgbValue: Value is illegal!"),!1;var v=m===3?"rgb(":"rgba(";return v+=f.join(",")+")",v}function B(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!f)return console.error("darken: Missing parameters!"),!1;var v=p(f);return v?(v=v.map(function(g,y){return y===3?g:g-Math.ceil(2.55*m)}).map(function(g){return g<0?0:g}),E(v)):!1}function A(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!f)return console.error("lighten: Missing parameters!"),!1;var v=p(f);return v?(v=v.map(function(g,y){return y===3?g:g+Math.ceil(2.55*m)}).map(function(g){return g>255?255:g}),E(v)):!1}function x(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;if(!f)return console.error("fade: Missing parameters!"),!1;var v=d(f);if(!v)return!1;var g=[].concat((0,o.default)(v),[m/100]);return E(g)}var b={fade:x,toHex:S,toRgb:C,darken:B,lighten:A,getOpacity:$,getRgbValue:d,getRgbaValue:p,getColorFromRgbValue:E};e.default=b}(K);var et={},Kn={},re={exports:{}},Jn={exports:{}};(function(e){function i(o){if(Array.isArray(o))return o}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(Jn);var Zn={exports:{}};(function(e){function i(o,n){var r=o==null?null:typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(r!=null){var a=[],l=!0,s=!1,c,d;try{for(r=r.call(o);!(l=(c=r.next()).done)&&(a.push(c.value),!(n&&a.length===n));l=!0);}catch(u){s=!0,d=u}finally{try{!l&&r.return!=null&&r.return()}finally{if(s)throw d}}return a}}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(Zn);var er={exports:{}};(function(e){function i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(er),function(e){var i=Jn.exports,o=Zn.exports,n=fn.exports,r=er.exports;function a(l,s){return i(l)||o(l,s)||n(l,s)||r()}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports}(re),function(e){var i=U.exports;Object.defineProperty(e,"__esModule",{value:!0}),e.bezierCurveToPolyline=B,e.getBezierCurveLength=A,e.default=void 0;var o=i(re.exports),n=i(Z.exports),r=Math.sqrt,a=Math.pow,l=Math.ceil,s=Math.abs,c=50;function d(b){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,m=b.length-1,v=b[0],g=b[m][2],y=b.slice(1),h=y.map(function(L,O){var G=O===0?v:y[O-1][2];return u.apply(void 0,[G].concat((0,n.default)(L)))}),w=new Array(m).fill(c),k=C(h,w),P=E(k,h,y,f);return P.segmentPoints.push(g),P}function u(b,f,m,v){return function(g){var y=1-g,h=a(y,3),w=a(y,2),k=a(g,3),P=a(g,2);return[b[0]*h+3*f[0]*g*w+3*m[0]*P*y+v[0]*k,b[1]*h+3*f[1]*g*w+3*m[1]*P*y+v[1]*k]}}function _(b,f){var m=(0,o.default)(b,2),v=m[0],g=m[1],y=(0,o.default)(f,2),h=y[0],w=y[1];return r(a(v-h,2)+a(g-w,2))}function p(b){return b.reduce(function(f,m){return f+m},0)}function $(b){return b.map(function(f,m){return new Array(f.length-1).fill(0).map(function(v,g){return _(f[g],f[g+1])})})}function C(b,f){return b.map(function(m,v){var g=1/f[v];return new Array(f[v]).fill("").map(function(y,h){return m(h*g)})})}function S(b,f){return b.map(function(m){return m.map(function(v){return s(v-f)})}).map(function(m){return p(m)}).reduce(function(m,v){return m+v},0)}function E(b,f,m,v){var g=4,y=1,h=function(){var P=b.reduce(function(T,j){return T+j.length},0);b.forEach(function(T,j){return T.push(m[j][2])});var L=$(b),O=L.reduce(function(T,j){return T+j.length},0),G=L.map(function(T){return p(T)}),R=p(G),V=R/O,N=S(L,V);if(N<=v)return"break";P=l(V/v*P*1.1);var M=G.map(function(T){return l(T/R*P)});b=C(f,M),P=b.reduce(function(T,j){return T+j.length},0);var F=JSON.parse(JSON.stringify(b));F.forEach(function(T,j){return T.push(m[j][2])}),L=$(F),O=L.reduce(function(T,j){return T+j.length},0),G=L.map(function(T){return p(T)}),R=p(G),V=R/O;var W=1/P/10;f.forEach(function(T,j){for(var q=M[j],X=new Array(q).fill("").map(function(Xe,Fn){return Fn/M[j]}),Y=0;Y<g;Y++)for(var oe=$([b[j]])[0],ye=oe.map(function(Xe){return Xe-V}),ce=0,le=0;le<q;le++){if(le===0)return;ce+=ye[le-1],X[le]-=W*ce,X[le]>1&&(X[le]=1),X[le]<0&&(X[le]=0),b[j][le]=T(X[le])}}),g*=4,y++};do{var w=h();if(w==="break")break}while(g<=1025);return b=b.reduce(function(k,P){return k.concat(P)},[]),{segmentPoints:b,cycles:y,rounds:g}}function B(b){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;if(!b)return console.error("bezierCurveToPolyline: Missing parameters!"),!1;if(!(b instanceof Array))return console.error("bezierCurveToPolyline: Parameter bezierCurve must be an array!"),!1;if(typeof f!="number")return console.error("bezierCurveToPolyline: Parameter precision must be a number!"),!1;var m=d(b,f),v=m.segmentPoints;return v}function A(b){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;if(!b)return console.error("getBezierCurveLength: Missing parameters!"),!1;if(!(b instanceof Array))return console.error("getBezierCurveLength: Parameter bezierCurve must be an array!"),!1;if(typeof f!="number")return console.error("getBezierCurveLength: Parameter precision must be a number!"),!1;var m=d(b,f),v=m.segmentPoints,g=$([v])[0],y=p(g);return y}var x=B;e.default=x}(Kn);var tr={};(function(e){var i=U.exports;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(re.exports),n=i(Z.exports);function r(d){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.25,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.25;if(!(d instanceof Array))return console.error("polylineToBezierCurve: Parameter polyline must be an array!"),!1;if(d.length<=2)return console.error("polylineToBezierCurve: Converting to a curve requires at least 3 points!"),!1;var $=d[0],C=d.length-1,S=new Array(C).fill(0).map(function(E,B){return[].concat((0,n.default)(a(d,B,u,_,p)),[d[B+1]])});return u&&l(S,$),S.unshift(d[0]),S}function a(d,u){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.25,$=arguments.length>4&&arguments[4]!==void 0?arguments[4]:.25,C=d.length;if(!(C<3||u>=C)){var S=u-1;S<0&&(S=_?C+S:0);var E=u+1;E>=C&&(E=_?E-C:C-1);var B=u+2;B>=C&&(B=_?B-C:C-1);var A=d[S],x=d[u],b=d[E],f=d[B];return[[x[0]+p*(b[0]-A[0]),x[1]+p*(b[1]-A[1])],[b[0]-$*(f[0]-x[0]),b[1]-$*(f[1]-x[1])]]}}function l(d,u){var _=d[0],p=d.slice(-1)[0];return d.push([s(p[1],p[2]),s(_[0],u),u]),d}function s(d,u){var _=(0,o.default)(d,2),p=_[0],$=_[1],C=(0,o.default)(u,2),S=C[0],E=C[1],B=S-p,A=E-$;return[S+B,E+A]}var c=r;e.default=c})(tr),function(e){var i=U.exports;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"bezierCurveToPolyline",{enumerable:!0,get:function(){return o.bezierCurveToPolyline}}),Object.defineProperty(e,"getBezierCurveLength",{enumerable:!0,get:function(){return o.getBezierCurveLength}}),Object.defineProperty(e,"polylineToBezierCurve",{enumerable:!0,get:function(){return n.default}}),e.default=void 0;var o=Kn,n=i(tr),r={bezierCurveToPolyline:o.bezierCurveToPolyline,getBezierCurveLength:o.getBezierCurveLength,polylineToBezierCurve:n.default};e.default=r}(et);var ee={},ae={exports:{}};(function(e){function i(o){return e.exports=i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,i(o)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports})(ae),function(e){var i=U.exports;Object.defineProperty(e,"__esModule",{value:!0}),e.deepClone=p,e.eliminateBlur=$,e.checkPointIsInCircle=C,e.getTwoPointDistance=S,e.checkPointIsInPolygon=E,e.checkPointIsInSector=B,e.checkPointIsNearPolyline=x,e.checkPointIsInRect=b,e.getRotatePointPos=f,e.getScalePointPos=m,e.getTranslatePointPos=v,e.getDistanceBetweenPointAndLine=g,e.getCircleRadianPoint=y,e.getRegularPolygonPoints=h,e.default=void 0;var o=i(Z.exports),n=i(re.exports),r=i(ae.exports),a=Math.abs,l=Math.sqrt,s=Math.sin,c=Math.cos,d=Math.max,u=Math.min,_=Math.PI;function p(k){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!k)return k;var L=JSON.parse,O=JSON.stringify;if(!P)return L(O(k));var G=k instanceof Array?[]:{};if(k&&(0,r.default)(k)==="object")for(var R in k)k.hasOwnProperty(R)&&(k[R]&&(0,r.default)(k[R])==="object"?G[R]=p(k[R],!0):G[R]=k[R]);return G}function $(k){return k.map(function(P){var L=(0,n.default)(P,2),O=L[0],G=L[1];return[parseInt(O)+.5,parseInt(G)+.5]})}function C(k,P,L,O){return S(k,[P,L])<=O}function S(k,P){var L=(0,n.default)(k,2),O=L[0],G=L[1],R=(0,n.default)(P,2),V=R[0],N=R[1],M=a(O-V),F=a(G-N);return l(M*M+F*F)}function E(k,P){for(var L=0,O=(0,n.default)(k,2),G=O[0],R=O[1],V=P.length,N=1,M=P[0];N<=V;N++){var F=P[N%V];if(G>u(M[0],F[0])&&G<=d(M[0],F[0])&&R<=d(M[1],F[1])&&M[0]!==F[0]){var W=(G-M[0])*(F[1]-M[1])/(F[0]-M[0])+M[1];(M[1]===F[1]||R<=W)&&L++}M=F}return L%2===1}function B(k,P,L,O,G,R,V){if(!k||S(k,[P,L])>O)return!1;if(!V){var N=p([R,G]),M=(0,n.default)(N,2);G=M[0],R=M[1]}var F=G>R;if(F){var W=[R,G];G=W[0],R=W[1]}var T=R-G;if(T>=_*2)return!0;var j=(0,n.default)(k,2),q=j[0],X=j[1],Y=y(P,L,O,G),oe=(0,n.default)(Y,2),ye=oe[0],ce=oe[1],le=y(P,L,O,R),Xe=(0,n.default)(le,2),Fn=Xe[0],um=Xe[1],Ko=[q-P,X-L],Rn=[ye-P,ce-L],Wn=[Fn-P,um-L],Jo=T>_;if(Jo){var hm=p([Wn,Rn]),Zo=(0,n.default)(hm,2);Rn=Zo[0],Wn=Zo[1]}var Ye=A(Rn,Ko)&&!A(Wn,Ko);return Jo&&(Ye=!Ye),F&&(Ye=!Ye),Ye}function A(k,P){var L=(0,n.default)(k,2),O=L[0],G=L[1],R=(0,n.default)(P,2),V=R[0],N=R[1];return-G*V+O*N>0}function x(k,P,L){var O=L/2,G=P.map(function(N){var M=(0,n.default)(N,2),F=M[0],W=M[1];return[F,W-O]}),R=P.map(function(N){var M=(0,n.default)(N,2),F=M[0],W=M[1];return[F,W+O]}),V=[].concat((0,o.default)(G),(0,o.default)(R.reverse()));return E(k,V)}function b(k,P,L,O,G){var R=(0,n.default)(k,2),V=R[0],N=R[1];return!(V<P||N<L||V>P+O||N>L+G)}function f(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1?arguments[1]:void 0,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0];if(!P)return!1;if(k%360===0)return P;var O=(0,n.default)(P,2),G=O[0],R=O[1],V=(0,n.default)(L,2),N=V[0],M=V[1];return k*=_/180,[(G-N)*c(k)-(R-M)*s(k)+N,(G-N)*s(k)+(R-M)*c(k)+M]}function m(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[1,1],P=arguments.length>1?arguments[1]:void 0,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0];if(!P)return!1;if(k===1)return P;var O=(0,n.default)(P,2),G=O[0],R=O[1],V=(0,n.default)(L,2),N=V[0],M=V[1],F=(0,n.default)(k,2),W=F[0],T=F[1],j=G-N,q=R-M;return[j*W+N,q*T+M]}function v(k,P){if(!k||!P)return!1;var L=(0,n.default)(P,2),O=L[0],G=L[1],R=(0,n.default)(k,2),V=R[0],N=R[1];return[O+V,G+N]}function g(k,P,L){if(!k||!P||!L)return!1;var O=(0,n.default)(k,2),G=O[0],R=O[1],V=(0,n.default)(P,2),N=V[0],M=V[1],F=(0,n.default)(L,2),W=F[0],T=F[1],j=T-M,q=N-W,X=M*(W-N)-N*(T-M),Y=a(j*G+q*R+X),oe=l(j*j+q*q);return Y/oe}function y(k,P,L,O){return[k+c(O)*L,P+s(O)*L]}function h(k,P,L,O){var G=arguments.length>4&&arguments[4]!==void 0?arguments[4]:_*-.5,R=_*2/O,V=new Array(O).fill("").map(function(N,M){return M*R+G});return V.map(function(N){return y(k,P,L,N)})}var w={deepClone:p,eliminateBlur:$,checkPointIsInCircle:C,checkPointIsInPolygon:E,checkPointIsInSector:B,checkPointIsNearPolyline:x,getTwoPointDistance:S,getRotatePointPos:f,getScalePointPos:m,getTranslatePointPos:v,getCircleRadianPoint:y,getRegularPolygonPoints:h,getDistanceBetweenPointAndLine:g};e.default=w}(ee);var tt={},nr={};(function(e){var i=U.exports;Object.defineProperty(e,"__esModule",{value:!0}),e.drawPolylinePath=n,e.drawBezierCurvePath=r,e.default=void 0;var o=i(Z.exports);function n(l,s){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!l||s.length<2)return!1;c&&l.beginPath(),s.forEach(function(u,_){return u&&(_===0?l.moveTo.apply(l,(0,o.default)(u)):l.lineTo.apply(l,(0,o.default)(u)))}),d&&l.closePath()}function r(l,s){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(!l||!s)return!1;d&&l.beginPath(),c&&l.moveTo.apply(l,(0,o.default)(c)),s.forEach(function(_){return _&&l.bezierCurveTo.apply(l,(0,o.default)(_[0]).concat((0,o.default)(_[1]),(0,o.default)(_[2])))}),u&&l.closePath()}var a={drawPolylinePath:n,drawBezierCurvePath:r};e.default=a})(nr),function(e){var i=U.exports;Object.defineProperty(e,"__esModule",{value:!0}),e.extendNewGraph=m,e.default=e.text=e.bezierCurve=e.smoothline=e.polyline=e.regPolygon=e.sector=e.arc=e.ring=e.rect=e.ellipse=e.circle=void 0;var o=i(Z.exports),n=i(re.exports),r=i(et),a=ee,l=nr,s=r.default.polylineToBezierCurve,c=r.default.bezierCurveToPolyline,d={shape:{rx:0,ry:0,r:0},validator:function(g){var y=g.shape,h=y.rx,w=y.ry,k=y.r;return typeof h!="number"||typeof w!="number"||typeof k!="number"?(console.error("Circle shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,w=y.shape;h.beginPath();var k=w.rx,P=w.ry,L=w.r;h.arc(k,P,L>0?L:.01,0,Math.PI*2),h.fill(),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,w=h.rx,k=h.ry,P=h.r;return(0,a.checkPointIsInCircle)(g,w,k,P)},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.rx,P=h.ry;w.graphCenter=[k,P]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape;this.attr("shape",{rx:k.rx+h,ry:k.ry+w})}};e.circle=d;var u={shape:{rx:0,ry:0,hr:0,vr:0},validator:function(g){var y=g.shape,h=y.rx,w=y.ry,k=y.hr,P=y.vr;return typeof h!="number"||typeof w!="number"||typeof k!="number"||typeof P!="number"?(console.error("Ellipse shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,w=y.shape;h.beginPath();var k=w.rx,P=w.ry,L=w.hr,O=w.vr;h.ellipse(k,P,L>0?L:.01,O>0?O:.01,0,0,Math.PI*2),h.fill(),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,w=h.rx,k=h.ry,P=h.hr,L=h.vr,O=Math.max(P,L),G=Math.min(P,L),R=Math.sqrt(O*O-G*G),V=[w-R,k],N=[w+R,k],M=(0,a.getTwoPointDistance)(g,V)+(0,a.getTwoPointDistance)(g,N);return M<=2*O},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.rx,P=h.ry;w.graphCenter=[k,P]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape;this.attr("shape",{rx:k.rx+h,ry:k.ry+w})}};e.ellipse=u;var _={shape:{x:0,y:0,w:0,h:0},validator:function(g){var y=g.shape,h=y.x,w=y.y,k=y.w,P=y.h;return typeof h!="number"||typeof w!="number"||typeof k!="number"||typeof P!="number"?(console.error("Rect shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,w=y.shape;h.beginPath();var k=w.x,P=w.y,L=w.w,O=w.h;h.rect(k,P,L,O),h.fill(),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,w=h.x,k=h.y,P=h.w,L=h.h;return(0,a.checkPointIsInRect)(g,w,k,P,L)},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.x,P=h.y,L=h.w,O=h.h;w.graphCenter=[k+L/2,P+O/2]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape;this.attr("shape",{x:k.x+h,y:k.y+w})}};e.rect=_;var p={shape:{rx:0,ry:0,r:0},validator:function(g){var y=g.shape,h=y.rx,w=y.ry,k=y.r;return typeof h!="number"||typeof w!="number"||typeof k!="number"?(console.error("Ring shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,w=y.shape;h.beginPath();var k=w.rx,P=w.ry,L=w.r;h.arc(k,P,L>0?L:.01,0,Math.PI*2),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,w=y.style,k=h.rx,P=h.ry,L=h.r,O=w.lineWidth,G=O/2,R=L-G,V=L+G,N=(0,a.getTwoPointDistance)(g,[k,P]);return N>=R&&N<=V},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.rx,P=h.ry;w.graphCenter=[k,P]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape;this.attr("shape",{rx:k.rx+h,ry:k.ry+w})}};e.ring=p;var $={shape:{rx:0,ry:0,r:0,startAngle:0,endAngle:0,clockWise:!0},validator:function(g){var y=g.shape,h=["rx","ry","r","startAngle","endAngle"];return h.find(function(w){return typeof y[w]!="number"})?(console.error("Arc shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,w=y.shape;h.beginPath();var k=w.rx,P=w.ry,L=w.r,O=w.startAngle,G=w.endAngle,R=w.clockWise;h.arc(k,P,L>0?L:.001,O,G,!R),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,w=y.style,k=h.rx,P=h.ry,L=h.r,O=h.startAngle,G=h.endAngle,R=h.clockWise,V=w.lineWidth,N=V/2,M=L-N,F=L+N;return!(0,a.checkPointIsInSector)(g,k,P,M,O,G,R)&&(0,a.checkPointIsInSector)(g,k,P,F,O,G,R)},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.rx,P=h.ry;w.graphCenter=[k,P]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape;this.attr("shape",{rx:k.rx+h,ry:k.ry+w})}};e.arc=$;var C={shape:{rx:0,ry:0,r:0,startAngle:0,endAngle:0,clockWise:!0},validator:function(g){var y=g.shape,h=["rx","ry","r","startAngle","endAngle"];return h.find(function(w){return typeof y[w]!="number"})?(console.error("Sector shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,w=y.shape;h.beginPath();var k=w.rx,P=w.ry,L=w.r,O=w.startAngle,G=w.endAngle,R=w.clockWise;h.arc(k,P,L>0?L:.01,O,G,!R),h.lineTo(k,P),h.closePath(),h.stroke(),h.fill()},hoverCheck:function(g,y){var h=y.shape,w=h.rx,k=h.ry,P=h.r,L=h.startAngle,O=h.endAngle,G=h.clockWise;return(0,a.checkPointIsInSector)(g,w,k,P,L,O,G)},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.rx,P=h.ry;w.graphCenter=[k,P]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape,P=k.rx,L=k.ry;this.attr("shape",{rx:P+h,ry:L+w})}};e.sector=C;var S={shape:{rx:0,ry:0,r:0,side:0},validator:function(g){var y=g.shape,h=y.side,w=["rx","ry","r","side"];return w.find(function(k){return typeof y[k]!="number"})?(console.error("RegPolygon shape configuration is abnormal!"),!1):h<3?(console.error("RegPolygon at least trigon!"),!1):!0},draw:function(g,y){var h=g.ctx,w=y.shape,k=y.cache;h.beginPath();var P=w.rx,L=w.ry,O=w.r,G=w.side;if(!k.points||k.rx!==P||k.ry!==L||k.r!==O||k.side!==G){var R=(0,a.getRegularPolygonPoints)(P,L,O,G);Object.assign(k,{points:R,rx:P,ry:L,r:O,side:G})}var V=k.points;(0,l.drawPolylinePath)(h,V),h.closePath(),h.stroke(),h.fill()},hoverCheck:function(g,y){var h=y.cache,w=h.points;return(0,a.checkPointIsInPolygon)(g,w)},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.rx,P=h.ry;w.graphCenter=[k,P]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape,P=y.cache,L=k.rx,O=k.ry;P.rx+=h,P.ry+=w,this.attr("shape",{rx:L+h,ry:O+w}),P.points=P.points.map(function(G){var R=(0,n.default)(G,2),V=R[0],N=R[1];return[V+h,N+w]})}};e.regPolygon=S;var E={shape:{points:[],close:!1},validator:function(g){var y=g.shape,h=y.points;return h instanceof Array?!0:(console.error("Polyline points should be an array!"),!1)},draw:function(g,y){var h=g.ctx,w=y.shape,k=y.style.lineWidth;h.beginPath();var P=w.points,L=w.close;k===1&&(P=(0,a.eliminateBlur)(P)),(0,l.drawPolylinePath)(h,P),L&&(h.closePath(),h.fill()),h.stroke()},hoverCheck:function(g,y){var h=y.shape,w=y.style,k=h.points,P=h.close,L=w.lineWidth;return P?(0,a.checkPointIsInPolygon)(g,k):(0,a.checkPointIsNearPolyline)(g,k,L)},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.points;w.graphCenter=k[0]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape,P=k.points,L=P.map(function(O){var G=(0,n.default)(O,2),R=G[0],V=G[1];return[R+h,V+w]});this.attr("shape",{points:L})}};e.polyline=E;var B={shape:{points:[],close:!1},validator:function(g){var y=g.shape,h=y.points;return h instanceof Array?!0:(console.error("Smoothline points should be an array!"),!1)},draw:function(g,y){var h=g.ctx,w=y.shape,k=y.cache,P=w.points,L=w.close;if(!k.points||k.points.toString()!==P.toString()){var O=s(P,L),G=c(O);Object.assign(k,{points:(0,a.deepClone)(P,!0),bezierCurve:O,hoverPoints:G})}var R=k.bezierCurve;h.beginPath(),(0,l.drawBezierCurvePath)(h,R.slice(1),R[0]),L&&(h.closePath(),h.fill()),h.stroke()},hoverCheck:function(g,y){var h=y.cache,w=y.shape,k=y.style,P=h.hoverPoints,L=w.close,O=k.lineWidth;return L?(0,a.checkPointIsInPolygon)(g,P):(0,a.checkPointIsNearPolyline)(g,P,O)},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.points;w.graphCenter=k[0]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape,P=y.cache,L=k.points,O=L.map(function(M){var F=(0,n.default)(M,2),W=F[0],T=F[1];return[W+h,T+w]});P.points=O;var G=(0,n.default)(P.bezierCurve[0],2),R=G[0],V=G[1],N=P.bezierCurve.slice(1);P.bezierCurve=[[R+h,V+w]].concat((0,o.default)(N.map(function(M){return M.map(function(F){var W=(0,n.default)(F,2),T=W[0],j=W[1];return[T+h,j+w]})}))),P.hoverPoints=P.hoverPoints.map(function(M){var F=(0,n.default)(M,2),W=F[0],T=F[1];return[W+h,T+w]}),this.attr("shape",{points:O})}};e.smoothline=B;var A={shape:{points:[],close:!1},validator:function(g){var y=g.shape,h=y.points;return h instanceof Array?!0:(console.error("BezierCurve points should be an array!"),!1)},draw:function(g,y){var h=g.ctx,w=y.shape,k=y.cache,P=w.points,L=w.close;if(!k.points||k.points.toString()!==P.toString()){var O=c(P,20);Object.assign(k,{points:(0,a.deepClone)(P,!0),hoverPoints:O})}h.beginPath(),(0,l.drawBezierCurvePath)(h,P.slice(1),P[0]),L&&(h.closePath(),h.fill()),h.stroke()},hoverCheck:function(g,y){var h=y.cache,w=y.shape,k=y.style,P=h.hoverPoints,L=w.close,O=k.lineWidth;return L?(0,a.checkPointIsInPolygon)(g,P):(0,a.checkPointIsNearPolyline)(g,P,O)},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.points;w.graphCenter=k[0]},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape,P=y.cache,L=k.points,O=(0,n.default)(L[0],2),G=O[0],R=O[1],V=L.slice(1),N=[[G+h,R+w]].concat((0,o.default)(V.map(function(M){return M.map(function(F){var W=(0,n.default)(F,2),T=W[0],j=W[1];return[T+h,j+w]})})));P.points=N,P.hoverPoints=P.hoverPoints.map(function(M){var F=(0,n.default)(M,2),W=F[0],T=F[1];return[W+h,T+w]}),this.attr("shape",{points:N})}};e.bezierCurve=A;var x={shape:{content:"",position:[],maxWidth:void 0,rowGap:0},validator:function(g){var y=g.shape,h=y.content,w=y.position,k=y.rowGap;return typeof h!="string"?(console.error("Text content should be a string!"),!1):w instanceof Array?typeof k!="number"?(console.error("Text rowGap should be a number!"),!1):!0:(console.error("Text position should be an array!"),!1)},draw:function(g,y){var h=g.ctx,w=y.shape,k=w.content,P=w.position,L=w.maxWidth,O=w.rowGap,G=h.textBaseline,R=h.font,V=parseInt(R.replace(/\D/g,"")),N=P,M=(0,n.default)(N,2),F=M[0],W=M[1];k=k.split(` `);var T=k.length,j=V+O,q=T*j-O,X=0;G==="middle"&&(X=q/2,W+=V/2),G==="bottom"&&(X=q,W+=V),P=new Array(T).fill(0).map(function(Y,oe){return[F,W+oe*j-X]}),h.beginPath(),k.forEach(function(Y,oe){h.fillText.apply(h,[Y].concat((0,o.default)(P[oe]),[L])),h.strokeText.apply(h,[Y].concat((0,o.default)(P[oe]),[L]))}),h.closePath()},hoverCheck:function(g,y){return y.shape,y.style,!1},setGraphCenter:function(g,y){var h=y.shape,w=y.style,k=h.position;w.graphCenter=(0,o.default)(k)},move:function(g,y){var h=g.movementX,w=g.movementY,k=y.shape,P=(0,n.default)(k.position,2),L=P[0],O=P[1];this.attr("shape",{position:[L+h,O+w]})}};e.text=x;var b=new Map([["circle",d],["ellipse",u],["rect",_],["ring",p],["arc",$],["sector",C],["regPolygon",S],["polyline",E],["smoothline",B],["bezierCurve",A],["text",x]]),f=b;e.default=f;function m(v,g){if(!v||!g){console.error("ExtendNewGraph Missing Parameters!");return}if(!g.shape){console.error("Required attribute of shape to extendNewGraph!");return}if(!g.validator){console.error("Required function of validator to extendNewGraph!");return}if(!g.draw){console.error("Required function of draw to extendNewGraph!");return}b.set(v,g)}}(tt);var rr={},or={exports:{}};(function(e){var i=function(o){var n=Object.prototype,r=n.hasOwnProperty,a,l=typeof Symbol=="function"?Symbol:{},s=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function u(V,N,M){return Object.defineProperty(V,N,{value:M,enumerable:!0,configurable:!0,writable:!0}),V[N]}try{u({},"")}catch{u=function(N,M,F){return N[M]=F}}function _(V,N,M,F){var W=N&&N.prototype instanceof A?N:A,T=Object.create(W.prototype),j=new O(F||[]);return T._invoke=w(V,M,j),T}o.wrap=_;function p(V,N,M){try{return{type:"normal",arg:V.call(N,M)}}catch(F){return{type:"throw",arg:F}}}var $="suspendedStart",C="suspendedYield",S="executing",E="completed",B={};function A(){}function x(){}function b(){}var f={};u(f,s,function(){return this});var m=Object.getPrototypeOf,v=m&&m(m(G([])));v&&v!==n&&r.call(v,s)&&(f=v);var g=b.prototype=A.prototype=Object.create(f);x.prototype=b,u(g,"constructor",b),u(b,"constructor",x),x.displayName=u(b,d,"GeneratorFunction");function y(V){["next","throw","return"].forEach(function(N){u(V,N,function(M){return this._invoke(N,M)})})}o.isGeneratorFunction=function(V){var N=typeof V=="function"&&V.constructor;return N?N===x||(N.displayName||N.name)==="GeneratorFunction":!1},o.mark=function(V){return Object.setPrototypeOf?Object.setPrototypeOf(V,b):(V.__proto__=b,u(V,d,"GeneratorFunction")),V.prototype=Object.create(g),V},o.awrap=function(V){return{__await:V}};function h(V,N){function M(T,j,q,X){var Y=p(V[T],V,j);if(Y.type==="throw")X(Y.arg);else{var oe=Y.arg,ye=oe.value;return ye&&typeof ye=="object"&&r.call(ye,"__await")?N.resolve(ye.__await).then(function(ce){M("next",ce,q,X)},function(ce){M("throw",ce,q,X)}):N.resolve(ye).then(function(ce){oe.value=ce,q(oe)},function(ce){return M("throw",ce,q,X)})}}var F;function W(T,j){function q(){return new N(function(X,Y){M(T,j,X,Y)})}return F=F?F.then(q,q):q()}this._invoke=W}y(h.prototype),u(h.prototype,c,function(){return this}),o.AsyncIterator=h,o.async=function(V,N,M,F,W){W===void 0&&(W=Promise);var T=new h(_(V,N,M,F),W);return o.isGeneratorFunction(N)?T:T.next().then(function(j){return j.done?j.value:T.next()})};function w(V,N,M){var F=$;return function(T,j){if(F===S)throw new Error("Generator is already running");if(F===E){if(T==="throw")throw j;return R()}for(M.method=T,M.arg=j;;){var q=M.delegate;if(q){var X=k(q,M);if(X){if(X===B)continue;return X}}if(M.method==="next")M.sent=M._sent=M.arg;else if(M.method==="throw"){if(F===$)throw F=E,M.arg;M.dispatchException(M.arg)}else M.method==="return"&&M.abrupt("return",M.arg);F=S;var Y=p(V,N,M);if(Y.type==="normal"){if(F=M.done?E:C,Y.arg===B)continue;return{value:Y.arg,done:M.done}}else Y.type==="throw"&&(F=E,M.method="throw",M.arg=Y.arg)}}}function k(V,N){var M=V.iterator[N.method];if(M===a){if(N.delegate=null,N.method==="throw"){if(V.iterator.return&&(N.method="return",N.arg=a,k(V,N),N.method==="throw"))return B;N.method="throw",N.arg=new TypeError("The iterator does not provide a 'throw' method")}return B}var F=p(M,V.iterator,N.arg);if(F.type==="throw")return N.method="throw",N.arg=F.arg,N.delegate=null,B;var W=F.arg;if(!W)return N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,B;if(W.done)N[V.resultName]=W.value,N.next=V.nextLoc,N.method!=="return"&&(N.method="next",N.arg=a);else return W;return N.delegate=null,B}y(g),u(g,d,"Generator"),u(g,s,function(){return this}),u(g,"toString",function(){return"[object Generator]"});function P(V){var N={tryLoc:V[0]};1 in V&&(N.catchLoc=V[1]),2 in V&&(N.finallyLoc=V[2],N.afterLoc=V[3]),this.tryEntries.push(N)}function L(V){var N=V.completion||{};N.type="normal",delete N.arg,V.completion=N}function O(V){this.tryEntries=[{tryLoc:"root"}],V.forEach(P,this),this.reset(!0)}o.keys=function(V){var N=[];for(var M in V)N.push(M);return N.reverse(),function F(){for(;N.length;){var W=N.pop();if(W in V)return F.value=W,F.done=!1,F}return F.done=!0,F}};function G(V){if(V){var N=V[s];if(N)return N.call(V);if(typeof V.next=="function")return V;if(!isNaN(V.length)){var M=-1,F=function W(){for(;++M<V.length;)if(r.call(V,M))return W.value=V[M],W.done=!1,W;return W.value=a,W.done=!0,W};return F.next=F}}return{next:R}}o.values=G;function R(){return{value:a,done:!0}}return O.prototype={constructor:O,reset:function(V){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(L),!V)for(var N in this)N.charAt(0)==="t"&&r.call(this,N)&&!isNaN(+N.slice(1))&&(this[N]=a)},stop:function(){this.done=!0;var V=this.tryEntries[0],N=V.completion;if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(V){if(this.done)throw V;var N=this;function M(X,Y){return T.type="throw",T.arg=V,N.next=X,Y&&(N.method="next",N.arg=a),!!Y}for(var F=this.tryEntries.length-1;F>=0;--F){var W=this.tryEntries[F],T=W.completion;if(W.tryLoc==="root")return M("end");if(W.tryLoc<=this.prev){var j=r.call(W,"catchLoc"),q=r.call(W,"finallyLoc");if(j&&q){if(this.prev<W.catchLoc)return M(W.catchLoc,!0);if(this.prev<W.finallyLoc)return M(W.finallyLoc)}else if(j){if(this.prev<W.catchLoc)return M(W.catchLoc,!0)}else if(q){if(this.prev<W.finallyLoc)return M(W.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(V,N){for(var M=this.tryEntries.length-1;M>=0;--M){var F=this.tryEntries[M];if(F.tryLoc<=this.prev&&r.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var W=F;break}}W&&(V==="break"||V==="continue")&&W.tryLoc<=N&&N<=W.finallyLoc&&(W=null);var T=W?W.completion:{};return T.type=V,T.arg=N,W?(this.method="next",this.next=W.finallyLoc,B):this.complete(T)},complete:function(V,N){if(V.type==="throw")throw V.arg;return V.type==="break"||V.type==="continue"?this.next=V.arg:V.type==="return"?(this.rval=this.arg=V.arg,this.method="return",this.next="end"):V.type==="normal"&&N&&(this.next=N),B},finish:function(V){for(var N=this.tryEntries.length-1;N>=0;--N){var M=this.tryEntries[N];if(M.finallyLoc===V)return this.complete(M.completion,M.afterLoc),L(M),B}},catch:function(V){for(var N=this.tryEntries.length-1;N>=0;--N){var M=this.tryEntries[N];if(M.tryLoc===V){var F=M.completion;if(F.type==="throw"){var W=F.arg;L(M)}return W}}throw new Error("illegal catch attempt")},delegateYield:function(V,N,M){return this.delegate={iterator:G(V),resultName:N,nextLoc:M},this.method==="next"&&(this.arg=a),B}},o}(e.exports);try{regeneratorRuntime=i}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}})(or);var xa=or.exports,ar={exports:{}};(function(e){function i(n,r,a,l,s,c,d){try{var u=n[c](d),_=u.value}catch(p){a(p);return}u.done?r(_):Promise.resolve(_).then(l,s)}function o(n){return function(){var r=this,a=arguments;return new Promise(function(l,s){var c=n.apply(r,a);function d(_){i(c,l,s,d,u,"next",_)}function u(_){i(c,l,s,d,u,"throw",_)}d(void 0)})}}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(ar);var ir={};(function(e){var i=U.exports;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(Z.exports),n=i(Pe.exports),r=K,a=ee,l=function $(C){(0,n.default)(this,$),this.colorProcessor(C);var S={fill:[0,0,0,1],stroke:[0,0,0,0],opacity:1,lineCap:null,lineJoin:null,lineDash:null,lineDashOffset:null,shadowBlur:0,shadowColor:[0,0,0,0],shadowOffsetX:0,shadowOffsetY:0,lineWidth:0,graphCenter:null,scale:null,rotate:null,translate:null,hoverCursor:"pointer",fontStyle:"normal",fontVarient:"normal",fontWeight:"normal",fontSize:10,fontFamily:"Arial",textAlign:"center",textBaseline:"middle",gradientColor:null,gradientType:"linear",gradientParams:null,gradientWith:"stroke",gradientStops:"auto",colors:null};Object.assign(this,S,C)};e.default=l,l.prototype.colorProcessor=function($){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=C?r.getColorFromRgbValue:r.getRgbaValue,E=["fill","stroke","shadowColor"],B=Object.keys($),A=B.filter(function(m){return E.find(function(v){return v===m})});A.forEach(function(m){return $[m]=S($[m])});var x=$.gradientColor,b=$.colors;if(x&&($.gradientColor=x.map(function(m){return S(m)})),b){var f=Object.keys(b);f.forEach(function(m){return b[m]=S(b[m])})}},l.prototype.initStyle=function($){s($,this),d($,this),u($,this)};function s($,C){$.save();var S=C.graphCenter,E=C.rotate,B=C.scale,A=C.translate;S instanceof Array&&($.translate.apply($,(0,o.default)(S)),E&&$.rotate(E*Math.PI/180),B instanceof Array&&$.scale.apply($,(0,o.default)(B)),A&&$.translate.apply($,(0,o.default)(A)),$.translate(-S[0],-S[1]))}var c=["lineCap","lineJoin","lineDashOffset","shadowOffsetX","shadowOffsetY","lineWidth","textAlign","textBaseline"];function d($,C){var S=C.fill,E=C.stroke,B=C.shadowColor,A=C.opacity;c.forEach(function(h){(h||typeof h=="number")&&($[h]=C[h])}),S=(0,o.default)(S),E=(0,o.default)(E),B=(0,o.default)(B),S[3]*=A,E[3]*=A,B[3]*=A,$.fillStyle=(0,r.getColorFromRgbValue)(S),$.strokeStyle=(0,r.getColorFromRgbValue)(E),$.shadowColor=(0,r.getColorFromRgbValue)(B);var x=C.lineDash,b=C.shadowBlur;x&&(x=x.map(function(h){return h>=0?h:0}),$.setLineDash(x)),typeof b=="number"&&($.shadowBlur=b>0?b:.0