/*! * build: vue-admin-better * vue-admin-beautiful.com * https://gitee.com/chu1204505056/vue-admin-better * time: 2022-9-30 17:05:29 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5b685476"],{"00fd":function(e,t,n){var r=n("9e69"),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;function l(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}e.exports=l},"04f6":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=32,i=7;function o(e){var t=0;while(e>=r)t|=1&e,e>>=1;return e+t}function a(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){while(i=0)i++;return i-t}function s(e,t,n){n--;while(t>>1,i(a,e[o])<0?l=o:s=o+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:while(u>0)e[s+u]=e[s+u-1],u--}e[s]=a}}function u(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])>0){s=r-i;while(l0)a=l,l=1+(l<<1),l<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{s=i+1;while(ls&&(l=s);var u=a;a=i-l,l=i-u}a++;while(a>>1);o(e,t[n+c])>0?a=c+1:l=c}return l}function c(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])<0){s=i+1;while(ls&&(l=s);var u=a;a=i-l,l=i-u}else{s=r-i;while(l=0)a=l,l=1+(l<<1),l<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}a++;while(a>>1);o(e,t[n+c])<0?l=c:a=c+1}return l}function d(e,t){var n,r,o=i,a=0,s=0;a=e.length;var l=[];function d(e,t){n[s]=e,r[s]=t,s+=1}function f(){while(s>1){var e=s-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]r[e+1])break;p(e)}}function h(){while(s>1){var e=s-2;e>0&&r[e-1]=i||v>=i);if(y)break;m<0&&(m=0),m+=2}if(o=m,o<1&&(o=1),1===r){for(d=0;d=0;d--)e[v+d]=e[g+d];if(0===r){x=!0;break}}if(e[p--]=l[h--],1===--s){x=!0;break}if(b=s-u(e[f],l,0,s,s-1,t),0!==b){for(p-=b,h-=b,s-=b,v=p+1,g=h+1,d=0;d=i||b>=i);if(x)break;y<0&&(y=0),y+=2}if(o=y,o<1&&(o=1),1===s){for(p-=r,f-=r,v=p+1,g=f+1,d=r-1;d>=0;d--)e[v+d]=e[g+d];e[p]=l[h]}else{if(0===s)throw new Error;for(g=p-(s-1),d=0;d=0;d--)e[v+d]=e[g+d];e[p]=l[h]}else for(g=p-(s-1),d=0;df&&(h=f),l(e,n,n+h,n+u,t),u=h}c.pushRun(n,u),c.mergeRuns(),s-=u,n+=u}while(0!==s);c.forceMergeRuns()}}},"04f7":function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return m}));var r=n("07fd"),i=n("e0d3"),o=n("6d8b"),a=n("2b17"),s=n("b7d9"),l=n("edae"),u=n("ec6f"),c=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return Object(s["d"])(e,t)},e}();function d(e,t){var n=new c,i=e.data,s=n.sourceFormat=e.sourceFormat,u=e.startIndex,d="";e.seriesLayoutBy!==r["a"]&&Object(l["c"])(d);var v=[],y={},m=e.dimensionsDefine;if(m)Object(o["k"])(m,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};if(v.push(r),null!=n){var i="";Object(o["q"])(y,n)&&Object(l["c"])(i),y[n]=r}}));else for(var b=0;br?t:e,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;sa;if(s)r.length=a;else for(var l=o;l=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,s=r.length,l=!1,d=C,f=t;if(Object(o["u"])(t)){var h=_(t);d=h,(1===h&&!Object(o["z"])(t[0])||2===h&&!Object(o["z"])(t[0][0]))&&(l=!0)}else if(Object(o["z"])(t)&&!Object(o["l"])(t))d=w;else if(Object(o["C"])(t))if(isNaN(+t)){var p=u["g"](t);p&&(f=p,d=O)}else d=w;else if(Object(o["x"])(t)){var g=Object(o["m"])({},f);g.colorStops=Object(o["H"])(t.colorStops,(function(e){return{offset:e.offset,color:u["g"](e.color)}})),Object(c["m"])(t)?d=T:Object(c["o"])(t)&&(d=E),f=g}0===s?this.valType=d:d===this.valType&&d!==C||(l=!0),this.discrete=this.discrete||l;var v={time:e,value:f,rawValue:t,percent:0};return n&&(v.easing=n,v.easingFunc=Object(o["w"])(n)?n:i[n]||Object(a["a"])(n)),r.push(v),v},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort((function(e,t){return e.time-t.time}));for(var r=this.valType,i=n.length,o=n[i-1],a=this.discrete,s=M(r),l=A(r),u=0;u=0;n--)if(u[n].percent<=t)break;n=y(n,c-2)}else{for(n=v;nt)break;n=y(n-1,c-2)}i=u[n+1],r=u[n]}if(r&&i){this._lastFr=n,this._lastFrP=t;var b=i.percent-r.percent,_=0===b?1:y((t-r.percent)/b,1);i.easingFunc&&(_=i.easingFunc(_));var w=a?this._additiveValue:g?L:e[d];if(!M(l)&&!g||w||(w=this._additiveValue=[]),this.discrete)e[d]=_<1?r.rawValue:i.rawValue;else if(M(l))l===S?h(w,r[s],i[s],_):p(w,r[s],i[s],_);else if(A(l)){var k=r[s],E=i[s],C=l===T;e[d]={type:C?"linear":"radial",x:f(k.x,E.x,_),y:f(k.y,E.y,_),colorStops:Object(o["H"])(k.colorStops,(function(e,t){var n=E.colorStops[t];return{offset:f(e.offset,n.offset,_),color:x(h([],e.color,n.color,_))}})),global:E.global},C?(e[d].x2=f(k.x2,E.x2,_),e[d].y2=f(k.y2,E.y2,_)):e[d].r=f(k.r,E.r,_)}else if(g)h(w,r[s],i[s],_),a||(e[d]=x(w));else{var I=f(r[s],i[s],_);a?this._additiveValue=I:e[d]=I}a&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===w?e[n]=e[n]+r:t===O?(u["g"](e[n],L),g(L,L,r,1),e[n]=x(L)):t===S?g(e[n],e[n],r,1):t===k&&v(e[n],e[n],r,1)},e}(),D=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?Object(o["G"])("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Object(o["F"])(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,o=0;o0&&s.addKeyframe(0,b(l),r),this._trackKeys.push(a)}s.addKeyframe(e,b(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var s=a.pop();i.addKeyframe(s.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();t["b"]=D},"07fd":function(e,t,n){"use strict";n.d(t,"i",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return c})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f}));var r=n("6d8b"),i=Object(r["f"])(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),o="original",a="arrayRows",s="objectRows",l="keyedColumns",u="typedArray",c="unknown",d="column",f="row"},"0924":function(e,t,n){"use strict";function r(e,t,n){switch(n){case"color":var r=e.getItemVisual(t,"style");return r[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n);default:0}}function i(e,t){switch(t){case"color":var n=e.getVisual("style");return n[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t);default:0}}function o(e,t,n,r){switch(n){case"color":var i=e.ensureUniqueItemVisual(t,"style");i[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r);break;default:0}}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}))},"0da8":function(e,t,n){"use strict";var r=n("9ab4"),i=n("19eb"),o=n("9850"),a=n("6d8b"),s=Object(a["i"])({x:0,y:0},i["b"]),l={style:Object(a["i"])({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},i["a"].style)};function u(e){return!!(e&&"string"!==typeof e&&e.width&&e.height)}var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r["a"])(t,e),t.prototype.createStyle=function(e){return Object(a["g"])(s,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r=u(t.image)?t.image:this.__image;if(!r)return 0;var i="width"===e?"height":"width",o=t[i];return null==o?r[e]:r[e]/r[i]*o},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return l},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new o["a"](e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(i["c"]);c.prototype.type="image",t["a"]=c},"0f99":function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"g",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"b",(function(){return h}));var r=n("e0d3"),i=n("6d8b"),o=n("07fd"),a={Must:1,Might:2,Not:3},s=Object(r["o"])();function l(e){s(e).datasetMap=Object(i["f"])()}function u(e,t,n){var r={},o=d(t);if(!o||!e)return r;var a,l,u=[],c=[],f=t.ecModel,h=s(f).datasetMap,p=o.uid+"_"+n.seriesLayoutBy;e=e.slice(),Object(i["k"])(e,(function(t,n){var o=Object(i["A"])(t)?t:e[n]={name:t};"ordinal"===o.type&&null==a&&(a=n,l=y(o)),r[o.name]=[]}));var g=h.get(p)||h.set(p,{categoryWayDim:l,valueWayDim:0});function v(e,t,n){for(var r=0;r=0;a--)r[a]&&!u["l"](r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}})),delete e[w],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var i=0;i=t:"max"===n?e<=t:e===t}function z(e,t){return e.join(",")===t.join(",")}var U=R,H=o["k"],V=o["A"],G=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function q(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=G.length;n=0;g--){var v=e[g];if(s||(f=v.data.rawIndexOf(v.stackedByDimension,d)),f>=0){var y=v.data.getByRawIndex(v.stackResultDimension,f);if("all"===l||"positive"===l&&y>0||"negative"===l&&y<0||"samesign"===l&&h>=0&&y>0||"samesign"===l&&h<=0&&y<0){h=Object(fe["b"])(h,y),p=y;break}}}return r[0]=h,r[1]=p,r}))}))}var ge=n("4f85"),ve=n("b12f"),ye=n("e887"),me=n("c7a2"),be=n("0da8"),xe=n("deab"),_e=n("cbe5"),we=n("861c"),Se=n("7d6c"),ke=n("88b3"),Oe=n("282b"),Te=n("551f"),Ee=n("3901"),Ce=Object(u["o"])(),Ae={itemStyle:Object(Oe["a"])(Te["a"],!0),lineStyle:Object(Oe["a"])(Ee["a"],!0)},Me={lineStyle:"stroke",itemStyle:"fill"};function Le(e,t){var n=e.visualStyleMapper||Ae[t];return n||(console.warn("Unkown style type '"+t+"'."),Ae.itemStyle)}function Ie(e,t){var n=e.visualDrawType||Me[t];return n||(console.warn("Unkown style type '"+t+"'."),"fill")}var De={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),a=Le(e,r),s=a(i),l=i.getShallow("decal");l&&(n.setVisual("decal",l),l.dirty=!0);var u=Ie(e,r),c=s[u],d=Object(o["w"])(c)?c:null,f="auto"===s.fill||"auto"===s.stroke;if(!s[u]||d||f){var h=e.getColorFromPalette(e.name,null,t.getSeriesCount());s[u]||(s[u]=h,n.setVisual("colorFromPalette",!0)),s.fill="auto"===s.fill||Object(o["w"])(s.fill)?h:s.fill,s.stroke="auto"===s.stroke||Object(o["w"])(s.stroke)?h:s.stroke}if(n.setVisual("style",s),n.setVisual("drawType",u),!t.isSeriesFiltered(e)&&d)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=Object(o["m"])({},s);i[u]=d(r),t.setItemVisual(n,"style",i)}}}},je=new c["a"],Pe={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=Le(e,r),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){je.option=n[r];var s=i(je),l=e.ensureUniqueItemVisual(t,"style");Object(o["m"])(l,s),je.option.decal&&(e.setItemVisual(t,"decal",je.option.decal),je.option.decal.dirty=!0),a in s&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},Re={performRawSeries:!0,overallReset:function(e){var t=Object(o["f"])();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,i=t.get(r);i||(i={},t.set(r,i)),Ce(e).scope=i}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=Ce(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=Ie(t,a);i.each((function(e){var t=i.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e],l=i.getItemVisual(a,"colorFromPalette");if(l){var u=i.ensureUniqueItemVisual(a,"style"),c=n.getName(e)||e+"",d=n.count();u[s]=t.getColorFromPalette(c,o,d)}}))}}))}},Ne=n("2dc5"),Be=n("76a5"),Fe=n("8d32"),ze=Math.PI;function Ue(e,t){t=t||{},o["i"](t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Ne["a"],r=new me["a"]({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,a=new Be["a"]({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),s=new me["a"]({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(s),t.showSpinner&&(i=new Fe["a"]({shape:{startAngle:-ze/2,endAngle:-ze/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),i.animateShape(!0).when(1e3,{endAngle:3*ze/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*ze/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=a.getBoundingRect().width,o=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*o-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:o),u=e.getHeight()/2;t.showSpinner&&i.setShape({cx:l,cy:u}),s.setShape({x:l-o,y:u-o,width:2*o,height:2*o}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var He=n("9fbc"),Ve=n("8918"),Ge=function(){function e(e,t,n,r){this._stageTaskMap=Object(o["f"])(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,a=r&&r.modDataCount,s=null!=a?Math.ceil(a/o):null;return{step:o,modBy:s,modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData(),i=r.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,a=e.get("large")&&i>=e.get("largeThreshold"),s="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:s,large:a}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Object(o["f"])();e.eachSeries((function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;Object(o["k"])(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{}),a="";Object(o["b"])(!(r.reset&&r.overallReset),a),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,a=this;function s(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}Object(o["k"])(e,(function(e,o){if(!r.visualType||r.visualType===e.visualType){var l=a._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,f=c.agentStubMap;f.each((function(e){s(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),a.updatePayload(c,n);var h=a.getPerformArgs(c,r.block);f.each((function(e){e.perform(h)})),c.perform(h)&&(i=!0)}else u&&u.each((function(o,l){s(r,o)&&o.dirty();var u=a.getPerformArgs(o,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(o.context.model),a.updatePayload(o,n),o.perform(u)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,s=t.seriesTaskMap=Object(o["f"])(),l=e.seriesType,u=e.getTargetSeries;function c(t){var o=t.uid,l=s.set(o,a&&a.get(o)||Object(He["a"])({plan:Xe,reset:Ze,count:Qe}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,r).each(c)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||Object(He["a"])({reset:qe});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var s=a.agentStubMap,l=a.agentStubMap=Object(o["f"])(),u=e.seriesType,c=e.getTargetSeries,d=!0,f=!1,h="";function p(e){var t=e.uid,n=l.set(t,s&&s.get(t)||(f=!0,Object(He["a"])({reset:We,onDirty:Ke})));n.context={model:e,overallProgress:d},n.agent=a,n.__block=d,i._pipe(e,n)}Object(o["b"])(!e.createOnAllSeries,h),u?n.eachRawSeriesByType(u,p):c?c(n,r).each(p):(d=!1,Object(o["k"])(n.getSeries(),p)),f&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return Object(o["w"])(e)&&(e={overallReset:e,seriesType:et(e)}),e.uid=Object(Ve["c"])("stageHandler"),t&&(e.visualType=t),e},e}();function qe(e){e.overallReset(e.ecModel,e.api,e.payload)}function We(e){return e.overallProgress&&Ye}function Ye(){this.agent.dirty(),this.getDownstream().dirty()}function Ke(){this.agent&&this.agent.dirty()}function Xe(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Ze(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Object(u["r"])(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Object(o["H"])(t,(function(e,t){return Je(t)})):$e}var $e=Je(0);function Je(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,o=!0)}}s.hasOwnProperty(i)&&(n[i]=e,o=!0),o||(r[i]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),vt=["symbol","symbolSize","symbolRotate","symbolOffset"],yt=vt.concat(["symbolKeepAspect"]),mt={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},i={},a=!1,s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[Xt])if(this._disposed)Mn(this.id);else{var r,i,a;if(Object(o["A"])(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[Xt]=!0,!this._model||t){var s=new U(this._api),l=this._theme,u=this._model=new M;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(e,{replaceMerge:i},jn);var c={seriesTransition:a,optionChanged:!0};if(n)this[Zt]={silent:r,updateParams:c},this[Xt]=!1,this.getZr().wakeUp();else{try{sn(this),cn.update.call(this,null,c)}catch(d){throw this[Zt]=null,this[Xt]=!1,d}this._ssr||this._zr.flush(),this[Zt]=null,this[Xt]=!1,pn.call(this,r),gn.call(this,r)}}},t.prototype.setTheme=function(){Object(_["a"])("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Lt&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var t=this._zr.painter;return t.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var t=this._zr.painter;return t.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(a["a"].svgSupported){var e=this._zr,t=e.storage.getDisplayList();return Object(o["k"])(t,(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){e=e||{};var t=e.excludeComponents,n=this._model,r=[],i=this;Object(o["k"])(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return Object(o["k"])(r,(function(e){e.group.ignore=!1})),a}Mn(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,a=Math.max,s=1/0;if(Fn[n]){var l=s,u=s,c=-s,d=-s,f=[],h=e&&e.pixelRatio||this.getDevicePixelRatio();Object(o["k"])(Bn,(function(i,s){if(i.group===n){var h=t?i.getZr().painter.getSvgDom().innerHTML:i.renderToCanvas(Object(o["d"])(e)),p=i.getDom().getBoundingClientRect();l=r(p.left,l),u=r(p.top,u),c=a(p.right,c),d=a(p.bottom,d),f.push({dom:h,left:p.left,top:p.top})}})),l*=h,u*=h,c*=h,d*=h;var p=c-l,g=d-u,v=At["d"].createCanvas(),y=i["a"](v,{renderer:t?"svg":"canvas"});if(y.resize({width:p,height:g}),t){var m="";return Object(o["k"])(f,(function(e){var t=e.left-l,n=e.top-u;m+=''+e.dom+""})),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return e.connectedBackgroundColor&&y.add(new me["a"]({shape:{x:0,y:0,width:p,height:g},style:{fill:e.connectedBackgroundColor}})),Object(o["k"])(f,(function(e){var t=new be["a"]({style:{x:e.left*h-l,y:e.top*h-u,image:e.dom}});y.add(t)})),y.refreshImmediately(),v.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}Mn(this.id)},t.prototype.convertToPixel=function(e,t){return dn(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return dn(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){if(!this._disposed){var n,r=this._model,i=u["s"](r,e);return Object(o["k"])(i,(function(e,r){r.indexOf("Models")>=0&&Object(o["k"])(e,(function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}else 0}),this)}),this),!!n}Mn(this.id)},t.prototype.getVisual=function(e,t){var n=this._model,r=u["s"](n,e,{defaultMainType:"series"}),i=r.seriesModel;var o=i.getData(),a=r.hasOwnProperty("dataIndexInside")?r.dataIndexInside:r.hasOwnProperty("dataIndex")?o.indexOfRawIndex(r.dataIndex):null;return null!=a?Object(xt["a"])(o,a,t):Object(xt["b"])(o,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;Object(o["k"])(An,(function(t){var n=function(n){var r,i=e.getModel(),a=n.target,s="globalout"===t;if(s?r={}:a&&Object(kt["a"])(a,(function(e){var t=Object(we["a"])(e);if(t&&null!=t.dataIndex){var n=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return r=n&&n.getDataParams(t.dataIndex,t.dataType)||{},!0}if(t.eventData)return r=Object(o["m"])({},t.eventData),!0}),!0),r){var l=r.componentType,u=r.componentIndex;"markLine"!==l&&"markPoint"!==l&&"markArea"!==l||(l="series",u=r.seriesIndex);var c=l&&null!=u&&i.getComponent(l,u),d=c&&e["series"===c.mainType?"_chartsMap":"_componentsMap"][c.__viewId];0,r.event=n,r.type=t,e._$eventProcessor.eventInfo={targetEl:a,packedEvent:r,model:c,view:d},e.trigger(t,r)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)})),Object(o["k"])(In,(function(t,n){e._messageCenter.on(n,(function(e){this.trigger(n,e)}),e)})),Object(o["k"])(["selectchanged"],(function(t){e._messageCenter.on(t,(function(e){this.trigger(t,e)}),e)})),Object(_t["b"])(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?Mn(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)Mn(this.id);else{this._disposed=!0;var e=this.getDom();e&&u["w"](this.getDom(),Un,"");var t=this,n=t._api,r=t._model;Object(o["k"])(t._componentsViews,(function(e){e.dispose(r,n)})),Object(o["k"])(t._chartsViews,(function(e){e.dispose(r,n)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete Bn[t.id]}},t.prototype.resize=function(e){if(!this[Xt])if(this._disposed)Mn(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[Zt]&&(null==r&&(r=this[Zt].silent),n=!0,this[Zt]=null),this[Xt]=!0;try{n&&sn(this),cn.update.call(this,{type:"resize",animation:Object(o["m"])({duration:0},e&&e.animation)})}catch(i){throw this[Xt]=!1,i}this[Xt]=!1,pn.call(this,r),gn.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)Mn(this.id);else if(Object(o["A"])(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),Nn[e]){var n=Nn[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?Mn(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=Object(o["m"])({},e);return t.type=In[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)Mn(this.id);else if(Object(o["A"])(t)||(t={silent:!!t}),Ln[e.type]&&this._model)if(this[Xt])this._pendingActions.push(e);else{var n=t.silent;hn.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&a["a"].browser.weChat&&this._throttledZrFlush(),pn.call(this,n),gn.call(this,n)}},t.prototype.updateLabelLayout=function(){Ct.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)Mn(this.id);else{var t=e.seriesIndex,n=this.getModel(),r=n.getSeriesByIndex(t);0,r.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){var t=[],n=[],r=!1;if(e.eachComponent((function(e,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:i.componentIndex,type:e,key:s})})),r){var i,a,l=t.concat(n);Object(s["a"])(l,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),Object(o["k"])(l,(function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,o=t.key;null!=i&&(r=Math.max(i,r)),o?(r===i&&o!==a&&r++,a=o):a&&(r===i&&r++,a=""),i=r,n.setZLevel(r)}))}}function n(e){for(var t=[],n=e.currentStates,r=0;rt.get("hoverLayerThreshold")&&!a["a"].node&&!a["a"].worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}function l(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}function c(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,r=e.get("zlevel")||0;t.eachRendered((function(e){return d(e,n,r,-1/0),!0}))}}function d(e,t,n,r){var i=e.getTextContent(),o=e.getTextGuideLine(),a=e.isGroup;if(a)for(var s=e.childrenRef(),l=0;l0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;t.eachRendered((function(e){if(e.states&&e.states.emphasis){if(xe["d"](e))return;if(e instanceof _e["b"]&&Object(Se["E"])(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=a;var r=e.getTextContent(),o=e.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&n(e)}}))}sn=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),ln(e,!0),ln(e,!1),t.plan()},ln=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l=0)){er.push(n);var a=ot.wrapStageHandler(n,i);a.__prio=t,a.__raw=n,e.push(a)}}function nr(e,t){Nn[e]=t}function rr(e,t,n){var r=Object(Mt["a"])("registerMap");r&&r(e,t,n)}var ir=wt["b"];Qn(zt,De),Qn(Vt,Pe),Qn(Vt,Re),Qn(zt,mt),Qn(Vt,bt),Qn(Yt,Tt),qn(de),Wn(jt,he),nr("default",Ue),Zn({type:Se["c"],event:Se["c"],update:Se["c"]},o["L"]),Zn({type:Se["b"],event:Se["b"],update:Se["b"]},o["L"]),Zn({type:Se["f"],event:Se["f"],update:Se["f"]},o["L"]),Zn({type:Se["i"],event:Se["i"],update:Se["i"]},o["L"]),Zn({type:Se["h"],event:Se["h"],update:Se["h"]},o["L"]),Gn("light",st),Gn("dark",ht)},"1e3c":function(e,t,n){"use strict";n("2a44")},"1f39":function(e,t,n){"use strict";var r=n("6d8b"),i={},o=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];r["k"](i,(function(r,i){var o=r.create(e,t);n=n.concat(o||[])})),this._coordinateSystems=n},e.prototype.update=function(e,t){r["k"](this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){i[e]=t},e.get=function(e){return i[e]},e}();t["a"]=o},"20c8":function(e,t,n){"use strict";n.d(t,"b",(function(){return O}));var r=n("401b"),i=n("9850"),o=n("2cf4c"),a=n("e263"),s=n("4a3f"),l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},u=[],c=[],d=[],f=[],h=[],p=[],g=Math.min,v=Math.max,y=Math.cos,m=Math.sin,b=Math.abs,x=Math.PI,_=2*x,w="undefined"!==typeof Float32Array,S=[];function k(e){var t=Math.round(e/x*1e8)/1e8;return t%2*x}function O(e,t){var n=k(e[0]);n<0&&(n+=_);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=_?i=n+_:t&&n-i>=_?i=n-_:!t&&n>i?i=n+(_-k(n-i)):t&&n0&&(this._ux=b(n/o["e"]/e)||0,this._uy=b(n/o["e"]/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(l.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=b(e-this._xi),r=b(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(l.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData(l.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(l.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),S[0]=r,S[1]=i,O(S,o),r=S[0],i=S[1];var a=i-r;return this.addData(l.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=y(i)*n+e,this._yi=m(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(l.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(l.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!w||(this.data=new Float32Array(t));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){d[0]=d[1]=h[0]=h[1]=Number.MAX_VALUE,f[0]=f[1]=p[0]=p[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,o=0,s=0,u=0;for(e=0;en||b(T)>r||h===t-1)&&(w=Math.sqrt(O*O+T*T),i=S,o=k);break;case l.C:var E=e[h++],C=e[h++],A=(S=e[h++],k=e[h++],e[h++]),M=e[h++];w=Object(s["d"])(i,o,E,C,S,k,A,M,10),i=A,o=M;break;case l.Q:E=e[h++],C=e[h++],S=e[h++],k=e[h++];w=Object(s["k"])(i,o,E,C,S,k,10),i=S,o=k;break;case l.A:var L=e[h++],I=e[h++],D=e[h++],j=e[h++],P=e[h++],R=e[h++],N=R+P;h+=1;e[h++];x&&(a=y(P)*D+L,u=m(P)*j+I),w=v(D,j)*g(_,Math.abs(R)),i=y(N)*D+L,o=m(N)*j+I;break;case l.R:a=i=e[h++],u=o=e[h++];var B=e[h++],F=e[h++];w=2*B+2*F;break;case l.Z:O=a-i,T=u-o;w=Math.sqrt(O*O+T*T),i=a,o=u;break}w>=0&&(c[f++]=w,d+=w)}return this._pathLen=d,d},e.prototype.rebuildPath=function(e,t){var n,r,i,o,a,d,f,h,p,x,_,w=this.data,S=this._ux,k=this._uy,O=this._len,T=t<1,E=0,C=0,A=0;if(!T||(this._pathSegLen||this._calculateLength(),f=this._pathSegLen,h=this._pathLen,p=t*h,p))e:for(var M=0;M0&&(e.lineTo(x,_),A=0),L){case l.M:n=i=w[M++],r=o=w[M++],e.moveTo(i,o);break;case l.L:a=w[M++],d=w[M++];var D=b(a-i),j=b(d-o);if(D>S||j>k){if(T){var P=f[C++];if(E+P>p){var R=(p-E)/P;e.lineTo(i*(1-R)+a*R,o*(1-R)+d*R);break e}E+=P}e.lineTo(a,d),i=a,o=d,A=0}else{var N=D*D+j*j;N>A&&(x=a,_=d,A=N)}break;case l.C:var B=w[M++],F=w[M++],z=w[M++],U=w[M++],H=w[M++],V=w[M++];if(T){P=f[C++];if(E+P>p){R=(p-E)/P;Object(s["g"])(i,B,z,H,R,u),Object(s["g"])(o,F,U,V,R,c),e.bezierCurveTo(u[1],c[1],u[2],c[2],u[3],c[3]);break e}E+=P}e.bezierCurveTo(B,F,z,U,H,V),i=H,o=V;break;case l.Q:B=w[M++],F=w[M++],z=w[M++],U=w[M++];if(T){P=f[C++];if(E+P>p){R=(p-E)/P;Object(s["n"])(i,B,z,R,u),Object(s["n"])(o,F,U,R,c),e.quadraticCurveTo(u[1],c[1],u[2],c[2]);break e}E+=P}e.quadraticCurveTo(B,F,z,U),i=z,o=U;break;case l.A:var G=w[M++],q=w[M++],W=w[M++],Y=w[M++],K=w[M++],X=w[M++],Z=w[M++],$=!w[M++],J=W>Y?W:Y,Q=b(W-Y)>.001,ee=K+X,te=!1;if(T){P=f[C++];E+P>p&&(ee=K+X*(p-E)/P,te=!0),E+=P}if(Q&&e.ellipse?e.ellipse(G,q,W,Y,Z,K,ee,$):e.arc(G,q,J,K,ee,$),te)break e;I&&(n=y(K)*W+G,r=m(K)*Y+q),i=y(ee)*W+G,o=m(ee)*Y+q;break;case l.R:n=i=w[M],r=o=w[M+1],a=w[M++],d=w[M++];var ne=w[M++],re=w[M++];if(T){P=f[C++];if(E+P>p){var ie=p-E;e.moveTo(a,d),e.lineTo(a+g(ie,ne),d),ie-=ne,ie>0&&e.lineTo(a+ne,d+g(ie,re)),ie-=re,ie>0&&e.lineTo(a+v(ne-ie,0),d+re),ie-=ne,ie>0&&e.lineTo(a,d+v(re-ie,0));break e}E+=P}e.rect(a,d,ne,re);break;case l.Z:if(T){P=f[C++];if(E+P>p){R=(p-E)/P;e.lineTo(i*(1-R)+n*R,o*(1-R)+r*R);break e}E+=P}e.closePath(),i=n,o=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=l,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();t["a"]=T},"217c":function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return y})),n.d(t,"e",(function(){return k})),n.d(t,"d",(function(){return O})),n.d(t,"a",(function(){return T}));var r=n("eda2"),i=n("6d8b"),o=n("b7d9"),a=n("3842"),s="line-height:1";function l(e,t){var n=e.color||"#6e7079",i=e.fontSize||12,o=e.fontWeight||"400",a=e.color||"#464646",s=e.fontSize||14,l=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+Object(r["c"])(i+"")+"px;color:"+Object(r["c"])(n)+";font-weight:"+Object(r["c"])(o+""),valueStyle:"font-size:"+Object(r["c"])(s+"")+"px;color:"+Object(r["c"])(a)+";font-weight:"+Object(r["c"])(l+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:o},valueStyle:{fontSize:s,fill:a,fontWeight:l}}}var u=[0,10,20,30],c=["","\n","\n\n","\n\n\n"];function d(e,t){return t.type=e,t}function f(e){return"section"===e.type}function h(e){return f(e)?g:v}function p(e){if(f(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return Object(i["k"])(e.blocks,(function(e){var n=p(e);n>=t&&(t=n+ +(r&&(!n||f(e)&&!e.noHeader)))})),t}return 0}function g(e,t,n,a){var u=t.noHeader,c=m(p(t)),d=[],f=t.blocks||[];Object(i["b"])(!f||Object(i["t"])(f)),f=f||[];var g=e.orderMode;if(t.sortBlocks&&g){f=f.slice();var v={valueAsc:"asc",valueDesc:"desc"};if(Object(i["q"])(v,g)){var y=new o["a"](v[g],null);f.sort((function(e,t){return y.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===g&&f.reverse()}Object(i["k"])(f,(function(n,r){var o=t.valueFormatter,s=h(n)(o?Object(i["m"])(Object(i["m"])({},e),{valueFormatter:o}):e,n,r>0?c.html:0,a);null!=s&&d.push(s)}));var x="richText"===e.renderMode?d.join(c.richText):b(d.join(""),u?n:c.html);if(u)return x;var _=Object(r["g"])(t.header,"ordinal",e.useUTC),S=l(a,e.renderMode).nameStyle;return"richText"===e.renderMode?w(e,_,S)+c.richText+x:b('
'+Object(r["c"])(_)+"
"+x,n)}function v(e,t,n,o){var a=e.renderMode,s=t.noName,u=t.noValue,c=!t.markerType,d=t.name,f=e.useUTC,h=t.valueFormatter||e.valueFormatter||function(e){return e=Object(i["t"])(e)?e:[e],Object(i["H"])(e,(function(e,t){return Object(r["g"])(e,Object(i["t"])(v)?v[t]:v,f)}))};if(!s||!u){var p=c?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",a),g=s?"":Object(r["g"])(d,"ordinal",f),v=t.valueType,y=u?[]:h(t.value),m=!c||!s,k=!c&&s,O=l(o,a),T=O.nameStyle,E=O.valueStyle;return"richText"===a?(c?"":p)+(s?"":w(e,g,T))+(u?"":S(e,y,m,k,E)):b((c?"":p)+(s?"":x(g,!c,T))+(u?"":_(y,m,k,E)),n)}}function y(e,t,n,r,i,o){if(e){var a=h(e),s={useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter};return a(s,e,0,o)}}function m(e){return{html:u[e],richText:c[e]}}function b(e,t){var n='
',r="margin: "+t+"px 0 0";return'
'+e+n+"
"}function x(e,t,n){var i=t?"margin-left:2px":"";return''+Object(r["c"])(e)+""}function _(e,t,n,o){var a=n?"10px":"20px",s=t?"float:right;margin-left:"+a:"";return e=Object(i["t"])(e)?e:[e],''+Object(i["H"])(e,(function(e){return Object(r["c"])(e)})).join("  ")+""}function w(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function S(e,t,n,r,o){var a=[o],s=r?10:20;return n&&a.push({padding:[0,0,0,s],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Object(i["t"])(t)?t.join(" "):t,a)}function k(e,t){var n=e.getData().getItemVisual(t,"style"),i=n[e.visualDrawType];return Object(r["b"])(i)}function O(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var T=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Object(a["h"])()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var o="richText"===n?this._generateStyleName():null,a=Object(r["f"])({color:t,type:e,renderMode:n,markerId:o});return Object(i["C"])(a)?a:(this.richTextStyles[o]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};Object(i["t"])(t)?Object(i["k"])(t,(function(e){return Object(i["m"])(n,e)})):Object(i["m"])(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}()},"22b4":function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n("1be7"),i=n("b12f"),o=n("e887"),a=n("6cb7"),s=n("4f85"),l=n("6d8b"),u=n("58c9"),c=n("697e"),d=[],f={registerPreprocessor:r["j"],registerProcessor:r["k"],registerPostInit:r["h"],registerPostUpdate:r["i"],registerUpdateLifecycle:r["m"],registerAction:r["c"],registerCoordinateSystem:r["d"],registerLayout:r["e"],registerVisual:r["n"],registerTransform:r["l"],registerLoading:r["f"],registerMap:r["g"],registerImpl:u["b"],PRIORITY:r["a"],ComponentModel:a["a"],ComponentView:i["a"],SeriesModel:s["b"],ChartView:o["a"],registerComponentModel:function(e){a["a"].registerClass(e)},registerComponentView:function(e){i["a"].registerClass(e)},registerSeriesModel:function(e){s["b"].registerClass(e)},registerChartView:function(e){o["a"].registerClass(e)},registerSubTypeDefaulter:function(e,t){a["a"].registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Object(c["b"])(e,t)}};function h(e){Object(l["t"])(e)?Object(l["k"])(e,(function(e){h(e)})):Object(l["r"])(d,e)>=0||(d.push(e),Object(l["w"])(e)&&(e={install:e}),e.install(f))}},"22d1":function(e,t,n){"use strict";var r=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),i=function(){function e(){this.browser=new r,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!==typeof window}return e}(),o=new i;function a(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),o=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18),a&&(n.weChat=!0),t.svgSupported="undefined"!==typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!==typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}"object"===typeof wx&&"function"===typeof wx.getSystemInfoSync?(o.wxa=!0,o.touchEventsSupported=!0):"undefined"===typeof document&&"undefined"!==typeof self?o.worker=!0:"undefined"===typeof navigator?(o.node=!0,o.svgSupported=!0):a(navigator.userAgent,o),t["a"]=o},2306:function(e,t,n){"use strict";n.r(t),n.d(t,"updateProps",(function(){return P["h"]})),n.d(t,"initProps",(function(){return P["c"]})),n.d(t,"removeElement",(function(){return P["e"]})),n.d(t,"removeElementWithFadeOut",(function(){return P["f"]})),n.d(t,"isElementRemoved",(function(){return P["d"]})),n.d(t,"extendShape",(function(){return F})),n.d(t,"extendPath",(function(){return U})),n.d(t,"registerShape",(function(){return H})),n.d(t,"getShapeClass",(function(){return V})),n.d(t,"makePath",(function(){return G})),n.d(t,"makeImage",(function(){return q})),n.d(t,"mergePath",(function(){return Y})),n.d(t,"resizePath",(function(){return K})),n.d(t,"subPixelOptimizeLine",(function(){return X})),n.d(t,"subPixelOptimizeRect",(function(){return Z})),n.d(t,"subPixelOptimize",(function(){return $})),n.d(t,"getTransform",(function(){return J})),n.d(t,"applyTransform",(function(){return Q})),n.d(t,"transformDirection",(function(){return ee})),n.d(t,"groupTransition",(function(){return re})),n.d(t,"clipPointsByRect",(function(){return ie})),n.d(t,"clipRectByRect",(function(){return oe})),n.d(t,"createIcon",(function(){return ae})),n.d(t,"linePolygonIntersect",(function(){return se})),n.d(t,"lineLineIntersect",(function(){return le})),n.d(t,"setTooltipConfig",(function(){return de})),n.d(t,"traverseElements",(function(){return he})),n.d(t,"Group",(function(){return u["a"]})),n.d(t,"Image",(function(){return l["a"]})),n.d(t,"Text",(function(){return c["a"]})),n.d(t,"Circle",(function(){return d["a"]})),n.d(t,"Ellipse",(function(){return f["a"]})),n.d(t,"Sector",(function(){return h["a"]})),n.d(t,"Ring",(function(){return p["a"]})),n.d(t,"Polygon",(function(){return g["a"]})),n.d(t,"Polyline",(function(){return v["a"]})),n.d(t,"Rect",(function(){return y["a"]})),n.d(t,"Line",(function(){return m["a"]})),n.d(t,"BezierCurve",(function(){return b["a"]})),n.d(t,"Arc",(function(){return x["a"]})),n.d(t,"IncrementalDisplayable",(function(){return L})),n.d(t,"CompoundPath",(function(){return _["a"]})),n.d(t,"LinearGradient",(function(){return w["a"]})),n.d(t,"RadialGradient",(function(){return S["a"]})),n.d(t,"BoundingRect",(function(){return k["a"]})),n.d(t,"OrientedBoundingRect",(function(){return O["a"]})),n.d(t,"Point",(function(){return T["a"]})),n.d(t,"Path",(function(){return a["b"]}));var r=n("342d"),i=n("1687"),o=n("401b"),a=n("cbe5"),s=n("8582"),l=n("0da8"),u=n("2dc5"),c=n("76a5"),d=n("d9fc"),f=n("ae69"),h=n("4aa2"),p=n("4573"),g=n("87b1"),v=n("d498"),y=n("c7a2"),m=n("cb11"),b=n("ac0f"),x=n("8d32"),_=n("d4c6"),w=n("48a9"),S=n("dded"),k=n("9850"),O=n("ca80"),T=n("dce8"),E=n("9ab4"),C=n("19eb"),A=[],M=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return Object(E["a"])(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;nMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function te(e){return!e.isGroup}function ne(e){return null!=e.shape}function re(e,t,n){if(e&&t){var r=i(e);t.traverse((function(e){if(te(e)&&e.anid){var t=r[e.anid];if(t){var i=o(e);e.attr(o(t)),Object(P["h"])(e,i,n,Object(j["a"])(e).dataIndex)}}}))}function i(e){var t={};return e.traverse((function(e){te(e)&&e.anid&&(t[e.anid]=e)})),t}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return ne(e)&&(t.shape=Object(D["m"])({},e.shape)),t}}function ie(e,t){return Object(D["H"])(e,(function(e){var n=e[0];n=R(n,t.x),n=N(n,t.x+t.width);var r=e[1];return r=R(r,t.y),r=N(r,t.y+t.height),[n,r]}))}function oe(e,t){var n=R(e.x,t.x),r=N(e.x+e.width,t.x+t.width),i=R(e.y,t.y),o=N(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}}function ae(e,t,n){var r=Object(D["m"])({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),Object(D["i"])(i,n),new l["a"](r)):G(e.replace("path://",""),r,n,"center")}function se(e,t,n,r,i){for(var o=0,a=i[i.length-1];o1)return!1;var v=ue(h,p,c,d)/f;return!(v<0||v>1)}function ue(e,t,n,r){return e*r-n*t}function ce(e){return e<=1e-6&&e>=-1e-6}function de(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=Object(D["C"])(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&Object(D["k"])(Object(D["F"])(l),(function(e){Object(D["q"])(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=Object(j["a"])(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:Object(D["i"])({content:r,formatterParams:s},i)}}function fe(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function he(e,t){if(e)if(Object(D["t"])(e))for(var n=0;n0&&o&&w(-d/a,0,a);var v,y,m=e[0],b=e[a-1];return x(),v<0&&S(-v,.8),y<0&&S(y,.8),x(),_(v,y,1),_(y,v,-1),x(),v<0&&k(-v),y<0&&k(y),u}function x(){v=m.rect[t]-r,y=i-b.rect[t]-b.rect[n]}function _(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){w(r*n,0,a);var i=r+e;i<0&&S(-i*n,1)}else S(-e*n,1)}}function w(n,r,i){0!==n&&(u=!0);for(var o=r;o0)for(l=0;l0;l--){f=o[l-1]*d;w(-f,l,a)}}}function k(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?w(n,0,r+1):w(-n,a-r-1,a),e-=n,e<=0)return}}function s(e,t,n,r){return a(e,"x","width",t,n,r)}function l(e,t,n,r){return a(e,"y","height",t,n,r)}function u(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new i["a"](0,0,0,0);function o(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var a=0;a=0||o&&r["r"](o,l)<0)){var u=n.getShallow(l,t);null!=u&&(a[e[s][0]]=u)}}return a}}},"29f3":function(e,t){var n=Object.prototype,r=n.toString;function i(e){return r.call(e)}e.exports=i},"2a44":function(e,t,n){},"2b17":function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return g})),n.d(t,"b",(function(){return m})),n.d(t,"d",(function(){return _})),n.d(t,"e",(function(){return S}));var r,i,o,a,s,l=n("6d8b"),u=n("e0d3"),c=n("ec6f"),d=n("07fd"),f=function(){function e(e,t){var n=Object(c["e"])(e)?e:Object(c["c"])(e);this._source=n;var r=this._data=n.data;n.sourceFormat===d["g"]&&(this._offset=0,this._dimSize=t,this._data=r),s(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;s=function(e,i,o){var s=o.sourceFormat,u=o.seriesLayoutBy,c=o.startIndex,f=o.dimensionsDefine,h=a[w(s,u)];if(Object(l["m"])(e,h),s===d["g"])e.getItem=t,e.count=r,e.fillStorage=n;else{var p=g(s,u);e.getItem=Object(l["c"])(p,null,i,c,f);var v=m(s,u);e.count=Object(l["c"])(v,null,i,c,f)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;ou&&(u=h)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=i["r"](this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=i["r"](n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n=h:-u>=h),m=u>0?u%h:u%h+h,b=!1;b=!!y||!Object(o["j"])(v)&&m>=f===!!g;var x=e+n*d(a),_=t+r*c(a);this._start&&this._add("M",x,_);var w=Math.round(i*p);if(y){var S=1/this._p,k=(g?1:-1)*(h-S);this._add("A",n,r,w,1,+g,e+n*d(a+k),t+r*c(a+k)),S>.01&&this._add("A",n,r,w,0,+g,x,_)}else{var O=e+n*d(s),T=t+r*c(s);this._add("A",n,r,w,+b,+g,O,T)}},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,i,o,a,s,l){for(var u=[],c=this._p,d=1;d"}function D(e){return""}function j(e,t){t=t||{};var n=t.newline?"\n":"";function r(e){var t=e.children,i=e.tag,o=e.attrs;return I(i,o)+(e.text||"")+(t?""+n+Object(m["H"])(t,(function(e){return r(e)})).join(n)+n:"")+D(i)}return r(e)}function P(e,t,n){n=n||{};var r=n.newline?"\n":"",i=" {"+r,o=r+"}",a=Object(m["H"])(Object(m["F"])(e),(function(t){return t+i+Object(m["H"])(Object(m["F"])(e[t]),(function(n){return n+":"+e[t][n]+";"})).join(r)+o})).join(r),s=Object(m["H"])(Object(m["F"])(t),(function(e){return"@keyframes "+e+i+Object(m["H"])(Object(m["F"])(t[e]),(function(n){return n+i+Object(m["H"])(Object(m["F"])(t[e][n]),(function(r){var i=t[e][n][r];return"d"===r&&(i='path("'+i+'")'),r+":"+i+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?[""].join(r):""}function R(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function N(e,t,n,r){return L("svg","root",{width:e,height:t,xmlns:T,"xmlns:xlink":E,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var B=n("5e76"),F=n("8582"),z=n("20c8"),U=n("d4c6"),H=n("b362"),V={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},G="transform-origin";function q(e,t,n){var r=Object(m["m"])({},e.shape);Object(m["m"])(r,t),e.buildPath(n,r);var i=new v;return i.reset(Object(o["f"])(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function W(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[G]=n+"px "+r+"px")}var Y={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function K(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function X(e,t,n){var r,i,o=e.shape.paths,a={};if(Object(m["k"])(o,(function(e){var t=R(n.zrId);t.animation=!0,$(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=Object(m["F"])(o),u=l.length;if(u){i=l[u-1];var c=o[i];for(var d in c){var f=c[d];a[d]=a[d]||{d:""},a[d].d+=f.d||""}for(var h in s){var p=s[h].animation;p.indexOf(i)>=0&&(r=p)}}})),r){t.d=!1;var s=K(a,n);return r.replace(i,s)}}function Z(e){return Object(m["C"])(e)?V[e]?"cubic-bezier("+V[e]+")":Object(H["a"])(e)?e:"":""}function $(e,t,n,r){var i=e.animators,a=i.length,s=[];if(e instanceof U["a"]){var l=X(e,t,n);if(l)s.push(l);else if(!a)return}else if(!a)return;for(var u={},c=0;c0})).length){var L=K(d,n);return L+" "+i[0]+" both"}}for(var y in u){l=v(u[y]);l&&s.push(l)}if(s.length){var b=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+b]={animation:s.join(",")},t["class"]=b}}var J=n("76a5"),Q=n("726e"),ee=Math.round;function te(e){return e&&Object(m["C"])(e.src)}function ne(e){return e&&Object(m["w"])(e.toDataURL)}function re(e,t,n,r){O((function(i,a){var s="fill"===i||"stroke"===i;s&&Object(o["k"])(a)?ye(t,e,i,r):s&&Object(o["n"])(a)?me(n,e,i,r):e[i]=a}),t,n,!1),ve(n,e,r)}function ie(e){return Object(o["j"])(e[0]-1)&&Object(o["j"])(e[1])&&Object(o["j"])(e[2])&&Object(o["j"])(e[3]-1)}function oe(e){return Object(o["j"])(e[4])&&Object(o["j"])(e[5])}function ae(e,t,n){if(t&&(!oe(t)||!ie(t))){var r=n?10:1e4;e.transform=ie(t)?"translate("+ee(t[4]*r)/r+" "+ee(t[5]*r)/r+")":Object(o["e"])(t)}}function se(e,t,n){for(var r=e.points,i=[],o=0;ou?(a=null==n[f+1]?null:n[f+1].elm,Pe(e,a,n,l,f)):Re(e,t,s,u))}function Fe(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(Ne(e,t),Me(t.text)?Le(r)&&Le(i)?r!==i&&Be(n,r,i):Le(i)?(Le(e.text)&&Te(n,""),Pe(n,null,i,0,i.length-1)):Le(r)?Re(n,r,0,r.length-1):Le(e.text)&&Te(n,""):e.text!==t.text&&(Le(r)&&Re(n,r,0,r.length-1),Te(n,t.text)))}function ze(e,t){if(De(e,t))Fe(e,t);else{var n=e.elm,r=ke(n);je(t),null!==r&&(_e(r,t.elm,Oe(n)),Re(r,[e],0,0))}return t}var Ue=n("3437"),He=0,Ve=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=Ge("refreshHover"),this.configLayer=Ge("configLayer"),this.storage=t,this._opts=n=Object(m["m"])({},n),this.root=e,this._id="zr"+He++,this._oldVNode=N(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=M("svg");Ne(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",ze(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return ge(e,R(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._backgroundColor,r=this._width,i=this._height,a=R(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress;var s=[];if(n&&"none"!==n){var l=Object(o["p"])(n),u=l.color,c=l.opacity;this._bgVNode=L("rect","bg",{width:r,height:i,x:"0",y:"0",id:"0",fill:u,"fill-opacity":c}),s.push(this._bgVNode)}else this._bgVNode=null;var d=e.compress?null:this._mainVNode=L("g","main",{},[]);this._paintList(t,a,d?d.children:s),d&&s.push(d);var f=Object(m["H"])(Object(m["F"])(a.defs),(function(e){return a.defs[e]}));if(f.length&&s.push(L("defs","defs",{},f)),e.animation){var h=P(a.cssNodes,a.cssAnims,{newline:!0});if(h){var p=L("style","stl",{},[],h);s.push(p)}}return N(r,i,s,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},j(this.renderToVNode({animation:Object(m["P"])(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Object(m["P"])(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e;var t=this._bgVNode;if(t&&t.elm){var n=Object(o["p"])(e),r=n.color,i=n.opacity;t.elm.setAttribute("fill",r),i<1&&t.elm.setAttribute("fill-opacity",i)}},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r,i,o=e.length,a=[],s=0,l=0,u=0;u=0;p--)if(d&&i&&d[p]===i[p])break;for(var g=h-1;g>p;g--)s--,r=a[s-1];for(var v=p+1;v1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var f=0;f1)for(var a=0;a30}var bt,xt,_t,wt,St,kt,Ot,Tt=m["A"],Et=m["H"],Ct="undefined"===typeof Int32Array?Array:Int32Array,At="e\0\0",Mt=-1,Lt=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],It=["_approximateExtent"],Dt=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;gt(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u=t)){var n=this._store,r=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,a=r.getSource().sourceFormat,s=a===et["f"];if(s&&!r.pure)for(var l=[],u=e;u0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(i=this.getVisual(t),m["t"](i)?i=i.slice():Tt(i)&&(i=m["m"]({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Tt(t)?m["m"](r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Tt(e)?m["m"](this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?m["m"](this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;Object(ut["b"])(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){m["k"](this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Et(this.dimensions,this._getDimInfo,this),this.hostModel)),St(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];m["w"](n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(m["S"](arguments)))})},e.internalField=function(){bt=function(e){var t=e._invertedIndicesMap;m["k"](t,(function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new Ct(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),r[t]=s}}}(),e}(),jt=Dt,Pt=n("0f99");function Rt(e,t){Object(ct["e"])(e)||(e=Object(ct["c"])(e)),t=t||{};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Object(m["f"])(),o=[],a=Bt(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&mt(a),l=r===e.dimensionsDefine,u=l?yt(e):vt(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Object(m["f"])(c),f=new dt["a"](a),h=0;h0&&(r.name=i+(o-1)),o++,t.set(i,o)}}function Bt(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return Object(m["k"])(t,(function(e){var t;Object(m["A"])(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))})),i}function Ft(e,t,n){var r=t.data;if(n||r.hasOwnProperty(e)){var i=0;while(r.hasOwnProperty(e+i))i++;e+=i}return t.set(e,!0),e}var zt=n("1f39"),Ut=function(){function e(e){this.coordSysDims=[],this.axisMap=Object(m["f"])(),this.categoryAxisMap=Object(m["f"])(),this.coordSysName=e}return e}();function Ht(e){var t=e.get("coordinateSystem"),n=new Ut(t),r=Vt[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var Vt={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",lt["b"]).models[0],o=e.getReferringComponents("yAxis",lt["b"]).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),Gt(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),Gt(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",lt["b"]).models[0];t.coordSysDims=["single"],n.set("single",i),Gt(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",lt["b"]).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),Gt(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),Gt(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();Object(m["k"])(o.parallelAxisIndex,(function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),Gt(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))}))}};function Gt(e){return"category"===e.get("type")}function qt(e,t,n){n=n||{};var r,i,o,a=n.byIndex,s=n.stackedCoordDimension;Wt(t)?r=t:(i=t.schema,r=i.dimensions,o=t.store);var l,u,c,d,f=!(!e||!e.get("stack"));if(Object(m["k"])(r,(function(e,t){Object(m["C"])(e)&&(r[t]=e={name:e}),f&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,p=u.type,g=0;Object(m["k"])(r,(function(e){e.coordDim===h&&g++}));var v={name:c,coordDim:h,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},y={name:d,coordDim:d,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(v.storeDimIndex=o.ensureCalculationDimension(d,p),y.storeDimIndex=o.ensureCalculationDimension(c,p)),i.appendCalculationDimension(v),i.appendCalculationDimension(y)):(r.push(v),r.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function Wt(e){return!gt(e.schema)}function Yt(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function Kt(e,t){return Yt(e,t)?e.getCalculationInfo("stackResultDimension"):t}function Xt(e,t){var n,r=e.get("coordinateSystem"),i=zt["a"].get(r);return t&&t.coordSysDims&&(n=m["H"](t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var i=r.get("type");n.type=it(i)}return n}))),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function Zt(e,t,n){var r,i;return n&&m["k"](e,(function(e,o){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=o),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(i=!0)})),i||null==r||(e[r].otherDims.itemName=0),r}function $t(e,t,n){n=n||{};var r,i=t.getSourceManager(),o=!1;e?(o=!0,r=Object(ct["c"])(e)):(r=i.getSource(),o=r.sourceFormat===et["f"]);var a=Ht(t),s=Xt(t,a),l=n.useEncodeDefaulter,u=m["w"](l)?l:l?m["h"](Pt["c"],s,t):null,c={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o},d=Rt(r,c),f=Zt(d.dimensions,n.createInvertedIndices,a),h=o?null:i.getSharedDataStore(d),p=qt(t,{schema:d,store:h}),g=new jt(d,t);g.setCalculationInfo(p);var v=null!=f&&Jt(r)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return g.hasItemOption=!1,g.initData(o?r:h,null,v),g}function Jt(e){if(e.sourceFormat===et["f"]){var t=Qt(e.data||[]);return!m["t"](Object(lt["h"])(t))}}function Qt(e){var t=0;while(t-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(tn["b"]),an=on,sn=n("deab"),ln=n("2306"),un=n("7d6c");function cn(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=Object(Qe["e"])(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a=0&&r.push(t[o])}return r.join(" ")}var fn=n("7837"),hn=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return Object(Ye["a"])(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=Object(nn["a"])(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=pn,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Object(un["r"])(this.childAt(0))},t.prototype.downplay=function(){Object(un["C"])(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{var d=this.childAt(0);d.silent=!1;var f={scaleX:s[0]/2,scaleY:s[1]/2};u?d.attr(f):sn["h"](d,f,a,n),Object(sn["g"])(d)}if(this._updateCommon(e,n,s,r,i),l){d=this.childAt(0);if(!u){f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,sn["c"](d,f,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var o,a,l,u,c,d,f,h,p,g=this.childAt(0),v=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,c=r.blurScope,f=r.labelStatesModels,h=r.hoverScale,p=r.cursorStyle,d=r.emphasisDisabled),!r||e.hasItemOption){var y=r&&r.itemModel?r.itemModel:e.getItemModel(t),b=y.getModel("emphasis");o=b.getModel("itemStyle").getItemStyle(),l=y.getModel(["select","itemStyle"]).getItemStyle(),a=y.getModel(["blur","itemStyle"]).getItemStyle(),u=b.get("focus"),c=b.get("blurScope"),d=b.get("disabled"),f=Object(fn["e"])(y),h=b.getShallow("scale"),p=y.getShallow("cursor")}var x=e.getItemVisual(t,"symbolRotate");g.attr("rotation",(x||0)*Math.PI/180||0);var _=Object(nn["b"])(e.getItemVisual(t,"symbolOffset"),n);_&&(g.x=_[0],g.y=_[1]),p&&g.attr("cursor",p);var w=e.getItemVisual(t,"style"),S=w.fill;if(g instanceof s["a"]){var k=g.style;g.useStyle(Object(m["m"])({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},w))}else g.__isEmptyBrush?g.useStyle(Object(m["m"])({},w)):g.useStyle(w),g.style.decal=null,g.setColor(S,i&&i.symbolInnerColor),g.style.strokeNoScale=!0;var O=e.getItemVisual(t,"liftZ"),T=this._z2;null!=O?null==T&&(this._z2=g.z2,g.z2+=O):null!=T&&(g.z2=T,this._z2=null);var E=i&&i.useNameLabel;function C(t){return E?e.getName(t):cn(e,t)}Object(fn["g"])(g,f,{labelFetcher:v,labelDataIndex:t,defaultText:C,inheritColor:S,defaultOpacity:w.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var A=g.ensureState("emphasis");if(A.style=o,g.ensureState("select").style=l,g.ensureState("blur").style=a,h){var M=Math.max(Object(m["z"])(h)?h:1.1,3/this._sizeY);A.scaleX=this._sizeX*M,A.scaleY=this._sizeY*M}this.setSymbolScale(1),Object(un["J"])(this,u,c,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Object(ut["a"])(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&sn["e"](a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();sn["e"](r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return Object(nn["c"])(e.getItemVisual(t,"symbolSize"))},t}(rn["a"]);function pn(e,t){this.parent.drift(e,t)}var gn=hn;function vn(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function yn(e){return null==e||Object(m["A"])(e)||(e={isIgnore:e}),e||{}}function mn(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Object(fn["e"])(t),cursorStyle:t.get("cursor")}}var bn=function(){function e(e){this.group=new rn["a"],this._SymbolCtor=e||gn}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=yn(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=mn(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add((function(r){var i=u(r);if(vn(e,i,r,t)){var a=new o(e,r,s,l);a.setPosition(i),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var f=i.getItemGraphicEl(d),h=u(c);if(vn(e,h,c,t)){var p=e.getItemVisual(c,"symbol")||"circle",g=f&&f.getSymbolType&&f.getSymbolType();if(!f||g&&g!==p)n.remove(f),f=new o(e,c,s,l),f.setPosition(h);else{f.updateData(e,c,s,l);var v={x:h[0],y:h[1]};a?f.attr(v):sn["h"](f,v,r)}n.add(f),e.setItemGraphicEl(c,f)}else n.remove(f)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=mn(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=yn(n);for(var i=e.start;i0?n=r[0]:r[1]<0&&(n=r[1]),n}function Sn(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var kn="undefined"!==typeof Float32Array,On=kn?Float32Array:Array;function Tn(e){return Object(m["t"])(e)?kn?new Float32Array(e):e:new On(e)}function En(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}function Cn(e,t,n,r,i,o,a,s){for(var l=En(e,t),u=[],c=[],d=[],f=[],h=[],p=[],g=[],v=_n(i,t,a),y=e.getLayout("points")||[],m=t.getLayout("points")||[],b=0;b=i||g<0)break;if(Dn(y,m)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](y,m),d=y,f=m;else{var b=y-u,x=m-c;if(b*b+x*x<.5){g+=o;continue}if(a>0){var _=g+o,w=t[2*_],S=t[2*_+1];while(w===y&&S===m&&v=r||Dn(w,S))h=y,p=m;else{T=w-u,E=S-c;var M=y-u,L=w-y,I=m-c,D=S-m,j=void 0,P=void 0;if("x"===s){j=Math.abs(M),P=Math.abs(L);var R=T>0?1:-1;h=y-R*j*a,p=m,C=y+R*P*a,A=m}else if("y"===s){j=Math.abs(I),P=Math.abs(D);var N=E>0?1:-1;h=y,p=m-N*j*a,C=y,A=m+N*P*a}else j=Math.sqrt(M*M+I*I),P=Math.sqrt(L*L+D*D),O=P/(P+j),h=y-T*a*(1-O),p=m-E*a*(1-O),C=y+T*a*O,A=m+E*a*O,C=Ln(C,In(w,y)),A=Ln(A,In(S,m)),C=In(C,Ln(w,y)),A=In(A,Ln(S,m)),T=C-y,E=A-m,h=y-T*j/P,p=m-E*j/P,h=Ln(h,In(u,y)),p=Ln(p,In(c,m)),h=In(h,Ln(u,y)),p=In(p,Ln(c,m)),T=y-h,E=m-p,C=y+T*P/j,A=m+E*P/j}e.bezierCurveTo(d,f,h,p,y,m),d=C,f=A}else e.lineTo(y,m)}u=y,c=m,g+=o}return v}var Pn=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),Rn=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return Object(Ye["a"])(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Pn},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0;i--)if(!Dn(n[2*i-2],n[2*i-1]))break;for(;r=0){var m=s?(f-r)*y+r:(d-n)*y+n;return s?[e,m]:[m,e]}n=d,r=f;break;case a.C:d=o[u++],f=o[u++],h=o[u++],p=o[u++],g=o[u++],v=o[u++];var b=s?Object(Mn["f"])(n,d,h,g,e,l):Object(Mn["f"])(r,f,p,v,e,l);if(b>0)for(var x=0;x=0){m=s?Object(Mn["a"])(r,f,p,v,_):Object(Mn["a"])(n,d,h,g,_);return s?[e,m]:[m,e]}}n=g,r=v;break}}},t}(a["b"]),Nn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t}(Pn),Bn=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return Object(Ye["a"])(t,e),t.prototype.getDefaultShape=function(){return new Nn},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0;o--)if(!Dn(n[2*o-2],n[2*o-1]))break;for(;it){r?i.push(a(r,l,t)):n&&i.push(a(n,l,0),a(n,l,t));break}n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}}return i}function nr(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var i,o,a=r.length-1;a>=0;a--){var s=e.getDimensionInfo(r[a].dimension);if(i=s&&s.coordDim,"x"===i||"y"===i){o=r[a];break}}if(o){var l=t.getAxis(i),u=m["H"](o.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var f=tr(u,"x"===i?n.getWidth():n.getHeight()),h=f.length;if(!h&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var p=10,g=f[0].coord-p,v=f[h-1].coord+p,y=v-g;if(y<.001)return"transparent";m["k"](f,(function(e){e.offset=(e.coord-g)/y})),f.push({offset:h?f[h-1].offset:.5,color:d[1]||"transparent"}),f.unshift({offset:h?f[0].offset:.5,color:d[0]||"transparent"});var b=new An["a"](0,0,0,0,f,!0);return b[i]=g,b[i+"2"]=v,b}}}function rr(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!ir(o,t))){var a=t.mapDimension(o.dim),s={};return m["k"](o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function ir(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),o=Math.max(1,Math.round(i/5)),a=0;ar)return!1;return!0}function or(e,t){return isNaN(e)||isNaN(t)}function ar(e){for(var t=e.length/2;t>0;t--)if(!or(e[2*t-2],e[2*t-1]))break;return t-1}function sr(e,t){return[e[2*t],e[2*t+1]]}function lr(e,t,n){for(var r,i,o=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=t||r>=t&&i<=t){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(t-r)/(i-r)}}function ur(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&"bolder"===e.get(["emphasis","lineStyle","width"])){var P=h.getState("emphasis").style;P.lineWidth=+h.style.lineWidth+1}Object(ut["a"])(h).seriesIndex=e.seriesIndex,Object(un["J"])(h,I,D,j);var R=Jn(e.get("smooth")),N=e.get("smoothMonotone");if(h.setShape({smooth:R,smoothMonotone:N,connectNulls:S}),p){var B=a.getCalculationInfo("stackedOnSeries"),F=0;p.useStyle(m["i"](l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),B&&(F=Jn(B.get("smooth"))),p.setShape({smooth:R,stackedOnSmooth:F,smoothMonotone:N,connectNulls:S}),Object(un["I"])(p,e,"areaStyle"),Object(ut["a"])(p).seriesIndex=e.seriesIndex,Object(un["J"])(p,I,D,j)}var z=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=z)})),this._polyline.onHoverStateChange=z,this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=E,this._valueOrigin=b,e.get("triggerLineEvent")&&(this.packEventData(e,h),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,t){Object(ut["a"])(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=lt["u"](i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel"),d=e.get("z");s=new gn(i,o),s.x=l,s.y=u,s.setZ(c,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=c,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Fn["a"].prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=lt["u"](i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Fn["a"].prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Object(un["H"])(this._polyline,e),t&&Object(un["H"])(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Rn({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Bn({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");m["w"](l)&&(l=l(null));var u=s.get("animationDelay")||0,c=m["w"](u)?u(null):u;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var d=[e.x,e.y],f=void 0,h=void 0,p=void 0;if(n)if(i){var g=n,v=t.pointToCoord(d);r?(f=g.startAngle,h=g.endAngle,p=-v[1]/180*Math.PI):(f=g.r0,h=g.r,p=v[0])}else{var y=n;r?(f=y.x,h=y.x+y.width,p=e.x):(f=y.y+y.height,h=y.y,p=e.y)}var b=h===f?0:(p-f)/(h-f);a&&(b=1-b);var x=m["w"](u)?u(o):l*b+c,_=s.getSymbolPath(),w=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(ur(e)){var i=e.getData(),o=this._polyline,a=i.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||(s=this._endLabel=new J["a"]({z2:200}),s.ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=ar(a);l>=0&&(Object(fn["g"])(o,Object(fn["e"])(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?dn(i,n):cn(i,e)},enableTextSetter:!0},dr(r,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),f=o.get("precision"),h=o.get("distance")||0,p=a.getBaseAxis(),g=p.isHorizontal(),v=p.inverse,y=t.shape,m=v?g?y.x:y.y+y.height:g?y.x+y.width:y.y,b=(g?h:0)*(v?-1:1),x=(g?0:-h)*(v?-1:1),_=g?"x":"y",w=lr(u,m,_),S=w.range,k=S[1]-S[0],O=void 0;if(k>=1){if(k>1&&!d){var T=sr(u,S[0]);s.attr({x:T[0]+b,y:T[1]+x}),i&&(O=c.getRawValue(S[0]))}else{T=l.getPointOn(m,_);T&&s.attr({x:T[0]+b,y:T[1]+x});var E=c.getRawValue(S[0]),C=c.getRawValue(S[1]);i&&(O=lt["k"](n,f,E,C,w.t))}r.lastFrameIndex=S[0]}else{var A=1===e||r.lastFrameIndex>0?S[0]:0;T=sr(u,A);i&&(O=c.getRawValue(A)),s.attr({x:T[0]+b,y:T[1]+x})}i&&Object(fn["f"])(s).setLabelText(O)}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=Cn(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,o),d=c.current,f=c.stackedOnCurrent,h=c.next,p=c.stackedOnNext;if(i&&(d=er(c.current,n,i,a),f=er(c.stackedOnCurrent,n,i,a),h=er(c.next,n,i,a),p=er(c.stackedOnNext,n,i,a)),$n(d,h)>3e3||l&&$n(f,p)>3e3)return s.stopAnimation(),s.setShape({points:h}),void(l&&(l.stopAnimation(),l.setShape({points:h,stackedOnPoints:p})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:h}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),sn["h"](s,g,u),l&&(l.setShape({points:d,stackedOnPoints:f}),l.stopAnimation(),sn["h"](l,{shape:{stackedOnPoints:p}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var v=[],y=c.status,m=0;mt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),f=Math.round(a/d);if(isFinite(f)&&f>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/f));var h=void 0;Object(m["C"])(i)?h=vr[i]:Object(m["w"])(i)&&(h=i),h&&e.setData(r.downSample(r.mapDimension(l.dim),1/f,h,yr))}}}}}function br(e){e.registerChartView(hr),e.registerSeriesModel(an),e.registerLayout(gr("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,mr("line"))}var xr="__ec_stack_";function _r(e){return e.get("stack")||xr+e.seriesIndex}function wr(e){return e.dim+e.index}function Sr(e){var t=[],n=e.axis,r="axis0";if("category"===n.type){for(var i=n.getBandWidth(),o=0;o0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}function Tr(e){var t=Or(e),n=[];return Object(m["k"])(e,(function(e){var r,i=e.coordinateSystem,o=i.getBaseAxis(),a=o.getExtent();if("category"===o.type)r=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=t[s],u=Math.abs(a[1]-a[0]),c=o.scale.getExtent(),d=Math.abs(c[1]-c[0]);r=l?u/d*l:u}else{var f=e.getData();r=Math.abs(a[1]-a[0])/f.count()}var h=Object(Hn["o"])(e.get("barWidth"),r),p=Object(Hn["o"])(e.get("barMaxWidth"),r),g=Object(Hn["o"])(e.get("barMinWidth")||(Ir(e)?.5:1),r),v=e.get("barGap"),y=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:h,barMaxWidth:p,barMinWidth:g,barGap:v,barCategoryGap:y,axisKey:wr(o),stackId:_r(e)})})),Er(n)}function Er(e){var t={};Object(m["k"])(e,(function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(o.gap=d);var f=e.barCategoryGap;null!=f&&(o.categoryGap=f)}));var n={};return Object(m["k"])(t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=Object(m["F"])(r).length;o=Math.max(35-4*a,15)+"%"}var s=Object(Hn["o"])(o,i),l=Object(Hn["o"])(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),Object(m["k"])(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&tr&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var f,h=0;Object(m["k"])(r,(function(e,t){e.width||(e.width=d),f=e,h+=e.width*(1+l)})),f&&(h-=f.width*l);var p=-h/2;Object(m["k"])(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:p,width:e.width},p+=e.width*(1+l)}))})),n}function Cr(e,t,n){if(e&&t){var r=e[wr(t)];return null!=r&&null!=n?r[_r(n)]:r}}function Ar(e,t){var n=kr(e,t),r=Tr(n);Object(m["k"])(n,(function(e){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),o=_r(e),a=r[wr(i)][o],s=a.offset,l=a.width;t.setLayout({bandWidth:a.bandWidth,offset:s,size:l})}))}function Mr(e){return{seriesType:e,plan:Object(pr["a"])(),reset:function(e){if(Lr(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(i.dim)),a=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),c=Yt(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),f=Dr(r,i),h=Ir(e),p=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),v=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(e,t){var r,i=e.count,l=h&&Tn(3*i),u=h&&s&&Tn(3*i),m=h&&Tn(i),b=n.master.getRect(),x=d?b.width:b.height,_=t.getStore(),w=0;while(null!=(r=e.next())){var S=_.get(c?g:o,r),k=_.get(a,r),O=f,T=void 0;c&&(T=+S-_.get(o,r));var E=void 0,C=void 0,A=void 0,M=void 0;if(d){var L=n.dataToPoint([S,k]);if(c){var I=n.dataToPoint([T,k]);O=I[0]}E=O,C=L[1]+y,A=L[0]-O,M=v,Math.abs(A)e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Object(Rr["d"])(Pr.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(Pr),Br=Nr,Fr=n("88b3"),zr=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}return e}(),Ur=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return Object(Ye["a"])(t,e),t.prototype.getDefaultShape=function(){return new zr},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-i),s=i+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,f=c?u-lMath.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}function qr(e,t,n){return t*Math.sin(e)*(n?-1:1)}function Wr(e,t,n){return t*Math.cos(e)*(n?1:-1)}var Yr=Math.max,Kr=Math.min;function Xr(e,t){var n=e.getArea&&e.getArea();if(Wn(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}var Zr=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");("cartesian2d"===i||"polar"===i)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Object(ln["traverseElements"])(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=Qr(e,l);d&&this._enableRealtimeSort(d,a,n);var f=e.get("clip",!0)||d,h=Xr(l,a);o.removeClipPath();var p=e.get("roundCap",!0),g=e.get("showBackground",!0),v=e.getModel("backgroundStyle"),y=v.get("borderRadius")||0,m=[],b=this._backgroundEls,x=r&&r.isInitSort,_=r&&"changeAxisOrder"===r.type;function w(e){var t=oi[l.type](a,e),n=vi(l,i,t);return n.useStyle(v.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",y),m[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=oi[l.type](a,t,n);if(g&&w(t),a.hasValue(t)&&ii[l.type](r)){var s=!1;f&&(s=$r[l.type](h,r));var v=Jr[l.type](e,a,t,r,i,c,u.model,!1,p);d&&(v.forceLabelAnimation=!0),li(v,a,t,n,r,e,i,"polar"===l.type),x?v.attr({shape:r}):d?ei(d,c,v,r,t,i,!1,!1):Object(sn["c"])(v,{shape:r},e,t),a.setItemGraphicEl(t,v),o.add(v),v.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),S=oi[l.type](a,t,r);if(g){var k=void 0;0===b.length?k=w(n):(k=b[n],k.useStyle(v.getItemStyle()),"cartesian2d"===l.type&&k.setShape("r",y),m[t]=k);var O=oi[l.type](a,t),T=gi(i,O,l);Object(sn["h"])(k,{shape:T},c,t)}var E=s.getItemGraphicEl(n);if(a.hasValue(t)&&ii[l.type](S)){var C=!1;if(f&&(C=$r[l.type](h,S),C&&o.remove(E)),E?Object(sn["g"])(E):E=Jr[l.type](e,a,t,S,i,c,u.model,!!E,p),d&&(E.forceLabelAnimation=!0),_){var A=E.getTextContent();if(A){var M=Object(fn["f"])(A);null!=M.prevValue&&(M.prevValue=M.value)}}else li(E,a,t,r,S,e,i,"polar"===l.type);x?E.attr({shape:S}):d?ei(d,c,E,S,t,i,!0,_):Object(sn["h"])(E,{shape:S},e,t,null),a.setItemGraphicEl(t,E),E.ignore=C,o.add(E)}else o.remove(E)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&Object(sn["f"])(n,e,t)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new rn["a"]);S.removeAll();for(var k=0;ko)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){Object(sn["f"])(t,e,Object(ut["a"])(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Fn["a"]),$r={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=Yr(t.x,e.x),s=Kr(t.x+t.width,i),l=Yr(t.y,e.y),u=Kr(t.y+t.height,o),c=si?s:a,t.y=d&&l>o?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=Kr(t.r,e.r),o=Yr(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},Jr={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new zn["a"]({shape:Object(m["m"])({},r),z2:1});if(u.__dataIndex=n,u.name="item",o){var c=u.shape,d=i?"height":"width";c[d]=0}return u},polar:function(e,t,n,r,i,o,a,s,l){var u=!i&&l?Hr:Un["a"],c=new u({shape:r,z2:1});c.name="item";var d=si(i);if(c.calculateTextPosition=Vr(d,{isRoundCap:u===Hr}),o){var f=c.shape,h=i?"r":"endAngle",p={};f[h]=i?0:r.startAngle,p[h]=r[h],(s?sn["h"]:sn["c"])(c,{shape:p},o)}return c}};function Qr(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function ei(e,t,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?sn["h"]:sn["c"])(n,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(a?sn["h"]:sn["c"])(n,{shape:u},c,i)}function ti(e,t){for(var n=0;n0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function ai(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function si(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function li(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");s||e.setShape("r",r.get(["itemStyle","borderRadius"])||0),e.useStyle(l);var u=r.getShallow("cursor");u&&e.attr("cursor",u);var c=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=Object(fn["e"])(r);Object(fn["g"])(e,d,{labelFetcher:o,labelDataIndex:n,defaultText:cn(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var f=e.getTextContent();if(s&&f){var h=r.get(["label","position"]);e.textConfig.inside="middle"===h||null,Gr(e,"outside"===h?c:h,si(a),r.get(["label","rotate"]))}Object(fn["h"])(f,d,o.getRawValue(n),(function(e){return dn(t,e)}));var p=r.getModel(["emphasis"]);Object(un["J"])(e,p.get("focus"),p.get("blurScope"),p.get("disabled")),Object(un["I"])(e,r),ai(i)&&(e.style.fill="none",e.style.stroke="none",Object(m["k"])(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}function ui(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),o=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,o)}var ci=function(){function e(){}return e}(),di=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return Object(Ye["a"])(t,e),t.prototype.getDefaultShape=function(){return new ci},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=0?n:null}),30,!1);function pi(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=o.length/3;c=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}function gi(e,t,n){if(Wn(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}i=n.getArea();var o=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:o.r0,r:e?i.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}function vi(e,t,n){var r="polar"===e.type?Un["a"]:zn["a"];return new r({shape:gi(t,n,e),silent:!0,z2:0})}var yi=Zr;function mi(e){e.registerChartView(yi),e.registerSeriesModel(Br),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,m["h"](Ar,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Mr("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,mr("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))}var bi=n("f3bb"),xi=n("f934"),_i=2*Math.PI,wi=Math.PI/180;function Si(e,t){return xi["g"](e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function ki(e,t){var n=Si(e,t),r=e.get("center"),i=e.get("radius");m["t"](i)||(i=[0,i]),m["t"](r)||(r=[r,r]);var o=Object(Hn["o"])(n.width,t.getWidth()),a=Object(Hn["o"])(n.height,t.getHeight()),s=Math.min(o,a),l=Object(Hn["o"])(r[0],o)+n.x,u=Object(Hn["o"])(r[1],a)+n.y,c=Object(Hn["o"])(i[0],s/2),d=Object(Hn["o"])(i[1],s/2);return{cx:l,cy:u,r0:c,r:d}}function Oi(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),r=t.mapDimension("value"),i=Si(e,n),o=ki(e,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-e.get("startAngle")*wi,d=e.get("minAngle")*wi,f=0;t.each(r,(function(e){!isNaN(e)&&f++}));var h=t.getSum(r),p=Math.PI/(h||f)*2,g=e.get("clockwise"),v=e.get("roseType"),y=e.get("stillShowZeroSum"),m=t.getDataExtent(r);m[0]=0;var b=_i,x=0,_=c,w=g?1:-1;if(t.setLayout({viewRect:i,r:l}),t.each(r,(function(e,n){var r;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:v?NaN:l});else{r="area"!==v?0===h&&y?p:e*p:_i/f,rn?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-t-l.len2*i,f=r+l.len,p=Math.abs(d)e.unconstrainedWidth?null:h:null;r.setStyle("width",p)}var g=r.getBoundingRect();o.width=g.width;var v=(r.style.margin||0)+2.1;o.height=g.height+v,o.y-=(o.height-d)/2}}}function Pi(e){return"center"===e.position}function Ri(e){var t,n,r=e.getData(),i=[],o=!1,a=(e.get("minShowLabelAngle")||0)*Li,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,d=s.y,f=s.height;function h(e){e.ignore=!0}function p(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}r.each((function(e){var s=r.getItemGraphicEl(e),d=s.shape,f=s.getTextContent(),g=s.getTextGuideLine(),v=r.getItemModel(e),y=v.getModel("label"),b=y.get("position")||v.get(["emphasis","label","position"]),x=y.get("distanceToLabelLine"),_=y.get("alignTo"),w=Object(Hn["o"])(y.get("edgeDistance"),u),S=y.get("bleedMargin"),k=v.getModel("labelLine"),O=k.get("length");O=Object(Hn["o"])(O,u);var T=k.get("length2");if(T=Object(Hn["o"])(T,u),Math.abs(d.endAngle-d.startAngle)0?"right":"left":I>0?"left":"right"}var U=Math.PI,H=0,V=y.get("rotate");if(Object(m["z"])(V))H=V*(U/180);else if("center"===b)H=0;else if("radial"===V||!0===V){var G=I<0?-L+U:-L;H=G}else if("tangential"===V&&"outside"!==b&&"outer"!==b){var q=Math.atan2(I,D);q<0&&(q=2*U+q);var W=D>0;W&&(q=U+q),H=q-U}if(o=!!H,f.x=E,f.y=C,f.rotation=H,f.setStyle({verticalAlign:"middle"}),j){f.setStyle({align:M});var Y=f.states.select;Y&&(Y.x+=f.x,Y.y+=f.y)}else{var K=f.getBoundingRect().clone();K.applyTransform(f.getComputedTransform());var X=(f.style.margin||0)+2.1;K.y-=X/2,K.height+=X,i.push({label:f,labelLine:g,position:b,len:O,len2:T,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new Ci["a"](I,D),linePoints:A,textAlign:M,labelDistance:x,labelAlignTo:_,edgeDistance:w,bleedMargin:S,rect:K,unconstrainedWidth:K.width,labelStyleWidth:f.style.width})}s.setTextConfig({inside:j})}})),!o&&e.get("avoidLabelOverlap")&&Di(i,t,n,l,u,f,c,d);for(var g=0;g0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=r.r0}},t.type="pie",t}(Fn["a"]),zi=Fi;function Ui(e,t,n){t=Object(m["t"])(t)&&{coordDimensions:t}||Object(m["m"])({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=Rt(r,t).dimensions,o=new jt(i,e);return o.initData(r,n),o}var Hi=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},e.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},e.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},e}(),Vi=Hi,Gi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Vi(m["c"](this.getData,this),m["c"](this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Ui(this,{coordDimensions:["value"],encodeDefaulter:m["h"](Pt["d"],this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=[];return n.each(n.mapDimension("value"),(function(e){i.push(e)})),r.percent=Object(Hn["e"])(i,t,n.hostModel.get("percentPrecision")),r.$vars.push("percent"),r},t.prototype._defaultLabelLine=function(e){lt["f"](e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(tn["b"]),qi=Gi;function Wi(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf((function(e){var t=n.mapDimension("value"),r=n.get(t,e);return!(Object(m["z"])(r)&&!isNaN(r)&&r<0)}))}}}function Yi(e){e.registerChartView(zi),e.registerSeriesModel(qi),Object(bi["a"])("pie",e.registerAction),e.registerLayout(Object(m["h"])(Oi,"pie")),e.registerProcessor(Ti("pie")),e.registerProcessor(Wi("pie"))}var Ki=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Object(Ye["a"])(t,e),t.prototype.getInitialData=function(e,t){return en(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(tn["b"]),Xi=Ki,Zi=n("9850"),$i=4,Ji=function(){function e(){}return e}(),Qi=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return Object(Ye["a"])(t,e),t.prototype.getDefaultShape=function(){return new Ji},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,r=t.points,i=t.size,o=this.symbolProxy,a=o.shape,s=e.getContext?e.getContext():e,l=s&&i[0]<$i,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=r[l]-o/2,c=r[l+1]-a/2;if(e>=u&&t>=c&&e<=u+o&&t<=c+a)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();if(e=n[0],t=n[1],r.contain(e,t)){var i=this.hoverDataIdx=this.findDataIndex(e,t);return i>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],o=r[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(e.startIndex||0))}))},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),to=eo,no=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this._updateSymbolDraw(r,e);i.updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData(),i=this._updateSymbolDraw(r,e);i.incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var i=gr("").reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext,i=r.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new to:new xn,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Fn["a"]),ro=no,io=n("b12f"),oo=n("6cb7"),ao=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(oo["a"]),so=ao,lo=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},e.prototype.getCoordSysModel=function(){},e}(),uo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",lt["b"]).models[0]},t.type="cartesian2dAxis",t}(oo["a"]);m["K"](uo,lo);var co={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},fo=m["I"]({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},co),ho=m["I"]({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},co),po=m["I"]({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},ho),go=m["i"]({logBase:10},ho),vo={category:fo,value:ho,time:po,log:go},yo=0,mo=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++yo}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&Object(m["H"])(r,bo);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Object(m["C"])(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return t=r.get(e),null==t&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Object(m["f"])(this.categories))},e}();function bo(e){return Object(m["A"])(e)&&null!=e.value?e.value:e+""}var xo=mo,_o={value:1,category:1,time:1,log:1};function wo(e,t,n,r){Object(m["k"])(_o,(function(i,o){var a=Object(m["I"])(Object(m["I"])({},vo[o],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return Object(Ye["a"])(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=Object(xi["d"])(this),r=n?Object(xi["f"])(e):{},i=t.getTheme();Object(m["I"])(e,i.get(o+"Axis")),Object(m["I"])(e,this.getDefaultOption()),e.type=So(e),n&&Object(xi["h"])(e,r,n)},n.prototype.optionUpdated=function(){var e=this.option;"category"===e.type&&(this.__ordinalMeta=xo.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",So)}function So(e){return e.type||(e.data?"category":"value")}var ko=n("625e"),Oo=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();ko["c"](Oo);var To=Oo;function Eo(e){return"interval"===e.type||"log"===e.type}function Co(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=Object(Hn["l"])(o/t,!0);null!=n&&ar&&(a=i.interval=r);var s=i.intervalPrecision=Mo(a),l=i.niceTickExtent=[Object(Hn["u"])(Math.ceil(e[0]/a)*a,s),Object(Hn["u"])(Math.floor(e[1]/a)*a,s)];return Io(l,e),i}function Ao(e){var t=Math.pow(10,Object(Hn["r"])(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Object(Hn["u"])(n*t)}function Mo(e){return Object(Hn["g"])(e)+2}function Lo(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function Io(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),Lo(e,0,t),Lo(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function Do(e,t){return e>=t[0]&&e<=t[1]}function jo(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Po(e,t){return e*(t[1]-t[0])+t[0]}var Ro=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new xo({})),Object(m["t"])(r)&&(r=new xo({categories:Object(m["H"])(r,(function(e){return Object(m["A"])(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return Object(Ye["a"])(t,e),t.prototype.parse=function(e){return null==e?NaN:Object(m["C"])(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Do(e,this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),jo(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Po(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){var e=[],t=this._extent,n=t[0];while(n<=t[1])e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(To);To.registerClass(Ro);var No=Ro,Bo=Hn["u"],Fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return Object(Ye["a"])(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Do(e,this._extent)},t.prototype.normalize=function(e){return jo(e,this._extent)},t.prototype.scale=function(e){return Po(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Mo(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;var a=1e4;n[0]a)return[]}var l=o.length?o[o.length-1].value:r[1];return n[1]>l&&(e?o.push({value:Bo(l+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;ir[0]&&d>>1;e[i][1]n&&(this._approxInterval=n);var o=Go.length,a=Math.min(Ho(Go,this._approxInterval,0,o),o-1);this._interval=Go[a][1],this._minLevelUnit=Go[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return Object(m["z"])(e)?e:+Hn["n"](e)},t.prototype.contain=function(e){return Do(this.parse(e),this._extent)},t.prototype.normalize=function(e){return jo(this.parse(e),this._extent)},t.prototype.scale=function(e){return Po(e,this._extent)},t.type="time",t}(zo),Go=[["second",Uo["d"]],["minute",Uo["c"]],["hour",Uo["b"]],["quarter-day",6*Uo["b"]],["half-day",12*Uo["b"]],["day",1.2*Uo["a"]],["half-week",3.5*Uo["a"]],["week",7*Uo["a"]],["month",31*Uo["a"]],["quarter",95*Uo["a"]],["half-year",Uo["e"]/2],["year",Uo["e"]]];function qo(e,t,n,r){var i=Hn["n"](t),o=Hn["n"](n),a=function(e){return Object(Uo["n"])(i,e,r)===Object(Uo["n"])(o,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},f=function(){return d()&&a("second")},h=function(){return f()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return f();case"millisecond":return h()}}function Wo(e,t){return e/=Uo["a"],e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function Yo(e){var t=30*Uo["a"];return e/=t,e>6?6:e>3?3:e>2?2:1}function Ko(e){return e/=Uo["b"],e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Xo(e,t){return e/=t?Uo["c"]:Uo["d"],e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Zo(e){return Hn["l"](e,!0)}function $o(e,t,n){var r=new Date(e);switch(Object(Uo["m"])(t)){case"year":case"month":r[Object(Uo["x"])(n)](0);case"day":r[Object(Uo["g"])(n)](1);case"hour":r[Object(Uo["p"])(n)](0);case"minute":r[Object(Uo["v"])(n)](0);case"second":r[Object(Uo["A"])(n)](0),r[Object(Uo["t"])(n)](0)}return r.getTime()}function Jo(e,t,n,r){var i=1e4,o=Uo["B"],a=0;function s(e,t,n,i,o,a,s){var l=new Date(t),u=t,c=l[i]();while(u1&&0===u&&o.unshift({value:o[0].value-f})}}for(u=0;u=r[0]&&b<=r[1]&&d++)}var x=(r[1]-r[0])/t;if(d>1.5*x&&f>x/1.5)break;if(u.push(v),d>x||e===o[h])break}c=[]}}}var _=Object(m["n"])(Object(m["H"])(u,(function(e){return Object(m["n"])(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),w=[],S=_.length-1;for(h=0;h<_.length;++h)for(var k=_[h],O=0;O0)r*=10;var o=[Hn["u"](ia(t[0]/r)*r),Hn["u"](ra(t[1]/r)*r)];this._interval=r,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){ta.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=aa(e)/aa(this.base),Do(e,this._extent)},t.prototype.normalize=function(e){return e=aa(e)/aa(this.base),jo(e,this._extent)},t.prototype.scale=function(e){return e=Po(e,this._extent),oa(this.base,e)},t.type="log",t}(To),la=sa.prototype;function ua(e,t){return na(e,Hn["g"](t))}la.getMinorTicks=ta.getMinorTicks,la.getLabel=ta.getLabel,To.registerClass(sa);var ca=sa,da=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,f=this._determinedMax;return null!=d&&(a=d,l=!0),null!=f&&(s=f,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[ha[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var n=fa[e];this[n]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),fa={min:"_determinedMin",max:"_determinedMax"},ha={min:"_dataMin",max:"_dataMax"};function pa(e,t,n){var r=e.rawExtentInfo;return r||(r=new da(e,t,n),e.rawExtentInfo=r,r)}function ga(e,t){return null==t?null:Object(m["l"])(t)?NaN:e.parse(t)}function va(e,t){var n=e.type,r=pa(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=kr("bar",a),l=!1;if(m["k"](s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=Tr(s),c=ya(i,o,t,u);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function ya(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=Cr(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;m["k"](a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;m["k"](a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=1-(s+l)/o,f=c/d-c;return t+=f*(l/u),e-=f*(s/u),{min:e,max:t}}function ma(e,t){var n=t,r=va(e,n),i=r.extent,o=n.get("splitNumber");e instanceof ca&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function ba(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new No({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Qo({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(To.getClass(t)||zo)}}function xa(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}function _a(e){var t=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(t){return function(n,r){return e.scale.getFormattedLabel(n,r,t)}}(t):m["C"](t)?function(t){return function(n){var r=e.scale.getLabel(n),i=t.replace("{value}",null!=r?r:"");return i}}(t):m["w"](t)?function(t){return function(r,i){return null!=n&&(i=r.value-n),t(wa(e,r),i,null!=r.level?{level:r.level}:null)}}(t):function(t){return e.scale.getLabel(t)}}function wa(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function Sa(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();n instanceof No?i=n.count():(r=n.getTicks(),i=r.length);var a,s=e.getLabelModel(),l=_a(e),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;ce[1]&&(e[1]=r[1])}))}var Aa=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return m["H"](this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),m["n"](this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),Ma=Aa,La=n("1687"),Ia=n("401b"),Da=["x","y"];function ja(e){return"interval"===e.type||"time"===e.type}var Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Da,t}return Object(Ye["a"])(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(ja(e)&&ja(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,d=i[1]-r[0]*u,f=this._transform=[l,0,0,u,c,d];this._invTransform=Object(La["e"])([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),o=new Zi["a"](n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return Object(Ia["b"])(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return t=t||[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return Object(Ia["b"])(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),i=Math.max(e[0],e[1])-n,o=Math.max(t[0],t[1])-r;return new Zi["a"](n,r,i,o)},t}(Ma),Ra=Pa,Na=Object(lt["o"])();function Ba(e){return"category"===e.type?za(e):Va(e)}function Fa(e,t){return"category"===e.type?Ha(e,t):{ticks:m["H"](e.scale.getTicks(),(function(e){return e.value}))}}function za(e){var t=e.getLabelModel(),n=Ua(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function Ua(e,t){var n,r,i=Ga(e,"labels"),o=Oa(t),a=qa(i,o);return a||(m["w"](o)?n=$a(e,o):(r="auto"===o?Ya(e):o,n=Za(e,r)),Wa(i,o,{labels:n,labelCategoryInterval:r}))}function Ha(e,t){var n,r,i=Ga(e,"ticks"),o=Oa(t),a=qa(i,o);if(a)return a;if(t.get("show")&&!e.scale.isBlank()||(n=[]),m["w"](o))n=$a(e,o,!0);else if("auto"===o){var s=Ua(e,e.getLabelModel());r=s.labelCategoryInterval,n=m["H"](s.labels,(function(e){return e.tickValue}))}else r=o,n=Za(e,r,!0);return Wa(i,o,{ticks:n,tickCategoryInterval:r})}function Va(e){var t=e.scale.getTicks(),n=_a(e);return{labels:m["H"](t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}function Ga(e,t){return Na(e)[t]||(Na(e)[t]=[])}function qa(e,t){for(var n=0;n40&&(s=Math.max(1,Math.floor(a/40)));for(var u=o[0],c=e.dataToCoord(u+1)-e.dataToCoord(u),d=Math.abs(c*Math.cos(r)),f=Math.abs(c*Math.sin(r)),h=0,p=0;u<=o[1];u+=s){var g=0,v=0,y=l["d"](n({value:u}),t.font,"center","top");g=1.3*y.width,v=1.3*y.height,h=Math.max(h,g,7),p=Math.max(p,v,7)}var m=h/d,b=p/f;isNaN(m)&&(m=1/0),isNaN(b)&&(b=1/0);var x=Math.max(0,Math.floor(Math.min(m,b))),_=Na(e.model),w=e.getExtent(),S=_.lastAutoInterval,k=_.lastTickCount;return null!=S&&null!=k&&Math.abs(S-x)<=1&&Math.abs(k-a)<=1&&S>x&&_.axisExtent0===w[0]&&_.axisExtent1===w[1]?x=S:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=w[0],_.axisExtent1=w[1]),x}function Xa(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Za(e,t,n){var r=_a(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=Ta(e),f=a.get("showMinLabel")||d,h=a.get("showMaxLabel")||d;f&&u!==o[0]&&g(o[0]);for(var p=u;p<=o[1];p+=l)g(p);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return h&&p-l!==o[1]&&g(o[1]),s}function $a(e,t,n){var r=e.scale,i=_a(e),o=[];return m["k"](r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})})),o}var Ja=[0,1],Qa=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return Object(Hn["f"])(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&(n=n.slice(),es(n,r.count())),Object(Hn["k"])(e,Ja,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&(n=n.slice(),es(n,r.count()));var i=Object(Hn["k"])(e,n,Ja,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=Fa(this,t),r=n.ticks,i=Object(m["H"])(r,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this),o=t.get("alignWithLabel");return ts(this,i,o,e.clamp),i},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),r=Object(m["H"])(n,(function(e){return Object(m["H"])(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this);return r},e.prototype.getViewLabels=function(){return Ba(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return Ka(this)},e}();function es(e,t){var n=e[1]-e[0],r=t,i=n/r/2;e[0]+=i,e[1]-=i}function ts(e,t,n,r){var i=t.length;if(e.onBand&&!n&&i){var o,a,s=e.getExtent();if(1===i)t[0].coord=s[0],o=t[1]={coord:s[0]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;Object(m["k"])(t,(function(e){e.coord-=u/2}));var c=e.scale.getExtent();a=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*a},t.push(o)}var d=s[0]>s[1];f(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift()),r&&f(s[0],t[0].coord)&&t.unshift({coord:s[0]}),f(s[1],o.coord)&&(r?o.coord=s[1]:t.pop()),r&&f(o.coord,s[1])&&t.push({coord:s[1]})}function f(e,t){return e=Object(Hn["u"])(e),t=Object(Hn["u"])(t),d?e>t:et[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(ns),is=rs;function os(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],f={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,p="x"===u?[d[2]-h,d[3]+h]:[d[0]-h,d[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));p[f.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===u?p[f[l]]:d[0],"x"===u?p[f[l]]:d[3]],o.rotation=Math.PI/2*("x"===u?0:1);var v={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=v[s],o.labelOffset=a?p[f[s]]-p[f.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),m["O"](n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-y:y,o.z2=1,o}function as(e){return"cartesian2d"===e.get("coordinateSystem")}function ss(e){var t={xAxisModel:null,yAxisModel:null};return m["k"](t,(function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,lt["b"]).models[0];t[r]=o})),t}var ls=Math.log;function us(e,t,n){var r=zo.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=va(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var f=ls(e.base);u=[ls(u[0])/f,ls(u[1])/f]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var h=r.getExtent.call(e);c&&(u[0]=h[0]),d&&(u[1]=h[1]);var p=r.getInterval.call(e),g=u[0],v=u[1];if(c&&d)p=(v-g)/a;else if(c){v=u[0]+p*a;while(vu[0]&&isFinite(g)&&isFinite(u[0]))p=Ao(p),g=u[1]-p*a}else{var y=e.getTicks().length-1;y>a&&(p=Ao(p));var m=p*a;v=Math.ceil(u[1]/p)*p,g=Object(Hn["u"])(v-m),g<0&&u[0]>=0?(g=0,v=Object(Hn["u"])(m)):v>0&&u[1]<=0&&(v=0,g=-Object(Hn["u"])(m))}var b=(i[0].value-o[0].value)/s,x=(i[a].value-o[a].value)/s;r.setExtent.call(e,g+p*b,v+p*x),r.setInterval.call(e,p),(b||x)&&r.setNiceExtent.call(e,g+p,v-p)}var cs=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Da,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=Object(m["F"])(e),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=+n[o],s=e[a],l=s.model,u=s.scale;Eo(u)&&l.get("alignTicks")&&null==l.get("interval")?i.push(s):(ma(u,l),Eo(u)&&(t=s))}i.length&&(t||(t=i.pop(),ma(t.scale,t.model)),Object(m["k"])(i,(function(e){us(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};Object(m["k"])(n.x,(function(e){fs(n,"y",e,i)})),Object(m["k"])(n.y,(function(e){fs(n,"x",e,i)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=Object(xi["g"])(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){Object(m["k"])(a,(function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),ps(e,t?o.x:o.y)}))}s(),i&&(Object(m["k"])(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=Sa(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+r,"top"===e.position?o.y+=t.height+r:"left"===e.position&&(o.x+=t.width+r)}}})),s()),Object(m["k"])(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}Object(m["A"])(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r0?"top":"bottom",r="center"):Object(Hn["j"])(o-ys)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),bs={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0];a&&(Object(Ia["b"])(s,s,a),Object(Ia["b"])(l,l,a));var u=Object(m["m"])({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new vs["a"]({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});c.anid="line",n.add(c);var d=t.get(["axisLine","symbol"]);if(null!=d){var f=t.get(["axisLine","symbolSize"]);Object(m["C"])(d)&&(d=[d,d]),(Object(m["C"])(f)||Object(m["z"])(f))&&(f=[f,f]);var h=Object(nn["b"])(t.get(["axisLine","symbolOffset"])||0,f),p=f[0],g=f[1];Object(m["k"])([{rotate:e.rotation+Math.PI/2,offset:h[0],r:0},{rotate:e.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==d[r]&&null!=d[r]){var i=Object(nn["a"])(d[r],-p/2,-g/2,p,g,u.stroke,!0),o=t.r+t.offset;i.attr({rotation:t.rotate,x:s[0]+o*Math.cos(e.rotation),y:s[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}}))}}},axisTickLabel:function(e,t,n,r){var i=Ts(n,r,t,e),o=Cs(n,r,t,e);if(_s(t,o,i),Es(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var a=Object(Mi["b"])(Object(m["H"])(o,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})));Object(Mi["a"])(a)}},axisName:function(e,t,n,r){var i=Object(m["O"])(e.axisName,t.get("name"));if(i){var o,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),f=d[0]>d[1]?-1:1,h=["start"===s?d[0]-f*c:"end"===s?d[1]+f*c:(d[0]+d[1])/2,ks(s)?e.labelOffset+l*c:0],p=t.get("nameRotate");null!=p&&(p=p*ys/180),ks(s)?o=ms.innerTextLayout(e.rotation,null!=p?p:e.rotation,l):(o=xs(e.rotation,s,p||0,d),a=e.axisNameAvailableWidth,null!=a&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),v=t.get("nameTruncate",!0)||{},y=v.ellipsis,b=Object(m["O"])(e.nameTruncateMaxWidth,v.maxWidth,a),x=new J["a"]({x:h[0],y:h[1],rotation:o.rotation,silent:ms.isLabelSilent(t),style:Object(fn["c"])(u,{text:i,font:g,overflow:"truncate",width:b,ellipsis:y,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(ln["setTooltipConfig"]({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=ms.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,Object(ut["a"])(x).eventData=_}r.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function xs(e,t,n,r){var i,o,a=Object(Hn["t"])(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;return Object(Hn["j"])(a-ys/2)?(o=l?"bottom":"top",i="center"):Object(Hn["j"])(a-1.5*ys)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*ys&&a>ys/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function _s(e,t,n){if(!Ta(e.axis)){var r=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var o=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],f=n[n.length-2];!1===r?(ws(o),ws(u)):Ss(o,a)&&(r?(ws(a),ws(c)):(ws(o),ws(u))),!1===i?(ws(s),ws(d)):Ss(l,s)&&(i?(ws(l),ws(f)):(ws(s),ws(d)))}}function ws(e){e&&(e.ignore=!0)}function Ss(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=La["d"]([]);return La["g"](i,i,-e.rotation),n.applyTransform(La["f"]([],i,e.getLocalTransform())),r.applyTransform(La["f"]([],i,t.getLocalTransform())),n.intersect(r)}}function ks(e){return"middle"===e||"center"===e}function Os(e,t,n,r,i){for(var o=[],a=[],s=[],l=0;l=0||e===t}function Rs(e){var t=Ns(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=Fs(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var f=a;null!=d.color&&(f=m["i"]({color:d.color},a));var h=m["I"](m["d"](d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:r,axisTick:i,axisLabel:o,name:d.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:f,triggerEvent:c},!1);if(m["C"](l)){var p=h.name;h.name=l.replace("{value}",null!=p?p:"")}else m["w"](l)&&(h.name=l(h.name,h));var g=new Ke["a"](h,null,this.ecModel);return m["K"](g,lo.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:m["I"]({lineStyle:{color:"#bbb"}},hl.axisLine),axisLabel:pl(hl.axisLabel,!1),axisTick:pl(hl.axisTick,!1),splitLine:pl(hl.splitLine,!0),splitArea:pl(hl.splitArea,!0),indicator:[]},t}(oo["a"]),vl=gl,yl=n("d9fc"),ml=n("4573"),bl=["axisLine","axisTickLabel","axisName"],xl=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r=this.group;r.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes(),r=m["H"](n,(function(e){var n=e.model.get("showName")?e.name:"",r=new As(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return r}));m["k"](r,(function(e){m["k"](bl,e.add,e),this.group.add(e.getGroup())}),this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var r=e.get("shape"),i=e.getModel("splitLine"),o=e.getModel("splitArea"),a=i.getModel("lineStyle"),s=o.getModel("areaStyle"),l=i.get("show"),u=o.get("show"),c=a.get("color"),d=s.get("color"),f=m["t"](c)?c:[c],h=m["t"](d)?d:[d],p=[],g=[];if("circle"===r)for(var v=n[0].getTicksCoords(),y=t.cx,b=t.cy,x=0;x3?1.4:i>1?1.2:1.1,l=r>0?s:1/s;Nl(this,"zoom","zoomOnMouseWheel",e,{scale:l,originX:o,originY:a,isAvailableBehavior:null})}if(n){var u=Math.abs(r),c=(r>0?1:-1)*(u>3?.4:u>1?.15:.05);Nl(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:c,originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!jl(this._zr,"globalPan")){var t=e.pinchScale>1?1.1:1/1.1;Nl(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(Cl["a"]);function Nl(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(Al["g"](r.event),Bl(e,t,n,r,i))}function Bl(e,t,n,r,i){i.isAvailableBehavior=Object(m["c"])(Fl,null,n,r),e.trigger(t,i)}function Fl(e,t,n){var r=n[e];return!e||r&&(!Object(m["C"])(r)||t.event[r+"Key"])}var zl=Rl;function Ul(e,t,n){var r=e.target;r.x+=t,r.y+=n,r.dirty()}function Hl(e,t,n,r){var i=e.target,o=e.zoomLimit,a=e.zoom=e.zoom||1;if(a*=t,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/e.zoom;e.zoom=a,i.x-=(n-i.x)*(u-1),i.y-=(r-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var Vl={axisPointer:1,tooltip:1,brush:1};function Gl(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!Vl.hasOwnProperty(r.mainType)&&i&&i.model!==n}var ql,Wl=n("ae69"),Yl=n("342d"),Kl=n("dded");function Xl(e){if(Object(m["C"])(e)){var t=new DOMParser;e=t.parseFromString(e,"text/xml")}var n=e;9===n.nodeType&&(n=n.firstChild);while("svg"!==n.nodeName.toLowerCase()||1!==n.nodeType)n=n.nextSibling;return n}var Zl={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},$l=Object(m["F"])(Zl),Jl={"alignment-baseline":"textBaseline","stop-color":"stopColor"},Ql=Object(m["F"])(Jl),eu=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t=t||{};var n=Xl(e);this._defsUsePending=[];var r=new rn["a"];this._root=r;var i=[],o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||t.width),s=parseFloat(n.getAttribute("height")||t.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),au(n,r,null,!0,!1);var l,u,c=n.firstChild;while(c)this._parseNode(c,r,i,null,!1,!1),c=c.nextSibling;if(cu(this._defs,this._defsUsePending),this._defsUsePending=[],o){var d=fu(o);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=bu(l,{x:0,y:0,width:a,height:s}),!t.ignoreViewBox)){var f=r;r=new rn["a"],r.add(f),f.scaleX=f.scaleY=u.scale,f.x=u.x,f.y=u.y}return t.ignoreRootClip||null==a||null==s||r.setClipPath(new zn["a"]({shape:{x:0,y:0,width:a,height:s}})),{root:r,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}},e.prototype._parseNode=function(e,t,n,r,i,o){var a,s=e.nodeName.toLowerCase(),l=r;if("defs"===s&&(i=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=t;else{if(!i){var u=ql[s];if(u&&Object(m["q"])(ql,s)){a=u.call(this,e,t);var c=e.getAttribute("name");if(c){var d={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(d),"g"===s&&(l=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:s,el:a});t.add(a)}}var f=tu[s];if(f&&Object(m["q"])(tu,s)){var h=f.call(this,e),p=e.getAttribute("id");p&&(this._defs[p]=h)}}if(a&&a.isGroup){var g=e.firstChild;while(g)1===g.nodeType?this._parseNode(g,a,n,l,i,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling}},e.prototype._parseText=function(e,t){var n=new u["a"]({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});iu(t,n),au(e,n,this._defsUsePending,!1,!1),su(n,t);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=o;var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=function(){ql={g:function(e,t){var n=new rn["a"];return iu(t,n),au(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new zn["a"];return iu(t,n),au(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new yl["a"];return iu(t,n),au(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new vs["a"];return iu(t,n),au(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new Wl["a"];return iu(t,n),au(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n,r=e.getAttribute("points");r&&(n=ou(r));var i=new sl["a"]({shape:{points:n||[]},silent:!0});return iu(t,i),au(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n,r=e.getAttribute("points");r&&(n=ou(r));var i=new Ei["a"]({shape:{points:n||[]},silent:!0});return iu(t,i),au(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new s["a"];return iu(t,n),au(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",r=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(o);var a=new rn["a"];return iu(t,a),au(e,a,this._defsUsePending,!1,!0),a},tspan:function(e,t){var n=e.getAttribute("x"),r=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=r&&(this._textY=parseFloat(r));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",a=new rn["a"];return iu(t,a),au(e,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),a},path:function(e,t){var n=e.getAttribute("d")||"",r=Object(Yl["b"])(n);return iu(t,r),au(e,r,this._defsUsePending,!1,!1),r.silent=!0,r}}}(),e}(),tu={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),n=parseInt(e.getAttribute("y1")||"0",10),r=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),o=new An["a"](t,n,r,i);return nu(e,o),ru(e,o),o},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),n=parseInt(e.getAttribute("cy")||"0",10),r=parseInt(e.getAttribute("r")||"0",10),i=new Kl["a"](t,n,r);return nu(e,i),ru(e,i),i}};function nu(e,t){var n=e.getAttribute("gradientUnits");"userSpaceOnUse"===n&&(t.global=!0)}function ru(e,t){var n=e.firstChild;while(n){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var r=n.getAttribute("offset"),i=void 0;i=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o={};yu(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:a})}n=n.nextSibling}}function iu(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Object(m["i"])(t.__inheritedStyle,e.__inheritedStyle))}function ou(e){for(var t=fu(e),n=[],r=0;r0;o-=2){var a=r[o],s=r[o-1],l=fu(a);switch(i=i||La["c"](),s){case"translate":La["i"](i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":La["h"](i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":La["g"](i,i,-parseFloat(l[0])*pu);break;case"skewX":var u=Math.tan(parseFloat(l[0])*pu);La["f"](i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*pu);La["f"](i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var vu=/([^\s:;]+)\s*:\s*([^:;]+)/g;function yu(e,t,n){var r=e.getAttribute("style");if(r){var i;vu.lastIndex=0;while(null!=(i=vu.exec(r))){var o=i[1],a=Object(m["q"])(Zl,o)?Zl[o]:null;a&&(t[a]=i[2]);var s=Object(m["q"])(Jl,o)?Jl[o]:null;s&&(n[s]=i[2])}}}function mu(e,t,n){for(var r=0;r<$l.length;r++){var i=$l[r],o=e.getAttribute(i);null!=o&&(t[Zl[i]]=o)}for(r=0;rn&&(e=i,n=a)}if(e)return Cu(e.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return Object(m["k"])(i,(function(t){"polygon"===t.type?Eu(t.exterior,n,r,e):Object(m["k"])(t.points,(function(t){Eu(t,n,r,e)}))})),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new Zi["a"](n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var r=0,i=n.length;r>1^-(1&s),l=l>>1^-(1&l),s+=i,l+=o,i=s,o=l,r.push([s/n,l/n])}return r}function Uu(e,t){return e=Bu(e),m["H"](m["n"](e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var n=e.properties,r=e.geometry,i=[];switch(r.type){case"Polygon":var o=r.coordinates;i.push(new Mu(o[0],o.slice(1)));break;case"MultiPolygon":m["k"](r.coordinates,(function(e){e[0]&&i.push(new Mu(e[0],e.slice(1)))}));break;case"LineString":i.push(new Lu([r.coordinates]));break;case"MultiLineString":i.push(new Lu(r.coordinates))}var a=new Iu(n[t||"name"],i,n.cp);return a.properties=n,a}))}for(var Hu=[126,25],Vu="南海诸岛",Gu=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],qu=0;qu0,g={api:n,geo:s,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(g):"geoSVG"===s.resourceType&&this._buildSVG(g),this._updateController(e,t,n),this._updateMapSelectHandler(e,l,n,r)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=m["f"](),n=m["f"](),r=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,a=e.data,s=e.geo.projection,l=s&&s.stream;function u(e,t){return t&&(e=t(e)),e&&[e[0]*i.scaleX+i.x,e[1]*i.scaleY+i.y]}function c(e){for(var t=[],n=!l&&s&&s.project,r=0;r=0)&&(f=i);var h=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Object(fn["g"])(t,Object(fn["e"])(r),{labelFetcher:f,labelDataIndex:d,defaultText:n},h);var p=t.getTextContent();if(p&&(cc(p).ignore=p.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function vc(e,t,n,r,i,o){e.data?e.data.setItemGraphicEl(o,t):Object(ut["a"])(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:n,region:r&&r.option||{}}}function yc(e,t,n,r,i){e.data||ln["setTooltipConfig"]({el:t,componentModel:i,itemName:n,itemTooltipOption:r.get("tooltip")})}function mc(e,t,n,r,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var o=r.getModel("emphasis"),a=o.get("focus");return Object(un["J"])(t,a,o.get("blurScope"),o.get("disabled")),e.isGeo&&Object(un["n"])(t,i,n),a}function bc(e,t,n){var r,i=[];function o(){r=[]}function a(){r.length&&(i.push(r),r=[])}var s=t({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(e,t){isFinite(e)&&isFinite(t)&&r.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),m["k"](e,(function(e){s.lineStart();for(var t=0;t-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(tn["b"]),kc=Sc;function Oc(e,t){var n={};return m["k"](e,(function(e){e.each(e.mapDimension("value"),(function(t,r){var i="ec-"+e.getName(r);n[i]=n[i]||[],isNaN(t)||n[i].push(t)}))})),e[0].map(e[0].mapDimension("value"),(function(r,i){for(var o,a="ec-"+e[0].getName(i),s=0,l=1/0,u=-1/0,c=n[a].length,d=0;d1?(h.width=f,h.height=f/b):(h.height=f,h.width=f*b),h.y=d[1]-h.height/2,h.x=d[0]-h.width/2;else{var _=e.getBoxLayoutParams();_.aspect=b,h=xi["g"](_,{width:y,height:m})}this.setViewRect(h.x,h.y,h.width,h.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}function Bc(e,t){m["k"](t.get("geoCoord"),(function(t,n){e.addGeoCoord(n,t)}))}var Fc=function(){function e(){this.dimensions=Dc}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale"),projection:e.get("projection")}}e.eachComponent("geo",(function(e,i){var o=e.get("map"),a=new Rc(o+i,o,m["m"]({nameMap:e.get("nameMap")},r(e)));a.zoomLimit=e.get("scaleLimit"),n.push(a),e.coordinateSystem=a,a.model=e,a.resize=Nc,a.resize(e,t)})),e.eachSeries((function(e){var t=e.get("coordinateSystem");if("geo"===t){var r=e.get("geoIndex")||0;e.coordinateSystem=n[r]}}));var i={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();i[t]=i[t]||[],i[t].push(e)}})),m["k"](i,(function(e,i){var o=m["H"](e,(function(e){return e.get("nameMap")})),a=new Rc(i,i,m["m"]({nameMap:m["J"](o)},r(e[0])));a.zoomLimit=m["O"].apply(null,m["H"](e,(function(e){return e.get("scaleLimit")}))),n.push(a),a.resize=Nc,a.resize(e[0],t),m["k"](e,(function(e){e.coordinateSystem=a,Bc(a,e)}))})),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var i=(e||[]).slice(),o=m["f"](),a=0;a=0;a--){var s=r[a];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},i.push(s)}}function ed(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,i=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){od(e);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-o):e.hierNode.prelim=o}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=ad(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function td(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function nd(e){return arguments.length?e:dd}function rd(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function id(e,t){return xi["g"](e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function od(e){var t=e.children,n=t.length,r=0,i=0;while(--n>=0){var o=t[n];o.hierNode.prelim+=r,o.hierNode.modifier+=r,i+=o.hierNode.change,r+=o.hierNode.shift+i}}function ad(e,t,n,r){if(t){var i=e,o=e,a=o.parentNode.children[0],s=t,l=i.hierNode.modifier,u=o.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;while(s=sd(s),o=ld(o),s&&o){i=sd(i),a=ld(a),i.hierNode.ancestor=e;var f=s.hierNode.prelim+d-o.hierNode.prelim-u+r(s,o);f>0&&(cd(ud(s,e,n),e,f),u+=f,l+=f),d+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=i.hierNode.modifier,c+=a.hierNode.modifier}s&&!sd(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=d-l),o&&!ld(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=e)}return n}function sd(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function ld(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function ud(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function cd(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function dd(e,t){return e.parentNode===t.parentNode?1:2}var fd=n("e263"),hd=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),pd=function(e){function t(t){return e.call(this,t)||this}return Object(Ye["a"])(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new hd},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,i=t.parentPoint,o=n[0],a=n[r-1];if(1===r)return e.moveTo(i[0],i[1]),void e.lineTo(o[0],o[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=Object(Hn["o"])(t.forkPosition,1),d=[];d[l]=i[l],d[u]=i[u]+(a[u]-i[u])*c,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(o[0],o[1]),d[l]=o[l],e.lineTo(d[0],d[1]),d[l]=a[l],e.lineTo(d[0],d[1]),e.lineTo(a[0],a[1]);for(var f=1;fb.x,w||(_-=Math.PI));var k=w?"left":"right",O=s.getModel("label"),T=O.get("rotate"),E=T*(Math.PI/180),C=v.getTextContent();C&&(v.setTextConfig({position:O.get("position")||k,rotation:null==T?-_:E,origin:"center"}),C.setStyle("verticalAlign","middle"))}var A=s.get(["emphasis","focus"]),M="relative"===A?m["e"](a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===A?a.getAncestorsIndices():"descendant"===A?a.getDescendantIndices():null;M&&(Object(ut["a"])(n).focus=M),md(i,a,c,n,p,h,g,r),n.__edge&&(n.onHoverStateChange=function(t){if("blur"!==t){var r=a.parentNode&&e.getItemGraphicEl(a.parentNode.dataIndex);r&&r.hoverState===un["d"]||Object(un["H"])(n.__edge,t)}})}function md(e,t,n,r,i,o,a,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),d=e.getOrient(),f=e.get(["lineStyle","curveness"]),h=e.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=r.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(g||(g=r.__edge=new Jc["a"]({shape:wd(c,d,f,i,i)})),sn["h"](g,{shape:wd(c,d,f,o,a)},e));else if("polyline"===u)if("orthogonal"===c){if(t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var v=t.children,y=[],b=0;bt&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var r=n.getData().tree.root,i=e.targetNode;if(m["C"](i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var o=e.targetNodeId;if(null!=o&&(i=r.getNodeById(o)))return{node:i}}}function zd(e){var t=[];while(e)e=e.parentNode,e&&t.push(e);return t.reverse()}function Ud(e,t){var n=zd(e);return m["r"](n,t)>=0}function Hd(e,t){var n=[];while(e){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var Vd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return Object(Ye["a"])(t,e),t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=e.leaves||{},r=new Ke["a"](n,this,this.ecModel),i=Bd.createTree(t,this,o);function o(e){e.wrapMethod("getItemModel",(function(e,t){var n=i.getNodeByDataIndex(t);return n&&n.children.length&&n.isExpand||(e.parentModel=r),e}))}var a=0;i.eachNode("preorder",(function(e){e.depth>a&&(a=e.depth)}));var s=e.expandAndCollapse,l=s&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return i.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=l})),i.data},t.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){var r=this.getData().tree,i=r.root.children[0],o=r.getNodeByDataIndex(e),a=o.getValue(),s=o.name;while(o&&o!==i)s=o.parentNode.name+"."+s,o=o.parentNode;return Object(cl["c"])("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Hd(r,this),n.collapsed=!r.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(tn["b"]),Gd=Vd;function qd(e,t,n){var r,i=[e],o=[];while(r=i.pop())if(o.push(r),r.isExpand){var a=r.children;if(a.length)for(var s=0;s=0;o--)r.push(i[o])}}function Yd(e,t){e.eachSeriesByType("tree",(function(e){Kd(e,t)}))}function Kd(e,t){var n=id(e,t);e.layoutInfo=n;var r=e.get("layout"),i=0,o=0,a=null;"radial"===r?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,a=nd((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(i=n.width,o=n.height,a=nd());var s=e.getData().tree.root,l=s.children[0];if(l){Qc(s),qd(l,ed,a),s.hierNode.modifier=-l.hierNode.prelim,Wd(l,td);var u=l,c=l,d=l;Wd(l,(function(e){var t=e.getLayout().x;tc.getLayout().x&&(c=e),e.depth>d.depth&&(d=e)}));var f=u===c?1:a(u,c)/2,h=f-u.getLayout().x,p=0,g=0,v=0,y=0;if("radial"===r)p=i/(c.getLayout().x+f+h),g=o/(d.depth-1||1),Wd(l,(function(e){v=(e.getLayout().x+h)*p,y=(e.depth-1)*g;var t=rd(v,y);e.setLayout({x:t.x,y:t.y,rawX:v,rawY:y},!0)}));else{var m=e.getOrient();"RL"===m||"LR"===m?(g=o/(c.getLayout().x+f+h),p=i/(d.depth-1||1),Wd(l,(function(e){y=(e.getLayout().x+h)*g,v="LR"===m?(e.depth-1)*p:i-(e.depth-1)*p,e.setLayout({x:v,y:y},!0)}))):"TB"!==m&&"BT"!==m||(p=i/(c.getLayout().x+f+h),g=o/(d.depth-1||1),Wd(l,(function(e){v=(e.getLayout().x+h)*p,y="TB"===m?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:v,y:y},!0)})))}}}function Xd(e){e.eachSeriesByType("tree",(function(e){var t=e.getData(),n=t.tree;n.eachNode((function(e){var n=e.getModel(),r=n.getModel("itemStyle").getItemStyle(),i=t.ensureUniqueItemVisual(e.dataIndex,"style");Object(m["m"])(i,r)}))}))}function Zd(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=e.dataIndex,r=t.getData().tree,i=r.getNodeByDataIndex(n);i.isExpand=!i.isExpand}))})),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var r=t.coordinateSystem,i=qc(r,e,void 0,n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)}))}))}function $d(e){e.registerChartView(Sd),e.registerSeriesModel(Gd),e.registerLayout(Yd),e.registerVisual(Xd),Zd(e)}var Jd=["treemapZoomToNode","treemapRender","treemapMove"];function Qd(e){for(var t=0;t1)n=n.parentNode;var i=Object(ef["b"])(e.ecModel,n.name||n.dataIndex+"",r);t.setVisual("decal",i)}))}var nf=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return Object(Ye["a"])(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};rf(n);var r=e.levels||[],i=this.designatedVisualItemStyle={},o=new Ke["a"]({itemStyle:i},this,t);r=e.levels=of(r,t);var a=m["H"](r||[],(function(e){return new Ke["a"](e,o,t)}),this),s=Bd.createTree(n,this,l);function l(e){e.wrapMethod("getItemModel",(function(e,t){var n=s.getNodeByDataIndex(t),r=n?a[n.depth]:null;return e.parentModel=r||o,e}))}return s.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),o=r.getName(e);return Object(cl["c"])("nameValue",{name:o,value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Hd(r,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},m["m"](this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=m["f"](),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){tf(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(tn["b"]);function rf(e){var t=0;m["k"](e.children,(function(e){rf(e);var n=e.value;m["t"](n)&&(n=n[0]),t+=n}));var n=e.value;m["t"](n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),m["t"](e.value)?e.value[0]=n:e.value=n}function of(e,t){var n=Object(lt["r"])(t.get("color")),r=Object(lt["r"])(t.get(["aria","decal","decals"]));if(n){var i,o;e=e||[],m["k"](e,(function(e){var t=new Ke["a"](e),n=t.get("color"),r=t.get("decal");(t.get(["itemStyle","color"])||n&&"none"!==n)&&(i=!0),(t.get(["itemStyle","decal"])||r&&"none"!==r)&&(o=!0)}));var a=e[0]||(e[0]={});return i||(a.color=n.slice()),!o&&r&&(a.decal=r.slice()),e}}var af=nf,sf=8,lf=8,uf=5,cf=function(){function e(e){this.group=new rn["a"],e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),i.get("show")&&n){var a=i.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(e,l,a,s,r),xi["i"](o,l.pos,l.box)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=Object(lt["e"])(r.getModel().get("name"),""),o=n.getTextRect(i),a=Math.max(o.width+2*sf,t.emptyItemWidth);t.totalWidth+=a+lf,t.renderList.push({node:r,text:i,width:a})}},e.prototype._renderContent=function(e,t,n,r,i){for(var o=0,a=t.emptyItemWidth,s=e.get(["breadcrumb","height"]),l=xi["e"](t.pos,t.box),u=t.totalWidth,c=t.renderList,d=c.length-1;d>=0;d--){var f=c[d],h=f.node,p=f.width,g=f.text;u>l.width&&(u-=p-a,p=a,g=null);var v=new sl["a"]({shape:{points:df(o,0,p,s,d===c.length-1,0===d)},style:Object(m["i"])(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new J["a"]({style:{text:g,fill:r.getTextColor(),font:r.getFont()}}),textConfig:{position:"inside"},z2:1e4*un["j"],onclick:Object(m["h"])(i,h)});v.disableLabelAnimation=!0,this.group.add(v),ff(v,e,h),o+=p+lf}},e.prototype.remove=function(){this.group.removeAll()},e}();function df(e,t,n,r,i,o){var a=[[i?e:e-uf,t],[e+n,t],[e+n,t+r],[i?e:e-uf,t+r]];return!o&&a.splice(2,0,[e+n+uf,t+r/2]),!i&&a.push([e,t+r/2]),a}function ff(e,t,n){Object(ut["a"])(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&Hd(n,t)}}var hf=cf,pf=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;rbf||Math.abs(e.dy)>bf)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var i=r.getLayout();if(!i)return;var o=new Zi["a"](i.x,i.y,i.width,i.height),a=this.seriesModel.layoutInfo;t-=a.x,n-=a.y;var s=La["c"]();La["i"](s,s,[-t,-n]),La["h"](s,s,[e.scale,e.scale]),La["i"](s,s,[t,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},t.prototype._initEvents=function(e){var t=this;e.on("click",(function(e){if("ready"===t._state){var n=t.seriesModel.get("nodeClick",!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if("zoomToNode"===n)t._zoomToNode(r);else if("link"===n){var o=i.hostTree.data.getItemModel(i.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&Object(Yn["j"])(a,s)}}}}}),this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new hf(this.group))).render(e,t,n.node,(function(t){"animating"!==r._state&&(Ud(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))}))},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Af(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n,r=this.seriesModel.getViewRoot();return r.eachNode({attr:"viewChildren",order:"preorder"},(function(r){var i=this._storage.background[r.getRawIndex()];if(i){var o=i.transformCoordToLocal(e,t),a=i.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:r,offsetX:o[0],offsetY:o[1]}}}),this),n},t.type="treemap",t}(Fn["a"]);function Af(){return{nodeGroup:[],background:[],content:[]}}function Mf(e,t,n,r,i,o,a,s,l,u){if(a){var c=a.getLayout(),d=e.getData(),f=a.getModel();if(d.setItemGraphicEl(a.dataIndex,null),c&&c.isInView){var h=c.width,p=c.height,g=c.borderWidth,v=c.invisible,y=a.getRawIndex(),b=s&&s.getRawIndex(),x=a.viewChildren,_=c.upperHeight,w=x&&x.length,S=f.getModel("itemStyle"),k=f.getModel(["emphasis","itemStyle"]),O=f.getModel(["blur","itemStyle"]),T=f.getModel(["select","itemStyle"]),E=S.get("borderRadius")||0,C=U("nodeGroup",yf);if(C){if(l.add(C),C.x=c.x||0,C.y=c.y||0,C.markRedraw(),Ef(C).nodeWidth=h,Ef(C).nodeHeight=p,c.isAboveViewRoot)return C;var A=U("background",mf,u,Sf);A&&R(C,A,w&&c.upperLabelHeight);var M=f.getModel("emphasis"),L=M.get("focus"),I=M.get("blurScope"),D=M.get("disabled"),j="ancestor"===L?a.getAncestorsIndices():"descendant"===L?a.getDescendantIndices():L;if(w)Object(un["y"])(C)&&Object(un["F"])(C,!1),A&&(Object(un["F"])(A,!D),d.setItemGraphicEl(a.dataIndex,A),Object(un["p"])(A,j,I));else{var P=U("content",mf,u,kf);P&&N(C,P),A.disableMorphing=!0,A&&Object(un["y"])(A)&&Object(un["F"])(A,!1),Object(un["F"])(C,!D),d.setItemGraphicEl(a.dataIndex,C),Object(un["p"])(C,j,I)}return C}}}function R(t,n,r){var i=Object(ut["a"])(n);if(i.dataIndex=a.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:h,height:p,r:E}),v)B(n);else{n.invisible=!1;var o=a.getVisual("style"),s=o.stroke,l=Tf(S);l.fill=s;var u=Of(k);u.fill=k.get("borderColor");var c=Of(O);c.fill=O.get("borderColor");var d=Of(T);if(d.fill=T.get("borderColor"),r){var f=h-2*g;F(n,s,o.opacity,{x:g,y:0,width:f,height:_})}else n.removeTextContent();n.setStyle(l),n.ensureState("emphasis").style=u,n.ensureState("blur").style=c,n.ensureState("select").style=d,Object(un["G"])(n)}t.add(n)}function N(t,n){var r=Object(ut["a"])(n);r.dataIndex=a.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(h-2*g,0),o=Math.max(p-2*g,0);if(n.culling=!0,n.setShape({x:g,y:g,width:i,height:o,r:E}),v)B(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,u=Tf(S);u.fill=l,u.decal=s.decal;var c=Of(k),d=Of(O),f=Of(T);F(n,l,s.opacity,null),n.setStyle(u),n.ensureState("emphasis").style=c,n.ensureState("blur").style=d,n.ensureState("select").style=f,Object(un["G"])(n)}t.add(n)}function B(e){!e.invisible&&o.push(e)}function F(t,n,r,i){var o=f.getModel(i?_f:xf),s=Object(lt["e"])(f.get("name"),null),l=o.getShallow("show");Object(fn["g"])(t,Object(fn["e"])(f,i?_f:xf),{defaultText:l?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:a.dataIndex});var u=t.getTextContent();if(u){var d=u.style,h=Object(m["M"])(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-h[1]-h[3],0),n=Math.max((i?i.height:t.shape.height)-h[0]-h[2],0);d.width===e&&d.height===n||u.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow="truncate",z(d,i,c);var p=u.getState("emphasis");z(p?p.style:null,i,c)}}function z(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&null!=i){var o=e.get("drillDownIcon",!0);t.text=o?o+" "+i:i}}function U(e,r,o,a){var s=null!=b&&n[e][b],l=i[e];return s?(n[e][b]=null,H(l,s)):v||(s=new r,s instanceof oc["c"]&&(s.z2=Lf(o,a)),V(l,s)),t[e][y]=s}function H(e,t){var n=e[y]={};t instanceof yf?(n.oldX=t.x,n.oldY=t.y):n.oldShape=Object(m["m"])({},t.shape)}function V(e,t){var n=e[y]={},o=a.parentNode,s=t instanceof rn["a"];if(o&&(!r||"drillDown"===r.direction)){var l=0,u=0,c=i.background[o.getRawIndex()];!r&&c&&c.oldShape&&(l=c.oldShape.width,u=c.oldShape.height),s?(n.oldX=0,n.oldY=u):n.oldShape={x:l,y:u,width:0,height:0}}n.fadein=!s}}function Lf(e,t){return e*wf+t}var If=Cf,Df=n("edae"),jf=m["k"],Pf=m["A"],Rf=-1,Nf=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=m["d"](t);this.type=r,this.mappingMethod=n,this._normalizeData=Xf[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(zf(i),Bf(i)):"category"===n?i.categories?Ff(i):zf(i,!0):(m["b"]("linear"!==n||i.dataExtent),zf(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return m["c"](this._normalizeData,this)},e.listVisualTypes=function(){return m["F"](e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){m["A"](e)?m["k"](e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=m["t"](t)?[]:m["A"](t)?{}:(i=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a})),o},e.retrieveVisuals=function(t){var n,r={};return t&&jf(e.visualHandlers,(function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(m["t"](e))e=e.slice();else{if(!Pf(e))return[];var t=[];jf(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,a=t.length;o=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}function zf(e,t){var n=e.visual,r=[];m["A"](n)?jf(n,(function(e){r.push(e)})):null!=n&&r.push(n);var i={color:1,symbol:1};t||1!==r.length||i.hasOwnProperty(e.type)||(r[1]=r[0]),Kf(e,r)}function Uf(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:Wf([0,1])}}function Hf(e){var t=this.option.visual;return t[Math.round(Object(Hn["k"])(e,[0,1],[0,t.length-1],!0))]||{}}function Vf(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function Gf(e){var t=this.option.visual;return t[this.option.loop&&e!==Rf?e%t.length:e]}function qf(){return this.option.visual[0]}function Wf(e){return{linear:function(t){return Object(Hn["k"])(t,e,this.option.visual,!0)},category:Gf,piecewise:function(t,n){var r=Yf.call(this,n);return null==r&&(r=Object(Hn["k"])(t,e,this.option.visual,!0)),r},fixed:qf}}function Yf(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=Nf.findPieceIndex(e,n),i=n[r];if(i&&i.visual)return i.visual[this.type]}}function Kf(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=m["H"](t,(function(e){var t=Kn["g"](e);return t||[0,0,0,1]}))),t}var Xf={linear:function(e){return Object(Hn["k"])(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=Nf.findPieceIndex(e,t,!0);if(null!=n)return Object(Hn["k"])(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?Rf:t},fixed:m["L"]};function Zf(e,t,n){return e?t<=n:t=n.length||e===n[e.depth]){var o=lh(i,u,e,t,p,r);th(e,o,n,r)}}))}else s=rh(u),c.fill=s}}function nh(e,t,n){var r=Object(m["m"])({},t),i=n.designatedVisualItemStyle;return Object(m["k"])(["color","colorAlpha","colorSaturation"],(function(n){i[n]=t[n];var o=e.get(n);i[n]=null,null!=o&&(r[n]=o)})),r}function rh(e){var t=oh(e,"color");if(t){var n=oh(e,"colorAlpha"),r=oh(e,"colorSaturation");return r&&(t=Object(Kn["f"])(t,null,null,r)),n&&(t=Object(Kn["e"])(t,n)),t}}function ih(e,t){return null!=t?Object(Kn["f"])(t,null,null,e):null}function oh(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function ah(e,t,n,r,i,o){if(o&&o.length){var a=sh(t,"color")||null!=i.color&&"none"!==i.color&&(sh(t,"colorAlpha")||sh(t,"colorSaturation"));if(a){var s=t.get("visualMin"),l=t.get("visualMax"),u=n.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var c=t.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var f=new $f(d);return Qf(f).drColorMappingBy=c,f}}}function sh(e,t){var n=e.get(t);return Object(m["t"])(n)&&n.length?{name:t,range:n}:null}function lh(e,t,n,r,i,o){var a=Object(m["m"])({},t);if(i){var s=i.type,l="color"===s&&Qf(i).drColorMappingBy,u="index"===l?r:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));a[s]=i.mapValueToVisual(u)}return a}var uh=Math.max,ch=Math.min,dh=m["O"],fh=m["k"],hh=["itemStyle","borderWidth"],ph=["itemStyle","gapWidth"],gh=["upperLabel","show"],vh=["upperLabel","height"],yh={seriesType:"treemap",reset:function(e,t,n,r){var i=n.getWidth(),o=n.getHeight(),a=e.option,s=xi["g"](e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Object(Hn["o"])(dh(s.width,l[0]),i),c=Object(Hn["o"])(dh(s.height,l[1]),o),d=r&&r.type,f=["treemapZoomToNode","treemapRootToNode"],h=Fd(r,f,e),p="treemapRender"===d||"treemapMove"===d?r.rootRect:null,g=e.getViewRoot(),v=zd(g);if("treemapMove"!==d){var y="treemapZoomToNode"===d?Oh(e,h,g,u,c):p?[p.width,p.height]:[u,c],b=a.sort;b&&"asc"!==b&&"desc"!==b&&(b="desc");var x={squareRatio:a.squareRatio,sort:b,leafDepth:a.leafDepth};g.hostTree.clearLayouts();var _={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};g.setLayout(_),mh(g,x,!1,0),_=g.getLayout(),fh(v,(function(e,t){var n=(v[t+1]||g).getValue();e.setLayout(m["m"]({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))}))}var w=e.getData().tree.root;w.setLayout(Th(s,p,h),!0),e.setLayoutInfo(s),Eh(w,new Zi["a"](-s.x,-s.y,i,o),v,g,0)}};function mh(e,t,n,r){var i,o;if(!e.isRemoved()){var a=e.getLayout();i=a.width,o=a.height;var s=e.getModel(),l=s.get(hh),u=s.get(ph)/2,c=Ch(s),d=Math.max(l,c),f=l-u,h=d-u;e.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0),i=uh(i-2*f,0),o=uh(o-f-h,0);var p=i*o,g=bh(e,s,p,t,n,r);if(g.length){var v={x:f,y:h,width:i,height:o},y=ch(i,o),m=1/0,b=[];b.area=0;for(var x=0,_=g.length;x<_;){var w=g[x];b.push(w),b.area+=w.getLayout().area;var S=Sh(b,y,t.squareRatio);S<=m?(x++,m=S):(b.area-=b.pop().getLayout().area,kh(b,y,v,u,!1),y=ch(v.width,v.height),b.length=b.area=0,m=1/0)}if(b.length&&kh(b,y,v,u,!0),!n){var k=s.get("childrenVisibleMin");null!=k&&p=0;l--){var u=i["asc"===r?a-l-1:l].getValue();u/n*ta[1]&&(a[1]=t)}))):a=[NaN,NaN],{sum:r,dataExtent:a}}function Sh(e,t,n){for(var r=0,i=1/0,o=0,a=void 0,s=e.length;or&&(r=a));var l=e.area*e.area,u=t*t*n;return l?uh(u*r/l,l/(u*i)):1/0}function kh(e,t,n,r,i){var o=t===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=t?e.area/t:0;(i||c>n[l[a]])&&(c=n[l[a]]);for(var d=0,f=e.length;dHn["a"]&&(u=Hn["a"]),a=o}ur&&(r=t);var o=r%2?r+2:r+3;i=[];for(var a=0;a0&&(m[0]=-m[0],m[1]=-m[1]);var x=y[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var _=-Math.atan2(y[1],y[0]);u[0].8?"left":c[0]<-.8?"right":"center",f=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":r.x=-c[0]*p+l[0],r.y=-c[1]*g+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",f=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r.x=p*x+l[0],r.y=l[1]+w,d=y[0]<0?"right":"left",r.originX=-p*x,r.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r.x=b[0],r.y=b[1]+w,d="center",r.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r.x=-p*x+u[0],r.y=u[1]+w,d=y[0]>=0?"right":"left",r.originX=p*x,r.originY=-w;break}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||f,align:r.__align||d})}}}function S(e,t){var n=e.__specifiedRotation;if(null==n){var r=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(rn["a"]),mp=yp,bp=function(){function e(e){this.group=new rn["a"],this._LineCtor=e||mp}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var o=_p(e);e.diff(i).add((function(n){t._doAdd(e,n,o)})).update((function(n,r){t._doUpdate(i,e,r,n,o)})).remove((function(e){r.remove(i.getItemGraphicEl(e))})).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=_p(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||xp(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=e.start;r0}function _p(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:Object(fn["e"])(t)}}function wp(e){return isNaN(e[0])||isNaN(e[1])}function Sp(e){return e&&!wp(e[0])&&!wp(e[1])}var kp=bp,Op=[],Tp=[],Ep=[],Cp=Mn["h"],Ap=Ia["g"],Mp=Math.abs;function Lp(e,t,n){for(var r,i=e[0],o=e[1],a=e[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1){Op[0]=Cp(i[0],o[0],a[0],c),Op[1]=Cp(i[1],o[1],a[1],c);var d=Mp(Ap(Op,t)-l);d=0?r+=u:r-=u:p>=0?r-=u:r+=u}return r}function Ip(e,t){var n=[],r=Mn["n"],i=[[],[],[]],o=[[],[]],a=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[Ia["c"](l[0]),Ia["c"](l[1])],l[2]&&l.__original.push(Ia["c"](l[2])));var d=l.__original;if(null!=l[2]){if(Ia["d"](i[0],d[0]),Ia["d"](i[1],d[2]),Ia["d"](i[2],d[1]),u&&"none"!==u){var f=Xh(e.node1),h=Lp(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],h,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],h,n),i[0][1]=n[3],i[1][1]=n[4]}if(c&&"none"!==c){f=Xh(e.node2),h=Lp(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],h,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],h,n),i[1][1]=n[1],i[2][1]=n[2]}Ia["d"](l[0],i[0]),Ia["d"](l[1],i[2]),Ia["d"](l[2],i[1])}else{if(Ia["d"](o[0],d[0]),Ia["d"](o[1],d[1]),Ia["q"](a,o[1],o[0]),Ia["m"](a,a),u&&"none"!==u){f=Xh(e.node1);Ia["o"](o[0],o[0],a,f*t)}if(c&&"none"!==c){f=Xh(e.node2);Ia["o"](o[1],o[1],a,-f*t)}Ia["d"](l[0],o[0]),Ia["d"](l[1],o[1])}}))}function Dp(e){return"view"===e.type}var jp=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.init=function(e,t){var n=new xn,r=new kp,i=this.group;this._controller=new zl(t.getZr()),this._controllerHost={target:i},i.add(n.group),i.add(r.group),this._symbolDraw=n,this._lineDraw=r,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem;this._model=e;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(Dp(i)){var l={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY};this._firstRender?s.attr(l):sn["h"](s,l,e)}Ip(e.getGraph(),Kh(e));var u=e.getData();o.updateData(u);var c=e.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,f=e.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,f),u.graph.eachNode((function(e){var t=e.dataIndex,n=e.getGraphicEl(),i=e.getModel();if(n){n.off("drag").off("dragend");var o=i.get("draggable");o&&n.on("drag",(function(){d&&(d.warmUp(),!r._layouting&&r._startForceLayoutIteration(d,f),d.setFixed(t),u.setItemLayout(t,[n.x,n.y]))})).on("dragend",(function(){d&&d.setUnfixed(t)})),n.setDraggable(o&&!!d,!!i.get("cursor"));var a=i.get(["emphasis","focus"]);"adjacency"===a&&(Object(ut["a"])(n).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(e){var t=e.getGraphicEl(),n=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===n&&(Object(ut["a"])(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})}));var h="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(e,t){var n=u.getItemModel(t),r=n.get(["label","rotate"])||0,i=e.getSymbolPath();if(h){var o=u.getItemLayout(t),a=Math.atan2(o[1]-g,o[0]-p);a<0&&(a=2*Math.PI+a);var s=o[0]=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof Bp||(t=this._nodesMap[Rp(t)]),t){for(var i="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(i=0,o=r.length;i=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}m["K"](Bp,zp("hostGraph","data")),m["K"](Fp,zp("hostGraph","edgeData"));var Up=Np;function Hp(e,t,n,r,i){for(var o=new Up(r),a=0;a "+f)),u++)}var h,p=n.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)h=en(e,n);else{var g=zt["a"].get(p),v=g&&g.dimensions||[];m["r"](v,"value")<0&&v.concat(["value"]);var y=Rt(e,{coordDimensions:v,encodeDefine:n.getEncode()}).dimensions;h=new jt(y,n),h.initData(e)}var b=new jt(["value"],n);return b.initData(l,s),i&&i(h,b),jd({mainData:h,struct:o,structAttr:"graph",datas:{node:h,edge:b},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var Vp=n("f6d8"),Gp=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Object(Ye["a"])(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function r(){return n._categoriesData}this.legendVisualProvider=new Vi(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),Object(lt["f"])(t,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=this;if(r&&n){Hh(this);var o=Hp(r,n,this,!0,a);return m["k"](o.edges,(function(e){Vh(e.node1,e.node2,this,e.dataIndex)}),this),o.data}function a(e,t){e.wrapMethod("getItemModel",(function(e){var t=i._categoriesModels,n=e.getShallow("category"),r=t[n];return r&&(r.parentModel=e.parentModel,e.parentModel=r),e}));var n=Ke["a"].prototype.getModel;function r(e,t){var r=n.call(this,e,t);return r.resolveParentPath=o,r}function o(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",(function(e){return e.resolveParentPath=o,e.getModel=r,e}))}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if("edge"===n){var r=this.getData(),i=this.getDataParams(e,n),o=r.graph.getEdgeByIndex(e),a=r.getName(o.node1.dataIndex),s=r.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Object(cl["c"])("nameValue",{name:l.join(" > "),value:i.value,noValue:null==i.value})}var u=Object(Vp["a"])({series:this,dataIndex:e,multipleSeries:t});return u},t.prototype._updateCategoriesData=function(){var e=m["H"](this.option.categories||[],(function(e){return null!=e.value?e:m["m"]({value:0},e)})),t=new jt(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e)}))},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(tn["b"]),qp=Gp,Wp={type:"graphRoam",event:"graphRoam",update:"none"};function Yp(e){e.registerChartView(Pp),e.registerSeriesModel(qp),e.registerProcessor(Mh),e.registerVisual(Lh),e.registerVisual(Dh),e.registerLayout(Yh),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,ep),e.registerLayout(rp),e.registerCoordinateSystem("graphView",{dimensions:Lc.dimensions,create:op}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},m["L"]),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},m["L"]),e.registerAction(Wp,(function(e,t,n){t.eachComponent({mainType:"series",query:e},(function(t){var r=t.coordinateSystem,i=qc(r,e,void 0,n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)}))}))}var Kp=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),Xp=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return Object(Ye["a"])(t,e),t.prototype.getDefaultShape=function(){return new Kp},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,o=t.width,a=t.angle,s=t.x-n(a)*o*(o>=i/3?1:2),l=t.y-r(a)*o*(o>=i/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*o,t.y+r(a)*o),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(a)*o,t.y-r(a)*o),e.lineTo(s,l)},t}(a["b"]),Zp=Xp;function $p(e,t){var n=e.get("center"),r=t.getWidth(),i=t.getHeight(),o=Math.min(r,i),a=Object(Hn["o"])(n[0],t.getWidth()),s=Object(Hn["o"])(n[1],t.getHeight()),l=Object(Hn["o"])(e.get("radius"),o/2);return{cx:a,cy:s,r:l}}function Jp(e,t){var n=null==e?"":e+"";return t&&(Object(m["C"])(t)?n=t.replace("{value}",n):Object(m["w"])(t)&&(n=t(e))),n}var Qp=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get(["axisLine","lineStyle","color"]),i=$p(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var o=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,u=e.getModel("axisLine"),c=u.get("roundCap"),d=c?Hr:Un["a"],f=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),g=[s,l];Object(z["b"])(g,!a),s=g[0],l=g[1];for(var v=l-s,y=s,m=0;f&&m=e&&(0===t?0:r[t-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:j}),silent:!0}))}if(m.get("show")&&M!==x){L=m.get("distance");L=L?L+l:l;for(var P=0;P<=_;P++){u=Math.cos(k),c=Math.sin(k);var R=new vs["a"]({shape:{x1:u*(p-L)+f,y1:c*(p-L)+h,x2:u*(p-S-L)+f,y2:c*(p-S-L)+h},silent:!0,style:C});"auto"===C.stroke&&R.setStyle({stroke:r((M+P/_)/x)}),d.add(R),k+=T}k-=T}else k+=O}},t.prototype._renderPointer=function(e,t,n,r,i,o,a,l,u){var c=this.group,d=this._data,f=this._progressEls,h=[],p=e.get(["pointer","show"]),g=e.getModel("progress"),v=g.get("show"),y=e.getData(),b=y.mapDimension("value"),x=+e.get("min"),_=+e.get("max"),w=[x,_],S=[o,a];function k(t,n){var r,o=y.getItemModel(t),a=o.getModel("pointer"),s=Object(Hn["o"])(a.get("width"),i.r),l=Object(Hn["o"])(a.get("length"),i.r),u=e.get(["pointer","icon"]),c=a.get("offsetCenter"),d=Object(Hn["o"])(c[0],i.r),f=Object(Hn["o"])(c[1],i.r),h=a.get("keepAspect");return r=u?Object(nn["a"])(u,d-s/2,f-l,s,l,null,h):new Zp({shape:{angle:-Math.PI/2,width:s,r:l,x:d,y:f}}),r.rotation=-(n+Math.PI/2),r.x=i.cx,r.y=i.cy,r}function O(e,t){var n=g.get("roundCap"),r=n?Hr:Un["a"],a=g.get("overlap"),s=a?g.get("width"):u/y.count(),c=a?i.r-s:i.r-(e+1)*s,d=a?i.r:i.r-e*s,f=new r({shape:{startAngle:o,endAngle:t,cx:i.cx,cy:i.cy,clockwise:l,r0:c,r:d}});return a&&(f.z2=_-y.get(b,e)%_),f}(v||p)&&(y.diff(d).add((function(t){var n=y.get(b,t);if(p){var r=k(t,o);sn["c"](r,{rotation:-((isNaN(+n)?S[0]:Object(Hn["k"])(n,w,S,!0))+Math.PI/2)},e),c.add(r),y.setItemGraphicEl(t,r)}if(v){var i=O(t,o),a=g.get("clip");sn["c"](i,{shape:{endAngle:Object(Hn["k"])(n,w,S,a)}},e),c.add(i),Object(ut["b"])(e.seriesIndex,y.dataType,t,i),h[t]=i}})).update((function(t,n){var r=y.get(b,t);if(p){var i=d.getItemGraphicEl(n),a=i?i.rotation:o,s=k(t,a);s.rotation=a,sn["h"](s,{rotation:-((isNaN(+r)?S[0]:Object(Hn["k"])(r,w,S,!0))+Math.PI/2)},e),c.add(s),y.setItemGraphicEl(t,s)}if(v){var l=f[n],u=l?l.shape.endAngle:o,m=O(t,u),x=g.get("clip");sn["h"](m,{shape:{endAngle:Object(Hn["k"])(r,w,S,x)}},e),c.add(m),Object(ut["b"])(e.seriesIndex,y.dataType,t,m),h[t]=m}})).execute(),y.each((function(e){var t=y.getItemModel(e),n=t.getModel("emphasis"),i=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(p){var l=y.getItemGraphicEl(e),u=y.getItemVisual(e,"style"),c=u.fill;if(l instanceof s["a"]){var d=l.style;l.useStyle(Object(m["m"])({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},u))}else l.useStyle(u),"pointer"!==l.type&&l.setColor(c);l.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===l.style.fill&&l.setStyle("fill",r(Object(Hn["k"])(y.get(b,e),w,[0,1],!0))),l.z2EmphasisLift=0,Object(un["I"])(l,t),Object(un["J"])(l,i,o,a)}if(v){var f=h[e];f.useStyle(y.getItemVisual(e,"style")),f.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),f.z2EmphasisLift=0,Object(un["I"])(f,t),Object(un["J"])(f,i,o,a)}})),this._progressEls=h)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor"),r=n.get("show");if(r){var i=n.get("size"),o=n.get("icon"),a=n.get("offsetCenter"),s=n.get("keepAspect"),l=Object(nn["a"])(o,t.cx-i/2+Object(Hn["o"])(a[0],t.r),t.cy-i/2+Object(Hn["o"])(a[1],t.r),i,i,null,s);l.z2=n.get("showAbove")?1:0,l.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(l)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var o=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new rn["a"],d=[],f=[],h=e.isAnimationEnabled(),p=e.get(["pointer","showAbove"]);a.diff(this._data).add((function(e){d[e]=new J["a"]({silent:!0}),f[e]=new J["a"]({silent:!0})})).update((function(e,t){d[e]=o._titleEls[t],f[e]=o._detailEls[t]})).execute(),a.each((function(t){var n=a.getItemModel(t),o=a.get(s,t),g=new rn["a"],v=r(Object(Hn["k"])(o,[l,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var m=y.get("offsetCenter"),b=i.cx+Object(Hn["o"])(m[0],i.r),x=i.cy+Object(Hn["o"])(m[1],i.r),_=d[t];_.attr({z2:p?0:2,style:Object(fn["c"])(y,{x:b,y:x,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:v})}),g.add(_)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),k=i.cx+Object(Hn["o"])(S[0],i.r),O=i.cy+Object(Hn["o"])(S[1],i.r),T=Object(Hn["o"])(w.get("width"),i.r),E=Object(Hn["o"])(w.get("height"),i.r),C=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:v,A=(_=f[t],w.get("formatter"));_.attr({z2:p?0:2,style:Object(fn["c"])(w,{x:k,y:O,text:Jp(o,A),width:isNaN(T)?null:T,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:C})}),Object(fn["h"])(_,{normal:w},o,(function(e){return Jp(e,A)})),h&&Object(fn["a"])(_,t,a,e,{getFormattedLabel:function(e,t,n,r,i,a){return Jp(a?a.interpolatedValue:o,A)}}),g.add(_)}c.add(g)})),this.group.add(c),this._titleEls=d,this._detailEls=f},t.type="gauge",t}(Fn["a"]),eg=Qp,tg=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return Object(Ye["a"])(t,e),t.prototype.getInitialData=function(e,t){return Ui(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(tn["b"]),ng=tg;function rg(e){e.registerChartView(eg),e.registerSeriesModel(ng)}var ig=["itemStyle","opacity"],og=function(e){function t(t,n){var r=e.call(this)||this,i=r,o=new Ei["a"],a=new J["a"];return i.setTextContent(a),r.setTextGuideLine(o),r.updateData(t,n,!0),r}return Object(Ye["a"])(t,e),t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,o=e.getItemModel(t),a=e.getItemLayout(t),s=o.getModel("emphasis"),l=o.get(ig);l=null==l?1:l,n||Object(sn["g"])(r),r.useStyle(e.getItemVisual(t,"style")),r.style.lineJoin="round",n?(r.setShape({points:a.points}),r.style.opacity=0,sn["c"](r,{style:{opacity:l}},i,t)):sn["h"](r,{style:{opacity:l},shape:{points:a.points}},i,t),Object(un["I"])(r,o),this._updateLabel(e,t),Object(un["J"])(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),o=e.hostModel,a=e.getItemModel(t),s=e.getItemLayout(t),l=s.label,u=e.getItemVisual(t,"style"),c=u.fill;Object(fn["g"])(i,Object(fn["e"])(a),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:u.opacity,defaultText:e.getName(t)},{normal:{align:l.textAlign,verticalAlign:l.verticalAlign}}),n.setTextConfig({local:!0,inside:!!l.inside,insideStroke:c,outsideFill:c});var d=l.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new Ci["a"](d[0][0],d[0][1]):null},sn["h"](i,{style:{x:l.x,y:l.y}},o,t),i.attr({rotation:l.rotation,originX:l.x,originY:l.y,z2:10}),Object(Ai["d"])(n,Object(Ai["a"])(a),{stroke:c})},t}(sl["a"]),ag=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,o=this.group;r.diff(i).add((function(e){var t=new og(r,e);r.setItemGraphicEl(e,t),o.add(t)})).update((function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),o.add(n),r.setItemGraphicEl(e,n)})).remove((function(t){var n=i.getItemGraphicEl(t);sn["f"](n,e,t)})).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(Fn["a"]),sg=ag,lg=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Vi(m["c"](this.getData,this),m["c"](this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return Ui(this,{coordDimensions:["value"],encodeDefaulter:m["h"](Pt["d"],this)})},t.prototype._defaultLabelLine=function(e){Object(lt["f"])(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return r.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,r.$vars.push("percent"),r},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(tn["b"]),ug=lg;function cg(e,t){return xi["g"](e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function dg(e,t){for(var n=e.mapDimension("value"),r=e.mapArray(n,(function(e){return e})),i=[],o="ascending"===t,a=0,s=e.count();ajg)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&Ng(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===r?null:{duration:0}})}}};function Ng(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}var Bg=Pg,Fg=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&m["I"](t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){m["k"](["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],n=m["n"](this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);m["k"](n,(function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)}))},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(oo["a"]),zg=Fg,Ug=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.type=i||"value",a.axisIndex=o,a}return Object(Ye["a"])(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(ns),Hg=Ug;function Vg(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=qg(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=qg(s,[0,a]),i=o=qg(s,[i,o]),r=0}t[0]=qg(t[0],n),t[1]=qg(t[1],n);var l=Gg(t,r);t[r]+=e;var u,c=i||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[r]=qg(t[r],d),u=Gg(t,r),null!=i&&(u.sign!==l.sign||u.spano&&(t[1-r]=t[r]+u.sign*o),t}function Gg(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function qg(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var Wg=m["k"],Yg=Math.min,Kg=Math.max,Xg=Math.floor,Zg=Math.ceil,$g=Hn["u"],Jg=Math.PI,Qg=function(){function e(e,t,n){this.type="parallel",this._axesMap=m["f"](),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=e.dimensions,i=e.parallelAxisIndex;Wg(r,(function(e,n){var r=i[n],o=t.getComponent("parallelAxis",r),a=this._axesMap.set(e,new Hg(e,ba(o),[0,0],o.get("type"),r)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],a=e[i];return o>=n&&o<=n+t.axisLength&&a>=r&&a<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries((function(n){if(e.contains(n,t)){var r=n.getData();Wg(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(r,r.mapDimension(e)),ma(t.scale,t.model)}),this)}}),this)},e.prototype.resize=function(e,t){this._rect=xi["g"](e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,n=this._rect,r=["x","y"],i=["width","height"],o=t.get("layout"),a="horizontal"===o?0:1,s=n[i[a]],l=[0,s],u=this.dimensions.length,c=ev(t.get("axisExpandWidth"),l),d=ev(t.get("axisExpandCount")||0,[0,u]),f=t.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,h=t.get("axisExpandWindow");if(h)e=ev(h[1]-h[0],l),h[1]=h[0]+e;else{e=ev(c*(d-1),l);var p=t.get("axisExpandCenter")||Xg(u/2);h=[c*p-e/2],h[1]=h[0]+e}var g=(s-e)/(u-d);g<3&&(g=0);var v=[Xg($g(h[0]/c,1))+1,Zg($g(h[1]/c,1))-1],y=g/c*h[0];return{layout:o,pixelDimIndex:a,layoutBase:n[r[a]],layoutLength:s,axisBase:n[r[1-a]],axisLength:n[i[1-a]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:v,axisExpandWindow0Pos:y}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;t.each((function(e){var t=[0,r.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])})),Wg(n,(function(t,n){var o=(r.axisExpandable?nv:tv)(n,r),a={horizontal:{x:o.position,y:r.axisLength},vertical:{x:0,y:o.position}},s={horizontal:Jg/2,vertical:0},l=[a[i].x+e.x,a[i].y+e.y],u=s[i],c=La["c"]();La["g"](c,c,u),La["i"](c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){null==n&&(n=0),null==r&&(r=e.count());var i=this._axesMap,o=this.dimensions,a=[],s=[];m["k"](o,(function(t){a.push(e.mapDimension(t)),s.push(i.get(t).model)}));for(var l=this.hasAxisBrushed(),u=n;ui*(1-c[0])?(l="jump",a=s-i*(1-c[2])):(a=s-i*c[1])>=0&&(a=s-i*(1-c[1]))<=0&&(a=0),a*=t.axisExpandWidth/u,a?Vg(a,r,o,"all"):l="none";else{var f=r[1]-r[0],h=o[1]*s/f;r=[Kg(0,h-f/2)],r[1]=Yg(o[1],r[0]+f),r[0]=r[1]-f}return{axisExpandWindow:r,behavior:l}},e}();function ev(e,t){return Yg(Kg(e,t[0]),t[1])}function tv(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function nv(e,t){var n,r,i=t.layoutLength,o=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e=0;n--)Hn["c"](t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var r=0,i=t.length;rpv}function Dv(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function jv(e,t,n,r){var i=new rn["a"];return i.add(new zn["a"]({name:"main",style:Bv(n),silent:!0,draggable:!0,cursor:"move",drift:Object(m["h"])(Vv,e,t,i,["n","s","w","e"]),ondragend:Object(m["h"])(Lv,t,{isEnd:!0})})),Object(m["k"])(r,(function(n){i.add(new zn["a"]({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Object(m["h"])(Vv,e,t,i,n),ondragend:Object(m["h"])(Lv,t,{isEnd:!0})}))})),i}function Pv(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=dv(i,gv),a=n[0][0],s=n[1][0],l=a-i/2,u=s-i/2,c=n[0][1],d=n[1][1],f=c-o+i/2,h=d-o+i/2,p=c-a,g=d-s,v=p+i,y=g+i;Nv(e,t,"main",a,s,p,g),r.transformable&&(Nv(e,t,"w",l,u,o,y),Nv(e,t,"e",f,u,o,y),Nv(e,t,"n",l,u,v,o),Nv(e,t,"s",l,h,v,o),Nv(e,t,"nw",l,u,o,o),Nv(e,t,"ne",f,u,o,o),Nv(e,t,"sw",l,h,o,o),Nv(e,t,"se",f,h,o,o))}function Rv(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(Bv(n)),i.attr({silent:!r,cursor:r?"move":"default"}),Object(m["k"])([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var i=t.childOfName(n.join("")),o=1===n.length?Uv(e,n[0]):Hv(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?mv[o]+"-resize":null})}))}function Nv(e,t,n,r,i,o,a){var s=t.childOfName(n);s&&s.setShape(Yv(Wv(e,t,[[r,i],[r+o,i+a]])))}function Bv(e){return Object(m["i"])({strokeNoScale:!0},e.brushStyle)}function Fv(e,t,n,r){var i=[cv(e,n),cv(t,r)],o=[dv(e,n),dv(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function zv(e){return ln["getTransform"](e.group)}function Uv(e,t){var n={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},i=ln["transformDirection"](n[t],zv(e));return r[i]}function Hv(e,t){var n=[Uv(e,t[0]),Uv(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}function Vv(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=qv(t,i,o);Object(m["k"])(r,(function(e){var t=yv[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(Fv(s[0][0],s[1][0],s[0][1],s[1][1])),Tv(t,n),Lv(t,{isEnd:!1})}function Gv(e,t,n,r){var i=t.__brushOption.range,o=qv(e,n,r);Object(m["k"])(i,(function(e){e[0]+=o[0],e[1]+=o[1]})),Tv(e,t),Lv(e,{isEnd:!1})}function qv(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function Wv(e,t,n){var r=Av(e,t);return r&&r!==uv?r.clipPath(n,e._transform):Object(m["d"])(n)}function Yv(e){var t=cv(e[0][0],e[1][0]),n=cv(e[0][1],e[1][1]),r=dv(e[0][0],e[1][0]),i=dv(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}function Kv(e,t,n){if(e._brushType&&!ty(e,t.offsetX,t.offsetY)){var r=e._zr,i=e._covers,o=Cv(e,t,n);if(!e._dragging)for(var a=0;ar.getWidth()||n<0||n>r.getHeight()}var ny={lineX:ry(0),lineY:ry(1),rect:{createCover:function(e,t){function n(e){return e}return jv({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=Dv(e);return Fv(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){Pv(e,t,n,r)},updateCommon:Rv,contain:Zv},polygon:{createCover:function(e,t){var n=new rn["a"];return n.add(new Ei["a"]({name:"main",style:Bv(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new sl["a"]({name:"main",draggable:!0,drift:Object(m["h"])(Gv,e,t),ondragend:Object(m["h"])(Lv,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:Wv(e,t,n)})},updateCommon:Rv,contain:Zv}};function ry(e){return{createCover:function(t,n){return jv({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=Dv(t),r=cv(n[0][e],n[1][e]),i=dv(n[0][e],n[1][e]);return[r,i]},updateCoverShape:function(t,n,r,i){var o,a=Av(t,n);if(a!==uv&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,o];e&&l.reverse(),Pv(t,n,l,i)},updateCommon:Rv,contain:Zv}}var iy=_v;function oy(e){return e=ly(e),function(t){return ln["clipPointsByRect"](t,e)}}function ay(e,t){return e=ly(e),function(n){var r=null!=t?t:n,i=r?e.width:e.height,o=r?e.x:e.y;return[o,o+(i||0)]}}function sy(e,t,n){var r=ly(e);return function(e,i){return r.contain(i[0],i[1])&&!Gl(e,t,n)}}function ly(e){return Zi["a"].create(e)}var uy=["axisLine","axisTickLabel","axisName"],cy=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new iy(n.getZr())).on("brush",m["c"](this._onBrush,this))},t.prototype.render=function(e,t,n,r){if(!dy(e,t,r)){this.axisModel=e,this.api=n,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new rn["a"],this.group.add(this._axisGroup),e.get("show")){var o=hy(e,t),a=o.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=a.getAxisLayout(u),d=m["m"]({strokeContainThreshold:l},c),f=new As(e,d);m["k"](uy,f.add,f),this._axisGroup.add(f.getGroup()),this._refreshBrushController(d,s,e,o,l,n),ln["groupTransition"](i,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,r,i,o){var a=n.axis.getExtent(),s=a[1]-a[0],l=Math.min(30,.1*Math.abs(s)),u=Zi["a"].create({x:a[0],y:-i/2,width:s,height:i});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:oy(u),isTargetByCursor:sy(u,o,r),getLinearBrushOtherExtent:ay(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(fy(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,r=n.axis,i=m["H"](t,(function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]}));(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:i})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(io["a"]);function dy(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}function fy(e){var t=e.axis;return m["H"](e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}function hy(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var py=cy,gy={type:"axisAreaSelect",event:"axisAreaSelected"};function vy(e){e.registerAction(gy,(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),e.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}))}var yy={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function my(e){e.registerComponentView(Bg),e.registerComponentModel(zg),e.registerCoordinateSystem("parallel",av),e.registerPreprocessor(Lg),e.registerComponentModel(lv),e.registerComponentView(py),wo(e,"parallel",lv,yy),vy(e)}function by(e){Object(r["a"])(my),e.registerChartView(Sg),e.registerSeriesModel(Eg),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,Mg)}var xy=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),_y=function(e){function t(t){return e.call(this,t)||this}return Object(Ye["a"])(t,e),t.prototype.getDefaultShape=function(){return new xy},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Object(un["r"])(this)},t.prototype.downplay=function(){Object(un["C"])(this)},t}(a["b"]),wy=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._focusAdjacencyDisabled=!1,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r=this,i=e.getGraph(),o=this.group,a=e.layoutInfo,s=a.width,l=a.height,u=e.getData(),c=e.getData("edge"),d=e.get("orient");this._model=e,o.removeAll(),o.x=a.x,o.y=a.y,i.eachEdge((function(t){var n=new _y,r=Object(ut["a"])(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType="edge";var i,a,u,f,h,p,g,v,y=t.getModel(),b=y.getModel("lineStyle"),x=b.get("curveness"),_=t.node1.getLayout(),w=t.node1.getModel(),S=w.get("localX"),k=w.get("localY"),O=t.node2.getLayout(),T=t.node2.getModel(),E=T.get("localX"),C=T.get("localY"),A=t.getLayout();switch(n.shape.extent=Math.max(1,A.dy),n.shape.orient=d,"vertical"===d?(i=(null!=S?S*s:_.x)+A.sy,a=(null!=k?k*l:_.y)+_.dy,u=(null!=E?E*s:O.x)+A.ty,f=null!=C?C*l:O.y,h=i,p=a*(1-x)+f*x,g=u,v=a*x+f*(1-x)):(i=(null!=S?S*s:_.x)+_.dx,a=(null!=k?k*l:_.y)+A.sy,u=null!=E?E*s:O.x,f=(null!=C?C*l:O.y)+A.ty,h=i*(1-x)+u*x,p=a,g=i*x+u*(1-x),v=f),n.setShape({x1:i,y1:a,x2:u,y2:f,cpx1:h,cpy1:p,cpx2:g,cpy2:v}),n.useStyle(b.getItemStyle()),n.style.fill){case"source":n.style.fill=t.node1.getVisual("color"),n.style.decal=t.node1.getVisual("style").decal;break;case"target":n.style.fill=t.node2.getVisual("color"),n.style.decal=t.node2.getVisual("style").decal;break;case"gradient":var M=t.node1.getVisual("color"),L=t.node2.getVisual("color");Object(m["C"])(M)&&Object(m["C"])(L)&&(n.style.fill=new An["a"](0,0,+("horizontal"===d),+("vertical"===d),[{color:M,offset:0},{color:L,offset:1}]))}var I=y.getModel("emphasis");Object(un["I"])(n,y,"lineStyle",(function(e){return e.getItemStyle()})),o.add(n),c.setItemGraphicEl(t.dataIndex,n);var D=I.get("focus");Object(un["J"])(n,"adjacency"===D?t.getAdjacentDataIndices():D,I.get("blurScope"),I.get("disabled")),Object(ut["a"])(n).dataType="edge"})),i.eachNode((function(t){var n=t.getLayout(),r=t.getModel(),i=r.get("localX"),a=r.get("localY"),c=r.getModel("emphasis"),d=new zn["a"]({shape:{x:null!=i?i*s:n.x,y:null!=a?a*l:n.y,width:n.dx,height:n.dy},style:r.getModel("itemStyle").getItemStyle(),z2:10});Object(fn["g"])(d,Object(fn["e"])(r),{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id}),d.disableLabelAnimation=!0,d.setStyle("fill",t.getVisual("color")),d.setStyle("decal",t.getVisual("style").decal),Object(un["I"])(d,r),o.add(d),u.setItemGraphicEl(t.dataIndex,d),Object(ut["a"])(d).dataType="node";var f=c.get("focus");Object(un["J"])(d,"adjacency"===f?t.getAdjacentDataIndices():f,c.get("blurScope"),c.get("disabled"))})),u.eachItemGraphicEl((function(t,i){var o=u.getItemModel(i);o.get("draggable")&&(t.drift=function(t,o){r._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=o,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(i),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){r._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")})),!this._data&&e.isAnimationEnabled()&&o.setClipPath(Sy(o.getBoundingRect(),e,(function(){o.removeClipPath()}))),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(Fn["a"]);function Sy(e,t,n){var r=new zn["a"]({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return sn["c"](r,{shape:{width:e.width+20}},t,n),r}var ky=wy,Oy=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.getInitialData=function(e,t){var n=e.edges||e.links,r=e.data||e.nodes,i=e.levels;this.levelModels=[];for(var o=this.levelModels,a=0;a=0&&(o[i[a].depth]=new Ke["a"](i[a],this,t));if(r&&n){var s=Hp(r,n,this,!0,l);return s.data}function l(e,t){e.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,o=n.levelModels[i];o&&(e.parentModel=o)}return e})),t.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t),i=r.node1.getLayout();if(i){var o=i.depth,a=n.levelModels[o];a&&(e.parentModel=a)}return e}))}},t.prototype.setNodePosition=function(e,t){var n=this.option.data||this.option.nodes,r=n[e];r.localX=t[0],r.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||null==e}if("edge"===n){var i=this.getDataParams(e,n),o=i.data,a=i.value,s=o.source+" -- "+o.target;return Object(cl["c"])("nameValue",{name:s,value:a,noValue:r(a)})}var l=this.getGraph().getNodeByIndex(e),u=l.getLayout().value,c=this.getDataParams(e,n).data.name;return Object(cl["c"])("nameValue",{name:null!=c?c+"":null,value:u,noValue:r(u)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(null==r.value&&"node"===n){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;r.value=o}return r},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(tn["b"]),Ty=Oy;function Ey(e,t){e.eachSeriesByType("sankey",(function(e){var n=e.get("nodeWidth"),r=e.get("nodeGap"),i=Cy(e,t);e.layoutInfo=i;var o=i.width,a=i.height,s=e.getGraph(),l=s.nodes,u=s.edges;My(l);var c=m["n"](l,(function(e){return 0===e.getLayout().value})),d=0!==c.length?0:e.get("layoutIterations"),f=e.get("orient"),h=e.get("nodeAlign");Ay(l,u,n,r,o,a,d,f,h)}))}function Cy(e,t){return xi["g"](e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Ay(e,t,n,r,i,o,a,s,l){Ly(e,t,n,i,o,s,l),Ry(e,t,o,i,r,a,s),Xy(e,s)}function My(e){m["k"](e,(function(e){var t=Yy(e.outEdges,Wy),n=Yy(e.inEdges,Wy),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)}))}function Ly(e,t,n,r,i,o,a){for(var s=[],l=[],u=[],c=[],d=0,f=0;f=0;y&&v.depth>h&&(h=v.depth),g.setLayout({depth:y?v.depth:d},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;md-1?h:d-1;a&&"left"!==a&&Dy(e,a,o,S);var k="vertical"===o?(i-n)/S:(r-n)/S;Py(e,k,o)}function Iy(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function Dy(e,t,n,r){if("right"===t){var i=[],o=e,a=0;while(o.length){for(var s=0;s0;o--)l*=.99,zy(s,l,a),Fy(s,i,n,r,a),Ky(s,l,a),Fy(s,i,n,r,a)}function Ny(e,t){var n=[],r="vertical"===t?"y":"x",i=Object(lt["j"])(e,(function(e){return e.getLayout()[r]}));return i.keys.sort((function(e,t){return e-t})),m["k"](i.keys,(function(e){n.push(i.buckets.get(e))})),n}function By(e,t,n,r,i,o){var a=1/0;m["k"](e,(function(e){var t=e.length,s=0;m["k"](e,(function(e){s+=e.getLayout().value}));var l="vertical"===o?(r-(t-1)*i)/s:(n-(t-1)*i)/s;l0&&(a=s.getLayout()[o]+l,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[d]+t;var h="vertical"===i?r:n;if(l=u-t-h,l>0){a=s.getLayout()[o]-l,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(f=c-2;f>=0;--f)s=e[f],l=s.getLayout()[o]+s.getLayout()[d]+t-u,l>0&&(a=s.getLayout()[o]-l,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function zy(e,t,n){m["k"](e.slice().reverse(),(function(e){m["k"](e,(function(e){if(e.outEdges.length){var r=Yy(e.outEdges,Uy,n)/Yy(e.outEdges,Wy);if(isNaN(r)){var i=e.outEdges.length;r=i?Yy(e.outEdges,Hy,n)/i:0}if("vertical"===n){var o=e.getLayout().x+(r-qy(e,n))*t;e.setLayout({x:o},!0)}else{var a=e.getLayout().y+(r-qy(e,n))*t;e.setLayout({y:a},!0)}}}))}))}function Uy(e,t){return qy(e.node2,t)*e.getValue()}function Hy(e,t){return qy(e.node2,t)}function Vy(e,t){return qy(e.node1,t)*e.getValue()}function Gy(e,t){return qy(e.node1,t)}function qy(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Wy(e){return e.getValue()}function Yy(e,t,n){var r=0,i=e.length,o=-1;while(++oi&&(i=t)})),m["k"](n,(function(t){var n=new $f({type:"color",mappingMethod:"linear",dataExtent:[r,i],visual:e.get("color")}),o=n.mapValueToVisual(t.getLayout().value),a=t.getModel().get(["itemStyle","color"]);null!=a?(t.setVisual("color",a),t.setVisual("style",{fill:a})):(t.setVisual("color",o),t.setVisual("style",{fill:o}))}))}}))}function $y(e){e.registerChartView(ky),e.registerSeriesModel(Ty),e.registerLayout(Ey),e.registerVisual(Zy),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}))}var Jy=function(){function e(){}return e.prototype.getInitialData=function(e,t){var n,r,i=t.getComponent("xAxis",this.get("xAxisIndex")),o=t.getComponent("yAxis",this.get("yAxisIndex")),a=i.get("type"),s=o.get("type");"category"===a?(e.layout="horizontal",n=i.getOrdinalMeta(),r=!0):"category"===s?(e.layout="vertical",n=o.getOrdinalMeta(),r=!0):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],d=l[1-u],f=[i,o],h=f[u].get("type"),p=f[1-u].get("type"),g=e.data;if(g&&r){var v=[];m["k"](g,(function(e,t){var n;m["t"](e)?(n=e.slice(),e.unshift(t)):m["t"](e.value)?(n=m["m"]({},e),n.value=n.value.slice(),e.value.unshift(t)):n=e,v.push(n)})),e.data=v}var y=this.defaultValueDimensions,b=[{name:c,type:it(h),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:it(p),dimsDef:y.slice()}];return Ui(this,{coordDimensions:b,dimensionsCount:y.length+1,encodeDefaulter:m["h"](Pt["c"],b,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),Qy=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return Object(Ye["a"])(t,e),t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(tn["b"]);Object(m["K"])(Qy,Jy,!0);var em=Qy,tm=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this.group,o=this._data;this._data||i.removeAll();var a="horizontal"===e.get("layout")?1:0;r.diff(o).add((function(e){if(r.hasValue(e)){var t=r.getItemLayout(e),n=im(t,r,e,a,!0);r.setItemGraphicEl(e,n),i.add(n)}})).update((function(e,t){var n=o.getItemGraphicEl(t);if(r.hasValue(e)){var s=r.getItemLayout(e);n?(Object(sn["g"])(n),om(s,n,r,e)):n=im(s,r,e,a),i.add(n),r.setItemGraphicEl(e,n)}else i.remove(n)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&i.remove(t)})).execute(),this._data=r},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(e){e&&t.remove(e)}))},t.type="boxplot",t}(Fn["a"]),nm=function(){function e(){}return e}(),rm=function(e){function t(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return Object(Ye["a"])(t,e),t.prototype.getDefaultShape=function(){return new nm},t.prototype.buildPath=function(e,t){var n=t.points,r=0;for(e.moveTo(n[r][0],n[r][1]),r++;r<4;r++)e.lineTo(n[r][0],n[r][1]);for(e.closePath();rg){var _=[y,x];r.push(_)}}}return{boxData:n,outliers:r}}var gm={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==et["c"]){var n="";0,Object(Df["c"])(n)}var r=pm(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:r.boxData},{data:r.outliers}]}};function vm(e){e.registerSeriesModel(em),e.registerChartView(sm),e.registerVisual(lm),e.registerLayout(cm),e.registerTransform(gm)}var ym=["color","borderColor"],mm=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){ln["traverseElements"](this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,r=this.group,i=t.getLayout("isSimpleBox"),o=e.get("clip",!0),a=e.coordinateSystem,s=a.getArea&&a.getArea();this._data||r.removeAll(),t.diff(n).add((function(n){if(t.hasValue(n)){var a=t.getItemLayout(n);if(o&&wm(s,a))return;var l=_m(a,n,!0);sn["c"](l,{shape:{points:a.ends}},e,n),Sm(l,t,n,i),r.add(l),t.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(t.hasValue(a)){var c=t.getItemLayout(a);o&&wm(s,c)?r.remove(u):(u?(sn["h"](u,{shape:{points:c.ends}},e,a),Object(sn["g"])(u)):u=_m(c,a),Sm(u,t,a,i),r.add(u),t.setItemGraphicEl(a,u))}else r.remove(u)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)})).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),Em(e,this.group);var t=e.get("clip",!0)?qn(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){var n,r=t.getData(),i=r.getLayout("isSimpleBox");while(null!=(n=e.next())){var o=r.getItemLayout(n),a=_m(o,n);Sm(a,r,n,i),a.incremental=!0,this.group.add(a),this._progressiveEls.push(a)}},t.prototype._incrementalRenderLarge=function(e,t){Em(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(Fn["a"]),bm=function(){function e(){}return e}(),xm=function(e){function t(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return Object(Ye["a"])(t,e),t.prototype.getDefaultShape=function(){return new bm},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(a["b"]);function _m(e,t,n){var r=e.ends;return new xm({shape:{points:n?km(r,e):r},z2:100})}function wm(e,t){for(var n=!0,r=0;r0?"borderColor":"borderColor0"])||n.get(["itemStyle",e>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(ym);t.useStyle(o),t.style.fill=null,t.style.stroke=i}var Am=mm,Mm=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return Object(Ye["a"])(t,e),t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(tn["b"]);Object(m["K"])(Mm,Jy,!0);var Lm=Mm;function Im(e){e&&m["t"](e.series)&&m["k"](e.series,(function(e){m["A"](e)&&"k"===e.type&&(e.type="candlestick")}))}var Dm=["itemStyle","borderColor"],jm=["itemStyle","borderColor0"],Pm=["itemStyle","color"],Rm=["itemStyle","color0"],Nm={seriesType:"candlestick",plan:Object(pr["a"])(),performRawSeries:!0,reset:function(e,t){function n(e,t){return t.get(e>0?Pm:Rm)}function r(e,t){return t.get(e>0?Dm:jm)}if(!t.isSeriesFiltered(e)){var i=e.pipelineContext.large;return!i&&{progress:function(e,t){var i;while(null!=(i=e.next())){var o=t.getItemModel(i),a=t.getItemLayout(i).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=r(a,o)||s.fill;var l=t.ensureUniqueItemVisual(i,"style");Object(m["m"])(l,s)}}}}}},Bm=Nm,Fm={seriesType:"candlestick",plan:Object(pr["a"])(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),r=Um(e,n),i=0,o=1,a=["x","y"],s=n.getDimensionIndex(n.mapDimension(a[i])),l=Object(m["H"])(n.mapDimensionsAll(a[o]),n.getDimensionIndex,n),u=l[0],c=l[1],d=l[2],f=l[3];if(n.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),!(s<0||l.length<4))return{progress:e.pipelineContext.large?p:h};function h(e,n){var a,l=n.getStore();while(null!=(a=e.next())){var h=l.get(s,a),p=l.get(u,a),g=l.get(c,a),v=l.get(d,a),y=l.get(f,a),m=Math.min(p,g),b=Math.max(p,g),x=O(m,h),_=O(b,h),w=O(v,h),S=O(y,h),k=[];T(k,_,0),T(k,x,1),k.push(C(S),C(_),C(w),C(x)),n.setItemLayout(a,{sign:zm(l,a,p,g,c),initBaseline:p>g?_[o]:x[o],ends:k,brushRect:E(v,y,h)})}function O(e,n){var r=[];return r[i]=n,r[o]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function T(e,t,n){var o=t.slice(),a=t.slice();o[i]=Object(ln["subPixelOptimize"])(o[i]+r/2,1,!1),a[i]=Object(ln["subPixelOptimize"])(a[i]-r/2,1,!0),n?e.push(o,a):e.push(a,o)}function E(e,t,n){var a=O(e,n),s=O(t,n);return a[i]-=r/2,s[i]-=r/2,{x:a[0],y:a[1],width:o?r:s[0]-a[0],height:o?s[1]-a[1]:r}}function C(e){return e[i]=Object(ln["subPixelOptimize"])(e[i],1),e}}function p(e,n){var r,a,l=Tn(4*e.count),h=0,p=[],g=[],v=n.getStore();while(null!=(a=e.next())){var y=v.get(s,a),m=v.get(u,a),b=v.get(c,a),x=v.get(d,a),_=v.get(f,a);isNaN(y)||isNaN(x)||isNaN(_)?(l[h++]=NaN,h+=3):(l[h++]=zm(v,a,m,b,c),p[i]=y,p[o]=x,r=t.dataToPoint(p,null,g),l[h++]=r?r[0]:NaN,l[h++]=r?r[1]:NaN,p[o]=_,r=t.dataToPoint(p,null,g),l[h++]=r?r[1]:NaN)}n.setLayout("largePoints",l)}}};function zm(e,t,n,r,i){var o;return o=n>r?-1:n0?e.get(i,t-1)<=r?1:-1:1,o}function Um(e,t){var n,r=e.getBaseAxis(),i="category"===r.type?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),o=Object(Hn["o"])(Object(m["P"])(e.get("barMaxWidth"),i),i),a=Object(Hn["o"])(Object(m["P"])(e.get("barMinWidth"),1),i),s=e.get("barWidth");return null!=s?Object(Hn["o"])(s,i):Math.max(Math.min(i/2,o),a)}var Hm=Fm;function Vm(e){e.registerChartView(Am),e.registerSeriesModel(Lm),e.registerPreprocessor(Im),e.registerVisual(Bm),e.registerLayout(Hm)}function Gm(e,t){var n=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})}))}var qm=function(e){function t(t,n){var r=e.call(this)||this,i=new gn(t,n),o=new rn["a"];return r.add(i),r.add(o),r.updateData(t,n),r}return Object(Ye["a"])(t,e),t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=e.rippleNumber,i=this.childAt(1),o=0;o0&&(o=this._getLineLength(r)/s*1e3),o!==this._period||a!==this._loop){r.stopAnimation();var u=void 0;u=m["w"](l)?l(n):l,r.__t>0&&(u=-o*r.__t),this._animateSymbol(r,o,u,a)}this._period=o,this._loop=a}},t.prototype._animateSymbol=function(e,t,n,r){if(t>0){e.__t=0;var i=this,o=e.animate("",r).when(t,{__t:1}).delay(n).during((function(){i._updateSymbolPosition(e)}));r||o.done((function(){i.remove(e)})),o.start()}},t.prototype._getLineLength=function(e){return Ia["f"](e.__p1,e.__cp1)+Ia["f"](e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,i=e.__t,o=[e.x,e.y],a=o.slice(),s=Mn["h"],l=Mn["i"];o[0]=s(t[0],r[0],n[0],i),o[1]=s(t[1],r[1],n[1],i);var u=l(t[0],r[0],n[0],i),c=l(t[1],r[1],n[1],i);e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT=0;o--)if(r[o]<=t)break;o=Math.min(o,i-2)}else{for(o=a;ot)break;o=Math.min(o-1,i-2)}var l=(t-r[o])/(r[o+1]-r[o]),u=n[o],c=n[o+1];e.x=u[0]*(1-l)+l*c[0],e.y=u[1]*(1-l)+l*c[1];var d=c[0]-u[0],f=c[1]-u[1];e.rotation=-Math.atan2(f,d)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(Qm),rb=nb,ib=n("9680"),ob=n("68ab"),ab=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),sb=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return Object(Ye["a"])(t,e),t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new ab},t.prototype.buildPath=function(e,t){var n,r=t.segs,i=t.curveness;if(t.polyline)for(n=this._off;n0){e.moveTo(r[n++],r[n++]);for(var a=1;a0){var d=(s+u)/2-(l-c)*i,f=(l+c)/2-(u-s)*i;e.quadraticCurveTo(d,f,u,c)}else e.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,i=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=r[s++],c=r[s++],d=1;d0){var p=(u+f)/2-(c-h)*i,g=(c+h)/2-(f-u)*i;if(ob["a"](u,c,p,g,f,h,o,e,t))return a}else if(ib["a"](u,c,f,h,o,e,t))return a;a++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();if(e=n[0],t=n[1],r.contain(e,t)){var i=this.hoverDataIdx=this.findDataIndex(e,t);return i>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.segs,r=1/0,i=1/0,o=-1/0,a=-1/0,s=0;s0&&(o.dataIndex=n+e.__startIndex)}))},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),ub=lb,cb={seriesType:"lines",plan:Object(pr["a"])(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get("polyline"),r=e.pipelineContext.large;return{progress:function(i,o){var a=[];if(r){var s=void 0,l=i.end-i.start;if(n){for(var u=0,c=i.start;c0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),i.updateData(r);var u=e.get("clip",!0)&&qn(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData(),i=this._updateLineDraw(r,e);i.incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var r=e.getData(),i=e.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var o=db.reset(e,t,n);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,r=this._showEffect(t),i=!!t.get("polyline"),o=t.pipelineContext,a=o.large;return n&&r===this._hasEffet&&i===this._isPolyline&&a===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=a?new ub:new kp(i?r?rb:tb:r?Qm:mp),this._hasEffet=r,this._isPolyline=i,this._isLargeDraw=a),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var t=e.getZr(),n="svg"===t.painter.getType();n||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type="lines",t}(Fn["a"]),hb=fb,pb="undefined"===typeof Uint32Array?Array:Uint32Array,gb="undefined"===typeof Float64Array?Array:Float64Array;function vb(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=Object(m["H"])(t,(function(e){var t=[e[0].coord,e[1].coord],n={coords:t};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),Object(m["J"])([n,e[0],e[1]])})))}var yb=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return Object(Ye["a"])(t,e),t.prototype.init=function(t){t.data=t.data||[],vb(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(vb(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=Object(m["e"])(this._flatCoords,t.flatCoords),this._flatCoordsOffset=Object(m["e"])(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e),n=t.option instanceof Array?t.option:t.getShallow("coords");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],r=this._flatCoordsOffset[2*e+1],i=0;i ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),t=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&t>0?t+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(tn["b"]),mb=yb;function bb(e){return e instanceof Array||(e=[e,e]),e}var xb={seriesType:"lines",reset:function(e){var t=bb(e.get("symbol")),n=bb(e.get("symbolSize")),r=e.getData();function i(e,t){var n=e.getItemModel(t),r=bb(n.getShallow("symbol",!0)),i=bb(n.getShallow("symbolSize",!0));r[0]&&e.setItemVisual(t,"fromSymbol",r[0]),r[1]&&e.setItemVisual(t,"toSymbol",r[1]),i[0]&&e.setItemVisual(t,"fromSymbolSize",i[0]),i[1]&&e.setItemVisual(t,"toSymbolSize",i[1])}return r.setVisual("fromSymbol",t&&t[0]),r.setVisual("toSymbol",t&&t[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),{dataEach:r.hasItemOption?i:null}}},_b=xb;function wb(e){e.registerChartView(hb),e.registerSeriesModel(mb),e.registerLayout(db),e.registerVisual(_b)}var Sb=256,kb=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Q["d"].createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,o){var a=this._getBrush(),s=this._getGradient(i,"inRange"),l=this._getGradient(i,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),f=e.length;c.width=t,c.height=n;for(var h=0;h0){var E=o(m)?s:l;m>0&&(m=m*O+S),x[_++]=E[T],x[_++]=E[T+1],x[_++]=E[T+2],x[_++]=E[T+3]*m*256}else _+=4}return d.putImageData(b,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Q["d"].createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],o=0,a=0;a<256;a++)e[t](a/255,!0,i),r[o++]=i[0],r[o++]=i[1],r[o++]=i[2],r[o++]=i[3];return r},e}(),Ob=kb;function Tb(e,t,n){var r=e[1]-e[0];t=m["H"](t,(function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}}));var i=t.length,o=0;return function(e){var r;for(r=o;r=0;r--){a=t[r].interval;if(a[0]<=e&&e<=a[1]){o=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}function Cb(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var Ab=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(r=t)}))})),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):Cb(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(Cb(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){ln["traverseElements"](this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,i){var o,a,s,l,u=e.coordinateSystem,c=Wn(u,"cartesian2d");if(c){var d=u.getAxis("x"),f=u.getAxis("y");0,o=d.getBandWidth()+.5,a=f.getBandWidth()+.5,s=d.scale.getExtent(),l=f.scale.getExtent()}for(var h=this.group,p=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),v=e.getModel(["blur","itemStyle"]).getItemStyle(),y=e.getModel(["select","itemStyle"]).getItemStyle(),m=e.get(["itemStyle","borderRadius"]),b=Object(fn["e"])(e),x=e.getModel("emphasis"),_=x.get("focus"),w=x.get("blurScope"),S=x.get("disabled"),k=c?[p.mapDimension("x"),p.mapDimension("y"),p.mapDimension("value")]:[p.mapDimension("time"),p.mapDimension("value")],O=n;Os[1]||Al[1])continue;var M=u.dataToPoint([C,A]);T=new zn["a"]({shape:{x:M[0]-o/2,y:M[1]-a/2,width:o,height:a},style:E})}else{if(isNaN(p.get(k[1],O)))continue;T=new zn["a"]({z2:1,shape:u.dataToRect([p.get(k[0],O)]).contentShape,style:E})}if(p.hasItemOption){var L=p.getItemModel(O),I=L.getModel("emphasis");g=I.getModel("itemStyle").getItemStyle(),v=L.getModel(["blur","itemStyle"]).getItemStyle(),y=L.getModel(["select","itemStyle"]).getItemStyle(),m=L.get(["itemStyle","borderRadius"]),_=I.get("focus"),w=I.get("blurScope"),S=I.get("disabled"),b=Object(fn["e"])(L)}T.shape.r=m;var D=e.getRawValue(O),j="-";D&&null!=D[2]&&(j=D[2]+""),Object(fn["g"])(T,b,{labelFetcher:e,labelDataIndex:O,defaultOpacity:E.opacity,defaultText:j}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=v,T.ensureState("select").style=y,Object(un["J"])(T,_,w,S),T.incremental=i,i&&(T.states.emphasis.hoverLayer=!0),h.add(T),p.setItemGraphicEl(O,T),this._progressiveEls&&this._progressiveEls.push(T)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=t.getData(),l=this._hmLayer||this._hmLayer||new Ob;l.blurSize=t.get("blurSize"),l.pointSize=t.get("pointSize"),l.minOpacity=t.get("minOpacity"),l.maxOpacity=t.get("maxOpacity");var u=e.getViewRect().clone(),c=e.getRoamTransform();u.applyTransform(c);var d=Math.max(u.x,0),f=Math.max(u.y,0),h=Math.min(u.width+u.x,r.getWidth()),p=Math.min(u.height+u.y,r.getHeight()),g=h-d,v=p-f,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],m=a.mapArray(y,(function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=d,i[1]-=f,i.push(r),i})),b=n.getExtent(),x="visualMap.continuous"===n.type?Eb(b,n.option.range):Tb(b,n.getPieceList(),n.option.selected);l.update(m,g,v,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:o.color.getColorMapper()},x);var _=new s["a"]({style:{width:g,height:v,x:d,y:f,image:l.canvas},silent:!0});this.group.add(_)},t.type="heatmap",t}(Fn["a"]),Mb=Ab,Lb=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.getInitialData=function(e,t){return en(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=zt["a"].get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(tn["b"]),Ib=Lb;function Db(e){e.registerChartView(Mb),e.registerSeriesModel(Ib)}var jb=["itemStyle","borderWidth"],Pb=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Rb=new yl["a"],Nb=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r=this.group,i=e.getData(),o=this._data,a=e.coordinateSystem,s=a.getBaseAxis(),l=s.isHorizontal(),u=a.master.getRect(),c={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:a,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:l,valueDim:Pb[+l],categoryDim:Pb[1-+l]};return i.diff(o).add((function(e){if(i.hasValue(e)){var t=Xb(i,e),n=Bb(i,e,t,c),o=Jb(i,c,n);i.setItemGraphicEl(e,o),r.add(o),ix(o,c,n)}})).update((function(e,t){var n=o.getItemGraphicEl(t);if(i.hasValue(e)){var a=Xb(i,e),s=Bb(i,e,a,c),l=tx(i,s);n&&l!==n.__pictorialShapeStr&&(r.remove(n),i.setItemGraphicEl(e,null),n=null),n?Qb(n,c,s):n=Jb(i,c,s,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,r.add(n),ix(n,c,s)}else r.remove(n)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&ex(o,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=i,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get("animation")?r&&r.eachItemGraphicEl((function(t){ex(r,Object(ut["a"])(t).dataIndex,e,t)})):n.removeAll()},t.type="pictorialBar",t}(Fn["a"]);function Bb(e,t,n,r){var i=e.getItemLayout(t),o=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=n.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=n.get("symbolPatternSize")||2,d=n.isAnimationEnabled(),f={dataIndex:t,layout:i,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:a,symbolRepeat:o,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:d?n:null,hoverScale:d&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};Fb(n,o,i,r,f),Ub(e,t,i,o,a,f.boundingLength,f.pxSign,c,r,f),Hb(n,f.symbolScale,u,r,f);var h=f.symbolSize,p=Object(nn["b"])(n.get("symbolOffset"),h);return Vb(n,h,i,o,a,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,r,f),f}function Fb(e,t,n,r,i){var o,a=r.valueDim,s=e.get("symbolBoundingData"),l=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[a.wh]<=0);if(m["t"](s)){var d=[zb(l,s[0])-u,zb(l,s[1])-u];d[1]0?1:-1}function zb(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function Ub(e,t,n,r,i,o,a,s,l,u){var c,d=l.valueDim,f=l.categoryDim,h=Math.abs(n[f.wh]),p=e.getItemVisual(t,"symbolSize");c=m["t"](p)?p.slice():null==p?["100%","100%"]:[p,p],c[f.index]=Object(Hn["o"])(c[f.index],h),c[d.index]=Object(Hn["o"])(c[d.index],r?h:Math.abs(o)),u.symbolSize=c;var g=u.symbolScale=[c[0]/s,c[1]/s];g[d.index]*=(l.isHorizontal?-1:1)*a}function Hb(e,t,n,r,i){var o=e.get(jb)||0;o&&(Rb.attr({scaleX:t[0],scaleY:t[1],rotation:n}),Rb.updateTransform(),o/=Rb.getLineScale(),o*=t[r.valueDim.index]),i.valueLineWidth=o||0}function Vb(e,t,n,r,i,o,a,s,l,u,c,d){var f=c.categoryDim,h=c.valueDim,p=d.pxSign,g=Math.max(t[h.index]+s,0),v=g;if(r){var y=Math.abs(l),b=m["O"](e.get("symbolMargin"),"15%")+"",x=!1;b.lastIndexOf("!")===b.length-1&&(x=!0,b=b.slice(0,b.length-1));var _=Object(Hn["o"])(b,t[h.index]),w=Math.max(g+2*_,0),S=x?0:2*_,k=Object(Hn["i"])(r),O=k?r:ox((y+S)/w),T=y-O*g;_=T/2/(x?O:Math.max(O-1,1)),w=g+2*_,S=x?0:2*_,k||"fixed"===r||(O=u?ox((Math.abs(u)+S)/w):0),v=O*w-S,d.repeatTimes=O,d.symbolMargin=_}var E=p*(v/2),C=d.pathPosition=[];C[f.index]=n[f.wh]/2,C[h.index]="start"===a?E:"end"===a?l-E:l/2,o&&(C[0]+=o[0],C[1]+=o[1]);var A=d.bundlePosition=[];A[f.index]=n[f.xy],A[h.index]=n[h.xy];var M=d.barRectShape=m["m"]({},n);M[h.wh]=p*Math.max(Math.abs(n[h.wh]),Math.abs(C[h.index]+E)),M[f.wh]=n[f.wh];var L=d.clipShape={};L[f.xy]=-n[f.xy],L[f.wh]=c.ecSize[f.wh],L[h.xy]=0,L[h.wh]=n[h.wh]}function Gb(e){var t=e.symbolPatternSize,n=Object(nn["a"])(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function qb(e,t,n,r){var i=e.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,d=o[t.valueDim.index]+a+2*n.symbolMargin;for(nx(e,(function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c0:r<0)&&(i=u-1-e),t[l.index]=d*(i-u/2+.5)+s[l.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function Wb(e,t,n,r){var i=e.__pictorialBundle,o=e.__pictorialMainPath;o?rx(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(o=e.__pictorialMainPath=Gb(n),i.add(o),rx(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function Yb(e,t,n){var r=m["m"]({},t.barRectShape),i=e.__pictorialBarRect;i?rx(i,null,{shape:r},t,n):(i=e.__pictorialBarRect=new zn["a"]({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function Kb(e,t,n,r){if(n.symbolClip){var i=e.__pictorialClipPath,o=m["m"]({},n.clipShape),a=t.valueDim,s=n.animationModel,l=n.dataIndex;if(i)sn["h"](i,{shape:o},s,l);else{o[a.wh]=0,i=new zn["a"]({shape:o}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[a.wh]=n.clipShape[a.wh],ln[r?"updateProps":"initProps"](i,{shape:u},s,l)}}}function Xb(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=Zb,n.isAnimationEnabled=$b,n}function Zb(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function $b(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Jb(e,t,n,r){var i=new rn["a"],o=new rn["a"];return i.add(o),i.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?qb(i,t,n):Wb(i,t,n),Yb(i,n,r),Kb(i,t,n,r),i.__pictorialShapeStr=tx(e,n),i.__pictorialSymbolMeta=n,i}function Qb(e,t,n){var r=n.animationModel,i=n.dataIndex,o=e.__pictorialBundle;sn["h"](o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,i),n.symbolRepeat?qb(e,t,n,!0):Wb(e,t,n,!0),Yb(e,n,!0),Kb(e,t,n,!0)}function ex(e,t,n,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var o=[];nx(r,(function(e){o.push(e)})),r.__pictorialMainPath&&o.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),m["k"](o,(function(e){sn["e"](e,{scaleX:0,scaleY:0},n,t,(function(){r.parent&&r.parent.remove(r)}))})),e.setItemGraphicEl(t,null)}function tx(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function nx(e,t,n){m["k"](e.__pictorialBundle.children(),(function(r){r!==e.__pictorialBarRect&&t.call(n,r)}))}function rx(e,t,n,r,i,o){t&&e.attr(t),r.symbolClip&&!i?n&&e.attr(n):n&&ln[i?"updateProps":"initProps"](e,n,r.animationModel,r.dataIndex,o)}function ix(e,t,n){var r=n.dataIndex,i=n.itemModel,o=i.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),l=i.getModel(["blur","itemStyle"]).getItemStyle(),u=i.getModel(["select","itemStyle"]).getItemStyle(),c=i.getShallow("cursor"),d=o.get("focus"),f=o.get("blurScope"),h=o.get("scale");nx(e,(function(e){if(e instanceof s["a"]){var t=e.style;e.useStyle(m["m"]({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState("emphasis");r.style=a,h&&(r.scaleX=1.1*e.scaleX,r.scaleY=1.1*e.scaleY),e.ensureState("blur").style=l,e.ensureState("select").style=u,c&&(e.cursor=c),e.z2=n.z2}));var p=t.valueDim.posDesc[+(n.boundingLength>0)],g=e.__pictorialBarRect;Object(fn["g"])(g,Object(fn["e"])(i),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:cn(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Object(un["J"])(e,d,f,o.get("disabled"))}function ox(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var ax=Nb,sx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return Object(Ye["a"])(t,e),t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Object(Rr["d"])(Pr.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(Pr),lx=sx;function ux(e){e.registerChartView(ax),e.registerSeriesModel(lx),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Object(m["h"])(Ar,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Mr("pictorialBar"))}var cx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this,o=this.group,a=e.getLayerSeries(),s=r.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(e){return e.name}o.x=0,o.y=l.y+u[0];var d=new Je(this._layersSeries||[],a,c,c),f=[];function h(t,n,s){var l=i._layers;if("remove"!==t){for(var u,c,d=[],h=[],p=a[n].indices,g=0;go&&(o=s),r.push(s)}for(var u=0;uo&&(o=d)}return{y0:i,max:o}}function bx(e){e.registerChartView(fx),e.registerSeriesModel(gx),e.registerLayout(vx),e.registerProcessor(Ti("themeRiver"))}var xx=2,_x=4,wx=function(e){function t(t,n,r,i){var o=e.call(this)||this;o.z2=xx,o.textConfig={inside:!0},Object(ut["a"])(o).seriesIndex=n.seriesIndex;var a=new J["a"]({z2:_x,silent:t.getModel().get(["label","silent"])});return o.setTextContent(a),o.updateData(!0,t,n,r,i),o}return Object(Ye["a"])(t,e),t.prototype.updateData=function(e,t,n,r,i){this.node=t,t.piece=this,n=n||this._seriesModel,r=r||this._ecModel;var o=this;Object(ut["a"])(o).dataIndex=t.dataIndex;var a=t.getModel(),s=a.getModel("emphasis"),l=t.getLayout(),u=m["m"]({},l);u.label=null;var c=t.getVisual("style");c.lineJoin="bevel";var d=t.getVisual("decal");d&&(c.decal=Object(ic["a"])(d,i));var f=Ni(a.getModel("itemStyle"),u,!0);m["m"](u,f),m["k"](un["g"],(function(e){var t=o.ensureState(e),n=a.getModel([e,"itemStyle"]);t.style=n.getItemStyle();var r=Ni(n,u);r&&(t.shape=r)})),e?(o.setShape(u),o.shape.r=l.r0,sn["h"](o,{shape:{r:l.r}},n,t.dataIndex)):(sn["h"](o,{shape:u},n),Object(sn["g"])(o)),o.useStyle(c),this._updateLabel(n);var h=a.getShallow("cursor");h&&o.attr("cursor",h),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var p=s.get("focus"),g="ancestor"===p?t.getAncestorsIndices():"descendant"===p?t.getDescendantIndices():p;Object(un["J"])(this,g,s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel("label"),i=this.node.getLayout(),o=i.endAngle-i.startAngle,a=(i.startAngle+i.endAngle)/2,s=Math.cos(a),l=Math.sin(a),u=this,c=u.getTextContent(),d=this.node.dataIndex,f=r.get("minAngle")/180*Math.PI,h=r.get("show")&&!(null!=f&&Math.abs(o)Math.PI/2?"right":"left"):k&&"center"!==k?"left"===k?(b=i.r0+S,a>Math.PI/2&&(k="right")):"right"===k&&(b=i.r-S,a>Math.PI/2&&(k="left")):(b=o===2*Math.PI&&0===i.r0?0:(i.r+i.r0)/2,k="center"),g.style.align=k,g.style.verticalAlign=p(f,"verticalAlign")||"middle",g.x=b*s+i.cx,g.y=b*l+i.cy;var O=p(f,"rotate"),T=0;"radial"===O?(T=-a,T<-Math.PI/2&&(T+=Math.PI)):"tangential"===O?(T=Math.PI/2-a,T>Math.PI/2?T-=Math.PI:T<-Math.PI/2&&(T+=Math.PI)):m["z"](O)&&(T=O*Math.PI/180),g.rotation=T})),c.dirtyStyle()},t}(Un["a"]),Sx=wx,kx="sunburstRootToNode",Ox="sunburstHighlight",Tx="sunburstUnhighlight";function Ex(e){e.registerAction({type:kx,update:"updateView"},(function(e,t){function n(t,n){var r=Fd(e,[kx],t);if(r){var i=t.getViewRoot();i&&(e.direction=Ud(i,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}}t.eachComponent({mainType:"series",subType:"sunburst",query:e},n)})),e.registerAction({type:Ox,update:"none"},(function(e,t,n){function r(t){var n=Fd(e,[Ox],t);n&&(e.dataIndex=n.node.dataIndex)}e=Object(m["m"])({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},r),n.dispatchAction(Object(m["m"])(e,{type:"highlight"}))})),e.registerAction({type:Tx,update:"updateView"},(function(e,t,n){e=Object(m["m"])({},e),n.dispatchAction(Object(m["m"])(e,{type:"downplay"}))}))}var Cx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n,r){var i=this;this.seriesModel=e,this.api=n,this.ecModel=t;var o=e.getData(),a=o.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode((function(e){c.push(e)}));var d=this._oldChildren||[];function f(e,t){function n(e){return e.getId()}function r(n,r){var i=null==n?null:e[n],o=null==r?null:t[r];h(i,o)}0===e.length&&0===t.length||new Je(t,e,n,n).add(r).update(r).remove(m["h"](r,null)).execute()}function h(r,i){if(u||!r||r.getValue()||(r=null),r!==a&&i!==a)if(i&&i.piece)r?(i.piece.updateData(!1,r,e,t,n),o.setItemGraphicEl(r.dataIndex,i.piece)):p(i);else if(r){var s=new Sx(r,e,t,n);l.add(s),o.setItemGraphicEl(r.dataIndex,s)}}function p(e){e&&e.piece&&(l.remove(e.piece),e.piece=null)}function g(r,o){o.depth>0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new Sx(r,e,t,n),l.add(i.virtualPiece)),o.piece.off("click"),i.virtualPiece.on("click",(function(e){i._rootToNode(o.parentNode)}))):i.virtualPiece&&(l.remove(i.virtualPiece),i.virtualPiece=null)}f(c,d),g(a,s),this._initEvents(),this._oldChildren=c},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",(function(t){var n=!1,r=e.seriesModel.getViewRoot();r.eachNode((function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get("nodeClick");if("rootToNode"===i)e._rootToNode(r);else if("link"===i){var o=r.getModel(),a=o.get("link");if(a){var s=o.get("target",!0)||"_blank";Object(Yn["j"])(a,s)}}n=!0}}))}))},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:kx,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData(),r=n.getItemLayout(0);if(r){var i=e[0]-r.cx,o=e[1]-r.cy,a=Math.sqrt(i*i+o*o);return a<=r.r&&a>=r.r0}},t.type="sunburst",t}(Fn["a"]),Ax=Cx,Mx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return Object(Ye["a"])(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};Lx(n);var r=this._levelModels=m["H"](e.levels||[],(function(e){return new Ke["a"](e,this,t)}),this),i=Bd.createTree(n,this,o);function o(e){e.wrapMethod("getItemModel",(function(e,t){var n=i.getNodeByDataIndex(t),o=r[n.depth];return o&&(e.parentModel=o),e}))}return i.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=Hd(r,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){tf(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(tn["b"]);function Lx(e){var t=0;m["k"](e.children,(function(e){Lx(e);var n=e.value;m["t"](n)&&(n=n[0]),t+=n}));var n=e.value;m["t"](n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),m["t"](e.value)?e.value[0]=n:e.value=n}var Ix=Mx,Dx=Math.PI/180;function jx(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.get("center"),r=e.get("radius");m["t"](r)||(r=[0,r]),m["t"](t)||(t=[t,t]);var i=n.getWidth(),o=n.getHeight(),a=Math.min(i,o),s=Object(Hn["o"])(t[0],i),l=Object(Hn["o"])(t[1],o),u=Object(Hn["o"])(r[0],a/2),c=Object(Hn["o"])(r[1],a/2),d=-e.get("startAngle")*Dx,f=e.get("minAngle")*Dx,h=e.getData().tree.root,p=e.getViewRoot(),g=p.depth,v=e.get("sort");null!=v&&Px(p,v);var y=0;m["k"](p.children,(function(e){!isNaN(e.getValue())&&y++}));var b=p.getValue(),x=Math.PI/(b||y)*2,_=p.depth>0,w=p.height-(_?-1:1),S=(c-u)/(w||1),k=e.get("clockwise"),O=e.get("stillShowZeroSum"),T=k?1:-1,E=function(t,n){if(t){var r=n;if(t!==h){var i=t.getValue(),o=0===b&&O?x:i*x;o1)i=i.parentNode;var o=n.getColorFromPalette(i.name||i.dataIndex+"",t);return e.depth>1&&Object(m["C"])(o)&&(o=Object(Kn["c"])(o,(e.depth-1)/(r-1)*.5)),o}e.eachSeriesByType("sunburst",(function(e){var t=e.getData(),r=t.tree;r.eachNode((function(i){var o=i.getModel(),a=o.getModel("itemStyle").getItemStyle();a.fill||(a.fill=n(i,e,r.root.height));var s=t.ensureUniqueItemVisual(i.dataIndex,"style");Object(m["m"])(s,a)}))}))}function Bx(e){e.registerChartView(Ax),e.registerSeriesModel(Ix),e.registerLayout(Object(m["h"])(jx,"sunburst")),e.registerProcessor(Object(m["h"])(Ti,"sunburst")),e.registerVisual(Nx),Ex(e)}var Fx={color:"fill",borderColor:"stroke"},zx={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ux=Object(lt["o"])(),Hx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return en(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=Ux(r).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(tn["b"]),Vx=Hx;function Gx(e,t){return t=t||[0,0],m["H"](["x","y"],(function(n,r){var i=this.getAxis(n),o=t[r],a=e[r]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a))}),this)}function qx(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:m["c"](Gx,e)}}}function Wx(e,t){return t=t||[0,0],m["H"]([0,1],(function(n){var r=t[n],i=e[n]/2,o=[],a=[];return o[n]=r-i,a[n]=r+i,o[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function Yx(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:m["c"](Wx,e)}}}function Kx(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function Xx(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Object(m["c"])(Kx,e)}}}function Zx(e,t){return t=t||[0,0],m["H"](["Radius","Angle"],(function(n,r){var i="get"+n+"Axis",o=this[i](),a=t[r],s=e[r]/2,l="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-s)-o.dataToCoord(a+s));return"Angle"===n&&(l=l*Math.PI/180),l}),this)}function $x(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),o=n.dataToAngle(r[1]),a=e.coordToPoint([i,o]);return a.push(i,o*Math.PI/180),a},size:m["c"](Zx,e)}}}function Jx(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}function Qx(e,t,n,r){return e&&(e.legacy||!1!==e.legacy&&!n&&!r&&"tspan"!==t&&("text"===t||Object(m["q"])(e,"text")))}function e_(e,t,n){var r,i,o,a=e;if("text"===t)o=a;else{o={},Object(m["q"])(a,"text")&&(o.text=a.text),Object(m["q"])(a,"rich")&&(o.rich=a.rich),Object(m["q"])(a,"textFill")&&(o.fill=a.textFill),Object(m["q"])(a,"textStroke")&&(o.stroke=a.textStroke),Object(m["q"])(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Object(m["q"])(a,"fontSize")&&(o.fontSize=a.fontSize),Object(m["q"])(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Object(m["q"])(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},r={};var s=Object(m["q"])(a,"textPosition");n?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),Object(m["q"])(a,"textPosition")&&(r.position=a.textPosition),Object(m["q"])(a,"textOffset")&&(r.offset=a.textOffset),Object(m["q"])(a,"textRotation")&&(r.rotation=a.textRotation),Object(m["q"])(a,"textDistance")&&(r.distance=a.textDistance)}return t_(o,e),Object(m["k"])(o.rich,(function(e){t_(e,e)})),{textConfig:r,textContent:i}}function t_(e,t){t&&(t.font=t.textFont||t.font,Object(m["q"])(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),Object(m["q"])(t,"textAlign")&&(e.align=t.textAlign),Object(m["q"])(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),Object(m["q"])(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),Object(m["q"])(t,"textWidth")&&(e.width=t.textWidth),Object(m["q"])(t,"textHeight")&&(e.height=t.textHeight),Object(m["q"])(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),Object(m["q"])(t,"textPadding")&&(e.padding=t.textPadding),Object(m["q"])(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),Object(m["q"])(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),Object(m["q"])(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),Object(m["q"])(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),Object(m["q"])(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),Object(m["q"])(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Object(m["q"])(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function n_(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||"inside",null!=n.offset&&(r.textOffset=n.offset),null!=n.rotation&&(r.textRotation=n.rotation),null!=n.distance&&(r.textDistance=n.distance);var i=r.textPosition.indexOf("inside")>=0,o=e.fill||"#000";r_(r,t);var a=null==r.textFill;return i?a&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=o),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=e.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,Object(m["k"])(t.rich,(function(e){r_(e,e)})),r}function r_(e,t){t&&(Object(m["q"])(t,"fill")&&(e.textFill=t.fill),Object(m["q"])(t,"stroke")&&(e.textStroke=t.fill),Object(m["q"])(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),Object(m["q"])(t,"font")&&(e.font=t.font),Object(m["q"])(t,"fontStyle")&&(e.fontStyle=t.fontStyle),Object(m["q"])(t,"fontWeight")&&(e.fontWeight=t.fontWeight),Object(m["q"])(t,"fontSize")&&(e.fontSize=t.fontSize),Object(m["q"])(t,"fontFamily")&&(e.fontFamily=t.fontFamily),Object(m["q"])(t,"align")&&(e.textAlign=t.align),Object(m["q"])(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),Object(m["q"])(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),Object(m["q"])(t,"width")&&(e.textWidth=t.width),Object(m["q"])(t,"height")&&(e.textHeight=t.height),Object(m["q"])(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),Object(m["q"])(t,"padding")&&(e.textPadding=t.padding),Object(m["q"])(t,"borderColor")&&(e.textBorderColor=t.borderColor),Object(m["q"])(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),Object(m["q"])(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),Object(m["q"])(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),Object(m["q"])(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),Object(m["q"])(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Object(m["q"])(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Object(m["q"])(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),Object(m["q"])(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),Object(m["q"])(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),Object(m["q"])(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var i_=n("06ad"),o_={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},a_=Object(m["F"])(o_),s_=(Object(m["N"])(F["a"],(function(e,t){return e[t]=1,e}),{}),F["a"].join(", "),["","style","shape","extra"]),l_=Object(lt["o"])();function u_(e,t,n,r,i){var o=e+"Animation",a=Object(sn["a"])(e,r,i)||{},s=l_(t).userDuring;return a.duration>0&&(a.during=s?Object(m["c"])(b_,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),Object(m["m"])(a,n[o]),a}function c_(e,t,n,r){r=r||{};var i=r.dataIndex,o=r.isInit,a=r.clearStyle,s=n.isAnimationEnabled(),l=l_(e),u=t.style;l.userDuring=t.during;var c={},d={};if(S_(e,t,d),__("shape",t,d),__("extra",t,d),!o&&s&&(w_(e,t,c),x_("shape",e,t,c),x_("extra",e,t,c),k_(e,t,u,c)),d.style=u,p_(e,d,a),v_(e,t),s)if(o){var f={};Object(m["k"])(s_,(function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(f[e]=f[e]||{}),Object(m["m"])(e?f[e]:f,n.enterFrom))}));var h=u_("enter",e,t,n,i);h.duration>0&&e.animateFrom(f,h)}else g_(e,t,i||0,n,c);d_(e,t),u?e.dirty():e.markRedraw()}function d_(e,t){for(var n=l_(e).leaveToProps,r=0;r0&&e.animateFrom(i,o)}}function v_(e,t){Object(m["q"])(t,"silent")&&(e.silent=t.silent),Object(m["q"])(t,"ignore")&&(e.ignore=t.ignore),e instanceof oc["c"]&&Object(m["q"])(t,"invisible")&&(e.invisible=t.invisible),e instanceof a["b"]&&Object(m["q"])(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var y_={},m_={setTransform:function(e,t){return y_.el[e]=t,this},getTransform:function(e){return y_.el[e]},setShape:function(e,t){var n=y_.el,r=n.shape||(n.shape={});return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=y_.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=y_.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=y_.el.style;if(t)return t[e]},setExtra:function(e,t){var n=y_.el.extra||(y_.el.extra={});return n[e]=t,this},getExtra:function(e){var t=y_.el.extra;if(t)return t[e]}};function b_(){var e=this,t=e.el;if(t){var n=l_(t).userDuring,r=e.userDuring;n===r?(y_.el=t,r(m_)):e.el=e.userDuring=null}}function x_(e,t,n,r){var i=n[e];if(i){var o,a=t[e];if(a){var s=n.transition,l=i.transition;if(l)if(!o&&(o=r[e]={}),h_(l))Object(m["m"])(o,a);else for(var u=Object(lt["r"])(l),c=0;c=0){!o&&(o=r[e]={});var h=Object(m["F"])(a);for(c=0;c=0)){var f=e.getAnimationStyleProps(),h=f?f.style:null;if(h){!i&&(i=r.style={});var p=Object(m["F"])(n);for(u=0;u=0?t.getStore().get(i,n):void 0}var o=t.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[o]:o}function S(n,r){null==r&&(r=s);var i=t.getItemVisual(r,"style"),o=i&&i.fill,a=i&&i.opacity,l=b(r,L_).getItemStyle();null!=o&&(l.fill=o),null!=a&&(l.opacity=a);var u={inheritColor:Object(m["C"])(o)?o:"#000"},c=x(r,L_),d=fn["c"](c,null,u,!1,!0);d.text=c.getShallow("show")?Object(m["P"])(e.getFormattedLabel(r,L_),cn(t,r)):null;var f=fn["b"](c,u,!1);return T(n,l),l=n_(l,d,f),n&&O(l,n),l.legacy=!0,l}function k(n,r){null==r&&(r=s);var i=b(r,M_).getItemStyle(),o=x(r,M_),a=fn["c"](o,null,null,!0,!0);a.text=o.getShallow("show")?Object(m["Q"])(e.getFormattedLabel(r,M_),e.getFormattedLabel(r,L_),cn(t,r)):null;var l=fn["b"](o,null,!0);return T(n,i),i=n_(i,a,l),n&&O(i,n),i.legacy=!0,i}function O(e,t){for(var n in t)Object(m["q"])(t,n)&&(e[n]=t[n])}function T(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function E(e,n){if(null==n&&(n=s),Object(m["q"])(Fx,e)){var r=t.getItemVisual(n,"style");return r?r[Fx[e]]:null}if(Object(m["q"])(zx,e))return t.getItemVisual(n,e)}function C(e){if("cartesian2d"===o.type){var t=o.getBaseAxis();return Sr(Object(m["i"])({axis:t},e))}}function A(){return n.getCurrentSeriesIndices()}function M(e){return fn["d"](e,n)}}function J_(e){var t={};return Object(m["k"])(e.dimensions,(function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,o=t[i]=t[i]||[];o[r.coordDimIndex]=e.getDimensionIndex(n)}})),t}function Q_(e,t,n,r,i,o,a){if(r){var s=ew(e,t,n,r,i,o);return s&&a.setItemGraphicEl(n,s),s&&Object(un["J"])(s,r.focus,r.blurScope,r.emphasisDisabled),s}o.remove(t)}function ew(e,t,n,r,i,o){var a=-1,s=t;t&&tw(t,r,i)&&(a=Object(m["r"])(o.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=W_(r),s&&V_(s,u)),!1===r.morph?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),F_.normal.cfg=F_.normal.conOpt=F_.emphasis.cfg=F_.emphasis.conOpt=F_.blur.cfg=F_.blur.conOpt=F_.select.cfg=F_.select.conOpt=null,F_.isLegacy=!1,rw(u,n,r,i,l,F_),nw(u,n,r,i,l),Y_(e,u,n,r,F_,i,l),Object(m["q"])(r,"info")&&(Ux(u).info=r.info);for(var c=0;c=0?o.replaceAt(u,a):o.add(u),u}function tw(e,t,n){var r=Ux(e),i=t.type,o=t.shape,a=t.style;return n.isUniversalTransitionEnabled()||null!=i&&i!==r.customGraphicType||"path"===i&&hw(o)&&fw(o)!==r.customPathData||"image"===i&&Object(m["q"])(a,"image")&&a.image!==r.customImagePath}function nw(e,t,n,r,i){var o=n.clipPath;if(!1===o)e&&e.getClipPath()&&e.removeClipPath();else if(o){var a=e.getClipPath();a&&tw(a,o,r)&&(a=null),a||(a=W_(o),e.setClipPath(a)),Y_(null,a,t,o,null,r,i)}}function rw(e,t,n,r,i,o){if(!e.isGroup){iw(n,null,o),iw(n,M_,o);var a=o.normal.conOpt,s=o.emphasis.conOpt,l=o.blur.conOpt,u=o.select.conOpt;if(null!=a||null!=s||null!=u||null!=l){var c=e.getTextContent();if(!1===a)c&&e.removeTextContent();else{a=o.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=W_(a),e.setTextContent(c)),Y_(null,c,t,a,null,r,i);for(var d=a&&a.style,f=0;f=c;d--){var f=t.childAt(d);f_(f,Ux(t).option,i)}}}function lw(e){new Je(e.oldChildren,e.newChildren,uw,uw,e).add(cw).update(cw).remove(dw).execute()}function uw(e,t){var n=e&&e.name;return null!=n?n:B_+t}function cw(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,i=null!=t?n.oldChildren[t]:null;ew(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function dw(e){var t=this.context,n=t.oldChildren[e];f_(n,Ux(n).option,t.seriesModel)}function fw(e){return e&&(e.pathData||e.d)}function hw(e){return e&&(Object(m["q"])(e,"pathData")||Object(m["q"])(e,"d"))}function pw(e){e.registerChartView(q_),e.registerSeriesModel(Vx)}var gw=Object(lt["o"])(),vw=m["d"],yw=m["c"],mw=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=m["h"](bw,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new rn["a"],this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);Sw(a,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,i="category"===r.type,o=t.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=Ns(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var o=gw(e).pointerEl=new ln[i.type](vw(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=gw(e).labelEl=new J["a"](vw(t.label));e.add(i),_w(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=gw(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=gw(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),_w(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return i&&r.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=ln["createIcon"](o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Al["g"](e.event)},onmousedown:yw(this._onHandleDragMove,this,0,0),drift:yw(this._onHandleDragMove,this),ondragend:yw(this._onHandleDragEnd,this)}),r.add(i)),Sw(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");m["t"](s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,Fr["b"](this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){bw(this._axisPointerModel,!t&&this._moveAnimation,this._handle,ww(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(ww(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(ww(r)),gw(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Fr["a"](this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function bw(e,t,n,r){xw(gw(n).lastProp,r)||(gw(n).lastProp=r,t?sn["h"](n,r,e):(n.stopAnimation(),n.attr(r)))}function xw(e,t){if(m["A"](e)&&m["A"](t)){var n=!0;return m["k"](t,(function(t,r){n=n&&xw(e[r],t)})),!!n}return e===t}function _w(e,t){e[t.get(["label","show"])?"show":"hide"]()}function ww(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Sw(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)}))}var kw=mw;function Ow(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle(),t.fill=null):"shadow"===n&&(t=r.getAreaStyle(),t.stroke=null),t}function Tw(e,t,n,r,i){var o=n.get("value"),a=Cw(o,t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),s=n.getModel("label"),u=Yn["h"](s.get("padding")||0),c=s.getFont(),d=l["d"](a,c),f=i.position,h=d.width+u[1]+u[3],p=d.height+u[0]+u[2],g=i.align;"right"===g&&(f[0]-=h),"center"===g&&(f[0]-=h/2);var v=i.verticalAlign;"bottom"===v&&(f[1]-=p),"middle"===v&&(f[1]-=p/2),Ew(f,h,p,r);var y=s.get("backgroundColor");y&&"auto"!==y||(y=t.get(["axisLine","lineStyle","color"])),e.label={x:f[0],y:f[1],style:Object(fn["c"])(s,{text:a,font:c,fill:s.getTextColor(),padding:u,backgroundColor:y}),z2:10}}function Ew(e,t,n,r){var i=r.getWidth(),o=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function Cw(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:wa(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};m["k"](r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)})),m["C"](a)?o=a.replace("{value}",o):m["w"](a)&&(o=a(s))}return o}function Aw(e,t,n){var r=La["c"]();return La["g"](r,r,n.rotation),La["i"](r,r,n.position),ln["applyTransform"]([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function Mw(e,t,n,r,i,o){var a=As.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),Tw(t,r,i,o,{position:Aw(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function Lw(e,t,n){return n=n||0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function Iw(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function Dw(e,t,n,r,i,o){return{cx:e,cy:t,r0:n,r:r,startAngle:i,endAngle:o,clockwise:!0}}var jw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=Pw(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=Ow(r),d=Rw[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}var f=os(a.model,n);Mw(t,e,f,n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=os(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=Aw(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=Pw(o,i).getOtherAxis(i).getGlobalExtent(),l="x"===i.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];var f=[{verticalAlign:"middle"},{align:"center"}];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:f[l]}},t}(kw);function Pw(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var Rw={line:function(e,t,n){var r=Lw([t,n[0]],[t,n[1]],Nw(e));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),i=n[1]-n[0];return{type:"Rect",shape:Iw([t-r/2,n[0]],[r,i],Nw(e))}}};function Nw(e){return"x"===e.dim?0:1}var Bw=jw,Fw=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(oo["a"]),zw=Fw,Uw=n("22d1"),Hw=Object(lt["o"])(),Vw=m["k"];function Gw(e,t,n){if(!Uw["a"].node){var r=t.getZr();Hw(r).records||(Hw(r).records={}),qw(r,t);var i=Hw(r).records[e]||(Hw(r).records[e]={});i.handler=n}}function qw(e,t){function n(n,r){e.on(n,(function(n){var i=Xw(t);Vw(Hw(e).records,(function(e){e&&r(e,n,i.dispatchAction)})),Ww(i.pendings,t)}))}Hw(e).initialized||(Hw(e).initialized=!0,n("click",m["h"](Kw,"click")),n("mousemove",m["h"](Kw,"mousemove")),n("globalout",Yw))}function Ww(e,t){var n,r=e.showTip.length,i=e.hideTip.length;r?n=e.showTip[r-1]:i&&(n=e.hideTip[i-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function Yw(e,t,n){e.handler("leave",null,n)}function Kw(e,t,n,r){t.handler(e,n,r)}function Xw(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function Zw(e,t){if(!Uw["a"].node){var n=t.getZr(),r=(Hw(n).records||{})[e];r&&(Hw(n).records[e]=null)}}var $w=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";Gw("axisPointer",n,(function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){Zw("axisPointer",t)},t.prototype.dispose=function(e,t){Zw("axisPointer",t)},t.type="axisPointer",t}(io["a"]),Jw=$w;function Qw(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=lt["u"](o,e);if(null==a||a<0||m["t"](a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),d=c.dim,f=u.dim,h="x"===d||"radius"===d?1:0,p=o.mapDimension(f),g=[];g[h]=o.get(p,a),g[1-h]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(o.getValues(m["H"](l.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),r=[v.x+v.width/2,v.y+v.height/2]}return{point:r,el:s}}var eS=Object(lt["o"])();function tS(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||Object(m["c"])(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){dS(i)&&(i=Qw({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=dS(i),u=o.axesInfo,c=s.axesInfo,d="leave"===r||dS(i),f={},h={},p={list:[],map:{}},g={showPointer:Object(m["h"])(iS,h),showTooltip:Object(m["h"])(oS,p)};Object(m["k"])(s.coordSysMap,(function(e,t){var n=l||e.containPoint(i);Object(m["k"])(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,o=uS(u,e);if(!d&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=r.pointToData(i)),null!=a&&nS(e,a,g,!1,f)}}))}));var v={};return Object(m["k"])(c,(function(e,t){var n=e.linkGroup;n&&!h[t]&&Object(m["k"])(n.axesInfo,(function(t,r){var i=h[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,cS(t),cS(e)))),v[e.key]=o}}))})),Object(m["k"])(v,(function(e,t){nS(c[t],e,g,!0,f)})),aS(h,c,f),sS(p,i,e,a),lS(c,a,n),f}}function nS(e,t,n,r,i){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=rS(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==i.seriesIndex&&Object(m["m"])(i,s[0]),!r&&e.snap&&o.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function rS(e,t){var n=t.axis,r=n.dim,i=e,o=[],a=Number.MAX_VALUE,s=-1;return Object(m["k"])(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var f=t.getAxisTooltipData(d,e,n);c=f.dataIndices,u=f.nestestValue}else{if(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null),!c.length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var h=e-u,p=Math.abs(h);p<=a&&((p=0&&s<0)&&(a=p,s=h,i=u,o.length=0),Object(m["k"])(c,(function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:o,snapToValue:i}}function iS(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function oS(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=zs(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function aS(e,t,n){var r=n.axesInfo=[];Object(m["k"])(t,(function(t,n){var i=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(i.status="show"),i.value=o.value,i.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}))}function sS(e,t,n,r){if(!dS(t)&&e.list.length){var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}else r({type:"hideTip"})}function lS(e,t,n){var r=n.getZr(),i="axisPointerLastHighlights",o=eS(r)[i]||{},a=eS(r)[i]={};Object(m["k"])(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&Object(m["k"])(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];Object(m["k"])(o,(function(e,t){!a[t]&&l.push(e)})),Object(m["k"])(a,(function(e,t){!o[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function uS(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function cS(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function dS(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function fS(e){Vs.registerAxisPointerClass("CartesianAxisPointer",Bw),e.registerComponentModel(zw),e.registerComponentView(Jw),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Object(m["t"])(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=Ms(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},tS)}function hS(e){Object(r["a"])(tl),Object(r["a"])(fS)}var pS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o),l=s.getExtent(),u=o.dataToCoord(t),c=r.get("type");if(c&&"none"!==c){var d=Ow(r),f=vS[c](o,a,u,l);f.style=d,e.graphicKey=f.type,e.pointer=f}var h=r.get(["label","margin"]),p=gS(t,n,r,a,h);Tw(e,n,r,i,p)},t}(kw);function gS(e,t,n,r,i){var o=t.axis,a=o.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=r.getRadiusAxis().getExtent();if("radius"===o.dim){var f=La["c"]();La["g"](f,f,s),La["i"](f,f,[r.cx,r.cy]),l=ln["applyTransform"]([a,-i],f);var h=t.getModel("axisLabel").get("rotate")||0,p=As.innerTextLayout(s,h*Math.PI/180,-1);u=p.textAlign,c=p.textVerticalAlign}else{var g=d[1];l=r.coordToPoint([g+i,a]);var v=r.cx,y=r.cy;u=Math.abs(l[0]-v)/g<.3?"center":l[0]>v?"left":"right",c=Math.abs(l[1]-y)/g<.3?"middle":l[1]>y?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}var vS={line:function(e,t,n,r){return"angle"===e.dim?{type:"Line",shape:Lw(t.coordToPoint([r[0],n]),t.coordToPoint([r[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r){var i=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:Dw(t.cx,t.cy,r[0],r[1],(-n-i/2)*o,(i/2-n)*o)}:{type:"Sector",shape:Dw(t.cx,t.cy,n-i/2,n+i/2,0,2*Math.PI)}}},yS=pS,mS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.findAxisModel=function(e){var t,n=this.ecModel;return n.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(oo["a"]),bS=mS,xS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",lt["b"]).models[0]},t.type="polarAxis",t}(oo["a"]);m["K"](xS,lo);var _S=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.type="angleAxis",t}(xS),wS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.type="radiusAxis",t}(xS),SS=function(e){function t(t,n){return e.call(this,"radius",t,n)||this}return Object(Ye["a"])(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(ns);SS.prototype.dataToRadius=ns.prototype.dataToCoord,SS.prototype.radiusToData=ns.prototype.coordToData;var kS=SS,OS=Object(lt["o"])(),TS=function(e){function t(t,n){return e.call(this,"angle",t,n||[0,360])||this}return Object(Ye["a"])(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),i=n.count();if(r[1]-r[0]<1)return 0;var o=r[0],a=e.dataToCoord(o+1)-e.dataToCoord(o),s=Math.abs(a),u=l["d"](null==o?"":o+"",t.getFont(),"center","top"),c=Math.max(u.height,7),d=c/s;isNaN(d)&&(d=1/0);var f=Math.max(0,Math.floor(d)),h=OS(e.model),p=h.lastAutoInterval,g=h.lastTickCount;return null!=p&&null!=g&&Math.abs(p-f)<=1&&Math.abs(g-i)<=1&&p>f?f=p:(h.lastTickCount=i,h.lastAutoInterval=f),f},t}(ns);TS.prototype.dataToAngle=ns.prototype.dataToCoord,TS.prototype.angleToData=ns.prototype.coordToData;var ES=TS,CS=["radius","angle"],AS=function(){function e(e){this.dimensions=CS,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new kS,this._angleAxis=new ES,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),o=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);r.inverse?o=a-360:a=o+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;var l=Math.atan2(-n,t)/Math.PI*180,u=la)l+=360*u;return[s,l]},e.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,r=Math.cos(n)*t+this.cx,i=-Math.sin(n)*t+this.cy;return[r,i]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var r=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-r[0]*i,endAngle:-r[1]*i,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,i=n*n+r*r-1e-4,o=this.r,a=this.r0;return i<=o*o&&i>=a*a}}},e.prototype.convertToPixel=function(e,t,n){var r=MS(t);return r===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=MS(t);return r===this?this.pointToData(n):null},e}();function MS(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var LS=AS;function IS(e,t,n){var r=t.get("center"),i=n.getWidth(),o=n.getHeight();e.cx=Object(Hn["o"])(r[0],i),e.cy=Object(Hn["o"])(r[1],o);var a=e.getRadiusAxis(),s=Math.min(i,o)/2,l=t.get("radius");null==l?l=[0,"100%"]:m["t"](l)||(l=[0,l]);var u=[Object(Hn["o"])(l[0],s),Object(Hn["o"])(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}function DS(e,t){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===n){var t=e.getData();m["k"](Ea(t,"radius"),(function(e){i.scale.unionExtentFromData(t,e)})),m["k"](Ea(t,"angle"),(function(e){r.scale.unionExtentFromData(t,e)}))}})),ma(r.scale,r.model),ma(i.scale,i.model),"category"===r.type&&!r.onBand){var o=r.getExtent(),a=360/r.scale.count();r.inverse?o[1]+=a:o[1]-=a,r.setExtent(o[0],o[1])}}function jS(e){return"angleAxis"===e.mainType}function PS(e,t){if(e.type=t.get("type"),e.scale=ba(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),jS(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle");e.setExtent(n,n+(e.inverse?-360:360))}t.axis=e,e.model=t}var RS={dimensions:CS,create:function(e,t){var n=[];return e.eachComponent("polar",(function(e,r){var i=new LS(r+"");i.update=DS;var o=i.getRadiusAxis(),a=i.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");PS(o,s),PS(a,l),IS(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e})),e.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",lt["b"]).models[0];0,e.coordinateSystem=t.coordinateSystem}})),n}},NS=RS,BS=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function FS(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function zS(e){var t=e.getRadiusAxis();return t.inverse?0:1}function US(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var HS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=m["H"](n.getViewLabels(),(function(e){e=m["d"](e);var t=n.scale,r="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(r),e}));US(s),US(o),m["k"](BS,(function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||VS[t](this.group,e,r,o,a,i,s)}),this)}},t.type="angleAxis",t}(Vs),VS={axisLine:function(e,t,n,r,i,o){var a,s=t.getModel(["axisLine","lineStyle"]),l=zS(n),u=l?0:1;a=0===o[u]?new yl["a"]({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new ml["a"]({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0}),a.style.fill=null,e.add(a)},axisTick:function(e,t,n,r,i,o){var a=t.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[zS(n)],u=m["H"](r,(function(e){return new vs["a"]({shape:FS(n,[l,l+s],e.coord)})}));e.add(ln["mergePath"](u,{style:m["i"](a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,n,r,i,o){if(i.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[zS(n)],c=[],d=0;dp?"left":"right",y=Math.abs(h[1]-g)/f<.3?"middle":h[1]>g?"top":"bottom";if(s&&s[d]){var b=s[d];m["A"](b)&&b.textStyle&&(a=new Ke["a"](b.textStyle,l,l.ecModel))}var x=new J["a"]({silent:As.isLabelSilent(t),style:Object(fn["c"])(a,{x:h[0],y:h[1],fill:a.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:r.formattedLabel,align:v,verticalAlign:y})});if(e.add(x),c){var _=As.makeAxisEventDataBase(t);_.targetType="axisLabel",_.value=r.rawLabel,Object(ut["a"])(x).eventData=_}}),this)},splitLine:function(e,t,n,r,i,o){var a=t.getModel("splitLine"),s=a.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],d=0;d=0?"p":"n",T=x;m&&(r[s][k]||(r[s][k]={p:x,n:x}),T=r[s][k][O]);var E=void 0,C=void 0,A=void 0,M=void 0;if("radius"===d.dim){var L=d.dataToCoord(S)-x,I=o.dataToCoord(k);Math.abs(L)=M})}}}))}function ek(e){var t={};m["k"](e,(function(e,n){var r=e.getData(),i=e.coordinateSystem,o=i.getBaseAxis(),a=JS(i,o),s=o.getExtent(),l="category"===o.type?o.getBandWidth():Math.abs(s[1]-s[0])/r.count(),u=t[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;t[a]=u;var d=$S(e);c[d]||u.autoWidthCount++,c[d]=c[d]||{width:0,maxWidth:0};var f=Object(Hn["o"])(e.get("barWidth"),l),h=Object(Hn["o"])(e.get("barMaxWidth"),l),p=e.get("barGap"),g=e.get("barCategoryGap");f&&!c[d].width&&(f=Math.min(u.remainedWidth,f),c[d].width=f,u.remainedWidth-=f),h&&(c[d].maxWidth=h),null!=p&&(u.gap=p),null!=g&&(u.categoryGap=g)}));var n={};return m["k"](t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=Object(Hn["o"])(e.categoryGap,i),a=Object(Hn["o"])(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-o)/(l+(l-1)*a);u=Math.max(u,0),m["k"](r,(function(e,t){var n=e.maxWidth;n&&n=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),r=[],i="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),r[i]=t.toGlobalCoord(t.dataToCoord(+e)),r[1-i]=0===i?n.y+n.height/2:n.x+n.width/2,r},e.prototype.convertToPixel=function(e,t,n){var r=mk(t);return r===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=mk(t);return r===this?this.pointToData(n):null},e}();function mk(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var bk=yk;function xk(e,t){var n=[];return e.eachComponent("singleAxis",(function(r,i){var o=new bk(r,e,t);o.name="single_"+i,o.resize(r,t),r.coordinateSystem=o,n.push(o)})),e.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",lt["b"]).models[0];e.coordinateSystem=t&&t.coordinateSystem}})),n}var _k={create:xk,dimensions:vk},wk=_k,Sk=["x","y"],kk=["width","height"],Ok=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.coordinateSystem,s=Ck(a,1-Ek(o)),l=a.dataToPoint(t)[0],u=r.get("type");if(u&&"none"!==u){var c=Ow(r),d=Tk[u](o,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}var f=ak(n);Mw(t,e,f,n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=ak(t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=Aw(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.coordinateSystem,a=Ek(i),s=Ck(o,a),l=[e.x,e.y];l[a]+=t[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=Ck(o,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=l[a],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(kw),Tk={line:function(e,t,n){var r=Lw([t,n[0]],[t,n[1]],Ek(e));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(e,t,n){var r=e.getBandWidth(),i=n[1]-n[0];return{type:"Rect",shape:Iw([t-r/2,n[0]],[r,i],Ek(e))}}};function Ek(e){return e.isHorizontal()?0:1}function Ck(e,t){var n=e.getRect();return[n[Sk[t]],n[Sk[t]]+n[kk[t]]]}var Ak=Ok,Mk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.type="single",t}(io["a"]);function Lk(e){Object(r["a"])(fS),Vs.registerAxisPointerClass("SingleAxisPointer",Ak),e.registerComponentView(Mk),e.registerComponentView(dk),e.registerComponentModel(hk),wo(e,"single",hk,hk.defaultOption),e.registerCoordinateSystem("single",wk)}var Ik=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.init=function(t,n,r){var i=Object(xi["f"])(t);e.prototype.init.apply(this,arguments),Dk(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),Dk(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(oo["a"]);function Dk(e,t){var n,r=e.cellSize;n=m["t"](r)?r:e.cellSize=[r,r],1===n.length&&(n[1]=n[0]);var i=m["H"]([0,1],(function(e){return Object(xi["j"])(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]}));Object(xi["h"])(e,t,{type:"box",ignoreSize:i})}var jk=Ik,Pk=n("ef59"),Rk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,o=i.getRangeInfo(),a=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,o,r),this._renderLines(e,o,a,r),this._renderYearText(e,o,a,r),this._renderMonthText(e,s,a,r),this._renderWeekText(e,s,o,a,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel("itemStyle").getItemStyle(),o=r.getCellWidth(),a=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var l=r.dataToRect([s],!1).tl,u=new zn["a"]({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:i});n.add(u)}},t.prototype._renderLines=function(e,t,n,r){var i=this,o=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){f(u.formatedDate),0===c&&(u=o.getDateInfo(t.start.y+"-"+t.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=o.getDateInfo(d)}function f(t){i._firstDayOfMonth.push(o.getDateInfo(t)),i._firstDayPoints.push(o.dataToRect([t],!1).tl);var l=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(l[0]),i._blpoints.push(l[l.length-1]),s&&i._drawSplitline(l,a,r)}f(o.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,l,n),a,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,l,n),a,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i="horizontal"===n?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new Ei["a"]({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),o=[],a=0;a<7;a++){var s=r.getNextNDay(i.time,a),l=r.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},t.prototype._formatterLabel=function(e,t){return Object(m["C"])(e)&&e?Object(Yn["e"])(e,t):Object(m["w"])(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var o=t[0],a=t[1],s=["center","bottom"];"bottom"===r?(a+=i,s=["center","top"]):"left"===r?o-=i:"right"===r?(o+=i,s=["center","top"]):a-=i;var l=0;return"left"!==r&&"right"!==r||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel("yearLabel");if(i.get("show")){var o=i.get("margin"),a=i.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+"-"+t.end.y);var h=i.get("formatter"),p={start:t.start.y,end:t.end.y,nameMap:f},g=this._formatterLabel(h,p),v=new J["a"]({z2:30,style:Object(fn["c"])(i,{text:g})});v.attr(this._yearTextPositionControl(v,d[a],n,a,o)),r.add(v)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var o="left",a="top",s=e[0],l=e[1];return"horizontal"===n?(l+=i,t&&(o="center"),"start"===r&&(a="bottom")):(s+=i,t&&(a="middle"),"start"===r&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),a=i.get("margin"),s=i.get("position"),l=i.get("align"),u=[this._tlpoints,this._blpoints];o&&!Object(m["C"])(o)||(o&&(t=Object(Pk["d"])(o)||t),o=t.get(["time","monthAbbr"])||[]);var c="start"===s?0:1,d="horizontal"===n?0:1;a="start"===s?-a:a;for(var f="center"===l,h=0;h=r.start.time&&n.timea.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,n=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];n[0].time>n[1].time&&(t=!0,n.reverse());var r=Math.floor(n[1].time/Bk)-Math.floor(n[0].time/Bk)+1,i=new Date(n[0].time),o=i.getDate(),a=n[1].date.getDate();i.setDate(o+r-1);var s=i.getDate();if(s!==a){var l=i.getTime()-n[1].time>0?1:-1;while((s=i.getDate())!==a&&(i.getTime()-n[1].time)*l>0)r-=l,i.setDate(s-l)}var u=Math.floor((r+n[0].day+6)/7),c=t?1-u:u-1;return t&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:r,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||0===e&&tr.lweek)return null;var i=7*(e-1)-r.fweek+t,o=new Date(r.start.time);return o.setDate(+r.start.d+i),this.getDateInfo(o)},e.create=function(t,n){var r=[];return t.eachComponent("calendar",(function(i){var o=new e(i,t,n);r.push(o),i.coordinateSystem=o})),t.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=r[e.get("calendarIndex")||0])})),r},e.dimensions=["time","value"],e}();function zk(e){var t=e.calendarModel,n=e.seriesModel,r=t?t.coordinateSystem:n?n.coordinateSystem:null;return r}var Uk=Fk;function Hk(e){e.registerComponentModel(jk),e.registerComponentView(Nk),e.registerCoordinateSystem("calendar",Uk)}function Vk(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function Gk(e,t){var n;return m["k"](t,(function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)})),n}function qk(e,t,n){var r=m["m"]({},n),i=e[t],o=n.$action||"merge";"merge"===o?i?(m["I"](i,r,!0),Object(xi["h"])(i,r,{ignoreSize:!0}),Object(xi["c"])(n,i),Kk(n,i),Kk(n,i,"shape"),Kk(n,i,"style"),Kk(n,i,"extra"),n.clipPath=i.clipPath):e[t]=r:"replace"===o?e[t]=r:"remove"===o&&i&&(e[t]=null)}var Wk=["transition","enterFrom","leaveTo"],Yk=Wk.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Kk(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var r=n?Wk:Yk,i=0;i=0;l--){u=n[l],c=lt["e"](u.id,null),d=null!=c?i.get(c):null;if(d){f=d.parent,g=Jk(f);var v=f===r?{width:o,height:a}:{width:g.width,height:g.height},y={},b=xi["i"](d,u,v,null,{hv:u.hv,boundingMode:u.bounding},y);if(!Jk(d).isNew&&b){for(var x=u.transition,_={},w=0;w=0)?_[S]=k:d[S]=k}Object(sn["h"])(d,_,e,0)}else d.attr(y)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each((function(n){nO(n,Jk(n).option,t,e._lastGraphicModel)})),this._elMap=m["f"]()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(io["a"]);function eO(e){var t=m["q"]($k,e)?$k[e]:ln["getShapeClass"](e);var n=new t({});return Jk(n).type=e,n}function tO(e,t,n,r){var i=eO(n);return t.add(i),r.set(e,i),Jk(i).id=e,Jk(i).isNew=!0,i}function nO(e,t,n,r){var i=e&&e.parent;i&&("group"===e.type&&e.traverse((function(e){nO(e,t,n,r)})),f_(e,t,r),n.removeKey(Jk(e).id))}function rO(e,t,n,r){e.isGroup||m["k"]([["cursor",oc["c"].prototype.cursor],["zlevel",r||0],["z",n||0],["z2",0]],(function(n){var r=n[0];m["q"](t,r)?e[r]=m["P"](t[r],n[1]):null==e[r]&&(e[r]=n[1])})),m["k"](m["F"](t),(function(n){if(0===n.indexOf("on")){var r=t[n];e[n]=m["w"](r)?r:null}})),m["q"](t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}function iO(e){return e=m["m"]({},e),m["k"](["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(xi["a"]),(function(t){delete e[t]})),e}function oO(e,t,n){var r=Object(ut["a"])(e).eventData;e.silent||e.ignore||r||(r=Object(ut["a"])(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function aO(e){e.registerComponentModel(Zk),e.registerComponentView(Qk),e.registerPreprocessor((function(e){var t=e.graphic;Object(m["t"])(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}))}var sO=["x","y","radius","angle","single"],lO=["cartesian2d","polar","singleAxis"];function uO(e){var t=e.get("coordinateSystem");return Object(m["r"])(lO,t)>=0}function cO(e){return e+"Axis"}function dO(e,t){var n,r=Object(m["f"])(),i=[],o=Object(m["f"])();e.eachComponent({mainType:"dataZoom",query:t},(function(e){o.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&l(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),u(e)}function l(e){var t=!1;return e.eachTargetAxis((function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)})),t}function u(e){e.eachTargetAxis((function(e,t){(r.get(e)||r.set(e,[]))[t]=!0}))}return i}function fO(e){var t=e.ecModel,n={infoList:[],infoMap:Object(m["f"])()};return e.eachTargetAxis((function(e,r){var i=t.getComponent(cO(e),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}})),n}var hO=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),pO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return Object(Ye["a"])(t,e),t.prototype.init=function(e,t,n){var r=gO(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=gO(e);Object(m["I"])(this.option,e,!0),Object(m["I"])(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;Object(m["k"])([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=Object(m["f"])(),n=this._fillSpecifiedTargetAxis(t);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return Object(m["k"])(sO,(function(n){var r=this.getReferringComponents(cO(n),lt["a"]);if(r.specified){t=!0;var i=new hO;Object(m["k"])(r.models,(function(e){i.add(e.componentIndex)})),e.set(n,i)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i="vertical"===t?"y":"x",o=n.findComponents({mainType:i+"Axis"});a(o,i)}if(r){o=n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}});a(o,"single")}function a(t,n){var i=t[0];if(i){var o=new hO;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",lt["b"]).models[0];a&&Object(m["k"])(t,(function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",lt["b"]).models[0]&&o.add(e.componentIndex)}))}}}r&&Object(m["k"])(sO,(function(t){if(r){var i=n.findComponents({mainType:cO(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new hO;o.add(i[0].componentIndex),e.set(t,o),r=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");Object(m["k"])([["start","startValue"],["end","endValue"]],(function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(cO(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){Object(m["k"])(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(cO(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;Object(m["k"])([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;Object(m["k"])(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;ro[1];if(c&&!d&&!f)return!0;c&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n}))}else SO(r,(function(n){if("empty"===i)e.setData(t=t.map(n,(function(e){return a(e)?e:NaN})));else{var r={};r[n]=o,t.selectRange(r)}}));SO(r,(function(e){t.setApproximateExtent(o,e)}))}}))}function a(e){return e>=o[0]&&e<=o[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;SO(["min","max"],(function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=Hn["k"](n[0]+o,n,[0,100],!0):null!=i&&(o=Hn["k"](i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=Hn["f"](n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}();function TO(e,t,n){var r=[1/0,-1/0];SO(n,(function(e){Ca(r,e.getData(),t)}));var i=e.getAxisModel(),o=pa(i.axis.scale,i,r).calculate();return[o.min,o.max]}var EO=OO,CO={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=e.getComponent(cO(r),i);t(r,i,o,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new EO(t,r,o,e),n.push(i.__dzAxisProxy))}));var r=Object(m["f"])();return Object(m["k"])(n,(function(e){Object(m["k"])(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}},AO=CO;function MO(e){e.registerAction("dataZoom",(function(e,t){var n=dO(t,e);Object(m["k"])(n,(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}var LO=!1;function IO(e){LO||(LO=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,AO),MO(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function DO(e){e.registerComponentModel(mO),e.registerComponentView(wO),IO(e)}var jO=function(){function e(){}return e}(),PO={};function RO(e,t){PO[e]=t}function NO(e){return PO[e]}var BO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;m["k"](this.option.feature,(function(e,n){var r=NO(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),m["I"](e,r.defaultOption))}))},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(oo["a"]),FO=BO;function zO(e,t,n){var r=t.getBoxLayoutParams(),i=t.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=Object(xi["g"])(r,o,i);Object(xi["b"])(t.get("orient"),e,t.get("itemGap"),a.width,a.height),Object(xi["i"])(e,r,o,i)}function UO(e,t){var n=Yn["h"](t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new zn["a"]({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1}),e}var HO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),e.get("show")){var o=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},u=this._features||(this._features={}),c=[];m["k"](s,(function(e,t){c.push(t)})),new Je(this._featureNames||[],c).add(d).update(d).remove(m["h"](d,null)).execute(),this._featureNames=c,zO(i,e,n),i.add(UO(i.getBoundingRect(),e)),a||i.eachChild((function(e){var t=e.__title,r=e.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=e.getTextContent(),u=s&&s.ensureState("emphasis");if(u&&!m["w"](u)&&t){var c=u.style||(u.style={}),d=l["d"](t,J["a"].makeFont(c)),f=e.x+i.x,h=e.y+i.y+o,p=!1;h+d.height>n.getHeight()&&(a.position="top",p=!0);var g=p?-5-d.height:o+10;f+d.width/2>n.getWidth()?(a.position=["100%",g],c.align="right"):f-d.width/2<0&&(a.position=[0,g],c.align="left")}}))}function d(i,o){var a,l=c[i],d=c[o],h=s[l],p=new Ke["a"](h,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===l&&(h.title=r.newTitle),l&&!d){if(VO(l))a={onclick:p.option.onclick,featureName:l};else{var g=NO(l);if(!g)return;a=new g}u[l]=a}else if(a=u[d],!a)return;a.uid=Object(Rr["c"])("toolbox-feature"),a.model=p,a.ecModel=t,a.api=n;var v=a instanceof jO;l||!d?!p.get("show")||v&&a.unusable?v&&a.remove&&a.remove(t,n):(f(p,a,l),p.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?un["r"]:un["C"])(r[e])},a instanceof jO&&a.render&&a.render(p,t,n,r)):v&&a.dispose&&a.dispose(t,n)}function f(r,s,l){var u,c,d=r.getModel("iconStyle"),f=r.getModel(["emphasis","iconStyle"]),h=s instanceof jO&&s.getIcons?s.getIcons():r.get("icon"),p=r.get("title")||{};m["C"](h)?(u={},u[l]=h):u=h,m["C"](p)?(c={},c[l]=p):c=p;var g=r.iconPaths={};m["k"](u,(function(l,u){var h=ln["createIcon"](l,{},{x:-o/2,y:-o/2,width:o,height:o});h.setStyle(d.getItemStyle());var p=h.ensureState("emphasis");p.style=f.getItemStyle();var v=new J["a"]({style:{text:c[u],align:f.get("textAlign"),borderRadius:f.get("textBorderRadius"),padding:f.get("textPadding"),fill:null},ignore:!0});h.setTextContent(v),ln["setTooltipConfig"]({el:h,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),h.__title=c[u],h.on("mouseover",(function(){var t=f.getItemStyle(),r=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";v.setStyle({fill:f.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:f.get("textBackgroundColor")}),h.setTextConfig({position:f.get("textPosition")||r}),v.ignore=!e.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",u])&&n.leaveEmphasis(this),v.hide()})),("emphasis"===r.get(["iconStatus",u])?un["r"]:un["C"])(h),i.add(h),h.on("click",m["c"](s.onclick,s,t,n,u)),g[u]=h}))}},t.prototype.updateView=function(e,t,n,r){m["k"](this._features,(function(e){e instanceof jO&&e.updateView&&e.updateView(e.model,t,n,r)}))},t.prototype.remove=function(e,t){m["k"](this._features,(function(n){n instanceof jO&&n.remove&&n.remove(e,t)})),this.group.removeAll()},t.prototype.dispose=function(e,t){m["k"](this._features,(function(n){n instanceof jO&&n.dispose&&n.dispose(e,t)}))},t.type="toolbox",t}(io["a"]);function VO(e){return 0===e.indexOf("my")}var GO=HO,qO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",i="svg"===t.getZr().painter.getType(),o=i?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=Uw["a"].browser;if(Object(m["w"])(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=r+"."+o,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||i){var c=a.split(","),d=c[0].indexOf("base64")>-1,f=i?decodeURIComponent(c[1]):c[1];d&&(f=window.atob(f));var h=r+"."+o;if(window.navigator.msSaveOrOpenBlob){var p=f.length,g=new Uint8Array(p);while(p--)g[p]=f.charCodeAt(p);var v=new Blob([g]);window.navigator.msSaveOrOpenBlob(v,h)}else{var y=document.createElement("iframe");document.body.appendChild(y);var b=y.contentWindow,x=b.document;x.open("image/svg+xml","replace"),x.write(f),x.close(),b.focus(),x.execCommand("SaveAs",!0,h),document.body.removeChild(y)}}else{var _=n.get("lang"),w='',S=window.open();S.document.write(w),S.document.title=r}},t.getDefaultOption=function(e){var t={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return t},t}(jO),WO=qO,YO="__ec_magicType_stack__",KO=[["line","bar"],["stack"]],XO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return m["k"](e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n},t.getDefaultOption=function(e){var t={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return t},t.prototype.onclick=function(e,t,n){var r=this.model,i=r.get(["seriesIndex",n]);if(ZO[n]){var o,a={series:[]},s=function(e){var t=e.subType,i=e.id,o=ZO[n](t,i,e,r);o&&(m["i"](o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim,c=u+"Axis",d=e.getReferringComponents(c,lt["b"]).models[0],f=d.componentIndex;a[c]=a[c]||[];for(var h=0;h<=f;h++)a[c][f]=a[c][f]||{};a[c][f].boundaryGap="bar"===n}}};m["k"](KO,(function(e){m["r"](e,n)>=0&&m["k"](e,(function(e){r.setIconStatus(e,"normal")}))})),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},s);var l=n;"stack"===n&&(o=m["I"]({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(l="tiled")),t.dispatchAction({type:"changeMagicType",currentType:l,newOption:a,newTitle:o,featureName:"magicType"})}},t}(jO),ZO={line:function(e,t,n,r){if("bar"===e)return m["I"]({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return m["I"]({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var i=n.get("stack")===YO;if("line"===e||"bar"===e)return r.setIconStatus("stack",i?"normal":"emphasis"),m["I"]({id:t,stack:i?"":YO},r.get(["option","stack"])||{},!0)}};Ml["c"]({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));var $O=XO,JO=new Array(60).join("-"),QO="\t";function eT(e){var t={},n=[],r=[];return e.eachRawSeries((function(e){var i=e.coordinateSystem;if(!i||"cartesian2d"!==i.type&&"polar"!==i.type)n.push(e);else{var o=i.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;t[a]||(t[a]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),t[a].series.push(e)}else n.push(e)}})),{seriesGroupByCategoryAxis:t,other:n,meta:r}}function tT(e){var t=[];return m["k"](e,(function(e,n){var r=e.categoryAxis,i=e.valueAxis,o=i.dim,a=[" "].concat(m["H"](e.series,(function(e){return e.name}))),s=[r.model.getCategories()];m["k"](e.series,(function(e){var t=e.getRawData();s.push(e.getRawData().mapArray(t.mapDimension(o),(function(e){return e})))}));for(var l=[a.join(QO)],u=0;u=0)return!0}var aT=new RegExp("["+QO+"]+","g");function sT(e){for(var t=e.split(/\n+/g),n=iT(t.shift()).split(aT),r=[],i=m["H"](n,(function(e){return{name:e,data:[]}})),o=0;o=0;i--){var o=n[i];if(o[r])break}if(i<0){var a=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(a){var s=a.getPercentRange();n[0][r]={dataZoomId:r,start:s[0],end:s[1]}}}})),n.push(t)}function vT(e){var t=bT(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return hT(n,(function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n],e){r[n]=e;break}})),r}function yT(e){pT(e).snapshots=null}function mT(e){return bT(e).length}function bT(e){var t=pT(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var xT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.onclick=function(e,t){yT(e),t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var t={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return t},t}(jO);Ml["c"]({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));var _T=xT,wT=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],ST=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=OT(t,e);Object(m["k"])(TT,(function(e,t){(!n||!n.include||Object(m["r"])(n.include,t)>=0)&&e(i,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=AT[e.brushType](0,n,t);e.__rangeOffset={offset:LT[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){Object(m["k"])(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&Object(m["k"])(r.coordSyses,(function(r){var i=AT[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){Object(m["k"])(e,(function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var r=AT[e.brushType](0,n.coordSys,e.coordRange),i=e.__rangeOffset;e.range=i?LT[e.brushType](r.values,i.offset,DT(r.xyMinMax,i.xyMinMax)):r.values}}),this)},e.prototype.makePanelOpts=function(e,t){return Object(m["H"])(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:oy(r),isTargetByCursor:sy(r,e,n.coordSysModel),getLinearBrushOtherExtent:ay(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&Object(m["r"])(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=OT(t,e),i=0;ie[1]&&e.reverse(),e}function OT(e,t){return Object(lt["s"])(e,t,{includeMainTypes:wT})}var TT={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=Object(m["f"])(),a={},s={};(n||r||i)&&(Object(m["k"])(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),Object(m["k"])(r,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),Object(m["k"])(i,(function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),o.each((function(e){var i=e.coordinateSystem,o=[];Object(m["k"])(i.getCartesians(),(function(e,t){(Object(m["r"])(n,e.getAxis("x").model)>=0||Object(m["r"])(r,e.getAxis("y").model)>=0)&&o.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:CT.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){Object(m["k"])(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:CT.geo})}))}},ET=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],CT={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(ln["getTransform"](e)),t}},AT={lineX:Object(m["h"])(MT,0),lineY:Object(m["h"])(MT,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[kT([i[0],o[0]]),kT([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]],o=Object(m["H"])(n,(function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o}));return{values:o,xyMinMax:i}}};function MT(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=kT(Object(m["H"])([0,1],(function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))}))),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var LT={lineX:Object(m["h"])(IT,0),lineY:Object(m["h"])(IT,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return Object(m["H"])(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function IT(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function DT(e,t){var n=jT(e),r=jT(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function jT(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var PT=ST,RT=n("2f1f"),NT=m["k"],BT=Object(lt["p"])("toolbox-dataZoom_"),FT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new iy(n.getZr()),this._brushController.on("brush",m["c"](this._onBrush,this)).mount()),VT(e,t,this,r,n),HT(e,t)},t.prototype.onclick=function(e,t,n){zT[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]);var i=new PT(UT(this.model),r,{include:["grid"]});i.matchOutputRanges(t,r,(function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(o("x",n,t[0]),o("y",n,t[1])):o({lineX:"x",lineY:"y"}[r],n,t)}})),gT(r,n),this._dispatchZoomAction(n)}function o(e,t,i){var o=t.getAxis(e),s=o.model,l=a(e,s,r),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(i=Vg(0,i.slice(),o.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(n[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function a(e,t,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){var i=n.getAxisModel(e,t.componentIndex);i&&(r=n)})),r}},t.prototype._dispatchZoomAction=function(e){var t=[];NT(e,(function(e,n){t.push(m["d"](e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){var t={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return t},t}(jO),zT={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(vT(this.ecModel))}};function UT(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}function HT(e,t){e.setIconStatus("back",mT(t)>1?"emphasis":"normal")}function VT(e,t,n,r,i){var o=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(o="dataZoomSelect"===r.key&&r.dataZoomSelectActive),n._isZoomActive=o,e.setIconStatus("zoom",o?"emphasis":"normal");var a=new PT(UT(e),t,{include:["grid"]}),s=a.makePanelOpts(i,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}Object(RT["b"])("dataZoom",(function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),i=[],o=UT(r),a=Object(lt["s"])(e,o);return NT(a.xAxisModels,(function(e){return s(e,"xAxis","xAxisIndex")})),NT(a.yAxisModels,(function(e){return s(e,"yAxis","yAxisIndex")})),i}function s(e,t,n){var o=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:BT+t+o};a[n]=o,i.push(a)}}));var GT=FT;function qT(e){e.registerComponentModel(FO),e.registerComponentView(GO),RO("saveAsImage",WO),RO("magicType",$O),RO("dataView",fT),RO("dataZoom",GT),RO("restore",_T),Object(r["a"])(DO)}var WT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(oo["a"]),YT=WT,KT=n("65ed");function XT(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function ZT(e){if(Uw["a"].domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n-1?(l+="top:50%",u+="translateY(-50%) rotate("+(o="left"===a?-225:-45)+"deg)"):(l+="left:50%",u+="translateX(-50%) rotate("+(o="top"===a?225:45)+"deg)");var c=o*Math.PI/180,d=s+i,f=d*Math.abs(Math.cos(c))+d*Math.abs(Math.sin(c)),h=Math.round(100*((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2))/100;l+=";"+a+":-"+h+"px";var p=t+" solid "+i+"px;",g=["position:absolute;width:"+s+"px;height:"+s+"px;",l+";"+u+";","border-bottom:"+p,"border-right:"+p,"background-color:"+r+";"];return'
'}function aE(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,i="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,i+=Uw["a"].transformSupported?","+nE+r:",left"+r+",top"+r),tE+":"+i}function sE(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Uw["a"].transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=Uw["a"].transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+nE+":"+a+";":[["top",0],["left",0],[$T,a]]}function lE(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px");var i=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,a=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+a+"px "+s+"px "+o+"px "+i),Object(m["k"])(["decoration","align"],(function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)})),t.join(";")}function uE(e,t,n){var r=[],i=e.get("transitionDuration"),o=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=Object(cl["d"])(e,"html"),f=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+f),t&&i&&r.push(aE(i,n)),o&&r.push("background-color:"+o),Object(m["k"])(["width","color","radius"],(function(t){var n="border-"+t,i=Object(Yn["i"])(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))})),r.push(lE(c)),null!=d&&r.push("padding:"+Object(Yn["h"])(d).join("px ")+"px"),r.join(";")+";"}function cE(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&Object(KT["c"])(e,a,document.body,r,i)}else{e[0]=r,e[1]=i;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var dE=function(){function e(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,Uw["a"].wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;cE(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(r):e.appendChild(r),this._container=e;var a=this;r.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler,n=i.painter.getViewportRoot();Object(Al["e"])(n,e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){var t=this._container,n=eE(t,"position"),r=t.style;"absolute"!==r.position&&"absolute"!==n&&(r.position="relative");var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=rE+uE(e,!this._firstShow,this._longHide)+sE(i[0],i[1],!0)+"border-color:"+Object(Yn["b"])(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null!=e){var a="";if(Object(m["C"])(i)&&"item"===n.get("trigger")&&!XT(n)&&(a=oE(n,r,i)),Object(m["C"])(e))o.innerHTML=e+a;else if(e){o.innerHTML="",Object(m["t"])(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):"leave"===e&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Uw["a"].node&&n.getDom()){var i=wE(r,n);this._ticket="";var o=r.dataByCoordSys,a=EE(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=bE;l.x=r.x,l.y=r.y,l.update(),Object(ut["a"])(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},i)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=Qw(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(wE(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s){var l=s.getData(),u=_E([l.getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel);if("axis"===u.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}}},t.prototype._tryShow=function(e,t){var n=e.target,r=this._tooltipModel;if(r){this._lastX=e.offsetX,this._lastY=e.offsetY;var i=e.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,e);else if(n){var o,a;this._lastDataByCoordSys=null,Object(Wc["a"])(n,(function(e){return null!=Object(ut["a"])(e).dataIndex?(o=e,!0):null!=Object(ut["a"])(e).tooltipConfig?(a=e,!0):void 0}),!0),o?this._showSeriesItemTooltip(e,o,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=Object(m["c"])(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=_E([t.tooltipOption],r),a=this._renderMode,s=[],l=Object(cl["c"])("section",{blocks:[],noHeader:!0}),u=[],c=new cl["a"];Object(m["k"])(e,(function(e){Object(m["k"])(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=Cw(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=Object(cl["c"])("section",{header:o,noHeader:!Object(m["T"])(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),Object(m["k"])(e.seriesDataIndices,(function(l){var f=n.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,p=f.getDataParams(h);if(!(p.dataIndex<0)){p.axisDim=e.axisDim,p.axisIndex=e.axisIndex,p.axisType=e.axisType,p.axisId=e.axisId,p.axisValue=wa(t.axis,{value:i}),p.axisValueLabel=o,p.marker=c.makeTooltipMarker("item",Object(Yn["b"])(p.color),a);var g=Object(mE["b"])(f.formatTooltip(h,!0,null)),v=g.frag;if(v){var y=_E([f],r).get("valueFormatter");d.blocks.push(y?Object(m["m"])({valueFormatter:y},v):v)}g.text&&u.push(g.text),s.push(p)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,f=o.get("order"),h=Object(cl["b"])(l,c,a,f,n.get("useUTC"),o.get("textStyle"));h&&u.unshift(h);var p="richText"===a?"\n\n":"
",g=u.join(p);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",i[0],i[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Object(ut["a"])(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),d=this._renderMode,f=e.positionDefault,h=_E([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),p=h.get("trigger");if(null==p||"item"===p){var g=s.getDataParams(l,u),v=new cl["a"];g.marker=v.makeTooltipMarker("item",Object(Yn["b"])(g.color),d);var y=Object(mE["b"])(s.formatTooltip(l,!1,u)),b=h.get("order"),x=h.get("valueFormatter"),_=y.frag,w=_?Object(cl["b"])(x?Object(m["m"])({valueFormatter:x},_):_,v,d,b,r.get("useUTC"),h.get("textStyle")):y.text,S="item_"+s.name+"_"+l;this._showOrMove(h,(function(){this._showTooltipContent(h,w,g,S,e.offsetX,e.offsetY,e.position,e.target,v)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=Object(ut["a"])(t),i=r.tooltipConfig,o=i.option||{};if(Object(m["C"])(o)){var a=o;o={content:a,formatter:a}}var s=[o],l=this._ecModel.getComponent(r.componentMainType,r.componentIndex);l&&s.push(l),s.push({formatter:o.content});var u=e.positionDefault,c=_E(s,this._tooltipModel,u?{position:u}:null),d=c.get("content"),f=Math.random()+"",h=new cl["a"];this._showOrMove(c,(function(){var n=Object(m["d"])(c.get("formatterParams")||{});this._showTooltipContent(c,d,n,f,e.offsetX,e.offsetY,e.position,t,h)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,f=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")),h=f.color;if(c)if(Object(m["C"])(c)){var p=e.ecModel.get("useUTC"),g=Object(m["t"])(n)?n[0]:n,v=g&&g.axisType&&g.axisType.indexOf("time")>=0;d=c,v&&(d=Object(Uo["h"])(g.axisValue,d,p)),d=Object(Yn["d"])(d,n,!0)}else if(Object(m["w"])(c)){var y=Object(m["c"])((function(t,r){t===this._ticket&&(u.setContent(r,l,e,h,a),this._updatePosition(e,a,i,o,u,n,s))}),this);this._ticket=r,d=c(n,r,y)}else d=c;u.setContent(d,l,e,h,a),u.show(e,h),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||Object(m["t"])(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:Object(m["t"])(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),f=a&&a.getBoundingRect().clone();if(a&&f.applyTransform(a.transform),Object(m["w"])(t)&&(t=t([n,r],o,i.el,f,{viewSize:[s,l],contentSize:u.slice()})),Object(m["t"])(t))n=Object(Hn["o"])(t[0],s),r=Object(Hn["o"])(t[1],l);else if(Object(m["A"])(t)){var h=t;h.width=u[0],h.height=u[1];var p=Object(xi["g"])(h,{width:s,height:l});n=p.x,r=p.y,c=null,d=null}else if(Object(m["C"])(t)&&a){var g=OE(t,f,u,e.get("borderWidth"));n=g[0],r=g[1]}else{g=SE(n,r,i,s,l,c?null:20,d?null:20);n=g[0],r=g[1]}if(c&&(n-=TE(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=TE(d)?u[1]/2:"bottom"===d?u[1]:0),XT(e)){g=kE(n,r,i,s,l);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&Object(m["k"])(n,(function(n,o){var a=n.dataByAxis||[],s=e[o]||{},l=s.dataByAxis||[];i=i&&a.length===l.length,i&&Object(m["k"])(a,(function(e,n){var o=l[n]||{},a=e.seriesDataIndices||[],s=o.seriesDataIndices||[];i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===s.length,i&&Object(m["k"])(a,(function(e,t){var n=s[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&Object(m["k"])(e.seriesDataIndices,(function(e){var n=e.seriesIndex,o=t[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Uw["a"].node&&t.getDom()&&(Object(Fr["a"])(this,"_updatePosition"),this._tooltipContent.dispose(),Zw("itemTooltip",t))},t.type="tooltip",t}(io["a"]);function _E(e,t,n){var r,i=t.ecModel;n?(r=new Ke["a"](n,i,i),r=new Ke["a"](t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof Ke["a"]&&(a=a.get("tooltip",!0)),Object(m["C"])(a)&&(a={formatter:a}),a&&(r=new Ke["a"](a,r,i)))}return r}function wE(e,t){return e.dispatchAction||Object(m["c"])(t.dispatchAction,t)}function SE(e,t,n,r,i,o,a){var s=n.getSize(),l=s[0],u=s[1];return null!=o&&(e+l+o+2>r?e-=l+o:e+=o),null!=a&&(t+u+a>i?t-=u+a:t+=a),[e,t]}function kE(e,t,n,r,i){var o=n.getSize(),a=o[0],s=o[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function OE(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-i/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+a;break;case"left":s=t.x-i-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}function TE(e){return"center"===e||"middle"===e}function EE(e,t,n){var r=Object(lt["t"])(e).queryOptionMap,i=r.keys()[0];if(i&&"series"!==i){var o=Object(lt["v"])(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(a){var s,l=n.getViewOfComponentModel(a);return l.group.traverse((function(t){var n=Object(ut["a"])(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s?{componentMainType:i,componentIndex:a.componentIndex,el:s}:void 0}}}var CE=xE;function AE(e){Object(r["a"])(fS),e.registerComponentModel(YT),e.registerComponentView(CE),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},m["L"]),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},m["L"])}var ME=["rect","polygon","keep","clear"];function LE(e,t){var n=Object(lt["r"])(e?e.brush:[]);if(n.length){var r=[];m["k"](n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var i=e&&e.toolbox;m["t"](i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var o=i.feature||(i.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),IE(s),t&&!s.length&&s.push.apply(s,ME)}}function IE(e){var t={};m["k"](e,(function(e){t[e]=1})),e.length=0,m["k"](t,(function(t,n){e.push(n)}))}var DE=n("0924"),jE=m["k"];function PE(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function RE(e,t,n){var r={};return jE(t,(function(t){var o=r[t]=i();jE(e[t],(function(e,r){if($f.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new $f(i),"opacity"===r&&(i=m["d"](i),i.type="colorAlpha",o.__hidden.__alphaForOpacity=new $f(i))}}))})),r;function i(){var e=function(){};e.prototype.__hidden=e.prototype;var t=new e;return t}}function NE(e,t,n){var r;m["k"](n,(function(e){t.hasOwnProperty(e)&&PE(t[e])&&(r=!0)})),r&&m["k"](n,(function(n){t.hasOwnProperty(n)&&PE(t[n])?e[n]=m["d"](t[n]):delete e[n]}))}function BE(e,t,n,r,i,o){var a,s={};function l(e){return Object(DE["a"])(n,a,e)}function u(e,t){Object(DE["c"])(n,a,e,t)}function c(e,c){a=null==o?e:c;var d=n.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var f=r.call(i,e),h=t[f],p=s[f],g=0,v=p.length;gt[0][1]&&(t[0][1]=o[0]),o[1]t[1][1]&&(t[1][1]=o[1])}return t&&eC(t)}};function eC(e){return new Zi["a"](e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var tC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new iy(t.getZr())).on("brush",m["c"](this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){YE(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:m["d"](n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:m["d"](n),$from:t})},t.type="brush",t}(io["a"]),nC=tC,rC="#ddd",iC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return Object(Ye["a"])(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&NE(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:rC},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=m["H"](e,(function(e){return oC(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=oC(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(oo["a"]);function oC(e,t){return m["I"]({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Ke["a"](e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var aC=iC,sC=["rect","polygon","lineX","lineY","keep","clear"],lC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){var r,i,o;t.eachComponent({mainType:"brush"},(function(e){r=e.brushType,i=e.brushOption.brushMode||"single",o=o||!!e.areas.length})),this._brushType=r,this._brushMode=i,m["k"](e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?o:t===r)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return m["k"](e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},t.getDefaultOption=function(e){var t={show:!0,type:sC.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return t},t}(jO),uC=lC;function cC(e){e.registerComponentView(nC),e.registerComponentModel(aC),e.registerPreprocessor(LE),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,KE),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},m["L"]),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},m["L"]),RO("brush",uC)}var dC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Object(Ye["a"])(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(oo["a"]),fC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=m["P"](e.get("textBaseline"),e.get("textVerticalAlign")),l=new J["a"]({style:Object(fn["c"])(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new J["a"]({style:Object(fn["c"])(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),f=e.get("link"),h=e.get("sublink"),p=e.get("triggerEvent",!0);l.silent=!f&&!p,d.silent=!h&&!p,f&&l.on("click",(function(){Object(Yn["j"])(f,"_"+e.get("target"))})),h&&d.on("click",(function(){Object(Yn["j"])(h,"_"+e.get("subtarget"))})),Object(ut["a"])(l).eventData=Object(ut["a"])(d).eventData=p?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var g=r.getBoundingRect(),v=e.getBoxLayoutParams();v.width=g.width,v.height=g.height;var y=Object(xi["g"])(v,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||(a=e.get("left")||e.get("right"),"middle"===a&&(a="center"),"right"===a?y.x+=y.width:"center"===a&&(y.x+=y.width/2)),s||(s=e.get("top")||e.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?y.y+=y.height:"middle"===s&&(y.y+=y.height/2),s=s||"top"),r.x=y.x,r.y=y.y,r.markRedraw();var b={align:a,verticalAlign:s};l.setStyle(b),d.setStyle(b),g=r.getBoundingRect();var x=y.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var w=new zn["a"]({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});r.add(w)}},t.type="title",t}(io["a"]);function hC(e){e.registerComponentModel(dC),e.registerComponentView(fC)}var pC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode="box",n}return Object(Ye["a"])(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e,t=this.option,n=t.data||[],r=t.axisType,i=this._names=[];"category"===r?(e=[],Object(m["k"])(n,(function(t,n){var r,o=Object(lt["e"])(Object(lt["h"])(t),"");Object(m["A"])(t)?(r=Object(m["d"])(t),r.value=n):r=n,e.push(r),i.push(o)}))):e=n;var o={category:"ordinal",time:"time",value:"number"}[r]||"number",a=this._data=new jt([{name:"value",type:o}],this);a.initData(e,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(oo["a"]),gC=pC,vC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.type="timeline.slider",t.defaultOption=Object(Rr["d"])(gC.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(gC);Object(m["K"])(vC,mE["a"].prototype);var yC=vC,mC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.type="timeline",t}(io["a"]),bC=mC,xC=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.type=i||"value",o}return Object(Ye["a"])(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(ns),_C=xC,wC=Math.PI,SC=Object(lt["o"])(),kC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var r=this._layout(e,n),i=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){var t=a.scale.getLabel({value:e});return Object(cl["c"])("nameValue",{noName:!0,value:t})},Object(m["k"])(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](r,i,a,e)}),this),this._renderAxisLabel(r,o,a,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n,r=e.get(["label","position"]),i=e.get("orient"),o=TC(e,t);n=null==r||"auto"===r?"horizontal"===i?o.y+o.height/2=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:wC/2},f="vertical"===i?o.height:o.width,h=e.getModel("controlStyle"),p=h.get("show",!0),g=p?h.get("itemSize"):0,v=p?h.get("itemGap"):0,y=g+v,b=e.get(["label","rotate"])||0;b=b*wC/180;var x=h.get("position",!0),_=p&&h.get("showPlayBtn",!0),w=p&&h.get("showPrevBtn",!0),S=p&&h.get("showNextBtn",!0),k=0,O=f;"left"===x||"bottom"===x?(_&&(a=[0,0],k+=y),w&&(s=[k,0],k+=y),S&&(l=[O-g,0],O-=y)):(_&&(a=[O-g,0],O-=y),w&&(s=[0,0],k+=y),S&&(l=[O-g,0],O-=y));var T=[k,O];return e.get("inverse")&&T.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:d[i],labelRotation:b,labelPosOpt:n,labelAlign:e.get(["label","align"])||u[i],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||c[i],playPosition:a,prevBtnPosition:s,nextBtnPosition:l,axisExtent:T,controlSize:g,controlGap:v}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if("vertical"===e.orient){var o=La["c"](),a=i.x,s=i.y+i.height;La["i"](o,o,[-a,-s]),La["g"](o,o,-wC/2),La["i"](o,o,[a,s]),i=i.clone(),i.applyTransform(o)}var l=v(i),u=v(n.getBoundingRect()),c=v(r.getBoundingRect()),d=[n.x,n.y],f=[r.x,r.y];f[0]=d[0]=l[0][0];var h=e.labelPosOpt;if(null==h||Object(m["C"])(h)){var p="+"===h?0:1;y(d,u,l,1,p),y(f,c,l,1,1-p)}else{p=h>=0?0:1;y(d,u,l,1,p),f[1]=d[1]+h}function g(e){e.originX=l[0][0]-e.x,e.originY=l[1][0]-e.y}function v(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function y(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}n.setPosition(d),r.setPosition(f),n.rotation=r.rotation=e.rotation,g(n),g(r)},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get("axisType"),i=OC(t,r);i.getTicks=function(){return n.mapArray(["value"],(function(e){return{value:e}}))};var o=n.getDataExtent("value");i.setExtent(o[0],o[1]),i.calcNiceTicks();var a=new _C("value",i,e.axisExtent,r);return a.model=t,a},t.prototype._createGroup=function(e){var t=this[e]=new rn["a"];return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var i=n.getExtent();if(r.get(["lineStyle","show"])){var o=new vs["a"]({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:Object(m["m"])({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(o);var a=this._progressLine=new vs["a"]({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:Object(m["i"])({lineCap:"round",lineWidth:o.style.lineWidth},r.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(a)}},t.prototype._renderAxisTick=function(e,t,n,r){var i=this,o=r.getData(),a=n.scale.getTicks();this._tickSymbols=[],Object(m["k"])(a,(function(e){var a=n.dataToCoord(e.value),s=o.getItemModel(e.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:Object(m["c"])(i._changeTimeline,i,e.value)},f=CC(s,l,t,d);f.ensureState("emphasis").style=u.getItemStyle(),f.ensureState("progress").style=c.getItemStyle(),Object(un["o"])(f);var h=Object(ut["a"])(f);s.get("tooltip")?(h.dataIndex=e.value,h.dataModel=r):h.dataIndex=h.dataModel=null,i._tickSymbols.push(f)}))},t.prototype._renderAxisLabel=function(e,t,n,r){var i=this,o=n.getLabelModel();if(o.get("show")){var a=r.getData(),s=n.getViewLabels();this._tickLabels=[],Object(m["k"])(s,(function(r){var o=r.tickValue,s=a.getItemModel(o),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),d=n.dataToCoord(r.tickValue),f=new J["a"]({x:d,y:0,rotation:e.labelRotation-e.rotation,onclick:Object(m["c"])(i._changeTimeline,i,o),silent:!1,style:Object(fn["c"])(l,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});f.ensureState("emphasis").style=Object(fn["c"])(u),f.ensureState("progress").style=Object(fn["c"])(c),t.add(f),Object(un["o"])(f),SC(f).dataIndex=o,i._tickLabels.push(f)}))}},t.prototype._renderControl=function(e,t,n,r){var i=e.controlSize,o=e.rotation,a=r.getModel("controlStyle").getItemStyle(),s=r.getModel(["emphasis","controlStyle"]).getItemStyle(),u=r.getPlayState(),c=r.get("inverse",!0);function d(e,n,u,c){if(e){var d=Object(l["g"])(Object(m["P"])(r.get(["controlStyle",n+"BtnSize"]),i),i),f=[0,-d/2,d,d],h=EC(r,n+"Icon",f,{x:e[0],y:e[1],originX:i/2,originY:0,rotation:c?-o:0,rectHover:!0,style:a,onclick:u});h.ensureState("emphasis").style=s,t.add(h),Object(un["o"])(h)}}d(e.nextBtnPosition,"next",Object(m["c"])(this._changeTimeline,this,c?"-":"+")),d(e.prevBtnPosition,"prev",Object(m["c"])(this._changeTimeline,this,c?"+":"-")),d(e.playPosition,u?"stop":"play",Object(m["c"])(this._handlePlayClick,this,!u),!0)},t.prototype._renderCurrentPointer=function(e,t,n,r){var i=r.getData(),o=r.getCurrentIndex(),a=i.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=Object(m["c"])(s._handlePointerDrag,s),e.ondragend=Object(m["c"])(s._handlePointerDragend,s),AC(e,s._progressLine,o,n,r,!0)},onUpdate:function(e){AC(e,s._progressLine,o,n,r)}};this._currentPointer=CC(a,a,this._mainGroup,{},this._currentPointer,l)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=this._axis,i=Hn["c"](r.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(f)),[a,d]}var KC={min:Object(m["h"])(YC,"min"),max:Object(m["h"])(YC,"max"),average:Object(m["h"])(YC,"average"),median:Object(m["h"])(YC,"median")};function XC(e,t){var n=e.getData(),r=e.coordinateSystem;if(t&&!WC(t)&&!Object(m["t"])(t.coord)&&r){var i=r.dimensions,o=ZC(t,n,r,e);if(t=Object(m["d"])(t),t.type&&KC[t.type]&&o.baseAxis&&o.valueAxis){var a=Object(m["r"])(i,o.baseAxis.dim),s=Object(m["r"])(i,o.valueAxis.dim),l=KC[t.type](n,o.baseDataDim,o.valueDataDim,a,s);t.coord=l[0],t.value=l[1]}else{for(var u=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],c=0;c<2;c++)KC[u[c]]&&(u[c]=tA(n,n.mapDimension(i[c]),u[c]));t.coord=u}}return t}function ZC(e,t,n,r){var i={};return null!=e.valueIndex||null!=e.valueDim?(i.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=n.getAxis($C(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function $C(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function JC(e,t){return!(e&&e.containData&&t.coord&&!qC(t))||e.containData(t.coord)}function QC(e,t,n){return!(e&&e.containZone&&t.coord&&n.coord&&!qC(t)&&!qC(n))||e.containZone(t.coord,n.coord)}function eA(e,t){return e?function(e,n,r,i){var o=i<2?e.coord&&e.coord[i]:e.value;return Object(GC["d"])(o,t[i])}:function(e,n,r,i){return Object(GC["d"])(e.value,t[i])}}function tA(e,t,n){if("average"===n){var r=0,i=0;return e.each(t,(function(e,t){isNaN(e)||(r+=e,i++)})),r/i}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var nA=Object(lt["o"])(),rA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.init=function(){this.markerGroupMap=Object(m["f"])()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each((function(e){nA(e).keep=!1})),t.eachSeries((function(e){var i=UC.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)})),i.each((function(e){!nA(e).keep&&r.group.remove(e.group)}))},t.prototype.markKeep=function(e){nA(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;Object(m["k"])(e,(function(e){var r=UC.getMarkerModelFromSeries(e,n.type);if(r){var i=r.getData();i.eachItemGraphicEl((function(e){e&&(t?Object(un["q"])(e):Object(un["B"])(e))}))}}))},t.type="marker",t}(io["a"]),iA=rA;function oA(e,t,n){var r=t.coordinateSystem;e.each((function(i){var o,a=e.getItemModel(i),s=Hn["o"](a.get("x"),n.getWidth()),l=Hn["o"](a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,i));else if(r){var u=e.get(r.dimensions[0],i),c=e.get(r.dimensions[1],i);o=r.dataToPoint([u,c])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(i,o)}))}var aA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=UC.getMarkerModelFromSeries(e,"markPoint");t&&(oA(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())}),this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new xn),u=sA(i,e,t);t.setData(u),oA(t.getData(),e,r),u.each((function(e){var n=u.getItemModel(e),r=n.getShallow("symbol"),i=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(Object(m["w"])(r)||Object(m["w"])(i)||Object(m["w"])(o)||Object(m["w"])(s)){var c=t.getRawValue(e),d=t.getDataParams(e);Object(m["w"])(r)&&(r=r(c,d)),Object(m["w"])(i)&&(i=i(c,d)),Object(m["w"])(o)&&(o=o(c,d)),Object(m["w"])(s)&&(s=s(c,d))}var f=n.getModel("itemStyle").getItemStyle(),h=Object(DE["b"])(a,"color");f.fill||(f.fill=h),u.setItemVisual(e,{symbol:r,symbolSize:i,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:f})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){Object(ut["a"])(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(iA);function sA(e,t,n){var r;r=e?Object(m["H"])(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Object(m["m"])(Object(m["m"])({},n),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var i=new jt(r,n),o=Object(m["H"])(n.get("data"),Object(m["h"])(XC,t));e&&(o=Object(m["n"])(o,Object(m["h"])(JC,e)));var a=eA(!!e,r);return i.initData(o,null,a),i}var lA=aA;function uA(e){e.registerComponentModel(VC),e.registerComponentView(lA),e.registerPreprocessor((function(e){NC(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})}))}var cA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(UC),dA=cA,fA=Object(lt["o"])(),hA=function(e,t,n,r){var i,o=e.getData();if(Object(m["t"])(r))i=r;else{var a=r.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=r.xAxis||null!=r.yAxis){var s=void 0,l=void 0;if(null!=r.yAxis||null!=r.xAxis)s=t.getAxis(null!=r.yAxis?"y":"x"),l=Object(m["O"])(r.yAxis,r.xAxis);else{var u=ZC(r,o,t,e);s=u.valueAxis;var c=Kt(o,u.valueDataDim);l=tA(o,c,a)}var d="x"===s.dim?0:1,f=1-d,h=Object(m["d"])(r),p={coord:[]};h.type=null,h.coord=[],h.coord[f]=-1/0,p.coord[f]=1/0;var g=n.get("precision");g>=0&&Object(m["z"])(l)&&(l=+l.toFixed(Math.min(g,20))),h.coord[d]=p.coord[d]=l,i=[h,p,{type:a,valueIndex:r.valueIndex,value:l}]}else i=[]}var v=[XC(e,i[0]),XC(e,i[1]),Object(m["m"])({},i[2])];return v[2].type=v[2].type||null,Object(m["I"])(v[2],v[0]),Object(m["I"])(v[2],v[1]),v};function pA(e){return!isNaN(e)&&!isFinite(e)}function gA(e,t,n,r){var i=1-e,o=r.dimensions[e];return pA(t[i])&&pA(n[i])&&t[e]===n[e]&&r.getAxis(o).containData(t[e])}function vA(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(gA(1,n,r,e)||gA(0,n,r,e)))return!0}return JC(e,t[0])&&JC(e,t[1])}function yA(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),l=Hn["o"](s.get("x"),i.getWidth()),u=Hn["o"](s.get("y"),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)o=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),f=e.get(c[1],t);o=a.dataToPoint([d,f])}if(Wn(a,"cartesian2d")){var h=a.getAxis("x"),p=a.getAxis("y");c=a.dimensions;pA(e.get(c[0],t))?o[0]=h.toGlobalCoord(h.getExtent()[n?0:1]):pA(e.get(c[1],t))&&(o[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];e.setItemLayout(t,o)}var mA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=UC.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),i=fA(t).from,o=fA(t).to;i.each((function(t){yA(i,t,!0,e,n),yA(o,t,!1,e,n)})),r.each((function(e){r.setItemLayout(e,[i.getItemLayout(e),o.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new kp);this.group.add(l.group);var u=bA(i,e,t),c=u.from,d=u.to,f=u.line;fA(t).from=c,fA(t).to=d,t.setData(f);var h=t.get("symbol"),p=t.get("symbolSize"),g=t.get("symbolRotate"),v=t.get("symbolOffset");function y(t,n,i){var o=t.getItemModel(n);yA(t,n,i,e,r);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Object(DE["b"])(a,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:Object(m["P"])(o.get("symbolOffset",!0),v[i?0:1]),symbolRotate:Object(m["P"])(o.get("symbolRotate",!0),g[i?0:1]),symbolSize:Object(m["P"])(o.get("symbolSize"),p[i?0:1]),symbol:Object(m["P"])(o.get("symbol",!0),h[i?0:1]),style:s})}Object(m["t"])(h)||(h=[h,h]),Object(m["t"])(p)||(p=[p,p]),Object(m["t"])(g)||(g=[g,g]),Object(m["t"])(v)||(v=[v,v]),u.from.each((function(e){y(c,e,!0),y(d,e,!1)})),f.each((function(e){var t=f.getItemModel(e).getModel("lineStyle").getLineStyle();f.setItemLayout(e,[c.getItemLayout(e),d.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),f.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:d.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(e,"symbolOffset"),toSymbolRotate:d.getItemVisual(e,"symbolRotate"),toSymbolSize:d.getItemVisual(e,"symbolSize"),toSymbol:d.getItemVisual(e,"symbol"),style:t})})),l.updateData(f),u.line.eachItemGraphicEl((function(e){Object(ut["a"])(e).dataModel=t,e.traverse((function(e){Object(ut["a"])(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(iA);function bA(e,t,n){var r;r=e?Object(m["H"])(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Object(m["m"])(Object(m["m"])({},n),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var i=new jt(r,n),o=new jt(r,n),a=new jt([],n),s=Object(m["H"])(n.get("data"),Object(m["h"])(hA,t,e,n));e&&(s=Object(m["n"])(s,Object(m["h"])(vA,e)));var l=eA(!!e,r);return i.initData(Object(m["H"])(s,(function(e){return e[0]})),null,l),o.initData(Object(m["H"])(s,(function(e){return e[1]})),null,l),a.initData(Object(m["H"])(s,(function(e){return e[2]}))),a.hasItemOption=!0,{from:i,to:o,line:a}}var xA=mA;function _A(e){e.registerComponentModel(dA),e.registerComponentView(xA),e.registerPreprocessor((function(e){NC(e.series,"markLine")&&(e.markLine=e.markLine||{})}))}var wA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(UC),SA=wA,kA=Object(lt["o"])(),OA=function(e,t,n,r){var i=XC(e,r[0]),o=XC(e,r[1]),a=i.coord,s=o.coord;a[0]=Object(m["O"])(a[0],-1/0),a[1]=Object(m["O"])(a[1],-1/0),s[0]=Object(m["O"])(s[0],1/0),s[1]=Object(m["O"])(s[1],1/0);var l=Object(m["J"])([{},i,o]);return l.coord=[i.coord,o.coord],l.x0=i.x,l.y0=i.y,l.x1=o.x,l.y1=o.y,l};function TA(e){return!isNaN(e)&&!isFinite(e)}function EA(e,t,n,r){var i=1-e;return TA(t[i])&&TA(n[i])}function CA(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},o={coord:r,x:t.x1,y:t.y1};return Wn(e,"cartesian2d")?!(!n||!r||!EA(1,n,r,e)&&!EA(0,n,r,e))||QC(e,i,o):JC(e,i)||JC(e,o)}function AA(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),l=Hn["o"](s.get(n[0]),i.getWidth()),u=Hn["o"](s.get(n[1]),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)o=r.getMarkerPosition(e.getValues(n,t));else{var c=e.get(n[0],t),d=e.get(n[1],t),f=[c,d];a.clampData&&a.clampData(f,f),o=a.dataToPoint(f,!0)}if(Wn(a,"cartesian2d")){var h=a.getAxis("x"),p=a.getAxis("y");c=e.get(n[0],t),d=e.get(n[1],t);TA(c)?o[0]=h.toGlobalCoord(h.getExtent()["x0"===n[0]?0:1]):TA(d)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var MA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],LA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=UC.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each((function(t){var i=Object(m["H"])(MA,(function(i){return AA(r,t,i,e,n)}));r.setItemLayout(t,i);var o=r.getItemGraphicEl(t);o.setShape("points",i)}))}}),this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new rn["a"]});this.group.add(l.group),this.markKeep(l);var u=IA(i,e,t);t.setData(u),u.each((function(t){var n=Object(m["H"])(MA,(function(n){return AA(u,t,n,e,r)})),o=i.getAxis("x").scale,s=i.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),d=[o.parse(u.get("x0",t)),o.parse(u.get("x1",t))],f=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];Hn["c"](d),Hn["c"](f);var h=!(l[0]>d[1]||l[1]f[1]||c[1]=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(oo["a"]),NA=RA,BA=m["h"],FA=m["k"],zA=rn["a"],UA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return Object(Ye["a"])(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new zA),this.group.add(this._selectorGroup=new zA),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(i,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=xi["g"](l,u,c),f=this.layoutInner(e,i,d,r,a,s),h=xi["g"](m["i"]({width:f.width,height:f.height},l),u,c);this.group.x=h.x-f.x,this.group.y=h.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=UO(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this.getContentGroup(),l=m["f"](),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),FA(t.getData(),(function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new zA;return d.newline=!0,void s.add(d)}var f=n.getSeriesByName(a)[0];if(!l.get(a)){if(f){var h=f.getData(),p=h.getVisual("legendLineStyle")||{},g=h.getVisual("legendIcon"),v=h.getVisual("style"),y=this._createItem(f,a,o,i,t,e,p,v,g,u,r);y.on("click",BA(GA,a,null,r,c)).on("mouseover",BA(WA,f.name,null,r,c)).on("mouseout",BA(YA,f.name,null,r,c)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var d=s.indexOfName(a),f=s.getItemVisual(d,"style"),h=s.getItemVisual(d,"legendIcon"),p=Object(Kn["g"])(f.fill);p&&0===p[3]&&(p[3]=.2,f=m["m"](m["m"]({},f),{fill:Object(Kn["h"])(p,"rgba")}));var g=this._createItem(n,a,o,i,t,e,{},f,h,u,r);g.on("click",BA(GA,null,a,r,c)).on("mouseover",BA(WA,null,a,r,c)).on("mouseout",BA(YA,null,a,r,c)),l.set(a,!0)}}),this);0}}),this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();FA(e,(function(e){var r=e.type,i=new J["a"]({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i);var a=t.getModel("selectorLabel"),s=t.getModel(["emphasis","selectorLabel"]);Object(fn["g"])(i,{normal:a,emphasis:s},{defaultText:e.title}),Object(un["o"])(i)}))},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,f=i.get("itemWidth"),h=i.get("itemHeight"),p=i.isSelected(t),g=r.get("symbolRotate"),v=r.get("symbolKeepAspect"),y=r.get("icon");l=y||l||"roundRect";var b=HA(l,r,a,s,d,p,c),x=new zA,_=r.getModel("textStyle");if(!m["w"](e.getLegendIcon)||y&&"inherit"!==y){var w="inherit"===y&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(VA({itemWidth:f,itemHeight:h,icon:l,iconRotate:w,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:v}))}else x.add(e.getLegendIcon({itemWidth:f,itemHeight:h,icon:l,iconRotate:g,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:v}));var S="left"===o?f+5:-5,k=o,O=i.get("formatter"),T=t;m["C"](O)&&O?T=O.replace("{name}",null!=t?t:""):m["w"](O)&&(T=O(t));var E=r.get("inactiveColor");x.add(new J["a"]({style:Object(fn["c"])(_,{text:T,x:S,y:h/2,fill:p?_.getTextColor():E,align:k,verticalAlign:"middle"})}));var C=new zn["a"]({shape:x.getBoundingRect(),invisible:!0}),A=r.getModel("tooltip");return A.get("show")&&ln["setTooltipConfig"]({el:C,componentModel:i,itemName:t,itemTooltipOption:A.option}),x.add(C),x.eachChild((function(e){e.silent=!0})),C.silent=!u,this.getContentGroup().add(x),Object(un["o"])(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();xi["b"](e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),i){xi["b"]("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],f=e.get("selectorButtonGap",!0),h=e.getOrient().index,p=0===h?"width":"height",g=0===h?"height":"width",v=0===h?"y":"x";"end"===o?d[h]+=l[p]+f:u[h]+=c[p]+f,d[1-h]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var y={x:0,y:0};return y[p]=l[p]+f+c[p],y[g]=Math.max(l[g],c[g]),y[v]=Math.min(0,c[v]+d[1-h]),y}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(io["a"]);function HA(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),FA(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?Object(ic["a"])(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]),"inherit"===u.stroke&&(u.stroke=r[c]),"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity),s(u,r);var f=t.getModel("lineStyle"),h=f.getLineStyle();if(s(h,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),!o){var p=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===p?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=f.get("inactiveColor"),h.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function VA(e){var t=e.icon||"roundRect",n=Object(nn["a"])(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n}function GA(e,t,n,r){YA(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),WA(e,t,n,r)}function qA(e){var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;while(rn[i],p=[-d.x,-d.y];t||(p[r]=l[s]);var g=[0,0],v=[-f.x,-f.y],y=m["P"](e.get("pageButtonGap",!0),e.get("itemGap",!0));if(h){var b=e.get("pageButtonPosition",!0);"end"===b?v[r]+=n[i]-f[i]:g[r]+=f[i]+y}v[1-r]+=d[o]/2-f[o]/2,l.setPosition(p),u.setPosition(g),c.setPosition(v);var x={x:0,y:0};if(x[i]=h?n[i]:d[i],x[o]=Math.max(d[o],f[o]),x[a]=Math.min(0,f[a]+v[1-r]),u.__rectSize=n[i],h){var _={x:0,y:0};_[i]=Math.max(n[i]-f[i]-y,0),_[o]=x[o],u.setClipPath(new zn["a"]({shape:_})),u.__rectSize=_[i]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var w=this._getPageInfo(e);return null!=w.pageIndex&&sn["h"](l,{x:w.contentPosition[0],y:w.contentPosition[1]},h?e:null),this._updatePageInfoView(e,w),x},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;m["k"](["pagePrev","pageNext"],(function(r){var i=r+"DataIndex",o=null!=t[i],a=n.childOfName(r);a&&(a.setStyle("fill",o?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")}));var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",m["C"](i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=rM[i],a=iM[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return f;var h=m(u);f.contentPosition[i]=-h.s;for(var p=s+1,g=h,v=h,y=null;p<=c;++p)y=m(l[p]),(!y&&v.e>g.s+r||y&&!b(y,g.s))&&(g=v.i>g.i?v:y,g&&(null==f.pageNextDataIndex&&(f.pageNextDataIndex=g.i),++f.pageCount)),v=y;for(p=s-1,g=h,v=h,y=null;p>=-1;--p)y=m(l[p]),y&&b(v,y.s)||!(g.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n,r=this.getContentGroup();return r.eachChild((function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)})),null!=t?t:n},t.type="legend.scroll",t}(KA),aM=oM;function sM(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}function lM(e){Object(r["a"])(JA),e.registerComponentModel(tM),e.registerComponentView(aM),sM(e)}function uM(e){Object(r["a"])(JA),Object(r["a"])(lM)}var cM=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.type="dataZoom.inside",t.defaultOption=Object(Rr["d"])(vO.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(vO),dM=cM,fM=Object(lt["o"])();function hM(e,t,n){fM(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}function pM(e,t){for(var n=fM(e).coordSysRecordMap,r=n.keys(),i=0;ir[n+t]&&(t=a),i=i&&o.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function xM(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=fM(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Object(m["f"])());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){var n=fO(e);Object(m["k"])(n.infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,vM(t,n.model)),a=o.dataZoomInfoMap||(o.dataZoomInfoMap=Object(m["f"])());a.set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,i=e.dataZoomInfoMap;if(i){var o=i.keys()[0];null!=o&&(t=i.get(o))}if(t){var a=bM(i);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),Fr["b"](e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else gM(r,e)}))}))}var _M=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return Object(Ye["a"])(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),hM(r,t,{pan:Object(m["c"])(wM.pan,this),zoom:Object(m["c"])(wM.zoom,this),scrollMove:Object(m["c"])(wM.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){pM(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(xO),wM={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=kM[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Vg(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:SM((function(e,t,n,r,i,o){var a=kM[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:SM((function(e,t,n,r,i,o){var a=kM[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n);return a.signal*(e[1]-e[0])*o.scrollDelta}))};function SM(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s){var l=e(a,s,t,n,r,i);return Vg(l,a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}var kM={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},OM=_M;function TM(e){IO(e),e.registerComponentModel(dM),e.registerComponentView(OM),xM(e)}var EM=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Object(Rr["d"])(vO.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(vO),CM=EM,AM=zn["a"],MM=7,LM=1,IM=30,DM=7,jM="horizontal",PM="vertical",RM=5,NM=["line","bar","candlestick","scatter"],BM={easing:"cubicOut",duration:100,delay:0},FM=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return Object(Ye["a"])(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=Object(m["c"])(this._onBrush,this),this._onBrushEnd=Object(m["c"])(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),Fr["b"](this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Fr["a"](this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new rn["a"];this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect"),r=n?DM:0,i=this._findCoordRect(),o={width:t.getWidth(),height:t.getHeight()},a=this._orient===jM?{right:o.width-i.x-i.width,top:o.height-IM-MM-r,width:i.width,height:IM}:{right:MM,top:i.y,width:IM,height:i.height},s=xi["f"](e.option);Object(m["k"])(["right","top","width","height"],(function(e){"ph"===s[e]&&(s[e]=a[e])}));var l=xi["g"](s,o);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===PM&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==jM||i?n===jM&&i?{scaleY:a?1:-1,scaleX:-1}:n!==PM||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new AM({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new AM({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Object(m["c"])(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim?r.getShadowDim():e.otherDim;if(null!=o){var a=this._shadowPolygonPts,s=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(o),u=.3*(l[1]-l[0]);l=[l[0]-u,l[1]+u];var c,d=[0,t[1]],f=[0,t[0]],h=[[t[0],0],[0,0]],p=[],g=f[1]/(i.count()-1),v=0,y=Math.round(i.count()/t[0]);i.each([o],(function(e,t){if(y>0&&t%y)v+=g;else{var n=null==e||isNaN(e)||""===e,r=n?0:Object(Hn["k"])(e,l,d,!0);n&&!c&&t?(h.push([h[h.length-1][0],0]),p.push([p[p.length-1][0],0])):!n&&c&&(h.push([v,0]),p.push([v,0])),h.push([v,r]),p.push([v,r]),v+=g,c=n}})),a=this._shadowPolygonPts=h,s=this._shadowPolylinePts=p}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];for(var m=this.dataZoomModel,b=0;b<3;b++){var x=_(1===b);this._displayables.sliderGroup.add(x),this._displayables.dataShadowSegs.push(x)}}}function _(e){var t=m.getModel(e?"selectedDataBackground":"dataBackground"),n=new rn["a"],r=new sl["a"]({shape:{points:a},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new Ei["a"]({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(i,o){var a=e.getAxisProxy(i,o).getTargetSeriesModels();Object(m["k"])(a,(function(e){if(!n&&!(!0!==t&&Object(m["r"])(NM,e.get("type"))<0)){var a,s=r.getComponent(cO(i),o).axis,l=zM(i),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:i,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new AM({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new AM({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:LM,fill:"rgba(0,0,0,0)"}})),Object(m["k"])([0,1],(function(t){var o=a.get("handleIcon");!nn["d"][o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=Object(nn["a"])(o,-1,0,2,2,null,!0);s.attr({cursor:UM(this._orient),draggable:!0,drift:Object(m["c"])(this._onDragMove,this,t),ondragend:Object(m["c"])(this._onDragEnd,this),onmouseover:Object(m["c"])(this._showDataInfo,this,!0),onmouseout:Object(m["c"])(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Object(Hn["o"])(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Object(un["o"])(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new J["a"]({silent:!0,invisible:!0,style:Object(fn["c"])(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var f=Object(Hn["o"])(a.get("moveHandleSize"),o[1]),h=t.moveHandle=new zn["a"]({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:f}}),p=.8*f,g=t.moveHandleIcon=Object(nn["a"])(a.get("moveHandleIcon"),-p/2,-p/2,p,p,"#fff",!0);g.silent=!0,g.y=o[1]+f/2-.5,h.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var v=Math.min(o[1]/2,Math.max(f,10));d=t.moveZone=new zn["a"]({invisible:!0,shape:{y:o[1]-v,height:f+v}}),d.on("mouseover",(function(){s.enterEmphasis(h)})).on("mouseout",(function(){s.leaveEmphasis(h)})),i.add(h),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:UM(this._orient),drift:Object(m["c"])(this._onDragMove,this,"all"),ondragstart:Object(m["c"])(this._showDataInfo,this,!0),ondragend:Object(m["c"])(this._onDragEnd,this),onmouseover:Object(m["c"])(this._showDataInfo,this,!0),onmouseout:Object(m["c"])(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Object(Hn["k"])(e[0],[0,100],t,!0),Object(Hn["k"])(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];Vg(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?Object(Hn["k"])(o.minSpan,a,i,!0):null,null!=o.maxSpan?Object(Hn["k"])(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=Object(Hn["c"])([Object(Hn["k"])(r[0],i,a,!0),Object(Hn["k"])(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=Object(Hn["c"])(n.slice()),i=this._size;Object(m["k"])([0,1],(function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;lt[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Ci["a"](t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape,r=+new Date;if(!(r-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),o=[0,100];this._range=Object(Hn["c"])([Object(Hn["k"])(n.x,i,o,!0),Object(Hn["k"])(n.x+n.width,i,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Al["g"](e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new AM({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?BM:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=fO(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(xO);function zM(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function UM(e){return"vertical"===e?"ns-resize":"ew-resize"}var HM=FM;function VM(e){e.registerComponentModel(CM),e.registerComponentView(HM),IO(e)}function GM(e){Object(r["a"])(TM),Object(r["a"])(VM)}var qM={get:function(e,t,n){var r=m["d"]((WM[e]||{})[t]);return n&&m["t"](r)?r[r.length-1]:r}},WM={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},YM=qM,KM=$f.mapVisual,XM=$f.eachVisual,ZM=m["t"],$M=m["k"],JM=Hn["c"],QM=Hn["k"],eL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return Object(Ye["a"])(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&NE(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=m["c"](e,this),this.controllerVisuals=RE(this.option.controller,t,e),this.targetVisuals=RE(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,n){t.push(n)})):t=lt["r"](e),t},t.prototype.eachTargetSeries=function(e,t){m["k"](this.getTargetSeriesIndices(),(function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)}),this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries((function(n){n===e&&(t=!0)})),t},t.prototype.formatValueText=function(e,t,n){var r,i=this.option,o=i.precision,a=this.dataBound,s=i.formatter;n=n||["<",">"],m["t"](e)&&(e=e.slice(),r=!0);var l=t?e:r?[u(e[0]),u(e[1])]:u(e);return m["C"](s)?s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l):m["w"](s)?r?s(e[0],e[1]):s(e):r?e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,t=JM([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var i=n[r],o=e.getDimensionInfo(i);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),i=t.controller||(t.controller={});m["I"](r,n),m["I"](i,n);var o=this.isCategory();function a(n){ZM(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},$M(r,(function(e,t){if($f.isValidType(t)){var n=YM.get(t,"inactive",o);null!=n&&(i[t]=n,"color"!==t||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}})))}function l(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),i=this.getItemSymbol(),a=i||"roundRect";$M(this.stateList,(function(i){var s=this.itemSize,l=e[i];l||(l=e[i]={color:o?r:[r]}),null==l.symbol&&(l.symbol=t&&m["d"](t)||(o?a:[a])),null==l.symbolSize&&(l.symbolSize=n&&m["d"](n)||(o?s[0]:[s[0],s[0]])),l.symbol=KM(l.symbol,(function(e){return"none"===e?a:e}));var u=l.symbolSize;if(null!=u){var c=-1/0;XM(u,(function(e){e>c&&(c=e)})),l.symbolSize=KM(u,(function(e){return QM(e,[0,c],[0,s[0]],!0)}))}}),this)}a.call(this,r),a.call(this,i),s.call(this,r,"inRange","outOfRange"),l.call(this,i)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(oo["a"]),tL=eL,nL=[20,140],rL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=nL[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=nL[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):m["t"](t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),m["k"](this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)}),this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Hn["c"]((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries((function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),(function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)}),this),t.push({seriesId:n.id,dataIndex:r})}),this),t},t.prototype.getVisualMeta=function(e){var t=iL(this,"outOfRange",this.getExtent()),n=iL(this,"inRange",this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var o=0,a=0,s=n.length,l=t.length;ae[1])break;r.push({color:this.getControllerVisual(a,"color",t),offset:o/n})}return r.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new rn["a"]("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,o=n.handleLabels,a=r.itemSize,s=r.getExtent();fL([0,1],(function(l){var u=i[l];u.setStyle("fill",t.handlesColor[l]),u.y=e[l];var c=dL(e[l],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var f=ln["applyTransform"](n.handleLabelPoints[l],ln["getTransform"](u,this.group));o[l].setStyle({x:f[0],y:f[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,o=i.getExtent(),a=i.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(e,"color",c),f=this.getControllerVisual(e,"symbolSize"),h=dL(e,o,s,!0),p=a[0]-f/2,g={x:u.x,y:u.y};u.y=h,u.x=p;var v=ln["applyTransform"](l.indicatorLabelPoint,ln["getTransform"](u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var m=this._applyTransform("left",l.mainGroup),b=this._orient,x="horizontal"===b;y.setStyle({text:(n||"")+i.formatValueText(t),verticalAlign:x?m:"middle",align:x?"center":m});var _={x:p,y:h,style:{fill:d}},w={style:{x:v[0],y:v[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var S={duration:100,easing:"cubicInOut",additive:!0};u.x=g.x,u.y=g.y,u.animateTo(_,S),y.animateTo(w,S)}else u.attr(_),y.attr(w);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var O=0;Oi[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(t||xL(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var f=lt["d"](c,d);this._dispatchHighDown("downplay",cL(f[0],n)),this._dispatchHighDown("highlight",cL(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t=e.target,n=this.visualMapModel;if(t&&null!=Object(ut["a"])(t).dataIndex){var r=Object(ut["a"])(t),i=this.ecModel.getSeriesByIndex(r.seriesIndex);if(n.isTargetSeries(i)){var o=i.getData(r.dataType),a=o.getStore().get(n.getDataDimensionIndex(o),r.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=o,r.push(i))}})),e.getData().setVisual("visualMeta",r)}}];function TL(e,t,n,r){for(var i=t.targetVisuals[r],o=$f.prepareVisualTypes(i),a={color:Object(DE["b"])(e.getData(),"color")},s=0,l=o.length;s0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(SL,kL),Object(m["k"])(OL,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(CL))}function IL(e){e.registerComponentModel(oL),e.registerComponentView(wL),LL(e)}var DL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return Object(Ye["a"])(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],jL[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual((function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=m["d"](i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=m["H"](this._pieceList,(function(e){return e=m["d"](e),"inRange"!==t&&(e.visual=null),e})))}))},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=$f.listVisualTypes(),i=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}m["k"](t.pieces,(function(e){m["k"](r,(function(t){e.hasOwnProperty(t)&&(n[t]=1)}))})),m["k"](n,(function(e,n){var r=!1;m["k"](this.stateList,(function(e){r=r||o(t,e,n)||o(t.target,e,n)}),this),!r&&m["k"](this.stateList,(function(e){(t[e]||(t[e]={}))[n]=YM.get(n,"inRange"===e?"active":"inactive",i)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,m["k"](r,(function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)}),this),"single"===n.selectedMode){var o=!1;m["k"](r,(function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(o?i[n]=!1:o=!0)}),this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=m["d"](e)},t.prototype.getValueState=function(e){var t=$f.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries((function(r){var i=[],o=r.getData();o.each(this.getDataDimensionIndex(o),(function(t,r){var o=$f.findPieceIndex(t,n);o===e&&i.push(r)}),this),t.push({seriesId:r.id,dataIndex:i})}),this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,i=this._pieceList.slice();if(i.length){var o=i[0].interval[0];o!==-1/0&&i.unshift({interval:[-1/0,o]}),o=i[i.length-1].interval[1],o!==1/0&&i.push({interval:[o,1/0]})}else i.push({interval:[-1/0,1/0]});var a=-1/0;return m["k"](i,(function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])}),this),{stops:t,outerColors:n}}function s(i,o){var a=r.getRepresentValue({interval:i});o||(o=r.getValueState(a));var s=e(a,o);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=Object(Rr["d"])(tL.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(tL),jL={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;var o=(r[1]-r[0])/i;while(+o.toFixed(n)!==o&&n<5)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function PL(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var RL=DL,NL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Object(Ye["a"])(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,i=r.getFont(),o=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=m["O"](t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,a),m["k"](l.viewPieceList,(function(r){var l=r.piece,u=new rn["a"];u.onclick=m["c"](this._onItemClick,this,l),this._enableHoverLink(u,r.indexInModelPieceList);var d=t.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),c){var f=this.visualMapModel.getValueState(d);u.add(new J["a"]({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:i,fill:o,opacity:"outOfRange"===f?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,a),xi["b"](t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",(function(){return r("highlight")})).on("mouseout",(function(){return r("downplay")}));var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:cL(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return uL(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var o=new rn["a"],a=this.visualMapModel.textStyleModel;o.add(new J["a"]({style:Object(fn["c"])(a,{x:r?"right"===i?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?i:"center",text:t})})),e.add(o)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=m["H"](e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),r=e.get("orient"),i=e.get("inverse");return("horizontal"===r?i:!i)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n){e.add(Object(nn["a"])(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=m["d"](n.selected),o=t.getSelectedMapKey(e);"single"===r||!0===r?(i[o]=!0,m["k"](i,(function(e,t){i[t]=t===o}))):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type="visualMap.piecewise",t}(sL),BL=NL;function FL(e){e.registerComponentModel(RL),e.registerComponentView(BL),LL(e)}function zL(e){Object(r["a"])(IL),Object(r["a"])(FL)}var UL={label:{enabled:!0},decal:{show:!1}},HL=Object(lt["o"])(),VL={};function GL(e,t){var n=e.getModel("aria");if(n.get("enabled")){var r=m["d"](UL);m["I"](r.label,e.getLocaleModel().get("aria"),!1),m["I"](n.option,r,!1),i(),o()}function i(){var t=n.getModel("decal"),r=t.get("show");if(r){var i=m["f"]();e.eachSeries((function(e){if(!e.isColorBySeries()){var t=i.get(e.type);t||(t={},i.set(e.type,t)),HL(e).scope=t}})),e.eachRawSeries((function(t){if(!e.isSeriesFiltered(t))if(m["w"](t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var r=Object(ef["b"])(t.ecModel,t.name,VL,e.getSeriesCount()),i=n.getVisual("decal");n.setVisual("decal",u(i,r))}else{var o=t.getRawData(),a={},s=HL(t).scope;n.each((function(e){var t=n.getRawIndex(e);a[t]=e}));var l=o.count();o.each((function(e){var r=a[e],i=o.getName(e)||e+"",c=Object(ef["b"])(t.ecModel,i,s,l),d=n.getItemVisual(r,"decal");n.setItemVisual(r,"decal",u(d,c))}))}}function u(e,t){var n=e?m["m"](m["m"]({},t),e):t;return n.dirty=!0,n}}))}}function o(){var r=e.getLocaleModel().get("aria"),i=n.getModel("label");if(i.option=m["i"](i.option,r),i.get("enabled")){var o=t.getZr().dom;if(i.get("description"))o.setAttribute("aria-label",i.get("description"));else{var u,c=e.getSeriesCount(),d=i.get(["data","maxCount"])||10,f=i.get(["series","maxCount"])||10,h=Math.min(c,f);if(!(c<1)){var p=s();if(p){var g=i.get(["general","withTitle"]);u=a(g,{title:p})}else u=i.get(["general","withoutTitle"]);var v=[],y=c>1?i.get(["series","multiple","prefix"]):i.get(["series","single","prefix"]);u+=a(y,{seriesCount:c}),e.eachSeries((function(e,t){if(t1?i.get(["series","multiple",o]):i.get(["series","single",o]),n=a(n,{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:l(e.subType)});var s=e.getData();if(s.count()>d){var u=i.get(["data","partialData"]);n+=a(u,{displayCnt:d})}else n+=i.get(["data","allData"]);for(var f=i.get(["data","separator","middle"]),p=i.get(["data","separator","end"]),g=[],y=0;y":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},KL=function(){function e(e){var t=this._condVal=Object(m["C"])(e)?new RegExp(e):Object(m["B"])(e)?e:null;if(null==t){var n="";0,Object(Df["c"])(n)}}return e.prototype.evaluate=function(e){var t=typeof e;return Object(m["C"])(t)?this._condVal.test(e):!!Object(m["z"])(t)&&this._condVal.test(e+"")},e}(),XL=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),ZL=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&l.push(t),t=[e,n]}function p(e,n,r,i){fI(e,r)&&fI(n,i)||t.push(e,n,r,i,r,i)}function g(e,n,r,i,o,a){var s=Math.abs(n-e),l=4*Math.tan(s/4)/3,u=nk:E2&&l.push(t),l}function pI(e,t,n,r,i,o,a,s,l,u){if(fI(e,n)&&fI(t,r)&&fI(i,a)&&fI(o,s))l.push(a,s);else{var c=2/u,d=c*c,f=a-e,h=s-t,p=Math.sqrt(f*f+h*h);f/=p,h/=p;var g=n-e,v=r-t,y=i-a,m=o-s,b=g*g+v*v,x=y*y+m*m;if(b=0&&k=0)l.push(a,s);else{var O=[],T=[];Object(Mn["g"])(e,n,i,a,.5,O),Object(Mn["g"])(t,r,o,s,.5,T),pI(O[0],T[0],O[1],T[1],O[2],T[2],O[3],T[3],l,u),pI(O[4],T[4],O[5],T[5],O[6],T[6],O[7],T[7],l,u)}}}}function gI(e,t){var n=hI(e),r=[];t=t||1;for(var i=0;i0)for(u=0;uMath.abs(u),d=vI([l,u],c?0:1,t),f=(c?s:u)/d.length,h=0;hi,a=vI([r,i],o?0:1,t),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",c=o?"y":"x",d=e[s]/a.length,f=0;f1?null:new Ci["a"](g*l+e,g*u+t)}function _I(e,t,n){var r=new Ci["a"];Ci["a"].sub(r,n,t),r.normalize();var i=new Ci["a"];Ci["a"].sub(i,e,t);var o=i.dot(r);return o}function wI(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function SI(e,t,n){for(var r=e.length,i=[],o=0;oa?(u.x=c.x=s+o/2,u.y=l,c.y=l+a):(u.y=c.y=l+a/2,u.x=s,c.x=s+o),SI(t,u,c)}function OI(e,t,n,r){if(1===n)r.push(t);else{var i=Math.floor(n/2),o=e(t);OI(e,o[0],i,r),OI(e,o[1],n-i,r)}return r}function TI(e,t){for(var n=[],r=0;r0)for(var _=r/n,w=-r/2;w<=r/2;w+=_){var S=Math.sin(w),k=Math.cos(w),O=0;for(b=0;b0;u/=2){var c=0,d=0;(e&u)>0&&(c=1),(t&u)>0&&(d=1),l+=u*u*(3*c^d),0===d&&(1===c&&(e=u-1-e,t=u-1-t),s=e,e=t,t=s)}return l}function qI(e){var t=1/0,n=1/0,r=-1/0,i=-1/0,o=Object(m["H"])(e,(function(e){var o=e.getBoundingRect(),a=e.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return t=Math.min(s,t),n=Math.min(l,n),r=Math.max(s,r),i=Math.max(l,i),[s,l]})),a=Object(m["H"])(o,(function(o,a){return{cp:o,z:GI(o[0],o[1],t,n,r,i),path:e[a]}}));return a.sort((function(e,t){return e.z-t.z})).map((function(e){return e.path}))}function WI(e){return AI(e.path,e.count)}function YI(){return{fromIndividuals:[],toIndividuals:[],count:0}}function KI(e,t,n){var r=[];function i(e){for(var t=0;t=0;i--)if(!n[i].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[i].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var JI={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),r=0;r0){var s,l,u=r.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);ZI(e)&&(s=e,l=t),ZI(t)&&(s=t,l=e);for(var d=s?s===e:e.length>t.length,f=s?$I(l,s):$I(d?t:e,[d?e:t]),h=0,p=0;ptD))for(var r=n.getIndices(),i=rD(n),o=0;o0&&i.group.traverse((function(e){e instanceof a["b"]&&!e.animators.length&&e.animateFrom({style:{opacity:0}},o)}))}))}function dD(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function fD(e){return Object(m["t"])(e)?e.sort().join(","):e}function hD(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function pD(e,t){var n=Object(m["f"])(),r=Object(m["f"])(),i=Object(m["f"])();return Object(m["k"])(e.oldSeries,(function(t,n){var o=e.oldData[n],a=dD(t),s=fD(a);r.set(s,o),Object(m["t"])(a)&&Object(m["k"])(a,(function(e){i.set(e,{data:o,key:s})}))})),Object(m["k"])(t.updatedSeries,(function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.getData(),o=dD(e),a=fD(o),s=r.get(a);if(s)n.set(a,{oldSeries:[{divide:hD(s),data:s}],newSeries:[{divide:hD(t),data:t}]});else if(Object(m["t"])(o)){0;var l=[];Object(m["k"])(o,(function(e){var t=r.get(e);t&&l.push({divide:hD(t),data:t})})),l.length&&n.set(a,{oldSeries:l,newSeries:[{data:t,divide:hD(t)}]})}else{var u=i.get(o);if(u){var c=n.get(u.key);c||(c={oldSeries:[{data:u.data,divide:hD(u.data)}],newSeries:[]},n.set(u.key,c)),c.newSeries.push({data:t,divide:hD(t)})}}}})),n}function gD(e,t){for(var n=0;n=0&&i.push({data:t.oldData[n],divide:hD(t.oldData[n]),dim:e.dimension})})),Object(m["k"])(Object(lt["r"])(e.to),(function(e){var t=gD(n.updatedSeries,e);if(t>=0){var r=n.updatedSeries[t].getData();o.push({data:r,divide:hD(r),dim:e.dimension})}})),i.length>0&&o.length>0&&cD(i,o,r)}function yD(e){e.registerUpdateLifecycle("series:beforeupdate",(function(e,t,n){Object(m["k"])(Object(lt["r"])(n.seriesTransition),(function(e){Object(m["k"])(Object(lt["r"])(e.to),(function(e){for(var t=n.updatedSeries,r=0;rl)r(s,n=t[l++])&&(~o(u,n)||u.push(n));return u}},"21e0":function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},2308:function(e,t,n){(function(t,r){e.exports=r(n("47fc"))})(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=31)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.enableLogs=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(5);function o(){}var a={trace:o,debug:o,log:o,warn:o,info:o,error:o},s=a;function l(e,t){return t="["+e+"] > "+t,t}var u=(0,i.getSelfScope)();function c(e){var t=u.console[e];return t?function(){for(var n=arguments.length,r=Array(n),i=0;i1?t-1:0),r=1;r1?n-1:0),i=1;i=n.start(r)&&t<=n.end(r))return!0}catch(i){}return!1}},{key:"bufferInfo",value:function(e,t,n){try{if(e){var r=e.buffered,i=[],o=void 0;for(o=0;oc&&(r[u-1].end=e[l].end):r.push(e[l])}else r.push(e[l])}for(l=0,i=0,o=a=t;l=d&&t=i&&t<=o){r.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))});break}if(ei)r.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))}),a=!0;else if(t<=i)break}return{time:r,partial:a}}},{key:"getFragmentKey",value:function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}},{key:"getPartialFragment",value:function(e){var t=this,n=void 0,r=void 0,i=void 0,o=null,a=0;return Object.keys(this.fragments).forEach((function(s){var l=t.fragments[s];t.isPartial(l)&&(r=l.body.startPTS-t.bufferPadding,i=l.body.endPTS+t.bufferPadding,e>=r&&e<=i&&(n=Math.min(e-r,i-e),a<=n&&(o=l.body,a=n)))})),o}},{key:"getState",value:function(e){var t=this.getFragmentKey(e),n=this.fragments[t],r=h.NOT_LOADED;return void 0!==n&&(r=n.buffered?!0===this.isPartial(n)?h.PARTIAL:h.OK:h.APPENDING),r}},{key:"isPartial",value:function(e){return!0===e.buffered&&(void 0!==e.range.video&&!0===e.range.video.partial||void 0!==e.range.audio&&!0===e.range.audio.partial)}},{key:"isTimeBuffered",value:function(e,t,n){for(var r=void 0,i=void 0,o=0;o=r&&t<=i)return!0;if(t<=r)return!1}return!1}},{key:"onFragLoaded",value:function(e){var t=e.frag;Number.isFinite(t.sn)&&!t.bitrateTest&&(this.fragments[this.getFragmentKey(t)]={body:t,range:Object.create(null),buffered:!1})}},{key:"onBufferAppended",value:function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach((function(e){var n=t.timeRanges[e];t.detectEvictedFragments(e,n)}))}},{key:"onFragBuffered",value:function(e){this.detectPartialFragments(e.frag)}},{key:"hasFragment",value:function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]}},{key:"removeFragment",value:function(e){var t=this.getFragmentKey(e);delete this.fragments[t]}},{key:"removeAllFragments",value:function(){this.fragments=Object.create(null)}}]),t}(a.default)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGroupId=i,t.updatePTS=o,t.updateFragPTSDTS=a,t.mergeDetails=s,t.mergeSubtitlePlaylists=l,t.mapFragmentIntersection=u,t.adjustSliding=c,t.computeReloadInterval=d;var r=n(0);function i(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n);break}}function o(e,t,n){var i=e[t],o=e[n],a=o.startPTS;Number.isFinite(a)?n>t?(i.duration=a-i.start,i.duration<0&&r.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(o.duration=i.start-a,o.duration<0&&r.logger.warn("negative duration computed for frag "+o.sn+",level "+o.level+", there should be some duration drift between playlist and fragment!")):o.start=n>t?i.start+i.duration:Math.max(i.start-o.duration,0)}function a(e,t,n,r,i,a){var s=n;if(Number.isFinite(t.startPTS)){var l=Math.abs(t.startPTS-n);Number.isFinite(t.deltaPTS)?t.deltaPTS=Math.max(l,t.deltaPTS):t.deltaPTS=l,s=Math.max(n,t.startPTS),n=Math.min(n,t.startPTS),r=Math.max(r,t.endPTS),i=Math.min(i,t.startDTS),a=Math.max(a,t.endDTS)}var u=n-t.start;t.start=t.startPTS=n,t.maxStartPTS=s,t.endPTS=r,t.startDTS=i,t.endDTS=a,t.duration=r-n;var c=t.sn;if(!e||ce.endSN)return 0;var d=void 0,f=void 0,h=void 0;for(d=c-e.startSN,f=e.fragments,f[d]=t,h=d;h>0;h--)o(f,h,h-1);for(h=d;h2&&void 0!==arguments[2]?arguments[2]:0,r=-1;u(e,t,(function(e,t,n){t.start=e.start,r=n}));var i=t.fragments;if(r<0)i.forEach((function(e){e.start+=n}));else for(var o=r+1;or.length))for(var o=0;o0)n=i+1;else{if(!(a<0))return o;r=i-1}}return null}};t.default=r,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0)return t.subarray(r,r+i)}},{key:"_readSize",value:function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3],n}},{key:"getTimeStamp",value:function(t){for(var n=e.getID3Frames(t),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=e.length,r=void 0,i=void 0,o=void 0,a="",s=0;while(s>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(r);break;case 12:case 13:i=e[s++],a+=String.fromCharCode((31&r)<<6|63&i);break;case 14:i=e[s++],o=e[s++],a+=String.fromCharCode((15&r)<<12|(63&i)<<6|(63&o)<<0);break;default:}}return a}}]),e}(),a=o._utf8ArrayToStr;t.default=o,t.utf8ArrayToStr=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>8*(15-n)&255;return t}},{key:"fragmentDecryptdataFromLevelkey",value:function(e,t){var n=e;return e&&e.method&&e.uri&&!e.iv&&(n=new s.default,n.method=e.method,n.baseuri=e.baseuri,n.reluri=e.reluri,n.iv=this.createInitializationVector(t)),n}},{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=o.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e}},{key:"byteRange",get:function(){if(!this._byteRange&&!this.rawByteRange)return[];if(this._byteRange)return this._byteRange;var e=[];if(this.rawByteRange){var t=this.rawByteRange.split("@",2);if(1===t.length){var n=this.lastByteRangeEndOffset;e[0]=n||0}else e[0]=parseInt(t[1]);e[1]=parseInt(t[0])+e[0],this._byteRange=e}return e}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}},{key:"endProgramDateTime",get:function(){if(!Number.isFinite(this.programDateTime))return null;var e=Number.isFinite(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}],[{key:"ElementaryStreamTypes",get:function(){return{AUDIO:"audio",VIDEO:"video"}}}]),e}();t.default=f,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},i=r.removePKCS7Padding,o=void 0===i||i;if(v(this,e),this.logEnabled=!0,this.observer=t,this.config=n,this.removePKCS7Padding=o,o)try{var a=y.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(s){}this.disableWebCrypto=!this.subtle}return r(e,[{key:"isSync",value:function(){return this.disableWebCrypto&&this.config.enableSoftwareAES}},{key:"decrypt",value:function(e,t,n,r){var i=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(d.logger.log("JS AES decrypt"),this.logEnabled=!1);var a=this.decryptor;a||(this.decryptor=a=new u.default),a.expandKey(t),r(a.decrypt(e,0,n,this.removePKCS7Padding))}else{this.logEnabled&&(d.logger.log("WebCrypto AES decrypt"),this.logEnabled=!1);var l=this.subtle;this.key!==t&&(this.key=t,this.fastAesKey=new s.default(l,t)),this.fastAesKey.expandKey().then((function(a){var s=new o.default(l,n);s.decrypt(e,a).catch((function(o){i.onWebCryptoError(o,e,t,n,r)})).then((function(e){r(e)}))})).catch((function(o){i.onWebCryptoError(o,e,t,n,r)}))}}},{key:"onWebCryptoError",value:function(e,t,n,r,i){this.config.enableSoftwareAES?(d.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,n,r,i)):(d.logger.error("decrypting error : "+e.message),this.observer.trigger(h.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))}},{key:"destroy",value:function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)}}]),e}();t.default=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(){if("undefined"!==typeof window)return window.MediaSource||window.WebKitMediaSource}Object.defineProperty(t,"__esModule",{value:!0}),t.getMediaSource=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0;var r=function(){function e(e,t){for(var n=0;nd?(a.loader&&(u.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=p.IDLE):u.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else r===p.ENDED&&(0===o.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=p.IDLE);t&&(this.lastCurrentTime=i),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=i),this.tick()}},{key:"onMediaEnded",value:function(){this.startPosition=this.lastCurrentTime=0}},{key:"onHandlerDestroying",value:function(){this.stopLoad(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onHandlerDestroying",this).call(this)}},{key:"onHandlerDestroyed",value:function(){this.state=p.STOPPED,this.fragmentTracker=null}}]),t}(a.default);t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:null;if(n.isSidxRequest)return this._handleSidxRequest(e,n),void this._handlePlaylistLoaded(e,t,n,r);this.resetInternalLoader(n.type);var i=e.data;t.tload=x.now(),0===i.indexOf("#EXTM3U")?i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,n,r):this._handleMasterPlaylist(e,t,n,r):this._handleManifestParsingError(e,n,"no EXTM3U delimiter",r)}},{key:"loaderror",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(t,n,!1,e)}},{key:"loadtimeout",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(t,n,!0)}},{key:"_handleMasterPlaylist",value:function(e,n,r,i){var o=this.hls,s=e.data,l=t.getResponseUrl(e,r),u=p.default.parseMasterPlaylist(s,l);if(u.length){var d=u.map((function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}})),f=p.default.parseMasterPlaylistMedia(s,l,"AUDIO",d),h=p.default.parseMasterPlaylistMedia(s,l,"SUBTITLES");if(f.length){var g=!1;f.forEach((function(e){e.url||(g=!0)})),!1===g&&u[0].audioCodec&&!u[0].attrs.AUDIO&&(c.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main"}))}o.trigger(a.default.MANIFEST_LOADED,{levels:u,audioTracks:f,subtitles:h,url:l,stats:n,networkDetails:i})}else this._handleManifestParsingError(e,r,"no level found in manifest",i)}},{key:"_handleTrackOrLevelPlaylist",value:function(e,n,r,i){var o=this.hls,s=r.id,l=r.level,u=r.type,c=t.getResponseUrl(e,r),d=Number.isFinite(s)?s:0,f=Number.isFinite(l)?l:d,h=t.mapContextToLevelType(r),g=p.default.parseLevelPlaylist(e.data,c,f,h,d);if(g.tload=n.tload,u===_.MANIFEST){var v={url:c,details:g};o.trigger(a.default.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:c,stats:n,networkDetails:i})}if(n.tparsed=x.now(),g.needSidxRanges){var y=g.initSegment.url;this.load(y,{isSidxRequest:!0,type:u,level:l,levelDetails:g,id:s,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else r.levelDetails=g,this._handlePlaylistLoaded(e,n,r,i)}},{key:"_handleSidxRequest",value:function(e,t){var n=f.default.parseSegmentIndex(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var n=e.info,r=i.fragments[t];0===r.byteRange.length&&(r.rawByteRange=String(1+n.end-n.start)+"@"+String(n.start))})),i.initSegment.rawByteRange=String(n.moovEndOffset)+"@0"}}},{key:"_handleManifestParsingError",value:function(e,t,n,r){this.hls.trigger(a.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:n,networkDetails:r})}},{key:"_handleNetworkError",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;c.logger.info("A network error occured while loading a "+e.type+"-type playlist");var i=void 0,o=void 0,s=this.getInternalLoader(e);switch(e.type){case _.MANIFEST:i=n?u.ErrorDetails.MANIFEST_LOAD_TIMEOUT:u.ErrorDetails.MANIFEST_LOAD_ERROR,o=!0;break;case _.LEVEL:i=n?u.ErrorDetails.LEVEL_LOAD_TIMEOUT:u.ErrorDetails.LEVEL_LOAD_ERROR,o=!1;break;case _.AUDIO_TRACK:i=n?u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,o=!1;break;default:o=!1}s&&(s.abort(),this.resetInternalLoader(e.type));var l={type:u.ErrorTypes.NETWORK_ERROR,details:i,fatal:o,url:s.url,loader:s,context:e,networkDetails:t};r&&(l.response=r),this.hls.trigger(a.default.ERROR,l)}},{key:"_handlePlaylistLoaded",value:function(e,n,r,i){var o=r.type,s=r.level,l=r.id,u=r.levelDetails;if(u.targetduration){var c=t.canHaveQualityLevels(r.type);if(c)this.hls.trigger(a.default.LEVEL_LOADED,{details:u,level:s||0,id:l||0,stats:n,networkDetails:i});else switch(o){case _.AUDIO_TRACK:this.hls.trigger(a.default.AUDIO_TRACK_LOADED,{details:u,id:l,stats:n,networkDetails:i});break;case _.SUBTITLE_TRACK:this.hls.trigger(a.default.SUBTITLE_TRACK_LOADED,{details:u,id:l,stats:n,networkDetails:i});break}}else this._handleManifestParsingError(e,r,"invalid target duration",i)}}],[{key:"canHaveQualityLevels",value:function(e){return e!==_.AUDIO_TRACK&&e!==_.SUBTITLE_TRACK}},{key:"mapContextToLevelType",value:function(e){var t=e.type;switch(t){case _.AUDIO_TRACK:return w.AUDIO;case _.SUBTITLE_TRACK:return w.SUBTITLE;default:return w.MAIN}}},{key:"getResponseUrl",value:function(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}},{key:"ContextType",get:function(){return _}},{key:"LevelType",get:function(){return w}}]),t}(l.default);t.default=S,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0}},{key:"bin2str",value:function(e){return String.fromCharCode.apply(null,e)}},{key:"readUint16",value:function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<8|e[t+1];return n<0?65536+n:n}},{key:"readUint32",value:function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n}},{key:"writeUint32",value:function(e,t,n){e.data&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}},{key:"findBox",value:function(t,n){var r=[],i=void 0,o=void 0,a=void 0,s=void 0,l=void 0,u=void 0,c=void 0;if(t.data?(u=t.start,s=t.end,t=t.data):(u=0,s=t.byteLength),!n.length)return null;for(i=u;i1?i+o:s,a===n[0]&&(1===n.length?r.push({data:t,start:i+8,end:c}):(l=e.findBox({data:t,start:i+8,end:c},n.slice(1)),l.length&&(r=r.concat(l)))),i=c;return r}},{key:"parseSegmentIndex",value:function(t){var n=e.findBox(t,["moov"])[0],r=n?n.end:null,i=0,o=e.findBox(t,["sidx"]),a=void 0;if(!o||!o[0])return null;a=[],o=o[0];var s=o.data[0];i=0===s?8:16;var l=e.readUint32(o,i);i+=4;var u=0,c=0;i+=0===s?8:16,i+=2;var d=o.end+c,f=e.readUint16(o,i);i+=2;for(var h=0;h>>31;if(1===y)return void console.warn("SIDX has hierarchical references (not supported)");var m=e.readUint32(o,p);p+=4,a.push({referenceSize:v,subsegmentDuration:m,info:{duration:m/l,start:d,end:d+v-1}}),d+=v,p+=4,i=p}return{earliestPresentationTime:u,timescale:l,version:s,referencesCount:f,references:a,moovEndOffset:r}}},{key:"parseInitSegment",value:function(t){var n=[],r=e.findBox(t,["moov","trak"]);return r.forEach((function(t){var r=e.findBox(t,["tkhd"])[0];if(r){var o=r.data[r.start],a=0===o?12:20,s=e.readUint32(r,a),l=e.findBox(t,["mdia","mdhd"])[0];if(l){o=l.data[l.start],a=0===o?12:20;var u=e.readUint32(l,a),c=e.findBox(t,["mdia","hdlr"])[0];if(c){var d=e.bin2str(c.data.subarray(c.start+8,c.start+12)),f={soun:"audio",vide:"video"}[d];if(f){var h=e.findBox(t,["mdia","minf","stbl","stsd"]);if(h.length){h=h[0];var p=e.bin2str(h.data.subarray(h.start+12,h.start+16));i.logger.log("MP4Demuxer:"+f+":"+p+" found")}n[s]={timescale:u,type:f},n[f]={timescale:u,id:s}}}}}})),n}},{key:"getStartDTS",value:function(t,n){var r=void 0,i=void 0,o=void 0;return r=e.findBox(n,["moof","traf"]),i=[].concat.apply([],r.map((function(n){return e.findBox(n,["tfhd"]).map((function(r){var i=void 0,o=void 0,a=void 0;return i=e.readUint32(r,4),o=t[i].timescale||9e4,a=e.findBox(n,["tfdt"]).map((function(t){var n=void 0,r=void 0;return n=t.data[t.start],r=e.readUint32(t,4),1===n&&(r*=Math.pow(2,32),r+=e.readUint32(t,8)),r}))[0],a/o}))}))),o=Math.min.apply(null,i),isFinite(o)?o:0}},{key:"offsetStartDTS",value:function(t,n,r){e.findBox(n,["moof","traf"]).map((function(n){return e.findBox(n,["tfhd"]).map((function(i){var o=e.readUint32(i,4),a=t[o].timescale||9e4;e.findBox(n,["tfdt"]).map((function(t){var n=t.data[t.start],i=e.readUint32(t,4);if(0===n)e.writeUint32(t,4,i-r*a);else{i*=Math.pow(2,32),i+=e.readUint32(t,8),i-=r*a,i=Math.max(i,0);var o=Math.floor(i/(u+1)),s=Math.floor(i%(u+1));e.writeUint32(t,4,o),e.writeUint32(t,8,s)}}))}))}))}}]),e}();t.default=c,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a(l)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function g(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?b(i):y(i,i.length)}function v(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"===typeof l)o(l,this,t);else{var u=l.length,c=y(l,u);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():m(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(e){var t,n,r;if(n=this._events,void 0===n)return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return g(this,e,!0)},l.prototype.rawListeners=function(e){return g(this,e,!1)},l.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},l.prototype.listenerCount=v,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&null!=t&&null!=t.key&&"AES-128"===t.method){var g=this.decrypter;null==g&&(g=this.decrypter=new l.default(this.observer,this.config));var v=T();g.decrypt(e,t.key.buffer,t.iv.buffer,(function(e){var l=T();p.observer.trigger(o.default.FRAG_DECRYPTED,{stats:{tstart:v,tdecrypt:l}}),p.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),r,i,a,s,u,c,d,f,h)}))}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),r,i,a,s,u,c,d,f,h)}},{key:"pushDecrypted",value:function(e,t,n,r,i,s,l,u,d,h,g,y){var b=this.demuxer;if(!b||(l||u)&&!this.probe(e)){for(var _=this.observer,w=this.typeSupported,S=this.config,k=[{demux:p.default,remux:m.default},{demux:f.default,remux:x.default},{demux:c.default,remux:m.default},{demux:v.default,remux:m.default}],O=0,T=k.length;O>>6),l=(60&t[n+2])>>>2,!(l>p.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+o+",ADTS data:type:"+s+",sampleingIndex:"+l+"["+p[l]+"Hz],channelConfig:"+c),/firefox/i.test(f)?l>=6?(s=5,d=new Array(4),u=l-3):(s=2,d=new Array(2),u=l):-1!==f.indexOf("android")?(s=2,d=new Array(2),u=l):(s=5,d=new Array(4),o&&(-1!==o.indexOf("mp4a.40.29")||-1!==o.indexOf("mp4a.40.5"))||!o&&l>=6?u=l-3:((o&&-1!==o.indexOf("mp4a.40.2")&&(l>=6&&1===c||/vivaldi/i.test(f))||!o&&1===c)&&(s=2,d=new Array(2)),u=l)),d[0]=s<<3,d[0]|=(14&l)>>1,d[1]|=(1&l)<<7,d[1]|=c<<3,5===s&&(d[1]|=(14&u)>>1,d[2]=(1&u)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:p[l],channelCount:c,codec:"mp4a.40."+s,manifestCodec:h};e.trigger(a.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}function u(e,t){return 255===e[t]&&240===(246&e[t+1])}function c(e,t){return 1&e[t+1]?7:9}function d(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function f(e,t){return!!(t+10&&t+o+a<=l)return s=n+r*i,{headerLength:o,frameLength:a,stamp:s}}function y(e,t,n,r,i){var o=g(e.samplerate),a=v(t,n,r,i,o);if(a){var s=a.stamp,l=a.headerLength,u=a.frameLength,c={unit:t.subarray(n+l,n+l+u),pts:s,dts:s};return e.samples.push(c),e.len+=u,{sample:c,length:u+l}}}n(5)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,n,r,i){if(!(n+24>t.length)){var o=this.parseHeader(t,n);if(o&&n+o.frameLength<=t.length){var a=9e4*o.samplesPerFrame/o.sampleRate,s=r+i*a,l={unit:t.subarray(n,n+o.frameLength),pts:s,dts:s};return e.config=[],e.channelCount=o.channelCount,e.samplerate=o.sampleRate,e.samples.push(l),e.len+=o.frameLength,{sample:l,length:o.frameLength}}}},parseHeader:function(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,o=e[t+2]>>4&15,a=e[t+2]>>2&3,s=e[t+2]>>1&1;if(1!==n&&0!==o&&15!==o&&3!==a){var l=3===n?3-i:3===i?3:4,u=1e3*r.BitratesMap[14*l+o-1],c=3===n?0:2===n?1:2,d=r.SamplingRateMap[3*c+a],f=e[t+3]>>6===3?1:2,h=r.SamplesCoefficients[n][i],p=r.BytesInSlot[i],g=8*h*p,v=parseInt(h*u/d+s,10)*p;return{sampleRate:d,channelCount:f,frameLength:v,samplesPerFrame:g}}},isHeaderPattern:function(e,t){return 255===e[t]&&224===(224&e[t+1])&&0!==(6&e[t+1])},isHeader:function(e,t){return!!(t+11?t-1:0),r=1;rt?-1:0}))}function u(e,t,n){var r=!1;return t&&t.details&&n&&(n.endCC>n.startCC||e&&e.cc=e[e.length-1].endProgramDateTime)return null;n=n||0;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=e?t[e.sn-t[0].sn+1]:null;return o&&!l(n,r,o)?o:i.default.search(t,l.bind(null,n,r))}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2],r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function u(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.endProgramDateTime-r>e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1?r-1:0),o=1;o1&&(this.clearNextTick(),this._tickTimer=setTimeout(this._boundTick,0)),this._tickCallCount=0)}},{key:"doTick",value:function(){}}]),t}(o.default);t.default=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n=null;try{n=new window.Event("addtrack")}catch(r){n=document.createEvent("Event"),n.initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function i(e){if(e&&e.cues)while(e.cues.length>0)e.removeCue(e.cues[0])}Object.defineProperty(t,"__esModule",{value:!0}),t.sendAddTrackEvent=r,t.clearCurrentCues=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fixLineBreaks=void 0;var r=n(71),i=o(r);function o(e){return e&&e.__esModule?e:{default:e}}var a=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};function s(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new a,this.regionList=[]}function l(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function u(){this.values=Object.create(null)}function c(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"===typeof i[o]){var a=i[o].split(n);if(2===a.length){var s=a[0],l=a[1];t(s,l)}}}u.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r=0&&t<=100))&&(this.set(e,t),!0)}};var d=new i.default(0,0,0),f="middle"===d.align?"middle":"center";function h(e,t,n){var r=e;function i(){var t=l(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function o(e,t){var r=new u;c(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start",f,"end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start",f,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",f,"end","left","right"]);break}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===d.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",f);var o=r.get("position","auto");"auto"===o&&50===d.position&&(o="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=o}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),a(),t.endTime=i(),a(),o(e,t)}function p(e){return e.replace(//gi,"\n")}s.prototype={parse:function(e){var t=this;function n(){var e=t.buffer,n=0;e=p(e);while(n-1)return p(n)}else if(!i.config.useHls)return p(n);Number.isFinite=Number.isFinite||function(e){return"number"===typeof e&&isFinite(e)};var o=void 0;return o=new u.default(n.hlsOpts),n.hls=o,Object.defineProperty(i,"src",{get:function(){return i.currentSrc},set:function(e){r.removeClass(i.root,"xgplayer-is-live");var t=document.querySelector(".xgplayer-live");t&&t.parentNode.removeChild(t),i.autoplay=!0;var n=i.paused;n||i.pause(),i.hls.stopLoad(),i.hls.detachMedia(),i.hls.destroy(),i.hls=new u.default(i.hlsOpts),i.register(e),i.once("canplay",(function(){i.play().catch((function(e){}))})),i.hls.loadSource(e),i.hls.attachMedia(i.video)},configurable:!0}),n.register(n.config.url),n.once("complete",(function(){o.attachMedia(i.video),i.once("canplay",(function(){i.play().catch((function(e){}))}))})),n.once("destroy",(function(){o.stopLoad()})),n}return g(t,e),i(t,[{key:"switchURL",value:function(e){var t=this;t.url=e,t.config.url=e;var n=t.currentTime;s.default.util.addClass(t.root,"xgplayer-is-enter"),t.once("playing",(function(){s.default.util.removeClass(t.root,"xgplayer-is-enter")})),t.once("canplay",(function(){t.currentTime=n,t.play()})),"object"===r(t.hls)&&(t.hls.originUrl=e),t.src=e}},{key:"register",value:function(e){var t=this.hls,n=s.default.util,r=this;t.on(u.default.Events.MEDIA_ATTACHED,(function(){t.loadSource(e)})),t.on(u.default.Events.LEVEL_LOADED,(function(e,i){if(!t.inited&&(t.inited=!0,i&&i.details&&i.details.live&&(n.addClass(r.root,"xgplayer-is-live"),!n.findDom(r.root,".xgplayer-live")))){var o=n.createDom("xg-live","正在直播",{},"xgplayer-live");r.controls.appendChild(o)}})),t.on(u.default.Events.ERROR,(function(e,n){if(r.emit("HLS_ERROR",{errorType:n.type,errorDetails:n.details,errorFatal:n.fatal}),n.fatal)switch(n.type){case u.default.ErrorTypes.NETWORK_ERROR:t.startLoad();break;case u.default.ErrorTypes.MEDIA_ERROR:t.recoverMediaError();break;default:r.emit("error",n)}})),this._statistics()}},{key:"_statistics",value:function(){var e={speed:0,playerType:"HlsPlayer"},t={videoDataRate:0,audioDataRate:0},n=this.hls,r=this;n.on(u.default.Events.FRAG_LOAD_PROGRESS,(function(t,n){e.speed=n.stats.loaded/1e3})),n.on(u.default.Events.FRAG_PARSING_DATA,(function(e,n){"video"===n.type&&(t.fps=parseInt(n.nb/(n.endPTS-n.startPTS)))})),n.on(u.default.Events.FRAG_PARSING_INIT_SEGMENT,(function(e,n){if(t.hasAudio=!!(n&&n.tracks&&n.tracks.audio),t.hasVideo=!!(n&&n.tracks&&n.tracks.video),t.hasAudio&&n.tracks.audio){var i=n.tracks.audio;t.audioChannelCount=i.metadata&&i.metadata.channelCount?i.metadata.channelCount:0,t.audioCodec=i.codec}if(t.hasVideo&&n.tracks.video){var o=n.tracks.video;t.videoCodec=o.codec,t.width=o.metadata&&o.metadata.width?o.metadata.width:0,t.height=o.metadata&&o.metadata.height?o.metadata.height:0}t.duration=n.frag&&n.frag.duration?n.frag.duration:0,t.level=n.frag&&n.frag.level?n.frag.level:0,(t.videoCodec||t.audioCodec)&&(t.mimeType='video/hls; codecs="'+t.videoCodec+";"+t.audioCodec+'"'),r.mediainfo=t,r.emit("media_info",t)})),this._statisticsTimmer=setInterval((function(){r.emit("statistics_info",e),e.speed=0}),1e3)}},{key:"destroy",value:function(){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this),clearInterval(this._statisticsTimmer)}}]),t}(s.default);v.isSupported=u.default.isSupported,t.default=v,e.exports=t["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};C(this,t);var n=A(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=t.DefaultConfig;if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var i in r)i in e||(e[i]=r[i]);if(void 0!==e.liveMaxLatencyDurationCount&&e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==e.liveMaxLatencyDuration&&(e.liveMaxLatencyDuration<=e.liveSyncDuration||void 0===e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');(0,_.enableLogs)(e.debug),n.config=e,n._autoLevelCapping=-1;var o=n.abrController=new e.abrController(n),a=new e.bufferController(n),s=new e.capLevelController(n),u=new e.fpsController(n),d=new l.default(n),p=new c.default(n),v=new f.default(n),m=new b.default(n),x=n.levelController=new y.default(n),w=new h.FragmentTracker(n),S=n.streamController=new g.default(n,w),k=[x,S],O=e.audioStreamController;O&&k.push(new O(n,w)),n.networkControllers=k;var T=[d,p,v,o,a,s,u,m,w];if(O=e.audioTrackController,O){var E=new O(n);n.audioTrackController=E,T.push(E)}if(O=e.subtitleTrackController,O){var M=new O(n);n.subtitleTrackController=M,k.push(M)}if(O=e.emeController,O){var L=new O(n);n.emeController=L,T.push(L)}return O=e.subtitleStreamController,O&&k.push(new O(n,w)),O=e.timelineController,O&&T.push(new O(n)),n.coreComponents=T,n}return M(t,e),r(t,null,[{key:"isSupported",value:function(){return(0,x.isSupported)()}},{key:"version",get:function(){return __VERSION__}},{key:"Events",get:function(){return k.default}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return t.defaultConfig?t.defaultConfig:w.hlsDefaultConfig},set:function(e){t.defaultConfig=e}}]),r(t,[{key:"destroy",value:function(){_.logger.log("destroy"),this.trigger(k.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach((function(e){e.destroy()})),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1}},{key:"attachMedia",value:function(e){_.logger.log("attachMedia"),this.media=e,this.trigger(k.default.MEDIA_ATTACHING,{media:e})}},{key:"detachMedia",value:function(){_.logger.log("detachMedia"),this.trigger(k.default.MEDIA_DETACHING),this.media=null}},{key:"loadSource",value:function(e){e=o.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),_.logger.log("loadSource:"+e),this.url=e,this.trigger(k.default.MANIFEST_LOADING,{url:e})}},{key:"startLoad",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;_.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))}},{key:"stopLoad",value:function(){_.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))}},{key:"swapAudioCodec",value:function(){_.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}},{key:"recoverMediaError",value:function(){_.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),this.attachMedia(e)}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){_.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){_.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){_.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){_.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){_.logger.log("set startLevel:"+e);var t=this;-1!==e&&(e=Math.max(e,t.minAutoLevel)),t.levelController.startLevel=e}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){_.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var e=this,t=e.levels,n=e.config.minAutoBitrate,r=t?t.length:0,i=0;in)return i}return 0}},{key:"maxAutoLevel",get:function(){var e=this,t=e.levels,n=e.autoLevelCapping,r=void 0;return r=-1===n&&t&&t.length?t.length-1:n,r}},{key:"nextAutoLevel",get:function(){var e=this;return Math.min(Math.max(e.abrController.nextAutoLevel,e.minAutoLevel),e.maxAutoLevel)},set:function(e){var t=this;t.abrController.nextAutoLevel=Math.max(t.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}}]),t}(O.Observer);t.default=L,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,t}},{key:"resolve",value:function(e,t){return o.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}},{key:"parseMasterPlaylist",value:function(t,n){var r=[],i=void 0;function o(e,t){["video","audio"].forEach((function(n){var r=e.filter((function(e){return(0,g.isCodecType)(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}b.lastIndex=0;while(null!=(i=b.exec(t))){var a={},s=a.attrs=new h.default(i[1]);a.url=e.resolve(i[2],n);var l=s.decimalResolution("RESOLUTION");l&&(a.width=l.width,a.height=l.height),a.bitrate=s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),a.name=s.NAME,o([].concat((s.CODECS||"").split(/[ ,]+/)),a),a.videoCodec&&-1!==a.videoCodec.indexOf("avc1")&&(a.videoCodec=e.convertAVC1ToAVCOTI(a.videoCodec)),r.push(a)}return r}},{key:"parseMasterPlaylistMedia",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=void 0,a=[],s=0;x.lastIndex=0;while(null!==(o=x.exec(t))){var l={},u=new h.default(o[1]);if(u.TYPE===r){if(l.groupId=u["GROUP-ID"],l.name=u.NAME,l.type=r,l.default="YES"===u.DEFAULT,l.autoselect="YES"===u.AUTOSELECT,l.forced="YES"===u.FORCED,u.URI&&(l.url=e.resolve(u.URI,n)),l.lang=u.LANGUAGE,l.name||(l.name=l.lang),i.length){var c=e.findGroup(i,l.groupId);l.audioCodec=c?c.codec:i[0].codec}l.id=s++,a.push(l)}}return a}},{key:"parseLevelPlaylist",value:function(e,t,n,r,i){var o=0,a=0,l=new u.default(t),c=new d.default,f=0,g=null,v=new s.default,y=void 0,m=void 0,b=null;_.lastIndex=0;while(null!==(y=_.exec(e))){var x=y[1];if(x){v.duration=parseFloat(x);var k=(" "+y[2]).slice(1);v.title=k||null,v.tagList.push(k?["INF",x,k]:["INF",x])}else if(y[3]){if(Number.isFinite(v.duration)){var E=o++;v.type=r,v.start=a,v.levelkey=c,v.sn=E,v.level=n,v.cc=f,v.urlId=i,v.baseurl=t,v.relurl=(" "+y[3]).slice(1),T(v,g),l.fragments.push(v),g=v,a+=v.duration,v=new s.default}}else if(y[4]){if(v.rawByteRange=(" "+y[4]).slice(1),g){var C=g.byteRangeEndOffset;C&&(v.lastByteRangeEndOffset=C)}}else if(y[5])v.rawProgramDateTime=(" "+y[5]).slice(1),v.tagList.push(["PROGRAM-DATE-TIME",v.rawProgramDateTime]),null===b&&(b=l.fragments.length);else{for(y=y[0].match(w),m=1;m=0&&(c.method=D,c.baseuri=t,c.reluri=j,c.key=null,c.iv=P));break;case"START":var R=A,N=new h.default(R),B=N.decimalFloatingPoint("TIME-OFFSET");Number.isFinite(B)&&(l.startTimeOffset=B);break;case"MAP":var F=new h.default(A);v.relurl=F.URI,v.rawByteRange=F.BYTERANGE,v.baseurl=t,v.level=n,v.type=r,v.sn="initSegment",l.initSegment=v,v=new s.default,v.rawProgramDateTime=l.initSegment.rawProgramDateTime;break;default:p.logger.warn("line parsed but not handled: "+y);break}}}return v=g,v&&!v.relurl&&(l.fragments.pop(),a-=v.duration),l.totalduration=a,l.averagetargetduration=a/l.fragments.length,l.endSN=o-1,l.startCC=l.fragments[0]?l.fragments[0].cc:0,l.endCC=f,!l.initSegment&&l.fragments.length&&l.fragments.every((function(e){return S.test(e.relurl)}))&&(p.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),v=new s.default,v.relurl=l.fragments[0].relurl,v.baseurl=t,v.level=n,v.type=r,v.sn="initSegment",l.initSegment=v,l.needSidxRanges=!0),b&&O(l.fragments,b),l}}]),e}();function O(e,t){for(var n=e[t],r=t-1;r>=0;r--){var i=e[r];i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}function T(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Number.isFinite(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}t.default=k,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nNumber.MAX_SAFE_INTEGER?1/0:t}},{key:"hexadecimalInteger",value:function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:t}},{key:"decimalFloatingPoint",value:function(e){return parseFloat(this[e])}},{key:"enumeratedString",value:function(e){return this[e]}},{key:"decimalResolution",value:function(e){var t=o.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}}],[{key:"parseAttrList",value:function(e){var t=void 0,n={};a.lastIndex=0;while(null!==(t=a.exec(e))){var r=t[2],i='"';0===r.indexOf(i)&&r.lastIndexOf(i)===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n}}]),e}();t.default=s,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:null,i=e.data,o=n.frag;o.loader=void 0,this.loaders[o.type]=void 0,this.hls.trigger(a.default.FRAG_LOADED,{payload:i,frag:o,stats:t,networkDetails:r})}},{key:"loaderror",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(a.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:n})}},{key:"loadtimeout",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(a.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:n})}},{key:"loadprogress",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=t.frag;i.loaded=e.loaded,this.hls.trigger(a.default.FRAG_LOAD_PROGRESS,{frag:i,stats:e,networkDetails:r})}}]),t}(l.default);t.default=g,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&-1===e&&(w.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=E.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=E.State.STOPPED}},{key:"stopLoad",value:function(){this.forceStartLoad=!1,i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stopLoad",this).call(this)}},{key:"doTick",value:function(){switch(this.state){case E.State.BUFFER_FLUSHING:this.fragLoadError=0;break;case E.State.IDLE:this._doTickIdle();break;case E.State.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=E.State.IDLE);break;case E.State.FRAG_LOADING_WAITING_RETRY:var t=window.performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(w.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=E.State.IDLE);break;case E.State.ERROR:case E.State.STOPPED:case E.State.FRAG_LOADING:case E.State.PARSING:case E.State.PARSED:case E.State.ENDED:break;default:break}this._checkBuffer(),this._checkFragmentChanged()}},{key:"_doTickIdle",value:function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&t.startFragPrefetch)){var r=void 0;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=e.nextLoadLevel,o=this.levels[i];if(o){var a=o.bitrate,l=void 0;l=a?Math.max(8*t.maxBufferSize/a,t.maxBufferLength):t.maxBufferLength,l=Math.min(l,t.maxMaxBufferLength);var u=s.BufferHelper.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,t.maxBufferHole),c=u.len;if(!(c>=l)){w.logger.trace("buffer length of "+c.toFixed(3)+" is below max of "+l.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=i;var f=o.details;if(!f||f.live&&this.levelLastLoaded!==i)this.state=E.State.WAITING_LEVEL;else{if(this._streamEnded(u,f)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(d.default.BUFFER_EOS,h),void(this.state=E.State.ENDED)}this._fetchPayloadOrEos(r,u,f)}}}}}},{key:"_fetchPayloadOrEos",value:function(e,t,n){var r=this.fragPrevious,i=this.level,o=n.fragments,a=o.length;if(0!==a){var s=o[0].start,l=o[a-1].start+o[a-1].duration,u=t.end,c=void 0;if(n.initSegment&&!n.initSegment.data)c=n.initSegment;else if(n.live){var d=this.config.initialLiveManifestSize;if(af&&(u.currentTime=f),this.nextLoadPosition=f}if(e.PTSKnown&&t>r&&u&&u.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(i)if(e.hasProgramDateTime)w.logger.log("live playlist, switching playlist, load frag with same PDT: "+i.programDateTime),c=(0,k.findFragmentByPDT)(o,i.endProgramDateTime,l.maxFragLookUpTolerance);else{var h=i.sn+1;if(h>=e.startSN&&h<=e.endSN){var p=o[h-e.startSN];i.cc===p.cc&&(c=p,w.logger.log("live playlist, switching playlist, load frag with next SN: "+c.sn))}c||(c=a.default.search(o,(function(e){return i.cc-e.cc})),c&&w.logger.log("live playlist, switching playlist, load frag with same CC: "+c.sn))}c||(c=o[Math.min(s-1,Math.round(s/2))],w.logger.log("live playlist, switching playlist, unknown, load middle frag : "+c.sn))}return c}},{key:"_findFragment",value:function(e,t,n,r,i,o,a){var s=this.hls.config,l=void 0;if(io-s.maxFragLookUpTolerance?0:s.maxFragLookUpTolerance;l=(0,k.findFragmentByPTS)(t,r,i,u)}else l=r[n-1];if(l){var c=l.sn-a.startSN,d=t&&l.level===t.level,f=r[c-1],h=r[c+1];if(t&&l.sn===t.sn)if(d&&!l.backtracked)if(l.sns.maxBufferHole&&t.dropped&&c?(l=f,w.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this")):(l=h,w.logger.log("SN just loaded, load next one: "+l.sn,l))}else l=null;else l.backtracked&&(h&&h.backtracked?(w.logger.warn("Already backtracked from fragment "+h.sn+", will not backtrack to fragment "+l.sn+". Loading fragment "+h.sn),l=h):(w.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),l.dropped=0,f?(l=f,l.backtracked=!0):c&&(l=null)))}return l}},{key:"_loadKey",value:function(e){this.state=E.State.KEY_LOADING,this.hls.trigger(d.default.KEY_LOADING,{frag:e})}},{key:"_loadFragment",value:function(e){var t=this.fragmentTracker.getState(e);this.fragCurrent=e,this.startFragRequested=!0,Number.isFinite(e.sn)&&!e.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),e.backtracked||t===f.FragmentState.NOT_LOADED||t===f.FragmentState.PARTIAL?(e.autoLevel=this.hls.autoLevelEnabled,e.bitrateTest=this.bitrateTest,this.hls.trigger(d.default.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new u.default(this.hls,"main")),this.state=E.State.FRAG_LOADING):t===f.FragmentState.APPENDING&&this._reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e)}},{key:"getBufferedFrag",value:function(e){return this.fragmentTracker.getBufferedFrag(e,v.default.LevelType.MAIN)}},{key:"followingBufferedFrag",value:function(e){return e?this.getBufferedFrag(e.endPTS+.5):null}},{key:"_checkFragmentChanged",value:function(){var e=void 0,t=void 0,n=this.media;if(n&&n.readyState&&!1===n.seeking&&(t=n.currentTime,t>this.lastCurrentTime&&(this.lastCurrentTime=t),s.BufferHelper.isBuffered(n,t)?e=this.getBufferedFrag(t):s.BufferHelper.isBuffered(n,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var r=e;if(r!==this.fragPlaying){this.hls.trigger(d.default.FRAG_CHANGED,{frag:r});var i=r.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(d.default.LEVEL_SWITCHED,{level:i}),this.fragPlaying=r}}}},{key:"immediateLevelSwitch",value:function(){if(w.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e=this.media,t=void 0;e?(t=e.paused,e.pause()):t=!0,this.previouslyPaused=t}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}},{key:"immediateLevelSwitchEnd",value:function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,s.BufferHelper.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())}},{key:"nextLevelSwitch",value:function(){var e=this.media;if(e&&e.readyState){var t=void 0,n=void 0,r=void 0;if(n=this.getBufferedFrag(e.currentTime),n&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),e.paused)t=0;else{var i=this.hls.nextLoadLevel,o=this.levels[i],a=this.fragLastKbps;t=a&&this.fragCurrent?this.fragCurrent.duration*o.bitrate/(1e3*a)+1:0}if(r=this.getBufferedFrag(e.currentTime+t),r&&(r=this.followingBufferedFrag(r),r)){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(r.maxStartPTS,Number.POSITIVE_INFINITY)}}}},{key:"flushMainBuffer",value:function(e,t){this.state=E.State.BUFFER_FLUSHING;var n={startOffset:e,endOffset:t};this.altAudio&&(n.type="video"),this.hls.trigger(d.default.BUFFER_FLUSHING,n)}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition),this.gapController=new T.default(n,t,this.fragmentTracker,this.hls)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(w.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach((function(e){e.details&&e.details.fragments.forEach((function(e){e.backtracked=void 0}))})),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeked",value:function(){var e=this.media,t=e?e.currentTime:void 0;Number.isFinite(t)&&w.logger.log("media seeked to "+t.toFixed(3)),this.tick()}},{key:"onManifestLoading",value:function(){w.logger.log("trigger BUFFER_RESET"),this.hls.trigger(d.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0}},{key:"onManifestParsed",value:function(e){var t=!1,n=!1,r=void 0;e.levels.forEach((function(e){r=e.audioCodec,r&&(-1!==r.indexOf("mp4a.40.2")&&(t=!0),-1!==r.indexOf("mp4a.40.5")&&(n=!0))})),this.audioCodecSwitch=t&&n,this.audioCodecSwitch&&w.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)}},{key:"onLevelLoaded",value:function(e){var t=e.details,n=e.level,r=this.levels[this.levelLastLoaded],i=this.levels[n],o=t.totalduration,a=0;if(w.logger.log("level "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+o),t.live){var s=i.details;s&&t.fragments.length>0?(m.mergeDetails(s,t),a=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(a,s),t.PTSKnown&&Number.isFinite(a)?w.logger.log("live playlist sliding:"+a.toFixed(3)):(w.logger.log("live playlist - outdated PTS, unknown sliding"),(0,S.alignStream)(this.fragPrevious,r,t))):(w.logger.log("live playlist - first load, unknown sliding"),t.PTSKnown=!1,(0,S.alignStream)(this.fragPrevious,r,t))}else t.PTSKnown=!1;if(i.details=t,this.levelLastLoaded=n,this.hls.trigger(d.default.LEVEL_UPDATED,{details:t,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var l=t.startTimeOffset;Number.isFinite(l)?(l<0&&(w.logger.log("negative start time offset "+l+", count from end of last fragment"),l=a+o+l),w.logger.log("start time offset found in playlist, adjust startPosition to "+l),this.startPosition=l):t.live?(this.startPosition=this.computeLivePosition(a,t),w.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===E.State.WAITING_LEVEL&&(this.state=E.State.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===E.State.KEY_LOADING&&(this.state=E.State.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent,n=this.hls,r=this.levels,i=this.media,o=e.frag;if(this.state===E.State.FRAG_LOADING&&t&&"main"===o.type&&o.level===t.level&&o.sn===t.sn){var a=e.stats,s=r[t.level],l=s.details;if(this.bitrateTest=!1,this.stats=a,w.logger.log("Loaded "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level),o.bitrateTest&&n.nextLoadLevel)this.state=E.State.IDLE,this.startFragRequested=!1,a.tparsed=a.tbuffered=window.performance.now(),n.trigger(d.default.FRAG_BUFFERED,{stats:a,frag:t,id:"main"}),this.tick();else if("initSegment"===o.sn)this.state=E.State.IDLE,a.tparsed=a.tbuffered=window.performance.now(),l.initSegment.data=e.payload,n.trigger(d.default.FRAG_BUFFERED,{stats:a,frag:t,id:"main"}),this.tick();else{w.logger.log("Parsing "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level+", cc "+t.cc),this.state=E.State.PARSING,this.pendingBuffering=!0,this.appended=!1,o.bitrateTest&&(o.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:o}));var c=!(i&&i.seeking)&&(l.PTSKnown||!l.live),f=l.initSegment?l.initSegment.data:[],h=this._getAudioCodec(s),p=this.demuxer=this.demuxer||new u.default(this.hls,"main");p.push(e.payload,f,h,s.videoCodec,t,l.totalduration,c)}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent,n=e.frag;if(t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===E.State.PARSING){var r=e.tracks,i=void 0,o=void 0;if(r.audio&&this.altAudio&&delete r.audio,o=r.audio,o){var a=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();a&&this.audioCodecSwap&&(w.logger.log("swapping playlist audio codec"),a=-1!==a.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==o.metadata.channelCount&&-1===s.indexOf("firefox")&&(a="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==o.container&&(a="mp4a.40.2",w.logger.log("Android: force audio codec to "+a)),o.levelCodec=a,o.id=e.id}for(i in o=r.video,o&&(o.levelCodec=this.levels[this.level].videoCodec,o.id=e.id),this.hls.trigger(d.default.BUFFER_CODECS,r),r){o=r[i],w.logger.log("main track:"+i+",container:"+o.container+",codecs[level/parsed]=["+o.levelCodec+"/"+o.codec+"]");var l=o.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(d.default.BUFFER_APPENDING,{type:i,data:l,parent:"main",content:"initSegment"}))}this.tick()}}},{key:"onFragParsingData",value:function(e){var t=this,n=this.fragCurrent,r=e.frag;if(n&&"main"===e.id&&r.sn===n.sn&&r.level===n.level&&("audio"!==e.type||!this.altAudio)&&this.state===E.State.PARSING){var i=this.levels[this.level],o=n;if(Number.isFinite(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),!0===e.hasAudio&&o.addElementaryStream(p.default.ElementaryStreamTypes.AUDIO),!0===e.hasVideo&&o.addElementaryStream(p.default.ElementaryStreamTypes.VIDEO),w.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0)),"video"===e.type)if(o.dropped=e.dropped,o.dropped)if(o.backtracked)w.logger.warn("Already backtracked on this fragment, appending with the gap",o.sn);else{var a=i.details;if(!a||o.sn!==a.startSN)return w.logger.warn("missing video frame(s), backtracking fragment",o.sn),this.fragmentTracker.removeFragment(o),o.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=E.State.IDLE,this.fragPrevious=o,void this.tick();w.logger.warn("missing video frame(s) on first frag, appending with gap",o.sn)}else o.backtracked=!1;var s=m.updateFragPTSDTS(i.details,o,e.startPTS,e.endPTS,e.startDTS,e.endDTS),l=this.hls;l.trigger(d.default.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:s,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach((function(n){n&&n.length&&t.state===E.State.PARSING&&(t.appended=!0,t.pendingBuffering=!0,l.trigger(d.default.BUFFER_APPENDING,{type:e.type,data:n,parent:"main",content:"data"}))})),this.tick()}}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent,n=e.frag;t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===E.State.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=E.State.PARSED,this._checkAppendedParsed())}},{key:"onAudioTrackSwitching",value:function(e){var t=!!e.url,n=e.id;if(!t){if(this.mediaBuffer!==this.media){w.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(w.logger.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=E.State.IDLE}var i=this.hls;i.trigger(d.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),i.trigger(d.default.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}}},{key:"onAudioTrackSwitched",value:function(e){var t=e.id,n=!!this.hls.audioTracks[t].url;if(n){var r=this.videoBuffer;r&&this.mediaBuffer!==r&&(w.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n,this.tick()}},{key:"onBufferCreated",value:function(e){var t=e.tracks,n=void 0,r=void 0,i=!1;for(var o in t){var a=t[o];"main"===a.id?(r=o,n=a,"video"===o&&(this.videoBuffer=t[o].buffer)):i=!0}i&&n?(w.logger.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}},{key:"onBufferAppended",value:function(e){if("main"===e.parent){var t=this.state;t!==E.State.PARSING&&t!==E.State.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}}},{key:"_checkAppendedParsed",value:function(){if(this.state===E.State.PARSED&&(!this.appended||!this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;w.logger.log("main buffered : "+x.default.toString(t.buffered)),this.fragPrevious=e;var n=this.stats;n.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*n.total/(n.tbuffered-n.tfirst)),this.hls.trigger(d.default.FRAG_BUFFERED,{stats:n,frag:e,id:"main"}),this.state=E.State.IDLE}this.tick()}}},{key:"onError",value:function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var n=!!this.media&&s.BufferHelper.isBuffered(this.media,this.media.currentTime)&&s.BufferHelper.isBuffered(this.media,this.media.currentTime+.5);switch(e.details){case _.ErrorDetails.FRAG_LOAD_ERROR:case _.ErrorDetails.FRAG_LOAD_TIMEOUT:case _.ErrorDetails.KEY_LOAD_ERROR:case _.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var r=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);w.logger.warn("mediaController: frag loading failed, retry in "+r+" ms"),this.retryDate=window.performance.now()+r,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=E.State.FRAG_LOADING_WAITING_RETRY}else w.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=E.State.ERROR;break;case _.ErrorDetails.LEVEL_LOAD_ERROR:case _.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==E.State.ERROR&&(e.fatal?(this.state=E.State.ERROR,w.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):e.levelRetry||this.state!==E.State.WAITING_LEVEL||(this.state=E.State.IDLE));break;case _.ErrorDetails.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==E.State.PARSING&&this.state!==E.State.PARSED||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=E.State.IDLE):(w.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)));break;default:break}}}},{key:"_reduceMaxBufferLength",value:function(e){var t=this.config;return t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,w.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)}},{key:"_checkBuffer",value:function(){var e=this.media;if(e&&0!==e.readyState){var t=this.mediaBuffer?this.mediaBuffer:e,n=t.buffered;!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,n)}}},{key:"onFragLoadEmergencyAborted",value:function(){this.state=E.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()}},{key:"onBufferFlushed",value:function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;e&&this.fragmentTracker.detectEvictedFragments(p.default.ElementaryStreamTypes.VIDEO,e.buffered),this.state=E.State.IDLE,this.fragPrevious=null}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"computeLivePosition",value:function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)}},{key:"_seekToStartPos",value:function(){var e=this.media,t=e.currentTime,n=e.seeking?t:this.startPosition;t!==n&&(w.logger.log("target start position not buffered, seek to buffered.start(0) "+n+" from current time "+t+" "),e.currentTime=n)}},{key:"_getAudioCodec",value:function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(w.logger.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t}},{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,w.logger.log("main stream:"+t+"->"+e),this.hls.trigger(d.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}]),t}(C.default);t.default=P,e.exports=t["default"]},function(e,t,n){function r(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var r=n(n.s=ENTRY_MODULE);return r.default||r}var i="[\\.|\\-|\\+|\\w|/|@]+",o="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+i+").*?\\)";function a(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function s(e){return!isNaN(1*e)}function l(e,t,r){var l={};l[r]=[];var u=t.toString(),c=u.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!c)return l;var d,f=c[1],h=new RegExp("(\\\\n|\\W)"+a(f)+o,"g");while(d=h.exec(u))"dll-reference"!==d[3]&&l[r].push(d[3]);h=new RegExp("\\("+a(f)+'\\("(dll-reference\\s('+i+'))"\\)\\)'+o,"g");while(d=h.exec(u))e[d[2]]||(l[r].push(d[1]),e[d[2]]=n(d[1]).m),l[d[2]]=l[d[2]]||[],l[d[2]].push(d[4]);for(var p=Object.keys(l),g=0;g0}),!1)}function c(e,t){var n={main:[t]},r={main:[]},i={main:{}};while(u(n))for(var o=Object.keys(n),a=0;a>>8^255&v^99,e[h]=v,t[v]=h;var y=f[h],m=f[y],b=f[m],x=257*f[v]^16843008*v;r[h]=x<<24|x>>>8,i[h]=x<<16|x>>>16,o[h]=x<<8|x>>>24,a[h]=x,x=16843009*b^65537*m^257*y^16843008*h,l[v]=x<<24|x>>>8,u[v]=x<<16|x>>>16,c[v]=x<<8|x>>>24,d[v]=x,h?(h=y^f[f[f[b^y]]],p^=f[f[p]]):h=p=1}}},{key:"expandKey",value:function(e){var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;while(r>8|e>>>24}},{key:"decrypt",value:function(e,t,n,r){var i=this.keySize+6,a=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,u=l[0],c=l[1],d=l[2],f=l[3],h=this.uint8ArrayToUint32Array_(n),p=h[0],g=h[1],v=h[2],y=h[3],m=new Int32Array(e),b=new Int32Array(m.length),x=void 0,_=void 0,w=void 0,S=void 0,k=void 0,O=void 0,T=void 0,E=void 0,C=void 0,A=void 0,M=void 0,L=void 0,I=void 0,D=void 0,j=this.networkToHostOrderSwap;while(t>>24]^c[O>>16&255]^d[T>>8&255]^f[255&E]^a[I],_=u[O>>>24]^c[T>>16&255]^d[E>>8&255]^f[255&k]^a[I+1],w=u[T>>>24]^c[E>>16&255]^d[k>>8&255]^f[255&O]^a[I+2],S=u[E>>>24]^c[k>>16&255]^d[O>>8&255]^f[255&T]^a[I+3],k=x,O=_,T=w,E=S,I+=4;x=s[k>>>24]<<24^s[O>>16&255]<<16^s[T>>8&255]<<8^s[255&E]^a[I],_=s[O>>>24]<<24^s[T>>16&255]<<16^s[E>>8&255]<<8^s[255&k]^a[I+1],w=s[T>>>24]<<24^s[E>>16&255]<<16^s[k>>8&255]<<8^s[255&O]^a[I+2],S=s[E>>>24]<<24^s[k>>16&255]<<16^s[O>>8&255]<<8^s[255&T]^a[I+3],I+=3,b[t]=j(x^p),b[t+1]=j(S^g),b[t+2]=j(w^v),b[t+3]=j(_^y),p=C,g=A,v=M,y=L,t+=4}return r?o(b.buffer):b.buffer}},{key:"destroy",value:function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>4,c>1){if(d=o+5+t[o+4],d===o+188)continue}else d=o+4;switch(l){case x:s&&(k&&(f=A(k))&&void 0!==f.pts&&M(f,!1),k={data:[],size:0}),k&&(k.data.push(t.subarray(d,o+188)),k.size+=o+188-d);break;case _:s&&(O&&(f=A(O))&&void 0!==f.pts&&(m.isAAC?L(f):I(f)),O={data:[],size:0}),O&&(O.data.push(t.subarray(d,o+188)),O.size+=o+188-d);break;case w:s&&(T&&(f=A(T))&&void 0!==f.pts&&D(f),T={data:[],size:0}),T&&(T.data.push(t.subarray(d,o+188)),T.size+=o+188-d);break;case 0:s&&(d+=t[d]+1),S=this._pmtId=E(t,d);break;case S:s&&(d+=t[d]+1);var P=C(t,d,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);x=P.avc,x>0&&(y.pid=x),_=P.audio,_>0&&(m.pid=_,m.isAAC=P.isAAC),w=P.id3,w>0&&(b.pid=w),h&&!v&&(p.logger.log("reparse from beginning"),h=!1,o=j-188),v=this.pmtParsed=!0;break;case 17:case 8191:break;default:h=!0;break}}else this.observer.trigger(u.default.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});k&&(f=A(k))&&void 0!==f.pts?(M(f,!0),y.pesData=null):y.pesData=k,O&&(f=A(O))&&void 0!==f.pts?(m.isAAC?L(f):I(f),m.pesData=null):(O&&O.size&&p.logger.log("last AAC PES packet truncated,might overlap between fragments"),m.pesData=O),T&&(f=A(T))&&void 0!==f.pts?(D(f),b.pesData=null):b.pesData=T,null==this.sampleAes?this.remuxer.remux(m,y,b,this._txtTrack,n,r,i):this.decryptAndRemux(m,y,b,this._txtTrack,n,r,i)}},{key:"decryptAndRemux",value:function(e,t,n,r,i,o,a){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){s.decryptAndRemuxAvc(e,t,n,r,i,o,a)}))}else this.decryptAndRemuxAvc(e,t,n,r,i,o,a)}},{key:"decryptAndRemuxAvc",value:function(e,t,n,r,i,o,a){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){s.remuxer.remux(e,t,n,r,i,o,a)}))}else this.remuxer.remux(e,t,n,r,i,o,a)}},{key:"destroy",value:function(){this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(e,t){return(31&e[t+10])<<8|e[t+11]}},{key:"_parsePMT",value:function(e,t,n,r){var i=void 0,o=void 0,a=void 0,s=void 0,l={audio:-1,avc:-1,id3:-1,isAAC:!0};i=(15&e[t+1])<<8|e[t+2],o=t+3+i-4,a=(15&e[t+10])<<8|e[t+11],t+=12+a;while(t1){var f=new Uint8Array(d[0].length+d[1].length);f.set(d[0]),f.set(d[1],d[0].length),d[0]=f,d.splice(1,1)}if(n=d[0],i=(n[0]<<16)+(n[1]<<8)+n[2],1===i){if(o=(n[4]<<8)+n[5],o&&o>e.size-6)return null;r=n[7],192&r&&(l=536870912*(14&n[9])+4194304*(255&n[10])+16384*(254&n[11])+128*(255&n[12])+(254&n[13])/2,l>4294967295&&(l-=8589934592),64&r?(u=536870912*(14&n[14])+4194304*(255&n[15])+16384*(254&n[16])+128*(255&n[17])+(254&n[18])/2,u>4294967295&&(u-=8589934592),l-u>54e5&&(p.logger.warn(Math.round((l-u)/9e4)+"s delta between PTS and DTS, align them"),l=u)):u=l),a=n[8],c=a+9,e.size-=c,s=new Uint8Array(e.size);for(var h=0,g=d.length;hv){c-=v;continue}n=n.subarray(c),v-=c,c=0}s.set(n,t),t+=v}return o&&(o-=a+3),{data:s,pts:l,dts:u,len:o}}return null}},{key:"pushAccesUnit",value:function(e,t){if(e.units.length&&e.frame){var n=t.samples,r=n.length;!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(r||this.contiguous)?(e.id=r,n.push(e)):t.dropped++}e.debug.length&&p.logger.log(e.pts+"/"+e.dts+":"+e.debug)}},{key:"_parseAVCPES",value:function(e,t){var n=this,r=this._avcTrack,i=this._parseAVCNALu(e.data),o=!1,a=void 0,s=this.avcSample,l=void 0,u=!1,c=void 0,f=this.pushAccesUnit.bind(this),h=function(e,t,n,r){return{key:e,pts:t,dts:n,units:[],debug:r}};e.data=null,s&&i.length&&!r.audFound&&(f(s,r),s=this.avcSample=h(!1,e.pts,e.dts,"")),i.forEach((function(t){switch(t.type){case 1:l=!0,s||(s=n.avcSample=h(!0,e.pts,e.dts,"")),o&&(s.debug+="NDR "),s.frame=!0;var i=t.data;if(u&&i.length>4){var p=new d.default(i).readSliceType();2!==p&&4!==p&&7!==p&&9!==p||(s.key=!0)}break;case 5:l=!0,s||(s=n.avcSample=h(!0,e.pts,e.dts,"")),o&&(s.debug+="IDR "),s.key=!0,s.frame=!0;break;case 6:l=!0,o&&s&&(s.debug+="SEI "),a=new d.default(n.discardEPB(t.data)),a.readUByte();var g=0,v=0,y=!1,m=0;while(!y&&a.bytesAvailable>1){g=0;do{m=a.readUByte(),g+=m}while(255===m);v=0;do{m=a.readUByte(),v+=m}while(255===m);if(4===g&&0!==a.bytesAvailable){y=!0;var b=a.readUByte();if(181===b){var x=a.readUShort();if(49===x){var _=a.readUInt();if(1195456820===_){var w=a.readUByte();if(3===w){var S=a.readUByte(),k=a.readUByte(),O=31&S,T=[S,k];for(c=0;c0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.pts=0)u={data:e.subarray(d,t-a-1),type:f},l.push(u);else{var h=this._getLastNalUnit();if(h&&(s&&t<=4-s&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-s)),i=t-a-1,i>0)){var p=new Uint8Array(h.data.byteLength+i);p.set(h.data,0),p.set(e.subarray(0,i),h.data.byteLength),h.data=p}}t=0&&a>=0&&(u={data:e.subarray(d,n),type:f,state:a},l.push(u)),0===l.length){var g=this._getLastNalUnit();if(g){var v=new Uint8Array(g.data.byteLength+e.byteLength);v.set(g.data,0),v.set(e,g.data.byteLength),g.data=v}}return o.naluState=a,l}},{key:"discardEPB",value:function(e){var t=e.byteLength,n=[],r=1,i=void 0,o=void 0;while(r1&&(p.logger.log("AAC: align PTS for overlapping frames by "+Math.round((b-r)/90)),r=b)}while(de?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&i.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),t=e-t,t>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t=8,n=8,r=void 0,i=void 0;for(r=0;r=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}}},{key:"getAvcEncryptedData",value:function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n}},{key:"getAvcDecryptedUnit",value:function(e,t){t=new Uint8Array(t);for(var n=0,r=32;r<=e.length-16;r+=160,n+=16)e.set(t.subarray(n,n+16),r);return e}},{key:"decryptAvcSample",value:function(e,t,n,r,i,o){var a=this.discardEPB(i.data),s=this.getAvcEncryptedData(a),l=this;this.decryptBuffer(s.buffer,(function(s){i.data=l.getAvcDecryptedUnit(a,s),o||l.decryptAvcSamples(e,t,n+1,r)}))}},{key:"decryptAvcSamples",value:function(e,t,n,r){for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;;n++){if(n>=i.length)break;var o=i[n];if(!(o.length<=48||1!==o.type&&5!==o.type)){var a=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,o,a),!a)return}}}}}]),e}();t.default=l,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n-1&&o&&!o.match("CriOS"),this.ISGenerated=!1}return r(e,[{key:"destroy",value:function(){}},{key:"resetTimeStamp",value:function(e){this._initPTS=this._initDTS=e}},{key:"resetInitSegment",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(e,t,n,r,i,o,a){if(this.ISGenerated||this.generateIS(e,t,i),this.ISGenerated){var s=e.samples.length,l=t.samples.length,c=i,f=i;if(s&&l){var h=(e.samples[0].pts-t.samples[0].pts)/t.inputTimeScale;c+=Math.max(0,h),f+=Math.max(0,-h)}if(s){e.timescale||(d.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,i));var p=this.remuxAudio(e,c,o,a);if(l){var g=void 0;p&&(g=p.endPTS-p.startPTS),t.timescale||(d.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,i)),this.remuxVideo(t,f,o,g,a)}}else if(l){var v=this.remuxVideo(t,f,o,0,a);v&&e.codec&&this.remuxEmptyAudio(e,c,o,v)}}n.samples.length&&this.remuxID3(n,i),r.samples.length&&this.remuxText(r,i),this.observer.trigger(u.default.FRAG_PARSED)}},{key:"generateIS",value:function(e,t,n){var r=this.observer,i=e.samples,o=t.samples,a=this.typeSupported,l="audio/mp4",f={},h={tracks:f},p=void 0===this._initPTS,g=void 0,v=void 0;if(p&&(g=v=1/0),e.config&&i.length&&(e.timescale=e.samplerate,d.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(a.mpeg?(l="audio/mpeg",e.codec=""):a.mp3&&(e.codec="mp3")),f.audio={container:l,codec:e.codec,initSegment:!e.isAAC&&a.mpeg?new Uint8Array:s.default.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(g=v=i[0].pts-e.inputTimeScale*n)),t.sps&&t.pps&&o.length){var y=t.inputTimeScale;t.timescale=y,f.video={container:"video/mp4",codec:t.codec,initSegment:s.default.initSegment([t]),metadata:{width:t.width,height:t.height}},p&&(g=Math.min(g,o[0].pts-y*n),v=Math.min(v,o[0].dts-y*n),this.observer.trigger(u.default.INIT_PTS_FOUND,{initPTS:g}))}Object.keys(f).length?(r.trigger(u.default.FRAG_PARSING_INIT_SEGMENT,h),this.ISGenerated=!0,p&&(this._initPTS=g,this._initDTS=v)):r.trigger(u.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})}},{key:"remuxVideo",value:function(e,t,n,r,i){var o=8,a=void 0,l=void 0,f=void 0,h=void 0,p=void 0,g=void 0,v=void 0,y=e.timescale,m=e.samples,b=[],x=m.length,_=this._PTSNormalize,w=this._initPTS,S=this.nextAvcDts,k=this.isSafari;if(0!==x){k&&(n|=m.length&&S&&(i&&Math.abs(t-S/y)<.1||Math.abs(m[0].pts-S-w)1?d.logger.log("AVC:"+C+" ms hole between fragments detected,filling it"):C<-1&&d.logger.log("AVC:"+-C+" ms overlapping between fragments detected"),p=S,m[0].dts=p,h=Math.max(h-C,S),m[0].pts=h,d.logger.log("Video/PTS/DTS adjusted: "+Math.round(h/90)+"/"+Math.round(p/90)+",delta:"+C+" ms")),E=m[m.length-1],v=Math.max(E.dts,0),g=Math.max(E.pts,0,v),k&&(a=Math.round((v-p)/(m.length-1)));for(var A=0,M=0,L=0;L0?F-1:F].dts;if(X.stretchShortVideoTrack){var $=X.maxBufferHole,J=Math.floor($*y),Q=(r?h+r*y:this.nextAudioPts)-z.pts;Q>J?(a=Q-Z,a<0&&(a=Z),d.logger.log("It is approximately "+Q/90+" ms to the next segment; using duration "+a/90+" ms for the last video frame.")):a=Z}else a=Z}V=Math.round(z.pts-z.dts)}b.push({size:H,duration:a,cts:V,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:z.key?2:1,isNonSync:z.key?0:1}})}this.nextAvcDts=v+a;var ee=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var te=b[0].flags;te.dependsOn=2,te.isNonSync=0}e.samples=b,f=s.default.moof(e.sequenceNumber++,p,e),e.samples=[];var ne={data1:f,data2:l,startPTS:h/y,endPTS:(g+a)/y,startDTS:p/y,endDTS:this.nextAvcDts/y,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:ee};return this.observer.trigger(u.default.FRAG_PARSING_DATA,ne),ne}}},{key:"remuxAudio",value:function(e,t,n,r){var i=e.inputTimeScale,a=e.timescale,l=i/a,f=e.isAAC?1024:1152,h=f*l,g=this._PTSNormalize,v=this._initPTS,y=!e.isAAC&&this.typeSupported.mpeg,m=void 0,b=void 0,x=void 0,_=void 0,w=void 0,S=void 0,k=void 0,O=e.samples,T=[],E=this.nextAudioPts;if(n|=O.length&&E&&(r&&Math.abs(t-E/i)<.1||Math.abs(O[0].pts-E-v)<20*h),O.forEach((function(e){e.pts=e.dts=g(e.pts-v,t*i)})),O=O.filter((function(e){return e.pts>=0})),0!==O.length){if(n||(E=r?t*i:O[0].pts),e.isAAC)for(var C=this.config.maxAudioFramesDrift,A=0,M=E;A=C*h&&j0&&V0&&(x=o.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),x||(x=U.subarray()),e.len+=G*x.length);else if(V<-12){d.logger.log("drop overlapping AAC sample, expected/parsed/delta:"+(E/i).toFixed(3)+"s/"+(H/i).toFixed(3)+"s/"+-V+"ms"),e.len-=U.byteLength;continue}H=E}if(S=H,!(e.len>0))return;var q=y?e.len:e.len+8;m=y?0:8;try{_=new Uint8Array(q)}catch(ee){return void this.observer.trigger(u.default.ERROR,{type:c.ErrorTypes.MUX_ERROR,details:c.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:q,reason:"fail allocating audio mdat "+q})}if(!y){var W=new DataView(_.buffer);W.setUint32(0,q),_.set(s.default.types.mdat,4)}for(var Y=0;Y=2&&(X=T[Z-2].duration,b.duration=X),Z){this.nextAudioPts=E=k+l*X,e.len=0,e.samples=T,w=y?new Uint8Array:s.default.moof(e.sequenceNumber++,S/l,e),e.samples=[];var $=S/i,J=E/i,Q={data1:w,data2:_,startPTS:$,endPTS:J,startDTS:$,endDTS:J,type:"audio",hasAudio:!0,hasVideo:!1,nb:Z};return this.observer.trigger(u.default.FRAG_PARSING_DATA,Q),Q}return null}}},{key:"remuxEmptyAudio",value:function(e,t,n,r){var i=e.inputTimeScale,a=e.samplerate?e.samplerate:i,s=i/a,l=this.nextAudioPts,u=(void 0!==l?l:r.startDTS*i)+this._initDTS,c=r.endDTS*i+this._initDTS,f=1024,h=s*f,p=Math.ceil((c-u)/h),g=o.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(d.logger.warn("remux empty Audio"),g){for(var v=[],y=0;y4294967296)e+=n;return e}}]),e}();t.default=g,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>24&255,o[1]=n>>16&255,o[2]=n>>8&255,o[3]=255&n,o.set(e,4),r=0,n=8;r>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"minf",value:function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))}},{key:"moof",value:function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))}},{key:"moov",value:function(t){var n=t.length,r=[];while(n--)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))}},{key:"mvex",value:function(t){var n=t.length,r=[];while(n--)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))}},{key:"mvhd",value:function(t,n){n*=t;var r=Math.floor(n/(o+1)),i=Math.floor(n%(o+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,a)}},{key:"sdtp",value:function(t){var n=t.samples||[],r=new Uint8Array(4+n.length),i=void 0,o=void 0;for(o=0;o>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(o));for(i=0;i>>8&255),r.push(255&a),r=r.concat(Array.prototype.slice.call(o));var s=e.box(e.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|t.sps.length].concat(n).concat([t.pps.length]).concat(r))),l=t.width,u=t.height,c=t.pixelRatio[0],d=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))}},{key:"esds",value:function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}},{key:"mp4a",value:function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))}},{key:"mp3",value:function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))}},{key:"stsd",value:function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))}},{key:"tkhd",value:function(t){var n=t.id,r=t.duration*t.timescale,i=t.width,a=t.height,s=Math.floor(r/(o+1)),l=Math.floor(r%(o+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,a>>8&255,255&a,0,0]))}},{key:"traf",value:function(t,n){var r=e.sdtp(t),i=t.id,a=Math.floor(n/(o+1)),s=Math.floor(n%(o+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,r.length+16+20+8+16+8+8),r)}},{key:"trak",value:function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"trex",value:function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(t,n){var r=t.samples||[],i=r.length,o=12+16*i,a=new Uint8Array(o),s=void 0,l=void 0,u=void 0,c=void 0,d=void 0,f=void 0;for(n+=8+o,a.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),s=0;s>>24&255,u>>>16&255,u>>>8&255,255&u,c>>>24&255,c>>>16&255,c>>>8&255,255&c,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,61440&d.degradPrio,15&d.degradPrio,f>>>24&255,f>>>16&255,f>>>8&255,255&f],12+16*s);return e.box(e.types.trun,a)}},{key:"initSegment",value:function(t){e.types||e.init();var n=e.moov(t),r=void 0;return r=new Uint8Array(e.FTYP.byteLength+n.byteLength),r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r}}]),e}();t.default=a,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1?n-1:0),i=1;i1?n-1:0),i=1;i2)&&(!r.seeking||!i.BufferHelper.isBuffered(r,o))){var s=a-this.stalled,u=i.BufferHelper.bufferInfo(r,o,n.maxBufferHole);this.stalled?(s>=d&&this._reportStall(u.len),this._tryFixBufferStall(u,s)):this.stalled=a}}},{key:"_tryFixBufferStall",value:function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media,o=i.currentTime,a=r.getPartialFragment(o);a&&this._trySkipBufferHole(a),e.len>f&&t>1e3*n.highBufferWatchdogPeriod&&(this.stalled=null,this._tryNudgeBuffer())}},{key:"_reportStall",value:function(e){var t=this.hls,n=this.media,r=this.stallReported;r||(this.stallReported=!0,l.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer"),t.trigger(s.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))}},{key:"_trySkipBufferHole",value:function(e){for(var t=this.hls,n=this.media,r=n.currentTime,i=0,a=0;a=i&&r0){r=t[0].bitrate,t.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=t;for(var h=0;h=0&&e1&&s.loadError0){var t=this.currentLevelIndex,n=e.urlId,i=e.url[n];u.logger.log("Attempt loading level index "+t+" with URL-id "+n),this.hls.trigger(a.default.LEVEL_LOADING,{url:i,level:t,id:n})}}}},{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;t&&(e=Math.min(e,t.length-1),this.currentLevelIndex===e&&t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}]),t}(l.default);t.default=b,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n500*n.duration/u){var d=e.levels,f=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/s),h=d[n.level],p=h.realBitrate?Math.max(h.realBitrate,h.bitrate):h.bitrate,g=a.total?a.total:Math.max(a.loaded,Math.round(n.duration*p/8)),v=t.currentTime,y=(g-a.loaded)/f,b=(l.BufferHelper.bufferInfo(t,v,e.config.maxBufferHole).end-v)/u;if(b<2*n.duration/u&&y>b){var x=void 0,_=void 0;for(_=n.level-1;_>i;_--){var w=d[_].realBitrate?Math.max(d[_].realBitrate,d[_].bitrate):d[_].bitrate;if(x=n.duration*w/(6.4*f),x=r;u--){var d=l[u];if(d){var f=d.details,h=f?f.totalduration/f.fragments.length:t,p=!!f&&f.live,g=void 0;g=u<=e?a*n:s*n;var v=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,y=v*h/g;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(g)+"/"+v+"/"+h+"/"+o+"/"+y),g>v&&(!y||p&&!this.bitrateTestDelay||y=0)return p;c.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var g=s?Math.min(s,r.maxStarvationDelay):r.maxStarvationDelay,v=r.abrBandWidthFactor,y=r.abrBandWidthUpFactor;if(0===h){var m=this.bitrateTestDelay;if(m){var b=s?Math.min(s,r.maxLoadingDelay):r.maxLoadingDelay;g=b-m,c.logger.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),v=y=1}}return p=this._findBestLevel(a,s,f,i,t,h+g,v,y,n),Math.max(p,0)}}]),t}(s.default);t.default=b,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=this.minWeight_}},{key:"getEstimate",value:function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}},{key:"destroy",value:function(){}}]),e}();t.default=l,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n.1){var o=r.updating;try{r.abort()}catch(a){l.logger.warn("can not abort audio buffer: "+a)}o?this.audioTimestampOffset=e.start:(l.logger.warn("change mpeg audio timestamp offset from "+r.timestampOffset+" to "+e.start),r.timestampOffset=e.start)}}}},{key:"onManifestParsed",value:function(e){this.bufferCodecEventsExpected=e.altAudio?2:1,l.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")}},{key:"onMediaAttaching",value:function(e){var t=this.media=e.media;if(t){var n=this.mediaSource=new g;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),n.addEventListener("sourceopen",this.onmso),n.addEventListener("sourceended",this.onmse),n.addEventListener("sourceclose",this.onmsc),t.src=window.URL.createObjectURL(n),this._objectUrl=t.src}}},{key:"onMediaDetaching",value:function(){l.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(t){l.logger.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),e.removeEventListener("sourceclose",this.onmsc),this.media&&(window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):l.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(o.default.MEDIA_DETACHED)}},{key:"onMediaSourceOpen",value:function(){l.logger.log("media source opened"),this.hls.trigger(o.default.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()}},{key:"checkPendingTracks",value:function(){var e=this.bufferCodecEventsExpected,t=this.pendingTracks,n=Object.keys(t).length;(n&&!e||2===n)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())}},{key:"onMediaSourceClose",value:function(){l.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){l.logger.log("media source ended")}},{key:"onSBUpdateEnd",value:function(){if(this.audioTimestampOffset){var e=this.sourceBuffer.audio;l.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+this.audioTimestampOffset),e.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var t=this.parent,n=this.segments.reduce((function(e,n){return n.parent===t?e+1:e}),0),r={},i=this.sourceBuffer;for(var a in i)r[a]=i[a].buffered;if(!1===this._paused&&r["video"]&&r["video"].length>0&&r["audio"]&&r["audio"].length>0)if(r["video"].end(0)-r["video"].start(0)>1&&r["audio"].end(0)-r["audio"].start(0)>1){var s=Math.max(r["video"].start(0),r["audio"].start(0));this.media.currentTime=s,this.media.play(),delete this["_paused"]}else{var u=Math.max(r["video"].end(0),r["audio"].end(0));this.media.currentTime=u,this.media.play()}this.hls.trigger(o.default.BUFFER_APPENDED,{parent:t,pending:n,timeRanges:r}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration(),0===n&&this.flushLiveBackBuffer()}},{key:"onSBUpdateError",value:function(e){l.logger.error("sourceBuffer error:",e),this.hls.trigger(o.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{key:"onBufferReset",value:function(){var e=this.sourceBuffer;for(var t in e){var n=e[t];try{this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this.onsbue),n.removeEventListener("error",this.onsbe)}catch(r){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}},{key:"onBufferCodecs",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.pendingTracks[n]=e[n]}));var n=this.mediaSource;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),n&&"open"===n.readyState&&this.checkPendingTracks()}},{key:"createSourceBuffers",value:function(e){var t=this.sourceBuffer,n=this.mediaSource;for(var r in e)if(!t[r]){var i=e[r],a=i.levelCodec||i.codec,s=i.container+";codecs="+a;l.logger.log("creating sourceBuffer("+s+")");try{var c=t[r]=n.addSourceBuffer(s);c.addEventListener("updateend",this.onsbue),c.addEventListener("error",this.onsbe),this.tracks[r]={codec:a,container:i.container},i.buffer=c}catch(p){if(22==p.code){l.logger.log("Found new track, try to rebuild"),this._paused=!1;var d=this.mediaSource=new g;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this);for(var f=0;f=0;o--){var a=r[o],s=n[a].buffered;s.length>0&&i>s.start(0)&&this.removeBufferRange(a,n[a],0,i)}}}},{key:"onLevelUpdated",value:function(e){var t=e.details;t.fragments.length>0&&(this._levelDuration=t.totalduration+t.fragments[0].start,this._levelTargetDuration=t.averagetargetduration||t.targetduration||10,this._live=t.live,this.updateMediaElementDuration())}},{key:"updateMediaElementDuration",value:function(){var e=this.hls.config,t=void 0;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var n in this.sourceBuffer)if(!0===this.sourceBuffer[n].updating)return;t=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===e.liveDurationInfinity?(l.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>t||!Number.isFinite(t))&&(l.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}}},{key:"doFlush",value:function(){while(this.flushRange.length){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,n=this.sourceBuffer;try{for(var r in n)t+=n[r].buffered.length}catch(i){l.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(o.default.BUFFER_FLUSHED)}}},{key:"doAppending",value:function(){var e=this.hls,t=this.segments,n=this.sourceBuffer;if(Object.keys(n).length){if(this.media.error)return this.segments=[],void l.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(t&&t.length){var r=t.shift();try{var i=r.type,a=n[i];a?a.updating?t.unshift(r):(a.ended=!1,this.parent=r.parent,a.appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(c){l.logger.error("error while trying to append buffer:"+c.message),t.unshift(r);var s={type:u.ErrorTypes.MEDIA_ERROR,parent:r.parent};22!==c.code?(this.appendError?this.appendError++:this.appendError=1,s.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>e.config.appendErrorMaxRetry?(l.logger.log("fail "+e.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],s.fatal=!0,e.trigger(o.default.ERROR,s)):(s.fatal=!1,e.trigger(o.default.ERROR,s))):(this.segments=[],s.details=u.ErrorDetails.BUFFER_FULL_ERROR,s.fatal=!1,e.trigger(o.default.ERROR,s))}}}}},{key:"flushBuffer",value:function(e,t,n){var r=void 0,i=this.sourceBuffer;if(Object.keys(i).length){if(l.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+e+"/"+t),this.flushBufferCounter.5)return l.logger.log("sb remove "+e+" ["+s+","+u+"], of ["+o+","+a+"], pos:"+this.media.currentTime),t.remove(s,u),!0}}catch(c){l.logger.warn("removeBufferRange failed",c)}return!1}}]),t}(s.default);t.default=v,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nthis.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}},{key:"getMaxLevel",value:function(e){var n=this;if(!this.levels)return-1;var r=this.levels.filter((function(r,i){return t.isLevelAllowed(i,n.restrictedLevels)&&i<=e}));return t.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)}},{key:"_startCapping",value:function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}},{key:"_stopCapping",value:function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)}},{key:"mediaWidth",get:function(){var e=void 0,n=this.media;return n&&(e=n.width||n.clientWidth||n.offsetWidth,e*=t.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e=void 0,n=this.media;return n&&(e=n.height||n.clientHeight||n.offsetHeight,e*=t.contentScaleFactor),e}}],[{key:"isLevelAllowed",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return-1===t.indexOf(e)}},{key:"getMaxLevelByMediaSize",value:function(e,t,n){if(!e||e&&!e.length)return-1;for(var r=function(e,t){return!t||e.width!==t.width||e.height!==t.height},i=e.length-1,o=0;o=t||a.height>=n)&&r(a,e[o+1])){i=o;break}}return i}},{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(t){}return e}}]),t}(s.default);t.default=f,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&a>c.config.fpsDroppedMonitoringThreshold*s){var d=c.currentLevel;l.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(-1===c.autoLevelCapping||c.autoLevelCapping>=d)&&(d-=1,c.trigger(o.default.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:c.currentLevel}),c.autoLevelCapping=d,c.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}},{key:"checkFPSInterval",value:function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}]),t}(s.default);t.default=g,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=2)if(window.clearTimeout(this.requestTimeout),0===r.tfirst&&(r.tfirst=Math.max(s.now(),r.trequest)),4===n){var l=t.status;if(l>=200&&l<300){r.tload=Math.max(r.tfirst,s.now());var u=void 0,c=void 0;"arraybuffer"===o.responseType?(u=t.response,c=u.byteLength):(u=t.responseText,c=u.length),r.loaded=r.total=c;var d={url:t.responseURL,data:u};this.callbacks.onSuccess(d,r,o,t)}else r.retry>=a.maxRetry||l>=400&&l<499?(i.logger.error(l+" while loading "+o.url),this.callbacks.onError({code:l,text:t.statusText},o,t)):(i.logger.warn(l+" while loading "+o.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),r.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout)}},{key:"loadtimeout",value:function(){i.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)}},{key:"loadprogress",value:function(e){var t=e.currentTarget,n=this.stats;n.loaded=e.loaded,e.lengthComputable&&(n.total=e.total);var r=this.callbacks.onProgress;r&&r(n,this.context,null,t)}}]),e}();t.default=u,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=this.tracks.length)l.logger.warn("Invalid audio track id:",e.id);else{if(l.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.hasInterval()){var t=1e3*e.details.targetduration;this.setInterval(t)}!e.details.live&&this.hasInterval()&&this.clearInterval()}}},{key:"onAudioTrackSwitched",value:function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)}},{key:"onLevelLoaded",value:function(e){var t=this.hls.levels[e.level];if(t.audioGroupIds){var n=t.audioGroupIds[t.urlId];this.audioGroupId!==n&&(this.audioGroupId=n,this._selectInitialAudioTrack())}}},{key:"onError",value:function(e){e.type===u.ErrorTypes.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(l.logger.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))}},{key:"_setAudioTrack",value:function(e){if(this._trackId===e&&this.tracks[this._trackId].details)l.logger.debug("Same id as current audio-track passed, and track details available -> no-op");else if(e<0||e>=this.tracks.length)l.logger.warn("Invalid id passed to audio-track controller");else{var t=this.tracks[e];l.logger.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var n=t.url,r=t.type,i=t.id;this.hls.trigger(o.default.AUDIO_TRACK_SWITCHING,{id:i,type:r,url:n}),this._loadTrackDetailsIfNeeded(t)}}},{key:"doTick",value:function(){this._updateTrack(this._trackId)}},{key:"_selectInitialAudioTrack",value:function(){var e=this,t=this.tracks;if(t.length){var n=this.tracks[this._trackId],r=null;if(n&&(r=n.name),this._selectDefaultTrack){var i=t.filter((function(e){return e.default}));i.length?t=i:l.logger.warn("No default audio tracks defined")}var a=!1,s=function(){t.forEach((function(t){a||e.audioGroupId&&t.groupId!==e.audioGroupId||r&&r!==t.name||(e._setAudioTrack(t.id),a=!0)}))};s(),a||(r=null,s()),a||(l.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(o.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}}},{key:"_needsTrackLoading",value:function(e){var t=e.details,n=e.url;return!(t&&!t.live)&&!!n}},{key:"_loadTrackDetailsIfNeeded",value:function(e){if(this._needsTrackLoading(e)){var t=e.url,n=e.id;l.logger.log("loading audio-track playlist for id: "+n),this.hls.trigger(o.default.AUDIO_TRACK_LOADING,{url:t,id:n})}}},{key:"_updateTrack",value:function(e){if(!(e<0||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,l.logger.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}}},{key:"_handleLoadError",value:function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],n=t.name,r=t.language,i=t.groupId;l.logger.warn("Loading failed on audio track id: "+e+", group-id: "+i+', name/language: "'+n+'" / "'+r+'"');for(var o=e,a=0;a0&&-1===e?(v.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=_.State.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=_.State.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=_.State.STOPPED}},{key:"doTick",value:function(){var e=void 0,t=void 0,n=void 0,r=this.hls,i=r.config;switch(this.state){case _.State.ERROR:case _.State.PAUSED:case _.State.BUFFER_FLUSHING:break;case _.State.STARTING:this.state=_.State.WAITING_TRACK,this.loadedmetadata=!1;break;case _.State.IDLE:var s=this.tracks;if(!s)break;if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;if(this.loadedmetadata)e=this.media.currentTime;else if(e=this.nextLoadPosition,void 0===e)break;var l=this.mediaBuffer?this.mediaBuffer:this.media,u=this.videoBuffer?this.videoBuffer:this.media,d=a.BufferHelper.bufferInfo(l,e,i.maxBufferHole),f=a.BufferHelper.bufferInfo(u,e,i.maxBufferHole),h=d.len,p=d.end,g=this.fragPrevious,b=Math.min(i.maxBufferLength,i.maxMaxBufferLength),x=Math.max(b,f.len),w=this.audioSwitch,S=this.trackId;if((hT||d.nextStart))return;v.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=T+.05}if(n.initSegment&&!n.initSegment.data)C=n.initSegment;else if(p<=T){if(C=k[0],null!==this.videoTrackCC&&C.cc!==this.videoTrackCC&&(C=(0,y.findFragWithCC)(k,this.videoTrackCC)),n.live&&C.loadIdx&&C.loadIdx===this.fragLoadIdx){var M=d.nextStart?d.nextStart:T;return v.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(M+.05)),void(this.media.currentTime=M+.05)}}else{var L=void 0,I=i.maxFragLookUpTolerance,D=g?k[g.sn-k[0].sn+1]:void 0,j=function(e){var t=Math.min(I,e.duration);return e.start+e.duration-t<=p?1:e.start-t>p&&e.start?-1:0};pE-I&&(I=0),L=D&&!j(D)?D:o.default.search(k,j)):L=k[O-1],L&&(C=L,T=L.start,g&&C.level===g.level&&C.sn===g.sn&&(C.sn=R||N)&&(v.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=_.State.IDLE);break;case _.State.WAITING_INIT_PTS:var B=this.videoTrackCC;if(void 0===this.initPTS[B])break;var F=this.waitingFragment;if(F){var z=F.frag.cc;B!==z?(t=this.tracks[this.trackId],t.details&&t.details.live&&(v.logger.warn("Waiting fragment CC ("+z+") does not match video track CC ("+B+")"),this.waitingFragment=null,this.state=_.State.IDLE)):(this.state=_.State.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=_.State.IDLE;break;case _.State.STOPPED:case _.State.FRAG_LOADING:case _.State.PARSING:case _.State.PARSED:case _.State.ENDED:break;default:break}}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(v.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onAudioTracksUpdated",value:function(e){v.logger.log("audio tracks updated"),this.tracks=e.audioTracks}},{key:"onAudioTrackSwitching",value:function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=_.State.PAUSED,this.waitingFragment=null,t?this.setInterval(M):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=_.State.IDLE),this.tick()}},{key:"onAudioTrackLoaded",value:function(e){var t=e.details,n=e.id,r=this.tracks[n],i=t.totalduration,o=0;if(v.logger.log("track "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+i),t.live){var a=r.details;a&&t.fragments.length>0?(f.mergeDetails(a,t),o=t.fragments[0].start,t.PTSKnown?v.logger.log("live audio playlist sliding:"+o.toFixed(3)):v.logger.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,v.logger.log("live audio playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(r.details=t,!this.startFragRequested){if(-1===this.startPosition){var s=t.startTimeOffset;Number.isFinite(s)?(v.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===_.State.WAITING_TRACK&&(this.state=_.State.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===_.State.KEY_LOADING&&(this.state=_.State.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent,n=e.frag;if(this.state===_.State.FRAG_LOADING&&t&&"audio"===n.type&&n.level===t.level&&n.sn===t.sn){var r=this.tracks[this.trackId],i=r.details,o=i.totalduration,a=t.level,s=t.sn,u=t.cc,d=this.config.defaultAudioCodec||r.audioCodec||"mp4a.40.2",f=this.stats=e.stats;if("initSegment"===s)this.state=_.State.IDLE,f.tparsed=f.tbuffered=A.now(),i.initSegment.data=e.payload,this.hls.trigger(c.default.FRAG_BUFFERED,{stats:f,frag:t,id:"audio"}),this.tick();else{this.state=_.State.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new l.default(this.hls,"audio"));var h=this.initPTS[u],p=i.initSegment?i.initSegment.data:[];if(i.initSegment||void 0!==h){this.pendingBuffering=!0,v.logger.log("Demuxing "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+a);var g=!1;this.demuxer.push(e.payload,p,d,null,t,o,g,h)}else v.logger.log("unknown video PTS for continuity counter "+u+", waiting for video PTS before demuxing audio frag "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.waitingFragment=e,this.state=_.State.WAITING_INIT_PTS}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent,n=e.frag;if(t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===_.State.PARSING){var r=e.tracks,i=void 0;if(r.video&&delete r.video,i=r.audio,i){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(c.default.BUFFER_CODECS,r),v.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var o=i.initSegment;if(o){var a={type:"audio",data:o,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[a]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(c.default.BUFFER_APPENDING,a))}this.tick()}}}},{key:"onFragParsingData",value:function(e){var t=this,n=this.fragCurrent,r=e.frag;if(n&&"audio"===e.id&&"audio"===e.type&&r.sn===n.sn&&r.level===n.level&&this.state===_.State.PARSING){var i=this.trackId,o=this.tracks[i],a=this.hls;Number.isFinite(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),n.addElementaryStream(x.default.ElementaryStreamTypes.AUDIO),v.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),f.updateFragPTSDTS(o.details,n,e.startPTS,e.endPTS);var s=this.audioSwitch,l=this.media,u=!1;if(s&&l)if(l.readyState){var d=l.currentTime;v.logger.log("switching audio track : currentTime:"+d),d>=e.startPTS&&(v.logger.log("switching audio track : flushing all audio"),this.state=_.State.BUFFER_FLUSHING,a.trigger(c.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),u=!0,this.audioSwitch=!1,a.trigger(c.default.AUDIO_TRACK_SWITCHED,{id:i}))}else this.audioSwitch=!1,a.trigger(c.default.AUDIO_TRACK_SWITCHED,{id:i});var h=this.pendingData;if(!h)return v.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void a.trigger(c.default.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([e.data1,e.data2].forEach((function(t){t&&t.length&&h.push({type:e.type,data:t,parent:"audio",content:"data"})})),!u&&h.length&&(h.forEach((function(e){t.state===_.State.PARSING&&(t.pendingBuffering=!0,t.hls.trigger(c.default.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent,n=e.frag;t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===_.State.PARSING&&(this.stats.tparsed=A.now(),this.state=_.State.PARSED,this._checkAppendedParsed())}},{key:"onBufferReset",value:function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}},{key:"onBufferCreated",value:function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)}},{key:"onBufferAppended",value:function(e){if("audio"===e.parent){var t=this.state;t!==_.State.PARSING&&t!==_.State.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}}},{key:"_checkAppendedParsed",value:function(){if(this.state===_.State.PARSED&&(!this.appended||!this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,n=this.hls;if(e){this.fragPrevious=e,t.tbuffered=A.now(),n.trigger(c.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;v.logger.log("audio buffered : "+p.default.toString(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(c.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=_.State.IDLE}this.tick()}}},{key:"onError",value:function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:var n=e.frag;if(n&&"audio"!==n.type)break;if(!e.fatal){var r=this.fragLoadError;r?r++:r=1;var i=this.config;if(r<=i.fragLoadingMaxRetry){this.fragLoadError=r;var o=Math.min(Math.pow(2,r-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);v.logger.warn("AudioStreamController: frag loading failed, retry in "+o+" ms"),this.retryDate=A.now()+o,this.state=_.State.FRAG_LOADING_WAITING_RETRY}else v.logger.error("AudioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=_.State.ERROR}break;case g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==_.State.ERROR&&(this.state=e.fatal?_.State.ERROR:_.State.IDLE,v.logger.warn("AudioStreamController: "+e.details+" while loading frag, now switching to "+this.state+" state ..."));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===_.State.PARSING||this.state===_.State.PARSED)){var s=this.mediaBuffer,l=this.media.currentTime,u=s&&a.BufferHelper.isBuffered(s,l)&&a.BufferHelper.isBuffered(s,l+.5);if(u){var d=this.config;d.maxMaxBufferLength>=d.maxBufferLength&&(d.maxMaxBufferLength/=2,v.logger.warn("AudioStreamController: reduce max buffer length to "+d.maxMaxBufferLength+"s")),this.state=_.State.IDLE}else v.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=_.State.BUFFER_FLUSHING,this.hls.trigger(c.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}break;default:break}}},{key:"onBufferFlushed",value:function(){var e=this,t=this.pendingData;t&&t.length?(v.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(c.default.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=_.State.PARSED):(this.state=_.State.IDLE,this.fragPrevious=null,this.tick())}},{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,v.logger.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}]),t}(w.default);t.default=L,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newCue=i;var r=n(30);function i(e,t,n,i){for(var o=void 0,a=void 0,s=void 0,l=void 0,u=void 0,c=window.VTTCue||window.TextTrackCue,d=0;d=16?l--:l++,navigator.userAgent.match(/Firefox\//)?a.line=d+1:a.line=d>7?d-2:d+1,a.align="left",a.position=Math.max(0,Math.min(100,l/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),e.addCue(a)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if("undefined"!==typeof window&&window.VTTCue)return window.VTTCue;var e="auto",t={"":!0,lr:!0,rl:!0},n={start:!0,middle:!0,end:!0,left:!0,right:!0};function r(e){if("string"!==typeof e)return!1;var n=t[e.toLowerCase()];return!!n&&e.toLowerCase()}function i(e){if("string"!==typeof e)return!1;var t=n[e.toLowerCase()];return!!t&&e.toLowerCase()}function o(e){for(var t=1;t100)throw new Error("Position must be between 0 and 100.");x=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",o({},u,{get:function(){return _},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",o({},u,{get:function(){return w},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",o({},u,{get:function(){return S},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");S=t,this.hasBeenReset=!0}})),s.displayState=void 0,l)return s}return a.prototype.getCueAsHTML=function(){var e=window.WebVTT;return e.convertCueToDOMTree(window,this.text)},a}(),e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=0&&(s[0]=Math.min(s[0],t),s[1]=Math.max(s[1],n),o=!0,l/(n-t)>.5))return}o||i.push([t,n]),this.Cues.newCue(this.captionsTracks[e],t,n,r)}},{key:"onInitPtsFound",value:function(e){var t=this;if("main"===e.id&&(this.initPTS[e.frag.cc]=e.initPTS),this.unparsedVttFrags.length){var n=this.unparsedVttFrags;this.unparsedVttFrags=[],n.forEach((function(e){t.onFragLoaded(e)}))}}},{key:"getExistingTrack",value:function(e){var t=this.media;if(t)for(var n=0;nl&&(p.log("ERROR","Too large cursor position "+this.pos),this.pos=l)}},{key:"moveCursor",value:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n=144&&this.backSpace();var t=a(e);this.pos>=l?p.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}},{key:"clearFromPos",value:function(e){var t=void 0;for(t=e;t0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n}},{key:"getTextAndFormat",value:function(){return this.rows}}]),e}(),x=function(){function e(t,n){i(this,e),this.chNr=t,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new b,this.nonDisplayedMemory=new b,this.lastOutputScreen=new b,this.currRollUpRow=this.displayedMemory.rows[s-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return r(e,[{key:"reset",value:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[s-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null}},{key:"getHandler",value:function(){return this.outputFilter}},{key:"setHandler",value:function(e){this.outputFilter=e}},{key:"setPAC",value:function(e){this.writeScreen.setPAC(e)}},{key:"setBkgData",value:function(e){this.writeScreen.setBkgData(e)}},{key:"setMode",value:function(e){e!==this.mode&&(this.mode=e,p.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}},{key:"insertChars",value:function(e){for(var t=0;t=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}p.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}},{key:"outputDataUpdate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=p.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),!0===e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}},{key:"cueSplitAtTime",value:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}]),e}(),_=function(){function e(t,n,r){i(this,e),this.field=t||1,this.outputs=[n,r],this.channels=[new x(1,n),new x(2,r)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return r(e,[{key:"getHandler",value:function(e){return this.channels[e].getHandler()}},{key:"setHandler",value:function(e,t){this.channels[e].setHandler(t)}},{key:"addData",value:function(e,t){var n=void 0,r=void 0,i=void 0,o=!1;this.lastTime=e,p.setTime(e);for(var a=0;a ("+g([r,i])+")"),n=this.parseCmd(r,i),n||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(o=this.parseChars(r,i),o))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(o)}else p.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:o?this.dataCounters.char+=2:(this.dataCounters.other+=2,p.log("WARNING","Couldn't parse cleaned data "+g([r,i])+" orig: "+g([t[a],t[a+1]])))}else this.dataCounters.padding+=2}},{key:"parseCmd",value:function(e,t){var n=null,r=(20===e||28===e)&&t>=32&&t<=47,i=(23===e||31===e)&&t>=33&&t<=35;if(!r&&!i)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,p.log("DEBUG","Repeated command ("+g([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var o=this.channels[n-1];return 20===e||28===e?32===t?o.ccRCL():33===t?o.ccBS():34===t?o.ccAOF():35===t?o.ccAON():36===t?o.ccDER():37===t?o.ccRU(2):38===t?o.ccRU(3):39===t?o.ccRU(4):40===t?o.ccFON():41===t?o.ccRDC():42===t?o.ccTR():43===t?o.ccRTD():44===t?o.ccEDM():45===t?o.ccCR():46===t?o.ccENM():47===t&&o.ccEOC():o.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0}},{key:"parseMidrow",value:function(e,t){var n=null;if((17===e||25===e)&&t>=32&&t<=47){if(n=17===e?1:2,n!==this.currChNr)return p.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.ccMIDROW(t),p.log("DEBUG","MIDROW ("+g([e,t])+")"),!0}return!1}},{key:"parsePAC",value:function(e,t){var n=null,r=null,i=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,o=(16===e||24===e)&&t>=64&&t<=95;if(!i&&!o)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,r=t>=64&&t<=95?1===n?u[e]:d[e]:1===n?c[e]:f[e];var a=this.interpretPAC(r,t),s=this.channels[n-1];return s.setPAC(a),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0}},{key:"interpretPAC",value:function(e,t){var n=t,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1===(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r}},{key:"parseChars",value:function(e,t){var n=null,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){var o=t;o=17===i?t+80:18===i?t+112:t+144,p.log("INFO","Special char '"+a(o)+"' in channel "+n),r=[o]}else e>=32&&e<=127&&(r=0===t?[e]:[e,t]);if(r){var s=g(r);p.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r}},{key:"parseBackgroundAttributes",value:function(e,t){var n=void 0,r=void 0,i=void 0,o=void 0,a=(16===e||24===e)&&t>=32&&t<=47,s=(23===e||31===e)&&t>=45&&t<=47;return!(!a&&!s)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=h[r],t%2===1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,o=this.channels[i-1],o.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)}},{key:"reset",value:function(){for(var e=0;ee)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}}]),e}();t.default=o,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(30),i=a(r),o=n(10);function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,n){return e.substr(n||0,t.length)===t},l=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),r=parseInt(e.substr(-9,2)),i=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;return Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)?(t+=1e3*n,t+=6e4*r,t+=36e5*i,t):-1},u=function(e){var t=5381,n=e.length;while(n)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()},c=function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);while(i&&i.new)e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC];e.presentationOffset=n},d={parse:function(e,t,n,r,a,d){var f=/\r\n|\n\r|\n|\r/g,h=(0,o.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(f,"\n").split("\n"),p="00:00.000",g=0,v=0,y=0,m=[],b=void 0,x=!0,_=new i.default;_.oncue=function(e){var t=n[r],i=n.ccOffset;t&&t.new&&(void 0!==v?i=n.ccOffset=t.start:c(n,r,y)),y&&(i=y-n.presentationOffset),e.startTime+=i-v,e.endTime+=i-v,e.id=u(e.startTime.toString())+u(e.endTime.toString())+u(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&m.push(e)},_.onparsingerror=function(e){b=e},_.onflush=function(){b&&d?d(b):a(m)},h.forEach((function(e){if(x){if(s(e,"X-TIMESTAMP-MAP=")){x=!1,e.substr(16).split(",").forEach((function(e){s(e,"LOCAL:")?p=e.substr(6):s(e,"MPEGTS:")&&(g=parseInt(e.substr(7)))}));try{t+(9e4*n[r].start||0)<0&&(t+=8589934592),g-=t,v=l(p)/1e3,y=g/9e4,-1===v&&(b=new Error("Malformed X-TIMESTAMP-MAP: "+e))}catch(i){b=new Error("Malformed X-TIMESTAMP-MAP: "+e)}return}""===e&&(x=!1)}_.parse(e+"\n")})),_.flush()}};t.default=d,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=o.length||n!==i||!a||this.stopped)this._clearReloadTimer();else if(l.logger.log("subtitle track "+n+" loaded"),r.live){var s=(0,u.computeReloadInterval)(a.details,r,e.stats.trequest);l.logger.log("Reloading live subtitle playlist in "+s+"ms"),this.timer=setTimeout((function(){t._loadCurrentTrack()}),s)}else this._clearReloadTimer()}},{key:"startLoad",value:function(){this.stopped=!1,this._loadCurrentTrack()}},{key:"stopLoad",value:function(){this.stopped=!0,this._clearReloadTimer()}},{key:"_clearReloadTimer",value:function(){this.timer&&(clearTimeout(this.timer),this.timer=null)}},{key:"_loadCurrentTrack",value:function(){var e=this.trackId,t=this.tracks,n=this.hls,r=t[e];e<0||!r||r.details&&!r.details.live||(l.logger.log("Loading subtitle track "+e),n.trigger(o.default.SUBTITLE_TRACK_LOADING,{url:r.url,id:e}))}},{key:"_toggleTrackModes",value:function(e){var t=this.media,n=this.subtitleDisplay,r=this.trackId;if(t){var i=g(t.textTracks);if(-1===e)[].slice.call(i).forEach((function(e){e.mode="disabled"}));else{var o=i[r];o&&(o.mode="disabled")}var a=i[e];a&&(a.mode=n?"showing":"hidden")}}},{key:"_setSubtitleTrackInternal",value:function(e){var t=this.hls,n=this.tracks;!Number.isFinite(e)||e<-1||e>=n.length||(this.trackId=e,l.logger.log("Switching to subtitle track "+e),t.trigger(o.default.SUBTITLE_TRACK_SWITCH,{id:e}),this._loadCurrentTrack())}},{key:"_onTextTracksChanged",value:function(){if(this.media){for(var e=-1,t=g(this.media.textTracks),n=0;n=r[a].start&&o<=r[a].end){i=r[a];break}var s=t.start+t.duration;i?i.end=s:(i={start:o,end:s},r.push(i))}}}},{key:"onMediaAttached",value:function(e){var t=e.media;this.media=t,t.addEventListener("seeking",this._onMediaSeeking),this.state=h.State.IDLE}},{key:"onMediaDetaching",value:function(){this.media.removeEventListener("seeking",this._onMediaSeeking),this.media=null,this.state=h.State.STOPPED}},{key:"onError",value:function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.state=h.State.IDLE)}},{key:"onSubtitleTracksUpdated",value:function(e){var t=this;s.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach((function(e){t.tracksBuffered[e.id]=[]}))}},{key:"onSubtitleTrackSwitch",value:function(e){if(this.currentTrackId=e.id,this.tracks&&-1!==this.currentTrackId){var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(w)}else this.clearInterval()}},{key:"onSubtitleTrackLoaded",value:function(e){var t=e.id,n=e.details,r=this.currentTrackId,i=this.tracks,o=i[r];t>=i.length||t!==r||!o||(n.live&&(0,g.mergeSubtitlePlaylists)(o.details,n,this.lastAVStart),o.details=n,this.setInterval(w))}},{key:"onKeyLoaded",value:function(){this.state===h.State.KEY_LOADING&&(this.state=h.State.IDLE)}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent,n=e.frag.decryptdata,r=e.frag,i=this.hls;if(this.state===h.State.FRAG_LOADING&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&n&&n.key&&"AES-128"===n.method){var o=_.now();this.decrypter.decrypt(e.payload,n.key.buffer,n.iv.buffer,(function(e){var t=_.now();i.trigger(a.default.FRAG_DECRYPTED,{frag:r,payload:e,stats:{tstart:o,tdecrypt:t}})}))}}},{key:"onLevelUpdated",value:function(e){var t=e.details,n=t.fragments;this.lastAVStart=n.length?n[0].start:0}},{key:"doTick",value:function(){if(this.media)switch(this.state){case h.State.IDLE:var e=this.config,t=this.currentTrackId,n=this.fragmentTracker,r=this.media,i=this.tracks;if(!i||!i[t]||!i[t].details)break;var o=e.maxBufferHole,l=e.maxFragLookUpTolerance,u=Math.min(e.maxBufferLength,e.maxMaxBufferLength),p=c.BufferHelper.bufferedInfo(this._getBuffered(),r.currentTime,o),g=p.end,v=p.len,y=i[t].details,m=y.fragments,b=m.length,x=m[b-1].start+m[b-1].duration;if(v>u)return;var _=void 0,w=this.fragPrevious;g-1)return"Unknown";if(e.indexOf("Firefox")>-1){var t=e.match(/firefox\/[\d.]+/gi)[0].match(/[\d]+/)[0];return"Firefox "+t}if(e.indexOf("Edge")>-1){var n=e.match(/edge\/[\d.]+/gi)[0].match(/[\d]+/)[0];return"Edge "+n}if(e.indexOf("rv:11")>-1)return"IE 11";if(e.indexOf("Opera")>-1||e.indexOf("OPR")>-1){if(e.indexOf("Opera")>-1){var r=e.match(/opera\/[\d.]+/gi)[0].match(/[\d]+/)[0];return"Opera "+r}if(e.indexOf("OPR")>-1){var i=e.match(/opr\/[\d.]+/gi)[0].match(/[\d]+/)[0];return"Opera "+i}}else{if(e.indexOf("Chrome")>-1){var o=e.match(/chrome\/[\d.]+/gi)[0].match(/[\d]+/)[0];return"Chrome "+o}if(e.indexOf("Safari")>-1){var a=e.match(/safari\/[\d.]+/gi)[0].match(/[\d]+/)[0];return"Safari "+a}if(!(e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1))return"Unknown";if(e.indexOf("MSIE")>-1){var s=e.match(/msie [\d.]+/gi)[0].match(/[\d]+/)[0];return"IE "+s}if(e.indexOf("Trident")>-1){var l=e.match(/trident\/[\d.]+/gi)[0].match(/[\d]+/)[0],u=parseInt(l)+4;return"IE "+u}}}};t.default=r,e.exports=t["default"]}])}))},"260a":function(e,t,n){var r=n("efd0"),i=n("18ff"),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},"28a9":function(e,t,n){var r=n("7fe9"),i=n("260a");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.0",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"2a94":function(e,t,n){var r=n("efd0"),i=n("c2b3"),o=r.WeakMap;e.exports="function"===typeof o&&/native code/.test(i(o))},"2fcd":function(e,t,n){var r=n("0117"),i=n("996e"),o=n("977b"),a=n("30cf");e.exports=function(e,t){for(var n=i(t),s=a.f,l=o.f,u=0;uthis.video.videoWidth/this.video.videoHeight?o.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":o.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px":"fixWidth"===o.config.fitVideoSize?o.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":"fixHeight"===o.config.fitVideoSize&&(o.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px")}},o.once("loadeddata",n.getVideoSize),setTimeout((function(){n.emit("ready"),n.isReady=!0}),0),n.config.videoInit&&a.default.hasClass(n.root,"xgplayer-nostart")&&n.start(),o.config.rotate&&(o.on("requestFullscreen",n.updateRotateDeg),o.on("exitFullscreen",n.updateRotateDeg)),o.once("destroy",(function e(){o.root.removeEventListener("mousemove",o.mousemoveFunc),o.off("destroy",e)})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"start",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.url,r=this.root,i=this;n&&""!==n||this.emit("urlNull"),this.logParams.playSrc=n,this.canPlayFunc=function(){i.off("canplay",i.canPlayFunc);var e=i.video.play();void 0!==e&&e&&e.then((function(){i.emit("autoplay started")})).catch((function(){i.emit("autoplay was prevented"),t.util.addClass(i.root,"xgplayer-is-autoplay")}))},"String"===a.default.typeOf(n)?n.indexOf("blob:")>-1&&n===this.video.src||(this.video.src=n):n.forEach((function(t){e.video.appendChild(a.default.createDom("source","",{src:""+t.src,type:""+(t.type||"")}))})),this.logParams.pt=(new Date).getTime(),this.logParams.vt=this.logParams.pt,this.loadeddataFunc=function(){i.logParams.vt=(new Date).getTime(),i.logParams.pt>i.logParams.vt&&(i.logParams.pt=i.logParams.vt),i.logParams.vd=i.video.duration},this.once("loadeddata",this.loadeddataFunc),this.config.autoplay&&(l.default.os.isPhone?this.canPlayFunc():this.on("canplay",this.canPlayFunc)),this.config.disableStartLoad||this.video.load(),r.insertBefore(this.video,r.firstChild),setTimeout((function(){e.emit("complete"),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}),1)}},{key:"reload",value:function(){this.video.load(),this.reloadFunc=function(){var e=this.play();void 0!==e&&e&&e.catch((function(e){}))},this.once("loadeddata",this.reloadFunc)}},{key:"destroy",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this;for(var o in clearInterval(this.bulletResizeTimer),this._interval)clearInterval(this._interval[o]),this._interval[o]=null;function a(){if(this.emit("destroy"),this.video.removeAttribute("src"),this.video.load(),n){this.root.innerHTML="";var e=this.root.className.split(" ");e.length>0?this.root.className=e.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):this.root.className=""}for(var t in this)delete this[t];(0,h.default)(this)}this.checkTimer&&clearInterval(this.checkTimer),this.waitTimer&&clearTimeout(this.waitTimer),this.ev.forEach((function(t){var n=Object.keys(t)[0],r=e[t[n]];r&&e.off(n,r)})),this.loadeddataFunc&&this.off("loadeddata",this.loadeddataFunc),this.reloadFunc&&this.off("loadeddata",this.reloadFunc),this.replayFunc&&this.off("play",this.replayFunc),this.playFunc&&this.off("play",this.playFunc),this.getVideoSize&&this.off("loadeddata",this.getVideoSize),["focus","blur"].forEach((function(t){e.off(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])})),this.config.keyShortcut&&"on"!==this.config.keyShortcut||["video","controls"].forEach((function(t){e[t]&&e[t].removeEventListener("keydown",(function(e){r.onKeydown(e,r)}))})),this.paused?a.call(this):(this.pause(),this.once("pause",a)),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"replay",value:function(){var e=this,t=this._replay;if(a.default.removeClass(this.root,"xgplayer-ended"),this.logParams={bc:0,bu_acu_t:0,played:[],pt:(new Date).getTime(),vt:(new Date).getTime(),vd:0},this.logParams.pt=(new Date).getTime(),this.logParams.vt=this.logParams.pt,this.replayFunc=function(){e.logParams.vt=(new Date).getTime(),e.logParams.pt>e.logParams.vt&&(e.logParams.pt=e.logParams.vt),e.logParams.vd=e.video.duration},this.once("play",this.replayFunc),this.logParams.playSrc=this.video.currentSrc,t&&t instanceof Function)t();else{this.currentTime=0;var n=this.play();void 0!==n&&n&&n.catch((function(e){}))}}},{key:"getFullscreen",value:function(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):this.video.webkitSupportsFullscreen?this.video.webkitEnterFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():a.default.addClass(e,"xgplayer-is-cssfullscreen")}},{key:"exitFullscreen",value:function(e){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),a.default.removeClass(e,"xgplayer-is-cssfullscreen")}},{key:"getCssFullscreen",value:function(){this.config.fluid&&(this.root.style["padding-top"]=""),a.default.addClass(this.root,"xgplayer-is-cssfullscreen"),this.emit("requestCssFullscreen")}},{key:"exitCssFullscreen",value:function(){this.config.fluid&&(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%"),a.default.removeClass(this.root,"xgplayer-is-cssfullscreen"),this.emit("exitCssFullscreen")}},{key:"getRotateFullscreen",value:function(){document.documentElement.style.width="100%",document.documentElement.style.height="100%",this.root&&!t.util.hasClass(this.root,"xgplayer-rotate-fullscreen")&&t.util.addClass(this.root,"xgplayer-rotate-fullscreen"),this.emit("getRotateFullscreen")}},{key:"exitRotateFullscreen",value:function(){document.documentElement.style.width="unset",document.documentElement.style.height="unset",this.root&&t.util.hasClass(this.root,"xgplayer-rotate-fullscreen")&&t.util.removeClass(this.root,"xgplayer-rotate-fullscreen"),this.emit("exitRotateFullscreen")}},{key:"download",value:function(){var e=(0,d.getAbsoluteURL)(this.config.url);(0,f.default)(e)}},{key:"pluginsCall",value:function(){var e=this,n=this;if(t.plugins){var r=this.config.ignores;Object.keys(t.plugins).forEach((function(i){var o=t.plugins[i];r.some((function(e){return i===e||i==="s_"+e}))||(["pc","tablet","mobile"].some((function(e){return e===i}))?i===l.default.device&&setTimeout((function(){n.video&&o.call(n,n)}),0):o.call(e,e))}))}}},{key:"getPIP",value:function(){var e=a.default.createDom("xg-pip-lay","
",{},"xgplayer-pip-lay");this.root.appendChild(e);var t=a.default.createDom("xg-pip-drag",'
'+this.lang.PIP_DRAG+"
",{tabindex:9},"xgplayer-pip-drag");this.root.appendChild(t),new c.default(".xgplayer",{handle:".drag-handle"}),a.default.addClass(this.root,"xgplayer-pip-active"),this.root.style.right=0,this.root.style.bottom="200px",this.root.style.top="",this.root.style.left="",this.root.style.width="320px",this.root.style.height="180px",this.config.pipConfig&&(void 0!==this.config.pipConfig.top&&(this.root.style.top=this.config.pipConfig.top+"px",this.root.style.bottom=""),void 0!==this.config.pipConfig.bottom&&(this.root.style.bottom=this.config.pipConfig.bottom+"px"),void 0!==this.config.pipConfig.left&&(this.root.style.left=this.config.pipConfig.left+"px",this.root.style.right=""),void 0!==this.config.pipConfig.right&&(this.root.style.right=this.config.pipConfig.right+"px"),void 0!==this.config.pipConfig.width&&(this.root.style.width=this.config.pipConfig.width+"px"),void 0!==this.config.pipConfig.height&&(this.root.style.height=this.config.pipConfig.height+"px")),this.config.fluid&&(this.root.style["padding-top"]="");var n=this;["click","touchend"].forEach((function(t){e.addEventListener(t,(function(e){e.preventDefault(),e.stopPropagation(),n.exitPIP()}))}))}},{key:"exitPIP",value:function(){a.default.removeClass(this.root,"xgplayer-pip-active"),this.root.style.right="",this.root.style.bottom="",this.root.style.top="",this.root.style.left="",this.config.fluid?(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%"):(this.config.width&&("number"!=typeof this.config.width?this.root.style.width=this.config.width:this.root.style.width=this.config.width+"px"),this.config.height&&("number"!=typeof this.config.height?this.root.style.height=this.config.height:this.root.style.height=this.config.height+"px"));var e=a.default.findDom(this.root,".xgplayer-pip-lay");e&&e.parentNode&&e.parentNode.removeChild(e);var t=a.default.findDom(this.root,".xgplayer-pip-drag");t&&t.parentNode&&t.parentNode.removeChild(t)}},{key:"updateRotateDeg",value:function(){this.rotateDeg||(this.rotateDeg=0);var e=this.root.offsetWidth,t=this.root.offsetHeight,n=this.video.videoWidth,r=this.video.videoHeight;!this.config.rotate.innerRotate&&this.config.rotate.controlsFix&&(this.root.style.width=t+"px",this.root.style.height=e+"px");var i=void 0;.25===this.rotateDeg||.75===this.rotateDeg?(i=this.config.rotate.innerRotate?n/r>t/e?t/(r/n>t/e?t*n/r:e):e/(r/n>t/e?t:e*r/n):e>=t?e/t:t/e,i=Number(i.toFixed(5))):i=1,this.config.rotate.innerRotate||this.config.rotate.controlsFix?(this.video.style.transformOrigin="center center",this.video.style.transform="rotate("+this.rotateDeg+"turn) scale("+i+")",this.video.style.webKitTransform="rotate("+this.rotateDeg+"turn) scale("+i+")"):(this.root.style.transformOrigin="center center",this.root.style.transform="rotate("+this.rotateDeg+"turn) scale(1)",this.root.style.webKitTransform="rotate("+this.rotateDeg+"turn) scale(1)")}},{key:"rotate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this;n.rotateDeg||(n.rotateDeg=0);var r=e?1:-1;n.rotateDeg=(n.rotateDeg+1+.25*r*t)%1,this.updateRotateDeg(),n.emit("rotate",360*n.rotateDeg)}},{key:"onFocus",value:function(){var e=this;a.default.hasClass(this.root,"xgplayer-inactive")&&e.emit("controlShow"),a.default.removeClass(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout((function(){e.emit("blur")}),e.config.inactive)}},{key:"onBlur",value:function(){!this.config.enablePausedInactive&&this.paused||this.ended||this.config.closeInactive||(a.default.hasClass(this.root,"xgplayer-inactive")||this.emit("controlHide"),a.default.addClass(this.root,"xgplayer-inactive"))}},{key:"onPlay",value:function(){a.default.addClass(this.root,"xgplayer-isloading"),a.default.addClass(this.root,"xgplayer-playing"),a.default.removeClass(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){a.default.addClass(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){a.default.addClass(this.root,"xgplayer-ended"),a.default.removeClass(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){this.isSeeking=!0,this.onWaiting()}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),a.default.removeClass(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.checkTimer&&(clearInterval(e.checkTimer),e.checkTimer=null);var t=e.currentTime;e.waitTimer=setTimeout((function(){a.default.addClass(e.root,"xgplayer-isloading"),e.checkTimer=setInterval((function(){e.currentTime!==t&&(a.default.removeClass(this.root,"xgplayer-isloading"),clearInterval(e.checkTimer),e.checkTimer=null)}),1e3)}),500)}},{key:"onPlaying",value:function(){this.paused||(this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),a.default.removeClass(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),a.default.addClass(this.root,"xgplayer-playing"))}},{key:"cumulateTime",get:function(){if(this.logParams&&this.logParams.played instanceof Array){var e=a.default.computeWatchDur(this.logParams.played)||0;return Number(e.toFixed(3))}return 0}}],[{key:"install",value:function(e,n){t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=n)}},{key:"use",value:function(e,n){t.plugins||(t.plugins={}),t.plugins[e]=n}}]),t}(o.default);y.util=a.default,y.sniffer=l.default,y.Errors=u.default,t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(21)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={createDom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=r,i.innerHTML=t,Object.keys(n).forEach((function(t){var r=t,o=n[t];"video"===e||"audio"===e?o&&i.setAttribute(r,o):i.setAttribute(r,o)})),i},hasClass:function(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))},addClass:function(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):r.hasClass(e,t)||(e.className+=" "+t))},removeClass:function(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):r.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})))},toggleClass:function(e,t){e&&t.split(/\s+/g).forEach((function(t){r.hasClass(e,t)?r.removeClass(e,t):r.addClass(e,t)}))},findDom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(r){0===t.indexOf("#")&&(n=e.getElementById(t.slice(1)))}return n},padStart:function(e,t,n){for(var r=String(n),i=t>>0,o=Math.ceil(i/r.length),a=[],s=String(e);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},format:function(e){if(window.isNaN(e))return"";var t=r.padStart(Math.floor(e/3600),2,0),n=r.padStart(Math.floor((e-3600*t)/60),2,0),i=r.padStart(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")},event:function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},typeOf:function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},deepCopy:function(e,t){if("Object"===r.typeOf(t)&&"Object"===r.typeOf(e))return Object.keys(t).forEach((function(n){"Object"!==r.typeOf(t[n])||t[n]instanceof Node?"Array"===r.typeOf(t[n])?e[n]="Array"===r.typeOf(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:e[n]?r.deepCopy(e[n],t[n]):e[n]=t[n]})),e},getBgImage:function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href},copyDom:function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},setInterval:function(e,t,n,r){e._interval[t]||(e._interval[t]=setInterval(n.bind(e),r))},clearInterval:function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},createImgBtn:function(e,t,n,i){var o=r.createDom("xg-"+e,"",{},"xgplayer-"+e+"-img");if(o.style.backgroundImage='url("'+t+'")',n&&i){var a=void 0,s=void 0,l=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(n.indexOf(e)>-1&&i.indexOf(e)>-1)||(a=Number(n.slice(0,n.indexOf(e)).trim()),s=Number(i.slice(0,i.indexOf(e)).trim()),l=e,!1)})),o.style.width=""+a+l,o.style.height=""+s+l,o.style.backgroundSize=""+a+l+" "+s+l,o.style.margin="start"===e?"-"+s/2+l+" auto auto -"+a/2+l:"auto 5px auto 5px"}return o},Hex2RGBA:function(e,t){var n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var r="#";e.replace(/[0-9A-F]/gi,(function(e){r+=e+e})),e=r}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(parseInt(e,16))})),"rgba("+n.join(",")+", "+t+")"):"rgba(255, 255, 255, 0.1)"},isWeiXin:function(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1},isUc:function(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1},computeWatchDur:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0;nt[r].end)){var a=t[r].begin,s=t[r].end;t[r].begin=Math.min(i,a),t[r].end=Math.max(o,s);break}if(r>t.length-2){t.push({begin:i,end:o});break}}for(var l=0,u=0;u8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},h=arguments[9],p=arguments[10];i(this,e);var g={};if(arguments.length>1)g.playerVersion=r.version,g.errorType=t,g.domain=document.domain,g.duration=a,g.currentTime=n,g.networkState=s,g.readyState=l,g.currentSrc=c,g.src=u,g.ended=d,g.errd=f,g.ex=(o[t]||{}).msg,g.errorCode=h,g.mediaError=p;else{var v=arguments[0];Object.keys(v).map((function(e){g[e]=v[e]})),g.ex=(v.type&&o[v.type]||{}).msg}return g},e.exports=t.default},function(e){e.exports=JSON.parse('{"version":"2.14.0"}')},function(e,t,n){e.exports=n(7)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=O(n(0)),i=O(n(40)),o=O(n(41)),a=O(n(42)),s=O(n(43)),l=O(n(44)),u=O(n(45)),c=O(n(46)),d=O(n(47)),f=O(n(48)),h=O(n(49)),p=O(n(50)),g=O(n(51)),v=O(n(52)),y=O(n(53)),m=O(n(54)),b=O(n(55)),x=O(n(56)),_=O(n(57)),w=O(n(58)),S=O(n(59)),k=O(n(60));function O(e){return e&&e.__esModule?e:{default:e}}O(n(61));var T={};function E(e,t,n){var r=e;t.map((function(e,i){r[e]=i==t.length-1?n:r[e]||{},r=r[e]}))}E(T,["controls","airplay"],k.default),E(T,["controls","cssFullscreen"],S.default),E(T,["controls","danmu"],w.default),E(T,["controls","definition"],_.default),E(T,["controls","download"],x.default),E(T,["controls","errorRetry"],b.default),E(T,["controls","fullscreen"],m.default),E(T,["controls","keyboard"],y.default),E(T,["controls","localPreview"],v.default),E(T,["controls","memoryPlay"],g.default),E(T,["controls","mobile"],p.default),E(T,["controls","pc"],h.default),E(T,["controls","pip"],f.default),E(T,["controls","play"],d.default),E(T,["controls","playNext"],c.default),E(T,["controls","reload"],u.default),E(T,["controls","replay"],l.default),E(T,["controls","rotate"],s.default),E(T,["controls","screenShot"],a.default),E(T,["controls","start"],o.default),E(T,["controls","volume"],i.default),t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&!t.textTrack.some((function(e){return e.default}))&&(t.textTrack[0].default=!0,this.textTrackShowDefault=!1),t.textTrack.some((function(e){if(e.src&&e.label&&e.default)return n+='",!0})),this.videoConfig.crossorigin="anonymous"),t.textTrackStyle){var r=document.createElement("style");this.textTrackStyle=r,document.head.appendChild(r);var a="";for(var s in t.textTrackStyle)a+=s+": "+t.textTrackStyle[s]+";";var l=t.id?"#"+t.id:t.el.id?"#"+t.el.id:"."+t.el.className;r.sheet.insertRule?r.sheet.insertRule(l+" video::cue { "+a+" }",0):r.sheet.addRule&&r.sheet.addRule(l+" video::cue",a)}this.video=o.default.createDom(this.videoConfig.mediaType,n,this.videoConfig,""),!this.textTrackShowDefault&&n&&(this.video.getElementsByTagName("Track")[0].track.mode="hidden"),t.autoplay&&(this.video.autoplay=!0,t.autoplayMuted&&(this.video.muted=!0)),this.ev=["play","playing","pause","ended","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadstart"].map((function(e){return t={},n=e,r="on"+e.charAt(0).toUpperCase()+e.slice(1),n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t;var t,n,r})),(0,i.default)(this),this._interval={};var u="0,0",c=this;this.ev.forEach((function(e){c.evItem=Object.keys(e)[0];var t=Object.keys(e)[0];c.video.addEventListener(Object.keys(e)[0],(function(){c&&c.logParams&&("play"===t?c.hasStart=!0:"canplay"===t?o.default.removeClass(c.root,"xgplayer-is-enter"):"waiting"===t?(c.logParams.bc++,c.inWaitingStart=(new Date).getTime()):"playing"===t?(o.default.removeClass(c.root,"xgplayer-is-enter"),c.inWaitingStart&&(c.logParams.bu_acu_t+=(new Date).getTime()-c.inWaitingStart,c.inWaitingStart=void 0)):"loadeddata"===t?c.logParams.played.push({begin:0,end:-1}):"seeking"===t?c.logParams.played.push({begin:c.video.currentTime,end:-1}):c&&c.logParams&&c.logParams.played&&"timeupdate"===t&&(c.logParams.played.length<1&&c.logParams.played.push({begin:c.video.currentTime,end:-1}),c.logParams.played[c.logParams.played.length-1].end=c.video.currentTime),"error"===t?c._onError(t):c.emit(t,c),c.hasOwnProperty("_interval")&&(["ended","error","timeupdate"].indexOf(t)<0?(clearInterval(c._interval.bufferedChange),o.default.setInterval(c,"bufferedChange",(function(){if(c.video&&c.video.buffered){for(var e=[],t=0,n=c.video.buffered.length;tt.logParams.vt&&(t.logParams.pt=t.logParams.vt),t.logParams.vd=t.video.duration,t.off("loadeddata",e)}))}},{key:"poster",set:function(e){var t=o.default.findDom(this.root,".xgplayer-poster");t&&(t.style.backgroundImage="url("+e+")")}},{key:"volume",get:function(){return this.video.volume},set:function(e){this.video.volume=e}},{key:"fullscreen",get:function(){return o.default.hasClass(this.root,"xgplayer-is-fullscreen")||o.default.hasClass(this.root,"xgplayer-fullscreen-active")}},{key:"bullet",get:function(){return!!o.default.findDom(this.root,"xg-danmu")&&o.default.hasClass(o.default.findDom(this.root,"xg-danmu"),"xgplayer-has-danmu")}},{key:"textTrack",get:function(){return o.default.hasClass(this.root,"xgplayer-is-textTrack")}},{key:"pip",get:function(){return o.default.hasClass(this.root,"xgplayer-pip-active")}}]),e}();t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r,i,o,a,s,l,u,c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=n(10),f=n(27),h=Function.prototype.apply,p=Function.prototype.call,g=Object.create,v=Object.defineProperty,y=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};i=function(e,t){var n,i;return f(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),h.call(t,this,arguments)}),n.__eeOnceListener__=t,this},s={on:r=function(e,t){var n;return f(t),m.call(this,"__ee__")?n=this.__ee__:(n=b.value=g(null),v(this,"__ee__",b),b.value=null),n[e]?"object"===c(n[e])?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:i,off:o=function(e,t){var n,r,i,o;if(f(t),!m.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"===(void 0===(r=n[e])?"undefined":c(r)))for(o=0;i=r[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[o?0:1]:r.splice(o,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},emit:a=function(e){var t,n,r,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"===(void 0===i?"undefined":c(i))){for(n=arguments.length,o=new Array(n-1),t=1;t-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};i(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return r(e,[{key:"openDB",value:function(e){var t=this,n=this,r=this.myDB.version||1,i=n.indexedDB.open(n.myDB.name,r);i.onerror=function(e){},i.onsuccess=function(r){t.myDB.db=r.target.result,e.call(n)},i.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(n.myDB.ojstore.name)||t.createObjectStore(n.myDB.ojstore.name,{keyPath:n.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){this.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(e,t){for(var n=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=void 0,i=0;i