芝麻web文件管理V1.00
编辑当前文件:/home/forge/stage.sksb.smartcon-survey.com/public/js/chart.js
/*! For license information please see chart.js.LICENSE.txt */ !function(){"use strict";var e={d:function(t,i){for(var s in i)e.o(i,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{DEFAULT_LABEL_TEXT:function(){return Ee},bubbleLabel:function(){return We},label:function(){return Le},labelStyle:function(){return je},strokeLabelStyle:function(){return Be}});var i={};e.r(i),e.d(i,{arc:function(){return rt},circle:function(){return nt},clipRectArea:function(){return it},line:function(){return ot},pathRect:function(){return st},rect:function(){return at}});var s={};e.r(s),e.d(s,{TICK_SIZE:function(){return lt},tick:function(){return dt}});var n={};e.r(n),e.d(n,{dataLabel:function(){return os},drawBubbleLabel:function(){return as},getBubbleArrowPoints:function(){return rs}});var o={};e.r(o),e.d(o,{SPECTRUM_LEGEND_LABEL_HEIGHT:function(){return ls},spectrumLegend:function(){return us},spectrumLegendBar:function(){return ds},spectrumLegendTooltip:function(){return cs},spectrumTooltip:function(){return ps}});var a={};e.r(a),e.d(a,{polygon:function(){return Vs}});var r={};e.r(r),e.d(r,{scatterSeries:function(){return Ks}});var l={};e.r(l),e.d(l,{LEGEND_CHECKBOX_SIZE:function(){return Js},LEGEND_ICON_SIZE:function(){return Qs},LEGEND_ITEM_MARGIN_X:function(){return qs},LEGEND_MARGIN_X:function(){return Zs},getLegendItemHeight:function(){return an},legend:function(){return dn}});var d={};e.r(d),e.d(d,{areaPoints:function(){return Ja},linePoints:function(){return Za}});var c={};e.r(c),e.d(c,{exportMenuButton:function(){return Qa}});var h={};e.r(h),e.d(h,{backButton:function(){return ir},resetButton:function(){return sr}});var u={};e.r(u),e.d(u,{sector:function(){return rr}});var p={};e.r(p),e.d(p,{circleLegend:function(){return Jr}});var m={};e.r(m),e.d(m,{boxPlot:function(){return jl}});var g={};function v(e){return!f(e)&&!b(e)}function f(e){return void 0===e}function b(e){return null===e}function x(e){return"boolean"==typeof e}function y(e){return"number"==typeof e}function S(e){return"string"==typeof e}function w(e){return y(e)&&isFinite(e)&&Math.floor(e)===e}function O(e){return"object"==typeof e&&null!==e}function M(e){return"function"==typeof e}function A(e,t){for(const i in e)e.hasOwnProperty(i)&&t(e[i],i)}function k(e,t,i){f(t)&&(t=e||0,e=0),i=i||1;const s=[];if(t){const n=i<0?-1:1;for(t*=n;e*n
{C(t,s)&&(i[s]=e[s])})),i}function T(e,...t){const i={};return Object.keys(e).forEach((s=>{C(t,s)||(i[s]=e[s])})),i}function D(e,t){const{length:i}=t;if(i)for(let s=0;s
{e(...s)}),t)}}function j(e,t){const i=Object.assign({},e);return Object.keys(t).forEach((e=>{O(i[e])?Array.isArray(t[e])?i[e]=B(t[e]):i.hasOwnProperty(e)?i[e]=j(i[e],t[e]):i[e]=L(t[e]):i[e]=t[e]})),i}function B(e){return e.map((e=>O(e)?Array.isArray(e)?B(e):L(e):e))}function L(e){const t={},i=Object.keys(e);return i.length?(i.forEach((i=>{O(e[i])?t[i]=Array.isArray(e[i])?B(e[i]):L(e[i]):t[i]=e[i]})),t):e}function P(e,t){return w(e)?Number(e)-Number(t):new Date(e).getTime()-new Date(t).getTime()}function W(e,t){return e-t}function z(e){return e.length?e[0]:void 0}function I(e){return e.length?e[e.length-1]:void 0}function Y(e=[]){return e.some((e=>Number(e)<0))}function H(e){return e.reduce(((e,t)=>e+t),0)}function N(e){return e.every((e=>Number(e)<=0))}function _(e){var t;return null===(t=e)||void 0===t?void 0:t.find((e=>null!==e))}function X(e,t){return y(t)?t:Number((e*(i=t,Number(i.substr(0,i.length-1)))/100).toFixed(2));var i}function F(e){return y(e)?e:0}function $(e){return"auto"===e}e.r(g),e.d(g,{clockHand:function(){return _l}});const G={SELECT_SERIES_API_SELECTABLE_ERROR:"It works only when the selectable option is true.",SELECT_SERIES_API_INDEX_ERROR:"The index value is invalid.",ALREADY_OBSERVABLE_ERROR:"Source object is observable already",CIRCLE_LEGEND_RENDER_ERROR:"circleLegend is only possible when bubble series is present",noDataError:e=>`There's no ${e} data!`,noBrushError:e=>`Brush don't exist in painter: ${e}`,DASH_SEGMENTS_UNAVAILABLE_ERROR:"DashSegments option is available from IE11 and above.",SERIES_INDEX_ERROR:"The seriesIndex value is invalid",AUTO_LAYOUT_CONTAINER_SIZE_ERROR:'To use auto layout, the width or height of the container must be specified as a value such as "%" or "vh", "vw".'};let V=null,U=null;const K=[];let q=!1;function Z(e){const t=()=>{U!==t&&(q||!b(U)?(K.includes(t)&&K.splice(K.indexOf(t),1),K.push(t)):b(U)&&(U=t,e(),U=null,J()))};return t.deps=[],V=t,V(),V=null,()=>{t.deps.forEach((e=>{const i=e.findIndex((e=>e===t));e.splice(i,1)})),t.deps=[]}}function J(){if(K.length){const e=K.shift();e&&e()}}function Q(e){return"object"==typeof e&&e.__toastUIChartOb__}function ee(e,t=e){if(Q(t))throw new Error(G.ALREADY_OBSERVABLE_ERROR);Q(e)||Object.defineProperty(e,"__toastUIChartOb__",{enumerable:!1});for(const i in t){if(!t.hasOwnProperty(i))continue;const s=[];let n=t[i];const o=Object.getOwnPropertyDescriptor(t,i),a=o&&o.get,r=o&&o.set;Object.defineProperty(e,i,{configurable:!0,enumerable:!0,get:function(){return V===ne?{target:e,key:i,value:n,obs:s}:(q||!V||s.includes(V)||(s.push(V),V.deps.push(s)),n)},set:function(t){const o=n;r?(r.call(e,t),n=a?a.call(e):e[i]):n=t,o!==n&&se(s)}}),"object"!=typeof e[i]||Array.isArray(e[i])||ee(e[i])}return e}function te(e,t){if(Q(t))throw new Error(G.ALREADY_OBSERVABLE_ERROR);return ee(e,t)}function ie(e,t){const i=ne(e,t);i&&se(i.obs)}function se(e){e.forEach((e=>e()))}function ne(e,t){V=ne;const i=e[t];return V=null,"object"==typeof i&&i.hasOwnProperty("target")&&i.hasOwnProperty("obs")?i:null}function oe(e){return JSON.parse(JSON.stringify(e))}class ae{constructor(e){this.computed={},this.actions={},this.initStoreState=L(e),this.setRootState({})}setRootState(e){ee(e),this.state=e}setComputed(e,t,i=this.computed){const s=e.split("."),n=s.splice(s.length-1,1)[0];!function(e,t,i){let s;const n={};Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:()=>s}),te(e,n),Z((()=>{const n=s;s=i(),n!==s&&(e[t]=s)}))}(function(e,t){const{length:i}=t;if(i)for(let s=0;s
{i(o[n])};return a.obs.push(r),()=>{const e=a.obs.findIndex((e=>e===r));e>-1&&a.obs.splice(e,1)}}(this,e,t)}setAction(e,t){this.actions[e]=t}dispatch(e,t,i){i?(q=!0,(()=>{this.actions[e].call(this,this,t)})(),q=!1,J()):this.actions[e].call(this,this,t)}observe(e){return Z(e.bind(this,this.state,this.computed))}observable(e){return ee(e)}notifyByPath(e){!function(e,t){const i=t.split("."),s=i.splice(i.length-1,1)[0],n=D(e,i);n&&ie(n,s)}(this,e)}notify(e,t){ie(e,t)}setModule(e,t){if(t||(e=(t=e).name),t.state){const e="function"==typeof t.state?t.state(this.initStoreState):t.state;re(this.state,e)}t.computed&&A(t.computed,((e,t)=>{this.setComputed(t,e)})),t.watch&&A(t.watch,((e,t)=>{this.setWatch(t,e)})),t.action&&A(t.action,((e,t)=>{this.setAction(t,e)})),t.observe&&A(t.observe,(e=>{this.observe(e)}))}setValue(e,t,i){re(e,{[t]:i})}}function re(e,t){const i={};for(const s in t)t.hasOwnProperty(s)&&(f(e[s])?i[s]=t[s]:"object"!=typeof t[s]||Array.isArray(t[s])?e[s]=t[s]:re(e[s],t[s]));Object.keys(i).length&&te(e,i)}function le(e,{width:t,height:i}){return{width:0===t?e.offsetWidth:t,height:0===i?e.offsetHeight:i}}const de={name:"root",state:({options:e})=>{var t,i,s,n,o,a,r,l;return{chart:Object.assign(Object.assign({},e.chart),{width:F(null===(i=null===(t=e)||void 0===t?void 0:t.chart)||void 0===i?void 0:i.width),height:F(null===(n=null===(s=e)||void 0===s?void 0:s.chart)||void 0===n?void 0:n.height)}),usingContainerSize:{width:$(null===(a=null===(o=e)||void 0===o?void 0:o.chart)||void 0===a?void 0:a.width),height:$(null===(l=null===(r=e)||void 0===r?void 0:r.chart)||void 0===l?void 0:l.height)},container:{}}},action:{setChartSize({state:e},t){e.chart.width=t.width,e.chart.height=t.height,this.notify(e,"chart")},initChartSize({state:e},t){const{width:i,height:s}=e.chart;0!==i&&0!==s||(t.parentNode?this.dispatch("setChartSize",le(t,{width:i,height:s})):setTimeout((()=>{this.dispatch("setChartSize",le(t,{width:i,height:s}))}),0))},setUsingContainerSize({state:e},{width:t,height:i}){e.usingContainerSize.width=t,e.usingContainerSize.height=i}}};var ce=de;const he=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,ue=/rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)/,pe=/rgba\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3}), ?(1|0?\.?\d+)\)/,me={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",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",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",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",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ge(e,t){if(e.length>t)return e;let i=e;return k(0,t-1).forEach((e=>{i="0"+i})),i.slice(-1*t)}function ve(e){return he.test(e)}function fe(e){return me[e.toLowerCase()]||e}function be(e){const t=fe(e);return!!ve(t)&&t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,((e,t,i,s)=>"#"+t+t+i+i+s+s)).substring(1).match(/.{2}/g).map((e=>parseInt(e,16)))}function xe(e,t){const i=fe(e);if(ve(i)){const[e,s,n]=be(i);return`rgba(${e}, ${s}, ${n}, ${t})`}if(ue.test(e)){const i=ue.exec(e);return`rgba(${i[1]}, ${i[2]}, ${i[3]}, ${t})`}if(pe.test(e)){const i=pe.exec(e);return`rgba(${i[1]}, ${i[2]}, ${i[3]}, ${t})`}return e}function ye(e){if(pe.test(e)){const t=pe.exec(e);return Number(t[4])}return 1}function Se(e,t=1){return xe(e,ye(e)*t)}function we(e,t){return e.reduce(((e,i)=>S(i)?Object.assign(Object.assign({},e),t[i]):Object.assign(Object.assign({},e),i)),{})}function Oe(e,t){return`translate(${e}px,${t}px)`}function Me(e){const{fontFamily:t,fontSize:i,fontWeight:s}=e;return`${s} ${i}px ${t}`}function Ae(e){const{color:t,fontSize:i,fontFamily:s,fontWeight:n}=e;return`font-weight: ${n}; font-family: ${s}; font-size: ${i}px; color: ${t};`}function ke(e){return Me(R(e,"fontFamily","fontWeight","fontSize"))}function Ce(e,t){e.setLineDash&&e.setLineDash(t)}function Re(e){return Math.floor(.15*e)}function Te(e,t){e.fillStyle=t,e.fill()}function De(e,t){const{lineWidth:i,strokeStyle:s}=t;s&&(e.strokeStyle=s),i&&(e.lineWidth=i),e.lineWidth&&ye(String(e.strokeStyle))&&e.stroke()}const Ee="normal 11px Arial",je={default:{font:Ee,fillStyle:"#333333",textAlign:"left",textBaseline:"middle"},title:{textBaseline:"top"},axisTitle:{textBaseline:"top"},rectLabel:{font:Ee,fillStyle:"rgba(0, 0, 0, 0.3)",textAlign:"center",textBaseline:"middle"}},Be={none:{lineWidth:1,strokeStyle:"rgba(255, 255, 255, 0)"},stroke:{lineWidth:4,strokeStyle:"rgba(255, 255, 255, 0.5)"}};function Le(e,t){var i,s,n,o,a,r,l,d;const{x:c,y:h,text:u,style:p,stroke:m,opacity:g,radian:v,rotationPosition:f}=t;if(p){const t=we(p,je);Object.keys(t).forEach((i=>{e[i]="fillStyle"===i&&y(g)?Se(t[i],g):t[i]}))}if(e.save(),v&&(e.translate(null!=(s=null===(i=f)||void 0===i?void 0:i.x)?s:c,null!=(o=null===(n=f)||void 0===n?void 0:n.y)?o:h),e.rotate(v),e.translate(-(null!=(r=null===(a=f)||void 0===a?void 0:a.x)?r:c),-(null!=(d=null===(l=f)||void 0===l?void 0:l.y)?d:h))),m){const t=we(m,Be),i=Object.keys(t);i.forEach((i=>{e[i]="strokeStyle"===i&&y(g)?Se(t[i],g):t[i]})),i.length&&e.strokeText(u,c,h)}e.fillText(u,c,h),e.restore()}const Pe={shadow:{shadowColor:"rgba(0, 0, 0, 0.3)",shadowOffsetY:2,shadowBlur:4}};function We(e,t){var i,s,n,o;const{radian:a=0,rotationPosition:r,bubble:{x:l,y:d,width:c,height:h,radius:u=0,lineWidth:p=1,direction:m,points:g=[],fill:v="#fff",strokeStyle:f="rgba(0, 0, 0, 0)",style:b=null}}=t;if(c>0&&h>0&&function(e,t){const{x:i,y:s,width:n,height:o,style:a,radius:r=0,strokeStyle:l,fill:d,lineWidth:c=1,points:h=[],direction:u="",radian:p,rotationPosition:m}=t,g=i+n,v=s+o;e.beginPath(),e.save(),p&&m&&(e.translate(m.x,m.y),e.rotate(p),e.translate(-m.x,-m.y));e.moveTo(i+r,s),"top"===u&&ze(e,h);e.lineTo(g-r,s),e.quadraticCurveTo(g,s,g,s+r),"right"===u&&ze(e,h);e.lineTo(g,s+o-r),e.quadraticCurveTo(g,v,g-r,v),"bottom"===u&&ze(e,h);e.lineTo(i+r,v),e.quadraticCurveTo(i,v,i,v-r),"left"===u&&ze(e,h);if(e.lineTo(i,s+r),e.quadraticCurveTo(i,s,i+r,s),a){const t=we(a,Pe);Object.keys(t).forEach((i=>{e[i]=t[i]}))}d&&Te(e,d);l&&De(e,{strokeStyle:l,lineWidth:c});e.restore()}(e,{x:l,y:d,radius:u,width:c,height:h,style:b,fill:v,strokeStyle:f,lineWidth:p,direction:m,points:g,radian:a,rotationPosition:{x:(s=null===(i=r)||void 0===i?void 0:i.x,null!=s?s:l),y:(o=null===(n=r)||void 0===n?void 0:n.y,null!=o?o:d)}}),t.label.text){const{x:i,y:s,text:n,strokeStyle:o="rgba(0, 0, 0, 0)",style:l}=t.label;e.shadowColor="rgba(0, 0, 0, 0)",Le(e,{type:"label",x:i,y:s,text:n,style:l,stroke:[{strokeStyle:o}],radian:a,rotationPosition:r})}}function ze(e,t){t.length&&(e.lineTo(t[0].x,t[0].y),e.lineTo(t[1].x,t[1].y),e.lineTo(t[2].x,t[2].y))}const Ie=180,Ye=-180,He=360,Ne=0,_e=-90,Xe=90,Fe=10;function $e(e,t){return Object.assign({anchor:e},R(t,"x","y","radius","degree","drawingStartAngle"))}function Ge(e,t=_e){let i=0;return e%He==0?i=Math.PI/Ie*t:e>=0&&(i=Math.PI/Ie*(e+t)),i}function Ve(e){const{anchor:t,x:i,y:s,radius:{inner:n,outer:o},degree:{start:a,end:r},drawingStartAngle:l=_e}=e;return Ue(i,s,"outer"===t?o:(o+n)/2,Ge(a+(r-a)/2,l))}function Ue(e,t,i,s){return{x:Math.round(e+i*Math.cos(s)),y:Math.round(t+i*Math.sin(s))}}function Ke(e,t,i,s){return e?t<=s&&i>=s:t>=s&&i<=s}function qe({width:e,height:t},i=!1,s=0,n=0){let o;return o=i?Math.min(e/2,t)-n:e>t?t/2-n:e/2-s,Math.max(o,Fe)}function Ze(e,t,i=!0){const{totalAngle:s=He,degree:{start:n,end:o},drawingStartAngle:a=_e}=e;let r="center";if("outer"!==t)return r;const l=Ge(0,a),d=Ge(s/2,a),c=function(e,t,i,s){return Ge(s?(t+e)/2:e,i)}(n,o,a,i);return a>=_e&&a
c?r="left":d
c?r="right":d
(n&&i.push({inner:s+t,outer:e[n-1]-t}),n===e.length-1&&i.push({inner:t,outer:s-t}),i)),[])}function Qe(e){return e
He?e%He:e}const et={default:{strokeStyle:"#ffffff",lineWidth:2},plot:{lineWidth:1,strokeStyle:"rgba(0, 0, 0, 0.05)"}},tt={shadow:{shadowColor:"rgba(0, 0, 0, 0.3)",shadowOffsetX:2,shadowOffsetY:2,shadowBlur:6}};function it(e,t){const{x:i,y:s,width:n,height:o}=t;e.beginPath(),e.rect(i,s,n,o),e.clip()}function st(e,t){const{x:i,y:s,width:n,height:o,radius:a=0,stroke:r="black",fill:l="",lineWidth:d=1}=t;e.beginPath(),e.moveTo(i+a,s),e.lineTo(i+n-a,s),e.quadraticCurveTo(i+n,s,i+n,s+a),e.lineTo(i+n,s+o-a),e.quadraticCurveTo(i+n,s+o,i+n-a,s+o),e.lineTo(i+a,s+o),e.quadraticCurveTo(i,s+o,i,s+o-a),e.lineTo(i,s+a),e.quadraticCurveTo(i,s,i+a,s),e.closePath(),l&&Te(e,l),De(e,{lineWidth:d,strokeStyle:r})}function nt(e,t){const{x:i,y:s,style:n,radius:o,color:a,angle:r={start:0,end:2*Math.PI},borderWidth:l,borderColor:d}=t;if(e.beginPath(),n){const t=we(n,et);Object.keys(t).forEach((i=>{e[i]=t[i]}))}e.arc(i,s,o,r.start,r.end,!0),De(e,{lineWidth:l,strokeStyle:d}),Te(e,a),e.closePath()}function ot(e,t){const{x:i,y:s,x2:n,y2:o,strokeStyle:a,lineWidth:r,dashSegments:l}=t;e.beginPath(),l&&Ce(e,l),e.moveTo(i,s),e.lineTo(n,o),De(e,{strokeStyle:a,lineWidth:r}),e.closePath()}function at(e,t){const{x:i,y:s,width:n,height:o,style:a,thickness:r=0,color:l,borderColor:d="#ffffff"}=t;if(e.beginPath(),a){const t=we(a,tt);Object.keys(t).forEach((i=>{e[i]=t[i]}))}r&&(e.fillStyle=d,e.fillRect(i-r,s-r,n+2*r,o+2*r),e.shadowColor="rgba(0, 0, 0, 0)"),e.rect(i,s,n,o),Te(e,l)}function rt(e,t){const{x:i,y:s,angle:{start:n,end:o},borderWidth:a,borderColor:r,drawingStartAngle:l,radius:d,clockwise:c=!0}=t;e.beginPath();const h=Ge(n,l),u=Ge(o,l);e.arc(i,s,d,h,u,!c),De(e,{lineWidth:a,strokeStyle:r}),e.closePath()}const lt=5;function dt(e,t){const{x:i,y:s,isYAxis:n,tickSize:o=lt,strokeStyle:a,lineWidth:r}=t,l={type:"line",x:i,y:s,x2:i,y2:s,strokeStyle:a,lineWidth:r};n?l.x2+=o:l.y2+=o,ot(e,l)}const ct=1.2,ht=document.createElement("canvas").getContext("2d");function ut(e,t=Ee){return ht.font=t,Math.ceil(ht.measureText(e).width)}function pt(e,t=Ee){ht.font=t;const{actualBoundingBoxAscent:i,actualBoundingBoxDescent:s}=ht.measureText(e);return y(i)&&y(s)?Math.ceil(Math.abs(i)+Math.abs(s))+1:mt(t)}function mt(e=Ee){const t=e.match(/\d+(?=px)/);return parseInt(String(Number(t)*ct),10)}function gt(e){return Ot(2*lt+e/2)}function vt(...e){const t=e.map((e=>function(e){var t,i;return null!=(i=null===(t=String(e).split(".")[1])||void 0===t?void 0:t.length)?i:0}(e))),i=Math.max(...t);return Math.pow(10,i)}function ft(e,t){const i=vt(e,t);return(e*i+t*i)/i}function bt(e,t){const i=vt(e,t);return e*i*(t*i)/(i*i)}function xt(e,t){const i=vt(e,t);return e*i/(t*i)}function yt(e){const t=e.slice();return t.unshift(0),t.reduce(((e,t)=>ft(parseFloat(String(e)),parseFloat(String(t)))))}function St(e,t,i){const s=vt(t);return k(Math.round(e.min*s),Math.round(e.max*s)+1,t*s).map((e=>String(i?new Date(e):e/s)))}function wt(e,t,i=0,s=0){let n=[];return t>0&&(n=k(0,t).map((s=>(0===s?0:s/(t-1))*e+i))),s&&n.push(s),n}function Ot(e,t=1){const i=t/2;return t%2?(w(e)?e:Math.round(e-i))+i:Math.round(e)}function Mt(e,t,i){const{x:s,y:n}=e,{x:o,y:a}=t,{x:r,y:l}=i,d=Ct(i,t),c=Ct(t,e),h=.333*c/(c+d)||0,u=.333*d/(c+d)||0;return{prev:{x:o-h*(r-s),y:a-h*(l-n)},next:{x:o+u*(r-s),y:a+u*(l-n)}}}function At(e){for(let t=0,i=e.length,s=e[0];t
e.length>t.length?e:t),""))}function Tt(e,t,i,s){const{pointOnColumn:n,tickDistance:o,labelRange:a}=e;let r;if(a){r=kt(S(i)?Number(new Date(i)):Number(i),a)*t}else r=o*s+(n?o/2:0);return r}function Dt(e,t){return e.reduce(((e,i)=>[...e,i[t]]),[])}class Et{constructor({store:e,eventBus:t}){this.name="Component",this.type="component",this.rect={x:0,y:0,height:0,width:0},this.isShow=!0,this.store=e,this.eventBus=t}update(e){this.drawModels&&(Array.isArray(this.models)?this.updateModels(this.drawModels,this.models,e):Object.keys(this.models).forEach((t=>{const i=this.drawModels[t],s=this.models[t];this.updateModels(i,s,e)})))}initUpdate(e){this.update(e)}updateModels(e,t,i){e.forEach(((e,s)=>{const n=t[s];Object.keys(e).forEach((t=>{var s;if(e&&n&&"_"!==t[0])if(y(e[t]))e[t]=e[t]+(n[t]-e[t])*i;else if("points"===t){const o=this.getCurrentModelToMatchTargetModel(e[t],e[t],n[t]).map(((e,s)=>{const o=n[t][s];if(e&&o){const{x:t,y:s}=e,{x:n,y:a}=o;return Object.assign(Object.assign({},o),{x:t+(n-t)*i,y:s+(a-s)*i})}return o}));(null===(s=this.store.state.options.series)||void 0===s?void 0:s.spline)&&At(o),e[t]=o}else e[t]=n[t]}))}))}sync(){this.drawModels&&(Array.isArray(this.models)?this.syncModels(this.drawModels,this.models):Object.keys(this.models).length?Object.keys(this.models).forEach((e=>{const t=this.drawModels[e],i=this.models[e];this.syncModels(t,i,e)})):this.drawModels=this.models)}getCurrentModelToMatchTargetModel(e,t,i){var s;if(!e||!t)return[...i];if(null===(s=_(i))||void 0===s?void 0:s.name){const s=[...new Set(e.map((({name:e})=>e)))],n=[...new Set(i.map((({name:e})=>e)))];if(!function(e,t){if(e.length!==t.length)return!1;for(let i=0;i
o?t.slice(0,o):e}getCurrentModelWithDifferentModel(e,t,i,s,n){const o=t.length,a=i.length;if(o>a){const t=e.filter((({name:e})=>C(n,e)));return t.length!==i.length?i:t}if(o
!C(s,t.name)?{models:[...e.models,t],modelIdx:[...e.modelIdx,i]}:e),{models:[],modelIdx:[]});if(e.length+t.models.length===a){const i=[...e];return t.models.forEach(((e,s)=>{i.splice(t.modelIdx[s],0,e)})),i}return i}return e}syncModels(e,t,i){const s=i?this.drawModels[i]:this.drawModels,n=this.getCurrentModelToMatchTargetModel(s,e,t);i?this.drawModels[i]=n:this.drawModels=n}getSelectableOption(e){var t,i,s;return null!=(s=null===(i=null===(t=e)||void 0===t?void 0:t.series)||void 0===i?void 0:i.selectable)&&s}renderDataLabels(e,t){setTimeout((()=>{this.eventBus.emit("renderDataLabels",{data:e,name:null!=t?t:this.name})}),0)}draw(e){const t=this.drawModels?this.drawModels:this.models;Array.isArray(t)?e.paintForEach(t):t&&Object.keys(t).forEach((i=>{e.paintForEach(t[i])}))}}var jt;!function(e){e.X="xAxis",e.Y="yAxis",e.SECONDARY_Y="secondaryYAxis",e.CIRCULAR="circularAxis",e.VERTICAL="verticalAxis"}(jt||(jt={}));class Bt extends Et{constructor(){super(...arguments),this.models={label:[],tick:[],axisLine:[]},this.axisSize=0}initialize({name:e}){this.type="axis",this.name=e,this.yAxisComponent=C([jt.Y,jt.SECONDARY_Y],e)}render({layout:e,axes:t,theme:i,scale:s}){var n;if(t.centerYAxis||!t[this.name])return;this.theme=xi(i,this.name),this.rect=e[this.name],this.axisSize=this.yAxisComponent?this.rect.height:this.rect.width;const{viewLabels:o}=t[this.name],{offsetKey:a,anchorKey:r}={offsetKey:(l=this.yAxisComponent)?"y":"x",anchorKey:l?"x":"y"};var l;const d=this.makeRenderOptions(t[this.name],null===(n=s)||void 0===n?void 0:n[this.name]);this.hasOnlyAxisLine()||(this.models.label=this.renderLabelModels(o,a,r,d),this.models.tick=this.renderTickModels(a,r,d)),this.models.axisLine=[this.renderAxisLineModel()],this.drawModels||(this.drawModels={tick:[],label:[],axisLine:this.models.axisLine},["tick","label"].forEach((e=>{this.drawModels[e]=this.models[e].map((e=>{const t=Object.assign({},e);return this.yAxisComponent?t.y=0:t.x=0,t}))})))}renderAxisLineModel(){const e=Ot(0);let t;const{color:i,width:s}=this.theme;if(this.yAxisComponent){const n=this.getYAxisXPoint();t={type:"line",x:n,y:e,x2:n,y2:Ot(this.axisSize),strokeStyle:i,lineWidth:s}}else t={type:"line",x:e,y:e,x2:Ot(this.axisSize),y2:e,strokeStyle:i,lineWidth:s};return t}renderTickModels(e,t,i){const s=this.yAxisComponent?this.getYAxisXPoint():Ot(0),{tickInterval:n,relativePositions:o}=i,a=C([jt.SECONDARY_Y,jt.X],this.name)?lt:-lt;return o.reduce(((i,o,r)=>r%n?i:[...i,{type:"tick",isYAxis:this.yAxisComponent,tickSize:a,[e]:Ot(o),[t]:s,strokeStyle:this.theme.color,lineWidth:this.theme.width}]),[])}renderLabelModels(e,t,i,s){const{needRotateLabel:n,radian:o,offsetY:a}=s,r=this.theme.label,l=Me(r),d=["default",{textAlign:this.getLabelTextAlign(n),font:l,fillStyle:r.color}],c=this.yAxisComponent?this.getYAxisAnchorPoint():a;return e.map((({text:e,offsetPos:s})=>({type:"label",text:e,style:d,radian:o,[t]:Ot(s),[i]:c})))}makeRenderOptions(e,t){var i,s,n,o;const{tickCount:a,tickInterval:r}=e,l=null!=(s=null===(i=t)||void 0===i?void 0:i.sizeRatio)?s:1,d=null!=(o=null===(n=t)||void 0===n?void 0:n.positionRatio)?o:0,c=wt(this.axisSize*l,a,this.axisSize*d);if(this.yAxisComponent)return{relativePositions:c,tickInterval:r};const{needRotateLabel:h,radian:u,offsetY:p}=e;return{relativePositions:c,tickInterval:r,needRotateLabel:h,radian:u,offsetY:p}}getYAxisAnchorPoint(){return this.isRightSide()?Ot(this.rect.width):Ot(0)}getLabelTextAlign(e){const t=this.isRightSide()?"right":"left",i=e?"left":"center";return this.yAxisComponent?t:i}isRightSide(){return this.name===jt.SECONDARY_Y}getYAxisXPoint(){return this.isRightSide()?Ot(0):Ot(this.rect.width)}hasOnlyAxisLine(){return this.yAxisComponent&&!this.rect.width||this.name===jt.X&&!this.rect.height}}const Lt=Math.PI/180,Pt=90,Wt=[0,25,45,65,85,90];function zt(e,t){return Math.cos(e*Lt)*t}function It(e,t){return Math.sin(e*Lt)*t}function Yt(e,t,i){return 2*(It(e,t/2)+It(Pt-e,i/2))}const Ht="YY-MM-DD hh:mm:ss";const Nt=/[\\]*YYYY|[\\]*YY|[\\]*MMMM|[\\]*MMM|[\\]*MM|[\\]*M|[\\]*DD|[\\]*D|[\\]*HH|[\\]*H|[\\]*mm|[\\]*m|[\\]*ss|[\\]*s|[\\]*A/gi,_t=["Invalid month","January","February","March","April","May","Jun","Jul","August","September","October","November","December"],Xt=[0,31,28,31,30,31,30,31,31,30,31,30,31],Ft={M:e=>Number(e.month),MM:e=>{const t=e.month;return Number(t)<10?`0${t}`:t},MMM:e=>_t[Number(e.month)].substr(0,3),MMMM:e=>_t[Number(e.month)],D:e=>Number(e.date),d:e=>Ft.D(e),DD:e=>{const t=e.date;return Number(t)<10?`0${t}`:t},dd:e=>Ft.DD(e),YY:e=>Number(e.year)%100,yy:e=>Ft.YY(e),YYYY:e=>{let t="20";const i=e.year;return i>69&&i<100&&(t="19"),Number(i)<100?t+String(i):i},yyyy:e=>Ft.YYYY(e),A:e=>e.meridiem,a:e=>e.meridiem,hh:e=>{const t=e.hour;return Number(t)<10?"0"+t:t},HH:e=>Ft.hh(e),h:e=>String(Number(e.hour)),H:e=>Ft.h(e),m:e=>String(Number(e.minute)),mm:e=>{const t=e.minute;return Number(t)<10?`0${t}`:t},s:e=>String(Number(e.second)),ss:e=>{const t=e.second;return Number(t)<10?`0${t}`:t}};function $t(e,t,i){var s,n,o;const a=null!=(n=null===(s=i)||void 0===s?void 0:s.meridiemSet.AM)?n:"AM",r=(null===(o=i)||void 0===o?void 0:o.meridiemSet.PM)||"PM";let l;if(t instanceof Date)l={year:t.getFullYear(),month:t.getMonth()+1,date:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds()};else{const{year:e,month:i,hour:s,minute:n,second:o}=t;l={year:e,month:i,date:t.date,hour:s,minute:n,second:o}}return function(e,t,i){const s=Number(e),n=Number(t),o=Number(i);if(!(s>-1&&s<100||s>1969&&s<2070)||!(n>0&&n<13))return!1;const a=function(e,t){return 2===e&&t%4==0&&(t%100!=0||t%400==0)}(n,s)?29:Xt[n];return o>0&&o<=a}(l.year,l.month,l.date)?(l.meridiem="",/([^\\]|^)[aA]\b/.test(e)&&(l.hour>12&&(l.hour%=12),0===l.hour&&(l.hour=12),l.meridiem=l.hour>11?r:a),e.replace(Nt,(e=>e.indexOf("\\")>-1?e.replace(/\\/,""):Ft[e](l)||""))):""}const Gt={COUNTER_CLOCKWISE:.1,CLOCKWISE:1};function Vt(e,t,i){const s=i-t,n=Math.abs(s);return s>Ne&&n!==He&&!e||s
=_e&&i<=Xe||t>=Xe&&i<=Ie)}(e,t,i)||function(e,t,i){return!e&&(t>=Ye&&i<=Xe||t<=Xe&&i>=_e)}(e,t,i))}function Kt(e,t){return t?e*Gt.CLOCKWISE:e*Gt.COUNTER_CLOCKWISE}function qt(e,t=""){return e.filter((({data:e})=>!b(e))).map((({data:e,name:i,color:s,rootParentName:n})=>({label:i,color:s,value:e,category:t,rootParentName:n,templateType:"pie"})))}function Zt(e){var t;return!(!e.pie||!Array.isArray(null===(t=e.pie[0])||void 0===t?void 0:t.data))}function Jt(e){return e.pie.map((({name:e})=>e))}function Qt(e){const t=e.toFixed(2),i=parseFloat(t);return`${t.length>5?parseFloat(t.substr(0,4)):String(i)}%`}function ei(e,t){var i,s,n;return!!t.pie&&"outer"===(null===(n=null===(s=null===(i=e)||void 0===i?void 0:i.series)||void 0===s?void 0:s.dataLabels)||void 0===n?void 0:n.anchor)}function ti(e,t){var i,s,n,o;return!!t.pie&&"outer"===(null===(o=null===(n=null===(s=null===(i=e)||void 0===i?void 0:i.series)||void 0===s?void 0:s.dataLabels)||void 0===n?void 0:n.pieSeriesName)||void 0===o?void 0:o.anchor)}var ii;function si(e=!0,t=!1){let i="center";return t&&(i=e?"right":"left"),i}function ni({labels:e,intervalData:t,circularAxisLabelMargin:i,circularAxisLabelFont:s,defaultAxisData:n,radiusData:o}){const{maxLabelWidth:a,maxLabelHeight:r}=Ti(e,i,s),{totalAngle:l,clockwise:d,axisSize:c,centerX:h,centerY:u,startAngle:p,endAngle:m,drawingStartAngle:g}=n,{tickInterval:v,labelInterval:f}=t,{innerRadius:b,outerRadius:x}=o;return{axisSize:c,centerX:h,centerY:u,label:{labels:e,interval:f,margin:i,maxWidth:a,maxHeight:r},radius:{inner:b,outer:x},angle:{start:p,end:m,total:l,central:l/(e.length+(l
e;return t.map(((e,s)=>a(e,{index:s,labels:t,axisName:i})))}!function(e){e.CIRCULAR="circularAxis",e.VERTICAL="verticalAxis"}(ii||(ii={}));const ai={name:"radialAxes",state:()=>({radialAxes:{}}),action:{setRadialAxesData({state:e}){var t,i;const{series:s,layout:n,scale:o}=e,a=e.categories,{plot:r}=n,l=di({series:s,categories:a}),d=e.options,c=e.theme,h=Me(c.circularAxis.label),u=Me(c.verticalAxis.label),{verticalAxisLabelMargin:p,circularAxisLabelMargin:m}=function(e,t){var i,s,n,o,a,r,l,d;return{verticalAxisLabelMargin:(o=null===(n=null===(s=null===(i=t)||void 0===i?void 0:i.verticalAxis)||void 0===s?void 0:s.label)||void 0===n?void 0:n.margin,null!=o?o:e?5:0),circularAxisLabelMargin:(d=null===(l=null===(r=null===(a=t)||void 0===a?void 0:a.circularAxis)||void 0===r?void 0:r.label)||void 0===l?void 0:l.margin,null!=d?d:25)}}(l,d),{radialAxisLabels:g,yAxisLabels:v}=function(e,t,i,s){const n=e?ii.CIRCULAR:ii.VERTICAL,{limit:o,stepSize:a}=s[n],r=oi(t,St(o,a),n),l=oi(t,i,e?ii.VERTICAL:ii.CIRCULAR);return{radialAxisLabels:e?r:l,yAxisLabels:e?l:r}}(l,d,a,o),{maxLabelWidth:f,maxLabelHeight:b}=Ti(g,m,h),x=ji(d,r,f,b+m,l),{axisSize:y}=x,S=l?function(e,t,i=1){var s,n,o,a;const r=X(e,(n=null===(s=t)||void 0===s?void 0:s.inner,null!=n?n:0)),l=X(e,null!==(a=null===(o=t)||void 0===o?void 0:o.outer)&&void 0!==a?a:e);return{radiusRanges:wt(l-r,i,r).splice(0===r?1:0,i).reverse(),innerRadius:r,outerRadius:l}}(y,null===(i=null===(t=d)||void 0===t?void 0:t.series)||void 0===i?void 0:i.radiusRange,v.length+1):{radiusRanges:wt(y,v.length),innerRadius:0,outerRadius:y},w=function({labels:e,pointOnColumn:t,intervalData:i,isLabelOnVerticalAxis:s,verticalAxisLabelMargin:n,verticalAxisLabelFont:o,defaultAxisData:a,radiusData:r}){const{clockwise:l,axisSize:d,centerX:c,centerY:h,startAngle:u,endAngle:p}=a,{radiusRanges:m,innerRadius:g,outerRadius:v}=r,{labelInterval:f}=i,{maxLabelWidth:b,maxLabelHeight:x}=Ti(e,n,o);return{axisSize:d,centerX:c,centerY:h,label:{labels:e,interval:f,margin:n,maxWidth:b,maxHeight:x,align:si(l,s)},radius:{inner:g,outer:v,ranges:m},angle:{start:u,end:p},tickDistance:(v-g)/e.length,pointOnColumn:t}}({labels:v,pointOnColumn:l,isLabelOnVerticalAxis:l,intervalData:Ei(l,{axis:d.verticalAxis,categories:a,layout:n}),verticalAxisLabelMargin:p,verticalAxisLabelFont:u,defaultAxisData:x,radiusData:S});e.radialAxes={circularAxis:ni({labels:g,intervalData:Ei(!0,{axis:d.circularAxis,categories:a,layout:n}),defaultAxisData:x,circularAxisLabelMargin:m,circularAxisLabelFont:h,radiusData:S}),verticalAxis:w}}},observe:{updateRadialAxes(){this.dispatch("setRadialAxesData")}}};var ri=ai;function li(e,t,i){var s;const n=90,o=121,a=5;if(null===(s=i)||void 0===s?void 0:s[0]){if(ut(i[0])
e-t))}(e).forEach((i=>{const s=i/e*t;s>=n&&s<=o&&r.push({interval:i,blockCount:Math.floor(e/i),remainBlockCount:0})})),!r.length){const i=k(n,o,a);r=i.reduce(((i,s)=>{const n=function(e,t,i){let s,n=Math.floor(t/i),o=null;const a=n?Math.floor(e/n):e;return a>1&&(s=e-a*n,s>=a&&(n+=Math.floor(s/a),s%=a),o={blockCount:n,remainBlockCount:s,interval:a}),o}(e,t,s);return n?[...i,n]:i}),[])}let l=1;if(r.length){l=r.reduce(((e,t)=>t.blockCount>e.blockCount?t:e),{blockCount:0,interval:1}).interval}return l}function di({series:e,options:t,categories:i}){var s,n;return!!e.bar||!!e.radialBar||!!e.gauge&&Array.isArray(i)&&!i.length||!!e.bullet&&!(null===(n=null===(s=t)||void 0===s?void 0:s.series)||void 0===n?void 0:n.vertical)}function ci(e){return!!(e.column||e.bar||e.boxPlot||e.bullet)}function hi(e){return!!e.radar||!!e.radialBar||!!e.gauge}function ui(e,t){return hi(t)?function(e){return{valueAxisName:e?"circularAxis":"verticalAxis",labelAxisName:e?"verticalAxis":"circularAxis"}}(e):{valueAxisName:e?"xAxis":"yAxis",labelAxisName:e?"yAxis":"xAxis"}}function pi(e){return{valueSizeKey:e?"width":"height",labelSizeKey:e?"height":"width"}}function mi(e){const t=e.map((e=>Number(e)));return{min:Math.min(...t),max:Math.max(...t)}}function gi(e){var t;return Array.isArray(null===(t=e)||void 0===t?void 0:t.yAxis)&&2===e.yAxis.length}function vi(e){var t;const i=gi(e);return{yAxis:i?e.yAxis[0]:null===(t=e)||void 0===t?void 0:t.yAxis,secondaryYAxis:i?e.yAxis[1]:null}}function fi(e,t,i){var s;const{secondaryYAxis:n}=vi(e);return(null===(s=n)||void 0===s?void 0:s.chartType)===t?"secondaryYAxis":i}function bi(e,t){if(C([jt.X,jt.CIRCULAR,jt.VERTICAL],t))return[t];const i=e,{yAxis:s,secondaryYAxis:n}=vi(i);return n?[s.chartType,n.chartType].map(((e,s)=>e?fi(i,e,t):["yAxis","secondaryYAxis"][s])):[t]}function xi(e,t){const{xAxis:i,yAxis:s,circularAxis:n}=e;let o;return o=t===jt.X?i:Array.isArray(s)?t===jt.Y?s[0]:s[1]:t===ii.CIRCULAR?n:s,o}function yi(e,t,i,s){let n=0;return Wt.every((o=>{const a=function(e,t,i){return 2*(zt(e,t/2)+zt(Pt-e,i/2))}(o,t,i);return n=o,a>e||a/2>s.x})),e
s.x?n:0}function Si(e,t,i){var s,n;const o=e[i],a=t[i];return!(!o&&!a)&&(null===(s=o)||void 0===s?void 0:s.maxLabelWidth)!==(null===(n=a)||void 0===n?void 0:n.maxLabelWidth)}function wi(e,t){return function(e,t){return Si(e,t,"yAxis")||Si(e,t,"secondaryYAxis")}(e,t)||function(e,t){const{maxHeight:i}=e.xAxis,{maxHeight:s}=t.xAxis;return i!==s}(e,t)}function Oi(e){var t,i,s,n;return null==(n=null===(s=null===(i=null===(t=e)||void 0===t?void 0:t.xAxis)||void 0===i?void 0:i.label)||void 0===s?void 0:s.rotatable)||n}function Mi(e,t){var i,s,n,o;const{labels:a,pointOnColumn:r,labelDistance:l,tickDistance:d,labelInterval:c,tickInterval:h,tickCount:u,scale:p}=e;let m=t,g=0,v=0;if(p){const e=null!=(s=null===(i=p)||void 0===i?void 0:i.sizeRatio)?s:1,a=null!=(o=null===(n=p)||void 0===n?void 0:n.positionRatio)?o:0;m=t*e,g=t*a}else{v=r?(null!=l?l:d*(c===h?c:1))/2:0}const f=wt(m,u,g);return a.reduce(((e,i,s)=>{const n=f[s]+v;return!(s%c)&&n<=t?[...e,{offsetPos:n,text:i}]:e}),[])}function Ai(e){if(f(e))return e;const t={text:"",offsetX:0,offsetY:0};return S(e)?Object.assign(Object.assign({},t),{text:e}):Object.assign(Object.assign({},t),e)}function ki(e,t){var i,s,n;return null!=(n=null===(s=null===(i=Object.assign(Object.assign({},vi(e)),{xAxis:e.xAxis})[t])||void 0===i?void 0:i.label)||void 0===s?void 0:s.formatter)?n:e=>e}function Ci(e,t,i,s){var n,o;const a=function(e){if(e)return O(e)?e.format:Ht}(null===(o=null===(n=t)||void 0===n?void 0:n[s])||void 0===o?void 0:o.date),r=i&&a?e.map((e=>$t(a,new Date(e)))):e,l=ki(t,s);return r.map(((t,i)=>l(t,{index:i,labels:e,axisName:s})))}function Ri(e,t,i,s,n){const o=yi(i,e,t,n);return s&&0!==o?{needRotateLabel:o>0,radian:Ge(o,0),rotationHeight:Yt(o,e,t)}:{needRotateLabel:!1,radian:0,rotationHeight:t}}function Ti(e,t,i=Ee){const s=e.reduce(((e,t)=>e.length>t.length?e:t),"");return{maxLabelWidth:ut(s,i)+t,maxLabelHeight:pt(s,i)}}function Di(e,t){var i,s,n,o;if("xAxis"===e)return 0;const a=vi(t);return Math.abs(null!=(o=null===(n=null===(s=null===(i=a)||void 0===i?void 0:i[e])||void 0===s?void 0:s.label)||void 0===n?void 0:n.margin)?o:0)}function Ei(e,t){var i,s,n,o,a,r;const{axis:l,categories:d,layout:c,isCoordinateTypeChart:h}=t,u=null===(s=null===(i=l)||void 0===i?void 0:i.tick)||void 0===s?void 0:s.interval,p=null===(o=null===(n=l)||void 0===n?void 0:n.label)||void 0===o?void 0:o.interval,m=y(u)||y(p),g=e&&!y(null===(r=null===(a=l)||void 0===a?void 0:a.scale)||void 0===r?void 0:r.stepSize)&&!t.shift&&!m&&!h,v=g?function(e,t){if(!e||!t)return 1;const{width:i}=t.xAxis,s=e.length;return li(s,i,e)}(d,c):1;return{tickInterval:null!=u?u:v,labelInterval:null!=p?p:g?v:1}}function ji(e,t,i=0,s=0,n=!1){var o;const a=t.width/2;if(n){const{startAngle:n,endAngle:r,clockwise:l}=function(e){var t,i,s,n,o,a,r,l;const d=null==(i=null===(t=e)||void 0===t?void 0:t.clockwise)||i;return{clockwise:d,startAngle:(o=null===(n=null===(s=e)||void 0===s?void 0:s.angleRange)||void 0===n?void 0:n.start,null!=o?o:d?Ne:He),endAngle:(l=null===(r=null===(a=e)||void 0===a?void 0:a.angleRange)||void 0===r?void 0:r.end,null!=l?l:d?He:Ne)}}(null===(o=e)||void 0===o?void 0:o.series),d=Ut(l,n,r);return{isSemiCircular:d,axisSize:qe(t,d,i,s),centerX:a,centerY:d?Kt(t.height,l):t.height/2,totalAngle:Vt(l,n,r),drawingStartAngle:n,clockwise:l,startAngle:n,endAngle:r}}return{isSemiCircular:!1,axisSize:qe(t,!1,i,s),centerX:a,centerY:t.height/2,totalAngle:He,drawingStartAngle:Ne,clockwise:!0,startAngle:Ne,endAngle:He}}function Bi(e,t){var i;return!!(null===(i=e[t])||void 0===i?void 0:i.date)}function Li(e){return y(e)?e:Array.isArray(e)?e[1]:e.y}function Pi(e){return Array.isArray(e)?e[0]:e.x}function Wi(e,t,i,s){if(y(e))return i-s;const n=Pi(e);let o=t.findIndex((e=>e===String(n)));return-1===o&&function(e,t){const i=I(t);return!!i&&(y(e)?e>=Number(i):new Date(e)>=new Date(i))}(n,t)&&(o=t.length),o}function zi(e){return function(e){var t;if(!e.line)return!1;const i=_(null===(t=e.line[0])||void 0===t?void 0:t.data);return i&&(Array.isArray(i)||O(i))}(e)||!!e.scatter||!!e.bubble}function Ii(e){var t,i;const s=!!D(e,["series","diverging"]),n="center"===(null===(i=null===(t=e)||void 0===t?void 0:t.yAxis)||void 0===i?void 0:i.align);return s&&n}function Yi(e){const{axisSize:t,categories:i,series:s,options:n,theme:o,scale:a,initialAxisData:r,isCoordinateTypeChart:l,axisName:d}=e,c=!!s.line,h=function(e,t){var i;return!!ci(e)||!(!e.line&&!e.area)&&Boolean(null===(i=t.xAxis)||void 0===i?void 0:i.pointOnColumn)}(s,n),u=Bi(n,d),p=l?St(a.limit,a.stepSize,u):i,m=Ci(p,n,u,d);let g;if(a&&c){const e=(h?p:i).map((e=>Number(u?new Date(e):e)));g={min:Math.min(...e),max:Math.max(...e)}}const v=i.length,f=v-(h?0:1),b=f?t/f:t,x=t/(m.length-(h?0:1));let y=m.length;h&&!l&&(y+=1);const S=Mi(Object.assign({labels:m,pointOnColumn:h,tickDistance:b,tickCount:y,scale:a},r),t),w=Di(d,n);return Object.assign(Object.assign({labels:m,viewLabels:S,pointOnColumn:h,labelDistance:x,tickDistance:b,tickCount:y,labelRange:g,rectResponderCount:v,isLabelAxis:!0},r),Ti(m,w,Me(o.label)))}function Hi(e){var t;const{scale:i,axisSize:s,series:n,options:o,centerYAxis:a,initialAxisData:r,theme:l,labelOnYAxis:d,axisName:c}=e,{limit:h,stepSize:u}=i,p=a?null===(t=a)||void 0===t?void 0:t.xAxisHalfSize:s,m=function(e,t){var i;return ci(e)&&!!(null===(i=t.series)||void 0===i?void 0:i.diverging)}(n,o),g=ki(o,c),v=function(e,t,i,s){const{min:n,max:o}=e;if(!(n<=0&&o>=0)||s)return null;const a=(0-n)/(o-n)*t;return i?a:t-a}(h,s,di({series:n,options:o}),m);let f=St(h,u);!a&&m&&(f=function(e){return N(e)?e.reverse().slice(1).concat(e):e.slice(1).reverse().concat(e)}(f));const b=f.map(((e,t)=>g(e,{index:t,labels:f,axisName:c}))),x=p/Math.max(f.length,1),S=f.length,w=!1,O=Mi(Object.assign({labels:d?b:[...b].reverse(),pointOnColumn:w,tickDistance:x,tickCount:S},r),p),M=Di(c,o),A=Object.assign(Object.assign({labels:b,viewLabels:O,pointOnColumn:w,isLabelAxis:!1,tickCount:S,tickDistance:x},r),Ti(b,M,Me(l.label)));return y(v)&&(A.zeroPosition=v),A}function Ni(e,t){var i,s;const n=Ei(e,t),o=Ai(null===(s=null===(i=t)||void 0===i?void 0:i.axis)||void 0===s?void 0:s.title);return o&&(n.title=o),n}function _i({axisData:e,axisSize:t,axisLayout:i,centerYAxis:s,rotatable:n,labelMargin:o=0}){const{viewLabels:a,pointOnColumn:r,maxLabelWidth:l,maxLabelHeight:d}=e,c=gt(d)+o,h=Ri(l,d,(s?s.xAxisHalfSize:t)/(a.length-(r?0:1)),n,i),{needRotateLabel:u,rotationHeight:p}=h,m=(u?p:d)+c;return Object.assign(Object.assign(Object.assign({},e),h),{maxHeight:m,offsetY:c})}const Xi={name:"axes",state:({series:e,options:t})=>{const{secondaryYAxis:i}=vi(t),s={xAxis:{},yAxis:{}};return e.bar&&Ii(t)&&(s.centerYAxis={}),i&&(s.secondaryYAxis={}),{axes:s}},action:{setAxesData({state:e,initStoreState:t}){var i,s;const{scale:n,options:o,series:a,layout:r,theme:l}=e,{xAxis:d,yAxis:c,plot:h}=r,u=zi(t.series),p=di({series:a,options:o}),{categories:m}=function(e,t){var i,s;return{categories:(i=e,null!=i?i:[]),rawCategories:(s=t,null!=s?s:[])}}(e.categories,e.rawCategories),{valueAxisName:g,valueAxisSize:v,labelAxisName:f,labelAxisSize:b}=function(e,t,i){const{valueAxisName:s,labelAxisName:n}=ui(e,i),{valueSizeKey:o,labelSizeKey:a}=pi(e);return{valueAxisName:s,valueAxisSize:t[o],labelAxisName:n,labelAxisSize:t[a]}}(p,h,a),x=e.axes.centerYAxis,y=function(e,t,i,s,n){var o,a,r;const{yAxis:l,secondaryYAxis:d}=vi(e),c=null===(a=null===(o=e)||void 0===o?void 0:o.series)||void 0===a?void 0:a.shift;return{xAxis:Ni(!t,{categories:i,axis:null===(r=e)||void 0===r?void 0:r.xAxis,layout:s,shift:c,isCoordinateTypeChart:n}),yAxis:Ni(t,{axis:l}),secondaryYAxis:d?Ni(t,{axis:d}):null}}(o,p,m,r,u),S=Hi({scale:n[g],axisSize:v,options:o,series:a,theme:xi(l,g),centerYAxis:x?{xAxisHalfSize:(d.width-c.width)/2}:null,initialAxisData:y[g],labelOnYAxis:p,axisName:g}),w=Yi({scale:n[f],axisSize:b,categories:m,options:o,series:a,theme:xi(l,f),initialAxisData:y[f],isCoordinateTypeChart:u,labelOnYAxis:p,axisName:f});let O,M;if(e.axes.secondaryYAxis&&(O=function({state:e,labelOnYAxis:t,valueAxisSize:i,labelAxisSize:s,initialAxisData:n,isCoordinateTypeChart:o}){var a,r;const{scale:l,options:d,series:c,theme:h}=e,u=e.categories;return t?Yi({scale:l.secondaryYAxis,axisSize:s,categories:(r=null===(a=vi(d).secondaryYAxis)||void 0===a?void 0:a.categories,null!=r?r:u),options:d,series:c,theme:xi(h,jt.SECONDARY_Y),initialAxisData:n,isCoordinateTypeChart:o,axisName:jt.SECONDARY_Y}):Hi({scale:l.secondaryYAxis,axisSize:i,options:d,series:c,theme:xi(h,jt.SECONDARY_Y),centerYAxis:null,initialAxisData:n,axisName:jt.SECONDARY_Y})}({state:e,labelOnYAxis:p,valueAxisSize:v,labelAxisSize:b,labelAxisName:f,valueAxisName:g,initialAxisData:y.secondaryYAxis,isCoordinateTypeChart:u})),x){const e=(d.width-c.width)/2;M=j(S,{x:d.x+e,xAxisHalfSize:e,secondStartX:(d.width+c.width)/2,yAxisLabelAnchorPoint:c.width/2,yAxisHeight:c.height})}const A={xAxis:_i({axisData:p?S:w,axisSize:p?v:b,axisLayout:r.xAxis,centerYAxis:M,rotatable:Oi(o),labelMargin:null===(s=null===(i=o.xAxis)||void 0===i?void 0:i.label)||void 0===s?void 0:s.margin}),yAxis:p?w:S,secondaryYAxis:O,centerYAxis:M};wi(e.axes,A)&&this.notify(e,"layout"),e.axes=A}},computed:{},observe:{updateAxes(){this.dispatch("setAxesData")}}};var Fi=Xi;const $i={xls:"data:application/vnd.ms-excel;base64,",csv:"data:text/csv;charset=utf-8,%EF%BB%BF"};function Gi(e,t,i,s){const n=function(e){return"jpeg"===e||"png"===e}(t)?function(e){const t=e.substr(0,e.indexOf(";base64,")).substr(e.indexOf(":")+1),i=atob(e.substr(e.indexOf(",")+1)),s=[];for(let e=0;e
e.buffer)),{type:t})}}(i):new Blob([i],{type:s});window.navigator.msSaveOrOpenBlob(n,`${e}.${t}`)}function Vi(e,t,i){if(i){const s=document.createElement("a");s.href=i,s.target="_blank",s.download=`${e}.${t}`,document.body.appendChild(s),s.click(),s.remove()}}function Ui(...e){return((e,...t)=>e.reduce(((e,i,s)=>e+t[s-1]+i)))(...e).replace(/\n\s*/g,"")}function Ki(e,t){return e.reduce(((e,i,s)=>{var n,o;return!s||e<(null===(o=null===(n=i)||void 0===n?void 0:n[t])||void 0===o?void 0:o.length)?i[t].length:e}),0)}function qi({label:e,data:t,children:i=[]},s){return t&&s.push([e,t]),i.forEach((e=>qi(e,s))),s}function Zi(e){const{series:t}=e,i=[["Label","Data"]];return t.treemap.data.forEach((e=>{qi(e,i)})),i}function Ji(e){const{series:t}=e,i=e.categories;return Object.keys(t).reduce(((e,s)=>{const n=t[s].data.map((({name:e,data:t})=>{const n=!y(_(t))&&C(["line","area","scatter"],s)?function(e,t,i){return t.map(((t,s)=>{if("area"===e&&Array.isArray(i[s]))return i[s].join();const n=i.find((e=>t===String(Pi(e))));return n?Li(n):""}))}(s,i,t):t.map((e=>Array.isArray(e)?e.join():e));return[e,...n]}));return[...e,...n]}),t.gauge?[]:[["",...i]])}function Qi(e){let t;const{series:i}=e;return t=i.bullet?function({series:e}){const t=e.bullet.data,i=Ki(t,"markers"),s=k(0,Ki(t,"ranges")).map((e=>`Range ${e+1}`)),n=k(0,i).map((e=>`Marker ${e+1}`));return t.reduce(((e,{data:t,markers:i,name:o,ranges:a})=>[...e,[o,null!=t?t:"",...s.map(((e,t)=>{var i;const s=null===(i=a)||void 0===i?void 0:i[t];return s?`${s[0]} ~ ${s[1]}`:""})),...n.map(((e,t)=>{var s,n;return null!=(n=null===(s=i)||void 0===s?void 0:s[t])?n:""}))]]),[["","Actual",...s,...n]])}(e):i.heatmap?function({categories:e,series:t}){const i=e.x;return t.heatmap.data.reduce(((e,{data:t,yCategory:i})=>[...e,[i,...t.map((e=>b(e)?"":e))]]),[["",...i]])}(e):i.bubble?function(e){const{series:t}=e;return t.bubble.data.reduce(((e,{name:t,data:i})=>[...e,...i.map((e=>b(e)?[]:[t,e.label,String(e.x),e.y,e.r]))]),[["Name","Label","X","Y","Radius"]])}(e):i.boxPlot?function(e){var t;const{series:i}=e,s=null!=(t=e.categories)?t:[];return i.boxPlot.data.reduce(((e,{name:t,data:i,outliers:s})=>{const n=(null!=i?i:[]).map(((e,t)=>{var i;const n=null===(i=(null!=s?s:[]).find((e=>e[0]===t)))||void 0===i?void 0:i[1];return(n?[...e,n]:[...e]).join()}));return[...e,[t,...n]]}),[["",...s]])}(e):i.pie?function(e){var t;const{series:i}=e,s=null!=(t=e.categories)?t:[];return i.pie.data.reduce(((e,{name:t,data:i})=>{const s=Array.isArray(i)?(null!=i?i:[]).reduce(((e,t)=>{var i;return[...e,[t.name,(i=t.data,null!=i?i:"")]]}),[]):[[t,null!=i?i:""]];return[...e,...s]}),s.length?[["",...s]]:[])}(e):i.treemap?Zi(e):Ji(e),t}function es(e,t,i,s){const n=function(){let e;const t=!f(document.createElement("a").download);return f(window.Blob&&window.navigator.msSaveOrOpenBlob)?t&&(e=Vi):e=Gi,e}();S(i)&&n&&n(e,t,i,s)}function ts(e,t,i){const s=Qi(i),n=$i[t].replace(/(data:|;base64,|,%EF%BB%BF)/g,"");let o="";o="csv"===t?encodeURIComponent(function(e,t={}){const{lineDelimiter:i="\n",itemDelimiter:s=","}=t,n=e.length-1;let o="";return e.forEach(((e,t)=>{const a=e.length-1;e.forEach(((e,t)=>{const i=y(e)?e:`"${e}"`;o+=i,t
${function(e){let t="
";return e.forEach(((e,i)=>{const s=0===i?"th":"td";t+="
",e.forEach(((e,n)=>{t+=`<${s}${0!==i||0===n?' class="number"':""}>${e}${s}>`})),t+="
"})),t+="
",t}(e)}