1"use strict";(self.webpackChunkgouw7r2_core_ui_react_client=self.webpackChunkgouw7r2_core_ui_react_client||[]).push([[1779,8801],{78801:(e,t,s)=>{s.r(t),s.d(t,{Chart:()=>g});var i=s(85893),o=s(67294),r=s(36007),a=s(25746),n=s(35369),l=s(10473),c=s(30523),d=s(36638),p=s(26495),h=s(69449),u=(s(53138),s(5397));h.kL.register(h.vn,h.ZL,h.ST,h.jn,h.jI,h.qi,h.od,h.uw,h.f$,h.FB,h.Gu,h.De,h.u,h.wL);class g extends r.p{static createStores(e){const t={};for(const s of e.series)t[s.blockId]=d.i.blockStoreFactory.getOrCreate(e.viewId,s.blockId);return t}constructor(e){super(e,g.createStores(e)),this.chartRef=o.createRef(),this.dblClickhelper=new a.C,this._onDoubleClick=(e,t)=>{const s=this.getBlockStore(e).getData().items.get(t),i=s._id;l.mf(this.props.series[e].onDoubleClick)?this.props.series[e].onDoubleClick(i,s):(d.i.actionCreators.viewStateChanged(this.props.viewId,this.props.id+":__doubleClick","value",`${e};${i}`),d.i.actionCreators.executeServerAction(this.props.viewId,this.props.id+":__doubleClick"))},this._select=e=>{const t=(0,p.cX)(this.chartRef.current,e)[0];if(void 0!==t){const e=t.index,s=this.props.series.length-t.datasetIndex-1,i=this.props.series[s];if("SINGLE"===i.selectionMode){const t=this.getBlockStore(s),o=t.getData().items.get(e)._id,r=n.l4.of(o);d.i.actionCreators.selectionChanged(t,r,o),l.mf(i.onSelectionChanged)&&i.onSelectionChanged(r)}this.dblClickhelper.onDoubleClick((()=>this._onDoubleClick(s,e)),{pointIndex:e,seriesIndex:s})}}}getStateFromStore(){const e={data:{}};for(const t of this.props.series)e.data[t.blockId]=this.getStoreByName(t.blockId).getData().items.toArray();return e}getBlockStore(e){return this.getStoreByName(this.props.series[e].blockId)}getChartJsType(e){const t={label:e.name,borderColor:e.lineColor?e.lineColor:void 0,backgroundColor:e.fillColor?e.fillColor:void 0};switch(e.type){case"Line":return Object.assign(Object.assign({},t),{type:"line",borderWidth:3,pointRadius:4,pointHoverRadius:8,pointStyle:!!e.showPoints&&"circle",showLine:e.showLine});case"StackingArea":case"Area":return Object.assign(Object.assign({},t),{type:"line",borderWidth:3,pointRadius:4,pointHoverRadius:8,fill:!0,pointStyle:!!e.showPoints&&"circle",showLine:e.showLine});case"Bar":case"Column":case"StackingColumn":case"StackingBar":return Object.assign(Object.assign({},t),{type:"bar",barThickness:e.width?e.width:void 0});default:throw new u.Z(e.type)}}getData(){const e="time_series"===this.props.type,t=this.props.series[0],s=this.state.data[t.blockId].map((e=>e[t.fieldX])),i=this.props.series.map(((t,s)=>Object.assign({id:s,data:this.state.data[t.blockId].map((s=>({x:e?c._3(s[t.fieldX]):s[t.fieldX],y:s[t.fieldY].replace(/\./g,"").replace(/,/g,".")})))},this.getChartJsType(t)))).reverse();return e?{datasets:i}:{labels:s,datasets:i}}getOptions(){const e=this.props.series.some((e=>"StackingArea"===e.type||"StackingBar"===e.type||"StackingColumn"===e.type)),t=this.props.series.some((e=>"Bar"===e.type||"StackingBar"===e.type)),s="time_series"===this.props.type?{type:"time",time:{tooltipFormat:"dd-MM-yyyy"}}:{};return{maintainAspectRatio:!1,plugins:{colors:{enabled:!0},legend:{display:this.props.showLegend,position:"bottom"}},responsive:!0,indexAxis:t?"y":"x",scales:{x:Object.assign(Object.assign({},s),{stacked:e}),y:{stacked:e}}}}render(){var e,t,s,o;return 0==(null!==(t=null===(e=this.props.series)||void 0===e?void 0:e.length)&&void 0!==t?t:0)?null:(0,i.jsx)("div",{id:this.props.id,style:{position:"absolute",width:null!==(s=this.props.width)&&void 0!==s?s:"100%",height:null!==(o=this.props.height)&&void 0!==o?o:"100%"},children:(0,i.jsx)(p.kL,{ref:this.chartRef,datasetIdKey:"id",type:"line",options:this.getOptions(),data:this.getData(),onClick:this._select})})}}g.defaultProps={showLegend:!1,timeSeries:!1}},25746:(e,t,s)=>{s.d(t,{C:()=>o});var i=s(10473);class o{constructor(){this.clicked=null}onDoubleClick(e,t=!0){clearTimeout(this.curInterval),null!==this.clicked&&i.wU(t,this.clicked)&&(this.clicked=null,e()),this.clicked=t,this.curInterval=setTimeout((()=>{this.clicked=null}),300)}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.