UNPKG

qcobjects-charts

Version:

App template for New App in QCObjects

1 lines 429 kB
!function(t){"object"==typeof module&&"undefined"!=typeof module.exports?module.exports=t:t()}((function(){(window.webpackJsonpFusionCharts=window.webpackJsonpFusionCharts||[]).push([[3],{690:function(t,e,i){"use strict";var n=i(187);e.__esModule=!0,e["default"]=void 0;var a=n(i(691));e.TimeSeries=a["default"];var r=n(i(189)),o=n(i(349)),l=i(378),s=i(406),c=i(407);r["default"].DataStore=o["default"],r["default"].DataStore.Operators={between:l.between,equals:l.equals,less:l.less,lessEquals:l.lessEquals,greater:l.greater,greaterEquals:l.greaterEquals,filter:l.filter,select:l.select,groupBy:l.groupBy,pipe:l.pipe,sort:l.sort,pivot:l.pivot},r["default"].Utils={duration:c.duration,before:c.before,after:c.after,parseDate:c.parseDate,formatDate:c.formatDate,DatetimeUnits:c.DatetimeUnits,Weekdays:c.Weekdays},r["default"].DataStore.Aggregators={aggregatorStore:s.aggregatorStore};var u={name:"timeseries",type:"package",requiresFusionCharts:!0,extension:function(t){return t.addDep(a["default"])}};e["default"]=u},691:function(t,e,i){"use strict";e.__esModule=!0,e["default"]=void 0;var n=i(692).TimeSeries;e["default"]=n},692:function(t,e,i){"use strict";var n=i(187);e.__esModule=!0;var a=n(i(693));e.TimeSeries=a["default"]},693:function(t,e,i){"use strict";var n=i(187);e.__esModule=!0,e["default"]=void 0;var a=n(i(210)),r=n(i(207)),o=n(i(192)),l=n(i(694)),s=n(i(720)),c=n(i(724)),u=n(i(737)),d=n(i(731)),f=n(i(738)),h=i(193),g=i(379),p=n(i(436)),m=n(i(438)),v=i(386),y=i(394),b=n(i(377)),x=n(i(740)),k=n(i(741)),S=n(i(331)),_=i(366),C=n(i(742)),w=n(i(419)),E=n(i(430)),D=i(744),M=i(746),T=n(i(467)),F=n(i(747)),I=n(i(748)),L=n(i(765)),O=n(i(766)),A=n(i(833)),P=n(i(835)),B=i(837),N=n(i(838)),H=n(i(842)),j=n(i(843)),R=n(i(793)),V=n(i(845)),G=n(i(854)),Y=n(i(863)),U=n(i(865)),z=n(i(866)),X=n(i(868)),W=n(i(870)),q=n(i(249)),Z=n(i(358)),$=i(749);function Q(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}var K={day:v.timeDay,hour:v.timeHour,week:v.timeWeek,year:v.timeYear,month:v.timeMonth,minute:v.timeMinute,second:v.timeSecond,millisecond:v.timeMillisecond},J={day:y.utcDay,hour:y.utcHour,week:y.utcWeek,year:y.utcYear,month:y.utcMonth,minute:y.utcMinute,second:y.utcSecond,millisecond:y.utcMillisecond},tt=h.regex.dropHash,et=function(t){return void 0===t&&(t=0),new Date(t)},it=function(t){return void 0===t&&(t=""),t.toString()},nt=function(t,e){return t.getSchema().filter(e).map((function(t){return t.name}))},at=function(t){return t.map((function(t){return{x:t.x,y:t.y,plots:(0,u["default"])(t.x.map((function(t){return t.index})),t.y.map((function(t){return t.index}))).map((function(t){return{x:t[0],y:t[1]}}))}}))},rt=function(t,e){return t+e},ot=function(t){return Object.assign({},t,{filter:t.plot.map((function(t){return t.value})),filterInfo:{}})},lt=function(t){return+t.split("_").pop()},st=function(t){return"date"===t.type},ct=function(t){return st(t)||function(t){return"interval"===t.type}(t)},ut=function(t){return"number"===t.type},dt=function(t){return"string"===t.type},ft=(0,f["default"])(l["default"]),ht=function(t,e){void 0===t&&(t=new Set),void 0===e&&(e=[]);var i=Array.from(t);(0,T["default"])(i,e).forEach((function(e){return t["delete"](e)})),e.forEach((function(e){return t.add(e)}))},gt=function(t,e){return ft((function(t,i){return e.map((function(t,e,n){return{x:[{index:i,visible:e===n.length-1}],y:[{index:e,align:"left"}]}}))}),t)},pt=function(t,e){return ft((function(t,i){return{x:[{index:i,visible:!0}],y:e.map((function(t,e){return{index:e,align:e%2==0?"left":"right"}}))}}),t)},mt=function(t,e){for(var i in t)t.hasOwnProperty(i)&&(t[i]._fc_info.table||(t[i]._fc_info.table=t[i]._fc_info.filter?e.table.query([t[i]._fc_info.filterInfo.query]):e.table,t[i]._fc_info.filterInfo.table=t[i]._fc_info.table),St(t[i]))},vt=function(t,e){for(var i in t)t.hasOwnProperty(i)&&(t[i]._fc_info.table=e.table,t[i]._fc_info.group=i,St(t[i]))},yt=function(t,e){for(var i in t)t.hasOwnProperty(i)&&(t[i]._fc_info.table=e.table,t[i]._fc_info.groupItems=e.groupItems,t[i]._fc_info.group=e.group,St(t[i]))},bt=function(t){var e=t.operands,i=[];if(t.filter){for(var n in e)if(e.hasOwnProperty(n))for(var a in e[n])e[n].hasOwnProperty(a)&&(0,q["default"])(e[n][a])&&(i.push(a),e[n][a].length=0);i=(0,c["default"])(i)}else for(var r in e)e.hasOwnProperty(r)&&(0,q["default"])(e[r])&&(i.push(r),e[r].length=0);return i.map((function(e){return{column:e,operation:t.op}}))},xt=function(t,e,i,n){void 0===e&&(e=[]);var a=function(a){if("plottype"!==a){var r=function(t){return t.column===a&&t.operation===n};(e.length>0?(0,l["default"])((function(t){return i.filter(r).map((function(e){return[t,e.column,e.operation]}))}),e).map((function(t){return t.join(" - ")})):i.filter(r).map((function(t){return[t.column,t.operation].join(" - ")}))).forEach((function(e){return t[a].push(e)}))}};for(var r in t)a(r)},kt=function(t,e){for(var i in t)t.hasOwnProperty(i)&&function(){var n=t[i]._fc_info,a=n.binDecider,r=n.chart,o=a.getRangeThreshold(),s=[{column:n.bin,timeUnit:_.DatetimeUnits[(0,F["default"])(o[0].name())],binSize:o[1],startValue:n.totalStart}],c=e.group,u=e.groupItems,f=e.pivot,h=e.table;if(t[i].aggregate){var p,m,v=t[i].aggregate._fc_info,y=[],b=[],x=[],k=[],S=[],C=!1;for(var w in v)v.hasOwnProperty(w)&&y.push({op:w,operands:v[w],filter:c});if(p=(0,l["default"])(bt,y),c){var E=u.map((function(t){for(var e,i,n=0;n<y.length&&!e;++n)y[n].operands[t].table&&(i=(e=y[n].operands[t].table)._parentTable);return{table:e,filterQuery:!e&&(0,g.filter)((function(e,i){return e[i[c]]===t})),parentTable:i}})).map((function(t){var e=t.table,i=t.filterQuery,n=t.parentTable;return{newTable:!e,table:e||h.query([i]),parentTable:n}}));f?(m=(0,g.pivot)(s,f,p),E.forEach((function(t){var i,n=t.table,a=t.newTable,o=t.parentTable;if(a)C=!0,i=n.unique(f),k.push(new Set(i)),x.push(i),b.push(n.query([m]));else{var l=Array.from(n.__set);ht(n.__set,o.unique(f)),i=Array.from(n.__set),x.push(i),(0,d["default"])(i,l)?b.push(n):(n.disposed||(o.disposeChildren(),r.removeEventListener("focusLimitChanged",e.query)),b.push(o.query([m])),C=!0)}}))):(m=(0,g.groupBy)(s,p),b=E.map((function(t){var e=t.table,i=t.newTable;return i&&(C=!0),i?e.query([m]):e})))}else if(f?(m=(0,g.pivot)(s,f,p),S=h.unique(f)):m=(0,g.groupBy)(s,p),y[0].operands.table){var D=y[0].operands.table.__set,M=Array.from(D);ht(D,S),S=Array.from(D),k.push(D),(0,d["default"])(M,S)&&!y[0].operands.table.diposed?b=[y[0].operands.table]:(y[0].operands.table.dispose(),b=[h.query([m])],C=!0)}else k.push(new Set(S)),b=[h.query([m])],C=!0;C&&r.addEventListener("focusLimitChanged",e.query=function(t){b.filter((function(t){return t&&!t.disposed})).length?(o=a.getRangeThreshold(),s=[{column:n.bin,timeUnit:_.DatetimeUnits[(0,F["default"])(o[0].name())],binSize:o[1],startValue:n.totalStart}],f?m._updateArgs(s,f,p):(s.startValue=n.totalStart,m._updateArgs(s,p))):t.detachHandler()}),y.forEach((function(t){var e=t.operands;c?u.forEach((function(i,a){var r=e[i];r.table=b[a],r.position=n.bin,r.filterItem=i,r.table.__set=k[a],xt(r,x[a],p,t.op)})):(e.table=b[0],e.position=n.bin,e.table.__set=k[0],xt(e,S,p,t.op))}))}}()},St=function(t){for(var e in t)if(t.hasOwnProperty(e)){var i=t[e];"filter"===e?mt(i,t._fc_info):"group"===e?vt(i,t._fc_info):"pivot"===e?yt(i,t._fc_info):"bin"===e&&kt(i,t._fc_info)}},_t=function(t,e){var i,n,a,r,o,l,s,c=t.config;e?(i=c.contextPanels,n=c.contextAxesX,a=c.contextAxesY,r=t.getFromEnv("contextBins"),o=t.getFromEnv("contextScalesX"),l=t.getFromEnv("contextScalesY"),s=c.contextTableMap):(i=c.focusPanels,n=c.focusAxesX,a=c.focusAxesY,r=t.getFromEnv("focusBins"),o=t.getFromEnv("focusScalesX"),l=t.getFromEnv("focusScalesY"),s=c.focusTableMap);for(var u=0,d=i.length;u<d;u++)for(var f=i[u].plots,p=function(e,i){var u=f[e],d=n[u.x],p=a[u.y],m=r[u.x],y=m.getRangeThreshold(),b=m.getBinDomain().map(Number),x=o[u.x],k=l[u.y],S=s;u.plots=[],d.binDecider=m,d.scale=x,p.scale=k,d.filter&&(S.filter||(S.filter={}),S=S.filter,d.filterInfo.query||(d.filterInfo.query=(0,g.between)(d.filter[0],b[0]-2*y[2],b[1]+2*y[2])),S["x__FC_OP_SEP__"+u.x]||(S["x__FC_OP_SEP__"+u.x]={_fc_info:{filter:d.filter[0],filterInfo:d.filterInfo,start:b[0],end:b[1]}}),S=S["x__FC_OP_SEP__"+u.x]),p.filter&&(S||(S.filter={}),(S=S.filter)["y__FC_OP_SEP__"+u.y]||(S["y__FC_OP_SEP__"+u.y]={_fc_info:{filter:p.filter[0]}}),S=S["y__FC_OP_SEP__"+u.y]),p.plot.forEach((function(e,i){var n=S,a=[];if(e.group){var r=e.group;if(S.group||(S.group={}),(S=S.group)[r]||(S[r]={_fc_info:{}}),a=c.dataTable.unique(r),S[r]._fc_info.groupItemsSet){var o=S[r]._fc_info.groupItemsSet;ht(o,a),S[r]._fc_info.groupItems=a=Array.from(o)}else S[r]._fc_info.groupItemsSet=new Set(a),S[r]._fc_info.groupItems=a;S=S[r]}if(e.stack){var l=e.stack;S.pivot||(S.pivot={}),(S=S.pivot)[l]||(S[l]={_fc_info:{pivot:l}}),S=S[l]}if(d.bin&&(S.bin||(S.bin={}),(S=S.bin)["x__FC_OP_SEP__"+u.x]||(S["x__FC_OP_SEP__"+u.x]={_fc_info:{chart:t,bin:d.bin[0],binDecider:m}}),(S=S["x__FC_OP_SEP__"+u.x])._fc_info.totalStart=+v.timeYear.floor(c.rawDataXStart)),p.bin&&(S.bin||(S.bin={}),(S=S.bin)["y__FC_OP_SEP__"+u.y]||(S["y__FC_OP_SEP__"+u.y]={_fc_info:{bin:p.bin[0]}}),S=S["y__FC_OP_SEP__"+u.y]),S.aggregate||(S.aggregate={_fc_info:{}}),"candlestick"===e.type||"ohlc"===e.type)for(var s=e.group?a.length:1,f=0;f<s;++f){var g={plottype:e.type,typeinnavigator:e.typeinnavigator},y=e.group?a[f]:h.UNDEF;if(e.open){S.aggregate._fc_info.first||(S.aggregate._fc_info.first={});var b=S.aggregate._fc_info.first;y&&!b[y]&&(b[y]={}),y?b[y][e.open]||(b[y][e.open]=[]):b[e.open]||(b[e.open]=[]),g.open=y?b[y][e.open]:b[e.open]}if(e.high){S.aggregate._fc_info.max||(S.aggregate._fc_info.max={});var x=S.aggregate._fc_info.max;y&&!x[y]&&(x[y]={}),y?x[y][e.high]||(x[y][e.high]=[]):x[e.high]||(x[e.high]=[]),g.high=y?x[y][e.high]:x[e.high]}if(e.low){S.aggregate._fc_info.min||(S.aggregate._fc_info.min={});var k=S.aggregate._fc_info.min;y&&!k[y]&&(k[y]={}),y?k[y][e.low]||(k[y][e.low]=[]):k[e.low]||(k[e.low]=[]),g.low=y?k[y][e.low]:k[e.low]}if(e.close){S.aggregate._fc_info.last||(S.aggregate._fc_info.last={});var _=S.aggregate._fc_info.last;y&&!_[y]&&(_[y]={}),y?_[y][e.close]||(_[y][e.close]=[]):_[e.close]||(_[e.close]=[]),g.close=y?_[y][e.close]:_[e.close]}var C=S.aggregate._fc_info;g.tableInfo=(y?[C.first[y],C.max[y],C.min[y],C.last[y]]:[C.first,C.max,C.min,C.last]).filter((function(t){return!!t}))[0],g.value=e.value,g.plotInAxisIndex=i,u.plots.push(g)}else if("column-range"===e.type||"area-range"===e.type)for(var w=e.group?a.length:1,E=0;E<w;++E){var D={plottype:e.type,typeinnavigator:e.typeinnavigator,name:e.name},M=e.group?a[E]:h.UNDEF;if(e.high){S.aggregate._fc_info.max||(S.aggregate._fc_info.max={});var T=S.aggregate._fc_info.max;M&&!T[M]&&(T[M]={}),M?T[M][e.high]||(T[M][e.high]=[]):T[e.high]||(T[e.high]=[]),D.high=M?T[M][e.high]:T[e.high]}if(e.low){S.aggregate._fc_info.min||(S.aggregate._fc_info.min={});var F=S.aggregate._fc_info.min;M&&!F[M]&&(F[M]={}),M?F[M][e.low]||(F[M][e.low]=[]):F[e.low]||(F[e.low]=[]),D.low=M?F[M][e.low]:F[e.low]}var I=S.aggregate._fc_info;D.tableInfo=(M?[I.max[M],I.min[M]]:[I.max,I.min]).filter((function(t){return!!t}))[0],D.plotInAxisIndex=i,u.plots.push(D)}else{S.aggregate._fc_info[e.aggregation]||(S.aggregate._fc_info[e.aggregation]={});var L=S.aggregate._fc_info[e.aggregation];if(e.group)for(var O=0;O<a.length;++O){var A=a[O];L[A]||(L[A]={}),L[A][e.value]||(L[A][e.value]=[]),u.plots.push({plottype:e.type,typeinnavigator:e.typeinnavigator,tableInfo:L[A],value:L[A][e.value],stack:e.stack,plotInAxisIndex:i})}else L[e.value]||(L[e.value]=[]),u.plots.push({plottype:e.type,typeinnavigator:e.typeinnavigator,tableInfo:L,value:L[e.value],stack:e.stack,plotInAxisIndex:i})}S=n}))},m=0,y=f.length;m<y;m++)p(m)},Ct=function(t,e,i,n,a,r){var o=a;(0,k["default"])(o)&&0!==o||(o=10);var l=t>0&&isFinite(t)?function(t,e){var i=.9*t;return e?Math.min(i,1):i}(t,r):1,s=(0,k["default"])(i)&&i>0&&i<t?i:l,c=e>0&&isFinite(e)?e:l+ +o;return[s,(0,k["default"])(n)&&n>s?n:1.2*c]},wt=function(t,e,i,n,a){var r,o,l,s=e,c=t,u=i,d=n;!isFinite(c)&&(c=h.UNDEF),!isFinite(s)&&(s=h.UNDEF),!isFinite(u)&&(u=h.UNDEF),!isFinite(d)&&(d=h.UNDEF),o=c===s?c-Math.abs(.1*c):c-Math.abs(.2*(s-c)),l=c===s?s+Math.abs(.2*s):s+Math.abs(.2*(s-c));var f=u<c?u:c!==h.UNDEF?function(t,e,i){var n=t-Math.abs(.1*t);return(n=n<i?i:n)>0&&e?0:n}(c,a,o):0,g=f<0&&(d<0||s<0);return[f,r=d>s?d:s!==h.UNDEF?g&&a?0:l<(r=s+Math.abs(.2*s))?l:r:f+1]},Et=function(t,e){var i=t.bin;for(var n in i){if(i.hasOwnProperty(n)&&/x__FC_OP_SEP__/.test(n))i[n]._fc_info.totalStart=e}},Dt=function(t,e){var i=+v.timeYear.floor(e);if(t.filter){var n=t.filter;for(var a in n)n.hasOwnProperty(a)&&/x__FC_OP_SEP__/.test(a)&&Et(n[a],i)}else Et(t,i)},Mt=function(t){t.dispose&&t.dispose()},Tt=function Nt(t,e,i){void 0===t&&(t={}),void 0===i&&(i=h.stubFN);for(var n=Object.keys(t),a=n.length,r=!0,o=0;o<a&&r;++o){var l=n[o],s=t[l];if("_fc_info"===l||"table"===l){var c="table"===l?s:s.table;c&&c!==e&&(i(c),r=!1)}else"aggregate"===l?Nt(s._fc_info,e,i):(0,b["default"])(s)&&Nt(s,e,i)}},Ft=function(t,e,i){switch(t){case"plot":i.showWarning("02362480","param"," Timeseries"," Some plot configurations were ignored. Please provide valid values to the plot attribute within a "+e+"Axis configuration.");break;case"axis":i.showWarning("08927060","param"," Timeseries","Some "+e+"Axis configurations were ignored. Please provide a valid value to the plot attribute within the "+e+"Axis configurations.");break;case"fullaxis":i.showWarning("08963401","param"," Timeseries","All "+e+"Axis configurations were ignored. Please provide a valid value to the plot attribute within the "+e+"Axis configurations. Defaulting to showing all numeric columns in separate canvases.")}},It=function(t){void 0===t&&(t={});var e,i="style='";for(e in t)t.hasOwnProperty(e)&&(i+=e+": "+t[e]+"; ");return i+="'"};function Lt(t,e,i){return t["get"+i+e]()}function Ot(t,e,i){var n,a,r,o,l,s,c=t._getRangeThreshold(),u=t.showPlotOverTick(),d=u?Math.round:Math.floor,f=new Date(i),h=new Date(e),g=c[2];return"year"===c[0].name()?d(c[0].count(i,e)/c[1]):"month"===c[0].name()?(o=Lt(f,"FullYear",t.getType()),l=Lt(h,"FullYear",t.getType()),a=Lt(f,"Month",t.getType()),r=Lt(h,"Month",t.getType()),n=Math.max(0,l-o-1),o===l?s=Math.floor(r/c[1])-Math.floor(a/c[1]):(s=12*n/c[1],s+=12/c[1]-Math.floor(a/c[1]),s+=Math.floor(r/c[1])),u&&h.getDate()>14&&s++,s):d((e-i)/g)}function At(t){var e=t.data,i=e.parsedRows,n=void 0===i?[]:i,a=e.tableID,r=this.config,l=r.focusAxesX[0],s=r.clipDates,c=this.getFromEnv("dateColumn").name,u=this.getFromEnv("contextBins"),f=this.getFromEnv("focusBins"),h=this.getFromEnv("focusScalesX"),m=this.getFromEnv("contextScalesX"),y=r.dataTable.getData().data,b=(0,p["default"])(n,(function(t){return(0,S["default"])(t)&&t[r.dateColumnIndex]})),x=[],k=this.getContextLimit(),_=v.timeYear.floor(k[0]),C=this.getFocusLimit(),w=C.slice(),E=C[1]-C[0],T=Math.min(y[0][r.dateColumnIndex],b[0]),F=!1,I=[];if(r.dataTable.getID()===a){if(s.length&&(I=[(0,g.filter)((function(t,e){var i=t[e[c]];return s.some((function(t){var e=t.from,n=t.to;return i>=e&&i<=n}))}))]),m.some((function(t){var e,i=Ot(t,k[1],_);return Ot(t,b[1],_)-i>0&&(e=u[0].getRangeThreshold()[0],T=+e.offset(k[0],e.count(k[1],b[1])),I=I.concat((0,g.less)(c,T-(1===u[0].getRangeThreshold()[2]?0:1))),F=!0,!0)})),I.length&&(r.dataTable.getDataStore().deleteRows(g.pipe.apply(void 0,I),r.dataTable.getID()),y=r.dataTable.getData().data,T=Math.max(T,Math.min(y[0][r.dateColumnIndex],b[0]))),r.contextAxesX.forEach((function(t){var e=t.binDecider,i=t.scale;r.atomicity.minBin=(0,D.getAtomicity)(function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(i),!0).forEach((function(e){(0,o["default"])(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},r.atomicity,{index:r.dateColumnIndex,data:y.slice(-n.length-1),bins:e.getStandardBins(),intervalIndexMap:e.intervalIndexMap,ms:i.getTimeInterval().Millisecond})),e.setBinMin(r.atomicity.minBin),i.setRangeThreshold(e.getRangeThreshold())})),r.focusAxesX.forEach((function(t){var e=t.binDecider,i=t.scale;e.setBinMin(r.atomicity.minBin),i.setRangeThreshold(e.getRangeThreshold())})),F||y.length-n.length==0){var L=u[0].getBinMin(),O=u[0].getRangeThreshold();r.timeSpread?(x[1]=b[1],x[0]=Math.min(r.timeSpread.interval.offset(b[1],-r.timeSpread.multiplier),O[0].offset(b[1],-2))):F?(x[1]=b[1],x[0]=Math.min(b[1]-(k[1]-k[0]),b[1]-(b[1]-T),L[0].offset(b[1],-3))):y.length-n.length==0?(x[1]=b[1],x[0]=Math.min(b[1]-(k[1]-k[0]),b[1]-(b[1]-T),L[0].offset(b[1],-3))):x=(0,p["default"])([].concat(k,b),Number)}else if(r.timeSpread){var A=Math.min(k[0],b[0]),P=Math.max(k[1],b[1]);x=[A+Math.max(0,b[1]-k[1]),P]}else x=(0,p["default"])([].concat(k,b),Number);var B=r.rawDataXStart!==T&&!r.hasSeries;if(B&&(Dt(r.focusTableMap,T),Dt(r.contextTableMap,T)),r.rawDataXStart=T,this.setContextLimit(x),C[0]<=k[0]&&(w[0]=x[0],C[1]!==k[1]&&(w[1]=w[0]+E)),C[1]>=k[1]&&(w[1]=x[1],C[0]!==k[0]&&(w[0]=w[1]-E)),w[0]<x[0]&&(w[0]=x[0],w[1]=w[0]+E),w[1]>x[1]&&(w[1]=x[1],w[0]=w[1]-E),r.hasSeries){(0,d["default"])(w,C)||f[0].setBinDomain(w);var N=f[0].getRangeThreshold();h[0].setRangeThreshold(N),l.filterInfo&&l.filterInfo.query&&l.filterInfo.query._updateArgs(+N[0].offset(+w[0],-2*N[1]),+N[0].offset(+w[1],2*N[1])),_t(this),_t(this,!0),St(r.focusTableMap),St(r.contextTableMap),this._createLegendMap(!0);for(var H=0;H<u.length;++H){var j=r.pixelMultiplier*M.DEFAULT_THRESHOLD_PIXELS;u[H].setRangeThreshold(j),f[H].setRangeThreshold(j),m[H].setRangeThreshold(u[H].getRangeThreshold()),h[H].setRangeThreshold(f[H].getRangeThreshold())}}this.setFocusLimit(w,!1)||(r.focusAxesX[0].filterInfo.table.flushResults(),B&&this.fireEvent("focusLimitChanged"),this._updateAffectedVisuals({legendInteracted:null}))}}function Pt(){this.config.dataTable.getDataStore().off("itemsAdded",this._onDataUpdate)}var Bt=function(t){function e(){var e;e=t.call(this)||this;var i=(0,a["default"])(e);return e._onDataUpdate=At.bind((0,a["default"])(e)),e._offDataUpdate=Pt.bind((0,a["default"])(e)),i.eiMethods={getCurrentBin:function(){var t=i.getFromEnv("focusBins")[0].getRangeThreshold();return{unit:t[0].name(),multiplier:t[1]}},setCurrentBin:function(t){var e=(0,B.validateUserBin)(t,i);return e&&i.setFocusLimit((0,B.calculateDomainForUserCustomBin)(e,i)),this},getTimeSelection:function(){var t=i.getFocusLimit();return{start:t[0],end:t[1]}},setTimeSelection:function(t){var e=(0,B.validateFocusLimit)(t,this.getTimeSelection(),i);return e&&i.setFocusLimit(e),this},getBinning:function(){return(0,B.filterStandarBinsToUserConfig)(i.getFromEnv("contextBins")[0].getStandardBins())},setBinning:B.setBinningRules,feedData:function(t){if((0,S["default"])(t)){var e=i.config,n=i.getContextLimit(),a=e.baseTimeConverter,r=e.dateColumnIndex;i.cloneTable()&&(e.focusTableMap={_fc_info:{table:e.dataTable}},e.contextTableMap={_fc_info:{table:e.dataTable}},_t(i),_t(i,!0),St(e.focusTableMap),St(e.contextTableMap),e.dataTable.getDataStore().on("itemsAdded",i._onDataUpdate));var o=t.filter((function(t){return+a.parse(t[r])>=n[0]}));o.length&&e.dataTable.getDataStore().appendRows(o,e.dataTable.getID())}return i}},i.addToEnv("getStyleDef",(function(t){void 0===t&&(t={});var e,n,a,r=t,o=i.getFromEnv("textStyle");if("string"==typeof r){var l=i.getFromEnv("dataSource").styledefinition;e={},l&&r.split(/\s+/g).forEach((function(t){return(0,h.extend2)(e,l[t])}))}return e&&(r=e),function s(t){for(var e in t)if(t.hasOwnProperty(e)){var i="stroke-dasharray"===e;"object"==typeof t[e]?s(t[e]):i&&("string"==typeof(n=t[e])&&"none"!==n)&&(t[e]=t[e].replace(/^\s+|\s+$/g,"").replace(/,/g," ").split(" ").map((function(t){return+t})))}var n}(r),function c(t){for(var e in t)t.hasOwnProperty(e)&&("object"==typeof t[e]?c(t[e]):"opacity"!==e&&"stroke-opacity"!==e&&"fill-opacity"!==e||(t[e]=Math.max(0,Math.min(1,+t[e]))))}(r),(r["font-size"]||0===r["font-size"])&&(n=r,a=o["font-size"],"object"==typeof n&&(n["line-height"]||(n["line-height"]=1.2*(parseFloat(n["font-size"])||a||10)+h.PXSTRING))),r})),i.deregisterFactory("canvas"),i.registerFactory("background",j["default"]),i.registerFactory("caption",A["default"]),i.registerFactory("legend",U["default"]),i.registerFactory("panel",O["default"]),i.registerFactory("selectorToolbar",z["default"],["timeNavigator","canvas"]),i.registerFactory("timeNavigator",V["default"]),i.registerFactory("standardRangeSelector",W["default"],["selectorToolbar"]),i.registerFactory("customRangeSelector",G["default"],["selectorToolbar"]),i.registerFactory("multicanvasCrosslineManager",X["default"],["mouseTracker"]),i.registerFactory("toolbarManager",Y["default"],["standardRangeSelector","customRangeSelector"]),e}(0,r["default"])(e,t),e.getName=function(){return"timeseries"};var i=e.prototype;return i.getName=function(){return"timeseries"},i.__setDefaultConfig=function(){var t=this.config;t.skipConfigureIteration={},t.canvasAxisMap={},t.scaleDsMap={},t.palettecolors=["#5D62B5","#29C3BE","#F2726F","#FFC533","#62B58F","#BC95DF","#67CDF2"],t.defaultLegendTextStyle={"font-family":h.DEFAULT_FT_FONT,"font-weight":"normal","font-style":"normal","font-size":"12px",fill:"#5F5F5F","line-height":"14px",opacity:"1","fill-opacity":"1"},t.defaultTooltipStyle={"background-color":(0,h.convertColor)("#ffffff","90"),color:"#5f5f5f","border-color":"#e8e8e8","border-width":"1px","border-radius":"0px","line-height":1,"font-family":h.DEFAULT_FT_FONT,padding:"3px",opacity:.9},this.addToEnv("textStyle",{"font-family":"sans-serif","font-size":"10",fill:"#000000","line-height":"12"}),t.contextPanels=[],t.contextLimit=t.focusLimit=h.UNDEF,t.legendMap={},t.isXMLUnsupported=!0,t.uniqueItemsMap={},t.isTableCloned=!1,t.hasSeries=!1,t.clipDates=h.UNDEF},i.cloneTable=function(){var t=this.config,e=t.dataTable.getData(),i=e.data,n=e.schema;if(!t.isTableCloned){var a=t.dataTable.getDataStore().createDataTable(i.map((function(e){return e.map((function(e,i){return st(n[i])?t.baseTimeConverter.format(e):e}))})),n);return Tt(t.focusTableMap,t.dataTable,Mt),Tt(t.contextTableMap,t.dataTable,Mt),t.dataTable=a,t.isTableCloned=!0,!0}return!1},i.setTooltipStyle=function(){var t=this.getFromEnv("tooltipStyle"),e=this.getFromEnv("baseTextStyle"),i=this.getFromEnv("toolTipController");t.container=Object.assign({},this.config.defaultTooltipStyle,e,t.text,t.container),t.header=Object.assign({"font-size":(0,h.pluck)(t.container["font-size"],"12px"),"font-weight":(0,h.pluck)(t.container["font-weight"],"bold"),"font-family":t.container["font-family"],padding:"5px 5px 0",color:(0,h.getLightColor)("#5f5f5f",76)},t.header),t.body=Object.assign({"font-size":(0,h.pluck)(t.container["font-size"],"11px"),"font-weight":(0,h.pluck)(t.container["font-weight"],"normal"),"font-family":t.container["font-family"],padding:"0 5px 5px"},t.body),i.setStyle(t.container),i.setRestrictionWithinCanvas({bottom:!0}),t.headerStyleString=It(t.header),t.bodyStyleString=It(t.body)},i.sanitizeData=function(e){var i=this;e.yaxis&&e.yaxis.format&&(e.yaxis.format.suffix&&(e.yaxis.format.suffix=(0,h.parseUnsafeString)(e.yaxis.format.suffix)),e.yaxis.format.prefix&&(e.yaxis.format.prefix=(0,h.parseUnsafeString)(e.yaxis.format.prefix))),t.prototype.sanitizeData.call(this,e);var n=(0,P["default"])(nt(e.data,ct),e.xaxis,!1),a=n.expandedAxis,r=n.actions,o=(0,P["default"])(nt(e.data,ut),e.yaxis),l=o.expandedAxis,s=o.actions;e.xaxis=a,e.yaxis=l,r.forEach((function(t){return Ft(t,"x",i)})),s.forEach((function(t){return Ft(t,"y",i)}))},i.getDSdef=function(){return R["default"]},i._updateVisuals=function(){t.prototype._updateVisuals.call(this),this.getFromEnv("paper").config.noDefaultAttribs=!0},i.setPixelLimit=function(t,e,i,n){void 0===i&&(i=["up","up"]);var a,r=t[0],o=t[1],l=e.applicableClippings,s=l.repeatClips,c=l.singleClips,u=(0,$.getUnclippedValue)(e.getDomainValue(r),s,c,{clampDirection:i[0]}),d=(0,$.getUnclippedValue)(e.getDomainValue(o),s,c,{clampDirection:i[1]});return(a=this.setFocusLimit([u,d]))&&n&&this.getFromEnv("fireChartEvents")(n.name,[u,d],n.eventArgs,n.options),a},i.domainValidator=function(t,e,i){void 0===i&&(i=[]);var n,a,r=this.getFromEnv("contextBins")[0].getBinMin(),o=this.getFromEnv("focusScalesX")[0],l=t[0],s=t[1],c=e[0],u=e[1],d=+t[0],f=+t[1],g=+e[0],p=+e[1],m=0;if(i.length&&(n=Math.abs(f-d-(+i[1]-+i[0]))>1?"squeeze":"drag"),d<g&&(l=c,s="drag"===n?new Date(f+(g-d)):s),f>p&&(s=u,l="drag"===n?new Date(d-(f-p)):l),f<g&&(s=c),d>p&&(l=u),d>f){var v=[s,l];l=v[0],s=v[1]}return a=Object.keys(o.applicableClippings).length?o.distance(l,s):s-l,"month"===r[0].name()&&1===r[1]&&(m=864e5),a>=3*r[2]-m?(this.fireEvent("domainValidated"),[+(l=(0,h.clampNumber)(+l,g,p)),+(s=(0,h.clampNumber)(+s,g,p))]):this.getFocusLimit()||this.getContextLimit()},i.configureAttributes=function(t){var e,i,n,a,r=this,o=r.config,l=new E["default"](r),c=new x["default"],u=t.chart,d=function(t){void 0===t&&(t=[]);var e=[];return(0,S["default"])(t)?e=t.slice():(0,C["default"])(t)&&(e=t.split(/\s*,\s*/)),(e=e.filter((function(t){return!!t}))).map((function(t){return(0,h.hashify)(t)}))}(u.palettecolors),f=u.canvasheightproportion,g=r.getFromEnv("getStyleDef"),p=t.legend,v=g(u.style&&u.style.text),y=Object.assign({},u.timespread),k=_.DatetimeUnits[(0,F["default"])(String(y.unit))],w=r.getFromEnv("dataSource"),D=(0,h.extend2)(r.getFromEnv("textStyle"),v),M=(0,b["default"])(t.tooltip)?t.tooltip:{},T=(0,b["default"])(M.style)?M.style:{},O=g(p&&p.style&&p.style.text),A=[];r.addToEnv("baseTextStyle",Object.assign({"font-family":h.DEFAULT_FT_FONT,stroke:"none"},v)),O=Object.assign({},r.getFromEnv("baseTextStyle"),O),o.mergedLegendStyle=(0,h.extend2)((0,h.extend2)({},o.defaultLegendTextStyle),O),o.focusTableMap&&(Tt(o.focusTableMap,o.focusTableMap._fc_info.table,Mt),o.focusTableMap=h.UNDEF),o.contextTableMap&&(Tt(o.contextTableMap,o.contextTableMap._fc_info.table,Mt),o.contextTableMap=h.UNDEF),r.addToEnv("chart-attrib",u),l.configure(),r.addToEnv("color-manager",l),d.length&&(o.palettecolors=d),c.setRange(o.palettecolors),r.addToEnv("ordinalScale",c),o.dataTable=t.data,o.showLegend=(0,h.pluckNumber)(p&&p.enabled,u.showlegend,1),o.navigatorEnabled=(0,h.pluckNumber)(w.navigator&&w.navigator.enabled,u.enablenavigator,1),o.navigatorHeight=(0,h.pluckNumber)(w.navigator&&w.navigator.height),o.showTooltip=(0,h.pluckNumber)(M.enabled,u.showtooltip,1),o.interCanvasSpace=(0,h.pluckNumber)(u.intercanvasspace,20),o.multiCanvas=(0,h.pluckNumber)(u.multicanvas,1),o.applycsstransform=(0,h.pluckNumber)(u.applycsstransform,0),i=(0,h.pluck)(u.enableutc,!1),r.addToEnv("UTC",i),r.addToEnv("dateAPI",(function(t,e,i){return t["get"+(i?"UTC":"")+e]()})),A=t.xaxis.slice(0,1).map((function(t){return Object.assign({},t,{bin:t.plot.map((function(t){return t.value}))})})),o.focusAxesX=A.map(ot),o.focusAxesY=(0,H["default"])(nt(o.dataTable,dt),t.yaxis,t.series,t.stack,t.group),o.contextAxesX=(0,s["default"])(A),o.contextAxesY=(0,s["default"])(o.focusAxesY),o.dateColumnIndex=o.dataTable.indexOf(o.contextAxesX[0].plot[0].value),e=o.dataTable.getSchema()[o.dateColumnIndex],a=e.format?i?Z["default"].utcParser(e.format):Z["default"].parser(e.format):{parse:et},n=e.format?i?Z["default"].utcFormatter(e.format):Z["default"].formatter(e.format):{format:it},o.baseTimeConverter={toString:function(){return a.toString()},parse:function(t){return a.parse(t)},format:function(t){return n.format(t)}},r.addToEnv("baseTimeConverter",o.baseTimeConverter),r.addToEnv("dateColumn",e),k&&(y.unit=k,y.multiplier=(0,m["default"])([(0,h.pluckNumber)(y.multiplier-1),1],Number),y.duration=y.unit.ms*y.multiplier,y.interval=i?J[k.name.toLowerCase()]:K[k.name.toLowerCase()],o.timeSpread=y),o.focusPanels=at((0,N["default"])(o.focusAxesX,o.focusAxesY,t.canvas,o.multiCanvas?gt:pt)),o.canvasHeightProportion=function(t,e){for(var i={},n=t,a=[],r=0;r<e;r++)a.push(1);return i.proportions=a,i.totalProportions=e,"string"==typeof n&&(n=n.split(":")),Array.isArray(n)&&(n=n.filter((function(t){return t&&!isNaN(Number(t))&&Number(t)>0}))).length===e&&(n=n.map((function(t){return Number(t)})),i.proportions=n,i.totalProportions=n.reduce(rt,0)),i}(f,o.focusPanels.length),r._createLegendMap(),r.addToEnv("fireChartEvents",(function(t,e,i,n){void 0===i&&(i={}),void 0===n&&(n={});var a,o,l=r.getFocusLimit(),s=r.getContextLimit(),c=r.domainValidator(e,s,l);a={start:c[0],end:c[1]},(o=n.timeFormatter)&&(a.startText=o.format(c[0]),a.endText=o.format(c[1])),(0,h.extend2)(a,i),r.fireChartInstanceEvent(t,a)})),(0,I["default"])(r),(0,L["default"])(r),o.focusTableMap={_fc_info:{table:o.dataTable}},_t(r),o.contextPanels=at((0,N["default"])(o.contextAxesX,o.contextAxesY,[],(function(t,e){return t.map((function(t,i){return{x:[{index:i}],y:e.map((function(t,e){return{index:e,visible:!1}}))}}))}))),o.contextTableMap={_fc_info:{table:o.dataTable}},_t(r,!0),St(o.focusTableMap),St(o.contextTableMap),o.printOption={enabled:(0,h.pluckNumber)(u.printshowbutton,u.showprintmenuitem,0)},o.toolbarPosition=function(t){var e=t;switch(e){case"tr":case"rt":case"top right":case"right top":e="tr";break;case"br":case"rb":case"bottom right":case"right bottom":e="br";break;case"tl":case"lt":case"top left":case"left top":e="tl";break;case"bl":case"lb":case"bottom left":case"left bottom":e="bl";break;default:e="tr"}return e}((0,h.pluck)(u.toolbarposition,"tr").toLowerCase()),o.toolbarHAlign="left"===(""+u.toolbarhalign).toLowerCase()?"l":o.toolbarPosition.charAt(1),o.toolbarVAlign="bottom"===(""+u.toolbarvalign).toLowerCase()?"b":o.toolbarPosition.charAt(0),o.link=u.clickurl,r.addToEnv("linkClickFN",(0,h.getLinkAction)(r.getFromEnv("dataSource"),r)),r.addToEnv("chartConfig",o),r.addToEnv("tooltipStyle",{container:g(T.container),text:g(T.text),header:g(T.header),body:g(T.body)}),r.addToEnv("style",{outCancolor:D.fill,fontSize:D["font-size"],outCanfontFamily:D["font-family"]}),r.createBaseComponent(),r.getFromEnv("animationManager").setAnimationState(r._firstConfigure?"initial":"update"),o.prediction=function(t,e){var i={},n={};if(t.extensions&&(0,b["default"])(t.extensions.prediction)?(i=t.extensions.prediction).enabled=!0:i={enabled:!1},(0,b["default"])(i.style))for(n in i.style)i.style.hasOwnProperty(n)&&(i.style[n]=e(i.style[n]));else i.style={};return i}(w,g),r.addToEnv("prediction",o.prediction),r.configureChildren(),r.setTooltipStyle()},i._createLegendMap=function(t){void 0===t&&(t=!1);var e=this,i=e.config,n=i.legendMap={},a=e.getFromEnv("dataSource").legend,r={},o=e.getFromEnv("legendMap"),l=e.getChildren("legend")&&e.getChildren("legend")[0];for(var s in i.pixelMultiplier=1,i.focusAxesY.forEach((function(t){var e,n=t.plot,a=0;n.forEach((function(t){var n=t.stack,o=t.group,l=t.value,s=t.type,c=t.name,u="column"===s;u&&(e=o?i.dataTable.unique(o):new Array(1),a+=e.length),n?(r[n]=i.dataTable.unique(n),i.hasSeries=!0):o?(r[o]=u?e:i.dataTable.unique(o),i.hasSeries=!0):"column-range"===s||"area-range"===s?c&&(r[c]=[c]):"ohlc"!==s&&"candlestick"!==s&&(r[l]=[l])})),i.pixelMultiplier=Math.max(a,i.pixelMultiplier)})),r){if(r.hasOwnProperty(s))r[s].forEach((function(t){if(!n[t]){var e=i.showLegend&&a&&a.item&&Array.isArray(a.item)&&a.item.find((function(e){return e.value===t})),r=(0,h.pluckNumber)(e&&e.initiallyhidden,0);n[t]={visibility:!r,initiallyhidden:!!r,series:t}}}))}if(e.addToEnv("legendMap",n),o){!function e(i,n){for(var a in i)if(i.hasOwnProperty(a)){var r=n&&n[a],o=i[a];o.hasOwnProperty("visibility")?r?(t||(o.visibility||(l&&l.getItem(o.legendItemId).removeLegendState("hidden"),o.visibility=!0),r.initiallyhidden?r.initiallyhidden&&(l&&l.getItem(o.legendItemId).setLegendState("hidden"),o.visibility=!1,o.initiallyhidden=!0):(l&&l.getItem(o.legendItemId).removeLegendState("hidden"),o.visibility=!0,o.initiallyhidden=!1)),n[a]=o):l&&l.disposeItem(o.legendItemId):e(o,r)}}(o,n)}l&&(!function c(t){for(var i in void 0===t&&(t={}),t)if(t.hasOwnProperty(i)){var n=t[i];n.hasOwnProperty("visibility")?e._addLegend(n):c(n)}}(e.getFromEnv("legendMap")),l.asyncDraw())},i._updateAffectedVisuals=function(t){void 0===t&&(t={});var e=this.config,i=this.getChildren();Object.keys(e.canvasAxisMap).forEach((function(e){return i[e].forEach((function(e){return!e.getState("removed")&&e.setData(t,!0)}))})),i.timeNavigator&&i.timeNavigator.forEach((function(e){e.getState("removed")||(e.setData(t,!0),e.setDimension())})),this.manageSpace()},i._addLegend=function(t){var e,i,n,a,r=this,o=r.config,l=o.mergedLegendStyle,s=t.series,c=r.getFromEnv("ordinalScale").getRangeValue(s),u=r.getFromEnv("legend"),d=(0,h.getLightColor)(c,60).replace(tt,h.HASHSTRING);o.showLegend&&(e={FCcolor:{color:c,angle:0,ratio:"0",alpha:"100"}},n=u.getItem(t.legendItemId),i={label:s,eventArguments:{datasetName:s,visible:t.visibility}},n||(t.legendItemId=u.createItem(),n=u.getItem(t.legendItemId),t.initiallyhidden&&(t.visibility=!1,n.config.eventArguments.visible=!1,n.setLegendState("hidden")),r.addExtEventListener("fc-click",(function(){var e=t.visibility;a=n.config,e?(t.visibility=!1,a.eventArguments.visible=!1,n.setLegendState("hidden")):(t.visibility=!0,a.eventArguments.visible=!0,n.removeLegendState("hidden")),r._updateAffectedVisuals({legendInteracted:!0})}),n)),n.configure(i),n.setStateCosmetics("default",{symbol:{fill:(0,h.toRaphaelColor)(e),rawFillColor:c,stroke:(0,h.toRaphaelColor)(d)},text:Object.assign({},l,{fill:(0,h.convertColor)(l.fill,l.opacity*l["fill-opacity"]*100)})}))},i._createGroup=function(t,e){return void 0===t&&(t={}),this.getFromEnv("animationManager").setAnimation({attr:t,container:e,el:"group",component:this,label:"group"})},i._createLayers=function(){var t,e=this.getFromEnv("animationManager"),i=this.getContainer("parentgroup");!i&&(i=this.addContainer("parentgroup",e.setAnimation({el:i||"group",attr:{name:"parentgroup"},component:this}))),this.getChildContainer("tropo")||this.addChildContainer("tropo",this._createGroup({name:"chart-tropo"},i)),this.getChildContainer("strato")||this.addChildContainer("strato",this._createGroup({name:"chart-strato"},i)),this.getChildContainer("meso")||this.addChildContainer("meso",this._createGroup({name:"chart-meso"},i)),this.getChildContainer("thermo")||this.addChildContainer("thermo",this._createGroup({name:"chart-thermo"},i)),this.getChildContainer("exo")||(t=this.addChildContainer("exo",this._createGroup({name:"chart-exo"},i))),this.getChildContainer("toolbar-master")||this.addChildContainer("toolbar-master",this._createGroup({name:"toolbar-master"},t)),this.getChildContainer("legendGroup")||this.addChildContainer("legendGroup",this._createGroup({name:"legend-group"},t))},i.manageSpace=function(){var t,e,i,n,a,r,o,l,s,c,u,d,f,g,p,v,y=this,b=y.config,x=b.focusPanels,k=b.canvasAxisMap,S=y.getFromEnv("focusScalesX"),_=y.getChildren("caption"),C=y.getFromEnv("selectorToolbar"),w=y.getFromEnv("toolbar"),E=w.getLogicalSpace(),D=y.getChildren("legend")&&y.getChildren("legend")[0],M=y.getChildren("background")[0],T=y.getChildren("canvas_0"),F=y.getChildren("timeNavigator"),I=b.navigatorHeight,L=0,O={left:0,right:0},A=0,P=0,B=t=+y.getFromEnv("chartWidth"),N=e=+y.getFromEnv("chartHeight"),H=0,j=0,R=.03*t,V=.03*e,G=0,Y={topBorder:0,bottomBorder:0,leftBorder:0,rightBorder:0},U=b.canvasHeightProportion,z=b.interCanvasSpace;P+=(0,h.pluckNumber)(b.marginTop,V),N-=(0,h.pluckNumber)(b.marginBottom,V),A+=(0,h.pluckNumber)(b.marginLeft,R),B-=(0,h.pluckNumber)(b.marginRight,R),M.setDimension({height:e,width:t}),M.setTranslation(0,0),x.forEach((function(t,e){var i=k["canvas_"+e].y,n=.6*(B-A)/(i.length||1);i.map((function(e){var i=lt(e),a=y.getChildren(e)[0].setDimension({width:n});return t.y[i].overlap?{}:a})).forEach((function(t){"number"==typeof t.left?O.left=Math.max(O.left,t.left):O.right=Math.max(O.right,t.right)}))})),x.forEach((function(t,e){var i,n,a,r=k["canvas_"+e].y,o=0,l=0;r.forEach((function(t){i=y.getChildren(t)[0],a=i.getAlignment(),n=i.updateMaxLabelSpace(O[a]),o+=(0,h.pluckNumber)(n.left,0),l+=(0,h.pluckNumber)(n.right,0)})),H=(0,m["default"])([H,o]),j=(0,m["default"])([j,l])})),x.forEach((function(t,e){var i=k["canvas_"+e].x,n=.6*(N-P)/(i.length||1);i.map((function(e){var i=lt(e),a=y.getChildren(e)[0].setDimension({height:n});return t.x[i].overlap?{}:a})).forEach((function(t){G+=(0,h.pluckNumber)(t.top,t.bottom,0)}))})),A+=H,B-=j,i=N-P,E.height&&(w.setDimension({x:B-E.width,y:P}),w.manageSpace()),"right"===_[0].config.captionAlignment||"right"===_[0].config.subCaptionAlignment?(P+=E.height,v=B-A):v=B-A-E.width,_&&_.length?(o=_[0].setDimension({width:v,height:.3*i}),_[0].setTranslation(A,P),p=Math.max(o.height,E.height)):p=E.height,P+=p,a=Math.max(0,B-A),g=C.getLogicalSpace().height,C.setDimension({x:A,y:P,width:a}),C.manageSpace(),P+=g,l=G+(x.length-1)*z,i=Math.max(0,N-P-l),D&&(f=Math.max(0,D.setDimension({height:.1*i,width:a}).height),N-=f,i-=f,D.setTranslation(A,N)),F&&F.length&&(r=.7*i/(x.length||1),s=.3*i/(F.length||1),F.forEach((function(t,e){t.getState("removed")||(d=t.getChildren("brush")[0],n=d.getLabelSpace()+t.config.scrollbarHeight,c=I?Math.min(Math.max(I,44),84):Math.min(Math.max(Math.min(s,.8*r),48),60),u=c+n,t.setDimension({width:a,height:u}),t.setTranslation(A,N-(F.length-e)*u),L+=u)})),L>i?F.forEach((function(t){return t.setDimension({width:0,height:0})})):i-=L),T&&T[0]&&(Y=T[0].getCanvasBorder()),S.forEach((function(t){return t.setRange([Y.leftBorder,a-(Y.leftBorder+Y.rightBorder)/2])})),x.forEach((function(t,e){var n="canvas_"+e,r=k[n],o=r.x,l=r.y,s=t.x,c=t.y,u=A,d=A+a,f=y.getChildren(n)[0],h=P+Y.topBorder,g=h+i/U.totalProportions*U.proportions[e],p=[];c.forEach((function(t,n){t.scale.setRange([i/U.totalProportions*U.proportions[e]-Y.bottomBorder-6,Y.topBorder])})),f.getState("removed")||(Y=f.getCanvasBorder(),f.setPadding({top:6}),f.setDimension({width:a,height:i/U.totalProportions*U.proportions[e]}),o.forEach((function(t){var e=s[lt(t)],i=y.getChildren(t)[0],n=i.getDimension();e.overlap?p.push(t):"top"===e.align?(i.setTranslation(A+Y.leftBorder,h),h+=n.top):"bottom"===e.align&&(i.setTranslation(A+Y.leftBorder,g),g+=n.bottom)})),f.setTranslation(A,h),p.forEach((function(t){var n=s[lt(t)],a=y.getChildren(t)[0],r=a.getDimension();"top"===n.align?a.setTranslation(A+Y.leftBorder,h):"bottom"===n.align&&a.setTranslation(A+Y.leftBorder,h+i/U.totalProportions*U.proportions[e]-r.bottom)})),l.forEach((function(t){var e=h+6,i=c[lt(t)],n=y.getChildren(t)[0],r=n.getDimension();i.overlap?"left"===i.align?n.setTranslation(A,e):"right"===i.align&&n.setTranslation(A+a-r.right,e):"left"===i.align?(u-=r.left,n.setTranslation(u,e)):"right"===i.align&&(n.setTranslation(d,e),d+=r.right)})),P=g+z)}))},i._setDataLabelStyle=function(){return this},i._checkInvalidData=function(){var t=this.getFromEnv("dataSource"),e=this.getFromEnv("chartInstance");return!t.data&&(e.__state.dataReady=!1,e.jsVars.hasNativeMessage=!0,e.jsVars.drawCount+=1,!0)},i._checkInvalidSpecificData=function(){var t=this.getFromEnv("dataSource");if(t.data&&"function"==typeof t.data.getData){var e=t.data.getData().schema;return!(Array.isArray(e)&&e.filter((function(t){return"date"===t.type})).length&&e.filter((function(t){return"number"===t.type})).length)}return!0},i.setYScaleLimit=function(t,e,i,n){void 0===n&&(n=!0);var a,r,o,l,s=this,c=s.config,u=c.scaleDsMap,d=u[t],f={start:h.UNDEF,end:h.UNDEF},g=function(e){var i=e.scale;return i&&i.getId()===t},m=c.focusAxesY.find(g),v=c.contextAxesY.find(g),y=m||v,b=y&&y.scale;if(b){for(var x in d||(d=u[t]={}),(a=d[e])||(a=d[e]={}),a.limit=i,a.baseRequired=n,d)if(d.hasOwnProperty(x)){var k=d[x],S=(0,p["default"])([r,o].concat(k.limit));r=S[0],o=S[1],l=l||k.baseRequired}"log"===b.getType()?b.setDomain(Ct(r,o,y.min,y.max,y.base,l)):b.setDomain(wt(r,o,y.min,y.max,l)),(0,h.defined)(r)&&(f.start=-Infinity,f.end=Infinity),m&&c.focusPanels.forEach((function(t,e){var i="canvas_"+e,n=c.canvasAxisMap[i],a=n&&n.y;a&&a.forEach((function(t){s.getChildren(t).forEach((function(t){t.getScale()===b&&(t.setTickVisibilityLimit(f),t.placeAxis(),t.asyncDraw())}))}))}))}},i.setXScaleLimit=function(t,e,i){var n,a,r,o,l,s=this,c=s.config,u=c.scaleDsMap,d=u[t],f=s.getFromEnv("UTC")?J:K,g={start:c.rawDataXStart,end:Infinity},m=s.getContextLimit(),v=m[0],y=m[1],b=function(e){var i=e.scale;return i&&i.getId()===t},x=c.focusAxesX.find(b),S=c.contextAxesX.find(b),_=x||S,C=this.getFromEnv("contextBins")[0],w=C.getBinMin()[2],E=C.getRangeThreshold(),D=E[0]._name,M=_&&_.scale;if(M){for(var T in d||(d=u[t]={}),(n=d[e])||(n=d[e]={}),n.limit=i,d)if(d.hasOwnProperty(T)){var F=d[T],I=(0,p["default"])([a,r].concat(F.limit));a=I[0],r=I[1]}if((0,h.defined)(a)&&(g.start=Math.min(a,c.rawDataXStart),g.end=Infinity),x){var L=s.getFocusLimit();o=L[0],l=L[1],+o===v&&(0,k["default"])(a)&&(o=Math.min(o,a)),+l===y&&(0,k["default"])(r)&&(l=Math.max(l,r)),Math.ceil((l-o)/E[2])<3&&w===E[2]&&(o=+f[D].offset(l,-3*E[1])),M.setDomain([o,l]),c.focusPanels.forEach((function(t,e){var i="canvas_"+e,n=s.getChildren(i),a=n&&n[0],r=c.canvasAxisMap[i],o=r&&r.x;o&&a&&(a.asyncDraw(),o.forEach((function(t){s.getChildren(t).forEach((function(t){t.getScale()===M&&(t.setTickVisibilityLimit(g),t.placeAxis(),t.asyncDraw())}))})))}))}else o=(0,k["default"])(a)?Math.min(v,a):v,l=(0,k["default"])(r)?Math.max(y,r):y,Math.ceil((l-o)/E[2])<3&&w===E[2]&&(o=+f[D].offset(l,-3*E[1])),M.setDomain([o,l]),s.getChildren("timeNavigator")&&s.getChildren("timeNavigator").forEach((function(t){if(!t.getState("removed")){var e=t.getChildren("timeAxis")&&t.getChildren("timeAxis")[0];e.getState("removed")||(e.setTickVisibilityLimit(g),e.placeAxis(),e.asyncDraw())}}))}},i.setFocusLimit=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=!0);var i=this.config,n=e?this.domainValidator(t,this.getContextLimit(),i.focusLimit):t,a=i.focusAxesX[0],r=this.getFromEnv("focusBins")[0],o=this.getFromEnv("focusScalesX")[0],l=this.getFocusLimit(),s=r.getRangeThreshold();if(i.focusLimit=n,this.fireChartInstanceEvent("selectionChange",{start:+n[0],end:+n[1],binUnit:s[0].name(),binMuliplier:s[1]}),(0,d["default"])(n,l))return!1;r.setBinDomain(n);var c=r.getRangeThreshold();return o.setRangeThreshold(c),this.fireEvent("focusLimitChanged"),a.filterInfo&&a.filterInfo.query&&(a.filterInfo.query._updateArgs(+c[0].offset(+n[0],-2*c[1]),+c[0].offset(+n[1],2*c[1])),a.filterInfo.table.flushResults(),this.updateVerticalAxesWidth()),l!==h.UNDEF&&this._updateAffectedVisuals({legendInteracted:null}),!0},i.updateVerticalAxesWidth=function(){var t,e=this,i=e.config.canvasAxisMap,n=Object.keys(i),a={left:0,right:0};n.forEach((function(n){i[n].y.forEach((function(i){e.getChildren(i).forEach((function(e){"number"==typeof(t=e.getDimension()).left?a.left=Math.max(a.left,t.left):"number"==typeof t.right&&(a.right=Math.max(a.right,t.right))}))}))})),n.forEach((function(t){i[t].y.forEach((function(t){e.getChildren(t).forEach((function(t){t.updateMaxLabelSpace(a[t.getAlignment()])}))}))}))},i.getFocusLimit=function(){var t=this.config.focusLimit;return t&&t.slice()},i.setContextLimit=function(t){void 0===t&&(t=[]);var e=this.config,i=this.getFromEnv("contextScalesX")[0],n=this.getFromEnv("contextBins");(0,d["default"])(t,this.getContextLimit())||(e.contextLimit=t.slice(),n[0].setBinDomain(t),i.setRangeThreshold(n[0].getRangeThreshold()),!e.navigatorEnabled&&i.setDomain(e.contextLimit),this.fireEvent("contextLimitChanged"))},i.getContextLimit=function(){return(this.config.contextLimit||[]).slice()},e}(w["default"]);e["default"]=Bt},740:function(t,e,i){"use strict";e.__esModule=!0,e["default"]=void 0;var n=function(){function t(){this.unknown="implicit",this.domain=[],this.ordinalRange=[],this.map=new Map}var e=t.prototype;return e.setDomain=function(t){var e,i,n;for(void 0===t&&(t=[]),this.domain=[],this.map.clear(),e=0;e<t.length;++e)n=(i=t[e]).toString(),this.map.has(i)||this.map.set(n,this.domain.push(i));return this},e.getDomain=function(){return this.domain.slice()},e.setRange=function(t){return this.ordinalRange=t.slice(),this},e.getRange=function(){return this.ordinalRange.slice()},e.setUnknown=function(t){return this.unknown=t,this},e.getUnknown=function(){return this.unknown},e.copy=function(){return(new t).setDomain(this.getDomain()).setRange(this.getRange()).setUnknown(this.geUnknownn())},e.getRangeValue=function(t){var e=this.map,i=t.toString(),n=this.getRange(),a=e.get(i);if(!a){if("implicit"!==this.getUnknown())return this.getUnknown();a=this.domain.push(t),e.set(i,a)}return n[(a-1)%n.length]},e.getType=function(){return"ordinal"},t}();e["default"]=n},741:function(t,e,i){"use strict";e.__esModule=!0,e["default"]=void 0;e["default"]=function(t){return""!==t&&"number"==typeof+t&&!isNaN(+t)&&t!==Infinity&&t!==-Infinity}},742:function(t,e,i){"use strict";var n=i(187);e.__esModule=!0,e["default"]=void 0;var a=n(i(743));e["default"]=function(t){return(0,a["default"])(t)&&t.length}},743:function(t,e,i){"use strict";e.__esModule=!0,e["default"]=void 0;e["default"]=function(t){return"string"==typeof t}},744:function(t,e,i){"use strict";var n=i(187);e.__esModule=!0,e.getFormatStore=e.getAtomicity=void 0;var a=i(366),r=n(i(745));e.getAtomicity=function(t){var e,i,n,a,o,l,s,c=t.timeUnits,u=void 0===c?[]:c,d=t.store,f=void 0===d?{}:d,h=t.index,g=t.data,p=void 0===g?[]:g,m=t.bins,v=t.intervalIndexMap,y=t.ms,b={count:0},x=p.length;if(!u.length)return[];if(1===x||0===x)return[u[0].ms,1,u[0].ms];for(u.forEach((function(t){var e=t.name,i=f[e];i&&Object.keys(i).forEach((function(t){var n=i[t];b.count<=n&&(b.count=n,Object.assign(b,{multiplier:Number(t),unit:{name:e,ms:m[v[e.toLowerCase()]][2]}}))}))})),e=1;e<x;++e)n=p[e-1][h],a=p[e][h],i=y.count(n,a),Math.max(0,i)&&(o=(0,r["default"])(m,v,u,i),(s=f[o.unit.name])[o.multiplier]||(s[o.multiplier]=0),l=++s[o.multiplier],(b.count<l||b.count===l&&b.unit.ms*b.multiplier>o.unit.ms*o.multiplier)&&(b.count=l,Object.assign(b,o)));return b.count?[b.unit.ms,b.multiplier,b.multiplier*b.unit.ms]:[u[0].ms,1,u[0].ms]},e.getFormatStore=function(t){void 0===t&&(t="");var e=[],i={};return/%[_ -]?[cfLQ]/.test(t)&&(e.push(a.DatetimeUnits.Millisecond),i[a.DatetimeUnits.Millisecond.name]={}),/%[_ -]?[sSX]/.test(t)&&(e.push(a.DatetimeUnits.Second),i[a.DatetimeUnits.Second.name]={}),/%[_ -]?M/.test(t)&&(e.push(a.DatetimeUnits.Minute),i[a.DatetimeUnits.Minute.name]={}),/%[_ -]?[HI]/.test(t)&&(e.push(a.DatetimeUnits.Hour),i[a.DatetimeUnits.Hour.name]={}),/%[_ -]?[dejuwx]/.test(t)&&(e.push(a.DatetimeUnits.Day),i[a.DatetimeUnits.Day.name]={}),/%[_ -]?[bBm]/.test(t)&&(e.push(a.DatetimeUnits.Month),i[a.DatetimeUnits.Month.name]={}),/%[_ -]?[yY]/.test(t)&&(e.push(a.DatetimeUnits.Year),i[a.DatetimeUnits.Year.name]={}),{timeUnits:e,store:i}}},745:function(t,e,i){"use strict";e.__esModule=!0,e["default"]=void 0;e["default"]=function(t,e,i,n){var a,r,o,l,s=i.length,c=n;for(c>2592e6&&c<=157248e5&&c/30%1<.067&&(c=2592e6*Math.floor(c/2592e6)),a=0;a<s;a++)for(r=e[(o=i[a]).name.toLowerCase()];t[r]&&t[r][0].name()===o.name.toLowerCase();){if(c<=(l=t[r])[2])return{unit:o,multiplier:l[1]};r++}return{unit:i[a-1],multiplier:Math.round(c/i[a-1].ms)}}},746:function(t,e,i){"use strict";var n=i(187);e.__esModule=!0,e.DEFAULT_THRESHOLD_PIXELS=e._calculateIndexOfIntervals=e["default"]=void 0;var a=n(i(474)),r=function(t){return new Date(t)},o=function(t,e){for(var i=0,n=t.length-1,a=n,r=Math.floor((n+i)/2),o=e instanceof Array?e[2]:e.unit.ms*e.multiplier;i<n;){if(o<t[r][2])a=n=r-1;else{if(!(o>t[r][2])){a=r;break}i=r+1}r=Math.floor((n+i)/2)}return e instanceof Array?t[a]:t[a][2]===o?t[a]:[t[a-1][0],e.multiplier,o]},l=function(t){var e,i={};for(e=t.length-1;e>=0;e--)i[t[e][0].name()]=e;return i};e._calculateIndexOfIntervals=l,e.DEFAULT_THRESHOLD_PIXELS=4;var s=function(){function t(t){this.setStandardBins(t),this.binRange=[0,1],this.binDomain=[0,1],this.thresholdPixels=4,this.intervalIndexMap=l(this.getStandardBins()),this.minBin=[]}var e=t.prototype;return e.setStandardBins=function(t){this.standardBins=t},e.getStandardBins=function(){return this.standardBins},e.setScale=function(t){this.scale=t},e.getScale=function(){return this.scale},e._computeRangeThreshold=function(t){var e,i,n,a=this.getBinRange(),r=a[0],o=a[1],l=(e=t,i=1,n=Math.abs(r-o),Math.min(Math.max(e,i),n)),s=+this.getScale().getDomainValue(0),c=+this.getScale().getDomainValue(l),u=Math.abs(c-s),d=this.getBinMin(),f=this.getBinMax(),h=this.standardBins.findIndex((function(t){return t[2]>=u})),g=-1===h?this.standardBins.length-1:h;this.standardBins[g][2]<d[2]?this._threshold=d:f&&this.standardBins[g][2]>f[2]&&f[2]>=d[2]?this._threshold=f:this._threshold=this.standardBins[g]},e.setBinRange=function(t){return this.binRange=t.slice(),this.getScale().setRange(this.binRange),this.getScale().setDomain(this.binDomain),this._computeRangeThreshold(this.thresholdPixels),this},e.getBinRange=function(){return this.binRange},e.setBinDomain=function(t){return this.binDomain=t.slice(),this.getScale().setRange(this.binRange),this.getScale().setDomain(this.binDomain),this._computeRangeThreshold(this.thresholdPixels),this},e.getBinDomain=function(){return this.binDomain.slice().map(r)},e.setBinMin=function(t){var e=o(this.standardBins,t);return(0,a["default"])(e,t)||(this.minBin=e,this._computeRangeThreshold(this.thresholdPixels)),this},e.getBinMin=function(){return this.minBin},e.setBinMax=function(t){this.maxBin=o(this.standardBins,t)},e.getBinMax=function(){return this.maxBin},e.setRangeThreshold=function(t){return void 0===t&&(t=4),t!==this.thresholdPixels&&this._computeRangeThreshold(this.thresholdPixels=t),this},e.getRangeThreshold=function(){return this._threshold},t}();e["default"]=s},747:function(t,e,i){"use strict";e.__esModule=!0,e["default"]=void 0;e["default"]=function(t){return void 0===t&&(t=""),t.charAt(0).toUpperCase()+t.slice(1)}},748:function(t,e,i){"use strict";var n=i(191),a=i(187);e.__esModule=!0,e["default"]=void 0;var r=a(i(192)),o=n(i(746)),l=i(193),s=i(749),c=