@nebula.js/sn-combo-chart 1.19.0 → 1.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-combo-chart v1.19.0
2
+ * @nebula.js/sn-combo-chart v1.19.2
3
3
  * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","react","react-dom","qlik-object-conversion"],(function(e){"use strict";var t,n,r,o,i,a,s,l,c,u,d,p,m,f,h,g,v,y,b,x,S,E,M,C,w,k,N,T,O,R,A,L,I,P,D,q,z,B,$,F,H,j,V;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,o=e.useRect,i=e.usePromise,a=e.useStaleLayout,s=e.useModel,l=e.useApp,c=e.useAppLayout,u=e.usePlugins,d=e.useEmbed,p=e.useOptions,m=e.useTranslator,f=e.useTheme,h=e.useDeviceType,g=e.useConstraints,v=e.useLayout,y=e.useAction,b=e.useSelections,x=e.onTakeSnapshot,S=e.useImperativeHandle},function(e){E=e.getValue,M=e.cache,C=e.debouncer,w=e.throttler,k=e.colorService,N=e.tooltipService,T=e.layoutService,O=e.dockService,R=e.themeService,A=e.pluginService,L=e.storage,I=e.selectionService,P=e.setValue},function(e){D=e.default},function(e){q=e.default},function(e){z=e.default},function(e){B=e.default,$=e.Children,F=e.isValidElement,H=e.cloneElement},function(e){j=e.default},function(e){V=e.default}],execute:function(){e("default",(function(e){var b,C;const{flags:k}=e,N=null===(b=e.anything)||void 0===b||null===(C=b.sense)||void 0===C?void 0:C.isUnsupportedFeature,I=(()=>{const e=q();return e.use(z),e.use(function(e){if("function"!=typeof e.interaction)return function(t){t.interaction("hammer",sp(e))};return void e.interaction("hammer",sp(Hammer))}(D)),e.use(Yw),e.use(function(){return function(e){e.renderer("react",function(){function e({x:e,y:t,width:n,height:r,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,o=e();const i={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=o.scaleRatio.x,n=o.scaleRatio.y;return r.style.left=Math.round(o.margin.left+o.x*t)+"px",r.style.top=Math.round(o.margin.top+o.y*n)+"px",r.style.width=Math.round(o.width)+"px",r.style.height=Math.round(o.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",j.render(function(e,t){return B.createElement(Ag,{generateClassName:t},B.createElement(ov,{theme:Ww},e))}(e,_w),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&j.unmountComponentAtNode(r),i),destroy(){r&&r.parentElement&&(j.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(o=e(t)),o)};return i}}()),e.component("data-title",function(){function e({title:e,selected:t,onClick:n}){const r=xe.detectTextDirection(e);return B.createElement(FS,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},B.createElement(VS,{style:{minWidth:32}},B.createElement(Rw,{d:t?Iw:""})),B.createElement(US,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:o,dock:i,list:a,onClose:s,show:l,instruction:c}){const u=a.map(((t,r)=>B.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return B.createElement(QS,lp({anchorEl:t,open:l,onClose:s},jw[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),B.createElement(zS,{dense:!0,dir:o,"aria-label":c,component:"nav"},B.createElement(e,{title:r,selected:!0,onClick:s}),u))}e.propTypes={title:cp.exports.string.isRequired,selected:cp.exports.bool,onClick:cp.exports.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:cp.exports.any,changeTo:cp.exports.func.isRequired,current:cp.exports.string.isRequired,dir:cp.exports.string.isRequired,dock:cp.exports.string.isRequired,list:cp.exports.array,onClose:cp.exports.func.isRequired,show:cp.exports.bool.isRequired,instruction:cp.exports.string},t.defaultProps={list:[],alignTo:null};class n extends B.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=B.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:n,translator:r,disabled:o,isDimension:i,padding:a,minWidth:s,hasAlternative:l}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},u=e.breadcrumbs.length,d=o||this.state.inSelection,p=e.breadcrumbs.map(((t,n)=>B.createElement(Vw,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>d?void 0:e.drillUp(u-n),title:t},B.createElement("span",{style:c},t),B.createElement(Rw,lp({},Dw,{size:"small",style:{margin:"0 8px"}}))))),m=n&&!this.state.open?this.openPopover:this.closePopover,f=!n||o||this.state.inSelection,h={display:"flex",alignItems:"center",width:"100%",color:f&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!i&&f&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(h.background="rgba(0,0,0,0.08)");const g=e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},v=e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"};a&&(h.padding=a),s&&(h.minWidth=s);const y=xe.detectTextDirection(e.text),b=B.createElement(Vw,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:h,onClick:f?void 0:m,title:e.text,tabIndex:f?-1:0,onFocus:f?void 0:g,onBlur:f?void 0:v,onMouseDown:e=>{e.preventDefault()}},e.locked&&B.createElement(Rw,lp({},Lw,{size:"small",title:r.get("Tooltip.selections.locked")})),B.createElement("span",{style:c,dir:y},e.text),n&&B.createElement(Rw,lp({},Pw,{size:"small",style:{margin:"0 8px"}})));return B.createElement(B.Fragment,null,e.drilldown&&B.createElement(Rw,lp({},Aw,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),p,B.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:l?"auto":"none",height:"100%"}},b),n&&B.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:r.get("Accessibility.Popover.Instructions")}))}}function r(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"===e?(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}function o(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&le(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}function a(e){return e.isDimension&&le(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0}return n.propTypes={disabled:cp.exports.bool.isRequired,padding:cp.exports.string,minWidth:cp.exports.string,titleData:cp.exports.shape({breadcrumbs:cp.exports.arrayOf(cp.exports.string).isRequired,drilldown:cp.exports.bool.isRequired,index:cp.exports.number.isRequired,locked:cp.exports.bool.isRequired,text:cp.exports.string.isRequired,popoverText:cp.exports.string.isRequired,drillUp:cp.exports.func}).isRequired,popover:cp.exports.shape({dir:cp.exports.string.isRequired,dock:cp.exports.string.isRequired,changeTo:cp.exports.func.isRequired,getAlternatives:cp.exports.func.isRequired}),translator:cp.exports.shape({get:cp.exports.func.isRequired}).isRequired,selections:cp.exports.shape({isActive:cp.exports.func,addListener:cp.exports.func,removeListener:cp.exports.func}),style:cp.exports.shape({fontSize:cp.exports.string,color:cp.exports.string,fontFamily:cp.exports.string}).isRequired,isDimension:cp.exports.bool.isRequired,hasAlternative:cp.exports.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:s,hyperCube:l,hyperCubeDef:c,isDimension:u,minWidth:d,model:p,onChangeToAlternative:m,padding:f,rtl:h,selections:g,skipAttributeExpressions:v,translator:y},layout:{dock:b}}=this.settings,x="top"!==b&&"bottom"!==b||!h?"ltr":"rtl",S=r(b,this.rect),E=c&&c.qLayoutExclude&&c.qLayoutExclude.qHyperCubeDef,M=E&&E[u?"qDimensions":"qMeasures"]||[],C=s||l[u?"qDimensionInfo":"qMeasureInfo"],w=u?Bw:Fw,k=u?$w:Hw,N=p&&p.colorSupport&&p.modifiers&&w({altList:M,app:e,dir:h?"rtl":"ltr",dock:o(b),model:p,onChange:m,skipAttributeExpressions:v,translator:y}),T=a(this.settings.settings)||i(this.settings.settings),O=C.map(((e,r)=>{const o="number"==typeof e.explicitColumn?e.explicitColumn:r,i=k(e,o,p),a=r===C.length-1;return B.createElement(B.Fragment,{key:e.cId},B.createElement(n,{popover:N,titleData:i,model:p,translator:y,selections:g,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:d,hasAlternative:T}),!a&&B.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return B.createElement("div",{style:S,dir:x},O)}}}()),e.component("disclaimer",function(){class e extends B.Component{render(){const{label:e,spanStyle:t}=this.props;return B.createElement(B.Fragment,null,B.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}function t(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":r.width=n.height+"px",r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=n.height+"px",r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=n.width+"px",r.height=n.height+"px",r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}return e.propTypes={label:cp.exports.string.isRequired,spanStyle:cp.exports.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:n,rtl:r},layout:{dock:o},style:i={}}=this.settings,a="top"!==o&&"bottom"!==o||!r?"ltr":"rtl",s=t(i,o,this.rect),l="center"===o?n:"* "+n,c="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return B.createElement("div",{style:s,dir:a},B.createElement(B.Fragment,null,B.createElement(e,{label:l,spanStyle:c})))}}}())}}()),e.component("scrollbar",Qs),e.component("point-label",iN),e.component("label-space",aN),e.component("time-axis",Pd.picassoComponents.timeAxis),e.component("axis-overlay",Pd.picassoComponents.axisOverlay),e.component("reference-line-labels",za),e.component("box-sliced-hat",rk),e.component("box-out-of-bounds",Zw),e.component("data-out-of-bounds-marker",sN),e.component("scroll-hint",Fi),e.component("brush-highlighter",yN),e.scale("time",Pd.picassoScales.time),e.symbol("line-point",lN),e})();return{qae:dA(e),ext:DA(e),component(){const e=function(){const[e,t]=n();return r((()=>t(M())),[]),e}(),b=function(){const[e,t]=n();return r((()=>{t(L({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),C=function(){const e=p(),t=m(),o=d(),i=f(),[a,s]=n(),l=h();return r((()=>{s({options:{direction:"ltr",...e},translator:t,theme:i,embed:o,deviceType:l})}),[e.direction,e.freeResize,t.language(),i.name(),l]),a}(),P=function(){const e=g(),[t,o]=n(!1),[i,a]=n(!1),[s,l]=n(!1),c=function(){const e=g(),[t,o]=n(!1),[i,a]=n({}),[s,l]=n();return r((()=>()=>{a({})}),[]),r((()=>{e&&o(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>i[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=i[e])||void 0===n?void 0:n.indexOf(t);r>-1&&i[e].splice(r,1)},on:(e,t)=>{Array.isArray(i[e])?i[e].push(t):i[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),u=function(){var e,t,o;const i=g(),[a,s]=n(!1),[l,c]=n(!1),u=v(),d=m(),p=!!u.qSelectionInfo.qInSelections,f=!(null===(e=u.qHyperCube)||void 0===e||null===(t=e.qDimensionInfo)||void 0===t||null===(o=t[0])||void 0===o||!o.qIsOneAndOnlyOne);r((()=>{i&&s(!i.select&&!i.active)}),[i]);const h=e=>{c("boolean"==typeof e?e:!l)};return y((()=>({key:"lasso",label:d.get(l?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:tA,hidden:!a||!p||f,active:l,action:h})),[p,f,l,a,d.language()]),{action:h,enabled:()=>a,active:()=>l}}();let d=nA;r((()=>{e&&(o(!e.active),a(!e.active),l(!e.passive))}),[e]);const[p]=n({});return p.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||nA}},p.interact={enabled:()=>i},p.tooltip={enabled:()=>s},p.lasso=u,p.select=c,p}(),D=function({picasso:e,environment:o}){const i=t(),[a,s]=n();return r((()=>{if(!o)return;i.style.overflow="hidden";const t=e({renderer:{prio:[o.options.renderer||"canvas"]}}).chart({element:i,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[o]),a}({picasso:I,environment:C}),q=iA({chart:D,actions:P}),z=(({picasso:e,chart:t,environment:p,flags:m,viewState:f,viewCache:h,actions:g,selectionService:v})=>{const y=a(),{width:b,height:x}=o(),[S,C]=n(),[k,N]=n(),L=s(),I=l(),P=c(),D=u(),q=d();r((()=>{if(!(y&&null!=t&&t.update&&p&&f))return;const n=T({source:y,metaAdditionsFn:ZO()}),{options:r,translator:o}=p,{direction:i,viewState:a={}}=r,s="rtl"===i,{legendScrollOffset:l,scrollOffset:c}=n.meta.isSnapshot?n.getLayoutValue("snapshotData.content.chartData",{}):a;f.preventSet("scrollOffset",c),f.preventSet("legendScrollOffset",l),f.preventSet("title",n.getLayoutValue("title"));const u=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=function({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;if(n)return function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t});if(r)return function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t});return function({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(fe).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),o=t.getHyperCubeValue("qDimensionInfo"),i="K"===r&&o.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo");return{reducedCube:{qDataPages:a,qDimensionInfo:o.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize")}}}))}(e,t,{path:"/qHyperCubeDef",rect:QO({layoutService:t}),zoomLevel:-1,filter:"D1"})}}({genericObjectModel:e,layoutService:t})}({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:L,layoutService:n}),d=O({chart:t,layoutService:n,config:{logicalSize:{width:b,height:x},rtl:s},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),S=function({layoutService:e,dockService:t}){const{BAR:n,LINE:r,POINT:o}=$l,i=JR({layoutService:e,key:"bar"}),a=JR({layoutService:e,key:"line"}),s=()=>i({property:"width",defaultValue:.7}),l=()=>{const e=i({property:"strokeWidth",defaultValue:"none"});return e?n.STROKE.WIDTH[e.toUpperCase()]:0};return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>s(),getHasStrokeWidth:()=>!!l(),getStrokeWidth:()=>l(),getStrokeColor:()=>i({property:"strokeColor",defaultValue:{index:-1,color:n.STROKE.COLOR}}).color},line:{getCurveFn:()=>(e,t)=>a({property:"lineCurve",defaultValue:r.CURVE.LINEAR,index:t}),getStrokeWidthFn:()=>(e,n)=>a({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?r.WIDTH.FULL.DEFAULT:r.WIDTH.LESS.DEFAULT,index:n}),getStrokeDasharrayFn:()=>(e,t)=>{const n=a({property:"lineType",defaultValue:r.TYPE.SOLID,index:t});return n&&r.TYPE[n.toUpperCase()]}},point:{getSize:e=>a({property:"dataPointSize",defaultValue:o.SIZE.DEFAULT,index:e})}}}}({layoutService:n,dockService:d}),k=(({layoutService:e})=>{const t=!JO(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[Ua.BAR]:0,[Ua.LINE]:0,[Ua.MARKER]:0};return({series:r=Ga},o)=>{const i=MN(r,t),a=su(r);return{id:o,type:a,typeIndex:n[a]++,ref:"qMeasureInfo/"+o,refIndex:o,isPrimary:i,scale:i?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY,collection:i?_a.COLLECTION.PRIMARY:_a.COLLECTION.SECONDARY,options:EN({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>su(e)===t)).length,o=n.filter((e=>e.isPrimary)),i=n.filter((e=>!e.isPrimary)),a=[!!o.length&&o[0],!!i.length&&i[0]].filter((e=>!!e)),s=r(n,Ua.BAR),l=r(o,Ua.BAR),c=r(i,Ua.BAR),u=e=>n.filter((t=>su(t)===e)),d=u(Ua.LINE).map((e=>Ol(_a.COMPONENT.POINT,e))),p=u(Ua.MARKER).map((e=>({key:Ol(_a.COMPONENT.MARKER,e),type:e.options.marker}))),m=p.map((e=>e.key)),f=[];l>0&&f.push(`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`);c>0&&f.push(`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`);const h=[...f,...d,...m],{MINI_CHART:g}=_a.COMPONENT,v=u(Ua.LINE).map((e=>Ol(g.LINE,e))),y=u(Ua.MARKER).map((e=>Ol(g.MARKER,e))),b=e.meta.isContinuous?[`${g.BAR}-${Ya.PRIMARY}`,`${g.BAR}-${Ya.SECONDARY}`,...v,...y]:[];return{meta:{allSeries:n,primarySeries:o,secondarySeries:i,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:c,measureAxes:a,pointComponentKeys:d,markerComponentKeys:m,barComponentKeys:f,seriesComponentKeys:h,miniComponentKeys:b,markers:p},query:{all:()=>n,seriesByAxis:e=>e?o:i,series:u,isPrimary:MN}}})({layoutService:n,flags:m}),N=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:o,viewState:i,rtl:a,actions:s,picasso:l}){const c=Dd(o);return function({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:o,dockService:i,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:d,axisKey:p,renderer:m,areaBuffer:f,processDataPage:h=(()=>{})}={}}){const g=M(),v=function({qMode:e}){switch(e){case"S":default:return OR;case"K":return RR;case"T":return AR}}({qMode:o.getHyperCubeValue("qMode")}),y=function({state:e,contains:t}){return e.set(LR,[]),{add:t=>{const n=e.get(LR);n.length=0,n.push(t)},getCurrent:()=>e.get(LR)[0],getAll:()=>e.get(LR),contains:n=>t(e.get(LR)[0],n)}}({state:g,contains:v.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const o=n.patcher({layoutService:e});o.should(r)&&o(r);t.add(r)}({layoutService:o,dataStore:y,composition:v});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:f}),x=function({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:o=$R,definitionPath:i,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:o,process:i,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const o=n.release(r.qArea,l),s=i.isProcessing();if(!o&&s&&i.cancel(),!o||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());i.isProcessing()&&c&&c();const u=r(l);return i(o(u)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:zR({layoutService:r}),request:c({layoutService:r,definitionPath:i}),process:BR(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=w(((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==ER)throw e}))}),50);return function(e,{onProcessing:t=MR,onDataPage:n=MR}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),o.command.update(),n(e)}})}}({dataStore:y,composition:v,enigmaModel:r,layoutService:o,trendLineModel:a,definitionPath:u,processDataPage:h}),S=function({chart:e,componentKey:t,state:n,dataStore:r,pageData:o,layoutService:i,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:p,rtl:m}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const f=function({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:o,getItemWidths:i,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:d,scaleRange:p}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;if(t)return FR;if(!n)return HR;return r?_R:GR}({layoutService:r}),m=()=>"horizontal"===o.meta.major.orientation?t().width:t().height,f=e=>e?m()/e:0,h=(e,t)=>-(e-t)*f(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=u({layoutService:r});return{inTotal:l,inView:KR({chart:e,rect:t(),dockService:o,itemWidths:i(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(CR/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return f(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,o=Math.min(0,Math.max(e,h(n,r))),i=r?Math.abs(r*o/m()):0;return{start:{pixel:o,item:i},end:{item:Math.min(i+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return h(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const o=e/n*t,i=Math.abs(r)/o;return[i,i+e/o]}({viewSize:m(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const i=p({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:m(),upperBound:h(t.inTotal,t.inView)});return"horizontal"===o.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(i):i},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=h(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*f(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(f(r)*n)}}}}({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:i,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:m}),h=()=>{const e=f.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=f.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},v=({items:e})=>{const t=i.getLayoutValue("scrollStartPos"),n=p.get("scrollOffset");if(void 0===n)return 1===t?f.getUpperBound({items:e}):0;if("number"==typeof n)return f.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:o}=n,a=1===t&&o?o-e.inView:r;return f.convert.itemToPixelOffset({itemOffset:a,items:e})},y=e=>{const[{qArea:t}]=i.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))},b=e=>{const t=Date.now(),r=h(),i=g({pixelOffset:e,items:r}),a=f.getArea({itemOffset:i.start.item,items:r});if(y(a))return void((f.validate.offset({pixelOffset:e,items:r})||p.get("scrollOffset").start!==i.start.item)&&(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:i.start,items:r})),p.preventSet("viewRange",f.getViewRange({pixelOffset:i.start.pixel,items:r})),p.set("scrollOffset",{start:i.start.item,end:i.end.item})));p.preventSet("viewRange",f.getViewRange({pixelOffset:i.start.pixel,items:r}));const s=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:i.start,items:r})),p.set("scrollOffset",{start:i.start.item,end:i.end.item}))};o(a,{onProcessing:s,onDataPage:s})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const i=h();n.set("itemSize",f.getItemSize({items:i}));const a=v({items:i}),c=g({pixelOffset:a,items:i});p.preventSet("viewRange",f.getViewRange({pixelOffset:c.start.pixel,items:i}));const u=f.getArea({itemOffset:c.start.item,items:i});return new Promise((e=>{o(u,{onDataPage:()=>{n.set("scaleRange",f.getScaleRange({offsets:c.start,items:i})),p.preventSet("scrollOffset",{start:c.start.item,end:c.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;b(t)},scrollToRelative(e){const t=n.get("items"),r=f.convert.relativeToPixelOffset({relativeOffset:e,items:t});b(r)}}}({chart:e,componentKey:n,state:g,dataStore:y,pageData:x,layoutService:o,dockService:i,itemWidths:s,getRect:d,axisKey:p,renderer:m,areaBuffer:b,viewState:l,rtl:c}),C=function({layoutService:e,dataStore:t}){return function(n){const r=E(n,""+e.refs.dataPages);r.length=0,r.push(t.getCurrent())}}({layoutService:o,dataStore:y});return{interactions:qR({chart:e,actions:t,componentKey:n,dockService:i,rtl:c,scroller:S}),query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>y.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>C(e)}}}({chart:e,actions:s,componentKey:c,enigmaModel:t,layoutService:n,dockService:r,viewState:i,rtl:a,itemWidths:XR,options:{axisKey:_a.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:L,layoutService:n,dockService:d,seriesModel:k,viewState:f,rtl:"rtl"===p.options.direction,actions:g,picasso:e}):void 0,z=n.meta.isContinuous?eA({model:L,layoutService:n,viewState:f,viewCache:h}):void 0,B=SR({actions:g,appLayoutModel:P,appModel:I,chart:t,environment:p,flags:m,genericObjectModel:L,layoutService:n,picasso:e,seriesModel:k,viewState:f}),$=R({theme:p.theme,config:{id:"comboChart",resolve:[["object","label.value","numFontSize","12px",e=>parseInt(e,10)]]}}),F=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",o=r+":numeric",i=t.meta.primarySeries.map((e=>e.ref)),a=t.meta.secondarySeries.map((e=>e.ref)),s=n?[{key:o,from:r,override:{value:e=>e.qNum}}]:void 0;return{main:{major:r,majorNumeric:o,minorsPrimary:i,minorsSecondary:a},virtuals:s}}({layoutService:n,seriesModel:k}),H=rR({isPrimary:!0,layoutService:n,reducedModel:u,seriesModel:k,continuousModel:z,flags:m}),j=rR({isPrimary:!1,layoutService:n,reducedModel:u,seriesModel:k,continuousModel:z,flags:m}),V=yR({config:{measureAxesRef:"measureAxes.0",formatter:_a.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:H,dockService:d,seriesModel:k,themeService:$}),W=yR({config:{measureAxesRef:"measureAxes.1",formatter:_a.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:j,dockService:d,seriesModel:k,themeService:$}),_=function({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){if(pe.snapshot(e))return Promise.resolve(null);return t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}({genericObjectModel:L,layoutService:n}),U=ms({flags:m,layout:y,app:I,model:L,picasso:e,chart:t,translator:o,localeInfo:P.qLocaleInfo,embed:q,options:r}),Y=QR({chart:t,actions:g,translator:o,rtl:s,dockService:d,seriesModel:k,colorService:B,themeService:$,propertiesModel:_,custom:U}),G=function({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:o}=e.meta,i=e.getLayout(),a="K"===i.qHyperCube.qMode,s=pe.dimensionless(i),l=ya.getMeasureRefLines(i),c=ya.getDimensionRefLines(i,s),u=ya.getMeasureRefLineLabels(i),d=ya.getDimensionRefLineLabels(i,s);let p={},m={};const f=t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:o}=n;return ya.isOutOfRange({value:t,qMin:r,qMax:o})}return!1},h=t=>{if(!m[t])return!1;if(!n&&o){const n={valueInfo:m[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",o=e.getHyperCubeValue(r);return ya.isOutOfDataPages({label:n,dataPages:o})}return!0},g=()=>!(!c||!c.length)&&!c.every((t=>{const n=ya.getInputValue({refLineLayout:t,layoutService:e});return f(n)||h(n)})),v={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:d,dimensionRefLineInfo:m,dimensionValuesInfo:p,query:{getRefLines:e=>ya.getRefLines(i,e),getRefLineLabels:e=>ya.getRefLineLabels(i,e)},update:()=>{m=v.dimensionRefLineInfo,g()&&(p=ya.getDimensionValuesInfo({layout:i,canBeContinuous:r,discreteModel:t,layoutService:e}),v.dimensionValuesInfo=p,c.forEach((t=>{const n=ya.getInputValue({refLineLayout:t,layoutService:e});p[n]&&(m[n]?(m[n].innerValues=p[n].innerValues,m[n].minOrder=Math.min(m[n].minOrder,p[n].minOrder),m[n].maxOrder=Math.max(m[n].maxOrder,p[n].maxOrder),m[n].isMinOrderOk=m[n].isMinOrderOk||p[n].isMinOrderOk,m[n].isMaxOrderOk=m[n].isMaxOrderOk||p[n].isMaxOrderOk):m[n]={id:p[n].id,qText:p[n].qText,innerValues:p[n].innerValues,minOrder:p[n].minOrder,maxOrder:p[n].maxOrder,isMinOrderOk:p[n].isMinOrderOk,isMaxOrderOk:p[n].isMaxOrderOk},m[n].numInnerValues=(m[n].maxOrder||0)-(m[n].minOrder||0)+1)})))}};return v.update(),v}({layoutService:n,discreteModel:N}),K=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:_a.SCALE.MAJOR,MAJOR_INNER:_a.SCALE.MAJOR_INNER,MINOR:{PRIMARY:_a.SCALE.MINOR.PRIMARY,SECONDARY:_a.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,BAR_SECONDARY:`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`,AXIS:{MAJOR:_a.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:_a.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:_a.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:_a.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:_a.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:_a.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:_a.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:_a.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:_a.COLLECTION.MAIN}}}}(n),X=A({picassoInstance:e,plugins:D,pluginArgs:K});C({selectionService:v,genericObjectModel:L,appModel:I,dockService:d,styleModel:S,layoutService:n,fieldModel:F,seriesModel:k,reducedModel:u,primaryExtremumModel:H,secondaryExtremumModel:j,primaryTickModel:V,secondaryTickModel:W,propertiesModel:_,colorService:B,themeService:$,appLayoutModel:P,tooltipService:Y,flags:m,...N&&{discreteModel:N},...z&&{continuousModel:z},refLineModel:G,pluginService:X})}),[y,L,I,P,p,null==t?void 0:t.update,f]);const[,z]=i((()=>{if(!S)return Promise.resolve();const{layoutService:e,colorService:t,reducedModel:n,primaryExtremumModel:r,secondaryExtremumModel:o,propertiesModel:i,continuousModel:a,discreteModel:s,pluginService:l}=S,c=a?()=>{var t,n;a.update(e.getLayout());const r=a.initialFetch(),o=!e.meta.isSnapshot&&(null==p||null===(t=p.options)||void 0===t||null===(n=t.viewState)||void 0===n?void 0:n.zoom);return o&&f.preventSet("zoom",o),r}:()=>Promise.resolve(),u=t.initialize().then((()=>{const e=t.getSettings().field;v.setBrushAliases({colorField:e}),t.custom.updateLegend()})),d=()=>Promise.all([r.command.initialize(),o.command.initialize()]).then((()=>N(S)));return(()=>Promise.all([l.initialize(),n.command.initialize(),L?i.command.initialize():Promise.resolve(),u,c(),g.scroll.attachDiscreteModel(s)]))().then((()=>d()))}),[S]);if(z)throw z;return k})({picasso:I,chart:D,environment:C,flags:k,viewState:b,viewCache:e,actions:P,selectionService:q});(({picasso:e,chart:t,models:n,environment:o,viewState:a,viewCache:s,actions:l})=>{(({chart:e,models:t,viewState:n,viewCache:o})=>{r((()=>{if(!t||!n||!o)return;const{layoutService:r,continuousModel:i,refLineModel:a,seriesModel:s}=t,{miniComponentKeys:l}=s.meta,c=()=>{a&&a.update(),e.update({partialData:!0,excludeFromUpdate:[...op,...l]})};n.onChanged("scrollOffset",c),r.meta.isContinuous&&(n.onChanged("zoom",rp({layoutService:r,continuousDataModel:i},c)),n.intercept("zoom",np({viewCache:o})))}),[t,n,o])})({chart:t,models:n,viewState:a,viewCache:s}),(({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s})=>{const[,l]=i((async()=>{if(null==t||!t.update||!n||!r)return;const{layoutService:i,colorService:l,discreteModel:c}=n;function u(i=!1){t.update({settings:Qd({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s}),data:i&&[ep({models:n}),...tp({models:n}),...l.getData()]})}const d=i.getDataPages();i.setDataPages([]),u(!0),i.setDataPages(d),i.meta.isContinuous||await c.command.initialize(),u(!1)}),[null==t?void 0:t.update,n,r]);if(l)throw l})({picasso:e,chart:t,models:n,environment:o,viewState:a,viewCache:s,actions:l})})({picasso:I,chart:D,models:z,environment:C,viewState:b,viewCache:e,actions:P}),(({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:c})=>{const{width:u,height:d}=o(),[,p]=i((async()=>{if(!(null!=t&&t.update&&n&&r&&a))return;const{colorService:o,discreteModel:i,dockService:p,layoutService:m,refLineModel:f}=n;function h(){t.update({settings:Qd({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:c})})}p.update({width:u,height:d}),o.custom.updateLegend(),f.update({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l});const g=m.getDataPages();m.setDataPages([]),h(),m.setDataPages(g),m.meta.isContinuous||await i.command.initialize(),h()}),[u,d]);if(p)throw p})({picasso:I,chart:D,models:z,environment:C,viewState:b,viewCache:e,actions:P,isUnsupportedFeature:N}),(({models:e,chart:t,viewState:n})=>{x((r=>{if(!e)return;const{layoutService:o,dockService:i,colorService:a,discreteModel:s,continuousModel:l,reducedModel:c}=e,{width:u,height:d}=i.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:u,h:d}},o.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:me(t,_a.COMPONENT.LEGEND_CATEGORICAL)},o.meta.isDiscrete?(s.command.setSnapshotData(r),c.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{})))})),S((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:me(t,_a.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])})({models:z,chart:D,viewState:b})}}}));var W=Object.prototype.hasOwnProperty,_=Object.prototype.toString,U=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,G=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===_.call(e)},K=function(e){if(!e||"[object Object]"!==_.call(e))return!1;var t,n=W.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&W.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||W.call(e,t)},X=function(e,t){U&&"__proto__"===t.name?U(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},J=function(e,t){if("__proto__"===t){if(!W.call(e,t))return;if(Y)return Y(e,t).value}return e[t]},Z=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=J(s,n),s!==(o=J(t,n))&&(u&&o&&(K(o)||(i=G(o)))?(i?(i=!1,a=r&&G(r)?r:[]):a=r&&K(r)?r:{},X(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&X(s,{name:n,newValue:o}));return s};const Q="center",ee="bottom";var te={NoDataExist:{label:"NoDataExist",alignment:Q,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:Q,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:Q,default:!1},LimitedData:{label:"LimitedData",alignment:ee,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:ee,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:ee,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:ee,default:!1}};const ne=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],re={};ne.forEach((([e,{width:t,height:n}])=>{re[e]={width:t,height:n}}));const oe={getLayoutModes:()=>re,getLayoutMode(e,t){let n;for(n=0;n<ne.length;++n)if(e>=ne[n][1].width&&t>=ne[n][1].height)return ne[n][0];return"SPARK"}};const ie=["$date","$timestamp","$time"],ae=["D","TS","T"],se={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>ie.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&ae.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(se.hasTimeTag(t)&&se.hasUnknownFormat(t)||se.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&se.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous:e=>!(!(e&&e.qHyperCube&&e.qHyperCube.qDimensionInfo)||e.qHyperCube.qDimensionInfo.length<1)&&se.canBeContinuousDimension(e.qHyperCube.qDimensionInfo[0]),maxNumberOfLines:12},le=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i},ce=e=>le(e,"qHyperCube.qDimensionInfo",[]),ue=e=>le(e,"qHyperCube.qMeasureInfo",[]),de=e=>le(e,"barGrouping.grouping"),pe={continuous:(e,t=!1)=>!!se.canBeContinuous(e)&&(le(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!ce(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===de(e)&&(ce(e).length>1||ue(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&ce(e).length>1&&1===ue(e).length},groupedByMeasure(e){return this.grouped(e)&&1===ce(e).length&&ue(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==de(e)||this.continuous(e))&&(ce(e).length>1||ue(e).length>1)},stackedByDimension(e){return this.stacked(e)&&ce(e).length>1&&1===ue(e).length},stackedByMeasure(e){return this.stacked(e)&&1===ce(e).length&&ue(e).length>1},simple:e=>0===ce(e).length||1===ce(e).length&&1===ue(e).length,snapshot:e=>!!le(e,"snapshotData")};function me(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const fe=e=>{throw e.isHandled=!0,e};const he={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":return"far";case"far":return"near";default:return"far"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?he.getVerticalDock(t):n?he.getOppositeDock(he.getHorizontalDock(t)):he.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment(e,t){switch(e){case"vertical":return"near"===t||"bottom"===t?1:0;default:return"near"===t||"left"===t?0:1}},getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n},ge={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const o=t+n+r;return{latin:e.length-o,cjk:o}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let o;void 0===t?e.forEach((e=>{o=ge.getCharacterRatios(e[n]),r.latin+=o.latin,r.cjk+=o.cjk})):e.forEach((e=>{o=ge.getCharacterRatios(e[t][n]),r.latin+=o.latin,r.cjk+=o.cjk}));const i=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/i,r.cjkRatio=r.cjk/i,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const o=ge.getTotalCharacterRatios(t,n,r),i=o.latinRatio*e,a=o.cjkRatio*e;return Math.ceil(ge.stringWidthOverMWidth(i)+1.0909090909090908*a)}},ve=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),ye=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),be=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),xe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ve.test(e),isRtlChar:e=>ye.test(e)||be.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],xe.isLtrChar(r))return"ltr";if(xe.isRtlChar(r))return"rtl"}return"ltr"}},Se={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?Se.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=xe.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=xe.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:xe.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=xe.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=xe.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Se.getColorSymbol(e,t)]:[Se.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=xe.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=xe.detectTextDirection(e.value);let l;return l=o?r?[e.value,Se.getColorSymbol(t,n)]:[Se.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Ee(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Me(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ce(){}var we=.7,ke=1/we,Ne="\\s*([+-]?\\d+)\\s*",Te="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,Ae=new RegExp("^rgb\\("+[Ne,Ne,Ne]+"\\)$"),Le=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Ie=new RegExp("^rgba\\("+[Ne,Ne,Ne,Te]+"\\)$"),Pe=new RegExp("^rgba\\("+[Oe,Oe,Oe,Te]+"\\)$"),De=new RegExp("^hsl\\("+[Te,Oe,Oe]+"\\)$"),qe=new RegExp("^hsla\\("+[Te,Oe,Oe,Te]+"\\)$"),ze={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Be(){return this.rgb().formatHex()}function $e(){return this.rgb().formatRgb()}function Fe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Re.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?He(t):3===n?new _e(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?je(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?je(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ae.exec(e))?new _e(t[1],t[2],t[3],1):(t=Le.exec(e))?new _e(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ie.exec(e))?je(t[1],t[2],t[3],t[4]):(t=Pe.exec(e))?je(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=De.exec(e))?Ke(t[1],t[2]/100,t[3]/100,1):(t=qe.exec(e))?Ke(t[1],t[2]/100,t[3]/100,t[4]):ze.hasOwnProperty(e)?He(ze[e]):"transparent"===e?new _e(NaN,NaN,NaN,0):null}function He(e){return new _e(e>>16&255,e>>8&255,255&e,1)}function je(e,t,n,r){return r<=0&&(e=t=n=NaN),new _e(e,t,n,r)}function Ve(e){return e instanceof Ce||(e=Fe(e)),e?new _e((e=e.rgb()).r,e.g,e.b,e.opacity):new _e}function We(e,t,n,r){return 1===arguments.length?Ve(e):new _e(e,t,n,null==r?1:r)}function _e(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ue(){return"#"+Ge(this.r)+Ge(this.g)+Ge(this.b)}function Ye(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Ge(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ke(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Je(e,t,n,r)}function Xe(e){if(e instanceof Je)return new Je(e.h,e.s,e.l,e.opacity);if(e instanceof Ce||(e=Fe(e)),!e)return new Je;if(e instanceof Je)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Je(a,s,l,e.opacity)}function Je(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ze(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ee(Ce,Fe,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Be,formatHex:Be,formatHsl:function(){return Xe(this).formatHsl()},formatRgb:$e,toString:$e}),Ee(_e,We,Me(Ce,{brighter:function(e){return e=null==e?ke:Math.pow(ke,e),new _e(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?we:Math.pow(we,e),new _e(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ue,formatHex:Ue,formatRgb:Ye,toString:Ye})),Ee(Je,(function(e,t,n,r){return 1===arguments.length?Xe(e):new Je(e,t,n,null==r?1:r)}),Me(Ce,{brighter:function(e){return e=null==e?ke:Math.pow(ke,e),new Je(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?we:Math.pow(we,e),new Je(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new _e(Ze(e>=240?e-240:e+120,o,r),Ze(e,o,r),Ze(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Qe=Math.PI/180,et=180/Math.PI,tt=.96422,nt=.82521,rt=4/29,ot=6/29,it=3*ot*ot;function at(e){if(e instanceof st)return new st(e.l,e.a,e.b,e.opacity);if(e instanceof ft)return ht(e);e instanceof _e||(e=Ve(e));var t,n,r=dt(e.r),o=dt(e.g),i=dt(e.b),a=lt((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=lt((.4360747*r+.3850649*o+.1430804*i)/tt),n=lt((.0139322*r+.0971045*o+.7141733*i)/nt)),new st(116*a-16,500*(t-a),200*(a-n),e.opacity)}function st(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function lt(e){return e>.008856451679035631?Math.pow(e,1/3):e/it+rt}function ct(e){return e>ot?e*e*e:it*(e-rt)}function ut(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function dt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pt(e){if(e instanceof ft)return new ft(e.h,e.c,e.l,e.opacity);if(e instanceof st||(e=at(e)),0===e.a&&0===e.b)return new ft(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*et;return new ft(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function mt(e,t,n,r){return 1===arguments.length?pt(e):new ft(e,t,n,null==r?1:r)}function ft(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ht(e){if(isNaN(e.h))return new st(e.l,0,0,e.opacity);var t=e.h*Qe;return new st(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ee(st,(function(e,t,n,r){return 1===arguments.length?at(e):new st(e,t,n,null==r?1:r)}),Me(Ce,{brighter:function(e){return new st(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new st(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new _e(ut(3.1338561*(t=tt*ct(t))-1.6168667*(e=1*ct(e))-.4906146*(n=nt*ct(n))),ut(-.9787684*t+1.9161415*e+.033454*n),ut(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ee(ft,mt,Me(Ce,{brighter:function(e){return new ft(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new ft(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return ht(this).rgb()}}));var gt=-.14861,vt=1.78277,yt=-.29227,bt=-.90649,xt=1.97294,St=xt*bt,Et=xt*vt,Mt=vt*yt-bt*gt;function Ct(e){if(e instanceof wt)return new wt(e.h,e.s,e.l,e.opacity);e instanceof _e||(e=Ve(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Mt*r+St*t-Et*n)/-5.9615122912,i=r-o,a=(xt*(n-o)-yt*i)/bt,s=Math.sqrt(a*a+i*i)/(xt*o*(1-o)),l=s?Math.atan2(a,i)*et-120:NaN;return new wt(l<0?l+360:l,s,o,e.opacity)}function wt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ee(wt,(function(e,t,n,r){return 1===arguments.length?Ct(e):new wt(e,t,n,null==r?1:r)}),Me(Ce,{brighter:function(e){return e=null==e?ke:Math.pow(ke,e),new wt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?we:Math.pow(we,e),new wt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Qe,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new _e(255*(t+n*(gt*r+vt*o)),255*(t+n*(yt*r+bt*o)),255*(t+n*(xt*r)),this.opacity)}}));var kt={isDark:function(e){return mt(e).l<70}};function Nt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Tt(e){return 1===e.length&&(e=function(e){return function(t,n){return Nt(e(t),n)}}(e)),{left:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)<0?r=i+1:o=i}return r},right:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)>0?o=i:r=i+1}return r}}}var Ot=Tt(Nt).right,Rt=Math.sqrt(50),At=Math.sqrt(10),Lt=Math.sqrt(2);function It(e,t,n){var r=(t-e)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=Rt?10:i>=At?5:i>=Lt?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Rt?10:i>=At?5:i>=Lt?2:1)}function Pt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=Rt?o*=10:i>=At?o*=5:i>=Lt&&(o*=2),t<e?-o:o}function Dt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var qt="$";function zt(){}function Bt(e,t){var n=new zt;if(e instanceof zt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function $t(){}zt.prototype=Bt.prototype={constructor:zt,has:function(e){return qt+e in this},get:function(e){return this[qt+e]},set:function(e,t){return this[qt+e]=t,this},remove:function(e){var t=qt+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===qt&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===qt&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===qt&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===qt&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===qt&&++e;return e},empty:function(){for(var e in this)if(e[0]===qt)return!1;return!0},each:function(e){for(var t in this)t[0]===qt&&e(this[t],t.slice(1),this)}};var Ft=Bt.prototype;$t.prototype={constructor:$t,has:Ft.has,add:function(e){return this[qt+(e+="")]=e,this},remove:Ft.remove,clear:Ft.clear,values:Ft.keys,size:Ft.size,empty:Ft.empty,each:Ft.each};var Ht=Array.prototype,jt=Ht.map,Vt=Ht.slice;function Wt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _t(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ut(){}var Yt=.7,Gt=1/Yt,Kt="\\s*([+-]?\\d+)\\s*",Xt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zt=/^#([0-9a-f]{3})$/,Qt=/^#([0-9a-f]{6})$/,en=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),tn=new RegExp("^rgb\\("+[Jt,Jt,Jt]+"\\)$"),nn=new RegExp("^rgba\\("+[Kt,Kt,Kt,Xt]+"\\)$"),rn=new RegExp("^rgba\\("+[Jt,Jt,Jt,Xt]+"\\)$"),on=new RegExp("^hsl\\("+[Xt,Jt,Jt]+"\\)$"),an=new RegExp("^hsla\\("+[Xt,Jt,Jt,Xt]+"\\)$"),sn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ln(e){var t;return e=(e+"").trim().toLowerCase(),(t=Zt.exec(e))?new mn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=Qt.exec(e))?cn(parseInt(t[1],16)):(t=en.exec(e))?new mn(t[1],t[2],t[3],1):(t=tn.exec(e))?new mn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=nn.exec(e))?un(t[1],t[2],t[3],t[4]):(t=rn.exec(e))?un(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=on.exec(e))?hn(t[1],t[2]/100,t[3]/100,1):(t=an.exec(e))?hn(t[1],t[2]/100,t[3]/100,t[4]):sn.hasOwnProperty(e)?cn(sn[e]):"transparent"===e?new mn(NaN,NaN,NaN,0):null}function cn(e){return new mn(e>>16&255,e>>8&255,255&e,1)}function un(e,t,n,r){return r<=0&&(e=t=n=NaN),new mn(e,t,n,r)}function dn(e){return e instanceof Ut||(e=ln(e)),e?new mn((e=e.rgb()).r,e.g,e.b,e.opacity):new mn}function pn(e,t,n,r){return 1===arguments.length?dn(e):new mn(e,t,n,null==r?1:r)}function mn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function fn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function hn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vn(e,t,n,r)}function gn(e){if(e instanceof vn)return new vn(e.h,e.s,e.l,e.opacity);if(e instanceof Ut||(e=ln(e)),!e)return new vn;if(e instanceof vn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new vn(a,s,l,e.opacity)}function vn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function yn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Wt(Ut,ln,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Wt(mn,pn,_t(Ut,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new mn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Yt:Math.pow(Yt,e),new mn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+fn(this.r)+fn(this.g)+fn(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),Wt(vn,(function(e,t,n,r){return 1===arguments.length?gn(e):new vn(e,t,n,null==r?1:r)}),_t(Ut,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new vn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Yt:Math.pow(Yt,e),new vn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new mn(yn(e>=240?e-240:e+120,o,r),yn(e,o,r),yn(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var bn=Math.PI/180,xn=180/Math.PI,Sn=.96422,En=.82521,Mn=4/29,Cn=6/29,wn=3*Cn*Cn;function kn(e){if(e instanceof Nn)return new Nn(e.l,e.a,e.b,e.opacity);if(e instanceof In){if(isNaN(e.h))return new Nn(e.l,0,0,e.opacity);var t=e.h*bn;return new Nn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof mn||(e=dn(e));var n,r,o=An(e.r),i=An(e.g),a=An(e.b),s=Tn((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=Tn((.4360747*o+.3850649*i+.1430804*a)/Sn),r=Tn((.0139322*o+.0971045*i+.7141733*a)/En)),new Nn(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Nn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Tn(e){return e>.008856451679035631?Math.pow(e,1/3):e/wn+Mn}function On(e){return e>Cn?e*e*e:wn*(e-Mn)}function Rn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function An(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ln(e){if(e instanceof In)return new In(e.h,e.c,e.l,e.opacity);if(e instanceof Nn||(e=kn(e)),0===e.a&&0===e.b)return new In(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*xn;return new In(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function In(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Wt(Nn,(function(e,t,n,r){return 1===arguments.length?kn(e):new Nn(e,t,n,null==r?1:r)}),_t(Ut,{brighter:function(e){return new Nn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Nn(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new mn(Rn(3.1338561*(t=Sn*On(t))-1.6168667*(e=1*On(e))-.4906146*(n=En*On(n))),Rn(-.9787684*t+1.9161415*e+.033454*n),Rn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Wt(In,(function(e,t,n,r){return 1===arguments.length?Ln(e):new In(e,t,n,null==r?1:r)}),_t(Ut,{brighter:function(e){return new In(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new In(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return kn(this).rgb()}}));var Pn=-.14861,Dn=1.78277,qn=-.29227,zn=-.90649,Bn=1.97294,$n=Bn*zn,Fn=Bn*Dn,Hn=Dn*qn-zn*Pn;function jn(e){if(e instanceof Wn)return new Wn(e.h,e.s,e.l,e.opacity);e instanceof mn||(e=dn(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Hn*r+$n*t-Fn*n)/(Hn+$n-Fn),i=r-o,a=(Bn*(n-o)-qn*i)/zn,s=Math.sqrt(a*a+i*i)/(Bn*o*(1-o)),l=s?Math.atan2(a,i)*xn-120:NaN;return new Wn(l<0?l+360:l,s,o,e.opacity)}function Vn(e,t,n,r){return 1===arguments.length?jn(e):new Wn(e,t,n,null==r?1:r)}function Wn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function _n(e){return function(){return e}}function Un(e,t){return function(n){return e+n*t}}function Yn(e){return 1==(e=+e)?Gn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):_n(isNaN(t)?n:t)}}function Gn(e,t){var n=t-e;return n?Un(e,n):_n(isNaN(e)?t:e)}Wt(Wn,Vn,_t(Ut,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new Wn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Yt:Math.pow(Yt,e),new Wn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*bn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new mn(255*(t+n*(Pn*r+Dn*o)),255*(t+n*(qn*r+zn*o)),255*(t+n*(Bn*r)),this.opacity)}}));var Kn=function e(t){var n=Yn(t);function r(e,t){var r=n((e=pn(e)).r,(t=pn(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Gn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Xn(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=rr(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function Jn(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function Zn(e,t){return t-=e=+e,function(n){return e+t*n}}function Qn(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=rr(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var er=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tr=new RegExp(er.source,"g");function nr(e,t){var n,r,o,i=er.lastIndex=tr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=er.exec(e))&&(r=tr.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Zn(n,r)})),i=tr.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function rr(e,t){var n,r=typeof t;return null==t||"boolean"===r?_n(t):("number"===r?Zn:"string"===r?(n=ln(t))?(t=n,Kn):nr:t instanceof ln?Kn:t instanceof Date?Jn:Array.isArray(t)?Xn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Qn:Zn)(e,t)}function or(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function ir(e){return function t(n){function r(t,r){var o=e((t=Vn(t)).h,(r=Vn(r)).h),i=Gn(t.s,r.s),a=Gn(t.l,r.l),s=Gn(t.opacity,r.opacity);return function(e){return t.h=o(e),t.s=i(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function ar(e){return+e}ir((function(e,t){var n=t-e;return n?Un(e,n>180||n<-180?n-360*Math.round(n/360):n):_n(isNaN(e)?t:e)})),ir(Gn);var sr=[0,1];function lr(e){return e}function cr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function ur(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function dr(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=cr(o,r),i=n(a,i)):(r=cr(r,o),i=n(i,a)),function(e){return i(r(e))}}function pr(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=cr(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=Ot(e,t,1,r)-1;return i[n](o[n](t))}}function mr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function fr(e,t){return function(){var e,t,n,r,o,i,a=sr,s=sr,l=rr,c=lr;function u(){return r=Math.min(a.length,s.length)>2?pr:dr,o=i=null,d}function d(t){return isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),Zn)))(n)))},d.domain=function(e){return arguments.length?(a=jt.call(e,ar),c===lr||(c=ur(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=Vt.call(e),u()):s.slice()},d.rangeRound=function(e){return s=Vt.call(e),l=or,u()},d.clamp=function(e){return arguments.length?(c=e?ur(a):lr,d):c!==lr},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function hr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function gr(e){return(e=hr(Math.abs(e)))?e[1]:NaN}var vr,yr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function br(e){return new xr(e)}function xr(e){if(!(t=yr.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Sr(e,t){var n=hr(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}br.prototype=xr.prototype,xr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Er={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Sr(100*e,t)},r:Sr,s:function(e,t){var n=hr(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(vr=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+hr(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Mr(e){return e}var Cr,wr,kr,Nr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Tr(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):Mr,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Mr,s=e.percent||"%";function l(e){var t=(e=br(e)).fill,n=e.align,l=e.sign,c=e.symbol,u=e.zero,d=e.width,p=e.comma,m=e.precision,f=e.trim,h=e.type;"n"===h?(p=!0,h="g"):Er[h]||(null==m&&(m=12),f=!0,h="g"),(u||"0"===t&&"="===n)&&(u=!0,t="0",n="=");var g="$"===c?o[0]:"#"===c&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",v="$"===c?o[1]:/[%p]/.test(h)?s:"",y=Er[h],b=/[defgprs%]/.test(h);function x(e){var o,s,c,x=g,S=v;if("c"===h)S=y(e)+S,e="";else{var E=(e=+e)<0;if(e=y(Math.abs(e),m),f&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),E&&0==+e&&(E=!1),x=(E?"("===l?l:"-":"-"===l||"("===l?"":l)+x,S=("s"===h?Nr[8+vr/3]:"")+S+(E&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(c=e.charCodeAt(o))||c>57){S=(46===c?i+e.slice(o+1):e.slice(o))+S,e=e.slice(0,o);break}}p&&!u&&(e=r(e,1/0));var M=x.length+e.length+S.length,C=M<d?new Array(d-M+1).join(t):"";switch(p&&u&&(e=r(C+e,C.length?d-S.length:1/0),C=""),n){case"<":e=x+e+S+C;break;case"=":e=x+C+e+S;break;case"^":e=C.slice(0,M=C.length>>1)+x+e+S+C.slice(M);break;default:e=C+x+e+S}return a(e)}return m=null==m?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=br(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(gr(t)/3))),o=Math.pow(10,-r),i=Nr[8+r/3];return function(e){return n(o*e)+i}}}}function Or(e,t,n,r){var o,i=Pt(e,t,n);switch((r=br(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(gr(t)/3)))-gr(Math.abs(e)))}(i,a))||(r.precision=o),kr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gr(t)-gr(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-gr(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return wr(r)}function Rr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,o,i,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),0===(a=It(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),i=new Array(o=Math.ceil(t-e+1));++s<o;)i[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),i=new Array(o=Math.ceil(e-t+1));++s<o;)i[s]=(e-s)/a;return r&&i.reverse(),i}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Or(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o=t(),i=0,a=o.length-1,s=o[i],l=o[a];return l<s&&(r=s,s=l,l=r,r=i,i=a,a=r),(r=It(s,l,n))>0?r=It(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=It(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(o[i]=Math.floor(s/r)*r,o[a]=Math.ceil(l/r)*r,t(o)):r<0&&(o[i]=Math.ceil(s*r)/r,o[a]=Math.floor(l*r)/r,t(o)),e},e}function Ar(){var e=fr(lr,lr);return e.copy=function(){return mr(e,Ar())},Dt.apply(e,arguments),Rr(e)}Cr=Tr({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),wr=Cr.format,kr=Cr.formatPrefix;var Lr=new Date,Ir=new Date;function Pr(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return Pr((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return Lr.setTime(+t),Ir.setTime(+r),e(Lr),e(Ir),Math.floor(n(Lr,Ir))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var Dr=Pr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Dr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Pr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Dr:null},Dr.range;var qr=1e3,zr=6e4,Br=36e5,$r=864e5,Fr=6048e5,Hr=Pr((function(e){e.setTime(Math.floor(e/qr)*qr)}),(function(e,t){e.setTime(+e+t*qr)}),(function(e,t){return(t-e)/qr}),(function(e){return e.getUTCSeconds()}));Hr.range,Pr((function(e){e.setTime(Math.floor(e/zr)*zr)}),(function(e,t){e.setTime(+e+t*zr)}),(function(e,t){return(t-e)/zr}),(function(e){return e.getMinutes()})).range,Pr((function(e){var t=e.getTimezoneOffset()*zr%Br;t<0&&(t+=Br),e.setTime(Math.floor((+e-t)/Br)*Br+t)}),(function(e,t){e.setTime(+e+t*Br)}),(function(e,t){return(t-e)/Br}),(function(e){return e.getHours()})).range;var jr=Pr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*zr)/$r}),(function(e){return e.getDate()-1}));function Vr(e){return Pr((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*zr)/Fr}))}jr.range;var Wr=Vr(0),_r=Vr(1),Ur=Vr(2),Yr=Vr(3),Gr=Vr(4),Kr=Vr(5),Xr=Vr(6);Wr.range,_r.range,Ur.range,Yr.range,Gr.range,Kr.range,Xr.range,Pr((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})).range;var Jr=Pr((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Jr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Pr((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},Jr.range;var Zr=Pr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*zr)}),(function(e,t){return(t-e)/zr}),(function(e){return e.getUTCMinutes()}));Zr.range;var Qr=Pr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Br)}),(function(e,t){return(t-e)/Br}),(function(e){return e.getUTCHours()}));Qr.range;var eo=Pr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/$r}),(function(e){return e.getUTCDate()-1}));function to(e){return Pr((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Fr}))}eo.range;var no=to(0),ro=to(1),oo=to(2),io=to(3),ao=to(4),so=to(5),lo=to(6);no.range,ro.range,oo.range,io.range,ao.range,so.range,lo.range;var co=Pr((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));co.range;var uo=Pr((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function po(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function mo(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function fo(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}uo.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Pr((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},uo.range;var ho,go,vo,yo={"-":"",_:" ",0:"0"},bo=/^\s*\d+/,xo=/^%/,So=/[\\^$*+?|[\]().{}]/g;function Eo(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function Mo(e){return e.replace(So,"\\$&")}function Co(e){return new RegExp("^(?:"+e.map(Mo).join("|")+")","i")}function wo(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function ko(e,t,n){var r=bo.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function No(e,t,n){var r=bo.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function To(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Oo(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ro(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Ao(e,t,n){var r=bo.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Lo(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Io(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Po(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Do(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function qo(e,t,n){var r=bo.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function zo(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Bo(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function $o(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Fo(e,t,n){var r=bo.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ho(e,t,n){var r=bo.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function jo(e,t,n){var r=xo.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Vo(e,t,n){var r=bo.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Wo(e,t,n){var r=bo.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function _o(e,t){return Eo(e.getDate(),t,2)}function Uo(e,t){return Eo(e.getHours(),t,2)}function Yo(e,t){return Eo(e.getHours()%12||12,t,2)}function Go(e,t){return Eo(1+jr.count(Jr(e),e),t,3)}function Ko(e,t){return Eo(e.getMilliseconds(),t,3)}function Xo(e,t){return Ko(e,t)+"000"}function Jo(e,t){return Eo(e.getMonth()+1,t,2)}function Zo(e,t){return Eo(e.getMinutes(),t,2)}function Qo(e,t){return Eo(e.getSeconds(),t,2)}function ei(e){var t=e.getDay();return 0===t?7:t}function ti(e,t){return Eo(Wr.count(Jr(e),e),t,2)}function ni(e,t){var n=e.getDay();return e=n>=4||0===n?Gr(e):Gr.ceil(e),Eo(Gr.count(Jr(e),e)+(4===Jr(e).getDay()),t,2)}function ri(e){return e.getDay()}function oi(e,t){return Eo(_r.count(Jr(e),e),t,2)}function ii(e,t){return Eo(e.getFullYear()%100,t,2)}function ai(e,t){return Eo(e.getFullYear()%1e4,t,4)}function si(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Eo(t/60|0,"0",2)+Eo(t%60,"0",2)}function li(e,t){return Eo(e.getUTCDate(),t,2)}function ci(e,t){return Eo(e.getUTCHours(),t,2)}function ui(e,t){return Eo(e.getUTCHours()%12||12,t,2)}function di(e,t){return Eo(1+eo.count(uo(e),e),t,3)}function pi(e,t){return Eo(e.getUTCMilliseconds(),t,3)}function mi(e,t){return pi(e,t)+"000"}function fi(e,t){return Eo(e.getUTCMonth()+1,t,2)}function hi(e,t){return Eo(e.getUTCMinutes(),t,2)}function gi(e,t){return Eo(e.getUTCSeconds(),t,2)}function vi(e){var t=e.getUTCDay();return 0===t?7:t}function yi(e,t){return Eo(no.count(uo(e),e),t,2)}function bi(e,t){var n=e.getUTCDay();return e=n>=4||0===n?ao(e):ao.ceil(e),Eo(ao.count(uo(e),e)+(4===uo(e).getUTCDay()),t,2)}function xi(e){return e.getUTCDay()}function Si(e,t){return Eo(ro.count(uo(e),e),t,2)}function Ei(e,t){return Eo(e.getUTCFullYear()%100,t,2)}function Mi(e,t){return Eo(e.getUTCFullYear()%1e4,t,4)}function Ci(){return"+0000"}function wi(){return"%"}function ki(e){return+e}function Ni(e){return Math.floor(+e/1e3)}!function(e){(ho=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Co(o),u=wo(o),d=Co(i),p=wo(i),m=Co(a),f=wo(a),h=Co(s),g=wo(s),v=Co(l),y=wo(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:_o,e:_o,f:Xo,H:Uo,I:Yo,j:Go,L:Ko,m:Jo,M:Zo,p:function(e){return o[+(e.getHours()>=12)]},Q:ki,s:Ni,S:Qo,u:ei,U:ti,V:ni,w:ri,W:oi,x:null,X:null,y:ii,Y:ai,Z:si,"%":wi},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:li,e:li,f:mi,H:ci,I:ui,j:di,L:pi,m:fi,M:hi,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:ki,s:Ni,S:gi,u:vi,U:yi,V:bi,w:xi,W:Si,x:null,X:null,y:Ei,Y:Mi,Z:Ci,"%":wi},S={a:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:Do,e:Do,f:Ho,H:zo,I:zo,j:qo,L:Fo,m:Po,M:Bo,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},Q:Vo,s:Wo,S:$o,u:No,U:To,V:Oo,w:ko,W:Ro,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:Lo,Y:Ao,Z:Io,"%":jo};function E(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=yo[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,o,i=fo(1900);if(C(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=mo(fo(i.y))).getUTCDay(),r=o>4||0===o?ro.ceil(r):ro(r),r=eo.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(fo(i.y))).getDay(),r=o>4||0===o?_r.ceil(r):_r(r),r=jr.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?mo(fo(i.y)).getUTCDay():t(fo(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,mo(i)):t(i)}}function C(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=S[o in yo?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",po);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e,mo);return t.toString=function(){return e},t}}}(e)).format,ho.parse,go=ho.utcFormat,vo=ho.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Ti="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||go(Ti),+new Date("2000-01-01T00:00:00.000Z")||vo(Ti);var Oi=1e3,Ri=6e4,Ai=36e5,Li=864e5,Ii=2592e6,Pi=31536e6;function Di(e){return new Date(e)}function qi(e){return e instanceof Date?+e:+new Date(+e)}function zi(e,t,n,r,o,i,a,s,l){var c=fr(lr,lr),u=c.invert,d=c.domain,p=l(".%L"),m=l(":%S"),f=l("%I:%M"),h=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),b=l("%Y"),x=[[a,1,Oi],[a,5,5e3],[a,15,15e3],[a,30,3e4],[i,1,Ri],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,Ai],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,Li],[r,2,1728e5],[n,1,6048e5],[t,1,Ii],[t,3,7776e6],[e,1,Pi]];function S(s){return(a(s)<s?p:i(s)<s?m:o(s)<s?f:r(s)<s?h:t(s)<s?n(s)<s?g:v:e(s)<s?y:b)(s)}function E(t,n,r,o){if(null==t&&(t=10),"number"==typeof t){var i=Math.abs(r-n)/t,a=Tt((function(e){return e[2]})).right(x,i);a===x.length?(o=Pt(n/Pi,r/Pi,t),t=e):a?(o=(a=x[i/x[a-1][2]<x[a][2]/i?a-1:a])[1],t=a[0]):(o=Math.max(Pt(n,r,t),1),t=s)}return null==o?t:t.every(o)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(jt.call(e,qi)):d().map(Di)},c.ticks=function(e,t){var n,r=d(),o=r[0],i=r[r.length-1],a=i<o;return a&&(n=o,o=i,i=n),n=(n=E(e,o,i,t))?n.range(o,i+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?S:l(t)},c.nice=function(e,t){var n=d();return(e=E(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}(n,e)):c},c.copy=function(){return mr(c,zi(e,t,n,r,o,i,a,s,l))},c}const Bi={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},$i=e=>e+" 12px -12px inset rgba(0, 0, 0, 0.0625)";var Fi={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[o,i]=t(),a=Math.abs(o)<1e-15,s=Math.abs(i-1)<1e-15,l=(e=>{const t=Bi[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:$i(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:$i(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function Hi({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:o}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:o,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-r)/(o-r),(n.max-r)/(o-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let ji;function Vi(){ji=ji||document.createElement("canvas").getContext("2d")}const Wi={measureTextWidth(e){Vi();const{width:t}=ji.measureText(e);return t},lineWrap(e,t,n,r){let o,i;Vi();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,d,p=e?e.split(/\s+/):[],m=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(ji.font=n),i=0;i<a.length;i++){for(d=a[i]||"",p=d.split(/\s+/),[m]=p,u="",o=1;o<p.length;o++)if(l=`${m} ${p[o]}`,c=Wi.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(m),m=p[o]):m=l,"number"==typeof r&&s.length>=r){u=p.slice(o+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(m):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${m} ${u}`}return s},wordWrap(e,t,n,r,o){if(Vi(),!e||!e.length)return[];n&&(ji.font=n);let i=[];const a=e.slice();let s,l,c,u;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||Wi.measureTextWidth(c)<=t?i.push(c):(s=Wi.splitWord(c,t,void 0,r-i.length),s.length<=1?i.push(s[0]):(l=s.pop(),i=i.concat(s),a[u+1]?Wi.measureTextWidth(`${l} ${a[u+1]}`)>t&&i.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return i.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),i.length>r?(i=i.splice(0,r),i[i.length-1]=Wi.truncate(i[i.length-1],t,n,o).text):(c=i[i.length-1],c&&c.length>1&&Wi.measureTextWidth(c)>t&&(i[i.length-1]=Wi.truncate(c,t,n,o).text)),i},truncate(e,t,n,r="…"){Vi();let o,i,a,s,l=e;const c=Wi.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(ji.font=n),e&&t){if(Wi.measureTextWidth(l)>t){for(o=Math.min(u,l.length);o>0;o--)if(i=l.substring(0,o-1),a=i.trim()+r,Wi.measureTextWidth(a)<=t){s=l.substring(o-1),l=a;break}o||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let o;Vi();let i,a=e,s="",l=[];if(Wi.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(o=Math.min(e.length,c);o>0&&(a=e.substring(0,o),i=e.substring(o-1,o)," "===i?a=e.substring(0,o-1):a+="-",s=e.substring(o),!(Wi.measureTextWidth(a)<=t));o--);return(!o&&!a||Wi.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Wi.measureTextWidth(s)>t?(s=Wi.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Vi(),e&&t?(n&&(ji.font=n),Wi.explodeWord(e,t,r,Math.max(1,Wi.measureTextWidth("i")))):[]),wrapText(e,t,n,r,o){let i;return Number.isNaN(t)?[e]:(i=r>1?Wi.lineWrap(e,t,n,r):[e],i=Wi.wordWrap(i,t,n,r,o),i)},getFontHeight:e=>(Vi(),e&&(ji.font=e),1.5*Wi.measureTextWidth("m")),tokenize(e,t,n,r,o,i,a=1){Vi(),t&&(ji.font=t);const s=Wi.getFontHeight(),l=a*s;let c=[],u=0,d=[];if(i<s)return[];const p=i?Math.max(1,Math.floor(i/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{u+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{c.push(Number.isNaN(e)||e<=0?p-u:e)}))):c=[Number.isNaN(r)||r<=0?p:Math.min(p,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<p&&(d=d.concat(Wi.wrapText(e,o,t,c[n])))})):d=Wi.wrapText(e,o,t,c[0],n),d}},_i={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:o,flipXY:i,symbol:a}){let s="x",l="y",c=r,u=o,d=t<.5?90:-90;return i&&(s="y",l="x",c=o,u=r,d=t<.5?180:0),a(Z({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},Ui=Z.bind(null,!0),Yi={},{isArray:Gi}=Array;function Ki(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Xi(e){return void 0===e}function Ji(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Zi(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Xi(e[r||t])?i:e[t],e=e[r||t]})),e}function Qi(e,t){let n=!0;if(Ki(e)&&Ki(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Qi(e[r],t[r])||(n=!1)})),n);if(Gi(e)&&Gi(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Qi(e[n],t[n]))return!1;return!0}return e===t}Yi.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Ui({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;Qi(i,a)||Ji(t,o)||(Xi(a)?r.push({op:"add",path:s,value:i}):Ki(i)&&Ki(a)?r=r.concat(Yi.generate(a,i,s)):Gi(i)&&Gi(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&Xi(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Qi(t,o))return r;if(!Xi(t[0])&&Xi(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(Yi.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{Xi(t[o])&&!Ji(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},Yi.apply=function(e,t){t.forEach((t=>{let n=Zi(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Gi(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Gi(o)&&Gi(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(Ki(o)&&Ki(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Ji(a,e)&&delete a[e]})),Ui(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=Zi(e,t.from);Gi(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Gi(n)?n.splice(+r,1):delete n[r]);var a}))},Yi.clone=function(e){return Ui({},e)},Yi.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Yi.updateObject=function(e,t){Object.keys(e).length?Yi.apply(e,Yi.generate(e,t)):Ui(e,t)};const ea=[[2,4,6],[2,4],[3]],ta=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function na(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function ra(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)na(e[r],t,n)}!function(){let e,t;for(ra(ea,1,10),e=0;e<ta.length;e++)if(ta[e])for(t=0;t<ta[e].length;t++)Array.isArray(ta[e][t])&&ra(ta[e][t])}();const oa={isInside(e,t,n,r){if(!r)return!0;const o=e.position-e.radius,i=e.position+e.radius;return o>=t&&i<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=oa.findSegmentPositionMeetMin(e,t);return oa.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=oa.findSegmentPositionMeetMax(e,n);return oa.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const o=e.length-1;let i,a,s=t;for(let t=0;t<o;t++)i=e[t],a=e[t+1],i.position=oa.findSegmentPositionMeetMaxThenMin(i,s,(i.center+a.center-r)/2),s=i.position+i.radius+r/2;a.position=oa.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const o=e.length-1;let i,a,s;const l=Math.max(0,e[o].position+e[o].radius-n);if(0===l)return;let c,u=0;for(i=o;i>0&&(a=e[i],s=e[i-1],c=Math.max(0,oa.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));i--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,i=0;i<=o;i++)a=e[i],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const o=e.length-1;if(!(o<0))if(0!==o)oa.layoutPositionFromMin(e,t,n,r),oa.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=oa.findSegmentPositionMeetMaxThenMin(r,t,n)}}},ia=(e,t,n,r=1)=>{const o=e.bandwidth();return n?"start"===t?o:"end"===t?o*(1-r):o*(2-r)/2:"start"===t?0:"end"===t?o*r:o*r/2},aa=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,sa=e=>e.filter(aa),la=(e,t)=>sa(le(e,t,[])),ca=e=>aa(e)&&(!1!==e.showValue||!1!==e.showLabel),ua=e=>e.filter(ca),da=(e,t)=>ua(le(e,t,[])),pa=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,ma=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},fa=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:o}=n;return void 0!==r&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},ha=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:o}=n;return void 0!==r&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+o},ga=({value:e,qMin:t})=>"NaN"!==t&&e<t,va=({value:e,qMax:t})=>"NaN"!==t&&e>t,ya={isRefLineVisible:aa,getVisibleRefLines:sa,getRefLines:la,getMeasureRefLines:e=>la(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:la(e,"refLine.dimRefLines"),isRefLineLabelVisible:ca,getVisibleRefLineLabels:ua,getRefLineLabels:da,getMeasureRefLineLabels:e=>da(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:da(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:o,invert:i=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=ia(s,o,i,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=ia(s,o,i,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:o})=>{const i=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-i*(s-o)}})({pxScale:s,value:n,innerValues:e,invert:i,minOrder:a})),(void 0===c?s(n):c)+l}return l=ia(s,o,i),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:o}=r.meta,i={},a=le(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():le(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const c=le(l,s?"qData.0.qSubNodes":"qMatrix",[]),u=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<c.length;e++){const t=c[e],n=e+d,r=t[u];i[r]||(i[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():o?(()=>{let e;for(let t=0;t<c.length;t++){const n=c[t][0],r=c[t][1],o=t+d,a=n[u];i[a]?(i[a].minOrder=Math.min(i[a].minOrder,o),i[a].maxOrder=Math.max(i[a].maxOrder,o),i[a].innerValues[i[a].innerValues.length]={id:r.qElemNumber,order:o}):i[a]={id:n.qElemNumber,qText:n.qText,minOrder:o,maxOrder:o,innerValues:[{id:r.qElemNumber,order:o}]},0===t?0===o&&(i[a].isMinOrderOk=!0):a!==e&&(i[a].isMinOrderOk=!0,i[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<c.length;e++){const t=c[e][0],n=e+d,r=t[u];i[r]||(i[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),i},getInputValue:pa,extractInfoFromInputValue:ma,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=pa({refLineLayout:e,layoutService:n});return ma(r,t,"id")},isDiscreteMinOutOfBounds:fa,isDiscreteMaxOutOfBounds:ha,isContinuousMinOutOfBounds:ga,isContinuousMaxOutOfBounds:va,isOutOfRange:({value:e,qMin:t,qMax:n})=>ga({value:e,qMin:t})||va({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&ha({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&fa({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n};function ba(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines=Wi.tokenize(o.title,t,"… "+o.valueString,3,n),o.maxNumLines=o.lines.length}}function xa({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=Wi.tokenize(e,t,n,r,o),a=i.length;let s="";if(a){[s]=i;for(let e=1;e<a;e++)s=`${s}\n${i[e]}`}return s}function Sa({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=e.map((e=>xa({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:o}))),a=i.length;let s="";if(a){[s]=i;for(let e=1;e<a;e++)s=`${s}\n\n${i[e]}`}return s}function Ea(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Ma=3,Ca=2;function wa({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const ka=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(ya.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(ya.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return ya.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:ya.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},Na={hasEngineFormat:wa,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:o,rtl:i,isContinuous:a,isDimension:s}){const l=ya.getInvert({orientation:o,rtl:i,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:d}=r.meta;let p,m;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");p=e.qMin,m=e.qMax}for(let o=0;o<e.length;o++){const i=e[o],{value:s,align:c,valueInfo:d}=i,f=ka({label:i,dataPages:u,qMin:p,qMax:m});i.scaledValue=1===f?l?-.1:1.1:-1===f?l?1.1:-.1:ya.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:c,invert:l,layoutService:r,isContinuous:a}),i.center=i.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:o}){let i;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;i=wa({inputValue:s,inputValueLabel:l,localeInfo:o})?l:t?t(a):a,r.valueString=`${xe.lrm}(${i})${xe.lrm}`,r.title=Na.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;i=wa({inputValue:a,inputValueLabel:s,localeInfo:o})?s:r,n.valueString=`${xe.lrm}(${i})${xe.lrm}`,n.title=Na.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];i=n.valueText,n.valueString=`${xe.lrm}(${i})${xe.lrm}`,n.title=Na.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const o=e.length-1;if(o<0)return;let i,a;if([i]=e,i.cMin=t,0!==o){for(let t=0;t<o;t++)i=e[t],a=e[t+1],i.cMax=(i.center+a.center-r)/2,a.cMin=i.cMax+r;a.cMax=n}else i.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,o=e.filter((e=>e.maxNumLines===t)),i=Math.min(n,o.length);for(let e=o.length-1;e>=o.length-i;e--)o[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let o=3;do{const t=Na.getTotalNumLines(e)-r;if(t<=0)return;Na.reduceLabelsHavingMaxNumLines(e,o,t),o--}while(o>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const o=e[r];o.maxNumLines=Math.max(1,Math.min(o.maxNumLines,Math.floor((Math.max(0,o.cMax-o.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let o=0;o<e.length;o++){const i=e[o];i.width=Math.min(t,Na.measureLabelMaxLineWidth(i,r)),i.height=i.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:o}=r,i=r[t],a=i/2;r.segment={center:o,range:i,min:o-a,max:o+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:o,gap:i,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:d,rtl:p,layoutService:m,isContinuous:f,isDimension:h}){const g=e.map((e=>e)),v=n;Na.calculateLabelPositions({labels:e,scale:t,size:v,layoutService:m,orientation:u,rtl:p,isContinuous:f,isDimension:h}),Ea(e,"center"),Na.addLabelsNeighborInfo(e,r,o,i),ba(e,a,s),Na.reduceTotalMaxNumLines(g,l,o-(g.length-1)*i),"vertical"===u&&(Na.reduceMaxNumLines(e,l,.05*i),function(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines.length>o.maxNumLines&&(o.lines=Wi.tokenize(o.title,t,"… "+o.valueString,o.maxNumLines,n))}}(e,a,s)),Na.addLabelsSize(e,s,l,d),Na.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:o,lineHeight:i=15,font:a}){const{majorAxis:s,minorAxis:l}=r,{minorCenter:c}=o,{fontSize:u,fontFamily:d,background:p}=t;let m=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,o=t.map(((t,o)=>{const p={type:"text",text:t,title:xa({title:e.title,font:a,ellipsis:"… "+e.valueString}),dx:0,dy:0,maxWidth:n,width:n,fontSize:u,fontFamily:d,fill:e.fill,baseline:"central",anchor:"middle"};return p[l]=c,p[s]=e.segment.position,p.y+=(o-(r-1)/2)*i,p}));e.background&&m.push(function({minorCenter:e,majorAxis:t,minorAxis:n,label:r,lineHeight:o,background:i}){const{lines:a}=r,{borderRadius:s=Ma,padding:l={}}=i,{top:c=Ca,bottom:u=Ca,left:d=Ca,right:p=Ca}=l,m=a.length,f={type:"rect",rx:s,ry:s,fill:r.background.fill,width:r.width+(d+p),height:r.height+(c+u)};return f[n]=e,f[t]=r.segment.position,f.x-=r.width/2+d,f.y-=m*o/2+c,f}({minorCenter:c,majorAxis:s,minorAxis:l,label:e,lineHeight:i,background:p})),m=m.concat(o)})),m}};function Ta(e,t,n){let r;const o=typeof t;if("string"===o||"object"===o)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function Oa(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:r,top:o,bottom:i,maxLabelWidth:a}=t;let s=1;return Na.getMaxTextWidth(e)>a&&(ba(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*r+o+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:o}=t;return Math.min(o,Na.getMaxTextWidth(e))+n+r}(t,n)}function Ra(e,t){return t?e.domain():[0,1]}function Aa(e,t,n,r="value"){let o=e.filter((e=>e[r]>=t));o=o.filter((e=>e[r]<=n));const i=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:o,minOobs:i,maxOobs:a,numMinOobs:i.length,numMaxOobs:a.length}}function La(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function Ia(e,t){return e>9?t[1]:t[0]}function Pa({alignment:e,dockValue:t,oobs:n,style:r,rect:o,symbol:i,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:d,majorAxis:p,minorAxis:m,minorDimension:f}=s,h=o[f],g=_i.createOob({oob:_i.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:i}),v="c"+p,y="c"+m,b={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0};b[y]=h/2,b[v]=a;const x={type:"text",text:u>9?"9+":u,title:Sa({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:h,width:h,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle"};return x[m]=h/2,x[p]=a,[g,b,x]}function Da(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:Wi.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const qa=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var za={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:o}=this.settings,i=!!r||n.meta.canBeContinuous,a=qa(this.settings.labels),s=Ta(this.chart,this.settings.formatter,e);Na.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:i,localeInfo:o});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:o})=>{if(n){const[r,o]=Ra(t,n);return Aa(e,r,o)}if(r){const t=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return Aa(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:i,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),u&&u.length){const e=Da(t.label),{dock:n}=this.settings.layout;return Na.measureLabelsWidth(u,this.measureText),d=Oa(n,u,e),d}const p=La(this.measureText),m=l?Ia(l,p):0,f=c?Ia(c,p):0;return d=Math.max(m,f),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:o,isContinuous:i,isDimension:a,localeInfo:s}=this.settings,l=!!i||r.meta.canBeContinuous,c=qa(this.settings.labels),{dock:u,rtl:d}=this.settings.layout,{padding:p}=n.label,m=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),f=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,m,p),{orientation:h,majorDimension:g}=m,{majorSize:v}=f,{font:y,lineHeight:b,gap:x,maxLabelWidth:S}=Da(n.label),E=Ta(this.chart,this.settings.formatter,e),M=v;Na.addLabelTitles({labels:c,formatter:E,isContinuous:i,canBeContinuous:l,localeInfo:s}),Na.calculateLabelPositions({labels:c,scale:e,size:M,layoutService:r,orientation:h,rtl:d,isContinuous:i,isDimension:a});const[C,w]=Ra(e,i),{filteredLabels:k,lowerOobs:N,upperOobs:T,lowerCircleSize:O,upperCircleSize:R,lowerOobSpace:A,upperOobSpace:L}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:o,isContinuous:i,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:d,filteredLabels:p}=Aa(e,t,n,c),m="scaledValue"!==c&&ya.getInvert({orientation:r,rtl:o,isContinuous:i}),f=function(e,t,n){return n?t:e}(d,u,m),h=function(e,t,n){return n?e:t}(d,u,m),g=f.length,v=h.length,y=La(l),b=Ia(g,y),x=Ia(v,y);return{filteredLabels:p,lowerOobs:f,upperOobs:h,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:function(e,t,n,r,o){return("vertical"===r?o.top:o.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),upperOobSpace:function(e,t,n,r,o){return("vertical"===r?o.bottom:o.right)+(e>0?t+n:0)}(v,a.oob.size,x,r,s)}}({labels:c,minValue:C,maxValue:w,orientation:h,rtl:d,isContinuous:i,style:n,padding:p,measureText:this.measureText,prop:i?"value":"scaledValue"}),I=A,P=v-L;Ea(N),Ea(T);const D=Pa({alignment:0,dockValue:0,oobs:N,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+O/2,areaProps:m,radius:O/2,font:y}),q=Pa({alignment:1,dockValue:1,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:v-(n.oob.size+R/2),areaProps:m,radius:R/2,font:y});Na.addLabelsInfo({labels:k,scale:e,majorSize:v,lowerLimit:I,upperLimit:P,font:y,lineHeight:b,gap:x,maxLabelWidth:S,majorDimension:g,orientation:h,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:i,isDimension:a}),oa.layout(k.map((e=>e.segment)),I,P,n.label.gap);const z=k.filter((e=>oa.isInside(e.segment,I,P,i)));return Na.createLabels({labels:z,style:n.label,maxLabelWidth:S,areaProps:m,area:f,lineHeight:b,font:y,theme:o}).concat([...D,...q])}};const{getInputValue:Ba,extractInfoFromInputValue:$a,resolveValue:Fa}=ya;var Ha={resolveValue:Fa,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Ba({refLineLayout:e,layoutService:n});return $a(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Ba({refLineLayout:e,layoutService:n});return $a(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:o}=n.meta,i=Ba({refLineLayout:e,layoutService:n});return r[i]&&o?r[i].qText:i},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Ba({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:o}=t;return o[r]}};function ja({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:o,chart:i,scale:a,axis:s,rtl:l,key:c,mainComponentKey:u,path:d,minimumLayoutMode:p}){const m=e?t.dimensionRefLines:d?t.query.getRefLines(d):t.measureRefLines;if(!m.length)return!1;const f={key:c,type:"ref-line",layout:{minimumLayoutMode:p},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}})},h=!(!e||"horizontal"!==o.meta.major.orientation||!l),g=!e||n.meta.isContinuous;return m.forEach((l=>{f.lines[s].push((({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:o,dockService:i,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:d})=>{var p,m;const f={dir:l,line:{strokeWidth:(null==t||null===(p=t.style)||void 0===p?void 0:p.lineThickness)||2,strokeDasharray:null==t||null===(m=t.style)||void 0===m?void 0:m.lineType,stroke:o.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(f.scale=s,f.value=t.refLineExpr.value):f.value=()=>{var e;const o=ya.getScaledPosition({scale:a.scale(s),value:Ha.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:Ha.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),size:null===(e=a.component(u))||void 0===e?void 0:e.rect["horizontal"===i.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:d});return Number.isNaN(o)?void 0:o},f})({isDimension:e,refLineLayout:l,refLineModel:t,layoutService:n,colorModel:r,dockService:o,chart:i,scale:a,axis:s,invert:h,component:u,isContinuous:g}))})),f}const Va={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function Wa({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dock:o,scale:i,style:a,formatter:s,theme:l,localeInfo:c,rtl:u,key:d,path:p}){const m=e?t.dimensionRefLineLabels:p?t.query.getRefLineLabels(p):t.measureRefLineLabels;if(!m.length)return[];const f=[],h=!e||n.meta.isContinuous,g=m.map((e=>(({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:o,theme:i,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?i.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=o,l.value=e.refLineExpr.value):(l.value=()=>Ha.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>Ha.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>Ha.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:l,isContinuous:h})));return f.push((({isDimension:e,layoutService:t,style:n,labels:r,scale:o,formatter:i,dock:a,key:s,rtl:l,theme:c,isContinuous:u,localeInfo:d})=>({key:s,type:"reference-line-labels",renderer:"svg",labels:r,formatter:i,scale:o,layoutService:t,layout:{dock:a,rtl:l},theme:c,isContinuous:u,isDimension:e,localeInfo:d,style:{label:{fontFamily:n.referenceLine.label.name.fontFamily,fontSize:n.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:l?2:4,right:l?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===a||"right"===a?10:16},oob:{size:8,fill:n.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:n.referenceLine.outOfBounds.fontFamily,fontSize:n.referenceLine.outOfBounds.fontSize,fill:n.referenceLine.outOfBounds.color,background:{fill:n.referenceLine.outOfBounds.backgroundColor}}}}}))({isDimension:e,rtl:u,style:Z(!0,Va,a),dock:o,key:d,labels:g,scale:i,formatter:s,layoutService:n,theme:l,isContinuous:h,localeInfo:c})),f}var _a={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip-qcm",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},Ua={LINE:"line",BAR:"bar",MARKER:"marker"},Ya={PRIMARY:0,SECONDARY:1},Ga={type:"bar",axis:0};const Ka={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function Xa(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Ja={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,r()}const i={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=i[t]*(n>l?1:n/l),u=i[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function Za(e,t,n,r){var o,i,a,s,l,c;const{app:u,flags:d}=t,p=null===(o=e.layout)||void 0===o||null===(i=o.tooltip)||void 0===i?void 0:i.imageComponents;if(!p)return[];const[m]=p,f=m.size||"small",h=m.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===m.cId){g=e;break}const v=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let y;if(-1!==g&&v[g]&&(y=v[g]),"media"===h&&null!==(l=m.ref)&&void 0!==l&&null!==(c=l.qStaticContentUrl)&&void 0!==c&&c.qUrl)return async function(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){let t,n,r,o,i,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",o=t.port?":"+t.port:"",i=t.prefix?t.prefix:"/","/"!==i[i.length-1]&&(i+="/"),n+r+o+i):""}(n);o&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(r,o),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,o));const{height:i,width:a,imageError:s}=await Ja.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}(m,f,u);if("url"===h)return async function(e,t,n,r,o){let i,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&Xa(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await Ja.getImageSize(t,r);i={src:t,size:r,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Ja.getImageSize(a,r);i={src:a,size:r,height:e,width:t,imageError:n}}return i}(u,d,m,f,y);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&y&&y.label){return async function(e,t,n,r){let o;const i=r.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(Xa(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await Ja.getImageSize(e,n);o={src:e,size:n,height:r,width:i,imageError:a}}}catch(e){}return o}(u,n[g],f,y)}return[]}const Qa={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(Za(e,r,n,o[t]));const a=await Promise.all(i);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},es={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await Qa.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>Qa.checkIfPromisesExist({customTooltipModel:e})};const ts=(e,t)=>{var n,r,o;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:Ka.CHART.CHART_PARENT_TYPE,qId:Ka.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},ns=e=>{var t,n,r;const o=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:Ka.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const rs={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,o,i;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(o=r.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=Ka.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Ka.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:o,rtl:i})=>{var a,s,l;const c=o,u=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=c&&c.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&u&&!(t.qHyperCubeDef.qDimensions.length<=0)){await rs.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=Ka.CHART.STATE,i=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),r.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const o=n;null!==(r=o.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=Ka.CHART.STATE,a=ts(t,i),s=await e.createSessionObject(a),l=ns(t);if(s.id!==Ka.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(c.miniChartToken.alternateState&&c.miniChartToken.sessionObj&&a){var d,p,m,f;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(p=n[0].data)||void 0===p?void 0:p.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var v;const t=null==e||null===(v=e.source)||void 0===v?void 0:v.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(Ka.CHART.CONTAINER_ID),l={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};c.miniChartToken.vis=await o.embed.render({element:s,model:c.miniChartToken.model,options:l,id:null===(m=c.miniChartToken.model)||void 0===m?void 0:m.id,type:null===(f=c.miniChartToken.model)||void 0===f?void 0:f.genericType})}}catch(t){await rs.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(rs.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Ka.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=Ka.CHART.STATE;await e.removeSessionAlternateState(r),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function os(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function is(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=Ka.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function as(e){const t=is();return e.filter((e=>t[e.id]))}const ss={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:r-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var i,a,s,l;const c=null!==(i=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==i?i:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===c.value&&r.label===c.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=ss.getAttrExprData(a);i.length||n.length?es.handlePromises({customTooltipModel:o,nodes:ss.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&rs.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>es.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[o]||(r[o]=[]),r[o]},getAttrExprData(e){var t;let n=[],r="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var i,a,s;const t=o.length-1;n=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[Ka.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[Ka.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[Ka.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(as(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[Ka.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[Ka.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=os(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const o=this.getAttrExps(e,n[r]);if(0===as(o).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const o=os(e)||[];[...o,t].forEach((e=>{const t=as(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=is(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!i[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:xe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=xe.detectTextDirection(e.src),r=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function ls(e,t,n,r){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[n])||void 0===i||null===(a=i[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],c=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return c?(s.forEach(((e,t)=>{const o=c.qValues&&c.qValues[t]?c.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let n;switch(e.id){case Ka.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Ka.CUSTOM.TITLE:case Ka.CUSTOM.DESCRIPTION:case Ka.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const cs={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>ls(t,e,r,n)}}};const us={getCustomAttrExps(e,t,n){var r,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(o=r.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,r){const o={[Ka.CUSTOM.TITLE]:!0,[Ka.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=ss.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===Ka.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===Ka.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Se.getMeasure(e,t))),e,i)}};function ds({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(us.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:ps}=Ka;function ms({flags:e,layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l,options:c}){var u,d,p;const m=function({layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:ss,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l}),f="rtl"===c.direction,h=!(!t.tooltip||t.tooltip.auto),g=h&&E(t,"tooltip.hideBasic",!1),v=!!(h&&null!==(u=t.tooltip)&&void 0!==u&&null!==(d=u.chart)&&void 0!==d&&null!==(p=d.object)&&void 0!==p&&p.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>h,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,o;const i=ds({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===ps.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===ps.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>ss.checkIfPromisesExist({customTooltipModel:m}),createImageRow:({value:e,h:t})=>ss.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const o=ss.getDataNodes(i,r),a=ss.getAttrExprData(t);return es.handlePromises({customTooltipModel:m,nodes:o,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>v,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>rs.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>ss.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>rs.show({app:n,properties:t,selectedNodes:e,customTooltipModel:m,rtl:f}),hasAlternateState:()=>{var e;return!(null===(e=m.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>rs.hide({app:n,customTooltipModel:m}),destroy:()=>rs.destroyVisualization({customTooltipModel:m})}}}function fs({key:e,source:t,layoutService:n,fieldModel:r,colorService:o,series:i}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=i.filter((e=>e.type===Ua.BAR)),c=n.meta.isContinuous?s:a,u=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:i})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},segment:{field:e,value:u,reduceLabel:"none"},end:{field:e,value:u,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...o.getDatumProps(i),customTooltipAttrExps:cs.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function hs({key:e,series:t,source:n,fieldModel:r,colorService:o,layoutService:i,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,c=i.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},u)=>({source:n,field:a,value:i.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:u,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:cs.getNode(i.getLayout(),i.meta),...o.getDatumProps(t)}})))}}]}return[]}function gs({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:o}=t;if(o.isBarSeriesStacked){const{major:t,majorNumeric:i}=n.main,a=r.filter((e=>e.type===Ua.BAR)),s=o.isContinuous?{field:i,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:o.isContinuous?i:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:o.isContinuous?e=>e.qNum:void 0}}}]}return[]}const vs={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var ys={OPTIONS:vs,DEFAULT:vs.MINI_CHART};function bs({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:o,minThumbSize:i})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===o,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<i){const e=(i-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=i}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:d}:{top:u,left:0,height:d}}})}}function xs({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-r)/(o-r),(n.max-r)/(o-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const Ss=e=>({miniChart:e===ys.OPTIONS.MINI_CHART.value,bar:e===ys.OPTIONS.BAR.value,none:e===ys.OPTIONS.NONE.value});function Es({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Ss(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Ss(ys.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),o=e.getLayoutValue("preferContinuousAxis");return Ss(!n&&(r||!r&&o)?ys.OPTIONS.NONE.value:ys.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===ys.OPTIONS.MINI_CHART.value,n.bar=t.value===ys.OPTIONS.BAR.value,n.none=t.value===ys.OPTIONS.NONE.value),n}function Ms({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:o,dockService:i,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),p="horizontal"===i.meta.major.orientation,m=p?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,f=p?d.rect.computedInner.width:d.rect.computedInner.height,h=p&&a?f-m:m,g=Math.max(0,Math.min(h/f,1)),[v,y]=xs({layoutService:o,viewState:n,viewCache:r}),b=g<v,x=g>y,S=!b&&!x;return{pixel:h,relative:g,thumb:S?h-v*f:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function Cs({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:o,dockService:i}){return()=>{const a=t.component(e),{orientation:s}=i.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,p]=xs({layoutService:o,viewState:n,viewCache:r});return{size:u,thumbSize:(p-d)*u}}}function ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ms({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Cs({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,o)=>!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(i.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),i=o.get("continuousMax"),s=n+(i-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,i-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const ks="data-scrollbar-handle";function Ns({e:e}){return(e.srcEvent||e).srcElement.getAttribute(ks)||""}const Ts="scrollbarResize";function Os({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s}){const l=Ms({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:Ts,threshold:0,enable(e,t){return!(!i.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Ts]=this[Ts]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&Ns({e:t})&&(this[Ts].panningEvent=t.srcEvent),!!this[Ts].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[Ts]=this[Ts]||{},this[Ts].panningEvent&&t.component(e).emit("dragStart",this[Ts].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[Ts]=this[Ts]||{},!this[Ts].panningEvent)return;const i=r.get("zoom"),a=o.get("continuousMin"),s=o.get("continuousMax"),c=o.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=Ns({e:this[Ts].panningEvent});let p="start"===d?Math.min(u,i.max):i.min,m="end"===d?Math.max(u,i.min):i.max;p===m&&(p-="start"===d?c:0,m+="end"===d?c:0),r.set("zoom",{min:p,max:m}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[Ts]=this[Ts]||{},delete this[Ts].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[Ts]=this[Ts]||{},delete this[Ts].panningEvent,t.component(e).emit("dragEnd")}}}}const Rs="scrollbarPan";function As({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ms({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Cs({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:Rs,threshold:0,enable(r,o){return this[Rs]=this[Rs]||{},!(o&&!this[Rs].isPanning)||!!n.scroll.enabled()&&((!o||o.target===t.element)&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e)))}},events:{scrollbarPanstart(n){n.preventDefault();const a=c(n);if(this[Rs]=this[Rs]||{},this[Rs].isPanning=!0,t.component(e).emit("lockState"),i.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),i=o.get("continuousMax"),s=n+(i-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,i-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,i-t),max:Math.max(s,n+t)}),this[Rs].relative=a.relative,this[Rs].zoom=r.get("zoom"),this[Rs].zoom.span=this[Rs].zoom.max-this[Rs].zoom.min,this[Rs].zoom.fullSpan=i-n}else if(a.onThumb)this[Rs].offset=a.thumb;else{const e=u();this[Rs].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=c(n);if(this[Rs]=this[Rs]||{},i.meta.isContinuous){const e=a.relative-this[Rs].relative,{fullSpan:t,span:n,min:i,max:s}=this[Rs].zoom,l=o.get("continuousMin"),c=o.get("continuousMax");r.set("zoom",{min:Math.min(i+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Rs].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},scrollbarPanend(n){n.preventDefault(),this[Rs]=this[Rs]||{},this[Rs].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[Rs]=this[Rs]||{},this[Rs].isPanning=!1,t.component(e).emit("unlockState")}}}}function Ls({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return[ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}),Os({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),As({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})]}function Is({componentKey:e,chart:t,actions:n,layoutService:r}){const o=(o,i)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(o,i)};return{type:"native",events:{mousemove:e=>o("hover",e),mouseleave:()=>o("leave")}}}const Ps={background:"rgba(0, 0, 0, 0.1)"},Ds={top:-1,bottom:-1,width:6},qs={width:2,background:"#595959"};var zs={before:Ps,after:Ps,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Ds,endHandle:Ds,startHandleBorder:qs,endHandleBorder:qs};const Bs={background:"rgba(0, 0, 0, 0.1)"},$s={top:-1,bottom:-1,width:6},Fs={width:2,background:"#595959"};var Hs={before:Bs,after:Bs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:$s,endHandle:$s,startHandleBorder:Fs,endHandleBorder:Fs};const js={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Vs={pointerEvents:"initial"},Ws={pointerEvents:"none"};const _s="ew-resize",Us="default";function Ys(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,o=t.range(),i=n&&t.rtl;return{size:r,start:(i?1-o[1]:o[0])*r,end:(i?1-o[0]:o[1])*r}}function Gs(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?_s:Us}function Ks(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const o=(r-(n-t))/2,i=Math.max(0,0-(t-o))-Math.max(0,n+o-e);return{size:e,start:t-o+i,end:n+o+i}}return{size:e,start:t,end:n}}function Xs(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function Js(){const{size:e,start:t,end:n}=Ys.call(this);this.renderer.render(this.elements(this.h,Ks.call(this,e,t,n)))}function Zs(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?Hs:zs;return{container:{...js},before:{...js,...n.before,...t.before},after:{...js,...n.after,...t.after},thumb:{...js,...n.thumb,...t.thumb},startHandle:{...js,...Vs,...n.startHandle},endHandle:{...js,...Vs,...n.endHandle},startHandleBorder:{...js,...Ws,...n.startHandleBorder},endHandleBorder:{...js,...Ws,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var Qs={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){Js.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!Xs.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Ns({e:e});t&&(this.state.hover[t]=!0),Gs.call(this),Js.call(this)},leave(){this.state.locked||(this.state.hover.reset(),Gs.call(this),Js.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Ns({e:e});t&&(this.state.drag[t]=!0),Gs.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),Gs.call(this),Js.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,o="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[o]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=Ys.call(this);return this.elements(e,Ks.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:o}=this.settings,i=o.injections().map((t=>t({h:e,rect:this.rect,orientation:o.orientation,minThumbSize:o.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:o,startHandleActive:i,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[o.end]:t-n},p={[o.start]:r},m={left:-3},f={left:1},h={right:-3,left:"auto"},g={left:3},v=e("div",{style:{...s.before,...c?p:d},class:"scrollbar--before"}),y=e("div",{style:{...s.after,...c?d:p},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?h:m},class:"scrollbar--start-handle",[ks]:"start"},i?e("div",{style:{...s.startHandleBorder,...c?g:f}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?m:h},class:"scrollbar--end-handle",[ks]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?f:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[o.start]:n,[o.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[v,x,y,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:Zs.call(this),continuous:o.isContinuous,invert:"horizontal"===o.orientation&&o.rtl,injections:i})}};function el({layoutService:e}){return e.meta.isContinuous&&Es({layoutService:e}).miniChart}function tl({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:o}=e,{primarySeries:i,secondarySeries:a}=r.meta,s=r.query.series(Ua.LINE),l=[...hs({forceCreate:!0,key:_a.COLLECTION.PRIMARY,series:i,fieldModel:n,colorService:o,layoutService:t}),...hs({key:_a.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:o,layoutService:t}),...hs({key:_a.COLLECTION.LINE,series:s,fieldModel:n,colorService:o,layoutService:t}),...fs({key:_a.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:o,series:i}),...fs({key:_a.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:o,series:a}),...gs({key:_a.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:i}),...gs({key:_a.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return el(e)&&(l.push(...hs({key:_a.COLLECTION.REDUCED,source:_a.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:o,layoutService:t})),l.push(...hs({key:_a.COLLECTION.REDUCED_PRIMARY,source:_a.DATA.REDUCED,series:i,fieldModel:n,colorService:o,layoutService:t})),l.push(...hs({key:_a.COLLECTION.REDUCED_SECONDARY,source:_a.DATA.REDUCED,series:a,fieldModel:n,colorService:o,layoutService:t})),l.push(...fs({key:_a.COLLECTION.REDUCED_STACKED_PRIMARY,source:_a.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===Ua.BAR)),colorService:o})),l.push(...fs({key:_a.COLLECTION.REDUCED_STACKED_SECONDARY,source:_a.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===Ua.BAR)),colorService:o}))),l}const nl=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function rl({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,o=2===n.meta.measureAxes.length;if(o)return.5;const i=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!o){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===i||"bottom"===i?1:0:"near"===i||"left"===i?0:1}const ol=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:o,dockService:i}=e,{orientation:a}=i.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:nl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:rl({models:e})}},il=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:o,dockService:i}=e,{orientation:a}=i.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:o.meta.groupSize,maxPxStep:nl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:rl({models:e})}};function al({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:o}=t,{orientation:i}=o.meta.major;return{type:"linear",invert:"horizontal"===i&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function sl({viewCache:e,mainMajor:t}){return Z(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function ll({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:o,max:i}=e.get("zoom"),a=(i-o)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function cl({picasso:e,viewState:t,viewCache:n,models:r,environment:o}){const{layoutService:i,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:c}=e.renderer("svg")(),{majorNumeric:u}=a.main,d=l.getStyles(),p={type:"time",data:{field:u},qAxis:()=>i.getHyperCubeValue("qAxisData.qAxis",[]),field:u,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===o.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:i.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>c({text:e,fontFamily:d.axis.label.name.fontFamily,fontSize:d.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:ll({viewState:t,viewCache:n,layoutService:i})};return{[_a.SCALE.MAJOR]:Z(!0,{},p,{ticks:{level:"outer"}}),[_a.SCALE.MAJOR_INNER]:Z(!0,{},p,{ticks:{level:"inner"}})}}function ul({picasso:e,models:t,viewState:n,viewCache:r,environment:o}){const{meta:i}=t.layoutService,a=i.isTime?{...cl({picasso:e,viewState:n,viewCache:r,models:t,environment:o})}:i.isContinuous?{[_a.SCALE.MAJOR]:al({models:t,viewState:n,environment:o})}:i.isBarSeriesGrouped?{[_a.SCALE.MAJOR]:il({models:t,environment:o})}:{[_a.SCALE.MAJOR]:i.isBarSeriesStackedInBothAxis?il({models:t,environment:o}):ol({models:t,environment:o})};return el(t)?{...a,[_a.SCALE.REDUCED]:sl({viewCache:r,mainMajor:a[_a.SCALE.MAJOR]})}:a}function dl({fields:e,tickModel:t,dockService:n,environment:r}){const o="rtl"===r.options.direction,{orientation:i}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===i||o,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function pl({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!el({layoutService:e}))return;const o="rtl"===r.options.direction,{orientation:i}=n.meta.minor;return{type:"linear",invert:"vertical"===i||o,min:t.query.getMin,max:t.query.getMax}}function ml({picasso:e,models:t,viewState:n,viewCache:r,environment:o}){const{layoutService:i,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:c,dockService:u}=t;return{...ul({picasso:e,models:t,viewState:n,viewCache:r,environment:o}),[_a.SCALE.MINOR.PRIMARY]:dl({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:o}),[_a.SCALE.MINOR.SECONDARY]:dl({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:o}),[_a.SCALE.MINOR.REDUCED_PRIMARY]:pl({layoutService:i,tickModel:s,dockService:u,environment:o}),[_a.SCALE.MINOR.REDUCED_SECONDARY]:pl({layoutService:i,tickModel:l,dockService:u,environment:o}),...c.custom.wrappedScales()}}var fl={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const hl=["all","labels"];function gl({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:o}=e,i=t.getLayoutValue("measureAxes");if(!i||!i.length)return[];const a=o.getStyles(),{measureAxes:s}=r.meta;return s.filter((e=>{const t=e.isPrimary?0:1;return hl.some((e=>i[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?_a.COMPONENT.AXIS.MINOR.PRIMARY:_a.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:fl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:a.axis.label.name.fontFamily,fontSize:a.axis.label.name.fontSize,fill:a.axis.label.name.color},line:{stroke:a.axis.line.major.color},ticks:{stroke:a.axis.line.major.color},minorTicks:{stroke:a.axis.line.minor.color}}})))}var vl=.5,yl=3,bl=13;function xl({models:e,environment:t}){const{layoutService:n,dockService:r,themeService:o}=e,i="rtl"===t.options.direction,a=n.getLayoutValue("dimensionAxis"),s=o.getStyles(),l=(({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return ge.getAdjustedMaxGlyphCount(t,r,0,"qText")})({layoutService:n}),{orientation:c}=r.meta.major,u="horizontal"===c?a.label:"auto";return{type:"axis",key:_a.COMPONENT.AXIS.MAJOR,scale:_a.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:fl.AXIS.MAJOR[c.toUpperCase()]},settings:{labels:{mode:a.label,tiltAngle:i?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===u?void 0:r.meta.minor.size/4,maxGlyphCount:l,tiltThreshold:l>yl&&l<bl?1:void 0,fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color},line:{show:!1},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:vl}}}]}}}function Sl({models:e}){const{dockService:t,themeService:n}=e,{orientation:r}=t.meta.major,o=n.getStyles();return{type:"axis",key:_a.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:_a.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:fl.AXIS.MAJOR[r.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:o.axis.label.name.fontFamily,fontSize:o.axis.label.name.fontSize,fill:o.axis.label.name.color},line:{show:!1}}}}function El({models:e,environment:t}){const{layoutService:n}=e,r=n.getLayoutValue("dimensionAxis");if(!r)return[];const{show:o}=r;return"none"===o||"title"===o?[]:n.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r}=e,o="rtl"===t.options.direction,{orientation:i}=n.meta.major,a="bottom"===n.meta.major.dock?0:1,s=r.getStyles(),l=o?1:0,c={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:fl.AXIS.MAJOR[i]},preferredSize:()=>({size:2*parseFloat(s.axis.label.name.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:o?"end":"start",label:{align:a,justify:l},guideLine:{major:{justify:l},minor:{align:a}},line:{show:!1}},style:{label:{fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color},majorGuideLine:{stroke:s.axis.line.major.color},minorGuideLine:{stroke:s.axis.line.minor.color}}};return[Z(!0,{},c,{key:_a.COMPONENT.AXIS.TIME_INNER,scale:_a.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:s.axis.line.minor.color},minorGuideLine:{stroke:s.axis.line.major.color}}}),Z(!0,{},c,{key:_a.COMPONENT.AXIS.TIME_OUTER,scale:_a.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[Sl({models:e})]:[xl({models:e,environment:t})]}const Ml=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,Cl=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:o})=>e([o.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function wl({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1},...t},inactive:{opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:vl},...n}}}]}}var kl="max",Nl="min";function Tl(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const Ol=(e,t)=>`${e}-${t.id}`,Rl=4,Al=12,Ll=4;function Il({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:o}){if(t.meta.isContinuous)return()=>Ll+"px";const i={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!i.size){const n=e.component(r),s=t.resources.scale(_a.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Rl,Math.min(Al,l));i.size=("bar"===o?2*c:c)+"px"}return i.size}}const{isDark:Pl}=kt;const Dl=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:o,seriesModel:i,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c}=t,u=a.getColor(),{fill:d,marker:p}=n.options,{isContinuous:m}=o.meta,f="rtl"===r.options.direction,{orientation:h}=s.meta.major,g="horizontal"===h,v=(n.isPrimary?l:c).query.getExtrema(),y=({end:e})=>{const{value:t}=e;return Tl(t,v)},b=Ol(_a.COMPONENT.MARKER,n);return{type:"point",key:b,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[g?"x":"y"]:{scale:_a.SCALE.MAJOR,fn:Cl({layoutService:o,seriesModel:i,rtl:f,orientation:h}),ref:m?"major":void 0},[g?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:d||"bar"===p?u:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||y(e.datum)?0:1},stroke:e=>{const t=u(e);return d?Pl(t)?function(e){return We(e).brighter(.5).toString()}(t):function(e){return We(e).darker().toString()}(t):t},size:Il({chart:e,layoutService:o,dockService:s,markerKey:b,markerType:p}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:p,horizontal:g,rtl:f})},brush:wl({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||y(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||y(e.data)?0:vl}}})}};function ql({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:o}){return function(i){const{datum:a,resources:{scale:s}}=i,l=s(_a.SCALE.MAJOR),c=s(_a.SCALE.COLOR),u=t&&o?[...a.points].reverse():a.points,d=u.reduce(((t,n,r)=>{const o="NaN"===n[e].value||Number.isNaN(n[e].value),i=u[r+1],a=i&&"NaN"!==i[e].value&&!Number.isNaN(i[e].value);return o?t.length&&a&&t.push(n):t.push(n),t}),[]),p="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),m=d.map(p),f=Math.min(...m),h=Math.max(...m)-f,g=0===h?1:h,v=m.map(((e,t)=>0===t?0:t===m.length-1?1:(e-f)/g)),y=[];for(let t=0;t<d.length;t++){const o=d[t],i=o.color&&o.color.value,a=n?i||r:c(i)||r,s=0===t,l=t===d.length-1,u=v[t];if("NaN"===o[e].value||Number.isNaN(o[e].value))y[t-1].virtual||y.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?y.push({color:a,offset:s?0:Math.max(0,parseFloat((u-(u-v[t-1])/2).toFixed(5)))}):y.push({color:a,offset:u});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?y.push({color:a,offset:l?1:Math.max(0,parseFloat((u+(v[t+1]-u)/2).toFixed(5)))}):y.push({color:a,offset:u})}}const b=y.reduce(((e,t,n)=>{if(t.virtual){const t=y[n-1],r=y[n+1],o=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:o},{color:r.color,offset:o})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function zl({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:o,dockService:i}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:c,nil:u}=o.getSettingsForMeasure(n),d="horizontal"===i.meta.major.orientation;if(!l||"constant"===c)return o.getColor();if("measure"===l&&"categorical"===c)return o.getColor();const p=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=p&&p.on)return"byExpression"===p.mode?ql({isHorizontal:d,isColor:!0,fallback:u,rtl:a}):o.getColor();const m=r.getLayoutValue("color",{}),f=!m.auto&&"byExpression"===m.mode,h=!!m.colorExpression;if(f&&!h)return u;const g=!m.auto&&"byMeasure"===m.mode&&m.byMeasureDef&&void 0!==m.byMeasureDef.activeMeasureIndex;return s||!g?ql({isHorizontal:d,isColor:"color"===c,fallback:u,rtl:a}):"continuous"===c?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:o}}=n,i=o(_a.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,d=i.domain().map((e=>({color:i(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/u))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(o){const{datum:{points:i},resources:{scale:a}}=o,s=a(_a.SCALE.COLOR),l=i.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),c=Math.min(...l),u=Math.max(...l),d=t?Math.min(0,c):c,p=(t?Math.max(0,u):u)-d,m=0===p?1:p,f=s.domain(),h=[];for(let e=0;e<f.length-1;e++){const t=f[e],r=s(t)||n;h.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/m))});const o=f[e+1];h.push({color:r,offset:Math.min(1,Math.max(0,(o-d)/m))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:h}}}({isHorizontal:d,fallback:u,rtl:a})}const Bl=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:o,dockService:i,styleModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=i.meta.major,c=Cl({layoutService:r,seriesModel:o,rtl:s,orientation:l});return{key:Ol(_a.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:_a.SCALE.MAJOR,fn:c},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:zl({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:i.meta.major.orientation},brush:wl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:vl},inactive:{opacity:vl}})}};var $l={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function Fl({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),o=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),i=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:o(e,t),after:i(e,t)})}const Hl=3,jl=20;function Vl({models:e,series:t,environment:n}){const{layoutService:r,colorService:o,seriesModel:i,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,selectionService:u}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:p}=a.meta.major,m="horizontal"===p,f="SPARK"===a.meta.chart.mode,h=o.getColor(),{POINT:g}=$l,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=Fl({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){return e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{})}({items:t}));const{value:o}=e.line,i=n.map[o],a=`${e.major.value}-${o}`,s=i.keys.indexOf(a),{before:l,after:c}=r({index:s,items:i.items});return!l&&!c}}({series:t,layoutService:r}),y="rtl"===n.options.direction,b=(t.isPrimary?l:c).query.getExtrema(),{isContinuous:x}=r.meta,S=({end:e})=>{const{value:t}=e;return Tl(t,b)};return{type:"point",key:Ol(_a.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:m?g.SIZE.DEFAULT/2:0}}),settings:{[m?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[m?"x":"y"]:{scale:_a.SCALE.MAJOR,fn:Cl({layoutService:r,seriesModel:i,rtl:y,orientation:p}),ref:"major"},sizeLimits:{minPx:Hl,maxPx:jl},size:e=>{const{value:t}=e.datum.line;return s.query.point.getSize(t)+"px"},fill:h,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||S(e)?0:f?v({item:e,items:t.items})?1:0:d||v({item:e,items:t.items})?1:0}},brush:wl({layoutService:r,active:{r:e=>e.r+$l.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data))return 0;if(!x||d)return 1;const{event:n,components:r=[]}=(null==u?void 0:u.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;return[_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS,_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const Wl=(e,{dataset:t})=>{var n;if(null!==(n=e.null)&&void 0!==n&&n.value)return"-";const{value:r,label:o,source:i}=e.end,a=t(i.key).field(i.field);return a.raw().isCustomFormatted?o:a.formatter()(r)};function _l({chart:e,models:t,environment:n,series:r,lineSeries:o}){const{layoutService:i,dockService:a,themeService:s,primaryExtremumModel:l,secondaryExtremumModel:c}=t,{id:u}=r,d="rtl"===n.options.direction,p=i.getLayoutValue("dataPoint");if(!p)return!1;if(!p.show||!p.showLineLabels)return!1;const m=(r.isPrimary?l:c).query.getExtrema(),f=s.getStyles();return{type:"point-label",key:`${_a.COMPONENT.POINT_LABEL}-${u}`,layout:{displayOrder:2,minimumLayoutMode:fl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:r.options.showAsConnections,label:t=>Wl(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{labelSpace:_a.COMPONENT.LABEL_SPACE,point:`${_a.COMPONENT.POINT}-${u}`,allPoints:o.map((e=>`${_a.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>Tl(e.value,m))(e.data)},style:{fontFamily:f.label.value.fontFamily,fontSize:f.label.value.fontSize,fill:f.label.value.color}}}const Ul=({chart:e,dock:t})=>{let n=t;const r=e.component(`${_a.COMPONENT.SLICED_HAT}-${kl}`),o=e.component(`${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.PRIMARY}`),i=e.component(`${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.SECONDARY}`);return r?n=`@${_a.COMPONENT.SLICED_HAT}-${kl}`:o?n=`@${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.PRIMARY}`:i&&(n=`@${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.SECONDARY}`),n},Yl=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${_a.COMPONENT.SLICED_HAT}-${kl}`&&e!==`@${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.PRIMARY}`&&e!==`@${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${_a.COMPONENT.SLICED_HAT}-${Nl}`&&e!==`@${_a.COMPONENT.SLICED_HAT}-${Nl}-${Ya.PRIMARY}`&&e!==`@${_a.COMPONENT.SLICED_HAT}-${Nl}-${Ya.SECONDARY}`||"vertical"!==t||n||(r=4),r};function Gl({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:o,dockService:i,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=o.getLayoutValue("dataPoint",{}),c="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const u="horizontal"===i.meta.major.orientation,{show:d}=o.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=i.meta.major;if(u&&"top"===e)return!1;if(!u&&e===(c?"left":"right"))return!1}const p=c?"left":"right";return{type:"label-space",key:_a.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:fl.LABEL_SPACE,dock:Ul({chart:e,dock:u?"top":p})},settings:{size:10},show:()=>{const t=e.component(`${_a.COMPONENT.LINE}-${r[0].id}`);if(!t||!t.rect)return!1;const n=(u?17:34)/t.rect[u?"height":"width"],o=a.query.getExtrema(),i=e.scale(_a.SCALE.MINOR.PRIMARY)(o.implicit.line.max),l=u||c?i:1-i,d=r.filter((e=>e.isPrimary)).length>0,p=s.query.getExtrema(),m=e.scale(_a.SCALE.MINOR.SECONDARY)(p.implicit.line.max),f=u||c?m:1-m,h=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||h&&f<n}}}const Kl={min:"Min",max:"Max"};function Xl(e,t,n){const{hasExplicitMax:r}=n.meta,{max:o}=n.explicit;return!!r&&Math.max(e,t)>o&&o<=Math.min(e,t)}function Jl(e,t,n){const{hasExplicitMin:r}=n.meta,{min:o}=n.explicit;return!!r&&Math.min(e,t)<o&&o>=Math.max(e,t)}function Zl(e,t,n){return Xl(e,t,n)||Jl(e,t,n)}function Ql(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function ec(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function tc(e,t){return Ql(e,t)||ec(e,t)}function nc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta["hasExplicit"+Kl[t]]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===kl?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===kl?!Ql(r,e):!ec(r,e)}({extrema:e,type:t}))}var rc=Object.freeze({__proto__:null,isSegmentMaxOutOfBounds:Xl,isSegmentMinOutOfBounds:Jl,isSegmentOutOfBounds:Zl,isMaxOutOfBounds:Ql,isMinOutOfBounds:ec,isOutOfBounds:tc,shouldShowOob:nc});const oc={min:"Min",max:"Max"},ic=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:o,environment:i,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,primaryTickModel:u,secondaryTickModel:d,layoutService:p,seriesModel:m,themeService:f,fieldModel:h}=t,g="rtl"===i.options.direction,{dock:v,opposite:y,orientation:b}=s.meta.major,x=l.query.getExtrema(),S=c.query.getExtrema(),E=a===kl,{isBarSeriesGrouped:M}=p.meta,C=(({chart:e,type:t,opposite:n,dock:r})=>{let o=t===kl?n:r;const i=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`),s=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`),l=e.component(_a.COMPONENT.LABEL_SPACE),c=e.component(`${_a.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${_a.COMPONENT.BAR_OOB}-${t}-${Ya.PRIMARY}`),d=e.component(`${_a.COMPONENT.BAR_OOB}-${t}-${Ya.SECONDARY}`);return i?o=`@${_a.COMPONENT.SLICED_HAT}-${t}`:a?o=`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`:s?o=`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`:c||u||d?l&&t===kl?o="@"+_a.COMPONENT.LABEL_SPACE:c?o=`@${_a.COMPONENT.BAR_OOB}-${t}`:u?o=`@${_a.COMPONENT.BAR_OOB}-${t}-${Ya.PRIMARY}`:d&&(o=`@${_a.COMPONENT.BAR_OOB}-${t}-${Ya.SECONDARY}`):l&&t===kl&&(o="@"+_a.COMPONENT.LABEL_SPACE),o})({chart:e,type:a,opposite:y,dock:v}),w=Cl({layoutService:p,seriesModel:m,rtl:g,orientation:b}),k=r.concat(n);if(!k.length)return!1;const N=E?x.implicit.bar.max:x.implicit.bar.min,T=Number(N.toFixed(13));if(!M&&o.length&&rc[`is${oc[a]}OutOfBounds`](T,x))return!1;if(!x.meta.hasExplicit&&!S.meta.hasExplicit)return!1;const O=E?"max":"min",R=Math[O](Number(x.implicit.line[O].toFixed(13)),Number(x.implicit.marker[O].toFixed(13))),A=Math[O](Number(S.implicit.line[O].toFixed(13)),Number(S.implicit.marker[O].toFixed(13))),L=k.filter((e=>e.isPrimary)),I=k.filter((e=>!e.isPrimary)),P=L.length>0,D=I.length>0,{major:q,majorNumeric:z}=h.main,B=e=>"NaN"!==e.qNum?e.qNum:0,$=p.meta.isContinuous?z:q;return{type:"data-out-of-bounds-marker",key:`${_a.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:C,minimumLayoutMode:fl.OUT_OF_BOUNDS_MARKER},data:{extract:k.map((({ref:e,typeIndex:t,options:n})=>({field:q,value:p.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:$},end:{field:e,value:n.showAsZeros?B:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:E?()=>u.query.getMax():()=>u.query.getMin(),secondaryExtremum:E?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:L,secondarySeries:I,orientation:b,rtl:g,major:{scale:_a.SCALE.MAJOR,fn:w},markerOffset:Yl({dockPosition:C,orientation:b,rtl:g})},brush:wl({layoutService:p}),show:()=>{if(E){if(P&&R>u.query.getMax())return!0;if(D&&A>d.query.getMax())return!0}if(!E){if(P&&R<u.query.getMin())return!0;if(D&&A<d.query.getMin())return!0}return!1},style:{fill:f.getStyles().outOfRange.color}}},ac={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function sc({chart:e,models:t,viewState:n,viewCache:r,axis:o}){const i=M(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${_a.COMPONENT.BAR}-${o}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return i.get([e,t])||i.empty()&&!1})()||(()=>{const e=ac[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),o=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=ac[a.meta.chart.mode],c=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/o/.2,1));return i.set([e,t],Math.max(2,Math.min(l,c)))})()}const lc=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:o})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),o=t+e;return o>1?t-(o-1):t}:n.query.bar.getWidthFn():t||o?.9:.7;function cc(e){return Math.min(Math.max(0,e),1)}const uc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o})=>{const{layoutService:i,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u,primaryExtremumModel:d,secondaryExtremumModel:p}=t,{isContinuous:m,isBarSeriesStacked:f,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:g}=i.meta,v=e=>e.datum.start?e.datum.start.value:e.scale.min(),y=o?Ya.PRIMARY:Ya.SECONDARY,b=o?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY;if(!(o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=f?{scale:b,start:{ref:"start",fn:e=>{const t=v(e);return cc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return cc(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=v(e);return cc(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?v(e):e.datum.end.value;return cc(e.scale(n))}}},S=(o?d:p).query.getExtrema(),E=f?({start:e,end:t})=>Zl(e.value,t.value,S):({end:e})=>tc(e.value,S);return{type:"box",key:`${_a.COMPONENT.BAR}-${y}`,data:{filter:(()=>{if(f)return;const e=l.query.series(Ua.BAR).filter((e=>e.isPrimary===o)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?o?_a.COLLECTION.STACKED_PRIMARY:_a.COLLECTION.STACKED_SECONDARY:o?_a.COLLECTION.PRIMARY:_a.COLLECTION.SECONDARY},preferredSize:m?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:_a.SCALE.MAJOR,fn:Ml({layoutService:i,axis:y}),ref:m?{start:"major",end:"major"}:void 0},minor:x,box:{width:lc({isContinuous:m,isBarSeriesGrouped:h,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:g}),minWidthPx:m?sc({chart:e,models:t,viewState:n,viewCache:r,axis:y}):void 0,fill:s.getColor(),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t,n;return!0===(null===(t=e.datum)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)||E(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:wl({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:vl}}})}},dc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o})=>{const{layoutService:i,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u}=t,{isBarSeriesStacked:d,isContinuous:p,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:f}=i.meta,h=o?Ya.PRIMARY:Ya.SECONDARY,g=o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${_a.COMPONENT.STACK_BAR}-${h}`,type:"box",data:{collection:o?_a.COLLECTION.STACKED_TOTAL_PRIMARY:_a.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:_a.SCALE.MAJOR,fn:Ml({layoutService:i,axis:h}),ref:p?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:o?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:lc({isContinuous:p,isBarSeriesGrouped:m,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:f}),minWidthPx:p?sc({chart:e,models:t,viewState:n,viewCache:r,axis:h}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function pc({style:e,simplifiedPlacement:t}){return n=>kt.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}function mc(e,t){const n="horizontal"===e.dockService.meta.major.orientation;return{placements:t.simplifiedPlacements.map((e=>function({simplifiedPlacement:e,style:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:pc({style:t,simplifiedPlacement:e}),overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,style:t.style,isHorizontal:n}))),label:t.label}}function fc(e,t,n,r){const o=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let i="up";return"vertical"===t&&o<0?i="down":"horizontal"===t&&(i=o>=0&&!n||o<0&&n?"right":"left"),i}const hc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},gc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function vc(e,t,n,r){const o=[];return void 0!==e&&(o[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(o[t]={position:"inside",onBackground:!1,justify:n}),o}const yc=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:o}=e,{meta:i}=r,a="rtl"===t.options.direction,s=e.themeService.getStyles(),l=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),c=n?Ya.PRIMARY:Ya.SECONDARY;if(!(n?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!hc(l,i))return!1;let u;!i.isBarSeriesStacked&&(u=i.isBarSeriesStacked?1:0);const d={label:e=>Wl(e.data,e),simplifiedPlacements:vc(u,0===u?1:0,i.isBarSeriesStacked?.5:1,i.isContinuous),style:s.label.value},p=[mc(e,d)],m=[{component:`${_a.COMPONENT.BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>fc(t.data.end.value,e.dockService.meta.minor.orientation,a,0),labels:p,fontSize:s.label.value.numFontSize,fontFamily:s.label.value.fontFamily}}}];return{type:"labels",key:`${_a.COMPONENT.BAR_LABEL}-${c}`,layout:{minimumLayoutMode:fl.VALUE_LABEL},settings:{sources:m}}};function bc(e,t,n){const r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function xc({chart:e,models:t,environment:n,isPrimary:r}){const{meta:o}=t.layoutService,i="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),l=r?Ya.PRIMARY:Ya.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!gc(s,o))return!1;const c=e.formatter(r?_a.FORMATTER.PRIMARY:_a.FORMATTER.SECONDARY)||(e=>e),u=e=>0===e?"":c(e),d={label:e=>u(e.data.sumOfPositives.value),simplifiedPlacements:bc("outside",true,o.isContinuous),style:a.label.value},p={label:e=>u(e.data.sumOfNegatives.value),simplifiedPlacements:bc("opposite",true,o.isContinuous),style:a.label.value},m=[mc(t,d),mc(t,p)];return{type:"labels",key:`${_a.COMPONENT.STACK_BAR_LABEL}-${l}`,layout:{displayOrder:2,minimumLayoutMode:fl.VALUE_LABEL},settings:{sources:[{component:`${_a.COMPONENT.STACK_BAR}-${l}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>fc(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,i),labels:m,fontSize:a.label.value.numFontSize,fontFamily:a.label.value.fontFamily}}}]}}}var Sc=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const Ec={min:"Min",max:"Max"};function Mc({chart:e,models:t,type:n,viewCache:r,viewState:o,isPrimary:i}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,discreteModel:d}=t,{isBarSeriesStacked:p,isContinuous:m,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:h}=a.meta,g=p?dc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):uc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),v=i?l.query.getExtrema():c.query.getExtrema(),y=n===kl,b=i?Ya.PRIMARY:Ya.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta["hasExplicit"+Ec[t]]}(v,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,o=Number(r.toFixed(13));return!Sc[`has${Ec[t]}Hat`](o,e)}(v,n,y)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta["hasExplicit"+Ec[t]]&&r(e.explicit[t])}(v,n,y))return!1;let x="end";p&&(x=y?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(i?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let o=r;const i=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`),a=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`);return i&&a&&(o=n?r:`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`),o})({chart:e,type:n,isPrimary:i,dock:y?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${_a.COMPONENT.SLICED_HAT}-${n}-${b}`,layout:{dock:E},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:Z({},g.settings.box,{fill:p?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[x].value);return y?n>t:n<t},width:lc({isContinuous:m,isBarSeriesGrouped:f,styleModel:u,discreteModel:d,isBarSeriesStackedInBothAxis:h}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:wl({layoutService:a})}}const Cc={min:"Min",max:"Max"},wc={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function kc({chart:e,models:t,type:n,viewCache:r,viewState:o,isPrimary:i}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,themeService:u}=t,{end:d,start:p}=s.meta.minor,{isBarSeriesStacked:m}=a.meta,f=m?dc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):uc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),h=i?l.query.getExtrema():c.query.getExtrema(),g=n===kl?h.implicit.bar.max:h.implicit.bar.min,v=Number(g.toFixed(13)),y=i?Ya.PRIMARY:Ya.SECONDARY;if(!f)return!1;if(!rc[`is${Cc[n]}OutOfBounds`](v,h))return!1;const b=(({chart:e,type:t,end:n,start:r,isPrimary:o})=>{let i=t===kl?n:r;const a=e.component(_a.COMPONENT.LABEL_SPACE),s=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`),l=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`),c=e.component(`${_a.COMPONENT.BAR_OOB}-${t}-${Ya.PRIMARY}`),u=e.component(`${_a.COMPONENT.BAR_OOB}-${t}-${Ya.SECONDARY}`);return s?i=`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`:l?i=`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`:c&&u&&!o?i=`@${_a.COMPONENT.BAR_OOB}-${t}-${Ya.PRIMARY}`:a&&t===kl&&(i="@"+_a.COMPONENT.LABEL_SPACE),i})({chart:e,type:n,end:d,start:p,isPrimary:i});let x="end";m&&(x=n===kl?"sumOfPositives":"sumOfNegatives");return{type:"box-out-of-bounds",key:`${_a.COMPONENT.BAR_OOB}-${n}-${y}`,layout:{dock:b},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:he.getDockValue(n===kl?d:p),oob:Z({},f.settings.box,{fill:u.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=m&&0===e.datum[x].value,o=rc[`is${Cc[n]}OutOfBounds`](e.datum[x].value,h,n);return(!r||function({type:e,item:t,prop:n,extrema:r}){const o=t.datum[wc[n]].value;return 0!==o&&rc[`is${Cc[e]}OutOfBounds`](o,r,e)}({type:n,item:e,prop:x,extrema:h}))&&o}})},brush:wl({layoutService:a})}}function Nc(e){return Math.min(Math.max(0,e),1)}const Tc=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:o,styleModel:i,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:c,isBarSeriesGrouped:u,isBarSeriesStackedInBothAxis:d}=s.meta,p=e.scale(r?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY),m=r?Ya.PRIMARY:Ya.SECONDARY,f=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),h=n===kl;if(!nc({extrema:f,type:n}))return!1;const g=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=(e,t="end")=>e.datum[t]?e.datum[t].value:g(e);return{type:"box",key:`${_a.COMPONENT.GHOST_BAR_OOB}-${n}-${m}`,data:{filter:(()=>{if(l)return;const e=a.query.series(Ua.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?_a.COLLECTION.STACKED_TOTAL_PRIMARY:_a.COLLECTION.STACKED_TOTAL_SECONDARY:r?_a.COLLECTION.PRIMARY:_a.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:_a.SCALE.MAJOR,fn:Ml({layoutService:s,axis:m}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:r?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Nc(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=v(e,"sumOfPositives");return Nc(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=v(e,"sumOfNegatives");return Nc(e.scale(t))}}:{ref:"end",fn:e=>{const t=v(e);return Nc(e.scale(t))}}},box:{width:lc({isContinuous:c,isBarSeriesGrouped:u,styleModel:i,discreteModel:o,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=h?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:p.max();return h?n>p.max():n<p.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Oc(e,t,n,r,o){const i=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&i.push({position:"inside",onBackground:!1,justify:r||o?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),i}const Rc=({chart:e,models:t,type:n,environment:r,isPrimary:o})=>{const{layoutService:i,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,themeService:c,seriesModel:u}=t,d=c.getStyles(),{meta:p}=i,{isBarSeriesStacked:m}=p,f=e.formatter(o?_a.FORMATTER.PRIMARY:_a.FORMATTER.SECONDARY),h=i.getLayoutValue("dataPoint.showBarLabels",!1),g="horizontal"===a.meta.major.orientation,v="rtl"===r.options.direction;if(!(o?u.meta.primaryBarSeriesCount:u.meta.secondaryBarSeriesCount)||!m&&!hc(h,p)||m&&!gc(h,p))return!1;const y=o?s.query.getExtrema():l.query.getExtrema();if(!y.meta.hasExplicit)return!1;const b=n===kl?y.implicit.bar.max:y.implicit.bar.min;if(!(n===kl?Ql(b,y):ec(b,y)))return!1;let x=e=>Wl(e.data,e);p.isBarSeriesStacked&&(x=n===kl?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(Ql(e.data.sumOfPositives.value,y)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return f?f(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(ec(e.data.sumOfNegatives.value,y)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return f?f(t):t}return""});const S={label:x,simplifiedPlacements:Oc("outside",true,p.isContinuous,g,v),style:d.label.value},E={label:x,simplifiedPlacements:Oc("opposite",true,p.isContinuous,g,v),style:d.label.value},M=[mc(t,S),mc(t,E)],C=o?Ya.PRIMARY:Ya.SECONDARY,w="horizontal"===a.meta.major.orientation?"down":"right",k=[{component:`${_a.COMPONENT.GHOST_BAR_OOB}-${n}-${C}`,selector:"rect",strategy:{type:"bar",settings:{direction:w,labels:M,fontSize:d.label.value.numFontSize,fontFamily:d.label.value.fontFamily}}}];return{key:`${_a.COMPONENT.BAR_OOB_LABEL}-${n}-${C}`,type:"labels",layout:{minimumLayoutMode:fl.VALUE_LABEL},settings:{sources:k}}},Ac=({chart:e,models:t,viewState:n,viewCache:r})=>[uc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),uc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Lc=({chart:e,models:t,viewState:n,viewCache:r})=>[dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Ic=({chart:e,models:t,environment:n})=>{const{isBarSeriesStacked:r}=t.layoutService.meta;if(r){return[xc({chart:e,models:t,environment:n,isPrimary:!0}),xc({chart:e,models:t,environment:n,isPrimary:!1})]}return[yc({models:t,environment:n,isPrimary:!0}),yc({models:t,environment:n,isPrimary:!1})]},Pc=({chart:e,models:t,viewCache:n,viewState:r})=>[Mc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Mc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Mc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Mc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Dc=({chart:e,models:t,viewCache:n,viewState:r})=>[kc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),kc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),kc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),kc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],qc=({chart:e,models:t})=>[Tc({chart:e,models:t,type:"max",isPrimary:!0}),Tc({chart:e,models:t,type:"min",isPrimary:!0}),Tc({chart:e,models:t,type:"max",isPrimary:!1}),Tc({chart:e,models:t,type:"min",isPrimary:!1})],zc=({chart:e,models:t,environment:n})=>[Rc({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),Rc({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),Rc({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),Rc({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],Bc=({chart:e,environment:t,models:n,viewState:r,viewCache:o})=>{const{seriesModel:i}=n,a=i.query.series(Ua.BAR).slice(-1),s=i.query.series(Ua.LINE),l=i.query.series(Ua.MARKER);return[...Ac({chart:e,models:n,viewState:r,viewCache:o}),...Lc({chart:e,models:n,viewState:r,viewCache:o}),...s.map((e=>Bl({models:n,environment:t,series:e}))),...s.map((e=>Vl({models:n,series:e,environment:t}))),...l.map((r=>Dl({chart:e,models:n,series:r,environment:t}))),...s.map((r=>_l({chart:e,models:n,environment:t,series:r,lineSeries:s}))),...Ic({chart:e,models:n,environment:t}),...Pc({chart:e,models:n,viewCache:o,viewState:r}),...Dc({chart:e,models:n,viewCache:o,viewState:r}),...qc({chart:e,models:n}),...zc({chart:e,models:n,environment:t}),ic({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),ic({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),Gl({chart:e,models:n,environment:t,lineSeries:s})]},$c=0,Fc=1,Hc=3;function jc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:o}=e,{auto:i,spacing:a}=r.getLayoutValue("gridLine",{});if(!i&&a===$c)return!1;const s=o.getStyles(),l=n.meta.primarySeries.length>0;return{key:_a.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:fl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!i&&a===Fc)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!i&&a===Hc,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY}}function Vc({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:o,seriesModel:i}=e,a=t.query.getExtrema();return!!(i.meta.primarySeries.length>0&&a.meta.includesZero)&&{key:_a.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:fl.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===o.meta.minor.orientation?"x":"y"]:[{value:0,scale:_a.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function Wc({models:e}){const{layoutService:t,themeService:n}=e,{isContinuous:r,isTime:o}=t.meta;if(!r)return[];const i=n.getStyles(),a={type:"grid-line",layout:{minimumLayoutMode:fl.GRID_LINE},ticks:{stroke:i.grid.line.major.color},minorTicks:{show:!1,stroke:i.grid.line.minor.color}};return o?[Z(!0,{},a,{key:"time-inner-grid",x:{scale:_a.SCALE.MAJOR_INNER},ticks:{stroke:i.grid.line.minor.color}}),Z(!0,{},a,{key:"time-outer-grid",x:{scale:_a.SCALE.MAJOR}})]:[Z(!0,{},a,{key:"continuous-grid",x:{scale:_a.SCALE.MAJOR},minorTicks:{show:!0}})]}function _c({models:e}){return[jc({models:e}),Vc({models:e}),...Wc({models:e})]}function Uc({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,propertiesModel:i,appModel:a,genericObjectModel:s,themeService:l}=e,c=i.query.getProperties(),u=r.getLayoutValue("dimensionAxis");if(!u)return!1;const{show:d}=u;if("all"!==d&&"title"!==d)return!1;const{orientation:p}=o.meta.major,m=l.getStyles();return{type:"data-title",key:_a.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:o.meta.major.dock,minimumLayoutMode:fl.AXIS_TITLE.MAJOR[p.toUpperCase()]},settings:{hyperCube:r.getHyperCube(),hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:s,app:a,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0},style:{fontFamily:m.axis.title.fontFamily,fontSize:m.axis.title.fontSize,color:m.axis.title.color}}}const Yc=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function Gc({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,seriesModel:i,propertiesModel:a,appModel:s,genericObjectModel:l,themeService:c}=e,u=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return[];const p=c.getStyles(),{measureAxes:m}=i.meta;return m.filter((e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show)).map((e=>{const a=r.getHyperCube(),{isPrimary:c}=e,d=i.query.seriesByAxis(c).length>1,m={type:"data-title",key:c?_a.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:_a.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:c?o.meta.minor.dock:o.meta.minorSecondary.dock,minimumLayoutMode:fl.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!1,explicitItemInfos:Yc(i,a.qMeasureInfo,c),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:p.axis.title.fontFamily,fontSize:p.axis.title.fontSize,color:p.axis.title.color}};return d&&(m.settings.padding="0",m.settings.minWidth="auto"),m}))}function Kc({models:e,environment:t,actions:n}){return[Uc({models:e,environment:t,actions:n}),...Gc({models:e,environment:t,actions:n})]}function Xc({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:o,layoutService:i,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:c,isDiscrete:u,isContinuous:d}=i.meta,p="rtl"===t.options.direction;return!(c&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:o,viewCache:i,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=Es({layoutService:e,override:l});if(d.none)return!1;const{orientation:p}=t.meta.major,m={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===p?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:p,rtl:s,isContinuous:e.meta.isContinuous,range:()=>xs({layoutService:e,viewState:o,viewCache:i})}};d.bar&&(m.settings.style="slim",m.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(m.settings.size.thumb={min:4}));const f=a.getStyles();return f.color&&(m.style={standard:{thumb:{"border-color":f.color,opacity:.4},before:{background:f.color,opacity:.1},after:{background:f.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(m.settings.injections=()=>[bs({layoutService:e,discrete:n})]),m}({viewState:n,viewCache:r,discrete:o,continuousDataModel:s,layoutService:i,dockService:a,themeService:l,rtl:p,scrollbarOverride:{predicate:()=>u,value:ys.OPTIONS.BAR.value},deviceType:t.deviceType})}function Jc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o}){const{layoutService:i}=t,a=uc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o});if(!a)return!1;const s=o?Ya.PRIMARY:Ya.SECONDARY;return a.key=`${_a.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=i.meta.isBarSeriesStacked?o?_a.COLLECTION.REDUCED_STACKED_PRIMARY:_a.COLLECTION.REDUCED_STACKED_SECONDARY:o?_a.COLLECTION.REDUCED_PRIMARY:_a.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=o?_a.SCALE.MINOR.REDUCED_PRIMARY:_a.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=_a.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function Zc({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(Ua.LINE).map((r=>{const o=Bl({models:t,environment:e,series:r});return o.key=Ol(_a.COMPONENT.MINI_CHART.LINE,r),o.data.collection=_a.COLLECTION.REDUCED,o.settings.coordinates.minor.scale=r.isPrimary?_a.SCALE.MINOR.REDUCED_PRIMARY:_a.SCALE.MINOR.REDUCED_SECONDARY,o.settings.coordinates.major.scale=_a.SCALE.REDUCED,o.settings.layers.line.strokeWidth=1,o.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",o.layout={dock:"@scrollbar"},o}))}function Qc({models:e,environment:t}){return e.seriesModel.query.series(Ua.MARKER).map((n=>{const r=Dl({models:e,environment:t,series:n});return r.key=Ol(_a.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=_a.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?_a.SCALE.MINOR.REDUCED_PRIMARY:_a.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=_a.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function eu({chart:e,models:t,viewState:n,viewCache:r,environment:o}){return el(t)?[Jc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Jc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...Zc({environment:o,models:t}),...Qc({models:t,environment:o})]:[]}function tu({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:o}=t.meta,i=t.getLayoutValue("dimensionAxis");if(!i||"none"===i.show||"title"===i.show)return[!1];if(!r)return[!1];const a=fl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return o?[{type:"axis-overlay",key:_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:_a.SCALE.MAJOR_INNER,layout:{dock:"@"+_a.COMPONENT.AXIS.TIME_INNER,minimumLayoutMode:a}},{type:"axis-overlay",key:_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:_a.SCALE.MAJOR,layout:{dock:"@"+_a.COMPONENT.AXIS.TIME_OUTER,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:_a.SCALE.MAJOR,layout:{dock:"@"+_a.COMPONENT.AXIS.MAJOR_CONTINUOUS,minimumLayoutMode:a}}]}function nu({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:o,colorService:i,dockService:a,themeService:s,appLayoutModel:l,seriesModel:c}=t,u=l.qLocaleInfo,{options:d,theme:p}=n,m="rtl"===d.direction,f=c.query.series(Ua.BAR).filter((e=>e.isPrimary)),h=c.query.series(Ua.BAR).filter((e=>!e.isPrimary)),g=c.query.series(Ua.LINE),v=c.query.series(Ua.MARKER),y=c.query.all(),b=y.some((e=>e.isPrimary)),x=y.some((e=>!e.isPrimary)),S=b&&x,E={resolveUIColor:i.getPaletteColor},M=b?Wa({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.dock:a.meta.minor.opposite,scale:_a.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:_a.FORMATTER.PRIMARY,theme:p,localeInfo:u,rtl:m,key:_a.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],C=x?Wa({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.opposite:a.meta.minor.dock,scale:_a.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:_a.FORMATTER.SECONDARY,theme:p,localeInfo:u,rtl:m,key:_a.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&ja({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:_a.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:_a.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:fl.REFERENCE_LINE}),!!x&&ja({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:_a.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:_a.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:fl.REFERENCE_LINE}),ja({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:_a.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:m,key:_a.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`:h.length?`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`:g.length?`${_a.COMPONENT.LINE}-${g[0].id}`:v.length?`${_a.COMPONENT.MARKER}-${v[0].id}`:`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,minimumLayoutMode:fl.REFERENCE_LINE}),...M,...C,...Wa({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dock:a.meta.major.opposite,scale:_a.SCALE.MAJOR,style:s.getStyles(),theme:p,localeInfo:u,rtl:m,key:_a.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function ru(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var ou=[{key:"NoDataExist",alignment:"center",condition:({layoutService:e})=>{const{x:t,y:n}=e.meta.size;return t*n==0}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>{const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>e.getHyperCubeValue("qMeasureInfo").every(ru)},{key:"DataRangeIncludingZero",alignment:"bottom",condition:({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})=>{if(!1===e.getLayout().showDisclaimer&&r.isEnabled("SHOW_DISCLAIMER"))return!1;const o=e.getLayoutValue("measureAxis.logarithmic",!1),i=t.query.getExtrema(),a=n.query.getExtrema();return o&&(i.meta.includesZero||a.meta.includesZero)}}];function iu({environment:e,models:t}){const{flags:n,translator:r,options:o}=e,{layoutService:i,primaryExtremumModel:a,secondaryExtremumModel:s,themeService:l}=t,c=function({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r}){let o,i;for(let a=0,s=ou.length;a<s;a++){o=ou[a];try{i=o.condition({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})}catch(e){throw Error("failing disclaimer condition",e)}if(i)return o}return!1}({layoutService:i,primaryExtremumModel:a,secondaryExtremumModel:s,flags:n});if(!c)return!1;const{fontFamily:u}=l.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:o}=t,{rtl:i}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:te[e].alignment},settings:{label:o.get("Object.Disclaimer."+e),rtl:i},style:r}}(c.key,{translator:r},{rtl:"rtl"===o.direction},{fontFamily:u})}function au({layoutService:e}){return!!el({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:_a.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function su(e){return(null==e?void 0:e.type)||Ua.BAR}function lu({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:o,seriesModel:i,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:c,isGroupedByMeasure:u}=n.meta;if(!s)return!1;const{options:d}=t,p=n.getLayoutValue("color",{}),m=e=>e.filter((e=>su(e)===Ua.LINE)).map((e=>({key:Ol(_a.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),f=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex,h=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:_a.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:m(i.meta.primarySeries),secondary:m(i.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!h[e]&&f,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:i.meta.barSeriesCount,orientation:o.meta.major.orientation,rtl:"rtl"===d.direction}}}function cu({models:{fieldModel:e}}){return{[_a.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[_a.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}const uu=2e3;function du({model:e,layoutService:t,definitionPath:n="/qHyperCubeDef"}){return{fetch(t,r){const o={qStart:t,qEnd:r,qNbrPoints:this.computeNbrOfBins(),qMaxNbrTicks:300,qMaxNumberLines:this.computeMaxNumberLines()};return e.getHyperCubeContinuousData(n,o,!1)},shouldFetchReduced(){const{qHyperCube:e}=t.getLayout();return e.qSize.qcy*e.qMeasureInfo.length>=uu},computeNbrOfBins(){const{qHyperCube:e}=t.getLayout();if(!this.shouldFetchReduced())return uu;let n=e.qMeasureInfo.length||1,r=4+2*(n-1);return e.qDimensionInfo.length>1&&(n=Math.max(1,Math.min(12,t.meta.size.dimensions[1])),r=4),Math.ceil(uu/(n*r))},computeMaxNumberLines(){const{qHyperCube:e}=t.getLayout();return e.qDimensionInfo.length>1&&!this.shouldFetchReduced()?t.meta.size.dimensions[1]+1:12}}}function pu(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function mu({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,o=r+t;return 1===t&&0===e&&(r=n-.5,o=n+.5),{zoom:{min:r,max:o}}}(n,t.get("continuousMin"))}}}function fu(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const o=t.indexOf(e);o>-1&&t.splice(o,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function hu(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],o=fu(),i=fu();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?o.set(l,s):s[0].qNum>t&&(i.has(l)||i.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return o.forEach(((e,t)=>r.splice(t,0,e))),i.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let o,i;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?o=s:s[0].qNum>t&&(i||(i=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return o&&r.unshift(o),i&&r.push(i),r}({start:e,end:t,matrix:n})}function gu(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function vu(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=hu(e,t,n.qMatrix),o=gu(n.qArea,r);return{...n,qArea:o,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const yu=2**.5,bu=1/yu;function xu(e){return e.qIsOtherCell}function Su({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(xu)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(xu)||t++})),t}(n)}const Eu={command:{processDataPage:()=>{}}};var Mu={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],o=t[e+1];r.data={},o||1===r.end?o?(r.data.start=r.value,r.data.end=o.value,r.end=o.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function Cu(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function wu(e,t){const{localProps:{size:n},props:{anchor:r}}=t,o=function({props:e,localProps:{size:t},style:n,renderer:r}){const o=e.label.padding,i=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=r;e.start===e.end&&(d=c.width+2*o,1===e.end&&(u-=d));const p={x:u+o,y:o,width:d-2*o,height:t.height-2*o},m=s(l[0]+"…").width,f=Math.max(0,p.width-c.width),h=Math.max(0,p.height-c.height),g=i*f,v=a*h;return{show:p.width>=Math.min(m,c.width),text:l,dx:g,dy:v,rect:p,style:n.label,segment:{x:u+g,width:c.width+2*o}}}}}(t),i=function({localProps:{size:e},style:t,scale:n,props:r}){const[o,i]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=Cu(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=o&&n.value<=i,x1:l,y1:0,x2:l,y2:Cu(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:o.resolve(e,t),guideLine:i.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],o=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(i=n.segment,a=o.segment,!(i.x<a.x?i.x+i.width>=a.x:a.x+a.width>=i.x))}var i,a}(e,a),a}function ku(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const o=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),i=Cu(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:i,y1:Cu(o,n.minorGuideLine.strokeWidth),x2:i,y2:Cu(t.guideLine.minor.size+o,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function Nu(e){return e.filter((e=>e.show)).map((e=>Z({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2})))}var Tu={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=Cu(1,t.line.strokeWidth);return{show:n.line.show,x1:Cu(0,t.line.strokeWidth),y1:r,x2:Cu(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=wu(n,this),this.state.minor=ku(r,this)},render(){return[...Nu([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>Z({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge"})))),...Nu(this.state.major.map((e=>e.guideLine))),...Nu(this.state.minor.map((e=>e.guideLine)))];var e}};function Ou(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function Ru(e){return e.qTags.indexOf("$qualified")>-1}function Au({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const o=r+1,i=e[r],a=e[o];Ou(i,a)?(Ru(a)?(t.push(o),n.push(r)):(t.push(r),n.push(o)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function Lu({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,o=NaN,i=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(o=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){i="auto",s=!0;break}if(e&&e.queries.inner(n)){i=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(o)&&Number.isNaN(i)&&"auto"!==i){i=o,o=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(o)&&(o="auto",i="auto");return{outer:o,inner:i,minor:a,isDayOrShorter:s}}}}function Iu({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const o=n;return{isDayOrShorter:()=>(o.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,o.isDayOrShorter),count:()=>e.length,maxRange:()=>(o.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,o.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),o.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(""+e.qText).width+16}))),r.clamp(n),o.rangeAndWidth}}}function Pu({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function Du({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:o,scale:i},{attributesFactory:a=Iu,queryFactory:s=Pu}={attributesFactory:Iu,queryFactory:Pu}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:i});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:o})}}(e,t))),c=e.map((e=>l[e])),u=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function qu({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:o},{metaFactory:i=Du,mapper:a=Au,resolver:s=Lu}={metaFactory:Du,mapper:Au,resolver:Lu}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=i({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:o}),p=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const o=p.resolve(t);return n.set(r,o),o}}}function zu(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const Bu=zu(0).getTime();function $u(e){return(e.getTime()-Bu)/86400/1e3}var Fu=new Date,Hu=new Date;function ju(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=function(t){return e(t=new Date(+t)),t},o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return ju((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return Fu.setTime(+t),Hu.setTime(+r),e(Fu),e(Hu),Math.floor(n(Fu,Hu))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var Vu=ju((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Vu.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ju((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Vu:null},Vu.range;var Wu=1e3,_u=6e4,Uu=36e5,Yu=864e5,Gu=6048e5,Ku=ju((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*Wu)}),(function(e,t){return(t-e)/Wu}),(function(e){return e.getUTCSeconds()}));function Xu(e){return ju((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_u)/Gu}))}Ku.range,ju((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wu)}),(function(e,t){e.setTime(+e+t*_u)}),(function(e,t){return(t-e)/_u}),(function(e){return e.getMinutes()})).range,ju((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wu-e.getMinutes()*_u)}),(function(e,t){e.setTime(+e+t*Uu)}),(function(e,t){return(t-e)/Uu}),(function(e){return e.getHours()})).range,ju((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_u)/Yu}),(function(e){return e.getDate()-1})).range;var Ju=Xu(0),Zu=Xu(1),Qu=Xu(2),ed=Xu(3),td=Xu(4),nd=Xu(5),rd=Xu(6);Ju.range,Zu.range,Qu.range,ed.range,td.range,nd.range,rd.range,ju((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})).range;var od=ju((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));od.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ju((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},od.range;var id=ju((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*_u)}),(function(e,t){return(t-e)/_u}),(function(e){return e.getUTCMinutes()}));id.range;var ad=ju((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Uu)}),(function(e,t){return(t-e)/Uu}),(function(e){return e.getUTCHours()}));ad.range;var sd=ju((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Yu}),(function(e){return e.getUTCDate()-1}));function ld(e){return ju((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Gu}))}sd.range;var cd=ld(0),ud=ld(1),dd=ld(2),pd=ld(3),md=ld(4),fd=ld(5),hd=ld(6);cd.range,ud.range,dd.range,pd.range,md.range,fd.range,hd.range;var gd=ju((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));gd.range;var vd=ju((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));vd.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ju((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},vd.range;const yd=1,bd=2,xd=3,Sd=4,Ed=5,Md=6;function Cd({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:o,timeOnly:i,initialMin:a}){const[s,l]=e.domain(),c=o.key({distance:n});let u;o.get(c,1)?u=o.get(c,1):(u=function(e,t,n,r,o,i){function a(e){return vd.filter((t=>(t.getUTCFullYear()-i.getUTCFullYear())%e==0))}const s=Ku.count(e,t),l=id.count(e,t),c=ad.count(e,t),u=sd.count(e,t),d=cd.count(e,t),p=gd.count(e,t),m=vd.count(e,t),f=n/r.second.width-1,h=n/r.minute.width-1,g=n/r.date.width-1,v=n/r.year.width-1,y={type:"year",desc:"year",count:m,interval:vd.every(1),formatter:r.year.formatter,offset:e=>vd.offset(e,-1),floor:vd.floor};if(s<=f)y.type=yd,y.desc="second",y.count=s,y.interval=Ku.every(1),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-1),y.floor=Ku.floor;else if(s/2<=f)y.type=yd,y.desc="every other second",y.count=s/2,y.interval=Ku.every(2),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-2),y.floor=Ku.floor;else if(s/5<=f)y.type=yd,y.desc="every 5 second",y.count=s/5,y.interval=Ku.every(5),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-5),y.floor=Ku.floor;else if(s/15<=f)y.type=yd,y.desc="every 15 second",y.count=s/15,y.interval=Ku.every(15),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-15),y.floor=Ku.floor;else if(s/30<=f)y.type=yd,y.desc="every 30 second",y.count=s/30,y.interval=Ku.every(30),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-30),y.floor=Ku.floor;else if(l<=h)y.type=bd,y.desc="minute",y.count=l,y.interval=id.every(1),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-1),y.floor=id.floor;else if(l/2<=h)y.type=bd,y.desc="every 2 minute",y.count=l/2,y.interval=id.every(2),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-2),y.floor=id.floor;else if(l/5<=h)y.type=bd,y.desc="every 5 minute",y.count=l/5,y.interval=id.every(5),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-5),y.floor=id.floor;else if(l/10<=h)y.type=bd,y.desc="every 10 minute",y.count=l/10,y.interval=id.every(10),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-10),y.floor=id.floor;else if(l/15<=h)y.type=bd,y.desc="every 15 minute",y.count=l/15,y.interval=id.every(15),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-15),y.floor=id.floor;else if(l/30<=h)y.type=bd,y.desc="every 30 minute",y.count=l/30,y.interval=id.every(30),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-30),y.floor=id.floor;else if(c<=h)y.type=xd,y.desc="hour",y.count=c,y.interval=ad.every(1),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-1),y.floor=ad.floor;else if(c/2<=h)y.type=xd,y.desc="every 2 hour",y.count=c/2,y.interval=ad.every(2),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-2),y.floor=ad.floor;else if(c/3<=h)y.type=xd,y.desc="every 3 hour",y.count=c/3,y.interval=ad.every(3),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-3),y.floor=ad.floor;else if(c/6<=h)y.type=xd,y.desc="every 6 hour",y.count=c/6,y.interval=ad.every(6),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-6),y.floor=ad.floor;else if(c/12<=h||o)y.type=xd,y.desc="every 12 hour",y.count=c/12,y.interval=ad.every(12),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-12),y.floor=ad.floor;else if(u<=g)y.type=Sd,y.desc="day",y.count=u,y.interval=sd.every(1),y.formatter=r.date.formatter,y.offset=e=>sd.offset(e,-1),y.floor=sd.floor;else if(u/2<=g)y.type=Sd,y.desc="every 2 day",y.count=u/2,y.interval=sd.every(2),y.formatter=r.date.formatter,y.offset=e=>sd.offset(e,-2),y.floor=sd.floor;else if(u/3<=g)y.type=Sd,y.desc="every 3 day",y.count=u/3,y.interval=sd.every(3),y.formatter=r.date.formatter,y.offset=e=>sd.offset(e,-3),y.floor=sd.floor;else if(d<=g)y.type=Sd,y.desc="week",y.count=d,y.interval=cd.every(1),y.formatter=r.date.formatter,y.offset=e=>cd.offset(e,-1),y.floor=sd.floor;else if(d/2<=g)y.type=Sd,y.desc="every 2 week",y.count=d/2,y.interval=cd.every(2),y.formatter=r.date.formatter,y.offset=e=>cd.offset(e,-2),y.floor=sd.floor;else if(p<=g)y.type=Ed,y.desc="month",y.count=p,y.interval=gd.every(1),y.formatter=r.date.formatter,y.offset=e=>gd.offset(e,-1),y.floor=sd.floor;else if(p/3<=g)y.type=Ed,y.desc="quarter",y.count=p/3,y.interval=gd.every(3),y.formatter=r.date.formatter,y.offset=e=>gd.offset(e,-3),y.floor=sd.floor;else if(p/6<=g)y.type=Ed,y.desc="half year",y.count=p/6,y.interval=gd.every(6),y.formatter=r.date.formatter,y.offset=e=>gd.offset(e,-6),y.floor=sd.floor;else if(m<=v)y.type=Md,y.desc="year",y.count=m,y.interval=vd.every(1),y.formatter=r.year.formatter,y.offset=e=>vd.offset(e,-1),y.floor=vd.floor;else if(m/2<=v)y.type=Md,y.desc="every 2 year",y.count=m/2,y.interval=a(2),y.formatter=r.year.formatter,y.offset=e=>vd.offset(e,-2),y.floor=vd.floor;else if(m/5<=v)y.type=Md,y.desc="every 5 year",y.count=m/5,y.interval=a(5),y.formatter=r.year.formatter,y.offset=e=>vd.offset(e,-5),y.floor=vd.floor;else if(m/10<=v)y.type=Md,y.desc="every 10 year",y.count=m/10,y.interval=a(10),y.formatter=r.year.formatter,y.offset=e=>vd.offset(e,-10),y.floor=vd.floor;else{const e=Math.floor(m/v);y.type=Md,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=r.year.formatter,y.offset=t=>vd.offset(t,-e),y.floor=vd.floor}return y}(s,l,n,t.all(),r,a),o.set(c,u,1));const d=e.ticks(u.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(u.offset(d[0])):d.push(u.floor(s));const p=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}}));let m=[];if(!i&&u.type<=xd){const n=t.getFormat("date"),r=e.ticks(sd.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(sd.offset(r[0],-1)),m=(r.length?r:[sd.floor(s)]).map(((e,t,r)=>{const o=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+o),formatter:n.formatter}}))}return{inner:p,outer:m}}const wd=86400,kd=1440,Nd={};function Td(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Od(e,t,n){const{generator:r,anchor:o,clamp:i,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(i);const[l,c]=e.domain(),u=function(){return Dt.apply(zi(uo,co,no,eo,Qr,Zr,Hr,Dr,go).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([zu(l),zu(c)]);u.clamp(i),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let p;p="d3"===d.type?(e,o)=>Cd({timeScale:u,labels:n,distance:e,isDayOrShorter:o,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:zu(r.initialMin)}):e=>function(e,t,n,r,o,i=!1){if(Nd[[t,n,r,r,i]])return Nd[[t,n,r,r,i]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=zu(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,p=t/(o-r),m=p/1440,f=p/wd,h=366*p,g=3*p*30,v=a.second.width/f,y=a.minute.width/m,b=a.date.width/g,x=a.year.width/h;let S,E,M,C=0,w=0,k=null,N=null,T=null,O=null,R=null,A=null;const L={outer:[],inner:[]};for(v<1?(k=1,w=1/wd):v<2?(k=2,w=1/wd*2):v<5?(k=5,w=1/wd*5):v<10?(k=10,w=1/wd*10):v<30?(k=30,w=1/wd*30):y<1?(N=1,w=1/kd):y<2?(N=2,w=1/kd*2):y<5?(N=5,w=1/kd*5):y<10?(N=10,w=.006944444444444445):y<30?(N=30,w=.020833333333333336):y<60?(T=1,w=1/24):y<120?(T=2,w=2/24):y<360?(T=6,w=.25):y<720?(T=12,w=.5):b<1/90?(w=1,O=1):b<2/90?(w=2,O=2):b<7/90?(w=7,O=7):b<31/90?(R=1,w=31):b<1?(R=3,w=90):x<1?(A=1,w=366):x<2?(A=2,w=732):x<5?(A=5,w=1826.25):(A=10,w=3652.5),E=Math.floor((d+n%1)/w);C<o;){M=E+1,S=A?Td("year",[l+E*A,0,1],[l+M*A,0,1],a.year.formatter):R?Td("month",[l,c+E*R,1],[l,c+M*R,1],a.date.formatter):O?Td("day",[l,c,u+E*O],[l,c,u+M*O],a.date.formatter):T?Td("hour",[l,c,u,0+E*T],[l,c,u,0+M*T],a.minute.formatter):N?Td("minute",[l,c,u,0,0+E*N],[l,c,u,0,0+M*N],a.minute.formatter):Td("second",[l,c,u,0,0,0+E*k],[l,c,u,0,0,0+M*k],a.second.formatter),C=$u(S.start),L.inner.push(S);const e=Math.floor(C);if(!(i||A||R||O)){const t={type:"day",start:zu(e),end:zu(e+1),formatter:a.date.formatter,qStart:e};L.outer[L.outer.length-1]&&L.outer[L.outer.length-1].qStart===t.qStart||L.outer.push(t)}E++}return L.min=r,L.max=o,Nd[[t,n,r,r,i]]=L,L}(n,e,d.min,l,c,"T"===s.qType);const m={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===o?t.qStart:"end"===o?t.qEnd:(t.qStart+t.qEnd)/2;const i=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(i),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>p(t,n)[a].map((t=>{let n;return n="start"===o?$u(t.start):"end"===o?$u(t.end):($u(t.start)+$u(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:$u(t.start),end:$u(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return m}const Rd=/t+/i;const Ad={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function Ld(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const Id="continuousPan";var Pd={model:function({model:e,layoutService:t,dataProcessorModel:n=Eu,viewCache:r,viewState:o,definitionPath:i},a={}){const{engineFetcherFactory:s=du,snapshotFetcherFactory:l=mu,cacheFetcherFactory:c=pu,cache:u={initial:{},merged:{}}}=a,d=s({model:e,layoutService:t,definitionPath:i}),p=l({layoutService:t,viewCache:r}),m=c({cache:u}),f=e=>{throw e.isHandled=!0,e};let h,g,v;return{update(e){var n,i;({initialMin:g,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),r.set("continuousMin",g),r.set("continuousMax",v),r.set("minimiumZoomSpan",(n=g,i=v,Math.max(1e-6,2.3841857910156157e-7*(i-n)))),h=t.meta.isSnapshot?p:d,t.meta.isSnapshot&&({zoom:{min:g,max:v}}=p.getSnapshotData()),o.preventSet("zoom",{min:g,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return h.fetch(g,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=gu(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return n.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),u.initial=t,u.merged=t,e})).then((e=>vu(g,v,e))).then((e=>this.updateLayout(e))).catch(f)},fetch:(e,t)=>h.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,o=[],i=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?o.push(e[t]):a.qNum>r&&i.push(e[t])}return[...o,...t,...i]}(e.qMatrix,t.qDataPages[n].qMatrix),o=gu(e.qArea,r);return{...e,qArea:o,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),o=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,i=e.qAxis.length;t<i;t++){const i=e.qAxis[t],a=n.indexOf(i.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=i.qTicks.length;n<r;n++){const r=i.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}o[a].qTicks=[...s,...o[a].qTicks,...l]}}return{qAxis:o}}(e.qAxisData,t.qAxisData)),n}(u.initial,e))).then((e=>(n.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),u.merged=e,e))).then((n=>vu(e,t,n))).catch(f),fetchFromCache:(e,t)=>m.fetch(e,t).then((n=>vu(e,t,n))),fetchMinMaxData:()=>Promise.resolve(u.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return Z({},e,{...u.initial})},getInitialLayout(){const e=this.getInitialCube();return Z({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Su(u.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e;t.qDataPages=u.merged.qDataPages,t.qAxisData=u.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function o(e,n,o){return r[e](n,o).then((e=>(r.updateLayout(e),t(),e)))}const i=C(((e,t)=>o("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):o("fetchFromCache",e,t).then((n=>(i(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(o,i)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(o.max-o.min)<r?i:{min:Math.min(o.max,Math.max(t,o.min)),max:Math.max(o.min,Math.min(n,o.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:o=!1,targetKey:i}){const a=e.get("continuousMin"),s=e.get("continuousMax");return w(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===i))[0])(e);if(l){const i=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),c=o?1-i:i,{min:u,max:d}=t.get("zoom"),p=Math.abs(d-u),m=p-(r>0?bu:yu)*p,f=u+m*c,h=d-m*(1-c),g=f<a?a-f:0,v=h>s?h-s:0;t.set("zoom",{min:Math.max(f-v,a),max:Math.min(h+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:o}){return{type:"Pan",key:"continuous:pan",options:{event:Id,pointers:1,threshold:10,enable(r,o){return this.started===Id||!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=Id;const{min:o,max:i}=r.get("zoom");this[Id]={min:o,max:i,size:t.component(e).rect.computedInner.width,span:i-o}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:i,size:a}=this[Id],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,o.get("continuousMax")-t),max:Math.max(i+s*t,o.get("continuousMin")+t)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Mu,timeAxis:Tu},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((o=>{const i=e[o],a=typeof i;"function"===a?r[o]=i(n):"object"!==a||Array.isArray(i)?r[o]="undefined"===a?t[o]:i:r[o]=Z(!0,{},t[o],i)})),r}(t,Ad,n),{qAxis:o}=r,i=Ar(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,o);let c,u,d=[];const p=function(e){return Number.isNaN(+e)?NaN:i(e)};p.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),i=n[r.ticks.level];if(Number.isNaN(+i)||(d=u.transform(o[i].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(o[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===i&&(d=u.generate(e,n.isDayOrShorter)),d},p.invert=e=>i.invert(e),p.domain=e=>Array.isArray(e)?i.domain(e):i.domain(),p.range=e=>Array.isArray(e)?i.range(e):i.range(),p.norm=e=>(Ld(a,p),a.instance(e)),p.normInvert=e=>(Ld(a,p),a.instance.invert(e)),p.copy=()=>e(t,n),p.clamp=(e=!0)=>(i.clamp(e),i.clamp()),p.min=()=>Math.min(s,l),p.max=()=>Math.max(s,l),i.range(r.invert?[1,0]:[0,1]),i.domain([s,l]),a.invert=r.invert;const m=function(e){const t={},{measureText:n,fn:r,localeInfo:o}=e.formatter,i={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return o&&Rd.test(o.qTimestampFmt)&&(i.minute.pattern+=" tt",i.second.pattern+=" tt"),i.date.pattern=o&&o.qDateFmt?o.qDateFmt:i.date.pattern,Object.keys(i).forEach((e=>{i[e].formatter=r(i[e].pattern),i[e].width=Math.max(i[e].width,n(i[e].formatter(41000.2343433)).width+16)})),t.getFormat=e=>i[e],t.all=()=>i,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return i.date;const r=zu(t[0].data.start),o=zu(t[n-1].data.start);return sd.count(r,o)/n>=1?i.date:ad.count(r,o)/n>0?i.minute:id.count(r,o)/n>0?i.second:i.date},t}(r);return u=Od(i.copy(),r,m),c=qu({qAxis:o,measureText:r.formatter.measureText,reqAutoFitWidth:2*m.getFormat("minute").width,cache:r.cache,scale:p}),p.data=()=>({fields:[{formatter:p.formatter,id:()=>"qHyperCube/"+r.field,key:()=>r.field,raw:E(n,"fields.0.raw",(()=>({})))}]}),p.formatter=()=>m.getFormatFromTicks(d).formatter,p}}};const Dd=e=>e.meta.seriesComponentKeys[0],{event:{onZoom:qd}}=Pd;function zd({chart:e,models:t,actions:n,viewState:r,viewCache:o,environment:i}){const{layoutService:a,seriesModel:s}=t,l=Dd(s),c=a.meta.isContinuous?qd({chart:e,viewState:r,viewCache:o},{rtl:"rtl"===i.options.direction,threshold:50,targetKey:l}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},o=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=o.filter((e=>e.key===_a.COMPONENT.LEGEND_CATEGORICAL));((e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}})(t,e)}if(n.scroll.enabled()){const[e]=o.filter((e=>e.key===l));e&&(c(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const Bd="continuousPinchZoom";const $d=Pd.interactions.areaPan;function Fd({chart:e,models:t,environment:n,viewState:r,viewCache:o,actions:i,selectables:a}){const{layoutService:s,dockService:l,discreteModel:c,colorService:u,tooltipService:d}=t,p="rtl"===n.options.direction,m=d.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return{gestures:[...Ls({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})],native:Is({componentKey:e,chart:t,actions:n,layoutService:i})}}({componentKey:"scrollbar",chart:e,actions:i,viewState:r,viewCache:o,discrete:c,layoutService:s,dockService:l,rtl:p}),h={type:"hammer",enable:!0,gestures:[...u.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures,...m.gestures]},g=[zd({chart:e,models:t,actions:i,viewState:r,viewCache:o,environment:n}),f.native,m.native];return s.meta.isDiscrete&&(h.gestures.push(...c.interactions.gestures),g.push(c.interactions.native)),s.meta.isContinuous&&h.gestures.push($d({targetKey:Dd(t.seriesModel),chart:e,actions:i,viewState:r,viewCache:o}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:o,rtl:i}){const a={last:0,diff:0},s=Pd.event.onZoom({viewCache:o,viewState:r,chart:t},{threshold:100,rtl:i,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:Bd,pointers:2,threshold:0,enable:(r,o)=>!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))},events:{[Bd+"start"](e){a.last=e.scale,e.preventDefault()},[Bd+"move"](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:Dd(t.seriesModel),chart:e,actions:i,viewState:r,viewCache:o,rtl:p})),[h,...g]}const Hd="lasso",jd=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},o)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:Hd,enable(e,n){if(this.started===Hd||!n)return!0;if(!o.actions.select.enabled()||!o.actions.lasso.enabled()||!o.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==Hd&&(o.actions.select.emit("start",Hd),this.chart.component(e).emit("lassoStart",t),this.started=Hd)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),o.actions.select.emit("end",Hd)}}});const Vd=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:o="tap"},i)=>{let a;const s=i.customTooltipModel?i.customTooltipModel.utils:void 0,l=s?i.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:o,interval:10,pointers:1,enable(t,n){return!n||!(!i.actions.select.enabled()&&!i.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[o](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,o;return e.center?(({x:r}=e.center),({y:o}=e.center)):(r=e.clientX,o=e.clientY),{x:r-n.left,y:o-n.top}}(t,this.chart),c=i.hitRadius?i.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=i.shapesAt?i.shapesAt(u):this.chart.shapesAt(u,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),p=this.chart.component("tooltip"),m="mouse"!==t.pointerType&&p&&p.show;if(!i.isLocked(a)&&!i.tooltipOnly&&i.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1,i.actions.select.emit("start",o,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),i.actions.select.emit("end",o)}}if(p&&i.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=i;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,p,{nodes:n,opts:i,customTooltipModel:e})}else p.emit("show",t,{nodes:d})}else m&&p.emit("hide")}}}};const Wd=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},o)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!o.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const _d=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:o},i,a)=>({key:"event:"+t,type:"Pan",requireFailure:r,recognizeWith:o,options:{event:e,enable(r,o){if(this.started===e||!o)return!0;if(!i.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:o.center.x,y:o.center.y}).filter((e=>-1!==n.indexOf(e.key)));return 0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(t+"-"))}(o,t)?(this.started=e,!0):a.length>0}},events:{[e+"start"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),i.actions.select.emit("start",e),this.chart.component(t).emit(a+"Start",n),this.started=e},[e+"move"](e){e.preventDefault(),this.chart.component(t).emit(a+"Move",e)},[e+"end"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(a+"End",n),i.actions.select.emit("end",e),this.started=!1}}});function Ud(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:o,targetFillSelector:i,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:p}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>"@"+e)).join(",")},on:p?{bubbleEnd(){p()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:o,fillSelector:i,fill:"rgba(82,204,82,0.2)"}}}}(e),r=_d(e,t,"range");return{interactions:[e.onEdited?Wd(e,t):null,r].filter(Boolean),components:[n]}}const Yd=/axis|legend/;function Gd({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:o,flags:i}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1);return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[Vd(e,t)],components:[]}}({targets:[`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`,...n.query.series(Ua.MARKER).map((e=>Ol(_a.COMPONENT.MARKER,e))),...n.query.series(Ua.LINE).map((e=>Ol(_a.COMPONENT.POINT,e))),_a.COMPONENT.AXIS.MAJOR,_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER,_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS,_a.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,o={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[_a.COMPONENT.AXIS.MAJOR,_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER,_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS,_a.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(o.data=["selectionDimension"]),[o]}},{actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?o.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>(e=>e.some((e=>Yd.test(e.type))))(e)?0:3,debouncer:C,flags:i})}function Kd({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:o}=t,{isDiscrete:i,isDimensionLocked:a}=n.meta;if(!i||a)return!1;const s=[...o.meta.seriesComponentKeys,_a.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:o,dock:i}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>"@"+e)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"inside"},target:{components:o,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[_d(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[_a.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const Xd={components:[],interactions:[]};function Jd({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:o,layoutService:i}=t;return!(i.meta.isDimensionLocked||i.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&Ud({eventName:"minorRange",key:"minor-range-brush",targets:[_a.COMPONENT.AXIS.MINOR.PRIMARY,`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,...o.query.series(Ua.MARKER).filter((e=>e.isPrimary)).map((e=>Ol(_a.COMPONENT.MARKER,e))),...o.query.series(Ua.LINE).filter((e=>e.isPrimary)).map((e=>Ol(_a.COMPONENT.POINT,e)))],fillTargets:[_a.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:_a.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Xd,i=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:o,layoutService:i}=t;return!(i.meta.isDimensionLocked||i.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&Ud({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[_a.COMPONENT.AXIS.MINOR.SECONDARY,`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`,...o.query.series(Ua.MARKER).filter((e=>!e.isPrimary)).map((e=>Ol(_a.COMPONENT.MARKER,e))),...o.query.series(Ua.LINE).filter((e=>!e.isPrimary)).map((e=>Ol(_a.COMPONENT.POINT,e)))],fillTargets:[_a.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:_a.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Xd,a=Kd({actions:e,models:n})||Xd,s=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:o,seriesModel:i}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return Ud({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`,...i.query.series(Ua.MARKER).map((e=>Ol(_a.COMPONENT.MARKER,e))),...i.query.series(Ua.LINE).map((e=>Ol(_a.COMPONENT.POINT,e))),...l],fillTargets:l,dock:o.meta.major.dock,scale:s?_a.SCALE.MAJOR_INNER:_a.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const o=s?r.formatter():t.formatter(_a.FORMATTER.PRIMARY),i=t.scale(_a.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===i;return`${e!==Math.max(...n)||a?"":"<"}${o(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||Xd,l=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[o]=n.custom.legendComponents(),i=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!o)return!1;const s=_a.SCALE.COLOR+"Range",{type:l,key:c}=o,u=i[s];return!("legend-seq"!==l||!u||u.min>=u.max)&&Ud({eventName:"legendRange",key:"legend-range-brush",targets:[c],fillTargets:[c],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:o.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||Xd;return{components:[...o.components,...i.components,...a.components,...s.components,...l.components],interactions:[...o.interactions,...i.interactions,...a.interactions,...s.interactions,...l.interactions]}}function Zd({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:o}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=(({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}))(n);return{interactions:[jd(n,t)],components:[r]}}({key:"lasso",componentTargetKey:o[0],components:o.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function Qd({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a,isUnsupportedFeature:s}){const{colorService:l,pluginService:c}=n,u=n.layoutService.getLayout(),{options:d}=r,p=function(e,t){return{layoutModes:oe.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}(0,{logicalSize:function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:u,options:d}),minCenterRatio:0}),m=function({chart:e,models:t,environment:n,viewState:r,viewCache:o,actions:i}){var a;const{colorService:s,layoutService:l,dockService:c,tooltipService:u}=t,d=iu({environment:n,models:t});return"center"===(null==d||null===(a=d.layout)||void 0===a?void 0:a.dock)?[d]:[..._c({models:t}),...gl({models:t}),...Bc({chart:e,models:t,environment:n,viewState:r,viewCache:o}),lu({models:t,environment:n}),...El({models:t,environment:n}),...Kc({models:t,environment:n,actions:i}),Hi({viewState:r,viewCache:o,layoutService:l,dockService:c}),...tu({models:t}),...nu({chart:e,models:t,environment:n}),Xc({models:t,environment:n,viewState:r,viewCache:o}),...s.custom.legendComponents(),au(t),...eu({chart:e,models:t,viewState:r,viewCache:o,environment:n}),...u.getComponents(),d].filter(Boolean)}({chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a}),f=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:o}=n,i=o.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=Gd({actions:e,models:n});if(i)return{components:[...a.components],gestures:[...a.interactions]};const s=Jd({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=Zd({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:a,chart:t,models:n,isUnsupportedFeature:s}),h=c.extendComponents([...m,...f.components]);return{collections:tl({models:n}),scales:ml({picasso:e,models:n,viewState:o,viewCache:i,environment:r}),components:h,formatters:cu({models:n}),interactions:Fd({chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a,selectables:f}),strategy:p,palettes:l.getPalettes()}}const ep=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:_a.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),tp=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:_a.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],{event:{onZoomIntercept:np,onZoomChange:rp}}=Pd,op=[_a.COMPONENT.AXIS_TITLE.MAJOR,_a.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,_a.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,_a.COMPONENT.GRID_LINE,_a.COMPONENT.ZERO_LINE];var ip={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function ap(e){return ip[e]||e}function sp(e){return function(t,n,r){var o,i,a,s,l=[],c=!0;function u(){"function"==typeof o.enable&&(o.enable=o.enable.bind(i)()),o.enable&&(o.gestures.forEach((function(t){t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(i));var n=ap(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),(a=a||new e.Manager(r)).add(new e[n](t.options)),Object.keys(t.events).forEach((function(e){t.events[e]=t.events[e].bind(i),a.on(e,t.events[e])})),l.push(t))})),o.gestures.forEach((function(t){var n=ap(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((function(e){return""!==e}))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((function(e){return""!==e}))))})))}function d(){l.forEach((function(e){Object.keys(e.events).forEach((function(t){a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set:function(e){!function(e){s=e.key,i={chart:t,mediator:n,settings:o=e},o.gestures=o.gestures||[],void 0===o.enable&&(o.enable=!0)}(e),d(),c&&u()},off:function(){c=!1,d()},on:function(){c=!0,0===l.length&&u()},destroy:function(){d(),a&&a.destroy(),a=null,i=null,o=null}}}}function lp(){return(lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var cp={exports:{}};function up(){}function dp(){}dp.resetWarningCache=up;cp.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:dp,resetWarningCache:up};return n.PropTypes=n,n}();var pp={black:"#000",white:"#fff"},mp="#e57373",fp="#f44336",hp="#d32f2f",gp="#ff4081",vp="#f50057",yp="#c51162",bp="#7986cb",xp="#3f51b5",Sp="#303f9f",Ep={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};function Mp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function Cp(e){if(e.type)return e;if("#"===e.charAt(0))return Cp(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function wp(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function kp(e){var t="hsl"===(e=Cp(e)).type?Cp(function(e){var t=(e=Cp(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),wp({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Np(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return kp(e)>.5?Op(e,t):Rp(e,t)}function Tp(e,t){return e=Cp(e),t=Mp(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,wp(e)}function Op(e,t){if(e=Cp(e),t=Mp(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return wp(e)}function Rp(e,t){if(e=Cp(e),t=Mp(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return wp(e)}function Ap(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lp(){return(Lp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ip(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Pp(){return(Pp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Dp(e){return(Dp="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})(e)}function qp(e){return(qp="function"==typeof Symbol&&"symbol"===Dp(Symbol.iterator)?function(e){return Dp(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Dp(e)})(e)}function zp(e){return e&&"object"===qp(e)&&!Array.isArray(e)}function Bp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Pp({},e):e;return zp(e)&&zp(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(zp(t[o])&&o in e?r[o]=Bp(e[o],t[o],n):r[o]=t[o])})),r}(cp.exports.element,function(){return null}).isRequired=(cp.exports.element.isRequired,function(){return null});var $p={exports:{}},Fp={};
7
+ System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","react","react-dom","qlik-object-conversion"],(function(e){"use strict";var t,n,r,o,i,a,s,l,c,u,d,p,m,f,h,g,v,y,b,x,S,E,M,C,w,k,N,T,O,R,A,L,I,P,D,q,z,B,$,F,H,j,V;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,o=e.useRect,i=e.usePromise,a=e.useStaleLayout,s=e.useModel,l=e.useApp,c=e.useAppLayout,u=e.usePlugins,d=e.useEmbed,p=e.useOptions,m=e.useTranslator,f=e.useTheme,h=e.useDeviceType,g=e.useConstraints,v=e.useLayout,y=e.useAction,b=e.useSelections,x=e.onTakeSnapshot,S=e.useImperativeHandle},function(e){E=e.getValue,M=e.cache,C=e.debouncer,w=e.throttler,k=e.colorService,N=e.tooltipService,T=e.layoutService,O=e.dockService,R=e.themeService,A=e.pluginService,L=e.storage,I=e.selectionService,P=e.setValue},function(e){D=e.default},function(e){q=e.default},function(e){z=e.default},function(e){B=e.default,$=e.Children,F=e.isValidElement,H=e.cloneElement},function(e){j=e.default},function(e){V=e.default}],execute:function(){e("default",(function(e){var b,C;const{flags:k}=e,N=null===(b=e.anything)||void 0===b||null===(C=b.sense)||void 0===C?void 0:C.isUnsupportedFeature,I=(()=>{const e=q();return e.use(z),e.use(function(e){if("function"!=typeof e.interaction)return function(t){t.interaction("hammer",sp(e))};return void e.interaction("hammer",sp(Hammer))}(D)),e.use(Yw),e.use(function(){return function(e){e.renderer("react",function(){function e({x:e,y:t,width:n,height:r,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,o=e();const i={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=o.scaleRatio.x,n=o.scaleRatio.y;return r.style.left=Math.round(o.margin.left+o.x*t)+"px",r.style.top=Math.round(o.margin.top+o.y*n)+"px",r.style.width=Math.round(o.width)+"px",r.style.height=Math.round(o.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",j.render(function(e,t){return B.createElement(Ag,{generateClassName:t},B.createElement(ov,{theme:Ww},e))}(e,_w),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&j.unmountComponentAtNode(r),i),destroy(){r&&r.parentElement&&(j.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(o=e(t)),o)};return i}}()),e.component("data-title",function(){function e({title:e,selected:t,onClick:n}){const r=xe.detectTextDirection(e);return B.createElement(FS,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},B.createElement(VS,{style:{minWidth:32}},B.createElement(Rw,{d:t?Iw:""})),B.createElement(US,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:o,dock:i,list:a,onClose:s,show:l,instruction:c}){const u=a.map(((t,r)=>B.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return B.createElement(QS,lp({anchorEl:t,open:l,onClose:s},jw[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),B.createElement(zS,{dense:!0,dir:o,"aria-label":c,component:"nav"},B.createElement(e,{title:r,selected:!0,onClick:s}),u))}e.propTypes={title:cp.exports.string.isRequired,selected:cp.exports.bool,onClick:cp.exports.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:cp.exports.any,changeTo:cp.exports.func.isRequired,current:cp.exports.string.isRequired,dir:cp.exports.string.isRequired,dock:cp.exports.string.isRequired,list:cp.exports.array,onClose:cp.exports.func.isRequired,show:cp.exports.bool.isRequired,instruction:cp.exports.string},t.defaultProps={list:[],alignTo:null};class n extends B.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=B.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:n,translator:r,disabled:o,isDimension:i,padding:a,minWidth:s,hasAlternative:l}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},u=e.breadcrumbs.length,d=o||this.state.inSelection,p=e.breadcrumbs.map(((t,n)=>B.createElement(Vw,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>d?void 0:e.drillUp(u-n),title:t},B.createElement("span",{style:c},t),B.createElement(Rw,lp({},Dw,{size:"small",style:{margin:"0 8px"}}))))),m=n&&!this.state.open?this.openPopover:this.closePopover,f=!n||o||this.state.inSelection,h={display:"flex",alignItems:"center",width:"100%",color:f&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!i&&f&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(h.background="rgba(0,0,0,0.08)");const g=e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},v=e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"};a&&(h.padding=a),s&&(h.minWidth=s);const y=xe.detectTextDirection(e.text),b=B.createElement(Vw,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:h,onClick:f?void 0:m,title:e.text,tabIndex:f?-1:0,onFocus:f?void 0:g,onBlur:f?void 0:v,onMouseDown:e=>{e.preventDefault()}},e.locked&&B.createElement(Rw,lp({},Lw,{size:"small",title:r.get("Tooltip.selections.locked")})),B.createElement("span",{style:c,dir:y},e.text),n&&B.createElement(Rw,lp({},Pw,{size:"small",style:{margin:"0 8px"}})));return B.createElement(B.Fragment,null,e.drilldown&&B.createElement(Rw,lp({},Aw,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),p,B.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:l?"auto":"none",height:"100%"}},b),n&&B.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:r.get("Accessibility.Popover.Instructions")}))}}function r(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"===e?(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}function o(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&le(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}function a(e){return e.isDimension&&le(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0}return n.propTypes={disabled:cp.exports.bool.isRequired,padding:cp.exports.string,minWidth:cp.exports.string,titleData:cp.exports.shape({breadcrumbs:cp.exports.arrayOf(cp.exports.string).isRequired,drilldown:cp.exports.bool.isRequired,index:cp.exports.number.isRequired,locked:cp.exports.bool.isRequired,text:cp.exports.string.isRequired,popoverText:cp.exports.string.isRequired,drillUp:cp.exports.func}).isRequired,popover:cp.exports.shape({dir:cp.exports.string.isRequired,dock:cp.exports.string.isRequired,changeTo:cp.exports.func.isRequired,getAlternatives:cp.exports.func.isRequired}),translator:cp.exports.shape({get:cp.exports.func.isRequired}).isRequired,selections:cp.exports.shape({isActive:cp.exports.func,addListener:cp.exports.func,removeListener:cp.exports.func}),style:cp.exports.shape({fontSize:cp.exports.string,color:cp.exports.string,fontFamily:cp.exports.string}).isRequired,isDimension:cp.exports.bool.isRequired,hasAlternative:cp.exports.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:s,hyperCube:l,hyperCubeDef:c,isDimension:u,minWidth:d,model:p,onChangeToAlternative:m,padding:f,rtl:h,selections:g,skipAttributeExpressions:v,translator:y},layout:{dock:b}}=this.settings,x="top"!==b&&"bottom"!==b||!h?"ltr":"rtl",S=r(b,this.rect),E=c&&c.qLayoutExclude&&c.qLayoutExclude.qHyperCubeDef,M=E&&E[u?"qDimensions":"qMeasures"]||[],C=s||l[u?"qDimensionInfo":"qMeasureInfo"],w=u?Bw:Fw,k=u?$w:Hw,N=p&&p.colorSupport&&p.modifiers&&w({altList:M,app:e,dir:h?"rtl":"ltr",dock:o(b),model:p,onChange:m,skipAttributeExpressions:v,translator:y}),T=a(this.settings.settings)||i(this.settings.settings),O=C.map(((e,r)=>{const o="number"==typeof e.explicitColumn?e.explicitColumn:r,i=k(e,o,p),a=r===C.length-1;return B.createElement(B.Fragment,{key:e.cId},B.createElement(n,{popover:N,titleData:i,model:p,translator:y,selections:g,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:d,hasAlternative:T}),!a&&B.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return B.createElement("div",{style:S,dir:x},O)}}}()),e.component("disclaimer",function(){class e extends B.Component{render(){const{label:e,spanStyle:t}=this.props;return B.createElement(B.Fragment,null,B.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}function t(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":r.width=n.height+"px",r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=n.height+"px",r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=n.width+"px",r.height=n.height+"px",r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}return e.propTypes={label:cp.exports.string.isRequired,spanStyle:cp.exports.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:n,rtl:r},layout:{dock:o},style:i={}}=this.settings,a="top"!==o&&"bottom"!==o||!r?"ltr":"rtl",s=t(i,o,this.rect),l="center"===o?n:"* "+n,c="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return B.createElement("div",{style:s,dir:a},B.createElement(B.Fragment,null,B.createElement(e,{label:l,spanStyle:c})))}}}())}}()),e.component("scrollbar",Qs),e.component("point-label",iN),e.component("label-space",aN),e.component("time-axis",Pd.picassoComponents.timeAxis),e.component("axis-overlay",Pd.picassoComponents.axisOverlay),e.component("reference-line-labels",za),e.component("box-sliced-hat",rk),e.component("box-out-of-bounds",Zw),e.component("data-out-of-bounds-marker",sN),e.component("scroll-hint",Fi),e.component("brush-highlighter",yN),e.scale("time",Pd.picassoScales.time),e.symbol("line-point",lN),e})();return{qae:dA(e),ext:DA(e),component(){const e=function(){const[e,t]=n();return r((()=>t(M())),[]),e}(),b=function(){const[e,t]=n();return r((()=>{t(L({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),C=function(){const e=p(),t=m(),o=d(),i=f(),[a,s]=n(),l=h();return r((()=>{s({options:{direction:"ltr",...e},translator:t,theme:i,embed:o,deviceType:l})}),[e.direction,e.freeResize,t.language(),i.name(),l]),a}(),P=function(){const e=g(),[t,o]=n(!1),[i,a]=n(!1),[s,l]=n(!1),c=function(){const e=g(),[t,o]=n(!1),[i,a]=n({}),[s,l]=n();return r((()=>()=>{a({})}),[]),r((()=>{e&&o(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>i[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=i[e])||void 0===n?void 0:n.indexOf(t);r>-1&&i[e].splice(r,1)},on:(e,t)=>{Array.isArray(i[e])?i[e].push(t):i[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),u=function(){var e,t,o;const i=g(),[a,s]=n(!1),[l,c]=n(!1),u=v(),d=m(),p=!!u.qSelectionInfo.qInSelections,f=!(null===(e=u.qHyperCube)||void 0===e||null===(t=e.qDimensionInfo)||void 0===t||null===(o=t[0])||void 0===o||!o.qIsOneAndOnlyOne);r((()=>{i&&s(!i.select&&!i.active)}),[i]);const h=e=>{c("boolean"==typeof e?e:!l)};return y((()=>({key:"lasso",label:d.get(l?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:tA,hidden:!a||!p||f,active:l,action:h})),[p,f,l,a,d.language()]),{action:h,enabled:()=>a,active:()=>l}}();let d=nA;r((()=>{e&&(o(!e.active),a(!e.active),l(!e.passive))}),[e]);const[p]=n({});return p.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||nA}},p.interact={enabled:()=>i},p.tooltip={enabled:()=>s},p.lasso=u,p.select=c,p}(),D=function({picasso:e,environment:o}){const i=t(),[a,s]=n();return r((()=>{if(!o)return;i.style.overflow="hidden";const t=e({renderer:{prio:[o.options.renderer||"canvas"]}}).chart({element:i,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[o]),a}({picasso:I,environment:C}),q=iA({chart:D,actions:P}),z=(({picasso:e,chart:t,environment:p,flags:m,viewState:f,viewCache:h,actions:g,selectionService:v})=>{const y=a(),{width:b,height:x}=o(),[S,C]=n(),[k,N]=n(),L=s(),I=l(),P=c(),D=u(),q=d();r((()=>{if(!(y&&null!=t&&t.update&&p&&f))return;const n=T({source:y,metaAdditionsFn:ZO()}),{options:r,translator:o}=p,{direction:i,viewState:a={}}=r,s="rtl"===i,{legendScrollOffset:l,scrollOffset:c}=n.meta.isSnapshot?n.getLayoutValue("snapshotData.content.chartData",{}):a;f.preventSet("scrollOffset",c),f.preventSet("legendScrollOffset",l),f.preventSet("title",n.getLayoutValue("title"));const u=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=function({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;if(n)return function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t});if(r)return function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t});return function({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(fe).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),o=t.getHyperCubeValue("qDimensionInfo"),i="K"===r&&o.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo");return{reducedCube:{qDataPages:a,qDimensionInfo:o.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize")}}}))}(e,t,{path:"/qHyperCubeDef",rect:QO({layoutService:t}),zoomLevel:-1,filter:"D1"})}}({genericObjectModel:e,layoutService:t})}({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:L,layoutService:n}),d=O({chart:t,layoutService:n,config:{logicalSize:{width:b,height:x},rtl:s},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),S=function({layoutService:e,dockService:t}){const{BAR:n,LINE:r,POINT:o}=$l,i=JR({layoutService:e,key:"bar"}),a=JR({layoutService:e,key:"line"}),s=()=>i({property:"width",defaultValue:.7}),l=()=>{const e=i({property:"strokeWidth",defaultValue:"none"});return e?n.STROKE.WIDTH[e.toUpperCase()]:0};return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>s(),getHasStrokeWidth:()=>!!l(),getStrokeWidth:()=>l(),getStrokeColor:()=>i({property:"strokeColor",defaultValue:{index:-1,color:n.STROKE.COLOR}}).color},line:{getCurveFn:()=>(e,t)=>a({property:"lineCurve",defaultValue:r.CURVE.LINEAR,index:t}),getStrokeWidthFn:()=>(e,n)=>a({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?r.WIDTH.FULL.DEFAULT:r.WIDTH.LESS.DEFAULT,index:n}),getStrokeDasharrayFn:()=>(e,t)=>{const n=a({property:"lineType",defaultValue:r.TYPE.SOLID,index:t});return n&&r.TYPE[n.toUpperCase()]}},point:{getSize:e=>a({property:"dataPointSize",defaultValue:o.SIZE.DEFAULT,index:e})}}}}({layoutService:n,dockService:d}),k=(({layoutService:e})=>{const t=!JO(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[Ua.BAR]:0,[Ua.LINE]:0,[Ua.MARKER]:0};return({series:r=Ga},o)=>{const i=MN(r,t),a=su(r);return{id:o,type:a,typeIndex:n[a]++,ref:"qMeasureInfo/"+o,refIndex:o,isPrimary:i,scale:i?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY,collection:i?_a.COLLECTION.PRIMARY:_a.COLLECTION.SECONDARY,options:EN({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>su(e)===t)).length,o=n.filter((e=>e.isPrimary)),i=n.filter((e=>!e.isPrimary)),a=[!!o.length&&o[0],!!i.length&&i[0]].filter((e=>!!e)),s=r(n,Ua.BAR),l=r(o,Ua.BAR),c=r(i,Ua.BAR),u=e=>n.filter((t=>su(t)===e)),d=u(Ua.LINE).map((e=>Ol(_a.COMPONENT.POINT,e))),p=u(Ua.MARKER).map((e=>({key:Ol(_a.COMPONENT.MARKER,e),type:e.options.marker}))),m=p.map((e=>e.key)),f=[];l>0&&f.push(`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`);c>0&&f.push(`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`);const h=[...f,...d,...m],{MINI_CHART:g}=_a.COMPONENT,v=u(Ua.LINE).map((e=>Ol(g.LINE,e))),y=u(Ua.MARKER).map((e=>Ol(g.MARKER,e))),b=e.meta.isContinuous?[`${g.BAR}-${Ya.PRIMARY}`,`${g.BAR}-${Ya.SECONDARY}`,...v,...y]:[];return{meta:{allSeries:n,primarySeries:o,secondarySeries:i,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:c,measureAxes:a,pointComponentKeys:d,markerComponentKeys:m,barComponentKeys:f,seriesComponentKeys:h,miniComponentKeys:b,markers:p},query:{all:()=>n,seriesByAxis:e=>e?o:i,series:u,isPrimary:MN}}})({layoutService:n,flags:m}),N=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:o,viewState:i,rtl:a,actions:s,picasso:l}){const c=Dd(o);return function({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:o,dockService:i,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:d,axisKey:p,renderer:m,areaBuffer:f,processDataPage:h=(()=>{})}={}}){const g=M(),v=function({qMode:e}){switch(e){case"S":default:return OR;case"K":return RR;case"T":return AR}}({qMode:o.getHyperCubeValue("qMode")}),y=function({state:e,contains:t}){return e.set(LR,[]),{add:t=>{const n=e.get(LR);n.length=0,n.push(t)},getCurrent:()=>e.get(LR)[0],getAll:()=>e.get(LR),contains:n=>t(e.get(LR)[0],n)}}({state:g,contains:v.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const o=n.patcher({layoutService:e});o.should(r)&&o(r);t.add(r)}({layoutService:o,dataStore:y,composition:v});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:f}),x=function({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:o=$R,definitionPath:i,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:o,process:i,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const o=n.release(r.qArea,l),s=i.isProcessing();if(!o&&s&&i.cancel(),!o||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());i.isProcessing()&&c&&c();const u=r(l);return i(o(u)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:zR({layoutService:r}),request:c({layoutService:r,definitionPath:i}),process:BR(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=w(((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==ER)throw e}))}),50);return function(e,{onProcessing:t=MR,onDataPage:n=MR}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),o.command.update(),n(e)}})}}({dataStore:y,composition:v,enigmaModel:r,layoutService:o,trendLineModel:a,definitionPath:u,processDataPage:h}),S=function({chart:e,componentKey:t,state:n,dataStore:r,pageData:o,layoutService:i,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:p,rtl:m}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const f=function({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:o,getItemWidths:i,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:d,scaleRange:p}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;if(t)return FR;if(!n)return HR;return r?_R:GR}({layoutService:r}),m=()=>"horizontal"===o.meta.major.orientation?t().width:t().height,f=e=>e?m()/e:0,h=(e,t)=>-(e-t)*f(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=u({layoutService:r});return{inTotal:l,inView:KR({chart:e,rect:t(),dockService:o,itemWidths:i(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(CR/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return f(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,o=Math.min(0,Math.max(e,h(n,r))),i=r?Math.abs(r*o/m()):0;return{start:{pixel:o,item:i},end:{item:Math.min(i+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return h(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const o=e/n*t,i=Math.abs(r)/o;return[i,i+e/o]}({viewSize:m(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const i=p({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:m(),upperBound:h(t.inTotal,t.inView)});return"horizontal"===o.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(i):i},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=h(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*f(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(f(r)*n)}}}}({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:i,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:m}),h=()=>{const e=f.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=f.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},v=({items:e})=>{const t=i.getLayoutValue("scrollStartPos"),n=p.get("scrollOffset");if(void 0===n)return 1===t?f.getUpperBound({items:e}):0;if("number"==typeof n)return f.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:o}=n,a=1===t&&o?o-e.inView:r;return f.convert.itemToPixelOffset({itemOffset:a,items:e})},y=e=>{const[{qArea:t}]=i.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))},b=e=>{const t=Date.now(),r=h(),i=g({pixelOffset:e,items:r}),a=f.getArea({itemOffset:i.start.item,items:r});if(y(a))return void((f.validate.offset({pixelOffset:e,items:r})||p.get("scrollOffset").start!==i.start.item)&&(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:i.start,items:r})),p.preventSet("viewRange",f.getViewRange({pixelOffset:i.start.pixel,items:r})),p.set("scrollOffset",{start:i.start.item,end:i.end.item})));p.preventSet("viewRange",f.getViewRange({pixelOffset:i.start.pixel,items:r}));const s=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:i.start,items:r})),p.set("scrollOffset",{start:i.start.item,end:i.end.item}))};o(a,{onProcessing:s,onDataPage:s})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const i=h();n.set("itemSize",f.getItemSize({items:i}));const a=v({items:i}),c=g({pixelOffset:a,items:i});p.preventSet("viewRange",f.getViewRange({pixelOffset:c.start.pixel,items:i}));const u=f.getArea({itemOffset:c.start.item,items:i});return new Promise((e=>{o(u,{onDataPage:()=>{n.set("scaleRange",f.getScaleRange({offsets:c.start,items:i})),p.preventSet("scrollOffset",{start:c.start.item,end:c.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;b(t)},scrollToRelative(e){const t=n.get("items"),r=f.convert.relativeToPixelOffset({relativeOffset:e,items:t});b(r)}}}({chart:e,componentKey:n,state:g,dataStore:y,pageData:x,layoutService:o,dockService:i,itemWidths:s,getRect:d,axisKey:p,renderer:m,areaBuffer:b,viewState:l,rtl:c}),C=function({layoutService:e,dataStore:t}){return function(n){const r=E(n,""+e.refs.dataPages);r.length=0,r.push(t.getCurrent())}}({layoutService:o,dataStore:y});return{interactions:qR({chart:e,actions:t,componentKey:n,dockService:i,rtl:c,scroller:S}),query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>y.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>C(e)}}}({chart:e,actions:s,componentKey:c,enigmaModel:t,layoutService:n,dockService:r,viewState:i,rtl:a,itemWidths:XR,options:{axisKey:_a.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:L,layoutService:n,dockService:d,seriesModel:k,viewState:f,rtl:"rtl"===p.options.direction,actions:g,picasso:e}):void 0,z=n.meta.isContinuous?eA({model:L,layoutService:n,viewState:f,viewCache:h}):void 0,B=SR({actions:g,appLayoutModel:P,appModel:I,chart:t,environment:p,flags:m,genericObjectModel:L,layoutService:n,picasso:e,seriesModel:k,viewState:f}),$=R({theme:p.theme,config:{id:"comboChart",resolve:[["object","label.value","numFontSize","12px",e=>parseInt(e,10)]]}}),F=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",o=r+":numeric",i=t.meta.primarySeries.map((e=>e.ref)),a=t.meta.secondarySeries.map((e=>e.ref)),s=n?[{key:o,from:r,override:{value:e=>e.qNum}}]:void 0;return{main:{major:r,majorNumeric:o,minorsPrimary:i,minorsSecondary:a},virtuals:s}}({layoutService:n,seriesModel:k}),H=rR({isPrimary:!0,layoutService:n,reducedModel:u,seriesModel:k,continuousModel:z,flags:m}),j=rR({isPrimary:!1,layoutService:n,reducedModel:u,seriesModel:k,continuousModel:z,flags:m}),V=yR({config:{measureAxesRef:"measureAxes.0",formatter:_a.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:H,dockService:d,seriesModel:k,themeService:$}),W=yR({config:{measureAxesRef:"measureAxes.1",formatter:_a.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:j,dockService:d,seriesModel:k,themeService:$}),_=function({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){if(pe.snapshot(e))return Promise.resolve(null);return t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}({genericObjectModel:L,layoutService:n}),U=ms({flags:m,layout:y,app:I,model:L,picasso:e,chart:t,translator:o,localeInfo:P.qLocaleInfo,embed:q,options:r}),Y=QR({chart:t,actions:g,translator:o,rtl:s,dockService:d,seriesModel:k,colorService:B,themeService:$,propertiesModel:_,custom:U}),G=function({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:o}=e.meta,i=e.getLayout(),a="K"===i.qHyperCube.qMode,s=pe.dimensionless(i),l=ya.getMeasureRefLines(i),c=ya.getDimensionRefLines(i,s),u=ya.getMeasureRefLineLabels(i),d=ya.getDimensionRefLineLabels(i,s);let p={},m={};const f=t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:o}=n;return ya.isOutOfRange({value:t,qMin:r,qMax:o})}return!1},h=t=>{if(!m[t])return!1;if(!n&&o){const n={valueInfo:m[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",o=e.getHyperCubeValue(r);return ya.isOutOfDataPages({label:n,dataPages:o})}return!0},g=()=>!(!c||!c.length)&&!c.every((t=>{const n=ya.getInputValue({refLineLayout:t,layoutService:e});return f(n)||h(n)})),v={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:d,dimensionRefLineInfo:m,dimensionValuesInfo:p,query:{getRefLines:e=>ya.getRefLines(i,e),getRefLineLabels:e=>ya.getRefLineLabels(i,e)},update:()=>{m=v.dimensionRefLineInfo,g()&&(p=ya.getDimensionValuesInfo({layout:i,canBeContinuous:r,discreteModel:t,layoutService:e}),v.dimensionValuesInfo=p,c.forEach((t=>{const n=ya.getInputValue({refLineLayout:t,layoutService:e});p[n]&&(m[n]?(m[n].innerValues=p[n].innerValues,m[n].minOrder=Math.min(m[n].minOrder,p[n].minOrder),m[n].maxOrder=Math.max(m[n].maxOrder,p[n].maxOrder),m[n].isMinOrderOk=m[n].isMinOrderOk||p[n].isMinOrderOk,m[n].isMaxOrderOk=m[n].isMaxOrderOk||p[n].isMaxOrderOk):m[n]={id:p[n].id,qText:p[n].qText,innerValues:p[n].innerValues,minOrder:p[n].minOrder,maxOrder:p[n].maxOrder,isMinOrderOk:p[n].isMinOrderOk,isMaxOrderOk:p[n].isMaxOrderOk},m[n].numInnerValues=(m[n].maxOrder||0)-(m[n].minOrder||0)+1)})))}};return v.update(),v}({layoutService:n,discreteModel:N}),K=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:_a.SCALE.MAJOR,MAJOR_INNER:_a.SCALE.MAJOR_INNER,MINOR:{PRIMARY:_a.SCALE.MINOR.PRIMARY,SECONDARY:_a.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,BAR_SECONDARY:`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`,AXIS:{MAJOR:_a.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:_a.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:_a.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:_a.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:_a.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:_a.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:_a.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:_a.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:_a.COLLECTION.MAIN}}}}(n),X=A({picassoInstance:e,plugins:D,pluginArgs:K});C({selectionService:v,genericObjectModel:L,appModel:I,dockService:d,styleModel:S,layoutService:n,fieldModel:F,seriesModel:k,reducedModel:u,primaryExtremumModel:H,secondaryExtremumModel:j,primaryTickModel:V,secondaryTickModel:W,propertiesModel:_,colorService:B,themeService:$,appLayoutModel:P,tooltipService:Y,flags:m,...N&&{discreteModel:N},...z&&{continuousModel:z},refLineModel:G,pluginService:X})}),[y,L,I,P,p,null==t?void 0:t.update,f]);const[,z]=i((()=>{if(!S)return Promise.resolve();const{layoutService:e,colorService:t,reducedModel:n,primaryExtremumModel:r,secondaryExtremumModel:o,propertiesModel:i,continuousModel:a,discreteModel:s,pluginService:l}=S,c=a?()=>{var t,n;a.update(e.getLayout());const r=a.initialFetch(),o=!e.meta.isSnapshot&&(null==p||null===(t=p.options)||void 0===t||null===(n=t.viewState)||void 0===n?void 0:n.zoom);return o&&f.preventSet("zoom",o),r}:()=>Promise.resolve(),u=t.initialize().then((()=>{const e=t.getSettings().field;v.setBrushAliases({colorField:e}),t.custom.updateLegend()})),d=()=>Promise.all([r.command.initialize(),o.command.initialize()]).then((()=>N(S)));return(()=>Promise.all([l.initialize(),n.command.initialize(),L?i.command.initialize():Promise.resolve(),u,c(),g.scroll.attachDiscreteModel(s)]))().then((()=>d()))}),[S]);if(z)throw z;return k})({picasso:I,chart:D,environment:C,flags:k,viewState:b,viewCache:e,actions:P,selectionService:q});(({picasso:e,chart:t,models:n,environment:o,viewState:a,viewCache:s,actions:l})=>{(({chart:e,models:t,viewState:n,viewCache:o})=>{r((()=>{if(!t||!n||!o)return;const{layoutService:r,continuousModel:i,refLineModel:a,seriesModel:s}=t,{miniComponentKeys:l}=s.meta,c=()=>{a&&a.update(),e.update({partialData:!0,excludeFromUpdate:[...op,...l]})};n.onChanged("scrollOffset",c),r.meta.isContinuous&&(n.onChanged("zoom",rp({layoutService:r,continuousDataModel:i},c)),n.intercept("zoom",np({viewCache:o})))}),[t,n,o])})({chart:t,models:n,viewState:a,viewCache:s}),(({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s})=>{const[,l]=i((async()=>{if(null==t||!t.update||!n||!r)return;const{layoutService:i,colorService:l,discreteModel:c}=n;function u(i=!1){t.update({settings:Qd({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s}),data:i&&[ep({models:n}),...tp({models:n}),...l.getData()]})}const d=i.getDataPages();i.setDataPages([]),u(!0),i.setDataPages(d),i.meta.isContinuous||await c.command.initialize(),u(!1)}),[null==t?void 0:t.update,n,r]);if(l)throw l})({picasso:e,chart:t,models:n,environment:o,viewState:a,viewCache:s,actions:l})})({picasso:I,chart:D,models:z,environment:C,viewState:b,viewCache:e,actions:P}),(({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:c})=>{const{width:u,height:d}=o(),[,p]=i((async()=>{if(!(null!=t&&t.update&&n&&r&&a))return;const{colorService:o,discreteModel:i,dockService:p,layoutService:m,refLineModel:f}=n;function h(){t.update({settings:Qd({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:c})})}p.update({width:u,height:d}),o.custom.updateLegend(),f.update({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l});const g=m.getDataPages();m.setDataPages([]),h(),m.setDataPages(g),m.meta.isContinuous||await i.command.initialize(),h()}),[u,d]);if(p)throw p})({picasso:I,chart:D,models:z,environment:C,viewState:b,viewCache:e,actions:P,isUnsupportedFeature:N}),(({models:e,chart:t,viewState:n})=>{x((r=>{if(!e)return;const{layoutService:o,dockService:i,colorService:a,discreteModel:s,continuousModel:l,reducedModel:c}=e,{width:u,height:d}=i.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:u,h:d}},o.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:me(t,_a.COMPONENT.LEGEND_CATEGORICAL)},o.meta.isDiscrete?(s.command.setSnapshotData(r),c.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{})))})),S((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:me(t,_a.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])})({models:z,chart:D,viewState:b})}}}));var W=Object.prototype.hasOwnProperty,_=Object.prototype.toString,U=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,G=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===_.call(e)},K=function(e){if(!e||"[object Object]"!==_.call(e))return!1;var t,n=W.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&W.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||W.call(e,t)},X=function(e,t){U&&"__proto__"===t.name?U(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},J=function(e,t){if("__proto__"===t){if(!W.call(e,t))return;if(Y)return Y(e,t).value}return e[t]},Z=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=J(s,n),s!==(o=J(t,n))&&(u&&o&&(K(o)||(i=G(o)))?(i?(i=!1,a=r&&G(r)?r:[]):a=r&&K(r)?r:{},X(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&X(s,{name:n,newValue:o}));return s};const Q="center",ee="bottom";var te={NoDataExist:{label:"NoDataExist",alignment:Q,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:Q,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:Q,default:!1},LimitedData:{label:"LimitedData",alignment:ee,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:ee,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:ee,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:ee,default:!1}};const ne=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],re={};ne.forEach((([e,{width:t,height:n}])=>{re[e]={width:t,height:n}}));const oe={getLayoutModes:()=>re,getLayoutMode(e,t){let n;for(n=0;n<ne.length;++n)if(e>=ne[n][1].width&&t>=ne[n][1].height)return ne[n][0];return"SPARK"}};const ie=["$date","$timestamp","$time"],ae=["D","TS","T"],se={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>ie.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&ae.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(se.hasTimeTag(t)&&se.hasUnknownFormat(t)||se.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&se.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous:e=>!(!(e&&e.qHyperCube&&e.qHyperCube.qDimensionInfo)||e.qHyperCube.qDimensionInfo.length<1)&&se.canBeContinuousDimension(e.qHyperCube.qDimensionInfo[0]),maxNumberOfLines:12},le=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i},ce=e=>le(e,"qHyperCube.qDimensionInfo",[]),ue=e=>le(e,"qHyperCube.qMeasureInfo",[]),de=e=>le(e,"barGrouping.grouping"),pe={continuous:(e,t=!1)=>!!se.canBeContinuous(e)&&(le(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!ce(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===de(e)&&(ce(e).length>1||ue(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&ce(e).length>1&&1===ue(e).length},groupedByMeasure(e){return this.grouped(e)&&1===ce(e).length&&ue(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==de(e)||this.continuous(e))&&(ce(e).length>1||ue(e).length>1)},stackedByDimension(e){return this.stacked(e)&&ce(e).length>1&&1===ue(e).length},stackedByMeasure(e){return this.stacked(e)&&1===ce(e).length&&ue(e).length>1},simple:e=>0===ce(e).length||1===ce(e).length&&1===ue(e).length,snapshot:e=>!!le(e,"snapshotData")};function me(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const fe=e=>{throw e.isHandled=!0,e};const he={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":return"far";case"far":return"near";default:return"far"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?he.getVerticalDock(t):n?he.getOppositeDock(he.getHorizontalDock(t)):he.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment(e,t){switch(e){case"vertical":return"near"===t||"bottom"===t?1:0;default:return"near"===t||"left"===t?0:1}},getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n},ge={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const o=t+n+r;return{latin:e.length-o,cjk:o}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let o;void 0===t?e.forEach((e=>{o=ge.getCharacterRatios(e[n]),r.latin+=o.latin,r.cjk+=o.cjk})):e.forEach((e=>{o=ge.getCharacterRatios(e[t][n]),r.latin+=o.latin,r.cjk+=o.cjk}));const i=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/i,r.cjkRatio=r.cjk/i,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const o=ge.getTotalCharacterRatios(t,n,r),i=o.latinRatio*e,a=o.cjkRatio*e;return Math.ceil(ge.stringWidthOverMWidth(i)+1.0909090909090908*a)}},ve=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),ye=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),be=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),xe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ve.test(e),isRtlChar:e=>ye.test(e)||be.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],xe.isLtrChar(r))return"ltr";if(xe.isRtlChar(r))return"rtl"}return"ltr"}},Se={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?Se.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=xe.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=xe.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:xe.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=xe.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=xe.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Se.getColorSymbol(e,t)]:[Se.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=xe.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=xe.detectTextDirection(e.value);let l;return l=o?r?[e.value,Se.getColorSymbol(t,n)]:[Se.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Ee(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Me(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ce(){}var we=.7,ke=1/we,Ne="\\s*([+-]?\\d+)\\s*",Te="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,Ae=new RegExp("^rgb\\("+[Ne,Ne,Ne]+"\\)$"),Le=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Ie=new RegExp("^rgba\\("+[Ne,Ne,Ne,Te]+"\\)$"),Pe=new RegExp("^rgba\\("+[Oe,Oe,Oe,Te]+"\\)$"),De=new RegExp("^hsl\\("+[Te,Oe,Oe]+"\\)$"),qe=new RegExp("^hsla\\("+[Te,Oe,Oe,Te]+"\\)$"),ze={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Be(){return this.rgb().formatHex()}function $e(){return this.rgb().formatRgb()}function Fe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Re.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?He(t):3===n?new _e(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?je(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?je(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ae.exec(e))?new _e(t[1],t[2],t[3],1):(t=Le.exec(e))?new _e(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ie.exec(e))?je(t[1],t[2],t[3],t[4]):(t=Pe.exec(e))?je(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=De.exec(e))?Ke(t[1],t[2]/100,t[3]/100,1):(t=qe.exec(e))?Ke(t[1],t[2]/100,t[3]/100,t[4]):ze.hasOwnProperty(e)?He(ze[e]):"transparent"===e?new _e(NaN,NaN,NaN,0):null}function He(e){return new _e(e>>16&255,e>>8&255,255&e,1)}function je(e,t,n,r){return r<=0&&(e=t=n=NaN),new _e(e,t,n,r)}function Ve(e){return e instanceof Ce||(e=Fe(e)),e?new _e((e=e.rgb()).r,e.g,e.b,e.opacity):new _e}function We(e,t,n,r){return 1===arguments.length?Ve(e):new _e(e,t,n,null==r?1:r)}function _e(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ue(){return"#"+Ge(this.r)+Ge(this.g)+Ge(this.b)}function Ye(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Ge(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ke(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Je(e,t,n,r)}function Xe(e){if(e instanceof Je)return new Je(e.h,e.s,e.l,e.opacity);if(e instanceof Ce||(e=Fe(e)),!e)return new Je;if(e instanceof Je)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Je(a,s,l,e.opacity)}function Je(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ze(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ee(Ce,Fe,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Be,formatHex:Be,formatHsl:function(){return Xe(this).formatHsl()},formatRgb:$e,toString:$e}),Ee(_e,We,Me(Ce,{brighter:function(e){return e=null==e?ke:Math.pow(ke,e),new _e(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?we:Math.pow(we,e),new _e(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ue,formatHex:Ue,formatRgb:Ye,toString:Ye})),Ee(Je,(function(e,t,n,r){return 1===arguments.length?Xe(e):new Je(e,t,n,null==r?1:r)}),Me(Ce,{brighter:function(e){return e=null==e?ke:Math.pow(ke,e),new Je(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?we:Math.pow(we,e),new Je(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new _e(Ze(e>=240?e-240:e+120,o,r),Ze(e,o,r),Ze(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Qe=Math.PI/180,et=180/Math.PI,tt=.96422,nt=.82521,rt=4/29,ot=6/29,it=3*ot*ot;function at(e){if(e instanceof st)return new st(e.l,e.a,e.b,e.opacity);if(e instanceof ft)return ht(e);e instanceof _e||(e=Ve(e));var t,n,r=dt(e.r),o=dt(e.g),i=dt(e.b),a=lt((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=lt((.4360747*r+.3850649*o+.1430804*i)/tt),n=lt((.0139322*r+.0971045*o+.7141733*i)/nt)),new st(116*a-16,500*(t-a),200*(a-n),e.opacity)}function st(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function lt(e){return e>.008856451679035631?Math.pow(e,1/3):e/it+rt}function ct(e){return e>ot?e*e*e:it*(e-rt)}function ut(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function dt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pt(e){if(e instanceof ft)return new ft(e.h,e.c,e.l,e.opacity);if(e instanceof st||(e=at(e)),0===e.a&&0===e.b)return new ft(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*et;return new ft(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function mt(e,t,n,r){return 1===arguments.length?pt(e):new ft(e,t,n,null==r?1:r)}function ft(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ht(e){if(isNaN(e.h))return new st(e.l,0,0,e.opacity);var t=e.h*Qe;return new st(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ee(st,(function(e,t,n,r){return 1===arguments.length?at(e):new st(e,t,n,null==r?1:r)}),Me(Ce,{brighter:function(e){return new st(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new st(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new _e(ut(3.1338561*(t=tt*ct(t))-1.6168667*(e=1*ct(e))-.4906146*(n=nt*ct(n))),ut(-.9787684*t+1.9161415*e+.033454*n),ut(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ee(ft,mt,Me(Ce,{brighter:function(e){return new ft(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new ft(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return ht(this).rgb()}}));var gt=-.14861,vt=1.78277,yt=-.29227,bt=-.90649,xt=1.97294,St=xt*bt,Et=xt*vt,Mt=vt*yt-bt*gt;function Ct(e){if(e instanceof wt)return new wt(e.h,e.s,e.l,e.opacity);e instanceof _e||(e=Ve(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Mt*r+St*t-Et*n)/-5.9615122912,i=r-o,a=(xt*(n-o)-yt*i)/bt,s=Math.sqrt(a*a+i*i)/(xt*o*(1-o)),l=s?Math.atan2(a,i)*et-120:NaN;return new wt(l<0?l+360:l,s,o,e.opacity)}function wt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ee(wt,(function(e,t,n,r){return 1===arguments.length?Ct(e):new wt(e,t,n,null==r?1:r)}),Me(Ce,{brighter:function(e){return e=null==e?ke:Math.pow(ke,e),new wt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?we:Math.pow(we,e),new wt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Qe,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new _e(255*(t+n*(gt*r+vt*o)),255*(t+n*(yt*r+bt*o)),255*(t+n*(xt*r)),this.opacity)}}));var kt={isDark:function(e){return mt(e).l<70}};function Nt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Tt(e){return 1===e.length&&(e=function(e){return function(t,n){return Nt(e(t),n)}}(e)),{left:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)<0?r=i+1:o=i}return r},right:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)>0?o=i:r=i+1}return r}}}var Ot=Tt(Nt).right,Rt=Math.sqrt(50),At=Math.sqrt(10),Lt=Math.sqrt(2);function It(e,t,n){var r=(t-e)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=Rt?10:i>=At?5:i>=Lt?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Rt?10:i>=At?5:i>=Lt?2:1)}function Pt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=Rt?o*=10:i>=At?o*=5:i>=Lt&&(o*=2),t<e?-o:o}function Dt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var qt="$";function zt(){}function Bt(e,t){var n=new zt;if(e instanceof zt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function $t(){}zt.prototype=Bt.prototype={constructor:zt,has:function(e){return qt+e in this},get:function(e){return this[qt+e]},set:function(e,t){return this[qt+e]=t,this},remove:function(e){var t=qt+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===qt&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===qt&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===qt&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===qt&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===qt&&++e;return e},empty:function(){for(var e in this)if(e[0]===qt)return!1;return!0},each:function(e){for(var t in this)t[0]===qt&&e(this[t],t.slice(1),this)}};var Ft=Bt.prototype;$t.prototype={constructor:$t,has:Ft.has,add:function(e){return this[qt+(e+="")]=e,this},remove:Ft.remove,clear:Ft.clear,values:Ft.keys,size:Ft.size,empty:Ft.empty,each:Ft.each};var Ht=Array.prototype,jt=Ht.map,Vt=Ht.slice;function Wt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _t(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ut(){}var Yt=.7,Gt=1/Yt,Kt="\\s*([+-]?\\d+)\\s*",Xt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zt=/^#([0-9a-f]{3})$/,Qt=/^#([0-9a-f]{6})$/,en=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),tn=new RegExp("^rgb\\("+[Jt,Jt,Jt]+"\\)$"),nn=new RegExp("^rgba\\("+[Kt,Kt,Kt,Xt]+"\\)$"),rn=new RegExp("^rgba\\("+[Jt,Jt,Jt,Xt]+"\\)$"),on=new RegExp("^hsl\\("+[Xt,Jt,Jt]+"\\)$"),an=new RegExp("^hsla\\("+[Xt,Jt,Jt,Xt]+"\\)$"),sn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ln(e){var t;return e=(e+"").trim().toLowerCase(),(t=Zt.exec(e))?new mn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=Qt.exec(e))?cn(parseInt(t[1],16)):(t=en.exec(e))?new mn(t[1],t[2],t[3],1):(t=tn.exec(e))?new mn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=nn.exec(e))?un(t[1],t[2],t[3],t[4]):(t=rn.exec(e))?un(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=on.exec(e))?hn(t[1],t[2]/100,t[3]/100,1):(t=an.exec(e))?hn(t[1],t[2]/100,t[3]/100,t[4]):sn.hasOwnProperty(e)?cn(sn[e]):"transparent"===e?new mn(NaN,NaN,NaN,0):null}function cn(e){return new mn(e>>16&255,e>>8&255,255&e,1)}function un(e,t,n,r){return r<=0&&(e=t=n=NaN),new mn(e,t,n,r)}function dn(e){return e instanceof Ut||(e=ln(e)),e?new mn((e=e.rgb()).r,e.g,e.b,e.opacity):new mn}function pn(e,t,n,r){return 1===arguments.length?dn(e):new mn(e,t,n,null==r?1:r)}function mn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function fn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function hn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vn(e,t,n,r)}function gn(e){if(e instanceof vn)return new vn(e.h,e.s,e.l,e.opacity);if(e instanceof Ut||(e=ln(e)),!e)return new vn;if(e instanceof vn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new vn(a,s,l,e.opacity)}function vn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function yn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Wt(Ut,ln,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Wt(mn,pn,_t(Ut,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new mn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Yt:Math.pow(Yt,e),new mn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+fn(this.r)+fn(this.g)+fn(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),Wt(vn,(function(e,t,n,r){return 1===arguments.length?gn(e):new vn(e,t,n,null==r?1:r)}),_t(Ut,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new vn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Yt:Math.pow(Yt,e),new vn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new mn(yn(e>=240?e-240:e+120,o,r),yn(e,o,r),yn(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var bn=Math.PI/180,xn=180/Math.PI,Sn=.96422,En=.82521,Mn=4/29,Cn=6/29,wn=3*Cn*Cn;function kn(e){if(e instanceof Nn)return new Nn(e.l,e.a,e.b,e.opacity);if(e instanceof In){if(isNaN(e.h))return new Nn(e.l,0,0,e.opacity);var t=e.h*bn;return new Nn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof mn||(e=dn(e));var n,r,o=An(e.r),i=An(e.g),a=An(e.b),s=Tn((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=Tn((.4360747*o+.3850649*i+.1430804*a)/Sn),r=Tn((.0139322*o+.0971045*i+.7141733*a)/En)),new Nn(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Nn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Tn(e){return e>.008856451679035631?Math.pow(e,1/3):e/wn+Mn}function On(e){return e>Cn?e*e*e:wn*(e-Mn)}function Rn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function An(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ln(e){if(e instanceof In)return new In(e.h,e.c,e.l,e.opacity);if(e instanceof Nn||(e=kn(e)),0===e.a&&0===e.b)return new In(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*xn;return new In(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function In(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Wt(Nn,(function(e,t,n,r){return 1===arguments.length?kn(e):new Nn(e,t,n,null==r?1:r)}),_t(Ut,{brighter:function(e){return new Nn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Nn(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new mn(Rn(3.1338561*(t=Sn*On(t))-1.6168667*(e=1*On(e))-.4906146*(n=En*On(n))),Rn(-.9787684*t+1.9161415*e+.033454*n),Rn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Wt(In,(function(e,t,n,r){return 1===arguments.length?Ln(e):new In(e,t,n,null==r?1:r)}),_t(Ut,{brighter:function(e){return new In(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new In(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return kn(this).rgb()}}));var Pn=-.14861,Dn=1.78277,qn=-.29227,zn=-.90649,Bn=1.97294,$n=Bn*zn,Fn=Bn*Dn,Hn=Dn*qn-zn*Pn;function jn(e){if(e instanceof Wn)return new Wn(e.h,e.s,e.l,e.opacity);e instanceof mn||(e=dn(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Hn*r+$n*t-Fn*n)/(Hn+$n-Fn),i=r-o,a=(Bn*(n-o)-qn*i)/zn,s=Math.sqrt(a*a+i*i)/(Bn*o*(1-o)),l=s?Math.atan2(a,i)*xn-120:NaN;return new Wn(l<0?l+360:l,s,o,e.opacity)}function Vn(e,t,n,r){return 1===arguments.length?jn(e):new Wn(e,t,n,null==r?1:r)}function Wn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function _n(e){return function(){return e}}function Un(e,t){return function(n){return e+n*t}}function Yn(e){return 1==(e=+e)?Gn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):_n(isNaN(t)?n:t)}}function Gn(e,t){var n=t-e;return n?Un(e,n):_n(isNaN(e)?t:e)}Wt(Wn,Vn,_t(Ut,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new Wn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Yt:Math.pow(Yt,e),new Wn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*bn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new mn(255*(t+n*(Pn*r+Dn*o)),255*(t+n*(qn*r+zn*o)),255*(t+n*(Bn*r)),this.opacity)}}));var Kn=function e(t){var n=Yn(t);function r(e,t){var r=n((e=pn(e)).r,(t=pn(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Gn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Xn(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=rr(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function Jn(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function Zn(e,t){return t-=e=+e,function(n){return e+t*n}}function Qn(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=rr(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var er=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tr=new RegExp(er.source,"g");function nr(e,t){var n,r,o,i=er.lastIndex=tr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=er.exec(e))&&(r=tr.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Zn(n,r)})),i=tr.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function rr(e,t){var n,r=typeof t;return null==t||"boolean"===r?_n(t):("number"===r?Zn:"string"===r?(n=ln(t))?(t=n,Kn):nr:t instanceof ln?Kn:t instanceof Date?Jn:Array.isArray(t)?Xn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Qn:Zn)(e,t)}function or(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function ir(e){return function t(n){function r(t,r){var o=e((t=Vn(t)).h,(r=Vn(r)).h),i=Gn(t.s,r.s),a=Gn(t.l,r.l),s=Gn(t.opacity,r.opacity);return function(e){return t.h=o(e),t.s=i(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function ar(e){return+e}ir((function(e,t){var n=t-e;return n?Un(e,n>180||n<-180?n-360*Math.round(n/360):n):_n(isNaN(e)?t:e)})),ir(Gn);var sr=[0,1];function lr(e){return e}function cr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function ur(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function dr(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=cr(o,r),i=n(a,i)):(r=cr(r,o),i=n(i,a)),function(e){return i(r(e))}}function pr(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=cr(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=Ot(e,t,1,r)-1;return i[n](o[n](t))}}function mr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function fr(e,t){return function(){var e,t,n,r,o,i,a=sr,s=sr,l=rr,c=lr;function u(){return r=Math.min(a.length,s.length)>2?pr:dr,o=i=null,d}function d(t){return isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),Zn)))(n)))},d.domain=function(e){return arguments.length?(a=jt.call(e,ar),c===lr||(c=ur(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=Vt.call(e),u()):s.slice()},d.rangeRound=function(e){return s=Vt.call(e),l=or,u()},d.clamp=function(e){return arguments.length?(c=e?ur(a):lr,d):c!==lr},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function hr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function gr(e){return(e=hr(Math.abs(e)))?e[1]:NaN}var vr,yr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function br(e){return new xr(e)}function xr(e){if(!(t=yr.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Sr(e,t){var n=hr(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}br.prototype=xr.prototype,xr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Er={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Sr(100*e,t)},r:Sr,s:function(e,t){var n=hr(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(vr=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+hr(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Mr(e){return e}var Cr,wr,kr,Nr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Tr(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):Mr,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Mr,s=e.percent||"%";function l(e){var t=(e=br(e)).fill,n=e.align,l=e.sign,c=e.symbol,u=e.zero,d=e.width,p=e.comma,m=e.precision,f=e.trim,h=e.type;"n"===h?(p=!0,h="g"):Er[h]||(null==m&&(m=12),f=!0,h="g"),(u||"0"===t&&"="===n)&&(u=!0,t="0",n="=");var g="$"===c?o[0]:"#"===c&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",v="$"===c?o[1]:/[%p]/.test(h)?s:"",y=Er[h],b=/[defgprs%]/.test(h);function x(e){var o,s,c,x=g,S=v;if("c"===h)S=y(e)+S,e="";else{var E=(e=+e)<0;if(e=y(Math.abs(e),m),f&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),E&&0==+e&&(E=!1),x=(E?"("===l?l:"-":"-"===l||"("===l?"":l)+x,S=("s"===h?Nr[8+vr/3]:"")+S+(E&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(c=e.charCodeAt(o))||c>57){S=(46===c?i+e.slice(o+1):e.slice(o))+S,e=e.slice(0,o);break}}p&&!u&&(e=r(e,1/0));var M=x.length+e.length+S.length,C=M<d?new Array(d-M+1).join(t):"";switch(p&&u&&(e=r(C+e,C.length?d-S.length:1/0),C=""),n){case"<":e=x+e+S+C;break;case"=":e=x+C+e+S;break;case"^":e=C.slice(0,M=C.length>>1)+x+e+S+C.slice(M);break;default:e=C+x+e+S}return a(e)}return m=null==m?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=br(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(gr(t)/3))),o=Math.pow(10,-r),i=Nr[8+r/3];return function(e){return n(o*e)+i}}}}function Or(e,t,n,r){var o,i=Pt(e,t,n);switch((r=br(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(gr(t)/3)))-gr(Math.abs(e)))}(i,a))||(r.precision=o),kr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gr(t)-gr(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-gr(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return wr(r)}function Rr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,o,i,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),0===(a=It(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),i=new Array(o=Math.ceil(t-e+1));++s<o;)i[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),i=new Array(o=Math.ceil(e-t+1));++s<o;)i[s]=(e-s)/a;return r&&i.reverse(),i}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Or(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o=t(),i=0,a=o.length-1,s=o[i],l=o[a];return l<s&&(r=s,s=l,l=r,r=i,i=a,a=r),(r=It(s,l,n))>0?r=It(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=It(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(o[i]=Math.floor(s/r)*r,o[a]=Math.ceil(l/r)*r,t(o)):r<0&&(o[i]=Math.ceil(s*r)/r,o[a]=Math.floor(l*r)/r,t(o)),e},e}function Ar(){var e=fr(lr,lr);return e.copy=function(){return mr(e,Ar())},Dt.apply(e,arguments),Rr(e)}Cr=Tr({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),wr=Cr.format,kr=Cr.formatPrefix;var Lr=new Date,Ir=new Date;function Pr(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return Pr((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return Lr.setTime(+t),Ir.setTime(+r),e(Lr),e(Ir),Math.floor(n(Lr,Ir))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var Dr=Pr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Dr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Pr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Dr:null},Dr.range;var qr=1e3,zr=6e4,Br=36e5,$r=864e5,Fr=6048e5,Hr=Pr((function(e){e.setTime(Math.floor(e/qr)*qr)}),(function(e,t){e.setTime(+e+t*qr)}),(function(e,t){return(t-e)/qr}),(function(e){return e.getUTCSeconds()}));Hr.range,Pr((function(e){e.setTime(Math.floor(e/zr)*zr)}),(function(e,t){e.setTime(+e+t*zr)}),(function(e,t){return(t-e)/zr}),(function(e){return e.getMinutes()})).range,Pr((function(e){var t=e.getTimezoneOffset()*zr%Br;t<0&&(t+=Br),e.setTime(Math.floor((+e-t)/Br)*Br+t)}),(function(e,t){e.setTime(+e+t*Br)}),(function(e,t){return(t-e)/Br}),(function(e){return e.getHours()})).range;var jr=Pr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*zr)/$r}),(function(e){return e.getDate()-1}));function Vr(e){return Pr((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*zr)/Fr}))}jr.range;var Wr=Vr(0),_r=Vr(1),Ur=Vr(2),Yr=Vr(3),Gr=Vr(4),Kr=Vr(5),Xr=Vr(6);Wr.range,_r.range,Ur.range,Yr.range,Gr.range,Kr.range,Xr.range,Pr((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})).range;var Jr=Pr((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Jr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Pr((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},Jr.range;var Zr=Pr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*zr)}),(function(e,t){return(t-e)/zr}),(function(e){return e.getUTCMinutes()}));Zr.range;var Qr=Pr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Br)}),(function(e,t){return(t-e)/Br}),(function(e){return e.getUTCHours()}));Qr.range;var eo=Pr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/$r}),(function(e){return e.getUTCDate()-1}));function to(e){return Pr((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Fr}))}eo.range;var no=to(0),ro=to(1),oo=to(2),io=to(3),ao=to(4),so=to(5),lo=to(6);no.range,ro.range,oo.range,io.range,ao.range,so.range,lo.range;var co=Pr((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));co.range;var uo=Pr((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function po(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function mo(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function fo(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}uo.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Pr((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},uo.range;var ho,go,vo,yo={"-":"",_:" ",0:"0"},bo=/^\s*\d+/,xo=/^%/,So=/[\\^$*+?|[\]().{}]/g;function Eo(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function Mo(e){return e.replace(So,"\\$&")}function Co(e){return new RegExp("^(?:"+e.map(Mo).join("|")+")","i")}function wo(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function ko(e,t,n){var r=bo.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function No(e,t,n){var r=bo.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function To(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Oo(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ro(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Ao(e,t,n){var r=bo.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Lo(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Io(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Po(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Do(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function qo(e,t,n){var r=bo.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function zo(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Bo(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function $o(e,t,n){var r=bo.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Fo(e,t,n){var r=bo.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ho(e,t,n){var r=bo.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function jo(e,t,n){var r=xo.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Vo(e,t,n){var r=bo.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Wo(e,t,n){var r=bo.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function _o(e,t){return Eo(e.getDate(),t,2)}function Uo(e,t){return Eo(e.getHours(),t,2)}function Yo(e,t){return Eo(e.getHours()%12||12,t,2)}function Go(e,t){return Eo(1+jr.count(Jr(e),e),t,3)}function Ko(e,t){return Eo(e.getMilliseconds(),t,3)}function Xo(e,t){return Ko(e,t)+"000"}function Jo(e,t){return Eo(e.getMonth()+1,t,2)}function Zo(e,t){return Eo(e.getMinutes(),t,2)}function Qo(e,t){return Eo(e.getSeconds(),t,2)}function ei(e){var t=e.getDay();return 0===t?7:t}function ti(e,t){return Eo(Wr.count(Jr(e),e),t,2)}function ni(e,t){var n=e.getDay();return e=n>=4||0===n?Gr(e):Gr.ceil(e),Eo(Gr.count(Jr(e),e)+(4===Jr(e).getDay()),t,2)}function ri(e){return e.getDay()}function oi(e,t){return Eo(_r.count(Jr(e),e),t,2)}function ii(e,t){return Eo(e.getFullYear()%100,t,2)}function ai(e,t){return Eo(e.getFullYear()%1e4,t,4)}function si(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Eo(t/60|0,"0",2)+Eo(t%60,"0",2)}function li(e,t){return Eo(e.getUTCDate(),t,2)}function ci(e,t){return Eo(e.getUTCHours(),t,2)}function ui(e,t){return Eo(e.getUTCHours()%12||12,t,2)}function di(e,t){return Eo(1+eo.count(uo(e),e),t,3)}function pi(e,t){return Eo(e.getUTCMilliseconds(),t,3)}function mi(e,t){return pi(e,t)+"000"}function fi(e,t){return Eo(e.getUTCMonth()+1,t,2)}function hi(e,t){return Eo(e.getUTCMinutes(),t,2)}function gi(e,t){return Eo(e.getUTCSeconds(),t,2)}function vi(e){var t=e.getUTCDay();return 0===t?7:t}function yi(e,t){return Eo(no.count(uo(e),e),t,2)}function bi(e,t){var n=e.getUTCDay();return e=n>=4||0===n?ao(e):ao.ceil(e),Eo(ao.count(uo(e),e)+(4===uo(e).getUTCDay()),t,2)}function xi(e){return e.getUTCDay()}function Si(e,t){return Eo(ro.count(uo(e),e),t,2)}function Ei(e,t){return Eo(e.getUTCFullYear()%100,t,2)}function Mi(e,t){return Eo(e.getUTCFullYear()%1e4,t,4)}function Ci(){return"+0000"}function wi(){return"%"}function ki(e){return+e}function Ni(e){return Math.floor(+e/1e3)}!function(e){(ho=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Co(o),u=wo(o),d=Co(i),p=wo(i),m=Co(a),f=wo(a),h=Co(s),g=wo(s),v=Co(l),y=wo(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:_o,e:_o,f:Xo,H:Uo,I:Yo,j:Go,L:Ko,m:Jo,M:Zo,p:function(e){return o[+(e.getHours()>=12)]},Q:ki,s:Ni,S:Qo,u:ei,U:ti,V:ni,w:ri,W:oi,x:null,X:null,y:ii,Y:ai,Z:si,"%":wi},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:li,e:li,f:mi,H:ci,I:ui,j:di,L:pi,m:fi,M:hi,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:ki,s:Ni,S:gi,u:vi,U:yi,V:bi,w:xi,W:Si,x:null,X:null,y:Ei,Y:Mi,Z:Ci,"%":wi},S={a:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:Do,e:Do,f:Ho,H:zo,I:zo,j:qo,L:Fo,m:Po,M:Bo,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},Q:Vo,s:Wo,S:$o,u:No,U:To,V:Oo,w:ko,W:Ro,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:Lo,Y:Ao,Z:Io,"%":jo};function E(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=yo[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,o,i=fo(1900);if(C(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=mo(fo(i.y))).getUTCDay(),r=o>4||0===o?ro.ceil(r):ro(r),r=eo.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(fo(i.y))).getDay(),r=o>4||0===o?_r.ceil(r):_r(r),r=jr.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?mo(fo(i.y)).getUTCDay():t(fo(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,mo(i)):t(i)}}function C(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=S[o in yo?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",po);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e,mo);return t.toString=function(){return e},t}}}(e)).format,ho.parse,go=ho.utcFormat,vo=ho.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Ti="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||go(Ti),+new Date("2000-01-01T00:00:00.000Z")||vo(Ti);var Oi=1e3,Ri=6e4,Ai=36e5,Li=864e5,Ii=2592e6,Pi=31536e6;function Di(e){return new Date(e)}function qi(e){return e instanceof Date?+e:+new Date(+e)}function zi(e,t,n,r,o,i,a,s,l){var c=fr(lr,lr),u=c.invert,d=c.domain,p=l(".%L"),m=l(":%S"),f=l("%I:%M"),h=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),b=l("%Y"),x=[[a,1,Oi],[a,5,5e3],[a,15,15e3],[a,30,3e4],[i,1,Ri],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,Ai],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,Li],[r,2,1728e5],[n,1,6048e5],[t,1,Ii],[t,3,7776e6],[e,1,Pi]];function S(s){return(a(s)<s?p:i(s)<s?m:o(s)<s?f:r(s)<s?h:t(s)<s?n(s)<s?g:v:e(s)<s?y:b)(s)}function E(t,n,r,o){if(null==t&&(t=10),"number"==typeof t){var i=Math.abs(r-n)/t,a=Tt((function(e){return e[2]})).right(x,i);a===x.length?(o=Pt(n/Pi,r/Pi,t),t=e):a?(o=(a=x[i/x[a-1][2]<x[a][2]/i?a-1:a])[1],t=a[0]):(o=Math.max(Pt(n,r,t),1),t=s)}return null==o?t:t.every(o)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(jt.call(e,qi)):d().map(Di)},c.ticks=function(e,t){var n,r=d(),o=r[0],i=r[r.length-1],a=i<o;return a&&(n=o,o=i,i=n),n=(n=E(e,o,i,t))?n.range(o,i+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?S:l(t)},c.nice=function(e,t){var n=d();return(e=E(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}(n,e)):c},c.copy=function(){return mr(c,zi(e,t,n,r,o,i,a,s,l))},c}const Bi={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},$i=e=>e+" 12px -12px inset rgba(0, 0, 0, 0.0625)";var Fi={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[o,i]=t(),a=Math.abs(o)<1e-15,s=Math.abs(i-1)<1e-15,l=(e=>{const t=Bi[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:$i(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:$i(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function Hi({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:o}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:o,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-r)/(o-r),(n.max-r)/(o-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let ji;function Vi(){ji=ji||document.createElement("canvas").getContext("2d")}const Wi={measureTextWidth(e){Vi();const{width:t}=ji.measureText(e);return t},lineWrap(e,t,n,r){let o,i;Vi();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,d,p=e?e.split(/\s+/):[],m=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(ji.font=n),i=0;i<a.length;i++){for(d=a[i]||"",p=d.split(/\s+/),[m]=p,u="",o=1;o<p.length;o++)if(l=`${m} ${p[o]}`,c=Wi.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(m),m=p[o]):m=l,"number"==typeof r&&s.length>=r){u=p.slice(o+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(m):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${m} ${u}`}return s},wordWrap(e,t,n,r,o){if(Vi(),!e||!e.length)return[];n&&(ji.font=n);let i=[];const a=e.slice();let s,l,c,u;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||Wi.measureTextWidth(c)<=t?i.push(c):(s=Wi.splitWord(c,t,void 0,r-i.length),s.length<=1?i.push(s[0]):(l=s.pop(),i=i.concat(s),a[u+1]?Wi.measureTextWidth(`${l} ${a[u+1]}`)>t&&i.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return i.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),i.length>r?(i=i.splice(0,r),i[i.length-1]=Wi.truncate(i[i.length-1],t,n,o).text):(c=i[i.length-1],c&&c.length>1&&Wi.measureTextWidth(c)>t&&(i[i.length-1]=Wi.truncate(c,t,n,o).text)),i},truncate(e,t,n,r="…"){Vi();let o,i,a,s,l=e;const c=Wi.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(ji.font=n),e&&t){if(Wi.measureTextWidth(l)>t){for(o=Math.min(u,l.length);o>0;o--)if(i=l.substring(0,o-1),a=i.trim()+r,Wi.measureTextWidth(a)<=t){s=l.substring(o-1),l=a;break}o||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let o;Vi();let i,a=e,s="",l=[];if(Wi.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(o=Math.min(e.length,c);o>0&&(a=e.substring(0,o),i=e.substring(o-1,o)," "===i?a=e.substring(0,o-1):a+="-",s=e.substring(o),!(Wi.measureTextWidth(a)<=t));o--);return(!o&&!a||Wi.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Wi.measureTextWidth(s)>t?(s=Wi.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Vi(),e&&t?(n&&(ji.font=n),Wi.explodeWord(e,t,r,Math.max(1,Wi.measureTextWidth("i")))):[]),wrapText(e,t,n,r,o){let i;return Number.isNaN(t)?[e]:(i=r>1?Wi.lineWrap(e,t,n,r):[e],i=Wi.wordWrap(i,t,n,r,o),i)},getFontHeight:e=>(Vi(),e&&(ji.font=e),1.5*Wi.measureTextWidth("m")),tokenize(e,t,n,r,o,i,a=1){Vi(),t&&(ji.font=t);const s=Wi.getFontHeight(),l=a*s;let c=[],u=0,d=[];if(i<s)return[];const p=i?Math.max(1,Math.floor(i/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{u+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{c.push(Number.isNaN(e)||e<=0?p-u:e)}))):c=[Number.isNaN(r)||r<=0?p:Math.min(p,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<p&&(d=d.concat(Wi.wrapText(e,o,t,c[n])))})):d=Wi.wrapText(e,o,t,c[0],n),d}},_i={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:o,flipXY:i,symbol:a}){let s="x",l="y",c=r,u=o,d=t<.5?90:-90;return i&&(s="y",l="x",c=o,u=r,d=t<.5?180:0),a(Z({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},Ui=Z.bind(null,!0),Yi={},{isArray:Gi}=Array;function Ki(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Xi(e){return void 0===e}function Ji(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Zi(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Xi(e[r||t])?i:e[t],e=e[r||t]})),e}function Qi(e,t){let n=!0;if(Ki(e)&&Ki(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Qi(e[r],t[r])||(n=!1)})),n);if(Gi(e)&&Gi(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Qi(e[n],t[n]))return!1;return!0}return e===t}Yi.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Ui({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;Qi(i,a)||Ji(t,o)||(Xi(a)?r.push({op:"add",path:s,value:i}):Ki(i)&&Ki(a)?r=r.concat(Yi.generate(a,i,s)):Gi(i)&&Gi(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&Xi(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Qi(t,o))return r;if(!Xi(t[0])&&Xi(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(Yi.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{Xi(t[o])&&!Ji(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},Yi.apply=function(e,t){t.forEach((t=>{let n=Zi(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Gi(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Gi(o)&&Gi(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(Ki(o)&&Ki(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Ji(a,e)&&delete a[e]})),Ui(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=Zi(e,t.from);Gi(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Gi(n)?n.splice(+r,1):delete n[r]);var a}))},Yi.clone=function(e){return Ui({},e)},Yi.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Yi.updateObject=function(e,t){Object.keys(e).length?Yi.apply(e,Yi.generate(e,t)):Ui(e,t)};const ea=[[2,4,6],[2,4],[3]],ta=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function na(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function ra(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)na(e[r],t,n)}!function(){let e,t;for(ra(ea,1,10),e=0;e<ta.length;e++)if(ta[e])for(t=0;t<ta[e].length;t++)Array.isArray(ta[e][t])&&ra(ta[e][t])}();const oa={isInside(e,t,n,r){if(!r)return!0;const o=e.position-e.radius,i=e.position+e.radius;return o>=t&&i<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=oa.findSegmentPositionMeetMin(e,t);return oa.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=oa.findSegmentPositionMeetMax(e,n);return oa.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const o=e.length-1;let i,a,s=t;for(let t=0;t<o;t++)i=e[t],a=e[t+1],i.position=oa.findSegmentPositionMeetMaxThenMin(i,s,(i.center+a.center-r)/2),s=i.position+i.radius+r/2;a.position=oa.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const o=e.length-1;let i,a,s;const l=Math.max(0,e[o].position+e[o].radius-n);if(0===l)return;let c,u=0;for(i=o;i>0&&(a=e[i],s=e[i-1],c=Math.max(0,oa.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));i--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,i=0;i<=o;i++)a=e[i],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const o=e.length-1;if(!(o<0))if(0!==o)oa.layoutPositionFromMin(e,t,n,r),oa.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=oa.findSegmentPositionMeetMaxThenMin(r,t,n)}}},ia=(e,t,n,r=1)=>{const o=e.bandwidth();return n?"start"===t?o:"end"===t?o*(1-r):o*(2-r)/2:"start"===t?0:"end"===t?o*r:o*r/2},aa=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,sa=e=>e.filter(aa),la=(e,t)=>sa(le(e,t,[])),ca=e=>aa(e)&&(!1!==e.showValue||!1!==e.showLabel),ua=e=>e.filter(ca),da=(e,t)=>ua(le(e,t,[])),pa=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,ma=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},fa=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:o}=n;return void 0!==r&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},ha=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:o}=n;return void 0!==r&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+o},ga=({value:e,qMin:t})=>"NaN"!==t&&e<t,va=({value:e,qMax:t})=>"NaN"!==t&&e>t,ya={isRefLineVisible:aa,getVisibleRefLines:sa,getRefLines:la,getMeasureRefLines:e=>la(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:la(e,"refLine.dimRefLines"),isRefLineLabelVisible:ca,getVisibleRefLineLabels:ua,getRefLineLabels:da,getMeasureRefLineLabels:e=>da(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:da(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:o,invert:i=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=ia(s,o,i,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=ia(s,o,i,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:o})=>{const i=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-i*(s-o)}})({pxScale:s,value:n,innerValues:e,invert:i,minOrder:a})),(void 0===c?s(n):c)+l}return l=ia(s,o,i),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:o}=r.meta,i={},a=le(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():le(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const c=le(l,s?"qData.0.qSubNodes":"qMatrix",[]),u=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<c.length;e++){const t=c[e],n=e+d,r=t[u];i[r]||(i[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():o?(()=>{let e;for(let t=0;t<c.length;t++){const n=c[t][0],r=c[t][1],o=t+d,a=n[u];i[a]?(i[a].minOrder=Math.min(i[a].minOrder,o),i[a].maxOrder=Math.max(i[a].maxOrder,o),i[a].innerValues[i[a].innerValues.length]={id:r.qElemNumber,order:o}):i[a]={id:n.qElemNumber,qText:n.qText,minOrder:o,maxOrder:o,innerValues:[{id:r.qElemNumber,order:o}]},0===t?0===o&&(i[a].isMinOrderOk=!0):a!==e&&(i[a].isMinOrderOk=!0,i[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<c.length;e++){const t=c[e][0],n=e+d,r=t[u];i[r]||(i[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),i},getInputValue:pa,extractInfoFromInputValue:ma,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=pa({refLineLayout:e,layoutService:n});return ma(r,t,"id")},isDiscreteMinOutOfBounds:fa,isDiscreteMaxOutOfBounds:ha,isContinuousMinOutOfBounds:ga,isContinuousMaxOutOfBounds:va,isOutOfRange:({value:e,qMin:t,qMax:n})=>ga({value:e,qMin:t})||va({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&ha({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&fa({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n};function ba(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines=Wi.tokenize(o.title,t,"… "+o.valueString,3,n),o.maxNumLines=o.lines.length}}function xa({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=Wi.tokenize(e,t,n,r,o),a=i.length;let s="";if(a){[s]=i;for(let e=1;e<a;e++)s=`${s}\n${i[e]}`}return s}function Sa({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=e.map((e=>xa({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:o}))),a=i.length;let s="";if(a){[s]=i;for(let e=1;e<a;e++)s=`${s}\n\n${i[e]}`}return s}function Ea(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Ma=3,Ca=2;function wa({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const ka=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(ya.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(ya.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return ya.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:ya.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},Na={hasEngineFormat:wa,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:o,rtl:i,isContinuous:a,isDimension:s}){const l=ya.getInvert({orientation:o,rtl:i,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:d}=r.meta;let p,m;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");p=e.qMin,m=e.qMax}for(let o=0;o<e.length;o++){const i=e[o],{value:s,align:c,valueInfo:d}=i,f=ka({label:i,dataPages:u,qMin:p,qMax:m});i.scaledValue=1===f?l?-.1:1.1:-1===f?l?1.1:-.1:ya.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:c,invert:l,layoutService:r,isContinuous:a}),i.center=i.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:o}){let i;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;i=wa({inputValue:s,inputValueLabel:l,localeInfo:o})?l:t?t(a):a,r.valueString=`${xe.lrm}(${i})${xe.lrm}`,r.title=Na.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;i=wa({inputValue:a,inputValueLabel:s,localeInfo:o})?s:r,n.valueString=`${xe.lrm}(${i})${xe.lrm}`,n.title=Na.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];i=n.valueText,n.valueString=`${xe.lrm}(${i})${xe.lrm}`,n.title=Na.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const o=e.length-1;if(o<0)return;let i,a;if([i]=e,i.cMin=t,0!==o){for(let t=0;t<o;t++)i=e[t],a=e[t+1],i.cMax=(i.center+a.center-r)/2,a.cMin=i.cMax+r;a.cMax=n}else i.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,o=e.filter((e=>e.maxNumLines===t)),i=Math.min(n,o.length);for(let e=o.length-1;e>=o.length-i;e--)o[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let o=3;do{const t=Na.getTotalNumLines(e)-r;if(t<=0)return;Na.reduceLabelsHavingMaxNumLines(e,o,t),o--}while(o>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const o=e[r];o.maxNumLines=Math.max(1,Math.min(o.maxNumLines,Math.floor((Math.max(0,o.cMax-o.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let o=0;o<e.length;o++){const i=e[o];i.width=Math.min(t,Na.measureLabelMaxLineWidth(i,r)),i.height=i.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:o}=r,i=r[t],a=i/2;r.segment={center:o,range:i,min:o-a,max:o+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:o,gap:i,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:d,rtl:p,layoutService:m,isContinuous:f,isDimension:h}){const g=e.map((e=>e)),v=n;Na.calculateLabelPositions({labels:e,scale:t,size:v,layoutService:m,orientation:u,rtl:p,isContinuous:f,isDimension:h}),Ea(e,"center"),Na.addLabelsNeighborInfo(e,r,o,i),ba(e,a,s),Na.reduceTotalMaxNumLines(g,l,o-(g.length-1)*i),"vertical"===u&&(Na.reduceMaxNumLines(e,l,.05*i),function(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines.length>o.maxNumLines&&(o.lines=Wi.tokenize(o.title,t,"… "+o.valueString,o.maxNumLines,n))}}(e,a,s)),Na.addLabelsSize(e,s,l,d),Na.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:o,lineHeight:i=15,font:a}){const{majorAxis:s,minorAxis:l}=r,{minorCenter:c}=o,{fontSize:u,fontFamily:d,background:p}=t;let m=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,o=t.map(((t,o)=>{const p={type:"text",text:t,title:xa({title:e.title,font:a,ellipsis:"… "+e.valueString}),dx:0,dy:0,maxWidth:n,width:n,fontSize:u,fontFamily:d,fill:e.fill,baseline:"central",anchor:"middle"};return p[l]=c,p[s]=e.segment.position,p.y+=(o-(r-1)/2)*i,p}));e.background&&m.push(function({minorCenter:e,majorAxis:t,minorAxis:n,label:r,lineHeight:o,background:i}){const{lines:a}=r,{borderRadius:s=Ma,padding:l={}}=i,{top:c=Ca,bottom:u=Ca,left:d=Ca,right:p=Ca}=l,m=a.length,f={type:"rect",rx:s,ry:s,fill:r.background.fill,width:r.width+(d+p),height:r.height+(c+u)};return f[n]=e,f[t]=r.segment.position,f.x-=r.width/2+d,f.y-=m*o/2+c,f}({minorCenter:c,majorAxis:s,minorAxis:l,label:e,lineHeight:i,background:p})),m=m.concat(o)})),m}};function Ta(e,t,n){let r;const o=typeof t;if("string"===o||"object"===o)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function Oa(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:r,top:o,bottom:i,maxLabelWidth:a}=t;let s=1;return Na.getMaxTextWidth(e)>a&&(ba(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*r+o+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:o}=t;return Math.min(o,Na.getMaxTextWidth(e))+n+r}(t,n)}function Ra(e,t){return t?e.domain():[0,1]}function Aa(e,t,n,r="value"){let o=e.filter((e=>e[r]>=t));o=o.filter((e=>e[r]<=n));const i=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:o,minOobs:i,maxOobs:a,numMinOobs:i.length,numMaxOobs:a.length}}function La(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function Ia(e,t){return e>9?t[1]:t[0]}function Pa({alignment:e,dockValue:t,oobs:n,style:r,rect:o,symbol:i,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:d,majorAxis:p,minorAxis:m,minorDimension:f}=s,h=o[f],g=_i.createOob({oob:_i.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:i}),v="c"+p,y="c"+m,b={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0};b[y]=h/2,b[v]=a;const x={type:"text",text:u>9?"9+":u,title:Sa({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:h,width:h,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle"};return x[m]=h/2,x[p]=a,[g,b,x]}function Da(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:Wi.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const qa=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var za={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:o}=this.settings,i=!!r||n.meta.canBeContinuous,a=qa(this.settings.labels),s=Ta(this.chart,this.settings.formatter,e);Na.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:i,localeInfo:o});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:o})=>{if(n){const[r,o]=Ra(t,n);return Aa(e,r,o)}if(r){const t=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return Aa(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:i,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),u&&u.length){const e=Da(t.label),{dock:n}=this.settings.layout;return Na.measureLabelsWidth(u,this.measureText),d=Oa(n,u,e),d}const p=La(this.measureText),m=l?Ia(l,p):0,f=c?Ia(c,p):0;return d=Math.max(m,f),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:o,isContinuous:i,isDimension:a,localeInfo:s}=this.settings,l=!!i||r.meta.canBeContinuous,c=qa(this.settings.labels),{dock:u,rtl:d}=this.settings.layout,{padding:p}=n.label,m=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),f=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,m,p),{orientation:h,majorDimension:g}=m,{majorSize:v}=f,{font:y,lineHeight:b,gap:x,maxLabelWidth:S}=Da(n.label),E=Ta(this.chart,this.settings.formatter,e),M=v;Na.addLabelTitles({labels:c,formatter:E,isContinuous:i,canBeContinuous:l,localeInfo:s}),Na.calculateLabelPositions({labels:c,scale:e,size:M,layoutService:r,orientation:h,rtl:d,isContinuous:i,isDimension:a});const[C,w]=Ra(e,i),{filteredLabels:k,lowerOobs:N,upperOobs:T,lowerCircleSize:O,upperCircleSize:R,lowerOobSpace:A,upperOobSpace:L}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:o,isContinuous:i,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:d,filteredLabels:p}=Aa(e,t,n,c),m="scaledValue"!==c&&ya.getInvert({orientation:r,rtl:o,isContinuous:i}),f=function(e,t,n){return n?t:e}(d,u,m),h=function(e,t,n){return n?e:t}(d,u,m),g=f.length,v=h.length,y=La(l),b=Ia(g,y),x=Ia(v,y);return{filteredLabels:p,lowerOobs:f,upperOobs:h,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:function(e,t,n,r,o){return("vertical"===r?o.top:o.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),upperOobSpace:function(e,t,n,r,o){return("vertical"===r?o.bottom:o.right)+(e>0?t+n:0)}(v,a.oob.size,x,r,s)}}({labels:c,minValue:C,maxValue:w,orientation:h,rtl:d,isContinuous:i,style:n,padding:p,measureText:this.measureText,prop:i?"value":"scaledValue"}),I=A,P=v-L;Ea(N),Ea(T);const D=Pa({alignment:0,dockValue:0,oobs:N,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+O/2,areaProps:m,radius:O/2,font:y}),q=Pa({alignment:1,dockValue:1,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:v-(n.oob.size+R/2),areaProps:m,radius:R/2,font:y});Na.addLabelsInfo({labels:k,scale:e,majorSize:v,lowerLimit:I,upperLimit:P,font:y,lineHeight:b,gap:x,maxLabelWidth:S,majorDimension:g,orientation:h,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:i,isDimension:a}),oa.layout(k.map((e=>e.segment)),I,P,n.label.gap);const z=k.filter((e=>oa.isInside(e.segment,I,P,i)));return Na.createLabels({labels:z,style:n.label,maxLabelWidth:S,areaProps:m,area:f,lineHeight:b,font:y,theme:o}).concat([...D,...q])}};const{getInputValue:Ba,extractInfoFromInputValue:$a,resolveValue:Fa}=ya;var Ha={resolveValue:Fa,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Ba({refLineLayout:e,layoutService:n});return $a(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Ba({refLineLayout:e,layoutService:n});return $a(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:o}=n.meta,i=Ba({refLineLayout:e,layoutService:n});return r[i]&&o?r[i].qText:i},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Ba({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:o}=t;return o[r]}};function ja({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:o,chart:i,scale:a,axis:s,rtl:l,key:c,mainComponentKey:u,path:d,minimumLayoutMode:p}){const m=e?t.dimensionRefLines:d?t.query.getRefLines(d):t.measureRefLines;if(!m.length)return!1;const f={key:c,type:"ref-line",layout:{minimumLayoutMode:p},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}})},h=!(!e||"horizontal"!==o.meta.major.orientation||!l),g=!e||n.meta.isContinuous;return m.forEach((l=>{f.lines[s].push((({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:o,dockService:i,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:d})=>{var p,m;const f={dir:l,line:{strokeWidth:(null==t||null===(p=t.style)||void 0===p?void 0:p.lineThickness)||2,strokeDasharray:null==t||null===(m=t.style)||void 0===m?void 0:m.lineType,stroke:o.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(f.scale=s,f.value=t.refLineExpr.value):f.value=()=>{var e;const o=ya.getScaledPosition({scale:a.scale(s),value:Ha.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:Ha.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),size:null===(e=a.component(u))||void 0===e?void 0:e.rect["horizontal"===i.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:d});return Number.isNaN(o)?void 0:o},f})({isDimension:e,refLineLayout:l,refLineModel:t,layoutService:n,colorModel:r,dockService:o,chart:i,scale:a,axis:s,invert:h,component:u,isContinuous:g}))})),f}const Va={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function Wa({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dock:o,scale:i,style:a,formatter:s,theme:l,localeInfo:c,rtl:u,key:d,path:p}){const m=e?t.dimensionRefLineLabels:p?t.query.getRefLineLabels(p):t.measureRefLineLabels;if(!m.length)return[];const f=[],h=!e||n.meta.isContinuous,g=m.map((e=>(({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:o,theme:i,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?i.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=o,l.value=e.refLineExpr.value):(l.value=()=>Ha.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>Ha.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>Ha.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:l,isContinuous:h})));return f.push((({isDimension:e,layoutService:t,style:n,labels:r,scale:o,formatter:i,dock:a,key:s,rtl:l,theme:c,isContinuous:u,localeInfo:d})=>({key:s,type:"reference-line-labels",renderer:"svg",labels:r,formatter:i,scale:o,layoutService:t,layout:{dock:a,rtl:l},theme:c,isContinuous:u,isDimension:e,localeInfo:d,style:{label:{fontFamily:n.referenceLine.label.name.fontFamily,fontSize:n.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:l?2:4,right:l?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===a||"right"===a?10:16},oob:{size:8,fill:n.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:n.referenceLine.outOfBounds.fontFamily,fontSize:n.referenceLine.outOfBounds.fontSize,fill:n.referenceLine.outOfBounds.color,background:{fill:n.referenceLine.outOfBounds.backgroundColor}}}}}))({isDimension:e,rtl:u,style:Z(!0,Va,a),dock:o,key:d,labels:g,scale:i,formatter:s,layoutService:n,theme:l,isContinuous:h,localeInfo:c})),f}var _a={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip-qcm",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},Ua={LINE:"line",BAR:"bar",MARKER:"marker"},Ya={PRIMARY:0,SECONDARY:1},Ga={type:"bar",axis:0};const Ka={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function Xa(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Ja={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,r()}const i={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=i[t]*(n>l?1:n/l),u=i[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function Za(e,t,n,r){var o,i,a,s,l,c;const{app:u,flags:d}=t,p=null===(o=e.layout)||void 0===o||null===(i=o.tooltip)||void 0===i?void 0:i.imageComponents;if(!p)return[];const[m]=p,f=m.size||"small",h=m.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===m.cId){g=e;break}const v=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let y;if(-1!==g&&v[g]&&(y=v[g]),"media"===h&&null!==(l=m.ref)&&void 0!==l&&null!==(c=l.qStaticContentUrl)&&void 0!==c&&c.qUrl)return async function(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){let t,n,r,o,i,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",o=t.port?":"+t.port:"",i=t.prefix?t.prefix:"/","/"!==i[i.length-1]&&(i+="/"),n+r+o+i):""}(n);o&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(r,o),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,o));const{height:i,width:a,imageError:s}=await Ja.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}(m,f,u);if("url"===h)return async function(e,t,n,r,o){let i,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&Xa(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await Ja.getImageSize(t,r);i={src:t,size:r,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Ja.getImageSize(a,r);i={src:a,size:r,height:e,width:t,imageError:n}}return i}(u,d,m,f,y);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&y&&y.label){return async function(e,t,n,r){let o;const i=r.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(Xa(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await Ja.getImageSize(e,n);o={src:e,size:n,height:r,width:i,imageError:a}}}catch(e){}return o}(u,n[g],f,y)}return[]}const Qa={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(Za(e,r,n,o[t]));const a=await Promise.all(i);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},es={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await Qa.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>Qa.checkIfPromisesExist({customTooltipModel:e})};const ts=(e,t)=>{var n,r,o;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:Ka.CHART.CHART_PARENT_TYPE,qId:Ka.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},ns=e=>{var t,n,r;const o=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:Ka.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const rs={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,o,i;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(o=r.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=Ka.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Ka.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:o,rtl:i})=>{var a,s,l;const c=o,u=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=c&&c.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&u&&!(t.qHyperCubeDef.qDimensions.length<=0)){await rs.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=Ka.CHART.STATE,i=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),r.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const o=n;null!==(r=o.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=Ka.CHART.STATE,a=ts(t,i),s=await e.createSessionObject(a),l=ns(t);if(s.id!==Ka.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(c.miniChartToken.alternateState&&c.miniChartToken.sessionObj&&a){var d,p,m,f;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(p=n[0].data)||void 0===p?void 0:p.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var v;const t=null==e||null===(v=e.source)||void 0===v?void 0:v.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(Ka.CHART.CONTAINER_ID),l={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};c.miniChartToken.vis=await o.embed.render({element:s,model:c.miniChartToken.model,options:l,id:null===(m=c.miniChartToken.model)||void 0===m?void 0:m.id,type:null===(f=c.miniChartToken.model)||void 0===f?void 0:f.genericType})}}catch(t){await rs.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(rs.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Ka.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=Ka.CHART.STATE;await e.removeSessionAlternateState(r),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function os(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function is(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=Ka.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function as(e){const t=is();return e.filter((e=>t[e.id]))}const ss={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:r-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var i,a,s,l;const c=null!==(i=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==i?i:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===c.value&&r.label===c.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=ss.getAttrExprData(a);i.length||n.length?es.handlePromises({customTooltipModel:o,nodes:ss.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&rs.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>es.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[o]||(r[o]=[]),r[o]},getAttrExprData(e){var t;let n=[],r="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var i,a,s;const t=o.length-1;n=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[Ka.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[Ka.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[Ka.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(as(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[Ka.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[Ka.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=os(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const o=this.getAttrExps(e,n[r]);if(0===as(o).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const o=os(e)||[];[...o,t].forEach((e=>{const t=as(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=is(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!i[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:xe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=xe.detectTextDirection(e.src),r=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function ls(e,t,n,r){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[n])||void 0===i||null===(a=i[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],c=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return c?(s.forEach(((e,t)=>{const o=c.qValues&&c.qValues[t]?c.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let n;switch(e.id){case Ka.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Ka.CUSTOM.TITLE:case Ka.CUSTOM.DESCRIPTION:case Ka.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const cs={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>ls(t,e,r,n)}}};const us={getCustomAttrExps(e,t,n){var r,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(o=r.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,r){const o={[Ka.CUSTOM.TITLE]:!0,[Ka.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=ss.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===Ka.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===Ka.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Se.getMeasure(e,t))),e,i)}};function ds({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(us.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:ps}=Ka;function ms({flags:e,layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l,options:c}){var u,d,p;const m=function({layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:ss,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l}),f="rtl"===c.direction,h=!(!t.tooltip||t.tooltip.auto),g=h&&E(t,"tooltip.hideBasic",!1),v=!!(h&&null!==(u=t.tooltip)&&void 0!==u&&null!==(d=u.chart)&&void 0!==d&&null!==(p=d.object)&&void 0!==p&&p.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>h,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,o;const i=ds({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===ps.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===ps.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>ss.checkIfPromisesExist({customTooltipModel:m}),createImageRow:({value:e,h:t})=>ss.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const o=ss.getDataNodes(i,r),a=ss.getAttrExprData(t);return es.handlePromises({customTooltipModel:m,nodes:o,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>v,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>rs.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>ss.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>rs.show({app:n,properties:t,selectedNodes:e,customTooltipModel:m,rtl:f}),hasAlternateState:()=>{var e;return!(null===(e=m.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>rs.hide({app:n,customTooltipModel:m}),destroy:()=>rs.destroyVisualization({customTooltipModel:m})}}}function fs({key:e,source:t,layoutService:n,fieldModel:r,colorService:o,series:i}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=i.filter((e=>e.type===Ua.BAR)),c=n.meta.isContinuous?s:a,u=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:i})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},segment:{field:e,value:u,reduceLabel:"none"},end:{field:e,value:u,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...o.getDatumProps(i),customTooltipAttrExps:cs.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function hs({key:e,series:t,source:n,fieldModel:r,colorService:o,layoutService:i,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,c=i.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},u)=>({source:n,field:a,value:i.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:u,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:cs.getNode(i.getLayout(),i.meta),...o.getDatumProps(t)}})))}}]}return[]}function gs({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:o}=t;if(o.isBarSeriesStacked){const{major:t,majorNumeric:i}=n.main,a=r.filter((e=>e.type===Ua.BAR)),s=o.isContinuous?{field:i,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:o.isContinuous?i:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:o.isContinuous?e=>e.qNum:void 0}}}]}return[]}const vs={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var ys={OPTIONS:vs,DEFAULT:vs.MINI_CHART};function bs({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:o,minThumbSize:i})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===o,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<i){const e=(i-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=i}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:d}:{top:u,left:0,height:d}}})}}function xs({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-r)/(o-r),(n.max-r)/(o-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const Ss=e=>({miniChart:e===ys.OPTIONS.MINI_CHART.value,bar:e===ys.OPTIONS.BAR.value,none:e===ys.OPTIONS.NONE.value});function Es({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Ss(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Ss(ys.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),o=e.getLayoutValue("preferContinuousAxis");return Ss(!n&&(r||!r&&o)?ys.OPTIONS.NONE.value:ys.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===ys.OPTIONS.MINI_CHART.value,n.bar=t.value===ys.OPTIONS.BAR.value,n.none=t.value===ys.OPTIONS.NONE.value),n}function Ms({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:o,dockService:i,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),p="horizontal"===i.meta.major.orientation,m=p?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,f=p?d.rect.computedInner.width:d.rect.computedInner.height,h=p&&a?f-m:m,g=Math.max(0,Math.min(h/f,1)),[v,y]=xs({layoutService:o,viewState:n,viewCache:r}),b=g<v,x=g>y,S=!b&&!x;return{pixel:h,relative:g,thumb:S?h-v*f:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function Cs({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:o,dockService:i}){return()=>{const a=t.component(e),{orientation:s}=i.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,p]=xs({layoutService:o,viewState:n,viewCache:r});return{size:u,thumbSize:(p-d)*u}}}function ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ms({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Cs({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,o)=>!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(i.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),i=o.get("continuousMax"),s=n+(i-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,i-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const ks="data-scrollbar-handle";function Ns({e:e}){return(e.srcEvent||e).srcElement.getAttribute(ks)||""}const Ts="scrollbarResize";function Os({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s}){const l=Ms({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:Ts,threshold:0,enable(e,t){return!(!i.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Ts]=this[Ts]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&Ns({e:t})&&(this[Ts].panningEvent=t.srcEvent),!!this[Ts].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[Ts]=this[Ts]||{},this[Ts].panningEvent&&t.component(e).emit("dragStart",this[Ts].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[Ts]=this[Ts]||{},!this[Ts].panningEvent)return;const i=r.get("zoom"),a=o.get("continuousMin"),s=o.get("continuousMax"),c=o.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=Ns({e:this[Ts].panningEvent});let p="start"===d?Math.min(u,i.max):i.min,m="end"===d?Math.max(u,i.min):i.max;p===m&&(p-="start"===d?c:0,m+="end"===d?c:0),r.set("zoom",{min:p,max:m}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[Ts]=this[Ts]||{},delete this[Ts].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[Ts]=this[Ts]||{},delete this[Ts].panningEvent,t.component(e).emit("dragEnd")}}}}const Rs="scrollbarPan";function As({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ms({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Cs({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:Rs,threshold:0,enable(r,o){return this[Rs]=this[Rs]||{},!(o&&!this[Rs].isPanning)||!!n.scroll.enabled()&&((!o||o.target===t.element)&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e)))}},events:{scrollbarPanstart(n){n.preventDefault();const a=c(n);if(this[Rs]=this[Rs]||{},this[Rs].isPanning=!0,t.component(e).emit("lockState"),i.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),i=o.get("continuousMax"),s=n+(i-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,i-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,i-t),max:Math.max(s,n+t)}),this[Rs].relative=a.relative,this[Rs].zoom=r.get("zoom"),this[Rs].zoom.span=this[Rs].zoom.max-this[Rs].zoom.min,this[Rs].zoom.fullSpan=i-n}else if(a.onThumb)this[Rs].offset=a.thumb;else{const e=u();this[Rs].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=c(n);if(this[Rs]=this[Rs]||{},i.meta.isContinuous){const e=a.relative-this[Rs].relative,{fullSpan:t,span:n,min:i,max:s}=this[Rs].zoom,l=o.get("continuousMin"),c=o.get("continuousMax");r.set("zoom",{min:Math.min(i+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Rs].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},scrollbarPanend(n){n.preventDefault(),this[Rs]=this[Rs]||{},this[Rs].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[Rs]=this[Rs]||{},this[Rs].isPanning=!1,t.component(e).emit("unlockState")}}}}function Ls({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return[ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}),Os({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),As({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})]}function Is({componentKey:e,chart:t,actions:n,layoutService:r}){const o=(o,i)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(o,i)};return{type:"native",events:{mousemove:e=>o("hover",e),mouseleave:()=>o("leave")}}}const Ps={background:"rgba(0, 0, 0, 0.1)"},Ds={top:-1,bottom:-1,width:6},qs={width:2,background:"#595959"};var zs={before:Ps,after:Ps,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Ds,endHandle:Ds,startHandleBorder:qs,endHandleBorder:qs};const Bs={background:"rgba(0, 0, 0, 0.1)"},$s={top:-1,bottom:-1,width:6},Fs={width:2,background:"#595959"};var Hs={before:Bs,after:Bs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:$s,endHandle:$s,startHandleBorder:Fs,endHandleBorder:Fs};const js={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Vs={pointerEvents:"initial"},Ws={pointerEvents:"none"};const _s="ew-resize",Us="default";function Ys(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,o=t.range(),i=n&&t.rtl;return{size:r,start:(i?1-o[1]:o[0])*r,end:(i?1-o[0]:o[1])*r}}function Gs(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?_s:Us}function Ks(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const o=(r-(n-t))/2,i=Math.max(0,0-(t-o))-Math.max(0,n+o-e);return{size:e,start:t-o+i,end:n+o+i}}return{size:e,start:t,end:n}}function Xs(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function Js(){const{size:e,start:t,end:n}=Ys.call(this);this.renderer.render(this.elements(this.h,Ks.call(this,e,t,n)))}function Zs(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?Hs:zs;return{container:{...js},before:{...js,...n.before,...t.before},after:{...js,...n.after,...t.after},thumb:{...js,...n.thumb,...t.thumb},startHandle:{...js,...Vs,...n.startHandle},endHandle:{...js,...Vs,...n.endHandle},startHandleBorder:{...js,...Ws,...n.startHandleBorder},endHandleBorder:{...js,...Ws,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var Qs={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){Js.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!Xs.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Ns({e:e});t&&(this.state.hover[t]=!0),Gs.call(this),Js.call(this)},leave(){this.state.locked||(this.state.hover.reset(),Gs.call(this),Js.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Ns({e:e});t&&(this.state.drag[t]=!0),Gs.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),Gs.call(this),Js.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,o="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[o]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=Ys.call(this);return this.elements(e,Ks.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:o}=this.settings,i=o.injections().map((t=>t({h:e,rect:this.rect,orientation:o.orientation,minThumbSize:o.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:o,startHandleActive:i,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[o.end]:t-n},p={[o.start]:r},m={left:-3},f={left:1},h={right:-3,left:"auto"},g={left:3},v=e("div",{style:{...s.before,...c?p:d},class:"scrollbar--before"}),y=e("div",{style:{...s.after,...c?d:p},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?h:m},class:"scrollbar--start-handle",[ks]:"start"},i?e("div",{style:{...s.startHandleBorder,...c?g:f}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?m:h},class:"scrollbar--end-handle",[ks]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?f:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[o.start]:n,[o.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[v,x,y,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:Zs.call(this),continuous:o.isContinuous,invert:"horizontal"===o.orientation&&o.rtl,injections:i})}};function el({layoutService:e}){return e.meta.isContinuous&&Es({layoutService:e}).miniChart}function tl({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:o}=e,{primarySeries:i,secondarySeries:a}=r.meta,s=r.query.series(Ua.LINE),l=[...hs({forceCreate:!0,key:_a.COLLECTION.PRIMARY,series:i,fieldModel:n,colorService:o,layoutService:t}),...hs({key:_a.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:o,layoutService:t}),...hs({key:_a.COLLECTION.LINE,series:s,fieldModel:n,colorService:o,layoutService:t}),...fs({key:_a.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:o,series:i}),...fs({key:_a.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:o,series:a}),...gs({key:_a.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:i}),...gs({key:_a.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return el(e)&&(l.push(...hs({key:_a.COLLECTION.REDUCED,source:_a.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:o,layoutService:t})),l.push(...hs({key:_a.COLLECTION.REDUCED_PRIMARY,source:_a.DATA.REDUCED,series:i,fieldModel:n,colorService:o,layoutService:t})),l.push(...hs({key:_a.COLLECTION.REDUCED_SECONDARY,source:_a.DATA.REDUCED,series:a,fieldModel:n,colorService:o,layoutService:t})),l.push(...fs({key:_a.COLLECTION.REDUCED_STACKED_PRIMARY,source:_a.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===Ua.BAR)),colorService:o})),l.push(...fs({key:_a.COLLECTION.REDUCED_STACKED_SECONDARY,source:_a.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===Ua.BAR)),colorService:o}))),l}const nl=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function rl({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,o=2===n.meta.measureAxes.length;if(o)return.5;const i=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!o){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===i||"bottom"===i?1:0:"near"===i||"left"===i?0:1}const ol=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:o,dockService:i}=e,{orientation:a}=i.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:nl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:rl({models:e})}},il=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:o,dockService:i}=e,{orientation:a}=i.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:o.meta.groupSize,maxPxStep:nl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:rl({models:e})}};function al({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:o}=t,{orientation:i}=o.meta.major;return{type:"linear",invert:"horizontal"===i&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function sl({viewCache:e,mainMajor:t}){return Z(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function ll({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:o,max:i}=e.get("zoom"),a=(i-o)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function cl({picasso:e,viewState:t,viewCache:n,models:r,environment:o}){const{layoutService:i,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:c}=e.renderer("svg")(),{majorNumeric:u}=a.main,d=l.getStyles(),p={type:"time",data:{field:u},qAxis:()=>i.getHyperCubeValue("qAxisData.qAxis",[]),field:u,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===o.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:i.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>c({text:e,fontFamily:d.axis.label.name.fontFamily,fontSize:d.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:ll({viewState:t,viewCache:n,layoutService:i})};return{[_a.SCALE.MAJOR]:Z(!0,{},p,{ticks:{level:"outer"}}),[_a.SCALE.MAJOR_INNER]:Z(!0,{},p,{ticks:{level:"inner"}})}}function ul({picasso:e,models:t,viewState:n,viewCache:r,environment:o}){const{meta:i}=t.layoutService,a=i.isTime?{...cl({picasso:e,viewState:n,viewCache:r,models:t,environment:o})}:i.isContinuous?{[_a.SCALE.MAJOR]:al({models:t,viewState:n,environment:o})}:i.isBarSeriesGrouped?{[_a.SCALE.MAJOR]:il({models:t,environment:o})}:{[_a.SCALE.MAJOR]:i.isBarSeriesStackedInBothAxis?il({models:t,environment:o}):ol({models:t,environment:o})};return el(t)?{...a,[_a.SCALE.REDUCED]:sl({viewCache:r,mainMajor:a[_a.SCALE.MAJOR]})}:a}function dl({fields:e,tickModel:t,dockService:n,environment:r}){const o="rtl"===r.options.direction,{orientation:i}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===i||o,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function pl({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!el({layoutService:e}))return;const o="rtl"===r.options.direction,{orientation:i}=n.meta.minor;return{type:"linear",invert:"vertical"===i||o,min:t.query.getMin,max:t.query.getMax}}function ml({picasso:e,models:t,viewState:n,viewCache:r,environment:o}){const{layoutService:i,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:c,dockService:u}=t;return{...ul({picasso:e,models:t,viewState:n,viewCache:r,environment:o}),[_a.SCALE.MINOR.PRIMARY]:dl({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:o}),[_a.SCALE.MINOR.SECONDARY]:dl({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:o}),[_a.SCALE.MINOR.REDUCED_PRIMARY]:pl({layoutService:i,tickModel:s,dockService:u,environment:o}),[_a.SCALE.MINOR.REDUCED_SECONDARY]:pl({layoutService:i,tickModel:l,dockService:u,environment:o}),...c.custom.wrappedScales()}}var fl={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const hl=["all","labels"];function gl({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:o}=e,i=t.getLayoutValue("measureAxes");if(!i||!i.length)return[];const a=o.getStyles(),{measureAxes:s}=r.meta;return s.filter((e=>{const t=e.isPrimary?0:1;return hl.some((e=>i[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?_a.COMPONENT.AXIS.MINOR.PRIMARY:_a.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:fl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:a.axis.label.name.fontFamily,fontSize:a.axis.label.name.fontSize,fill:a.axis.label.name.color},line:{stroke:a.axis.line.major.color},ticks:{stroke:a.axis.line.major.color},minorTicks:{stroke:a.axis.line.minor.color}}})))}var vl=.5,yl=3,bl=13;function xl({models:e,environment:t}){const{layoutService:n,dockService:r,themeService:o}=e,i="rtl"===t.options.direction,a=n.getLayoutValue("dimensionAxis"),s=o.getStyles(),l=(({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return ge.getAdjustedMaxGlyphCount(t,r,0,"qText")})({layoutService:n}),{orientation:c}=r.meta.major,u="horizontal"===c?a.label:"auto";return{type:"axis",key:_a.COMPONENT.AXIS.MAJOR,scale:_a.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:fl.AXIS.MAJOR[c.toUpperCase()]},settings:{labels:{mode:a.label,tiltAngle:i?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===u?void 0:r.meta.minor.size/4,maxGlyphCount:l,tiltThreshold:l>yl&&l<bl?1:void 0,fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color},line:{show:!1},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:vl}}}]}}}function Sl({models:e}){const{dockService:t,themeService:n}=e,{orientation:r}=t.meta.major,o=n.getStyles();return{type:"axis",key:_a.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:_a.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:fl.AXIS.MAJOR[r.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:o.axis.label.name.fontFamily,fontSize:o.axis.label.name.fontSize,fill:o.axis.label.name.color},line:{show:!1}}}}function El({models:e,environment:t}){const{layoutService:n}=e,r=n.getLayoutValue("dimensionAxis");if(!r)return[];const{show:o}=r;return"none"===o||"title"===o?[]:n.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r}=e,o="rtl"===t.options.direction,{orientation:i}=n.meta.major,a="bottom"===n.meta.major.dock?0:1,s=r.getStyles(),l=o?1:0,c={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:fl.AXIS.MAJOR[i]},preferredSize:()=>({size:2*parseFloat(s.axis.label.name.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:o?"end":"start",label:{align:a,justify:l},guideLine:{major:{justify:l},minor:{align:a}},line:{show:!1}},style:{label:{fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color},majorGuideLine:{stroke:s.axis.line.major.color},minorGuideLine:{stroke:s.axis.line.minor.color}}};return[Z(!0,{},c,{key:_a.COMPONENT.AXIS.TIME_INNER,scale:_a.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:s.axis.line.minor.color},minorGuideLine:{stroke:s.axis.line.major.color}}}),Z(!0,{},c,{key:_a.COMPONENT.AXIS.TIME_OUTER,scale:_a.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[Sl({models:e})]:[xl({models:e,environment:t})]}const Ml=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,Cl=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:o})=>e([o.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function wl({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1},...t},inactive:{opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:vl},...n}}}]}}var kl="max",Nl="min";function Tl(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const Ol=(e,t)=>`${e}-${t.id}`,Rl=4,Al=12,Ll=4;function Il({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:o}){if(t.meta.isContinuous)return()=>Ll+"px";const i={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!i.size){const n=e.component(r),s=t.resources.scale(_a.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Rl,Math.min(Al,l));i.size=("bar"===o?2*c:c)+"px"}return i.size}}const{isDark:Pl}=kt;const Dl=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:o,seriesModel:i,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c}=t,u=a.getColor(),{fill:d,marker:p}=n.options,{isContinuous:m}=o.meta,f="rtl"===r.options.direction,{orientation:h}=s.meta.major,g="horizontal"===h,v=(n.isPrimary?l:c).query.getExtrema(),y=({end:e})=>{const{value:t}=e;return Tl(t,v)},b=Ol(_a.COMPONENT.MARKER,n);return{type:"point",key:b,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[g?"x":"y"]:{scale:_a.SCALE.MAJOR,fn:Cl({layoutService:o,seriesModel:i,rtl:f,orientation:h}),ref:m?"major":void 0},[g?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:d||"bar"===p?u:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||y(e.datum)?0:1},stroke:e=>{const t=u(e);return d?Pl(t)?function(e){return We(e).brighter(.5).toString()}(t):function(e){return We(e).darker().toString()}(t):t},size:Il({chart:e,layoutService:o,dockService:s,markerKey:b,markerType:p}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:p,horizontal:g,rtl:f})},brush:wl({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||y(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||y(e.data)?0:vl}}})}};function ql({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:o}){return function(i){const{datum:a,resources:{scale:s}}=i,l=s(_a.SCALE.MAJOR),c=s(_a.SCALE.COLOR),u=t&&o?[...a.points].reverse():a.points,d=u.reduce(((t,n,r)=>{const o="NaN"===n[e].value||Number.isNaN(n[e].value),i=u[r+1],a=i&&"NaN"!==i[e].value&&!Number.isNaN(i[e].value);return o?t.length&&a&&t.push(n):t.push(n),t}),[]),p="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),m=d.map(p),f=Math.min(...m),h=Math.max(...m)-f,g=0===h?1:h,v=m.map(((e,t)=>0===t?0:t===m.length-1?1:(e-f)/g)),y=[];for(let t=0;t<d.length;t++){const o=d[t],i=o.color&&o.color.value,a=n?i||r:c(i)||r,s=0===t,l=t===d.length-1,u=v[t];if("NaN"===o[e].value||Number.isNaN(o[e].value))y[t-1].virtual||y.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?y.push({color:a,offset:s?0:Math.max(0,parseFloat((u-(u-v[t-1])/2).toFixed(5)))}):y.push({color:a,offset:u});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?y.push({color:a,offset:l?1:Math.max(0,parseFloat((u+(v[t+1]-u)/2).toFixed(5)))}):y.push({color:a,offset:u})}}const b=y.reduce(((e,t,n)=>{if(t.virtual){const t=y[n-1],r=y[n+1],o=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:o},{color:r.color,offset:o})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function zl({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:o,dockService:i}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:c,nil:u}=o.getSettingsForMeasure(n),d="horizontal"===i.meta.major.orientation;if(!l||"constant"===c)return o.getColor();if("measure"===l&&"categorical"===c)return o.getColor();const p=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=p&&p.on)return"byExpression"===p.mode?ql({isHorizontal:d,isColor:!0,fallback:u,rtl:a}):o.getColor();const m=r.getLayoutValue("color",{}),f=!m.auto&&"byExpression"===m.mode,h=!!m.colorExpression;if(f&&!h)return u;const g=!m.auto&&"byMeasure"===m.mode&&m.byMeasureDef&&void 0!==m.byMeasureDef.activeMeasureIndex;return s||!g?ql({isHorizontal:d,isColor:"color"===c,fallback:u,rtl:a}):"continuous"===c?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:o}}=n,i=o(_a.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,d=i.domain().map((e=>({color:i(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/u))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(o){const{datum:{points:i},resources:{scale:a}}=o,s=a(_a.SCALE.COLOR),l=i.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),c=Math.min(...l),u=Math.max(...l),d=t?Math.min(0,c):c,p=(t?Math.max(0,u):u)-d,m=0===p?1:p,f=s.domain(),h=[];for(let e=0;e<f.length-1;e++){const t=f[e],r=s(t)||n;h.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/m))});const o=f[e+1];h.push({color:r,offset:Math.min(1,Math.max(0,(o-d)/m))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:h}}}({isHorizontal:d,fallback:u,rtl:a})}const Bl=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:o,dockService:i,styleModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=i.meta.major,c=Cl({layoutService:r,seriesModel:o,rtl:s,orientation:l});return{key:Ol(_a.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:_a.SCALE.MAJOR,fn:c},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:zl({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:i.meta.major.orientation},brush:wl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:vl},inactive:{opacity:vl}})}};var $l={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function Fl({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),o=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),i=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:o(e,t),after:i(e,t)})}const Hl=3,jl=20;function Vl({models:e,series:t,environment:n}){const{layoutService:r,colorService:o,seriesModel:i,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,selectionService:u}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:p}=a.meta.major,m="horizontal"===p,f="SPARK"===a.meta.chart.mode,h=o.getColor(),{POINT:g}=$l,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=Fl({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){return e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{})}({items:t}));const{value:o}=e.line,i=n.map[o],a=`${e.major.value}-${o}`,s=i.keys.indexOf(a),{before:l,after:c}=r({index:s,items:i.items});return!l&&!c}}({series:t,layoutService:r}),y="rtl"===n.options.direction,b=(t.isPrimary?l:c).query.getExtrema(),{isContinuous:x}=r.meta,S=({end:e})=>{const{value:t}=e;return Tl(t,b)};return{type:"point",key:Ol(_a.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:m?g.SIZE.DEFAULT/2:0}}),settings:{[m?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[m?"x":"y"]:{scale:_a.SCALE.MAJOR,fn:Cl({layoutService:r,seriesModel:i,rtl:y,orientation:p}),ref:"major"},sizeLimits:{minPx:Hl,maxPx:jl},size:e=>{const{value:t}=e.datum.line;return s.query.point.getSize(t)+"px"},fill:h,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||S(e)?0:f?v({item:e,items:t.items})?1:0:d||v({item:e,items:t.items})?1:0}},brush:wl({layoutService:r,active:{r:e=>e.r+$l.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data))return 0;if(!x||d)return 1;const{event:n,components:r=[]}=(null==u?void 0:u.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;return[_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS,_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const Wl=(e,{dataset:t})=>{var n;if(null!==(n=e.null)&&void 0!==n&&n.value)return"-";const{value:r,label:o,source:i}=e.end,a=t(i.key).field(i.field);return a.raw().isCustomFormatted?o:a.formatter()(r)};function _l({chart:e,models:t,environment:n,series:r,lineSeries:o}){const{layoutService:i,dockService:a,themeService:s,primaryExtremumModel:l,secondaryExtremumModel:c}=t,{id:u}=r,d="rtl"===n.options.direction,p=i.getLayoutValue("dataPoint");if(!p)return!1;if(!p.show||!p.showLineLabels)return!1;const m=(r.isPrimary?l:c).query.getExtrema(),f=s.getStyles();return{type:"point-label",key:`${_a.COMPONENT.POINT_LABEL}-${u}`,layout:{displayOrder:2,minimumLayoutMode:fl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:r.options.showAsConnections,label:t=>Wl(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{point:`${_a.COMPONENT.POINT}-${u}`,allPoints:o.map((e=>`${_a.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>Tl(e.value,m))(e.data),labelSpace:{use:()=>{const t=e.component(_a.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:f.label.value.fontFamily,fontSize:f.label.value.fontSize,fill:f.label.value.color}}}const Ul=({chart:e,dock:t})=>{let n=t;const r=e.component(`${_a.COMPONENT.SLICED_HAT}-${kl}`),o=e.component(`${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.PRIMARY}`),i=e.component(`${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.SECONDARY}`);return r?n=`@${_a.COMPONENT.SLICED_HAT}-${kl}`:o?n=`@${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.PRIMARY}`:i&&(n=`@${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.SECONDARY}`),n},Yl=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${_a.COMPONENT.SLICED_HAT}-${kl}`&&e!==`@${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.PRIMARY}`&&e!==`@${_a.COMPONENT.SLICED_HAT}-${kl}-${Ya.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${_a.COMPONENT.SLICED_HAT}-${Nl}`&&e!==`@${_a.COMPONENT.SLICED_HAT}-${Nl}-${Ya.PRIMARY}`&&e!==`@${_a.COMPONENT.SLICED_HAT}-${Nl}-${Ya.SECONDARY}`||"vertical"!==t||n||(r=4),r};function Gl({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:o,dockService:i,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=o.getLayoutValue("dataPoint",{}),c="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const u="horizontal"===i.meta.major.orientation,{show:d}=o.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=i.meta.major;if(u&&"top"===e)return!1;if(!u&&e===(c?"left":"right"))return!1}const p=c?"left":"right";return{type:"label-space",key:_a.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:fl.LABEL_SPACE,dock:Ul({chart:e,dock:u?"top":p})},settings:{size:10},preferredSize:()=>{const t=e.component(`${_a.COMPONENT.LINE}-${r[0].id}`);if(null==t||!t.rect)return 0;const n=(u?17:34)/t.rect[u?"height":"width"],o=a.query.getExtrema(),i=e.scale(_a.SCALE.MINOR.PRIMARY)(o.implicit.line.max),l=u||c?i:1-i,d=r.filter((e=>e.isPrimary)).length>0,p=s.query.getExtrema(),m=e.scale(_a.SCALE.MINOR.SECONDARY)(p.implicit.line.max),f=u||c?m:1-m,h=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||h&&f<n?10:0}}}const Kl={min:"Min",max:"Max"};function Xl(e,t,n){const{hasExplicitMax:r}=n.meta,{max:o}=n.explicit;return!!r&&Math.max(e,t)>o&&o<=Math.min(e,t)}function Jl(e,t,n){const{hasExplicitMin:r}=n.meta,{min:o}=n.explicit;return!!r&&Math.min(e,t)<o&&o>=Math.max(e,t)}function Zl(e,t,n){return Xl(e,t,n)||Jl(e,t,n)}function Ql(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function ec(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function tc(e,t){return Ql(e,t)||ec(e,t)}function nc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta["hasExplicit"+Kl[t]]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===kl?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===kl?!Ql(r,e):!ec(r,e)}({extrema:e,type:t}))}var rc=Object.freeze({__proto__:null,isSegmentMaxOutOfBounds:Xl,isSegmentMinOutOfBounds:Jl,isSegmentOutOfBounds:Zl,isMaxOutOfBounds:Ql,isMinOutOfBounds:ec,isOutOfBounds:tc,shouldShowOob:nc});const oc={min:"Min",max:"Max"},ic=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:o,environment:i,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,primaryTickModel:u,secondaryTickModel:d,layoutService:p,seriesModel:m,themeService:f,fieldModel:h}=t,g="rtl"===i.options.direction,{dock:v,opposite:y,orientation:b}=s.meta.major,x=l.query.getExtrema(),S=c.query.getExtrema(),E=a===kl,{isBarSeriesGrouped:M}=p.meta,C=(({chart:e,type:t,opposite:n,dock:r})=>{let o=t===kl?n:r;const i=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`),s=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`),l=e.component(_a.COMPONENT.LABEL_SPACE),c=e.component(`${_a.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${_a.COMPONENT.BAR_OOB}-${t}-${Ya.PRIMARY}`),d=e.component(`${_a.COMPONENT.BAR_OOB}-${t}-${Ya.SECONDARY}`);return i?o=`@${_a.COMPONENT.SLICED_HAT}-${t}`:a?o=`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`:s?o=`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`:c||u||d?l&&t===kl?o="@"+_a.COMPONENT.LABEL_SPACE:c?o=`@${_a.COMPONENT.BAR_OOB}-${t}`:u?o=`@${_a.COMPONENT.BAR_OOB}-${t}-${Ya.PRIMARY}`:d&&(o=`@${_a.COMPONENT.BAR_OOB}-${t}-${Ya.SECONDARY}`):l&&t===kl&&(o="@"+_a.COMPONENT.LABEL_SPACE),o})({chart:e,type:a,opposite:y,dock:v}),w=Cl({layoutService:p,seriesModel:m,rtl:g,orientation:b}),k=r.concat(n);if(!k.length)return!1;const N=E?x.implicit.bar.max:x.implicit.bar.min,T=Number(N.toFixed(13));if(!M&&o.length&&rc[`is${oc[a]}OutOfBounds`](T,x))return!1;if(!x.meta.hasExplicit&&!S.meta.hasExplicit)return!1;const O=E?"max":"min",R=Math[O](Number(x.implicit.line[O].toFixed(13)),Number(x.implicit.marker[O].toFixed(13))),A=Math[O](Number(S.implicit.line[O].toFixed(13)),Number(S.implicit.marker[O].toFixed(13))),L=k.filter((e=>e.isPrimary)),I=k.filter((e=>!e.isPrimary)),P=L.length>0,D=I.length>0,{major:q,majorNumeric:z}=h.main,B=e=>"NaN"!==e.qNum?e.qNum:0,$=p.meta.isContinuous?z:q;return{type:"data-out-of-bounds-marker",key:`${_a.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:C,minimumLayoutMode:fl.OUT_OF_BOUNDS_MARKER},data:{extract:k.map((({ref:e,typeIndex:t,options:n})=>({field:q,value:p.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:$},end:{field:e,value:n.showAsZeros?B:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:E?()=>u.query.getMax():()=>u.query.getMin(),secondaryExtremum:E?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:L,secondarySeries:I,orientation:b,rtl:g,major:{scale:_a.SCALE.MAJOR,fn:w},markerOffset:Yl({dockPosition:C,orientation:b,rtl:g})},brush:wl({layoutService:p}),show:()=>{if(E){if(P&&R>u.query.getMax())return!0;if(D&&A>d.query.getMax())return!0}if(!E){if(P&&R<u.query.getMin())return!0;if(D&&A<d.query.getMin())return!0}return!1},style:{fill:f.getStyles().outOfRange.color}}},ac={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function sc({chart:e,models:t,viewState:n,viewCache:r,axis:o}){const i=M(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${_a.COMPONENT.BAR}-${o}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return i.get([e,t])||i.empty()&&!1})()||(()=>{const e=ac[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),o=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=ac[a.meta.chart.mode],c=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/o/.2,1));return i.set([e,t],Math.max(2,Math.min(l,c)))})()}const lc=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:o})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),o=t+e;return o>1?t-(o-1):t}:n.query.bar.getWidthFn():t||o?.9:.7;function cc(e){return Math.min(Math.max(0,e),1)}const uc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o})=>{const{layoutService:i,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u,primaryExtremumModel:d,secondaryExtremumModel:p}=t,{isContinuous:m,isBarSeriesStacked:f,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:g}=i.meta,v=e=>e.datum.start?e.datum.start.value:e.scale.min(),y=o?Ya.PRIMARY:Ya.SECONDARY,b=o?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY;if(!(o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=f?{scale:b,start:{ref:"start",fn:e=>{const t=v(e);return cc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return cc(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=v(e);return cc(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?v(e):e.datum.end.value;return cc(e.scale(n))}}},S=(o?d:p).query.getExtrema(),E=f?({start:e,end:t})=>Zl(e.value,t.value,S):({end:e})=>tc(e.value,S);return{type:"box",key:`${_a.COMPONENT.BAR}-${y}`,data:{filter:(()=>{if(f)return;const e=l.query.series(Ua.BAR).filter((e=>e.isPrimary===o)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?o?_a.COLLECTION.STACKED_PRIMARY:_a.COLLECTION.STACKED_SECONDARY:o?_a.COLLECTION.PRIMARY:_a.COLLECTION.SECONDARY},preferredSize:m?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:_a.SCALE.MAJOR,fn:Ml({layoutService:i,axis:y}),ref:m?{start:"major",end:"major"}:void 0},minor:x,box:{width:lc({isContinuous:m,isBarSeriesGrouped:h,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:g}),minWidthPx:m?sc({chart:e,models:t,viewState:n,viewCache:r,axis:y}):void 0,fill:s.getColor(),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t,n;return!0===(null===(t=e.datum)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)||E(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:wl({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:vl}}})}},dc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o})=>{const{layoutService:i,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u}=t,{isBarSeriesStacked:d,isContinuous:p,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:f}=i.meta,h=o?Ya.PRIMARY:Ya.SECONDARY,g=o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${_a.COMPONENT.STACK_BAR}-${h}`,type:"box",data:{collection:o?_a.COLLECTION.STACKED_TOTAL_PRIMARY:_a.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:_a.SCALE.MAJOR,fn:Ml({layoutService:i,axis:h}),ref:p?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:o?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:lc({isContinuous:p,isBarSeriesGrouped:m,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:f}),minWidthPx:p?sc({chart:e,models:t,viewState:n,viewCache:r,axis:h}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function pc({style:e,simplifiedPlacement:t}){return n=>kt.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}function mc(e,t){const n="horizontal"===e.dockService.meta.major.orientation;return{placements:t.simplifiedPlacements.map((e=>function({simplifiedPlacement:e,style:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:pc({style:t,simplifiedPlacement:e}),overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,style:t.style,isHorizontal:n}))),label:t.label}}function fc(e,t,n,r){const o=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let i="up";return"vertical"===t&&o<0?i="down":"horizontal"===t&&(i=o>=0&&!n||o<0&&n?"right":"left"),i}const hc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},gc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function vc(e,t,n,r){const o=[];return void 0!==e&&(o[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(o[t]={position:"inside",onBackground:!1,justify:n}),o}const yc=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:o}=e,{meta:i}=r,a="rtl"===t.options.direction,s=e.themeService.getStyles(),l=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),c=n?Ya.PRIMARY:Ya.SECONDARY;if(!(n?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!hc(l,i))return!1;let u;!i.isBarSeriesStacked&&(u=i.isBarSeriesStacked?1:0);const d={label:e=>Wl(e.data,e),simplifiedPlacements:vc(u,0===u?1:0,i.isBarSeriesStacked?.5:1,i.isContinuous),style:s.label.value},p=[mc(e,d)],m=[{component:`${_a.COMPONENT.BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>fc(t.data.end.value,e.dockService.meta.minor.orientation,a,0),labels:p,fontSize:s.label.value.numFontSize,fontFamily:s.label.value.fontFamily}}}];return{type:"labels",key:`${_a.COMPONENT.BAR_LABEL}-${c}`,layout:{minimumLayoutMode:fl.VALUE_LABEL},settings:{sources:m}}};function bc(e,t,n){const r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function xc({chart:e,models:t,environment:n,isPrimary:r}){const{meta:o}=t.layoutService,i="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),l=r?Ya.PRIMARY:Ya.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!gc(s,o))return!1;const c=e.formatter(r?_a.FORMATTER.PRIMARY:_a.FORMATTER.SECONDARY)||(e=>e),u=e=>0===e?"":c(e),d={label:e=>u(e.data.sumOfPositives.value),simplifiedPlacements:bc("outside",true,o.isContinuous),style:a.label.value},p={label:e=>u(e.data.sumOfNegatives.value),simplifiedPlacements:bc("opposite",true,o.isContinuous),style:a.label.value},m=[mc(t,d),mc(t,p)];return{type:"labels",key:`${_a.COMPONENT.STACK_BAR_LABEL}-${l}`,layout:{displayOrder:2,minimumLayoutMode:fl.VALUE_LABEL},settings:{sources:[{component:`${_a.COMPONENT.STACK_BAR}-${l}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>fc(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,i),labels:m,fontSize:a.label.value.numFontSize,fontFamily:a.label.value.fontFamily}}}]}}}var Sc=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const Ec={min:"Min",max:"Max"};function Mc({chart:e,models:t,type:n,viewCache:r,viewState:o,isPrimary:i}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,discreteModel:d}=t,{isBarSeriesStacked:p,isContinuous:m,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:h}=a.meta,g=p?dc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):uc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),v=i?l.query.getExtrema():c.query.getExtrema(),y=n===kl,b=i?Ya.PRIMARY:Ya.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta["hasExplicit"+Ec[t]]}(v,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,o=Number(r.toFixed(13));return!Sc[`has${Ec[t]}Hat`](o,e)}(v,n,y)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta["hasExplicit"+Ec[t]]&&r(e.explicit[t])}(v,n,y))return!1;let x="end";p&&(x=y?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(i?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let o=r;const i=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`),a=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`);return i&&a&&(o=n?r:`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`),o})({chart:e,type:n,isPrimary:i,dock:y?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${_a.COMPONENT.SLICED_HAT}-${n}-${b}`,layout:{dock:E},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:Z({},g.settings.box,{fill:p?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[x].value);return y?n>t:n<t},width:lc({isContinuous:m,isBarSeriesGrouped:f,styleModel:u,discreteModel:d,isBarSeriesStackedInBothAxis:h}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:wl({layoutService:a})}}const Cc={min:"Min",max:"Max"},wc={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function kc({chart:e,models:t,type:n,viewCache:r,viewState:o,isPrimary:i}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,themeService:u}=t,{end:d,start:p}=s.meta.minor,{isBarSeriesStacked:m}=a.meta,f=m?dc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):uc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),h=i?l.query.getExtrema():c.query.getExtrema(),g=n===kl?h.implicit.bar.max:h.implicit.bar.min,v=Number(g.toFixed(13)),y=i?Ya.PRIMARY:Ya.SECONDARY;if(!f)return!1;if(!rc[`is${Cc[n]}OutOfBounds`](v,h))return!1;const b=(({chart:e,type:t,end:n,start:r,isPrimary:o})=>{let i=t===kl?n:r;const a=e.component(_a.COMPONENT.LABEL_SPACE),s=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`),l=e.component(`${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`),c=e.component(`${_a.COMPONENT.BAR_OOB}-${t}-${Ya.PRIMARY}`),u=e.component(`${_a.COMPONENT.BAR_OOB}-${t}-${Ya.SECONDARY}`);return s?i=`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.PRIMARY}`:l?i=`@${_a.COMPONENT.SLICED_HAT}-${t}-${Ya.SECONDARY}`:c&&u&&!o?i=`@${_a.COMPONENT.BAR_OOB}-${t}-${Ya.PRIMARY}`:a&&t===kl&&(i="@"+_a.COMPONENT.LABEL_SPACE),i})({chart:e,type:n,end:d,start:p,isPrimary:i});let x="end";m&&(x=n===kl?"sumOfPositives":"sumOfNegatives");return{type:"box-out-of-bounds",key:`${_a.COMPONENT.BAR_OOB}-${n}-${y}`,layout:{dock:b},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:he.getDockValue(n===kl?d:p),oob:Z({},f.settings.box,{fill:u.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=m&&0===e.datum[x].value,o=rc[`is${Cc[n]}OutOfBounds`](e.datum[x].value,h,n);return(!r||function({type:e,item:t,prop:n,extrema:r}){const o=t.datum[wc[n]].value;return 0!==o&&rc[`is${Cc[e]}OutOfBounds`](o,r,e)}({type:n,item:e,prop:x,extrema:h}))&&o}})},brush:wl({layoutService:a})}}function Nc(e){return Math.min(Math.max(0,e),1)}const Tc=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:o,styleModel:i,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:c,isBarSeriesGrouped:u,isBarSeriesStackedInBothAxis:d}=s.meta,p=e.scale(r?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY),m=r?Ya.PRIMARY:Ya.SECONDARY,f=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),h=n===kl;if(!nc({extrema:f,type:n}))return!1;const g=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=(e,t="end")=>e.datum[t]?e.datum[t].value:g(e);return{type:"box",key:`${_a.COMPONENT.GHOST_BAR_OOB}-${n}-${m}`,data:{filter:(()=>{if(l)return;const e=a.query.series(Ua.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?_a.COLLECTION.STACKED_TOTAL_PRIMARY:_a.COLLECTION.STACKED_TOTAL_SECONDARY:r?_a.COLLECTION.PRIMARY:_a.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:_a.SCALE.MAJOR,fn:Ml({layoutService:s,axis:m}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:r?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Nc(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=v(e,"sumOfPositives");return Nc(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=v(e,"sumOfNegatives");return Nc(e.scale(t))}}:{ref:"end",fn:e=>{const t=v(e);return Nc(e.scale(t))}}},box:{width:lc({isContinuous:c,isBarSeriesGrouped:u,styleModel:i,discreteModel:o,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=h?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:p.max();return h?n>p.max():n<p.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Oc(e,t,n,r,o){const i=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&i.push({position:"inside",onBackground:!1,justify:r||o?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),i}const Rc=({chart:e,models:t,type:n,environment:r,isPrimary:o})=>{const{layoutService:i,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,themeService:c,seriesModel:u}=t,d=c.getStyles(),{meta:p}=i,{isBarSeriesStacked:m}=p,f=e.formatter(o?_a.FORMATTER.PRIMARY:_a.FORMATTER.SECONDARY),h=i.getLayoutValue("dataPoint.showBarLabels",!1),g="horizontal"===a.meta.major.orientation,v="rtl"===r.options.direction;if(!(o?u.meta.primaryBarSeriesCount:u.meta.secondaryBarSeriesCount)||!m&&!hc(h,p)||m&&!gc(h,p))return!1;const y=o?s.query.getExtrema():l.query.getExtrema();if(!y.meta.hasExplicit)return!1;const b=n===kl?y.implicit.bar.max:y.implicit.bar.min;if(!(n===kl?Ql(b,y):ec(b,y)))return!1;let x=e=>Wl(e.data,e);p.isBarSeriesStacked&&(x=n===kl?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(Ql(e.data.sumOfPositives.value,y)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return f?f(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(ec(e.data.sumOfNegatives.value,y)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return f?f(t):t}return""});const S={label:x,simplifiedPlacements:Oc("outside",true,p.isContinuous,g,v),style:d.label.value},E={label:x,simplifiedPlacements:Oc("opposite",true,p.isContinuous,g,v),style:d.label.value},M=[mc(t,S),mc(t,E)],C=o?Ya.PRIMARY:Ya.SECONDARY,w="horizontal"===a.meta.major.orientation?"down":"right",k=[{component:`${_a.COMPONENT.GHOST_BAR_OOB}-${n}-${C}`,selector:"rect",strategy:{type:"bar",settings:{direction:w,labels:M,fontSize:d.label.value.numFontSize,fontFamily:d.label.value.fontFamily}}}];return{key:`${_a.COMPONENT.BAR_OOB_LABEL}-${n}-${C}`,type:"labels",layout:{minimumLayoutMode:fl.VALUE_LABEL},settings:{sources:k}}},Ac=({chart:e,models:t,viewState:n,viewCache:r})=>[uc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),uc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Lc=({chart:e,models:t,viewState:n,viewCache:r})=>[dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Ic=({chart:e,models:t,environment:n})=>{const{isBarSeriesStacked:r}=t.layoutService.meta;if(r){return[xc({chart:e,models:t,environment:n,isPrimary:!0}),xc({chart:e,models:t,environment:n,isPrimary:!1})]}return[yc({models:t,environment:n,isPrimary:!0}),yc({models:t,environment:n,isPrimary:!1})]},Pc=({chart:e,models:t,viewCache:n,viewState:r})=>[Mc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Mc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Mc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Mc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Dc=({chart:e,models:t,viewCache:n,viewState:r})=>[kc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),kc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),kc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),kc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],qc=({chart:e,models:t})=>[Tc({chart:e,models:t,type:"max",isPrimary:!0}),Tc({chart:e,models:t,type:"min",isPrimary:!0}),Tc({chart:e,models:t,type:"max",isPrimary:!1}),Tc({chart:e,models:t,type:"min",isPrimary:!1})],zc=({chart:e,models:t,environment:n})=>[Rc({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),Rc({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),Rc({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),Rc({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],Bc=({chart:e,environment:t,models:n,viewState:r,viewCache:o})=>{const{seriesModel:i}=n,a=i.query.series(Ua.BAR).slice(-1),s=i.query.series(Ua.LINE),l=i.query.series(Ua.MARKER);return[...Ac({chart:e,models:n,viewState:r,viewCache:o}),...Lc({chart:e,models:n,viewState:r,viewCache:o}),...s.map((e=>Bl({models:n,environment:t,series:e}))),...s.map((e=>Vl({models:n,series:e,environment:t}))),...l.map((r=>Dl({chart:e,models:n,series:r,environment:t}))),...s.map((r=>_l({chart:e,models:n,environment:t,series:r,lineSeries:s}))),...Ic({chart:e,models:n,environment:t}),...Pc({chart:e,models:n,viewCache:o,viewState:r}),...Dc({chart:e,models:n,viewCache:o,viewState:r}),...qc({chart:e,models:n}),...zc({chart:e,models:n,environment:t}),ic({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),ic({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),Gl({chart:e,models:n,environment:t,lineSeries:s})]},$c=0,Fc=1,Hc=3;function jc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:o}=e,{auto:i,spacing:a}=r.getLayoutValue("gridLine",{});if(!i&&a===$c)return!1;const s=o.getStyles(),l=n.meta.primarySeries.length>0;return{key:_a.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:fl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!i&&a===Fc)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!i&&a===Hc,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?_a.SCALE.MINOR.PRIMARY:_a.SCALE.MINOR.SECONDARY}}function Vc({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:o,seriesModel:i}=e,a=t.query.getExtrema();return!!(i.meta.primarySeries.length>0&&a.meta.includesZero)&&{key:_a.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:fl.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===o.meta.minor.orientation?"x":"y"]:[{value:0,scale:_a.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function Wc({models:e}){const{layoutService:t,themeService:n}=e,{isContinuous:r,isTime:o}=t.meta;if(!r)return[];const i=n.getStyles(),a={type:"grid-line",layout:{minimumLayoutMode:fl.GRID_LINE},ticks:{stroke:i.grid.line.major.color},minorTicks:{show:!1,stroke:i.grid.line.minor.color}};return o?[Z(!0,{},a,{key:"time-inner-grid",x:{scale:_a.SCALE.MAJOR_INNER},ticks:{stroke:i.grid.line.minor.color}}),Z(!0,{},a,{key:"time-outer-grid",x:{scale:_a.SCALE.MAJOR}})]:[Z(!0,{},a,{key:"continuous-grid",x:{scale:_a.SCALE.MAJOR},minorTicks:{show:!0}})]}function _c({models:e}){return[jc({models:e}),Vc({models:e}),...Wc({models:e})]}function Uc({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,propertiesModel:i,appModel:a,genericObjectModel:s,themeService:l}=e,c=i.query.getProperties(),u=r.getLayoutValue("dimensionAxis");if(!u)return!1;const{show:d}=u;if("all"!==d&&"title"!==d)return!1;const{orientation:p}=o.meta.major,m=l.getStyles();return{type:"data-title",key:_a.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:o.meta.major.dock,minimumLayoutMode:fl.AXIS_TITLE.MAJOR[p.toUpperCase()]},settings:{hyperCube:r.getHyperCube(),hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:s,app:a,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0},style:{fontFamily:m.axis.title.fontFamily,fontSize:m.axis.title.fontSize,color:m.axis.title.color}}}const Yc=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function Gc({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,seriesModel:i,propertiesModel:a,appModel:s,genericObjectModel:l,themeService:c}=e,u=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return[];const p=c.getStyles(),{measureAxes:m}=i.meta;return m.filter((e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show)).map((e=>{const a=r.getHyperCube(),{isPrimary:c}=e,d=i.query.seriesByAxis(c).length>1,m={type:"data-title",key:c?_a.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:_a.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:c?o.meta.minor.dock:o.meta.minorSecondary.dock,minimumLayoutMode:fl.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!1,explicitItemInfos:Yc(i,a.qMeasureInfo,c),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:p.axis.title.fontFamily,fontSize:p.axis.title.fontSize,color:p.axis.title.color}};return d&&(m.settings.padding="0",m.settings.minWidth="auto"),m}))}function Kc({models:e,environment:t,actions:n}){return[Uc({models:e,environment:t,actions:n}),...Gc({models:e,environment:t,actions:n})]}function Xc({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:o,layoutService:i,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:c,isDiscrete:u,isContinuous:d}=i.meta,p="rtl"===t.options.direction;return!(c&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:o,viewCache:i,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=Es({layoutService:e,override:l});if(d.none)return!1;const{orientation:p}=t.meta.major,m={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===p?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:p,rtl:s,isContinuous:e.meta.isContinuous,range:()=>xs({layoutService:e,viewState:o,viewCache:i})}};d.bar&&(m.settings.style="slim",m.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(m.settings.size.thumb={min:4}));const f=a.getStyles();return f.color&&(m.style={standard:{thumb:{"border-color":f.color,opacity:.4},before:{background:f.color,opacity:.1},after:{background:f.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(m.settings.injections=()=>[bs({layoutService:e,discrete:n})]),m}({viewState:n,viewCache:r,discrete:o,continuousDataModel:s,layoutService:i,dockService:a,themeService:l,rtl:p,scrollbarOverride:{predicate:()=>u,value:ys.OPTIONS.BAR.value},deviceType:t.deviceType})}function Jc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o}){const{layoutService:i}=t,a=uc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o});if(!a)return!1;const s=o?Ya.PRIMARY:Ya.SECONDARY;return a.key=`${_a.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=i.meta.isBarSeriesStacked?o?_a.COLLECTION.REDUCED_STACKED_PRIMARY:_a.COLLECTION.REDUCED_STACKED_SECONDARY:o?_a.COLLECTION.REDUCED_PRIMARY:_a.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=o?_a.SCALE.MINOR.REDUCED_PRIMARY:_a.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=_a.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function Zc({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(Ua.LINE).map((r=>{const o=Bl({models:t,environment:e,series:r});return o.key=Ol(_a.COMPONENT.MINI_CHART.LINE,r),o.data.collection=_a.COLLECTION.REDUCED,o.settings.coordinates.minor.scale=r.isPrimary?_a.SCALE.MINOR.REDUCED_PRIMARY:_a.SCALE.MINOR.REDUCED_SECONDARY,o.settings.coordinates.major.scale=_a.SCALE.REDUCED,o.settings.layers.line.strokeWidth=1,o.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",o.layout={dock:"@scrollbar"},o}))}function Qc({models:e,environment:t}){return e.seriesModel.query.series(Ua.MARKER).map((n=>{const r=Dl({models:e,environment:t,series:n});return r.key=Ol(_a.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=_a.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?_a.SCALE.MINOR.REDUCED_PRIMARY:_a.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=_a.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function eu({chart:e,models:t,viewState:n,viewCache:r,environment:o}){return el(t)?[Jc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Jc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...Zc({environment:o,models:t}),...Qc({models:t,environment:o})]:[]}function tu({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:o}=t.meta,i=t.getLayoutValue("dimensionAxis");if(!i||"none"===i.show||"title"===i.show)return[!1];if(!r)return[!1];const a=fl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return o?[{type:"axis-overlay",key:_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:_a.SCALE.MAJOR_INNER,layout:{dock:"@"+_a.COMPONENT.AXIS.TIME_INNER,minimumLayoutMode:a}},{type:"axis-overlay",key:_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:_a.SCALE.MAJOR,layout:{dock:"@"+_a.COMPONENT.AXIS.TIME_OUTER,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:_a.SCALE.MAJOR,layout:{dock:"@"+_a.COMPONENT.AXIS.MAJOR_CONTINUOUS,minimumLayoutMode:a}}]}function nu({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:o,colorService:i,dockService:a,themeService:s,appLayoutModel:l,seriesModel:c}=t,u=l.qLocaleInfo,{options:d,theme:p}=n,m="rtl"===d.direction,f=c.query.series(Ua.BAR).filter((e=>e.isPrimary)),h=c.query.series(Ua.BAR).filter((e=>!e.isPrimary)),g=c.query.series(Ua.LINE),v=c.query.series(Ua.MARKER),y=c.query.all(),b=y.some((e=>e.isPrimary)),x=y.some((e=>!e.isPrimary)),S=b&&x,E={resolveUIColor:i.getPaletteColor},M=b?Wa({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.dock:a.meta.minor.opposite,scale:_a.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:_a.FORMATTER.PRIMARY,theme:p,localeInfo:u,rtl:m,key:_a.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],C=x?Wa({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.opposite:a.meta.minor.dock,scale:_a.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:_a.FORMATTER.SECONDARY,theme:p,localeInfo:u,rtl:m,key:_a.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&ja({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:_a.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:_a.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:fl.REFERENCE_LINE}),!!x&&ja({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:_a.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:_a.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:fl.REFERENCE_LINE}),ja({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:_a.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:m,key:_a.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`:h.length?`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`:g.length?`${_a.COMPONENT.LINE}-${g[0].id}`:v.length?`${_a.COMPONENT.MARKER}-${v[0].id}`:`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,minimumLayoutMode:fl.REFERENCE_LINE}),...M,...C,...Wa({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dock:a.meta.major.opposite,scale:_a.SCALE.MAJOR,style:s.getStyles(),theme:p,localeInfo:u,rtl:m,key:_a.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function ru(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var ou=[{key:"NoDataExist",alignment:"center",condition:({layoutService:e})=>{const{x:t,y:n}=e.meta.size;return t*n==0}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>{const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>e.getHyperCubeValue("qMeasureInfo").every(ru)},{key:"DataRangeIncludingZero",alignment:"bottom",condition:({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})=>{if(!1===e.getLayout().showDisclaimer&&r.isEnabled("SHOW_DISCLAIMER"))return!1;const o=e.getLayoutValue("measureAxis.logarithmic",!1),i=t.query.getExtrema(),a=n.query.getExtrema();return o&&(i.meta.includesZero||a.meta.includesZero)}}];function iu({environment:e,models:t}){const{flags:n,translator:r,options:o}=e,{layoutService:i,primaryExtremumModel:a,secondaryExtremumModel:s,themeService:l}=t,c=function({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r}){let o,i;for(let a=0,s=ou.length;a<s;a++){o=ou[a];try{i=o.condition({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})}catch(e){throw Error("failing disclaimer condition",e)}if(i)return o}return!1}({layoutService:i,primaryExtremumModel:a,secondaryExtremumModel:s,flags:n});if(!c)return!1;const{fontFamily:u}=l.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:o}=t,{rtl:i}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:te[e].alignment},settings:{label:o.get("Object.Disclaimer."+e),rtl:i},style:r}}(c.key,{translator:r},{rtl:"rtl"===o.direction},{fontFamily:u})}function au({layoutService:e}){return!!el({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:_a.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function su(e){return(null==e?void 0:e.type)||Ua.BAR}function lu({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:o,seriesModel:i,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:c,isGroupedByMeasure:u}=n.meta;if(!s)return!1;const{options:d}=t,p=n.getLayoutValue("color",{}),m=e=>e.filter((e=>su(e)===Ua.LINE)).map((e=>({key:Ol(_a.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),f=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex,h=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:_a.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:m(i.meta.primarySeries),secondary:m(i.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!h[e]&&f,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:i.meta.barSeriesCount,orientation:o.meta.major.orientation,rtl:"rtl"===d.direction}}}function cu({models:{fieldModel:e}}){return{[_a.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[_a.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}const uu=2e3;function du({model:e,layoutService:t,definitionPath:n="/qHyperCubeDef"}){return{fetch(t,r){const o={qStart:t,qEnd:r,qNbrPoints:this.computeNbrOfBins(),qMaxNbrTicks:300,qMaxNumberLines:this.computeMaxNumberLines()};return e.getHyperCubeContinuousData(n,o,!1)},shouldFetchReduced(){const{qHyperCube:e}=t.getLayout();return e.qSize.qcy*e.qMeasureInfo.length>=uu},computeNbrOfBins(){const{qHyperCube:e}=t.getLayout();if(!this.shouldFetchReduced())return uu;let n=e.qMeasureInfo.length||1,r=4+2*(n-1);return e.qDimensionInfo.length>1&&(n=Math.max(1,Math.min(12,t.meta.size.dimensions[1])),r=4),Math.ceil(uu/(n*r))},computeMaxNumberLines(){const{qHyperCube:e}=t.getLayout();return e.qDimensionInfo.length>1&&!this.shouldFetchReduced()?t.meta.size.dimensions[1]+1:12}}}function pu(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function mu({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,o=r+t;return 1===t&&0===e&&(r=n-.5,o=n+.5),{zoom:{min:r,max:o}}}(n,t.get("continuousMin"))}}}function fu(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const o=t.indexOf(e);o>-1&&t.splice(o,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function hu(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],o=fu(),i=fu();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?o.set(l,s):s[0].qNum>t&&(i.has(l)||i.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return o.forEach(((e,t)=>r.splice(t,0,e))),i.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let o,i;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?o=s:s[0].qNum>t&&(i||(i=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return o&&r.unshift(o),i&&r.push(i),r}({start:e,end:t,matrix:n})}function gu(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function vu(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=hu(e,t,n.qMatrix),o=gu(n.qArea,r);return{...n,qArea:o,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const yu=2**.5,bu=1/yu;function xu(e){return e.qIsOtherCell}function Su({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(xu)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(xu)||t++})),t}(n)}const Eu={command:{processDataPage:()=>{}}};var Mu={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],o=t[e+1];r.data={},o||1===r.end?o?(r.data.start=r.value,r.data.end=o.value,r.end=o.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function Cu(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function wu(e,t){const{localProps:{size:n},props:{anchor:r}}=t,o=function({props:e,localProps:{size:t},style:n,renderer:r}){const o=e.label.padding,i=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=r;e.start===e.end&&(d=c.width+2*o,1===e.end&&(u-=d));const p={x:u+o,y:o,width:d-2*o,height:t.height-2*o},m=s(l[0]+"…").width,f=Math.max(0,p.width-c.width),h=Math.max(0,p.height-c.height),g=i*f,v=a*h;return{show:p.width>=Math.min(m,c.width),text:l,dx:g,dy:v,rect:p,style:n.label,segment:{x:u+g,width:c.width+2*o}}}}}(t),i=function({localProps:{size:e},style:t,scale:n,props:r}){const[o,i]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=Cu(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=o&&n.value<=i,x1:l,y1:0,x2:l,y2:Cu(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:o.resolve(e,t),guideLine:i.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],o=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(i=n.segment,a=o.segment,!(i.x<a.x?i.x+i.width>=a.x:a.x+a.width>=i.x))}var i,a}(e,a),a}function ku(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const o=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),i=Cu(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:i,y1:Cu(o,n.minorGuideLine.strokeWidth),x2:i,y2:Cu(t.guideLine.minor.size+o,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function Nu(e){return e.filter((e=>e.show)).map((e=>Z({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2})))}var Tu={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=Cu(1,t.line.strokeWidth);return{show:n.line.show,x1:Cu(0,t.line.strokeWidth),y1:r,x2:Cu(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=wu(n,this),this.state.minor=ku(r,this)},render(){return[...Nu([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>Z({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge"})))),...Nu(this.state.major.map((e=>e.guideLine))),...Nu(this.state.minor.map((e=>e.guideLine)))];var e}};function Ou(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function Ru(e){return e.qTags.indexOf("$qualified")>-1}function Au({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const o=r+1,i=e[r],a=e[o];Ou(i,a)?(Ru(a)?(t.push(o),n.push(r)):(t.push(r),n.push(o)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function Lu({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,o=NaN,i=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(o=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){i="auto",s=!0;break}if(e&&e.queries.inner(n)){i=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(o)&&Number.isNaN(i)&&"auto"!==i){i=o,o=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(o)&&(o="auto",i="auto");return{outer:o,inner:i,minor:a,isDayOrShorter:s}}}}function Iu({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const o=n;return{isDayOrShorter:()=>(o.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,o.isDayOrShorter),count:()=>e.length,maxRange:()=>(o.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,o.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),o.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(""+e.qText).width+16}))),r.clamp(n),o.rangeAndWidth}}}function Pu({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function Du({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:o,scale:i},{attributesFactory:a=Iu,queryFactory:s=Pu}={attributesFactory:Iu,queryFactory:Pu}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:i});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:o})}}(e,t))),c=e.map((e=>l[e])),u=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function qu({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:o},{metaFactory:i=Du,mapper:a=Au,resolver:s=Lu}={metaFactory:Du,mapper:Au,resolver:Lu}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=i({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:o}),p=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const o=p.resolve(t);return n.set(r,o),o}}}function zu(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const Bu=zu(0).getTime();function $u(e){return(e.getTime()-Bu)/86400/1e3}var Fu=new Date,Hu=new Date;function ju(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=function(t){return e(t=new Date(+t)),t},o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return ju((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return Fu.setTime(+t),Hu.setTime(+r),e(Fu),e(Hu),Math.floor(n(Fu,Hu))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var Vu=ju((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Vu.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ju((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Vu:null},Vu.range;var Wu=1e3,_u=6e4,Uu=36e5,Yu=864e5,Gu=6048e5,Ku=ju((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*Wu)}),(function(e,t){return(t-e)/Wu}),(function(e){return e.getUTCSeconds()}));function Xu(e){return ju((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_u)/Gu}))}Ku.range,ju((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wu)}),(function(e,t){e.setTime(+e+t*_u)}),(function(e,t){return(t-e)/_u}),(function(e){return e.getMinutes()})).range,ju((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wu-e.getMinutes()*_u)}),(function(e,t){e.setTime(+e+t*Uu)}),(function(e,t){return(t-e)/Uu}),(function(e){return e.getHours()})).range,ju((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_u)/Yu}),(function(e){return e.getDate()-1})).range;var Ju=Xu(0),Zu=Xu(1),Qu=Xu(2),ed=Xu(3),td=Xu(4),nd=Xu(5),rd=Xu(6);Ju.range,Zu.range,Qu.range,ed.range,td.range,nd.range,rd.range,ju((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})).range;var od=ju((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));od.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ju((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},od.range;var id=ju((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*_u)}),(function(e,t){return(t-e)/_u}),(function(e){return e.getUTCMinutes()}));id.range;var ad=ju((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Uu)}),(function(e,t){return(t-e)/Uu}),(function(e){return e.getUTCHours()}));ad.range;var sd=ju((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Yu}),(function(e){return e.getUTCDate()-1}));function ld(e){return ju((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Gu}))}sd.range;var cd=ld(0),ud=ld(1),dd=ld(2),pd=ld(3),md=ld(4),fd=ld(5),hd=ld(6);cd.range,ud.range,dd.range,pd.range,md.range,fd.range,hd.range;var gd=ju((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));gd.range;var vd=ju((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));vd.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ju((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},vd.range;const yd=1,bd=2,xd=3,Sd=4,Ed=5,Md=6;function Cd({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:o,timeOnly:i,initialMin:a}){const[s,l]=e.domain(),c=o.key({distance:n});let u;o.get(c,1)?u=o.get(c,1):(u=function(e,t,n,r,o,i){function a(e){return vd.filter((t=>(t.getUTCFullYear()-i.getUTCFullYear())%e==0))}const s=Ku.count(e,t),l=id.count(e,t),c=ad.count(e,t),u=sd.count(e,t),d=cd.count(e,t),p=gd.count(e,t),m=vd.count(e,t),f=n/r.second.width-1,h=n/r.minute.width-1,g=n/r.date.width-1,v=n/r.year.width-1,y={type:"year",desc:"year",count:m,interval:vd.every(1),formatter:r.year.formatter,offset:e=>vd.offset(e,-1),floor:vd.floor};if(s<=f)y.type=yd,y.desc="second",y.count=s,y.interval=Ku.every(1),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-1),y.floor=Ku.floor;else if(s/2<=f)y.type=yd,y.desc="every other second",y.count=s/2,y.interval=Ku.every(2),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-2),y.floor=Ku.floor;else if(s/5<=f)y.type=yd,y.desc="every 5 second",y.count=s/5,y.interval=Ku.every(5),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-5),y.floor=Ku.floor;else if(s/15<=f)y.type=yd,y.desc="every 15 second",y.count=s/15,y.interval=Ku.every(15),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-15),y.floor=Ku.floor;else if(s/30<=f)y.type=yd,y.desc="every 30 second",y.count=s/30,y.interval=Ku.every(30),y.formatter=r.second.formatter,y.offset=e=>Ku.offset(e,-30),y.floor=Ku.floor;else if(l<=h)y.type=bd,y.desc="minute",y.count=l,y.interval=id.every(1),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-1),y.floor=id.floor;else if(l/2<=h)y.type=bd,y.desc="every 2 minute",y.count=l/2,y.interval=id.every(2),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-2),y.floor=id.floor;else if(l/5<=h)y.type=bd,y.desc="every 5 minute",y.count=l/5,y.interval=id.every(5),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-5),y.floor=id.floor;else if(l/10<=h)y.type=bd,y.desc="every 10 minute",y.count=l/10,y.interval=id.every(10),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-10),y.floor=id.floor;else if(l/15<=h)y.type=bd,y.desc="every 15 minute",y.count=l/15,y.interval=id.every(15),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-15),y.floor=id.floor;else if(l/30<=h)y.type=bd,y.desc="every 30 minute",y.count=l/30,y.interval=id.every(30),y.formatter=r.minute.formatter,y.offset=e=>id.offset(e,-30),y.floor=id.floor;else if(c<=h)y.type=xd,y.desc="hour",y.count=c,y.interval=ad.every(1),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-1),y.floor=ad.floor;else if(c/2<=h)y.type=xd,y.desc="every 2 hour",y.count=c/2,y.interval=ad.every(2),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-2),y.floor=ad.floor;else if(c/3<=h)y.type=xd,y.desc="every 3 hour",y.count=c/3,y.interval=ad.every(3),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-3),y.floor=ad.floor;else if(c/6<=h)y.type=xd,y.desc="every 6 hour",y.count=c/6,y.interval=ad.every(6),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-6),y.floor=ad.floor;else if(c/12<=h||o)y.type=xd,y.desc="every 12 hour",y.count=c/12,y.interval=ad.every(12),y.formatter=r.minute.formatter,y.offset=e=>ad.offset(e,-12),y.floor=ad.floor;else if(u<=g)y.type=Sd,y.desc="day",y.count=u,y.interval=sd.every(1),y.formatter=r.date.formatter,y.offset=e=>sd.offset(e,-1),y.floor=sd.floor;else if(u/2<=g)y.type=Sd,y.desc="every 2 day",y.count=u/2,y.interval=sd.every(2),y.formatter=r.date.formatter,y.offset=e=>sd.offset(e,-2),y.floor=sd.floor;else if(u/3<=g)y.type=Sd,y.desc="every 3 day",y.count=u/3,y.interval=sd.every(3),y.formatter=r.date.formatter,y.offset=e=>sd.offset(e,-3),y.floor=sd.floor;else if(d<=g)y.type=Sd,y.desc="week",y.count=d,y.interval=cd.every(1),y.formatter=r.date.formatter,y.offset=e=>cd.offset(e,-1),y.floor=sd.floor;else if(d/2<=g)y.type=Sd,y.desc="every 2 week",y.count=d/2,y.interval=cd.every(2),y.formatter=r.date.formatter,y.offset=e=>cd.offset(e,-2),y.floor=sd.floor;else if(p<=g)y.type=Ed,y.desc="month",y.count=p,y.interval=gd.every(1),y.formatter=r.date.formatter,y.offset=e=>gd.offset(e,-1),y.floor=sd.floor;else if(p/3<=g)y.type=Ed,y.desc="quarter",y.count=p/3,y.interval=gd.every(3),y.formatter=r.date.formatter,y.offset=e=>gd.offset(e,-3),y.floor=sd.floor;else if(p/6<=g)y.type=Ed,y.desc="half year",y.count=p/6,y.interval=gd.every(6),y.formatter=r.date.formatter,y.offset=e=>gd.offset(e,-6),y.floor=sd.floor;else if(m<=v)y.type=Md,y.desc="year",y.count=m,y.interval=vd.every(1),y.formatter=r.year.formatter,y.offset=e=>vd.offset(e,-1),y.floor=vd.floor;else if(m/2<=v)y.type=Md,y.desc="every 2 year",y.count=m/2,y.interval=a(2),y.formatter=r.year.formatter,y.offset=e=>vd.offset(e,-2),y.floor=vd.floor;else if(m/5<=v)y.type=Md,y.desc="every 5 year",y.count=m/5,y.interval=a(5),y.formatter=r.year.formatter,y.offset=e=>vd.offset(e,-5),y.floor=vd.floor;else if(m/10<=v)y.type=Md,y.desc="every 10 year",y.count=m/10,y.interval=a(10),y.formatter=r.year.formatter,y.offset=e=>vd.offset(e,-10),y.floor=vd.floor;else{const e=Math.floor(m/v);y.type=Md,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=r.year.formatter,y.offset=t=>vd.offset(t,-e),y.floor=vd.floor}return y}(s,l,n,t.all(),r,a),o.set(c,u,1));const d=e.ticks(u.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(u.offset(d[0])):d.push(u.floor(s));const p=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}}));let m=[];if(!i&&u.type<=xd){const n=t.getFormat("date"),r=e.ticks(sd.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(sd.offset(r[0],-1)),m=(r.length?r:[sd.floor(s)]).map(((e,t,r)=>{const o=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+o),formatter:n.formatter}}))}return{inner:p,outer:m}}const wd=86400,kd=1440,Nd={};function Td(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Od(e,t,n){const{generator:r,anchor:o,clamp:i,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(i);const[l,c]=e.domain(),u=function(){return Dt.apply(zi(uo,co,no,eo,Qr,Zr,Hr,Dr,go).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([zu(l),zu(c)]);u.clamp(i),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let p;p="d3"===d.type?(e,o)=>Cd({timeScale:u,labels:n,distance:e,isDayOrShorter:o,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:zu(r.initialMin)}):e=>function(e,t,n,r,o,i=!1){if(Nd[[t,n,r,r,i]])return Nd[[t,n,r,r,i]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=zu(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,p=t/(o-r),m=p/1440,f=p/wd,h=366*p,g=3*p*30,v=a.second.width/f,y=a.minute.width/m,b=a.date.width/g,x=a.year.width/h;let S,E,M,C=0,w=0,k=null,N=null,T=null,O=null,R=null,A=null;const L={outer:[],inner:[]};for(v<1?(k=1,w=1/wd):v<2?(k=2,w=1/wd*2):v<5?(k=5,w=1/wd*5):v<10?(k=10,w=1/wd*10):v<30?(k=30,w=1/wd*30):y<1?(N=1,w=1/kd):y<2?(N=2,w=1/kd*2):y<5?(N=5,w=1/kd*5):y<10?(N=10,w=.006944444444444445):y<30?(N=30,w=.020833333333333336):y<60?(T=1,w=1/24):y<120?(T=2,w=2/24):y<360?(T=6,w=.25):y<720?(T=12,w=.5):b<1/90?(w=1,O=1):b<2/90?(w=2,O=2):b<7/90?(w=7,O=7):b<31/90?(R=1,w=31):b<1?(R=3,w=90):x<1?(A=1,w=366):x<2?(A=2,w=732):x<5?(A=5,w=1826.25):(A=10,w=3652.5),E=Math.floor((d+n%1)/w);C<o;){M=E+1,S=A?Td("year",[l+E*A,0,1],[l+M*A,0,1],a.year.formatter):R?Td("month",[l,c+E*R,1],[l,c+M*R,1],a.date.formatter):O?Td("day",[l,c,u+E*O],[l,c,u+M*O],a.date.formatter):T?Td("hour",[l,c,u,0+E*T],[l,c,u,0+M*T],a.minute.formatter):N?Td("minute",[l,c,u,0,0+E*N],[l,c,u,0,0+M*N],a.minute.formatter):Td("second",[l,c,u,0,0,0+E*k],[l,c,u,0,0,0+M*k],a.second.formatter),C=$u(S.start),L.inner.push(S);const e=Math.floor(C);if(!(i||A||R||O)){const t={type:"day",start:zu(e),end:zu(e+1),formatter:a.date.formatter,qStart:e};L.outer[L.outer.length-1]&&L.outer[L.outer.length-1].qStart===t.qStart||L.outer.push(t)}E++}return L.min=r,L.max=o,Nd[[t,n,r,r,i]]=L,L}(n,e,d.min,l,c,"T"===s.qType);const m={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===o?t.qStart:"end"===o?t.qEnd:(t.qStart+t.qEnd)/2;const i=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(i),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>p(t,n)[a].map((t=>{let n;return n="start"===o?$u(t.start):"end"===o?$u(t.end):($u(t.start)+$u(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:$u(t.start),end:$u(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return m}const Rd=/t+/i;const Ad={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function Ld(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const Id="continuousPan";var Pd={model:function({model:e,layoutService:t,dataProcessorModel:n=Eu,viewCache:r,viewState:o,definitionPath:i},a={}){const{engineFetcherFactory:s=du,snapshotFetcherFactory:l=mu,cacheFetcherFactory:c=pu,cache:u={initial:{},merged:{}}}=a,d=s({model:e,layoutService:t,definitionPath:i}),p=l({layoutService:t,viewCache:r}),m=c({cache:u}),f=e=>{throw e.isHandled=!0,e};let h,g,v;return{update(e){var n,i;({initialMin:g,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),r.set("continuousMin",g),r.set("continuousMax",v),r.set("minimiumZoomSpan",(n=g,i=v,Math.max(1e-6,2.3841857910156157e-7*(i-n)))),h=t.meta.isSnapshot?p:d,t.meta.isSnapshot&&({zoom:{min:g,max:v}}=p.getSnapshotData()),o.preventSet("zoom",{min:g,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return h.fetch(g,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=gu(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return n.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),u.initial=t,u.merged=t,e})).then((e=>vu(g,v,e))).then((e=>this.updateLayout(e))).catch(f)},fetch:(e,t)=>h.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,o=[],i=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?o.push(e[t]):a.qNum>r&&i.push(e[t])}return[...o,...t,...i]}(e.qMatrix,t.qDataPages[n].qMatrix),o=gu(e.qArea,r);return{...e,qArea:o,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),o=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,i=e.qAxis.length;t<i;t++){const i=e.qAxis[t],a=n.indexOf(i.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=i.qTicks.length;n<r;n++){const r=i.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}o[a].qTicks=[...s,...o[a].qTicks,...l]}}return{qAxis:o}}(e.qAxisData,t.qAxisData)),n}(u.initial,e))).then((e=>(n.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),u.merged=e,e))).then((n=>vu(e,t,n))).catch(f),fetchFromCache:(e,t)=>m.fetch(e,t).then((n=>vu(e,t,n))),fetchMinMaxData:()=>Promise.resolve(u.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return Z({},e,{...u.initial})},getInitialLayout(){const e=this.getInitialCube();return Z({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Su(u.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e;t.qDataPages=u.merged.qDataPages,t.qAxisData=u.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function o(e,n,o){return r[e](n,o).then((e=>(r.updateLayout(e),t(),e)))}const i=C(((e,t)=>o("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):o("fetchFromCache",e,t).then((n=>(i(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(o,i)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(o.max-o.min)<r?i:{min:Math.min(o.max,Math.max(t,o.min)),max:Math.max(o.min,Math.min(n,o.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:o=!1,targetKey:i}){const a=e.get("continuousMin"),s=e.get("continuousMax");return w(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===i))[0])(e);if(l){const i=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),c=o?1-i:i,{min:u,max:d}=t.get("zoom"),p=Math.abs(d-u),m=p-(r>0?bu:yu)*p,f=u+m*c,h=d-m*(1-c),g=f<a?a-f:0,v=h>s?h-s:0;t.set("zoom",{min:Math.max(f-v,a),max:Math.min(h+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:o}){return{type:"Pan",key:"continuous:pan",options:{event:Id,pointers:1,threshold:10,enable(r,o){return this.started===Id||!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=Id;const{min:o,max:i}=r.get("zoom");this[Id]={min:o,max:i,size:t.component(e).rect.computedInner.width,span:i-o}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:i,size:a}=this[Id],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,o.get("continuousMax")-t),max:Math.max(i+s*t,o.get("continuousMin")+t)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Mu,timeAxis:Tu},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((o=>{const i=e[o],a=typeof i;"function"===a?r[o]=i(n):"object"!==a||Array.isArray(i)?r[o]="undefined"===a?t[o]:i:r[o]=Z(!0,{},t[o],i)})),r}(t,Ad,n),{qAxis:o}=r,i=Ar(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,o);let c,u,d=[];const p=function(e){return Number.isNaN(+e)?NaN:i(e)};p.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),i=n[r.ticks.level];if(Number.isNaN(+i)||(d=u.transform(o[i].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(o[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===i&&(d=u.generate(e,n.isDayOrShorter)),d},p.invert=e=>i.invert(e),p.domain=e=>Array.isArray(e)?i.domain(e):i.domain(),p.range=e=>Array.isArray(e)?i.range(e):i.range(),p.norm=e=>(Ld(a,p),a.instance(e)),p.normInvert=e=>(Ld(a,p),a.instance.invert(e)),p.copy=()=>e(t,n),p.clamp=(e=!0)=>(i.clamp(e),i.clamp()),p.min=()=>Math.min(s,l),p.max=()=>Math.max(s,l),i.range(r.invert?[1,0]:[0,1]),i.domain([s,l]),a.invert=r.invert;const m=function(e){const t={},{measureText:n,fn:r,localeInfo:o}=e.formatter,i={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return o&&Rd.test(o.qTimestampFmt)&&(i.minute.pattern+=" tt",i.second.pattern+=" tt"),i.date.pattern=o&&o.qDateFmt?o.qDateFmt:i.date.pattern,Object.keys(i).forEach((e=>{i[e].formatter=r(i[e].pattern),i[e].width=Math.max(i[e].width,n(i[e].formatter(41000.2343433)).width+16)})),t.getFormat=e=>i[e],t.all=()=>i,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return i.date;const r=zu(t[0].data.start),o=zu(t[n-1].data.start);return sd.count(r,o)/n>=1?i.date:ad.count(r,o)/n>0?i.minute:id.count(r,o)/n>0?i.second:i.date},t}(r);return u=Od(i.copy(),r,m),c=qu({qAxis:o,measureText:r.formatter.measureText,reqAutoFitWidth:2*m.getFormat("minute").width,cache:r.cache,scale:p}),p.data=()=>({fields:[{formatter:p.formatter,id:()=>"qHyperCube/"+r.field,key:()=>r.field,raw:E(n,"fields.0.raw",(()=>({})))}]}),p.formatter=()=>m.getFormatFromTicks(d).formatter,p}}};const Dd=e=>e.meta.seriesComponentKeys[0],{event:{onZoom:qd}}=Pd;function zd({chart:e,models:t,actions:n,viewState:r,viewCache:o,environment:i}){const{layoutService:a,seriesModel:s}=t,l=Dd(s),c=a.meta.isContinuous?qd({chart:e,viewState:r,viewCache:o},{rtl:"rtl"===i.options.direction,threshold:50,targetKey:l}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},o=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=o.filter((e=>e.key===_a.COMPONENT.LEGEND_CATEGORICAL));((e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}})(t,e)}if(n.scroll.enabled()){const[e]=o.filter((e=>e.key===l));e&&(c(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const Bd="continuousPinchZoom";const $d=Pd.interactions.areaPan;function Fd({chart:e,models:t,environment:n,viewState:r,viewCache:o,actions:i,selectables:a}){const{layoutService:s,dockService:l,discreteModel:c,colorService:u,tooltipService:d}=t,p="rtl"===n.options.direction,m=d.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return{gestures:[...Ls({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})],native:Is({componentKey:e,chart:t,actions:n,layoutService:i})}}({componentKey:"scrollbar",chart:e,actions:i,viewState:r,viewCache:o,discrete:c,layoutService:s,dockService:l,rtl:p}),h={type:"hammer",enable:!0,gestures:[...u.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures,...m.gestures]},g=[zd({chart:e,models:t,actions:i,viewState:r,viewCache:o,environment:n}),f.native,m.native];return s.meta.isDiscrete&&(h.gestures.push(...c.interactions.gestures),g.push(c.interactions.native)),s.meta.isContinuous&&h.gestures.push($d({targetKey:Dd(t.seriesModel),chart:e,actions:i,viewState:r,viewCache:o}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:o,rtl:i}){const a={last:0,diff:0},s=Pd.event.onZoom({viewCache:o,viewState:r,chart:t},{threshold:100,rtl:i,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:Bd,pointers:2,threshold:0,enable:(r,o)=>!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))},events:{[Bd+"start"](e){a.last=e.scale,e.preventDefault()},[Bd+"move"](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:Dd(t.seriesModel),chart:e,actions:i,viewState:r,viewCache:o,rtl:p})),[h,...g]}const Hd="lasso",jd=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},o)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:Hd,enable(e,n){if(this.started===Hd||!n)return!0;if(!o.actions.select.enabled()||!o.actions.lasso.enabled()||!o.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==Hd&&(o.actions.select.emit("start",Hd),this.chart.component(e).emit("lassoStart",t),this.started=Hd)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),o.actions.select.emit("end",Hd)}}});const Vd=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:o="tap"},i)=>{let a;const s=i.customTooltipModel?i.customTooltipModel.utils:void 0,l=s?i.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:o,interval:10,pointers:1,enable(t,n){return!n||!(!i.actions.select.enabled()&&!i.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[o](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,o;return e.center?(({x:r}=e.center),({y:o}=e.center)):(r=e.clientX,o=e.clientY),{x:r-n.left,y:o-n.top}}(t,this.chart),c=i.hitRadius?i.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=i.shapesAt?i.shapesAt(u):this.chart.shapesAt(u,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),p=this.chart.component("tooltip"),m="mouse"!==t.pointerType&&p&&p.show;if(!i.isLocked(a)&&!i.tooltipOnly&&i.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1,i.actions.select.emit("start",o,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),i.actions.select.emit("end",o)}}if(p&&i.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=i;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,p,{nodes:n,opts:i,customTooltipModel:e})}else p.emit("show",t,{nodes:d})}else m&&p.emit("hide")}}}};const Wd=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},o)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!o.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const _d=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:o},i,a)=>({key:"event:"+t,type:"Pan",requireFailure:r,recognizeWith:o,options:{event:e,enable(r,o){if(this.started===e||!o)return!0;if(!i.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:o.center.x,y:o.center.y}).filter((e=>-1!==n.indexOf(e.key)));return 0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(t+"-"))}(o,t)?(this.started=e,!0):a.length>0}},events:{[e+"start"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),i.actions.select.emit("start",e),this.chart.component(t).emit(a+"Start",n),this.started=e},[e+"move"](e){e.preventDefault(),this.chart.component(t).emit(a+"Move",e)},[e+"end"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(a+"End",n),i.actions.select.emit("end",e),this.started=!1}}});function Ud(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:o,targetFillSelector:i,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:p}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>"@"+e)).join(",")},on:p?{bubbleEnd(){p()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:o,fillSelector:i,fill:"rgba(82,204,82,0.2)"}}}}(e),r=_d(e,t,"range");return{interactions:[e.onEdited?Wd(e,t):null,r].filter(Boolean),components:[n]}}const Yd=/axis|legend/;function Gd({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:o,flags:i}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1);return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[Vd(e,t)],components:[]}}({targets:[`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`,...n.query.series(Ua.MARKER).map((e=>Ol(_a.COMPONENT.MARKER,e))),...n.query.series(Ua.LINE).map((e=>Ol(_a.COMPONENT.POINT,e))),_a.COMPONENT.AXIS.MAJOR,_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER,_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS,_a.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,o={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[_a.COMPONENT.AXIS.MAJOR,_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER,_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS,_a.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(o.data=["selectionDimension"]),[o]}},{actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?o.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>(e=>e.some((e=>Yd.test(e.type))))(e)?0:3,debouncer:C,flags:i})}function Kd({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:o}=t,{isDiscrete:i,isDimensionLocked:a}=n.meta;if(!i||a)return!1;const s=[...o.meta.seriesComponentKeys,_a.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:o,dock:i}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>"@"+e)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"inside"},target:{components:o,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[_d(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[_a.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const Xd={components:[],interactions:[]};function Jd({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:o,layoutService:i}=t;return!(i.meta.isDimensionLocked||i.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&Ud({eventName:"minorRange",key:"minor-range-brush",targets:[_a.COMPONENT.AXIS.MINOR.PRIMARY,`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,...o.query.series(Ua.MARKER).filter((e=>e.isPrimary)).map((e=>Ol(_a.COMPONENT.MARKER,e))),...o.query.series(Ua.LINE).filter((e=>e.isPrimary)).map((e=>Ol(_a.COMPONENT.POINT,e)))],fillTargets:[_a.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:_a.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Xd,i=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:o,layoutService:i}=t;return!(i.meta.isDimensionLocked||i.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&Ud({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[_a.COMPONENT.AXIS.MINOR.SECONDARY,`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`,...o.query.series(Ua.MARKER).filter((e=>!e.isPrimary)).map((e=>Ol(_a.COMPONENT.MARKER,e))),...o.query.series(Ua.LINE).filter((e=>!e.isPrimary)).map((e=>Ol(_a.COMPONENT.POINT,e)))],fillTargets:[_a.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:_a.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Xd,a=Kd({actions:e,models:n})||Xd,s=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:o,seriesModel:i}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[_a.COMPONENT.AXIS_OVERLAY.TIME_INNER,_a.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[_a.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return Ud({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${_a.COMPONENT.BAR}-${Ya.PRIMARY}`,`${_a.COMPONENT.BAR}-${Ya.SECONDARY}`,...i.query.series(Ua.MARKER).map((e=>Ol(_a.COMPONENT.MARKER,e))),...i.query.series(Ua.LINE).map((e=>Ol(_a.COMPONENT.POINT,e))),...l],fillTargets:l,dock:o.meta.major.dock,scale:s?_a.SCALE.MAJOR_INNER:_a.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const o=s?r.formatter():t.formatter(_a.FORMATTER.PRIMARY),i=t.scale(_a.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===i;return`${e!==Math.max(...n)||a?"":"<"}${o(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||Xd,l=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[o]=n.custom.legendComponents(),i=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!o)return!1;const s=_a.SCALE.COLOR+"Range",{type:l,key:c}=o,u=i[s];return!("legend-seq"!==l||!u||u.min>=u.max)&&Ud({eventName:"legendRange",key:"legend-range-brush",targets:[c],fillTargets:[c],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:o.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||Xd;return{components:[...o.components,...i.components,...a.components,...s.components,...l.components],interactions:[...o.interactions,...i.interactions,...a.interactions,...s.interactions,...l.interactions]}}function Zd({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:o}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=(({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}))(n);return{interactions:[jd(n,t)],components:[r]}}({key:"lasso",componentTargetKey:o[0],components:o.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function Qd({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a,isUnsupportedFeature:s}){const{colorService:l,pluginService:c}=n,u=n.layoutService.getLayout(),{options:d}=r,p=function(e,t){return{layoutModes:oe.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}(0,{logicalSize:function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:u,options:d}),minCenterRatio:0}),m=function({chart:e,models:t,environment:n,viewState:r,viewCache:o,actions:i}){var a;const{colorService:s,layoutService:l,dockService:c,tooltipService:u}=t,d=iu({environment:n,models:t});return"center"===(null==d||null===(a=d.layout)||void 0===a?void 0:a.dock)?[d]:[..._c({models:t}),...gl({models:t}),...Bc({chart:e,models:t,environment:n,viewState:r,viewCache:o}),lu({models:t,environment:n}),...El({models:t,environment:n}),...Kc({models:t,environment:n,actions:i}),Hi({viewState:r,viewCache:o,layoutService:l,dockService:c}),...tu({models:t}),...nu({chart:e,models:t,environment:n}),Xc({models:t,environment:n,viewState:r,viewCache:o}),...s.custom.legendComponents(),au(t),...eu({chart:e,models:t,viewState:r,viewCache:o,environment:n}),...u.getComponents(),d].filter(Boolean)}({chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a}),f=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:o}=n,i=o.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=Gd({actions:e,models:n});if(i)return{components:[...a.components],gestures:[...a.interactions]};const s=Jd({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=Zd({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:a,chart:t,models:n,isUnsupportedFeature:s}),h=c.extendComponents([...m,...f.components]);return{collections:tl({models:n}),scales:ml({picasso:e,models:n,viewState:o,viewCache:i,environment:r}),components:h,formatters:cu({models:n}),interactions:Fd({chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a,selectables:f}),strategy:p,palettes:l.getPalettes()}}const ep=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:_a.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),tp=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:_a.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],{event:{onZoomIntercept:np,onZoomChange:rp}}=Pd,op=[_a.COMPONENT.AXIS_TITLE.MAJOR,_a.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,_a.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,_a.COMPONENT.GRID_LINE,_a.COMPONENT.ZERO_LINE];var ip={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function ap(e){return ip[e]||e}function sp(e){return function(t,n,r){var o,i,a,s,l=[],c=!0;function u(){"function"==typeof o.enable&&(o.enable=o.enable.bind(i)()),o.enable&&(o.gestures.forEach((function(t){t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(i));var n=ap(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),(a=a||new e.Manager(r)).add(new e[n](t.options)),Object.keys(t.events).forEach((function(e){t.events[e]=t.events[e].bind(i),a.on(e,t.events[e])})),l.push(t))})),o.gestures.forEach((function(t){var n=ap(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((function(e){return""!==e}))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((function(e){return""!==e}))))})))}function d(){l.forEach((function(e){Object.keys(e.events).forEach((function(t){a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set:function(e){!function(e){s=e.key,i={chart:t,mediator:n,settings:o=e},o.gestures=o.gestures||[],void 0===o.enable&&(o.enable=!0)}(e),d(),c&&u()},off:function(){c=!1,d()},on:function(){c=!0,0===l.length&&u()},destroy:function(){d(),a&&a.destroy(),a=null,i=null,o=null}}}}function lp(){return(lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var cp={exports:{}};function up(){}function dp(){}dp.resetWarningCache=up;cp.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:dp,resetWarningCache:up};return n.PropTypes=n,n}();var pp={black:"#000",white:"#fff"},mp="#e57373",fp="#f44336",hp="#d32f2f",gp="#ff4081",vp="#f50057",yp="#c51162",bp="#7986cb",xp="#3f51b5",Sp="#303f9f",Ep={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};function Mp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function Cp(e){if(e.type)return e;if("#"===e.charAt(0))return Cp(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function wp(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function kp(e){var t="hsl"===(e=Cp(e)).type?Cp(function(e){var t=(e=Cp(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),wp({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Np(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return kp(e)>.5?Op(e,t):Rp(e,t)}function Tp(e,t){return e=Cp(e),t=Mp(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,wp(e)}function Op(e,t){if(e=Cp(e),t=Mp(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return wp(e)}function Rp(e,t){if(e=Cp(e),t=Mp(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return wp(e)}function Ap(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lp(){return(Lp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ip(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Pp(){return(Pp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Dp(e){return(Dp="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})(e)}function qp(e){return(qp="function"==typeof Symbol&&"symbol"===Dp(Symbol.iterator)?function(e){return Dp(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Dp(e)})(e)}function zp(e){return e&&"object"===qp(e)&&!Array.isArray(e)}function Bp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Pp({},e):e;return zp(e)&&zp(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(zp(t[o])&&o in e?r[o]=Bp(e[o],t[o],n):r[o]=t[o])})),r}(cp.exports.element,function(){return null}).isRequired=(cp.exports.element.isRequired,function(){return null});var $p={exports:{}},Fp={};
8
8
  /** @license React v16.11.0
9
9
  * react-is.production.min.js
10
10
  *
@@ -44,4 +44,4 @@ Object.defineProperty(Fp,"__esModule",{value:!0});var Hp="function"==typeof Symb
44
44
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
45
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
46
46
  * SOFTWARE.
47
- */var CE=EE&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),ME))}};function wE(e){return e&&"[object Function]"==={}.toString.call(e)}function kE(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function NE(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function TE(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=kE(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:TE(NE(e))}function OE(e){return e&&e.referenceNode?e.referenceNode:e}var RE=EE&&!(!window.MSInputMethodContext||!document.documentMode),AE=EE&&/MSIE 10/.test(navigator.userAgent);function LE(e){return 11===e?RE:10===e?AE:RE||AE}function IE(e){if(!e)return document.documentElement;for(var t=LE(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===kE(n,"position")?IE(n):n:e?e.ownerDocument.documentElement:document.documentElement}function PE(e){return null!==e.parentNode?PE(e.parentNode):e}function DE(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,s,l=i.commonAncestorContainer;if(e!==l&&t!==l||r.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&IE(a.firstElementChild)!==a?IE(l):l;var c=PE(e);return c.host?DE(c.host,t):DE(e,PE(t).host)}function qE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function zE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=qE(t,"top"),o=qE(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function BE(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function $E(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],LE(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function FE(e){var t=e.body,n=e.documentElement,r=LE(10)&&getComputedStyle(n);return{height:$E("Height",t,n,r),width:$E("Width",t,n,r)}}var HE=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},jE=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),VE=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},WE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function _E(e){return WE({},e,{right:e.left+e.width,bottom:e.top+e.height})}function UE(e){var t={};try{if(LE(10)){t=e.getBoundingClientRect();var n=qE(e,"top"),r=qE(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?FE(e.ownerDocument):{},a=i.width||e.clientWidth||o.width,s=i.height||e.clientHeight||o.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=kE(e);l-=BE(u,"x"),c-=BE(u,"y"),o.width-=l,o.height-=c}return _E(o)}function YE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=LE(10),o="HTML"===t.nodeName,i=UE(e),a=UE(t),s=TE(e),l=kE(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=_E({top:i.top-a.top-c,left:i.left-a.left-u,width:i.width,height:i.height});if(d.marginTop=0,d.marginLeft=0,!r&&o){var p=parseFloat(l.marginTop,10),m=parseFloat(l.marginLeft,10);d.top-=c-p,d.bottom-=c-p,d.left-=u-m,d.right-=u-m,d.marginTop=p,d.marginLeft=m}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=zE(d,t)),d}function GE(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=YE(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:qE(n),s=t?0:qE(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return _E(l)}function KE(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===kE(e,"position"))return!0;var n=NE(e);return!!n&&KE(n)}function XE(e){if(!e||!e.parentElement||LE())return document.documentElement;for(var t=e.parentElement;t&&"none"===kE(t,"transform");)t=t.parentElement;return t||document.documentElement}function JE(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?XE(e):DE(e,OE(t));if("viewport"===r)i=GE(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=TE(NE(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=YE(s,a,o);if("HTML"!==s.nodeName||KE(a))i=l;else{var c=FE(e.ownerDocument),u=c.height,d=c.width;i.top+=l.top-l.marginTop,i.bottom=u+l.top,i.left+=l.left-l.marginLeft,i.right=d+l.left}}var p="number"==typeof(n=n||0);return i.left+=p?n:n.left||0,i.top+=p?n:n.top||0,i.right-=p?n:n.right||0,i.bottom-=p?n:n.bottom||0,i}function ZE(e){return e.width*e.height}function QE(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=JE(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return WE({key:e},s[e],{area:ZE(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function eM(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?XE(t):DE(t,OE(n));return YE(n,o,r)}function tM(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function nM(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function rM(e,t,n){n=n.split("-")[0];var r=tM(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",l=i?"height":"width",c=i?"width":"height";return o[a]=t[a]+t[l]/2-r[l]/2,o[s]=n===s?t[s]-r[c]:t[nM(s)],o}function oM(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function iM(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=oM(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&wE(n)&&(t.offsets.popper=_E(t.offsets.popper),t.offsets.reference=_E(t.offsets.reference),t=n(t,e))})),t}function aM(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=eM(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=QE(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=rM(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=iM(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function sM(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function lM(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],i=o?""+o+n:e;if(void 0!==document.body.style[i])return i}return null}function cM(){return this.state.isDestroyed=!0,sM(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[lM("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function uM(e){var t=e.ownerDocument;return t?t.defaultView:window}function dM(e,t,n,r){var o="BODY"===e.nodeName,i=o?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),o||dM(TE(i.parentNode),t,n,r),r.push(i)}function pM(e,t,n,r){n.updateBound=r,uM(e).addEventListener("resize",n.updateBound,{passive:!0});var o=TE(e);return dM(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function mM(){this.state.eventsEnabled||(this.state=pM(this.reference,this.options,this.state,this.scheduleUpdate))}function fM(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,uM(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function hM(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function gM(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&hM(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var vM=EE&&/Firefox/i.test(navigator.userAgent);function yM(e,t,n){var r=oM(e,(function(e){return e.name===t})),o=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}var bM=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],xM=bM.slice(3);function SM(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=xM.indexOf(e),r=xM.slice(n+1).concat(xM.slice(0,n));return t?r.reverse():r}var EM="flip",MM="clockwise",CM="counterclockwise";function wM(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(oM(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return _E(s)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){hM(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var kM={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:VE({},l,i[l]),end:VE({},l,i[l]+i[c]-a[c])};e.offsets.popper=WE({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],l=void 0;return l=hM(+n)?[+n,0]:wM(n,i,a,s),"left"===s?(i.top+=l[0],i.left-=l[1]):"right"===s?(i.top+=l[0],i.left+=l[1]):"top"===s?(i.left+=l[0],i.top-=l[1]):"bottom"===s&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||IE(e.instance.popper);e.instance.reference===n&&(n=IE(n));var r=lM("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var l=JE(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),VE({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),VE({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=WE({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<i(r[l])&&(e.offsets.popper[l]=i(r[l])-n[c]),n[l]>i(r[s])&&(e.offsets.popper[l]=i(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!yM(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),p=l?"left":"top",m=l?"bottom":"right",f=tM(r)[c];s[m]-f<a[d]&&(e.offsets.popper[d]-=a[d]-(s[m]-f)),s[d]+f>a[m]&&(e.offsets.popper[d]+=s[d]+f-a[m]),e.offsets.popper=_E(e.offsets.popper);var h=s[d]+s[c]/2-f/2,g=kE(e.instance.popper),v=parseFloat(g["margin"+u],10),y=parseFloat(g["border"+u+"Width"],10),b=h-e.offsets.popper[d]-v-y;return b=Math.max(Math.min(a[c]-f,b),0),e.arrowElement=r,e.offsets.arrow=(VE(n={},d,Math.round(b)),VE(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(sM(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=JE(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=nM(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case EM:a=[r,o];break;case MM:a=SM(r);break;case CM:a=SM(r,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],o=nM(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p="left"===r&&d(c.right)>d(u.left)||"right"===r&&d(c.left)<d(u.right)||"top"===r&&d(c.bottom)>d(u.top)||"bottom"===r&&d(c.top)<d(u.bottom),m=d(c.left)<d(n.left),f=d(c.right)>d(n.right),h=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),v="left"===r&&m||"right"===r&&f||"top"===r&&h||"bottom"===r&&g,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===i&&m||y&&"end"===i&&f||!y&&"start"===i&&h||!y&&"end"===i&&g),x=!!t.flipVariationsByContent&&(y&&"start"===i&&f||y&&"end"===i&&m||!y&&"start"===i&&g||!y&&"end"===i&&h),S=b||x;(p||v||S)&&(e.flipped=!0,(p||v)&&(r=a[l+1]),S&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=WE({},e.offsets.popper,rM(e.instance.popper,e.offsets.reference,e.placement)),e=iM(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=nM(t),e.offsets.popper=_E(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!yM(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=oM(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=oM(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=IE(e.instance.popper),l=UE(s),c={position:o.position},u=function(e,t){var n=e.offsets,r=n.popper,o=n.reference,i=Math.round,a=Math.floor,s=function(e){return e},l=i(o.width),c=i(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),p=t?u||d||l%2==c%2?i:a:s,m=t?i:s;return{left:p(l%2==1&&c%2==1&&!d&&t?r.left-1:r.left),top:m(r.top),bottom:m(r.bottom),right:p(r.right)}}(e,window.devicePixelRatio<2||!vM),d="bottom"===n?"top":"bottom",p="right"===r?"left":"right",m=lM("transform"),f=void 0,h=void 0;if(h="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,f="right"===p?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&m)c[m]="translate3d("+f+"px, "+h+"px, 0)",c[d]=0,c[p]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,v="right"===p?-1:1;c[d]=h*g,c[p]=f*v,c.willChange=d+", "+p}var y={"x-placement":e.placement};return e.attributes=WE({},y,e.attributes),e.styles=WE({},c,e.styles),e.arrowStyles=WE({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return gM(e.instance.popper,e.styles),function(e,t){Object.keys(t).forEach((function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)}))}(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&gM(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){var i=eM(o,t,e,n.positionFixed),a=QE(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),gM(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},NM=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};HE(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=CE(this.update.bind(this)),this.options=WE({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(WE({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=WE({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return WE({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&wE(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return jE(e,[{key:"update",value:function(){return aM.call(this)}},{key:"destroy",value:function(){return cM.call(this)}},{key:"enableEventListeners",value:function(){return mM.call(this)}},{key:"disableEventListeners",value:function(){return fM.call(this)}}]),e}();function TM(e){return"function"==typeof e?e():e}NM.Utils=("undefined"!=typeof window?window:global).PopperUtils,NM.placements=bM,NM.Defaults=kM;var OM="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,RM={},AM=B.forwardRef((function(e,t){var n=e.anchorEl,r=e.children,o=e.container,i=e.disablePortal,a=void 0!==i&&i,s=e.keepMounted,l=void 0!==s&&s,c=e.modifiers,u=e.open,d=e.placement,p=void 0===d?"bottom":d,m=e.popperOptions,f=void 0===m?RM:m,h=e.popperRef,g=e.transition,v=void 0!==g&&g,y=Ip(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),b=B.useRef(null),x=Yv(b,t),S=B.useRef(null),E=Yv(S,h),M=B.useRef(E);OM((function(){M.current=E}),[E]),B.useImperativeHandle(h,(function(){return S.current}),[]);var C=B.useState(!0),w=C[0],k=C[1],N=function(e){if("rtl"!==("undefined"!=typeof window&&document.body.getAttribute("dir")||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(p),T=B.useState(N),O=T[0],R=T[1],A=B.useCallback((function(){if(b.current&&n&&u){S.current&&(S.current.destroy(),M.current(null));var e=function(e){R(e.placement)};TM(n);var t=new NM(TM(n),b.current,Lp({placement:N},f,{modifiers:Lp({},a?{}:{preventOverflow:{boundariesElement:"window"}},{},c,{},f.modifiers),onCreate:ex(e,f.onCreate),onUpdate:ex(e,f.onUpdate)}));M.current(t)}}),[n,a,c,u,N,f]),L=B.useCallback((function(e){Uv(x,e),A()}),[x,A]),I=function(){S.current&&(S.current.destroy(),M.current(null))};if(B.useEffect((function(){A()}),[A]),B.useEffect((function(){return function(){I()}}),[]),B.useEffect((function(){u||v||I()}),[u,v]),!l&&!u&&(!v||w))return null;var P={placement:O};return v&&(P.TransitionProps={in:u,onEnter:function(){k(!1)},onExited:function(){k(!0),I()}}),B.createElement(Qb,{disablePortal:a,container:o},B.createElement("div",Lp({ref:L,role:"tooltip"},y,{style:Lp({position:"fixed",top:0,left:0},y.style)}),"function"==typeof r?r(P):r))})),LM=pb(B.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),IM=pb(B.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),PM=B.createElement(LM,null);var DM=lv((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,n=e.classes;return B.createElement("div",{className:Vg(n.root,t&&n.checked)},PM,B.createElement(IM,{className:n.layer}))})),qM=B.createContext(),zM=B.createElement(DM,{checked:!0}),BM=B.createElement(DM,null),$M=B.forwardRef((function(e,t){var n=e.checked,r=e.classes,o=e.color,i=void 0===o?"secondary":o,a=e.name,s=e.onChange,l=Ip(e,["checked","classes","color","name","onChange"]),c=B.useContext(qM),u=n,d=ex(s,c&&c.onChange),p=a;return c&&(void 0===u&&(u=c.value===e.value),void 0===p&&(p=c.name)),B.createElement(Ib,Lp({color:i,type:"radio",icon:BM,checkedIcon:zM,classes:{root:Vg(r.root,r["color".concat(cv(i))]),checked:r.checked,disabled:r.disabled},name:p,checked:u,onChange:d,ref:t},l))}));function FM(e){return(FM="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})(e)}function HM(e){return(HM="function"==typeof Symbol&&"symbol"===FM(Symbol.iterator)?function(e){return FM(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":FM(e)})(e)}function jM(e,t){return"object"===HM(t)&&null!==t?e===t:String(e)===String(t)}lv((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Tp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Tp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})($M),B.forwardRef((function(e,t){var n=e.actions,r=e.children,o=e.name,i=e.value,a=e.onChange,s=Ip(e,["actions","children","name","value","onChange"]),l=B.useRef(null),c=B.useRef(null!=i).current,u=B.useState((function(){return c?null:e.defaultValue})),d=u[0],p=u[1];B.useImperativeHandle(n,(function(){return{focus:function(){var e=l.current.querySelector("input:not(:disabled):checked");e||(e=l.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var m={name:o,onChange:function(e){c||p(e.target.value),a&&a(e,e.target.value)},value:c?i:d},f=Yv(t,l);return B.createElement(oS,Lp({role:"radiogroup",ref:f},s),B.createElement(qM.Provider,{value:m},r))})),B.Component;var VM=B.forwardRef((function(e,t){var n=e.autoFocus,r=e.autoWidth,o=e.children,i=e.classes,a=e.className,s=e.defaultValue,l=e.disabled,c=e.displayEmpty,u=e.labelId,d=e.IconComponent,p=e.inputRef,m=e.MenuProps,f=void 0===m?{}:m,h=e.multiple,g=e.name,v=e.onBlur,y=e.onChange,b=e.onClose,x=e.onFocus,S=e.onOpen,E=e.open,M=e.readOnly,C=e.renderValue;e.required;var w=e.SelectDisplayProps,k=void 0===w?{}:w,N=e.tabIndex;e.type;var T=e.value,O=e.variant,R=void 0===O?"standard":O,A=Ip(e,["autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","labelId","IconComponent","inputRef","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),L=B.useRef(null!=T).current,I=B.useState(s),P=I[0],D=I[1],q=L?T:P,z=B.useRef(null),$=B.useState(null),F=$[0],H=$[1],j=B.useRef(null!=E).current,V=B.useState(),W=V[0],_=V[1],U=B.useState(!1),Y=U[0],G=U[1],K=Yv(t,p);B.useImperativeHandle(K,(function(){return{focus:function(){F.focus()},node:z.current,value:q}}),[F,q]),B.useEffect((function(){n&&F&&F.focus()}),[n,F]);var X,J,Z=function(e,t){e?S&&S(t):(F.focus(),b&&b(t)),j||(_(r?null:F.clientWidth),G(e))},Q=function(e){return function(t){var n;if(h||Z(!1,t),h){n=Array.isArray(q)?gy(q):[];var r=q.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;L||D(n),y&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),y(t,e))}},ee=null!==F&&(j?E:Y);delete A["aria-invalid"];var te=[],ne=!1;(Yx({value:q})||c)&&(C?X=C(q):ne=!0);var re=B.Children.map(o,(function(e){if(!B.isValidElement(e))return null;var t;if(h){if(!Array.isArray(q))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=q.some((function(t){return jM(t,e.props.value)})))&&ne&&te.push(e.props.children)}else(t=jM(q,e.props.value))&&ne&&(J=e.props.children);return B.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:Q(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ne&&(X=h?te.join(", "):J);var oe,ie=W;!r&&j&&F&&(ie=F.clientWidth),oe=void 0!==N?N:l?null:0;var ae=k.id||(g?"mui-component-select-".concat(g):void 0);return B.createElement(B.Fragment,null,B.createElement("div",Lp({className:Vg(i.root,i.select,i.selectMenu,i[R],a,l&&i.disabled),ref:H,tabIndex:oe,role:"button","aria-expanded":ee?"true":void 0,"aria-labelledby":"".concat(u||""," ").concat(ae||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!M){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Z(!0,e))}},onClick:l||M?null:function(e){Z(!0,e)},onBlur:function(e){!ee&&v&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:q,name:g}}),v(e))},onFocus:x},k,{id:ae}),function(e){return null==e||"string"==typeof e&&!e.trim()}(X)?B.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):X),B.createElement("input",Lp({value:Array.isArray(q)?q.join(","):q,name:g,ref:z,type:"hidden",autoFocus:n},A)),B.createElement(d,{className:Vg(i.icon,i["icon".concat(cv(R))],ee&&i.iconOpen)}),B.createElement(cE,Lp({id:"menu-".concat(g||""),anchorEl:F,open:ee,onClose:function(e){Z(!1,e)}},f,{MenuListProps:Lp({"aria-labelledby":u,role:"listbox",disableListWrap:!0},f.MenuListProps),PaperProps:Lp({},f.PaperProps,{style:Lp({minWidth:ie},null!=f.PaperProps?f.PaperProps.style:null)})}),re))})),WM=hE,_M=B.createElement(TS,null),UM=B.createElement(Zx,null),YM=B.forwardRef((function e(t,n){var r=t.autoWidth,o=void 0!==r&&r,i=t.children,a=t.classes,s=t.displayEmpty,l=void 0!==s&&s,c=t.IconComponent,u=void 0===c?fE:c,d=t.id,p=t.input,m=t.inputProps,f=t.labelId,h=t.MenuProps,g=t.multiple,v=void 0!==g&&g,y=t.native,b=void 0!==y&&y,x=t.onClose,S=t.onOpen,E=t.open,M=t.renderValue,C=t.SelectDisplayProps,w=t.variant,k=void 0===w?"standard":w,N=t.labelWidth,T=void 0===N?0:N,O=Ip(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),R=b?mE:VM,A=Hx({props:t,muiFormControl:Ob(),states:["variant"]}).variant||k,L=p||{standard:_M,outlined:B.createElement(SE,{labelWidth:T}),filled:UM}[A];return B.cloneElement(L,Lp({inputComponent:R,select:!0,inputProps:Lp({children:i,IconComponent:u,variant:A,type:void 0,multiple:v},b?{}:{autoWidth:o,displayEmpty:l,labelId:f,MenuProps:h,onClose:x,onOpen:S,open:E,renderValue:M,SelectDisplayProps:Lp({id:d},C)},{},m,{classes:m?Sg({baseClasses:a,newClasses:m.classes,Component:e}):a},p?p.props.inputProps:{}),ref:n},O))}));YM.muiName="Select";var GM=lv(WM,{name:"MuiSelect"})(YM);var KM=lv((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Lp({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,left:"calc(-50% + -4px)",transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,r=e.className,o=e.open,i=e.value,a=e.valueLabelDisplay;return"off"===a?t:B.cloneElement(t,{className:Vg(t.props.className,(o||"on"===a)&&n.open,n.thumb)},B.createElement("span",{className:Vg(n.offset,r)},B.createElement("span",{className:n.circle},B.createElement("span",{className:n.label},i))))}));function XM(e,t){return e-t}function JM(e,t,n){return e<t?t:e>n?n:e}function ZM(e,t){return e.reduce((function(e,n,r){var o=Math.abs(t-n);return null===e||o<e.distance||o===e.distance?{distance:o,index:r}:e}),null).index}function QM(e,t){if(void 0!==t.current&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var r=e.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function eC(e,t,n){return 100*(e-t)/(n-t)}function tC(e,t){var n=Math.round(e/t)*t;return Number(n.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}(t)))}function nC(e){var t=e.values,n=e.source,r=e.newValue,o=e.index;if(t[o]===r)return n;var i=gy(t);return i[o]=r,i}function rC(e){var t=e.sliderRef,n=e.activeIndex,r=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===n||t.current.querySelector('[data-index="'.concat(n,'"]')).focus(),r&&r(n)}var oC={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},iC=[],aC=function(e){return e},sC=B.forwardRef((function(e,t){var n=e["aria-label"],r=e["aria-labelledby"],o=e["aria-valuetext"],i=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.component,u=void 0===c?"span":c,d=e.defaultValue,p=e.disabled,m=void 0!==p&&p,f=e.getAriaLabel,h=e.getAriaValueText,g=e.marks,v=void 0===g?iC:g,y=e.max,b=void 0===y?100:y,x=e.min,S=void 0===x?0:x,E=e.name,M=e.onChange,C=e.onChangeCommitted,w=e.onMouseDown,k=e.orientation,N=void 0===k?"horizontal":k,T=e.step,O=void 0===T?1:T,R=e.ThumbComponent,A=void 0===R?"span":R,L=e.track,I=void 0===L?"normal":L,P=e.value,D=e.ValueLabelComponent,q=void 0===D?KM:D,z=e.valueLabelDisplay,$=void 0===z?"off":z,F=e.valueLabelFormat,H=void 0===F?aC:F,j=Ip(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),V=sv(),W=B.useRef(null!=P).current,_=B.useRef(),U=B.useState(-1),Y=U[0],G=U[1],K=B.useState(-1),X=K[0],J=K[1],Z=B.useState(d),Q=Z[0],ee=Z[1],te=W?P:Q,ne=Array.isArray(te),re=B.useRef(),oe=ne?gy(te).sort(XM):[te];oe=oe.map((function(e){return JM(e,S,b)}));var ie=!0===v&&null!==O?gy(Array(Math.floor((b-S)/O)+1)).map((function(e,t){return{value:S+O*t}})):v;re.current={source:te};var ae=fy(),se=ae.isFocusVisible,le=ae.onBlurVisible,ce=ae.ref,ue=B.useState(-1),de=ue[0],pe=ue[1],me=B.useRef(),fe=Yv(ce,me),he=Yv(t,fe),ge=ny((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));se(e)&&pe(t),J(t)})),ve=ny((function(){-1!==de&&(pe(-1),le()),J(-1)})),ye=ny((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));J(t)})),be=ny((function(){J(-1)})),xe=ny((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),r=oe[n],o=(b-S)/10,i=ie.map((function(e){return e.value})),a=i.indexOf(r);switch(e.key){case"Home":t=S;break;case"End":t=b;break;case"PageUp":O&&(t=r+o);break;case"PageDown":O&&(t=r-o);break;case"ArrowRight":case"ArrowUp":t=O?r+O:i[a+1]||i[i.length-1];break;case"ArrowLeft":case"ArrowDown":t=O?r-O:i[a-1]||i[0];break;default:return}if(e.preventDefault(),O&&(t=tC(t,O)),t=JM(t,S,b),ne){var s=t;t=nC({values:oe,source:te,newValue:t,index:n}).sort(XM),rC({sliderRef:me,activeIndex:t.indexOf(s)})}W||ee(t),pe(n),M&&M(e,t),C&&C(e,t)})),Se=B.useRef(),Ee=N;"rtl"===V.direction&&"vertical"!==N&&(Ee+="-reverse");var Me=B.useCallback((function(e){var t,n,r=e.finger,o=e.move,i=void 0!==o&&o,a=e.values,s=e.source,l=me.current.getBoundingClientRect(),c=l.width,u=l.height,d=l.bottom,p=l.left;if(t=0===Ee.indexOf("vertical")?(d-r.y)/u:(r.x-p)/c,-1!==Ee.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,S,b),O)n=tC(n,O);else{var m=ie.map((function(e){return e.value}));n=m[ZM(m,n)]}n=JM(n,S,b);var f=0;if(ne){var h=n;f=(n=nC({values:a,source:s,newValue:n,index:f=i?Se.current:ZM(a,n)}).sort(XM)).indexOf(h),Se.current=f}return{newValue:n,activeIndex:f}}),[b,S,Ee,ne,O,ie]),Ce=ny((function(e){var t=QM(e,_);if(t){var n=Me({finger:t,move:!0,values:oe,source:te}),r=n.newValue,o=n.activeIndex;rC({sliderRef:me,activeIndex:o,setActive:G}),W||ee(r),M&&M(e,r)}})),we=ny((function(e){var t=QM(e,_);if(t){var n=Me({finger:t,values:oe,source:te}).newValue;G(-1),"touchend"===e.type&&J(-1),C&&C(e,n),_.current=void 0,document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",we),document.body.removeEventListener("mouseenter",ke),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",we)}})),ke=ny((function(e){0===e.buttons&&we(e)})),Ne=ny((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(_.current=t.identifier);var n=QM(e,_),r=Me({finger:n,values:oe,source:te}),o=r.newValue,i=r.activeIndex;rC({sliderRef:me,activeIndex:i,setActive:G}),W||ee(o),M&&M(e,o),document.body.addEventListener("touchmove",Ce),document.body.addEventListener("touchend",we)}));B.useEffect((function(){var e=me.current;return e.addEventListener("touchstart",Ne),function(){e.removeEventListener("touchstart",Ne),document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",we),document.body.removeEventListener("mouseenter",ke),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",we)}}),[ke,we,Ce,Ne]);var Te=ny((function(e){w&&w(e),e.preventDefault();var t=QM(e,_),n=Me({finger:t,values:oe,source:te}),r=n.newValue,o=n.activeIndex;rC({sliderRef:me,activeIndex:o,setActive:G}),W||ee(r),M&&M(e,r),document.body.addEventListener("mousemove",Ce),document.body.addEventListener("mouseenter",ke),document.body.addEventListener("mouseup",we)})),Oe=eC(ne?oe[0]:S,S,b),Re=eC(oe[oe.length-1],S,b)-Oe,Ae=Lp({},oC[Ee].offset(Oe),{},oC[Ee].leap(Re));return B.createElement(u,Lp({ref:he,className:Vg(i.root,i["color".concat(cv(l))],a,m&&i.disabled,ie.length>0&&ie.some((function(e){return e.label}))&&i.marked,!1===I&&i.trackFalse,{vertical:i.vertical}[N],{inverted:i.trackInverted}[I]),onMouseDown:Te},j),B.createElement("span",{className:i.rail}),B.createElement("span",{className:i.track,style:Ae}),B.createElement("input",{value:oe.join(","),name:E,type:"hidden"}),ie.map((function(e){var t,n=eC(e.value,S,b),r=oC[Ee].offset(n);if(!1===I)t=-1!==oe.indexOf(e.value);else{var o=ne?e.value>=oe[0]&&e.value<=oe[oe.length-1]:e.value<=oe[0];t=o&&"normal"===I||!o&&"inverted"===I}return B.createElement(B.Fragment,{key:e.value},B.createElement("span",{style:r,className:Vg(i.mark,t&&i.markActive)}),B.createElement("span",{"aria-hidden":!0,style:r,className:Vg(i.markLabel,t&&i.markLabelActive)},e.label))})),oe.map((function(e,t){var a=eC(e,S,b),s=oC[Ee].offset(a);return B.createElement(q,{key:t,valueLabelFormat:H,valueLabelDisplay:$,className:i.valueLabel,value:"function"==typeof H?H(e,t):H,index:t,open:X===t||Y===t||"on"===$,disabled:m},B.createElement(A,{className:Vg(i.thumb,i["thumbColor".concat(cv(l))],Y===t&&i.active,m&&i.disabled,de===t&&i.focusVisible),tabIndex:m?null:0,role:"slider",style:s,"data-index":t,"aria-label":f?f(t):n,"aria-labelledby":r,"aria-orientation":N,"aria-valuemax":b,"aria-valuemin":S,"aria-valuenow":e,"aria-valuetext":h?h(e,t):o,onKeyDown:xe,onFocus:ge,onBlur:ve,onMouseOver:ye,onMouseLeave:be}))})))}));lv((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"11px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 11px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?Rp(e.palette.primary.main,.62):Op(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',left:-18,top:-18,right:-18,bottom:-18},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Tp(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Tp(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Tp(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Tp(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:Lp({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:22,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:22,transform:"translateY(50%)"}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(sC);var lC=B.forwardRef((function(e,t){var n=e.action,r=e.classes,o=e.className,i=e.message,a=e.role,s=void 0===a?"alert":a,l=Ip(e,["action","classes","className","message","role"]);return B.createElement(dv,Lp({component:cb,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:s,square:!0,elevation:6,className:Vg(r.root,o),ref:t},l),B.createElement("div",{className:r.message},i),n?B.createElement("div",{className:r.action},n):null)})),cC=lv((function(e){var t="light"===e.palette.type?.8:.98,n=Np(e.palette.background.default,t);return{root:Ap({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(lC),uC=B.forwardRef((function(e,t){var n=e.action,r=e.anchorOrigin,o=(r=void 0===r?{vertical:"bottom",horizontal:"center"}:r).vertical,i=r.horizontal,a=e.autoHideDuration,s=e.children,l=e.classes,c=e.className,u=e.ClickAwayListenerProps,d=e.ContentProps,p=e.disableWindowBlurListener,m=void 0!==p&&p,f=e.message,h=e.onClose,g=e.onEnter,v=e.onEntered,y=e.onEntering,b=e.onExit,x=e.onExited,S=e.onExiting,E=e.onMouseEnter,M=e.onMouseLeave,C=e.open,w=e.resumeHideDuration,k=e.TransitionComponent,N=void 0===k?bS:k,T=e.transitionDuration,O=void 0===T?{enter:Mm.enteringScreen,exit:Mm.leavingScreen}:T,R=e.TransitionProps,A=Ip(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),L=B.useRef(),I=B.useState(!0),P=I[0],D=I[1],q=B.useCallback((function(e){var t=null!=e?e:a;h&&null!=t&&(clearTimeout(L.current),L.current=setTimeout((function(){h&&null!=(null!=e?e:a)&&h(null,"timeout")}),t))}),[a,h]);B.useEffect((function(){return C&&q(),function(){clearTimeout(L.current)}}),[C,q]);var z=function(){clearTimeout(L.current)},$=B.useCallback((function(){if(null!=a){if(null!=w)return void q(w);q(.5*a)}}),[a,w,q]);return B.useEffect((function(){if(!m&&C)return window.addEventListener("focus",$),window.addEventListener("blur",z),function(){window.removeEventListener("focus",$),window.removeEventListener("blur",z)}}),[m,$,C]),!C&&P?null:B.createElement(Gb,Lp({onClickAway:function(e){h&&h(e,"clickaway")}},u),B.createElement("div",Lp({className:Vg(l.root,l["anchorOrigin".concat(cv(o)).concat(cv(i))],c),onMouseEnter:function(e){E&&E(e),z()},onMouseLeave:function(e){M&&M(e),$()},ref:t},A),B.createElement(N,Lp({appear:!0,in:C,onEnter:ex((function(){D(!1)}),g),onEntered:v,onEntering:y,onExit:b,onExited:ex((function(){D(!0)}),x),onExiting:S,timeout:O,direction:"top"===o?"down":"up"},R),s||B.createElement(cC,Lp({message:f,action:n},d)))))}));lv((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},o={justifyContent:"flex-start"},i={top:24},a={bottom:24},s={right:24},l={left:24},c={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Lp({},t,Ap({},e.breakpoints.up("sm"),Lp({},i,{},c))),anchorOriginBottomCenter:Lp({},n,Ap({},e.breakpoints.up("sm"),Lp({},a,{},c))),anchorOriginTopRight:Lp({},t,{},r,Ap({},e.breakpoints.up("sm"),Lp({left:"auto"},i,{},s))),anchorOriginBottomRight:Lp({},n,{},r,Ap({},e.breakpoints.up("sm"),Lp({left:"auto"},a,{},s))),anchorOriginTopLeft:Lp({},t,{},o,Ap({},e.breakpoints.up("sm"),Lp({right:"auto"},i,{},l))),anchorOriginBottomLeft:Lp({},n,{},o,Ap({},e.breakpoints.up("sm"),Lp({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})(uC);var dC=B.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.alternativeLabel,i=e.children,a=e.classes,s=e.className,l=e.completed,c=void 0!==l&&l,u=e.connector,d=e.disabled,p=void 0!==d&&d,m=e.index,f=e.last,h=e.orientation,g=Ip(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return B.createElement("div",Lp({className:Vg(a.root,a[h],s,o&&a.alternativeLabel,c&&a.completed),ref:t},g),u&&o&&0!==m&&B.cloneElement(u,{orientation:h,alternativeLabel:o,index:m,active:r,completed:c,disabled:p}),B.Children.map(i,(function(e){return B.isValidElement(e)?B.cloneElement(e,Lp({active:r,alternativeLabel:o,completed:c,disabled:p,last:f,icon:m+1,orientation:h},e.props)):null})))}));lv({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(dC);var pC=pb(B.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),mC=pb(B.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),fC=B.createElement("circle",{cx:"12",cy:"12",r:"12"}),hC=B.forwardRef((function(e,t){var n=e.completed,r=void 0!==n&&n,o=e.icon,i=e.active,a=void 0!==i&&i,s=e.error,l=void 0!==s&&s,c=e.classes;return"number"==typeof o||"string"==typeof o?l?B.createElement(mC,{className:Vg(c.root,c.error),ref:t}):r?B.createElement(pC,{className:Vg(c.root,c.completed),ref:t}):B.createElement(db,{className:Vg(c.root,a&&c.active),ref:t},fC,B.createElement("text",{className:c.text,x:"12",y:"16",textAnchor:"middle"},o)):o})),gC=lv((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$active":{color:e.palette.primary.main},"&$completed":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(hC),vC=B.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.alternativeLabel,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.completed,u=void 0!==c&&c,d=e.disabled,p=void 0!==d&&d,m=e.error,f=void 0!==m&&m,h=e.icon;e.last;var g=e.optional,v=e.orientation,y=void 0===v?"horizontal":v,b=e.StepIconComponent,x=e.StepIconProps,S=Ip(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),E=b;return h&&!E&&(E=gC),B.createElement("span",Lp({className:Vg(s.root,s[y],l,p&&s.disabled,i&&s.alternativeLabel,f&&s.error),ref:t},S),h||E?B.createElement("span",{className:Vg(s.iconContainer,i&&s.alternativeLabel)},B.createElement(E,Lp({completed:u,active:r,error:f,icon:h},x))):null,B.createElement("span",{className:s.labelContainer},B.createElement(cb,{variant:"body2",component:"span",className:Vg(s.label,i&&s.alternativeLabel,u&&s.completed,r&&s.active,f&&s.error),display:"block"},a),g))}));vC.muiName="StepLabel";var yC=lv((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(vC),bC=B.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,o=e.children,i=e.classes,a=e.className,s=e.completed,l=e.disabled,c=e.icon;e.last;var u=e.optional,d=e.orientation,p=Ip(e,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),m={active:n,alternativeLabel:r,completed:s,disabled:l,icon:c,optional:u,orientation:d},f=Qx(o,["StepLabel"])?B.cloneElement(o,m):B.createElement(yC,m,o);return B.createElement(My,Lp({disabled:l,TouchRippleProps:{className:i.touchRipple},className:Vg(i.root,i[d],a),ref:t},p),f)}));lv({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(bC);var xC=B.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,o=void 0!==r&&r,i=e.classes,a=e.className,s=e.completed,l=e.disabled;e.index;var c=e.orientation,u=void 0===c?"horizontal":c,d=Ip(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return B.createElement("div",Lp({className:Vg(i.root,i[u],a,o&&i.alternativeLabel,n&&i.active,s&&i.completed,l&&i.disabled),ref:t},d),B.createElement("span",{className:Vg(i.line,"vertical"===u?i.lineVertical:i.lineHorizontal)}))})),SC=lv((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(xC),EC=B.forwardRef((function(e,t){var n=e.active;e.alternativeLabel;var r=e.children,o=e.classes,i=e.className;e.completed;var a=e.last;e.optional,e.orientation;var s=e.TransitionComponent,l=void 0===s?Xb:s,c=e.transitionDuration,u=void 0===c?"auto":c,d=e.TransitionProps,p=Ip(e,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),m=u;return"auto"!==u||l.muiSupportAuto||(m=void 0),B.createElement("div",Lp({className:Vg(o.root,i,a&&o.last),ref:t},p),B.createElement(l,Lp({in:n,className:o.transition,timeout:m,unmountOnExit:!0},d),r))}));lv((function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}}),{name:"MuiStepContent"})(EC);var MC=B.createElement(SC,null),CC=B.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,o=e.alternativeLabel,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.connector,u=void 0===c?MC:c,d=e.nonLinear,p=void 0!==d&&d,m=e.orientation,f=void 0===m?"horizontal":m,h=Ip(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),g=B.isValidElement(u)?B.cloneElement(u,{orientation:f}):null,v=B.Children.toArray(a),y=v.map((function(e,t){var n={alternativeLabel:i,connector:u,last:t+1===v.length,orientation:f},o={index:t,active:!1,completed:!1,disabled:!1};return r===t?o.active=!0:!p&&r>t?o.completed=!0:!p&&r<t&&(o.disabled=!0),[!i&&g&&0!==t&&B.cloneElement(g,Lp({key:t},o)),B.cloneElement(e,Lp({},n,{},o,{},e.props))]}));return B.createElement(dv,Lp({square:!0,elevation:0,className:Vg(s.root,s[f],l,i&&s.alternativeLabel),ref:t},h),y)}));lv({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(CC);var wC=B.forwardRef((function(e,t){var n=e.anchor,r=e.classes,o=e.className,i=e.width,a=Ip(e,["anchor","classes","className","width"]);return B.createElement("div",Lp({className:Vg(r.root,r["anchor".concat(cv(n))],o),ref:t,style:Ap({},Ox(n)?"width":"height",i)},a))})),kC=lv((function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}}),{name:"PrivateSwipeArea"})(wC),NC=null;function TC(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function OC(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function RC(e,t){return e?t.clientWidth:t.clientHeight}function AC(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var LC="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),IC={enter:Mm.enteringScreen,exit:Mm.leavingScreen},PC="undefined"!=typeof window?B.useLayoutEffect:B.useEffect;B.forwardRef((function(e,t){var n=e.anchor,r=void 0===n?"left":n,o=e.disableBackdropTransition,i=void 0!==o&&o,a=e.disableDiscovery,s=void 0!==a&&a,l=e.disableSwipeToOpen,c=void 0===l?LC:l,u=e.hideBackdrop,d=e.hysteresis,p=void 0===d?.52:d,m=e.minFlingVelocity,f=void 0===m?450:m,h=e.ModalProps,g=(h=void 0===h?{}:h).BackdropProps,v=Ip(h,["BackdropProps"]),y=e.onClose,b=e.onOpen,x=e.open,S=e.PaperProps,E=void 0===S?{}:S,M=e.SwipeAreaProps,C=e.swipeAreaWidth,w=void 0===C?20:C,k=e.transitionDuration,N=void 0===k?IC:k,T=e.variant,O=void 0===T?"temporary":T,R=Ip(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),A=sv(),L=B.useState(!1),I=L[0],P=L[1],D=B.useRef({isSwiping:null}),q=B.useRef(),z=B.useRef(),$=B.useRef(),F=B.useRef(!1),H=B.useRef();PC((function(){H.current=null}),[x]);var V=B.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,o=void 0===n?null:n,a=t.changeTransition,s=void 0===a||a,l=Rx(A,r),c=-1!==["right","bottom"].indexOf(l)?1:-1,d=Ox(r),p=d?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),m=$.current.style;m.webkitTransform=p,m.transform=p;var f="";if(o&&(f=A.transitions.create("all",_v({timeout:N},{mode:o}))),s&&(m.webkitTransition=f,m.transition=f),!i&&!u){var h=z.current.style;h.opacity=1-e/RC(d,$.current),s&&(h.webkitTransition=f,h.transition=f)}}),[r,i,u,A,N]),W=ny((function(e){if(F.current)if(NC=null,F.current=!1,P(!1),D.current.isSwiping){D.current.isSwiping=null;var t,n=Rx(A,r),o=Ox(r);t=o?TC(n,e.changedTouches):OC(n,e.changedTouches);var i=o?D.current.startX:D.current.startY,a=RC(o,$.current),s=AC(t,i,x,a),l=s/a;Math.abs(D.current.velocity)>f&&(H.current=1e3*Math.abs((a-s)/D.current.velocity)),x?D.current.velocity>f||l>p?y():V(0,{mode:"exit"}):D.current.velocity<-f||1-l>p?b():V(RC(o,$.current),{mode:"enter"})}else D.current.isSwiping=null})),_=ny((function(e){if($.current&&F.current&&(null==NC||NC===D.current)){var t=Rx(A,r),n=Ox(r),o=TC(t,e.touches),i=OC(t,e.touches);if(x&&$.current.contains(e.target)&&null==NC){var a=function(e){var t=e.domTreeShapes,n=e.start,r=e.current,o=e.anchor,i={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=r>=n;"top"!==o&&"left"!==o||(t=!t);var l="left"===o||"right"===o?"x":"y",c=e[i[l]],u=c>0,d=c+e[s[l]]<e[a[l]];return t&&d||!t&&u?e:null}))}({domTreeShapes:function(e,t){for(var n=[];e&&e!==t;){var r=window.getComputedStyle(e);"absolute"===r.getPropertyValue("position")||"hidden"===r.getPropertyValue("overflow-x")?n=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&n.push(e),e=e.parentElement}return n}(e.target,$.current),start:n?D.current.startX:D.current.startY,current:n?o:i,anchor:r});if(a)return void(NC=a);NC=D.current}if(null==D.current.isSwiping){var l=Math.abs(o-D.current.startX),c=Math.abs(i-D.current.startY);l>c&&e.cancelable&&e.preventDefault();var u=n?l>c&&l>3:c>l&&c>3;if(!0===u||(n?c>3:l>3)){if(D.current.isSwiping=u,!u)return void W(e);D.current.startX=o,D.current.startY=i,s||x||(n?D.current.startX-=w:D.current.startY-=w)}}if(D.current.isSwiping){var d=RC(n,$.current),p=n?D.current.startX:D.current.startY;x&&!D.current.paperHit&&(p=Math.min(p,d));var m=AC(n?o:i,p,x,d);if(x)if(D.current.paperHit)0===m&&(D.current.startX=o,D.current.startY=i);else{if(!(n?o<d:i<d))return;D.current.paperHit=!0,D.current.startX=o,D.current.startY=i}null===D.current.lastTranslate&&(D.current.lastTranslate=m,D.current.lastTime=performance.now()+1);var f=(m-D.current.lastTranslate)/(performance.now()-D.current.lastTime)*1e3;D.current.velocity=.4*D.current.velocity+.6*f,D.current.lastTranslate=m,D.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),V(m)}}})),U=ny((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!x||z.current.contains(e.target)||$.current.contains(e.target))){var t=Rx(A,r),n=Ox(r),o=TC(t,e.touches),i=OC(t,e.touches);if(!x){if(c||e.target!==q.current)return;if(n){if(o>w)return}else if(i>w)return}e.muiHandled=!0,NC=null,D.current.startX=o,D.current.startY=i,P(!0),!x&&$.current&&V(RC(n,$.current)+(s?20:-w),{changeTransition:!1}),D.current.velocity=0,D.current.lastTime=null,D.current.lastTranslate=null,D.current.paperHit=!1,F.current=!0}}));B.useEffect((function(){if("temporary"===O)return document.body.addEventListener("touchstart",U),document.body.addEventListener("touchmove",_,{passive:!1}),document.body.addEventListener("touchend",W),function(){document.body.removeEventListener("touchstart",U),document.body.removeEventListener("touchmove",_,{passive:!1}),document.body.removeEventListener("touchend",W)}}),[O,U,_,W]),B.useEffect((function(){return function(){NC===D.current&&(NC=null)}}),[]),B.useEffect((function(){x||P(!1)}),[x]);var Y=B.useCallback((function(e){z.current=j.findDOMNode(e)}),[]),G=B.useCallback((function(e){$.current=j.findDOMNode(e)}),[]);return B.createElement(B.Fragment,null,B.createElement(Ix,Lp({open:!("temporary"!==O||!I)||x,variant:O,ModalProps:Lp({BackdropProps:Lp({},g,{ref:Y})},v),PaperProps:Lp({},E,{style:Lp({pointerEvents:"temporary"!==O||x?"":"none"},E.style),ref:G}),anchor:r,transitionDuration:H.current||N,onClose:y,ref:t},R)),!c&&"temporary"===O&&B.createElement(oy,null,B.createElement(kC,Lp({anchor:r,ref:q,width:w},M))))}));var DC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"secondary":o,a=e.edge,s=void 0!==a&&a,l=e.size,c=void 0===l?"medium":l,u=Ip(e,["classes","className","color","edge","size"]),d=B.createElement("span",{className:n.thumb});return B.createElement("span",{className:Vg(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[s],{small:n["size".concat(cv(c))]}[c])},B.createElement(Ib,Lp({type:"checkbox",icon:d,checkedIcon:d,classes:{root:Vg(n.switchBase,n["color".concat(cv(i))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},u)),B.createElement("span",{className:n.track}))}));lv((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle"},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(50%)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Tp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Tp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(DC);var qC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.disabled,i=void 0!==o&&o,a=e.disableFocusRipple,s=void 0!==a&&a,l=e.fullWidth,c=e.icon,u=e.indicator,d=e.label,p=e.onChange,m=e.onClick,f=e.selected,h=e.textColor,g=void 0===h?"inherit":h,v=e.value,y=e.wrapped,b=void 0!==y&&y,x=Ip(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return B.createElement(My,Lp({focusRipple:!s,className:Vg(n.root,n["textColor".concat(cv(g))],r,i&&n.disabled,f&&n.selected,d&&c&&n.labelIcon,l&&n.fullWidth,b&&n.wrapped),ref:t,role:"tab","aria-selected":f,disabled:i,onClick:function(e){p&&p(e,v),m&&m(e)}},x),B.createElement("span",{className:n.wrapper},c,d),u)}));lv((function(e){var t;return{root:Lp({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},Ap(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),Ap(t,"overflow","hidden"),Ap(t,"whiteSpace","normal"),Ap(t,"textAlign","center"),Ap(t,e.breakpoints.up("sm"),{fontSize:e.typography.pxToRem(13),minWidth:160}),t)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(qC);var zC=B.createContext(),BC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"table":o,a=e.padding,s=void 0===a?"default":a,l=e.size,c=void 0===l?"medium":l,u=e.stickyHeader,d=void 0!==u&&u,p=Ip(e,["classes","className","component","padding","size","stickyHeader"]),m=B.useMemo((function(){return{padding:s,size:c,stickyHeader:d}}),[s,c,d]);return B.createElement(zC.Provider,{value:m},B.createElement(i,Lp({ref:t,className:Vg(n.root,r,d&&n.stickyHeader)},p)))}));lv((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Lp({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(BC);var $C=B.createContext(),FC={variant:"body"},HC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tbody":o,a=Ip(e,["classes","className","component"]);return B.createElement($C.Provider,{value:FC},B.createElement(i,Lp({className:Vg(n.root,r),ref:t},a)))}));lv({root:{display:"table-row-group"}},{name:"MuiTableBody"})(HC);var jC=B.forwardRef((function(e,t){var n,r=e.align,o=void 0===r?"inherit":r,i=e.classes,a=e.className,s=e.component,l=e.padding,c=e.scope,u=e.size,d=e.sortDirection,p=e.variant,m=Ip(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),f=B.useContext(zC),h=B.useContext($C);n=s||(h&&"head"===h.variant?"th":"td");var g=c;!g&&h&&"head"===h.variant&&(g="col");var v=l||(f&&f.padding?f.padding:"default"),y=u||(f&&f.size?f.size:"medium"),b=p||h&&h.variant,x=null;return d&&(x="asc"===d?"ascending":"descending"),B.createElement(n,Lp({ref:t,className:Vg(i.root,i[b],a,"inherit"!==o&&i["align".concat(cv(o))],"default"!==v&&i["padding".concat(cv(v))],"medium"!==y&&i["size".concat(cv(y))],{head:f&&f.stickyHeader&&i.stickyHeader}[b]),"aria-sort":x,scope:g},m))})),VC=lv((function(e){return{root:Lp({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Rp(Tp(e.palette.divider,1),.88):Op(Tp(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(jC),WC={variant:"footer"},_C=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tfoot":o,a=Ip(e,["classes","className","component"]);return B.createElement($C.Provider,{value:WC},B.createElement(i,Lp({className:Vg(n.root,r),ref:t},a)))}));lv({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(_C);var UC={variant:"head"},YC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"thead":o,a=Ip(e,["classes","className","component"]);return B.createElement($C.Provider,{value:UC},B.createElement(i,Lp({className:Vg(n.root,r),ref:t},a)))}));lv({root:{display:"table-header-group"}},{name:"MuiTableHead"})(YC);var GC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=e.disableGutters,s=void 0!==a&&a,l=e.variant,c=void 0===l?"regular":l,u=Ip(e,["classes","className","component","disableGutters","variant"]);return B.createElement(i,Lp({className:Vg(n.root,n[c],r,!s&&n.gutters),ref:t},u))})),KC=lv((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Ap({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(GC),XC=pb(B.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),JC=pb(B.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),ZC=B.createElement(JC,null),QC=B.createElement(XC,null),ew=B.createElement(XC,null),tw=B.createElement(JC,null),nw=B.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,o=e.nextIconButtonProps,i=e.onChangePage,a=e.page,s=e.rowsPerPage,l=Ip(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=sv();return B.createElement("div",Lp({ref:t},l),B.createElement(Ab,Lp({onClick:function(e){i(e,a-1)},disabled:0===a,color:"inherit"},n),"rtl"===c.direction?ZC:QC),B.createElement(Ab,Lp({onClick:function(e){i(e,a+1)},disabled:a>=Math.ceil(r/s)-1,color:"inherit"},o),"rtl"===c.direction?ew:tw))})),rw=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(-1===n?r:n," of ").concat(r)},ow=[10,25,50,100],iw=B.forwardRef((function(e,t){var n,r=e.ActionsComponent,o=void 0===r?nw:r,i=e.backIconButtonProps,a=e.classes,s=e.className,l=e.colSpan,c=e.component,u=void 0===c?VC:c,d=e.count,p=e.labelDisplayedRows,m=void 0===p?rw:p,f=e.labelRowsPerPage,h=void 0===f?"Rows per page:":f,g=e.nextIconButtonProps,v=e.onChangePage,y=e.onChangeRowsPerPage,b=e.page,x=e.rowsPerPage,S=e.rowsPerPageOptions,E=void 0===S?ow:S,M=e.SelectProps,C=void 0===M?{}:M,w=Ip(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);u!==VC&&"td"!==u||(n=l||1e3);var k=C.native?"option":dE;return B.createElement(u,Lp({className:Vg(a.root,s),colSpan:n,ref:t},w),B.createElement(KC,{className:a.toolbar},B.createElement("div",{className:a.spacer}),E.length>1&&B.createElement(cb,{color:"inherit",variant:"body2",className:a.caption},h),E.length>1&&B.createElement(GM,Lp({classes:{select:a.select,icon:a.selectIcon},input:B.createElement(Xx,{className:Vg(a.input,a.selectRoot)}),value:x,onChange:y},C),E.map((function(e){return B.createElement(k,{className:a.menuItem,key:e,value:e.value?e.value:e},e.label?e.label:e)}))),B.createElement(cb,{color:"inherit",variant:"body2",className:a.caption},m({from:0===d?0:b*x+1,to:Math.min(d,(b+1)*x),count:d,page:b})),B.createElement(o,{className:a.actions,backIconButtonProps:i,count:d,nextIconButtonProps:g,onChangePage:v,page:b,rowsPerPage:x})))}));lv((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{top:1},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(iw);var aw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tr":o,a=e.hover,s=void 0!==a&&a,l=e.selected,c=void 0!==l&&l,u=Ip(e,["classes","className","component","hover","selected"]),d=B.useContext($C);return B.createElement(i,Lp({ref:t,className:Vg(n.root,r,d&&{head:n.head,footer:n.footer}[d.variant],s&&n.hover,c&&n.selected)},u))}));lv((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(aw);var sw=pb(B.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),lw=B.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.children,i=e.classes,a=e.className,s=e.direction,l=void 0===s?"desc":s,c=e.hideSortIcon,u=void 0!==c&&c,d=e.IconComponent,p=void 0===d?sw:d,m=Ip(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return B.createElement(My,Lp({className:Vg(i.root,a,r&&i.active),component:"span",disableRipple:!0,ref:t},m),o,u&&!r?null:B.createElement(p,{className:Vg(i.icon,i["iconDirection".concat(cv(l))])}))}));lv((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:1}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(lw);var cw,uw=!("undefined"==typeof window||!window.document||!window.document.createElement);function dw(){if(cw)return cw;if(!uw||!window.document.body)return"indeterminate";var e=window.document.createElement("div");return e.appendChild(document.createTextNode("ABCD")),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),cw="reverse",e.scrollLeft>0?cw="default":(e.scrollLeft=1,0===e.scrollLeft&&(cw="negative")),document.body.removeChild(e),cw}function pw(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=dw();if("indeterminate"===r)return Number.NaN;switch(r){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n}return n}function mw(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var fw={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function hw(e){var t=e.onChange,n=Ip(e,["onChange"]),r=B.useRef(),o=B.useRef(null),i=function(){r.current=o.current.offsetHeight-o.current.clientHeight};return B.useEffect((function(){var e=Cx((function(){var e=r.current;i(),e!==r.current&&t(r.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),B.useEffect((function(){i(),t(r.current)}),[t]),B.createElement("div",Lp({style:fw,ref:o},n))}var gw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=e.orientation,a=Ip(e,["classes","className","color","orientation"]);return B.createElement("span",Lp({className:Vg(n.root,n["color".concat(cv(o))],r,{vertical:n.vertical}[i]),ref:t},a))})),vw=lv((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(gw),yw=B.createElement(XC,{fontSize:"small"}),bw=B.createElement(JC,{fontSize:"small"}),xw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.direction,i=e.orientation,a=e.visible,s=Ip(e,["classes","className","direction","orientation","visible"]),l=Vg(n.root,r,{vertical:n.vertical}[i]);return a?B.createElement(My,Lp({component:"div",className:l,ref:t,role:null,tabIndex:null},s),"left"===o?yw:bw):B.createElement("div",{className:l})})),Sw=lv({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(xw),Ew=B.forwardRef((function(e,t){var n=e.action,r=e.centered,o=void 0!==r&&r,i=e.children,a=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.indicatorColor,d=void 0===u?"secondary":u,p=e.onChange,m=e.orientation,f=void 0===m?"horizontal":m,h=e.ScrollButtonComponent,g=void 0===h?Sw:h,v=e.scrollButtons,y=void 0===v?"auto":v,b=e.TabIndicatorProps,x=void 0===b?{}:b,S=e.textColor,E=void 0===S?"inherit":S,M=e.value,C=e.variant,w=void 0===C?"standard":C,k=Ip(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),N=sv(),T="scrollable"===w,O="rtl"===N.direction,R="vertical"===f,A=R?"scrollTop":"scrollLeft",L=R?"top":"left",I=R?"bottom":"right",P=R?"clientHeight":"clientWidth",D=R?"height":"width",q=B.useState(!1),z=q[0],$=q[1],F=B.useState({}),H=F[0],j=F[1],V=B.useState({start:!1,end:!1}),W=V[0],_=V[1],U=B.useState({overflow:"hidden",marginBottom:null}),Y=U[0],G=U[1],K=new Map,X=B.useRef(null),J=B.useRef(null),Z=function(){var e,t,n=X.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:pw(n,N.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==M){var o=J.current.children;if(o.length>0){var i=o[K.get(M)];t=i?i.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},Q=ny((function(){var e,t=Z(),n=t.tabsMeta,r=t.tabMeta,o=0;if(r&&n)if(R)o=r.top-n.top+n.scrollTop;else{var i=O?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;o=r.left-n.left+i}var a=(Ap(e={},L,o),Ap(e,D,r?r[D]:0),e);if(isNaN(H[L])||isNaN(H[D]))j(a);else{var s=Math.abs(H[L]-a[L]),l=Math.abs(H[D]-a[D]);(s>=1||l>=1)&&j(a)}})),ee=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},i=r.ease,a=void 0===i?mw:i,s=r.duration,l=void 0===s?300:s,c=null,u=t[e],d=!1,p=function(){d=!0},m=function r(i){if(d)o(new Error("Animation cancelled"));else{null===c&&(c=i);var s=Math.min(1,(i-c)/l);t[e]=a(s)*(n-u)+u,s>=1?requestAnimationFrame((function(){o(null)})):requestAnimationFrame(r)}};u===n?o(new Error("Element already at target position")):requestAnimationFrame(m)}(A,X.current,e)},te=function(e){var t=X.current[A];R?t+=e:(t+=e*(O?-1:1),t*=O&&"reverse"===dw()?-1:1),ee(t)},ne=function(){te(-X.current[P])},re=function(){te(X.current[P])},oe=B.useCallback((function(e){G({overflow:null,marginBottom:-e})}),[]),ie=ny((function(){var e=Z(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[L]<t[L]){var r=t[A]+(n[L]-t[L]);ee(r)}else if(n[I]>t[I]){var o=t[A]+(n[I]-t[I]);ee(o)}})),ae=ny((function(){if(T&&"off"!==y){var e,t,n=X.current,r=n.scrollTop,o=n.scrollHeight,i=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(R)e=r>1,t=r<o-i-1;else{var l=pw(X.current,N.direction);e=O?l<a-s-1:l>1,t=O?l>1:l<a-s-1}e===W.start&&t===W.end||_({start:e,end:t})}}));B.useEffect((function(){var e=Cx((function(){Q(),ae()})),t=ix(X.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[Q,ae]);var se=B.useCallback(Cx((function(){ae()})));B.useEffect((function(){return function(){se.clear()}}),[se]),B.useEffect((function(){$(!0)}),[]),B.useEffect((function(){Q(),ae()})),B.useEffect((function(){ie()}),[ie,H]),B.useImperativeHandle(n,(function(){return{updateIndicator:Q,updateScrollButtons:ae}}),[Q,ae]);var le=B.createElement(vw,Lp({className:a.indicator,orientation:f,color:d},x,{style:Lp({},H,{},x.style)})),ce=0,ue=B.Children.map(i,(function(e){if(!B.isValidElement(e))return null;var t=void 0===e.props.value?ce:e.props.value;K.set(t,ce);var n=t===M;return ce+=1,B.cloneElement(e,{fullWidth:"fullWidth"===w,indicator:n&&!z&&le,selected:n,onChange:p,textColor:E,value:t})})),de=function(){var e={};e.scrollbarSizeListener=T?B.createElement(hw,{className:a.scrollable,onChange:oe}):null;var t=W.start||W.end,n=T&&("auto"===y&&t||"desktop"===y||"on"===y);return e.scrollButtonStart=n?B.createElement(g,{orientation:f,direction:O?"right":"left",onClick:ne,visible:W.start,className:Vg(a.scrollButtons,"on"!==y&&a.scrollButtonsDesktop)}):null,e.scrollButtonEnd=n?B.createElement(g,{orientation:f,direction:O?"left":"right",onClick:re,visible:W.end,className:Vg(a.scrollButtons,"on"!==y&&a.scrollButtonsDesktop)}):null,e}();return B.createElement(c,Lp({className:Vg(a.root,s,R&&a.vertical),ref:t},k),de.scrollButtonStart,de.scrollbarSizeListener,B.createElement("div",{className:Vg(a.scroller,T?a.scrollable:a.fixed),style:Y,ref:X,onScroll:se},B.createElement("div",{className:Vg(a.flexContainer,R&&a.flexContainerVertical,o&&!T&&a.centered),ref:J,role:"tablist"},ue),z&&le),de.scrollButtonEnd)}));lv((function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:Ap({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(Ew);var Mw={standard:TS,filled:Zx,outlined:SE},Cw=B.forwardRef((function(e,t){var n=e.autoComplete,r=e.autoFocus,o=e.children,i=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.defaultValue,u=e.error,d=e.FormHelperTextProps,p=e.fullWidth,m=e.helperText,f=e.hiddenLabel,h=e.id,g=e.InputLabelProps,v=e.inputProps,y=e.InputProps,b=e.inputRef,x=e.label,S=e.multiline,E=e.name,M=e.onBlur,C=e.onChange,w=e.onFocus,k=e.placeholder,N=e.required,T=void 0!==N&&N,O=e.rows,R=e.rowsMax,A=e.select,L=void 0!==A&&A,I=e.SelectProps,P=e.type,D=e.value,q=e.variant,z=void 0===q?"standard":q,$=Ip(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),F=B.useState(0),H=F[0],V=F[1],W=B.useRef(null);B.useEffect((function(){if("outlined"===z){var e=j.findDOMNode(W.current);V(null!=e?e.offsetWidth:0)}}),[z,T,x]);var _={};"outlined"===z&&(g&&void 0!==g.shrink&&(_.notched=g.shrink),_.labelWidth=H),L&&(I&&I.native||(_.id=void 0),_["aria-describedby"]=void 0);var U=m&&h?"".concat(h,"-helper-text"):void 0,Y=x&&h?"".concat(h,"-label"):void 0,G=Mw[z],K=B.createElement(G,Lp({"aria-describedby":U,autoComplete:n,autoFocus:r,defaultValue:c,fullWidth:p,multiline:S,name:E,rows:O,rowsMax:R,type:P,value:D,id:h,inputRef:b,onBlur:M,onChange:C,onFocus:w,placeholder:k,inputProps:v},_,y));return B.createElement(tS,Lp({className:Vg(i.root,a),error:u,fullWidth:p,hiddenLabel:f,ref:t,required:T,color:l,variant:z},$),x&&B.createElement(AS,Lp({htmlFor:h,ref:W,id:Y},g),x),L?B.createElement(GM,Lp({"aria-describedby":U,id:h,labelId:Y,value:D,input:K},I),o):K,m&&B.createElement(aS,Lp({id:U},d),m))}));function ww(e){return Math.round(1e5*e)/1e5}lv({root:{}},{name:"MuiTextField"})(Cw);var kw=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.disableFocusListener,i=void 0!==o&&o,a=e.disableHoverListener,s=void 0!==a&&a,l=e.disableTouchListener,c=void 0!==l&&l,u=e.enterDelay,d=void 0===u?0:u,p=e.enterTouchDelay,m=void 0===p?700:p,f=e.id,h=e.interactive,g=void 0!==h&&h,v=e.leaveDelay,y=void 0===v?0:v,b=e.leaveTouchDelay,x=void 0===b?1500:b,S=e.onClose,E=e.onOpen,M=e.open,C=e.placement,w=void 0===C?"bottom":C,k=e.PopperProps,N=e.title,T=e.TransitionComponent,O=void 0===T?bS:T,R=e.TransitionProps,A=Ip(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),L=sv(),I=B.useState(!1),P=I[0],D=I[1],q=B.useState(0)[1],z=B.useState(),$=z[0],F=z[1],H=B.useRef(!1),V=B.useRef(null!=M).current,W=B.useRef(),_=B.useRef(),U=B.useRef(),Y=B.useRef(),G=B.useRef();B.useEffect((function(){W.current||(W.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),M&&q((function(e){return!e}))}),[M]),B.useEffect((function(){return function(){clearTimeout(_.current),clearTimeout(U.current),clearTimeout(Y.current),clearTimeout(G.current)}}),[]);var K=function(e){V||P||D(!0),E&&E(e)},X=function(e){var t=n.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),H.current&&"touchstart"!==e.type||($&&$.removeAttribute("title"),clearTimeout(U.current),clearTimeout(Y.current),d?(e.persist(),U.current=setTimeout((function(){K(e)}),d)):K(e))},J=fy(),Z=J.isFocusVisible,Q=J.onBlurVisible,ee=J.ref,te=B.useState(!1),ne=te[0],re=te[1],oe=function(e){V||D(!1),S&&S(e),clearTimeout(_.current),_.current=setTimeout((function(){H.current=!1}),L.transitions.duration.shortest)},ie=function(e){var t=n.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),ne&&(re(!1),Q())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout(U.current),clearTimeout(Y.current),e.persist(),Y.current=setTimeout((function(){oe(e)}),y)},ae=Yv(F,t),se=Yv(ee,ae),le=B.useCallback((function(e){Uv(se,j.findDOMNode(e))}),[se]),ce=Yv(n.ref,le),ue=V?M:P;""===N&&(ue=!1);var de=!ue&&!s,pe=Lp({"aria-describedby":ue?f||W.current:null,title:de&&"string"==typeof N?N:null},A,{},n.props,{className:Vg(A.className,n.props.className)});c||(pe.onTouchStart=function(e){H.current=!0;var t=n.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout(Y.current),clearTimeout(_.current),clearTimeout(G.current),e.persist(),G.current=setTimeout((function(){X(e)}),m)},pe.onTouchEnd=function(e){n.props.onTouchEnd&&n.props.onTouchEnd(e),clearTimeout(G.current),clearTimeout(Y.current),e.persist(),Y.current=setTimeout((function(){oe(e)}),x)}),s||(pe.onMouseOver=X,pe.onMouseLeave=ie),i||(pe.onFocus=function(e){$||F(e.currentTarget),Z(e)&&(re(!0),X(e));var t=n.props;t.onFocus&&t.onFocus(e)},pe.onBlur=ie);var me=g?{onMouseOver:pe.onMouseOver,onMouseLeave:pe.onMouseLeave,onFocus:pe.onFocus,onBlur:pe.onBlur}:{};return B.createElement(B.Fragment,null,B.cloneElement(n,Lp({ref:ce},pe)),B.createElement(AM,Lp({className:Vg(r.popper,g&&r.popperInteractive),placement:w,anchorEl:$,open:!!$&&ue,id:pe["aria-describedby"],transition:!0},me,k),(function(e){var t=e.placement,n=e.TransitionProps;return B.createElement(O,Lp({timeout:L.transitions.duration.shorter},n,R),B.createElement("div",{className:Vg(r.tooltip,r["tooltipPlacement".concat(cv(t.split("-")[0]))],H.current&&r.touch)},N))})))}));lv((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:Tp(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(ww(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(ww(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:Ap({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:Ap({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:Ap({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:Ap({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(kw);var Nw={entering:{transform:"none"},entered:{transform:"none"}},Tw={enter:Mm.enteringScreen,exit:Mm.leavingScreen};function Ow(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Rw({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const o={fontSize:Ow(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return B.createElement("i",{style:o},B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},B.createElement("path",{d:e})))}B.forwardRef((function(e,t){var n=e.children,r=e.in,o=e.onEnter,i=e.onExit,a=e.style,s=e.timeout,l=void 0===s?Tw:s,c=Ip(e,["children","in","onEnter","onExit","style","timeout"]),u=sv(),d=Yv(n.ref,t);return B.createElement(wv,Lp({appear:!0,in:r,onEnter:function(e,t){Wv(e);var n=_v({style:a,timeout:l},{mode:"enter"});e.style.webkitTransition=u.transitions.create("transform",n),e.style.transition=u.transitions.create("transform",n),o&&o(e,t)},onExit:function(e){var t=_v({style:a,timeout:l},{mode:"exit"});e.style.webkitTransition=u.transitions.create("transform",t),e.style.transition=u.transitions.create("transform",t),i&&i(e)},timeout:l},c),(function(e,t){return B.cloneElement(n,Lp({style:Lp({transform:"scale(0)",visibility:"exited"!==e||r?void 0:"hidden"},Nw[e],{},a,{},n.props.style),ref:d},t))}))}));const Aw={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},Lw={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},Iw="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Pw={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},Dw={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function qw(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Yi.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function zw(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=Z(!0,{},a),l=s.qHyperCubeDef[r][t],c=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];c.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(c.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=c,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,o&&o({oldItem:l,newItem:c,oldProperties:a,newProperties:s,model:e}),qw(e,a,s)}))}function Bw({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){zw(r,e,t,"qDimensions",a)}}}function $w(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var o}function Fw({altList:e,app:t,dir:n,dock:r,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(n)},changeTo(e,t){zw(o,e,t,"qMeasures",i,a)}}}function Hw(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const jw={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},Vw=({children:e,...t})=>B.createElement(yb,lp({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);const Ww=Nm({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const _w=Rm({productionPrefix:"qdaed",disableGlobal:!0,seed:""});function Uw(e,t,n,r){const o=function(t){const n=String(t);return e(n)};return o.ticks=()=>t.map((t=>{const i=o([t.data.value,r?n-1:0]),a=o([t.data.value,r?0:n-1])+e.bandwidth();return{position:(i+a)/2,label:t.label,data:t.data,start:i,end:a}})),o.bandwidth=()=>e.bandwidth(),o.data=()=>e.data(),o.domain=()=>e.domain(),o.pxScale=function(r){const o=e.pxScale(r);return o===e?this:Uw(o,t,n)},o}function Yw(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const o=t(e,n,r),i=o.domain(),a=o.ticks(),s=[],l=e.measureCount;return i.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),o.domain(s),Uw(o,a,l,e.invert)}))}const Gw={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:o,flipXY:i,symbol:a}){let s="x",l="y",c=r,u=o,d=t<.5?90:-90;return i&&(s="y",l="x",c=o,u=r,d=t<.5?180:0),a(Z({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function Kw({i:e,width:t,height:n,resolved:r,keys:o,flipXY:i,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=Z({},{major:l,majorEnd:c},r.minor.items[e]);o.forEach((t=>{d[t]=r[t].items[e]}));const p=i?n:t,m=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:o}){const i=e>=0?1:-1;let a=Math.min(i*e*t,Number.isNaN(Number(r))?o:r/o);return a=Number.isNaN(Number(n))?a:Math.max(n/o,a),a*i}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:p}),f=(u-m)/2,h=f+d.major+m/2;return{item:d,boxCenter:h,boxWidth:m,boxPadding:f,rendWidth:t,rendHeight:n}}function Xw({keys:e,data:t,defaultSettings:n,style:r,settings:o,width:i,height:a,resolver:s}){const l=Z(!0,{},n||{},r||{}),c={major:"horizontal"===o.orientation?a:i,minor:"horizontal"===o.orientation?i:a},u=o.major;let d;d="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:o.major}});const p=o.minor||{};let m;const f={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{start:{scale:p.scale,ref:"start"},end:{scale:p.scale,ref:"end"},min:{scale:p.scale,ref:"min"},max:{scale:p.scale,ref:"max"},med:{scale:p.scale,ref:"med"}},p)})};for(let n=0,r=e.length;n<r;n++)m=e[n],f[m]=s.resolve({data:t,defaults:l[m],settings:o[m],scaled:c});return f}const Jw=["oob"];const Zw={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:o,style:i,resolver:a,symbol:s}=this,l=Xw({keys:Jw,data:o,defaultSettings:{oob:Gw.getDefaultSettings()},style:i,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l;return function({width:e,height:t,flipXY:n,resolved:r,keys:o,symbol:i,dockValue:a,_calcItemRenderingOpts:s=Kw}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:p,rendWidth:m,rendHeight:f}=s({i:u,width:e,height:t,resolved:r,keys:o,flipXY:n,calcKey:"oob"}),h=c[u].data,g=[];if(d.oob.show){g.push(Gw.createOob({oob:d.oob,dockValue:a,boxCenter:p,rendWidth:m,rendHeight:f,flipXY:n,symbol:i}));const e={type:"container",data:h,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:u,settings:c,width:e,height:t,flipXY:r,resolved:l,keys:Jw,symbol:s,dockValue:n})}},Qw={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},ek=["hat"];function tk(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function nk({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:o,flipXY:i}){let a="x",s="y",l=r,c=o,u=e.hat.alignment||0;i&&(a="y",s="x",l=o,c=r,u=1-u);const d=(n+e.major)*l;let p=[{[a]:d,[s]:0+c},{[a]:d+t*u*l,[s]:8},{[a]:d+t*l,[s]:0+c},{[a]:d+t*l,[s]:0+c+10},{[a]:d,[s]:0+c+10}];const m=Z({},e.hat,{type:"path",d:tk(p)});p=[{[a]:d,[s]:0},{[a]:d+t*(1-u)*l,[s]:0+c-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[m,Z({},e.hat,{type:"path",d:tk(p)})]}const rk={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:o,resolver:i}=this,a=Xw({keys:ek,data:r,defaultSettings:Qw,style:o,settings:this.settings.settings,width:e,height:t,resolver:i}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:r,keys:o,_calcItemRenderingOpts:i=Kw}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m}=i({i:l,width:e,height:t,resolved:r,keys:o,flipXY:n,calcKey:"hat"}),f=s[l].data,h=[];c.hat.show&&h.push(...nk({item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m,flipXY:n}));const g={type:"container",data:f,collider:{type:"bounds"},children:h};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:ek})}};var ok="unclassified",ik="equal-equal",ak="equal-higher",sk="equal-lower",lk="equal-void",ck="higher-equal",uk="higher-higher-acute",dk="higher-higher-obtuse",pk="higher-lower-negative",mk="higher-lower-positive",fk="higher-void",hk="lower-equal",gk="lower-higher-negative",vk="lower-higher-positive",yk="lower-lower-acute",bk="lower-lower-obtuse",xk="lower-void",Sk="void-equal",Ek="void-higher",Mk="void-lower",Ck="void-void";function wk(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function kk(e,t,n){const r=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),o=Math.sqrt((t.x-n.x)**2+(t.y-n.y)**2),i=Math.sqrt((n.x-e.x)**2+(n.y-e.y)**2);return Math.acos((o*o+r*r-i*i)/(2*o*r))*(180/Math.PI)}function Nk({previous:e,current:t,next:n}){const r=e&&e.value,o=t&&t.value,i=n&&n.value;return e||n?e?n?r===o?o===i?ik:o<i?ak:sk:o===i?r>o?ck:hk:r>o?o<i?kk(e,t,n)>90?dk:uk:wk(e,t)>wk(e,n)?mk:pk:o>i?kk(e,t,n)>90?bk:yk:wk(e,t)>wk(e,n)?vk:gk:r===o?lk:r>o?fk:xk:o===i?Sk:o<i?Ek:Mk:Ck}function Tk({bounds:e,size:t}){const{x:n,y:r,width:o,height:i}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(n+o/2)>=0&&Math.ceil(n+o/2)<=t.width&&Math.floor(r+i/2)>=0&&Math.ceil(r+i/2)<=t.height:Math.floor(n+o)>0&&Math.ceil(n)<t.width&&Math.floor(r+i/2)>=0&&Math.ceil(r+i/2)<=t.height}const Ok=1,Rk=0;function Ak({node:e,line:t,groupIndex:n,extract:r,style:o,measureText:i,size:a,horizontal:s,rtl:l,meta:c,showLabel:u}){const d=r.label(e.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;const p=i({fontFamily:o.fontFamily,fontSize:o.fontSize,text:d}),{localBounds:m}=e,{"stroke-width":f}=e.attrs,h=r.pointValue(e.data),g={x:m.x+m.width/2,y:m.y+m.height/2,width:p.width+2*Ok,height:p.height+2*Rk},v=`${g.x}-${g.y}`,y=!s&&!l,b=s?a.height:a.width,x=(s?g.y:g.x)/b,S=(y?1-x:x)<=(b<=200?.25:.1),E={key:v,node:e,line:t,group:n,value:h,labelMeasurements:p,bounds:g,inside:Tk({bounds:m,size:a}),border:f?f/2:0,classification:ok,setClassification(e){E.classification=e},preferences:[],setPreferences(e){E.preferences.push(...e)},placement:void 0,setPlacement(e){E.placement=e},duplicate:!1,setDuplicate(){E.duplicate=!0},extreme:c.getExtreme(v),elite:S,show:u(e)};return E}function Lk({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}){const l=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},n=e.map((e=>{const{localBounds:t}=e,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${n.x}-${n.y}`,center:n}})),r=n.reduce(((e,t)=>((!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e)),{});return t.top=n.filter((e=>e.center.y===r.top.center.y)).map((e=>e.key)),t.right=n.filter((e=>e.center.x===r.right.center.x)).map((e=>e.key)),t.bottom=n.filter((e=>e.center.y===r.bottom.center.y)).map((e=>e.key)),t.left=n.filter((e=>e.center.x===r.left.center.x)).map((e=>e.key)),{getExtrema:e=>({top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}),getExtreme:e=>{const{top:n,right:r,bottom:o,left:i}=t;return[n,r,o,i].some((t=>-1!==t.indexOf(e)))}}}({nodes:e});return function({nodes:e,by:t,lineIndex:n}){const r=e.reduce(((e,r,o)=>{const i=t(r.data);return e[i]||(e[i]={items:[],index:o}),e[i].items.push({node:r,line:r.data[n].value}),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:e,by:t.majorValue,lineIndex:t.lineIndex}).map(((e,c)=>e.map((e=>({line:e.line,item:Ak({node:e.node,line:e.line,groupIndex:c,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,meta:l,showLabel:s})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{}))).filter((e=>Object.keys(e).length))}var Ik={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},Pk={[ik]:[Ik.TOP,Ik.BOTTOM],[ak]:[Ik.BOTTOM,Ik.BOTTOM_RIGHT],[sk]:[Ik.TOP,Ik.TOP_RIGHT],[lk]:[Ik.TOP,Ik.BOTTOM],[ck]:[Ik.LEFT,Ik.BOTTOM_LEFT,Ik.TOP,Ik.TOP_RIGHT],[uk]:[Ik.BOTTOM,Ik.BOTTOM_LEFT,Ik.LEFT,Ik.TOP_RIGHT],[dk]:[Ik.BOTTOM,Ik.TOP],[pk]:[Ik.TOP,Ik.TOP_RIGHT,Ik.RIGHT],[mk]:[Ik.BOTTOM,Ik.BOTTOM_LEFT,Ik.LEFT],[fk]:[Ik.TOP],[hk]:[Ik.TOP],[gk]:[Ik.TOP,Ik.TOP_LEFT],[vk]:[Ik.BOTTOM_RIGHT],[yk]:[Ik.TOP,Ik.TOP_LEFT,Ik.LEFT,Ik.TOP_RIGHT,Ik.RIGHT],[bk]:[Ik.TOP,Ik.BOTTOM],[xk]:[Ik.TOP],[Sk]:[Ik.TOP],[Ek]:[Ik.TOP,Ik.BOTTOM],[Mk]:[Ik.TOP,Ik.BOTTOM,Ik.LEFT],[Ck]:[Ik.TOP]};function Dk({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}){const l=Lk({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}),c=[...l.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[u]=c,d=function({groups:e,threshold:t}){const n=e.map((e=>Object.keys(e).map((t=>e[t])))),r={};for(let e=0;e<=n.length;e++){const t=n[e];if(t)for(let e=0;e<t.length;e++){const n=t[e],{line:o}=n;r[o]||(r[o]=[]),r[o].push(n.bounds)}}const o=Object.keys(r).map((e=>r[e])),i=[];for(let e=0;e<o.length;e++)for(let n=0;n<o[e].length-1;n++){const r=o[e][n],a=o[e][n+1],s={x1:r.x,y1:r.y,x2:a.x,y2:a.y},l=s.x1-s.x2,c=s.y1-s.y2;Math.sqrt(l*l+c*c)>t&&i.push(s)}return i}({groups:l,threshold:u.node.localBounds.height}),p={getItems:()=>c,getLines:()=>d};return function({groups:e}){for(let t=0;t<e.length;t++){const n=Object.keys(e[t]).map((n=>e[t][n]));for(let r=0;r<n.length;r++){const o=n[r],i=Nk({previous:e[t-1]&&e[t-1][o.line],current:o,next:e[t+1]&&e[t+1][o.line]});o.setClassification(i)}}}({groups:l}),p.getItems().forEach((e=>e.setPreferences(Pk[e.classification]))),p}function qk({item:e,placement:t,size:n}){return t.x>=0-n.edgeBleed.left&&t.x<=n.width-e.bounds.width+n.edgeBleed.right&&t.y>=0-n.edgeBleed.top&&t.y<=n.height-e.bounds.height}function zk({line1:e,line2:t}){const n=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===n)return!1;const r=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/n,o=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/n;return r>=0&&r<=1&&o>=0&&o<=1}function Bk({candidate:e,lines:t,rects:n}){return!!n.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const n={x:t.x,y:t.y},r={x:t.x+t.width,y:t.y},o={x:t.x+t.width,y:t.y+t.height},i={x:t.x,y:t.y+t.height},a={x1:r.x,y1:r.y,x2:o.x,y2:o.y},s={x1:o.x,y1:o.y,x2:i.x,y2:i.y},l={x1:i.x,y1:i.y,x2:n.x,y2:n.y};return zk({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||zk({line1:e,line2:a})||zk({line1:e,line2:s})||zk({line1:e,line2:l})}({line:t,rect:e})))}const $k={x:0,width:0,y:0,height:0};const Fk=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Hk=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),jk=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),Vk=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Wk=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),_k=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Uk=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),Yk=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var Gk=2.5,Kk=4;const Xk=[Ik.TOP,Ik.TOP_LEFT,Ik.TOP_RIGHT],Jk=[Ik.BOTTOM,Ik.BOTTOM_LEFT,Ik.BOTTOM_RIGHT];function Zk({position:e}){const t={x:Gk,width:-2*Gk,y:0,height:0},n=Xk.indexOf(e)>-1,r=Jk.indexOf(e)>-1;return n&&(t.y=Kk,t.height=-Kk),r&&(t.height=-Kk),t}function Qk({cx:e,cy:t,r:n,degrees:r}){const o=r*(Math.PI/180);return{x:Math.round(e+n*Math.sin(o)),y:Math.round(t+n*-Math.cos(o))}}function eN({coordinates:e,degrees:t,item:n}){const r={x:e.x,y:e.y};return t<=90?r.y-=n.bounds.height:t>180&&t<=270?r.x-=n.bounds.width:t>270&&(r.y-=n.bounds.height,r.x-=n.bounds.width),r}function tN({item:e,validator:t,force:n=!1}){const r=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),o=e.bounds.x,i=e.bounds.y;for(let a=0;a<r.length;a++){const s=r[a];for(let r=40;r<=180;r+=15){const a=eN({coordinates:Qk({cx:o,cy:i,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}for(let r=320;r>180;r-=15){const a=eN({coordinates:Qk({cx:o,cy:i,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}}return!1}const nN=void 0;function rN({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys(Ik).map((e=>Ik[e])).filter((t=>-1===e.preferences.indexOf(t)))],o={[Ik.TOP]:Fk,[Ik.TOP_RIGHT]:Hk,[Ik.RIGHT]:jk,[Ik.BOTTOM_RIGHT]:Vk,[Ik.BOTTOM]:Wk,[Ik.BOTTOM_LEFT]:_k,[Ik.LEFT]:Uk,[Ik.TOP_LEFT]:Yk},i=[];for(let a=0;a<r.length;a++){const s=r[a],l=o[s]({item:e}),c=Zk({position:s}),u=t({item:e,placement:l,adjustment:c,ignoreLines:n});if(n&&u.inside&&i.push(l),u.valid)return l}const a=()=>tN({item:e,validator:t,force:n});if(n){const e=a();return e||(i[0]||nN)}return(e.extreme||e.elite)&&a()||nN}function oN({model:e,size:t,all:n}){const r={},o=e.getItems(),i=[...o.map((e=>({x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2})))],a=[],s=e.getLines();o.forEach((e=>{const{data:o}=e.node;if(!e.show||!e.inside||o.null&&o.null.value||o.interpolated&&o.interpolated.value)return;const{key:l}=e;if(r[l])return void e.setDuplicate();r[l]=!0;const c=function({size:e,lines:t,placements:n}){return function({item:r,placement:o,adjustment:i=$k,ignoreLines:a=!1}){const s={inside:qk({item:r,placement:o,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=Bk({candidate:{x:o.x+i.x,y:o.y+i.y,width:r.bounds.width+i.width,height:r.bounds.height+i.height},lines:a?[]:t,rects:n}),s.valid=!s.collides,s):s}}({size:t,lines:s,placements:i}),u=rN({item:e,validator:c});u?(u.height=e.bounds.height,u.width=e.bounds.width,i.push(u),e.setPlacement(u)):n&&a.push({item:e,validator:c})})),a.forEach((e=>{const{item:t,validator:n}=e,r=rN({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,i.push(r),t.setPlacement(r))}))}var iN={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,connect:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},target:{labelSpace:"label-space-component",point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge"},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},t=this.chart.component(this.settings.settings.target.labelSpace);if(!t||!t.rect)return e;const{orientation:n,rtl:r}=this.settings.settings,o="horizontal"===n;if(t.show(r)){const{size:n}=t.settings.settings;e.edgeBleed.top=o?n:0,e.edgeBleed[r?"left":"right"]=o?0:n}return e},render(){if(!this.chart.component(this.settings.settings.target.point))return[];const{allPoints:e}=this.settings.settings.target,t=e.length?e=>this.settings.settings.target.allPoints.includes(e.key):e=>e.key===this.settings.settings.target.point,n=this.chart.findShapes("circle").filter(t);if(!n.length)return[];const{settings:r}=this.settings,o="horizontal"===r.orientation,i=o?"x":"y";n.sort(((e,t)=>e.localBounds[i]-t.localBounds[i]));const a={label:r.label,pointValue:r.pointValue,majorValue:r.majorValue,lineIndex:r.lineIndex},{height:s,width:l,edgeBleed:c}=this.rect,u={height:s,width:l,edgeBleed:c,insideStrategy:r.insideStrategy},{style:d}=this,p=Dk({nodes:n,extract:a,style:d,measureText:this.renderer.measureText,size:u,horizontal:o,rtl:r.rtl,showLabel:r.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:p}),oN({model:p,size:u,all:r.all}),p.getItems().filter((e=>e.placement&&e.node.key===this.settings.settings.target.point)).map((e=>({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:d.fontSize,fontFamily:d.fontFamily,fill:d.fill,text:a.label(e.node.data),baseline:"central",anchor:"middle"})))}},aN={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var sN={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:o,size:i,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,c=this.settings.settings.primaryExtremum(),u=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==c,p=l.length&&void 0!==u;if(!d&&!p)return[];const m=s.map((e=>e.ref)),f=l.map((e=>e.ref)),h=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:o=[],primarySeries:i=[],secondarySeries:a=[]}){const s=[];return[...i,...a].forEach((i=>{const a=i.isPrimary?t:n,l=i.isPrimary?r:o;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const o="max"===e?e=>e>t:e=>e<t,i=n?e=>o(e.point.value<0?e.start.value:e.end.value):e=>o(e.end.value);return r.filter(i)})({type:e,extremum:a,items:l}))})),(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])})}({type:t,primaryExtremum:c,secondaryExtremum:u,primaryItems:e.filter((e=>m.includes(e.end.source.field))),secondaryItems:e.filter((e=>f.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!h.length)return[];const g="horizontal"===n,v=this.rect[g?"width":"height"],y=this.resolver.resolve({data:{items:h},settings:{major:a},scaled:{major:v}}),b=("max"===t?90:-90)-(g?0:90)-(!g&&r?180:0),x=i/2*o,{fill:S}=this.settings.style;return y.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:o,y:i,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:o,y:i,data:a})}({symbol:this.symbol,size:i,fill:S,startAngle:b,x:g?v*e.major:x,y:g?x:v*e.major,data:e.data})))}};function lN({x:e,y:t,size:n,stroke:r,strokeWidth:o,fill:i}){return{type:"container",children:[{type:"line",stroke:r||i,strokeWidth:o,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:i,cx:e,cy:t,r:.25*n}]}}function cN({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))];return e.findShapes("path").filter((e=>r.some((t=>t===e.key)))).reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function uN({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function dN({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(_a.SCALE.MAJOR),o=r&&r.max&&r.max(),i="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===o?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&i(e,t.max)))}}function pN({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:o,chart:i}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:c,legendTap:u}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let p=[c?e=>e.color.value:r[d]].filter(Boolean);if(o&&l&&p.push((e=>e.color.value)),!o&&u&&(p=[e=>e.color.value]),!p.length)return[];const m=function({brush:e,chart:t}){return("value"===e.type?uN:dN)({brush:e,chart:t})}({brush:s,chart:i});return m?n.reduce(((e,t,n)=>(p.some((e=>m({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function mN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(_a.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,d=i.domain().map((e=>({color:i(Math.min(l,Math.max(s,e)))||o,offset:Math.min(1,Math.max(0,(e-s)/u))}))),p=d.map((e=>e.offset)),m=p.lastIndexOf(0),f=p.indexOf(1),h=d.slice(-1===m?0:m,-1===f?d.length:f+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:h}}function fN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(_a.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,c=0===l?1:l,u=i.domain(),d=[];for(let e=0;e<u.length-1;e++){const t=u[e],n=i(t)||o;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/c))});const r=u[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/c))})}const p=d.map((e=>e.offset)),m=p.lastIndexOf(0),f=p.indexOf(1),h=d.slice(-1===m?0:m,-1===f?d.length:f+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:h}}function hN({property:e,chart:t,connection:n,attrs:r,colorSettings:o,colorByData:i,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:c,orientation:u,rtl:d}){const p=r[e];if("gradient"!==p.type)return p;const{type:m,nil:f}=o;if(s||!i)return function({chart:e,selected:t,connection:n,gradient:r,fallback:o,orientation:i,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:c}){const u=e.scale(_a.SCALE.MAJOR),d=e.scale(_a.SCALE.COLOR),p=s?e=>u([e,0])+u.bandwidth()*l/2:e=>u(e),m=t.filter((e=>-1!==n.indexOf(e.index))),f=("vertical"===i&&c?m.reverse():m).map((e=>e.item)),h=f.map((e=>p(e.major.value))),g=Math.min(...h),v=Math.max(...h)-g,y=0===v?1:v,b=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-g)/y)),x=[];for(let e=0;e<f.length;e++){const t=f[e],n=a?t.color.value:d(t.color.value)||o,r=b[e];x.push({color:n,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:n,offset:e===f.length-1?1:Math.max(0,parseFloat((r+(b[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:x}}({chart:t,selected:a,connection:n,gradient:p,fallback:f,orientation:u,isColorCode:"color"===m,groupedByMeasure:l,itemsPerGroup:c,rtl:d});return("continuous"===m?mN:fN)({chart:t,selected:a,connection:n,gradient:p,fallback:f})}function gN({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:o,groupedByMeasure:i,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:d,rtl:p,count:m}){const f=t.getLine(l,c),{attrs:h}=f,g=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:h.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:i,orientation:a,selected:s,connection:l,commands:c,attrs:u,rtl:d,count:p}){return{path:l.map(((e,t)=>{const n=c[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:u,stroke:hN({property:"stroke",chart:e,connection:l,attrs:u,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:i,orientation:a,rtl:d,count:p})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:o,groupedByMeasure:i,itemsPerGroup:a,orientation:s,selected:u,connection:t,commands:g,attrs:h,rtl:p,count:m})))}function vN({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:o,items:i,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:d,orientation:p,rtl:m}){const f=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const o=n.typeIndex.value;var i;return e[o]||(e[o]={key:o,items:[],index:r,measureIx:null===(i=n.colorMeasureIdx)||void 0===i?void 0:i.value,primary:t.primary.some((e=>e.typeIndex===o))}),e[o].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:o}=t;return!r||(o?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:i,selectionInfo:o,seriesInfo:n}),seriesInfo:n}),{lines:h}=f.reduce(((n,i)=>{const f=pN({brush:r,selectionInfo:o,items:i.items,selectionValues:a,colorByData:l,chart:e});if(f.length<2)return n;const h=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:f});return h.length?(n.lines.push(...gN({chart:e,pathModel:t,colorSettings:s(i.measureIx),colorByData:l(i.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:d,orientation:p,lineKey:i.lineKey,primary:i.primary,selected:f,connections:h,rtl:m,count:i.items.length})),n):n}),{lines:[]}),g=[];return h.forEach((e=>g.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),g}var yN={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:cN({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=vN({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=cN({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return vN({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const bN={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},xN=e=>void 0===e.marker?bN.circle:bN[e.marker],SN=e=>void 0===e.markerFill||e.markerFill;function EN({series:e,layoutService:t}){switch(su(e)){case Ua.MARKER:return(e=>({marker:xN(e),fill:SN(e)}))(e);case Ua.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);default:return{}}}function MN(e=Ga,t){return t?e.axis===Ya.PRIMARY:e.axis===Ya.PRIMARY||su(e)===Ua.BAR}var CN={exports:{}};var wN={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};var kN="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=wN,r=kN,o=(t=e.exports={}).re=[],i=t.src=[],a=t.t={};let s=0;const l=(e,t,n)=>{const l=s++;r(l,t),a[e]=l,i[l]=t,o[l]=new RegExp(t,n?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),l("FULL",`^${i[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),l("LOOSE",`^${i[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",i[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",i[a.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),l("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",i[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}(CN,CN.exports);const NN=["includePrerelease","loose","rtl"];var TN=e=>e?"object"!=typeof e?{loose:!0}:NN.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const ON=/^[0-9]+$/,RN=(e,t)=>{const n=ON.test(e),r=ON.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var AN={compareIdentifiers:RN,rcompareIdentifiers:(e,t)=>RN(t,e)};const LN=kN,{MAX_LENGTH:IN,MAX_SAFE_INTEGER:PN}=wN,{re:DN,t:qN}=CN.exports,zN=TN,{compareIdentifiers:BN}=AN;class $N{constructor(e,t){if(t=zN(t),e instanceof $N){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>IN)throw new TypeError(`version is longer than ${IN} characters`);LN("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?DN[qN.LOOSE]:DN[qN.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>PN||this.major<0)throw new TypeError("Invalid major version");if(this.minor>PN||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>PN||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<PN)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(e){if(LN("SemVer.compare",this.version,this.options,e),!(e instanceof $N)){if("string"==typeof e&&e===this.version)return 0;e=new $N(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof $N||(e=new $N(e,this.options)),BN(this.major,e.major)||BN(this.minor,e.minor)||BN(this.patch,e.patch)}comparePre(e){if(e instanceof $N||(e=new $N(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],r=e.prerelease[t];if(LN("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return BN(n,r)}while(++t)}compareBuild(e){e instanceof $N||(e=new $N(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(LN("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return BN(n,r)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}var FN=$N;const{MAX_LENGTH:HN}=wN,{re:jN,t:VN}=CN.exports,WN=FN,_N=TN;var UN=(e,t)=>{if(t=_N(t),e instanceof WN)return e;if("string"!=typeof e)return null;if(e.length>HN)return null;if(!(t.loose?jN[VN.LOOSE]:jN[VN.FULL]).test(e))return null;try{return new WN(e,t)}catch(e){return null}};const YN=UN;var GN=(e,t)=>{const n=YN(e,t);return n?n.version:null};const KN=UN;var XN=(e,t)=>{const n=KN(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const JN=FN;var ZN=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new JN(e,n).inc(t,r).version}catch(e){return null}};const QN=FN;var eT=(e,t,n)=>new QN(e,n).compare(new QN(t,n));const tT=eT;var nT=(e,t,n)=>0===tT(e,t,n);const rT=UN,oT=nT;var iT=(e,t)=>{if(oT(e,t))return null;{const n=rT(e),r=rT(t),o=n.prerelease.length||r.prerelease.length,i=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==r[e])return i+e;return a}};const aT=FN;var sT=(e,t)=>new aT(e,t).major;const lT=FN;var cT=(e,t)=>new lT(e,t).minor;const uT=FN;var dT=(e,t)=>new uT(e,t).patch;const pT=UN;var mT=(e,t)=>{const n=pT(e,t);return n&&n.prerelease.length?n.prerelease:null};const fT=eT;var hT=(e,t,n)=>fT(t,e,n);const gT=eT;var vT=(e,t)=>gT(e,t,!0);const yT=FN;var bT=(e,t,n)=>{const r=new yT(e,n),o=new yT(t,n);return r.compare(o)||r.compareBuild(o)};const xT=bT;var ST=(e,t)=>e.sort(((e,n)=>xT(e,n,t)));const ET=bT;var MT=(e,t)=>e.sort(((e,n)=>ET(n,e,t)));const CT=eT;var wT=(e,t,n)=>CT(e,t,n)>0;const kT=eT;var NT=(e,t,n)=>kT(e,t,n)<0;const TT=eT;var OT=(e,t,n)=>0!==TT(e,t,n);const RT=eT;var AT=(e,t,n)=>RT(e,t,n)>=0;const LT=eT;var IT=(e,t,n)=>LT(e,t,n)<=0;const PT=nT,DT=OT,qT=wT,zT=AT,BT=NT,$T=IT;var FT=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return PT(e,n,r);case"!=":return DT(e,n,r);case">":return qT(e,n,r);case">=":return zT(e,n,r);case"<":return BT(e,n,r);case"<=":return $T(e,n,r);default:throw new TypeError("Invalid operator: "+t)}};const HT=FN,jT=UN,{re:VT,t:WT}=CN.exports;var _T,UT,YT,GT,KT,XT,JT,ZT,QT,eO,tO=(e,t)=>{if(e instanceof HT)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=VT[WT.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),VT[WT.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;VT[WT.COERCERTL].lastIndex=-1}else n=e.match(VT[WT.COERCE]);return null===n?null:jT(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};function nO(){if(GT)return YT;function e(t){var n=this;if(n instanceof e||(n=new e),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(e){n.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)n.push(arguments[r]);return n}function t(e,t,n){var r=t===e.head?new o(n,null,t,e):new o(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function n(e,t){e.tail=new o(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function r(e,t){e.head=new o(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function o(e,t,n,r){if(!(this instanceof o))return new o(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}GT=1,YT=e,e.Node=o,e.create=e,e.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},e.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},e.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},e.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)n(this,arguments[e]);return this.length},e.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)r(this,arguments[e]);return this.length},e.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},e.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},e.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},e.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},e.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},e.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},e.prototype.map=function(t,n){n=n||this;for(var r=new e,o=this.head;null!==o;)r.push(t.call(n,o.value,this)),o=o.next;return r},e.prototype.mapReverse=function(t,n){n=n||this;for(var r=new e,o=this.tail;null!==o;)r.push(t.call(n,o.value,this)),o=o.prev;return r},e.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},e.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},e.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},e.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},e.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var o=0,i=this.head;null!==i&&o<t;o++)i=i.next;for(;null!==i&&o<n;o++,i=i.next)r.push(i.value);return r},e.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var o=this.length,i=this.tail;null!==i&&o>n;o--)i=i.prev;for(;null!==i&&o>t;o--,i=i.prev)r.push(i.value);return r},e.prototype.splice=function(e,n,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;var a=[];for(o=0;i&&o<n;o++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(o=0;o<r.length;o++)i=t(this,i,r[o]);return a},e.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{(UT?_T:(UT=1,_T=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}))(e)}catch(e){}return YT}function rO(){if(ZT)return JT;ZT=1;class e{constructor(t,o){if(o=n(o),t instanceof e)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new e(t.raw,o);if(t instanceof r)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+t);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!d(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&p(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=t.get(n);if(i)return i;const p=this.options.loose,m=p?a[s.HYPHENRANGELOOSE]:a[s.HYPHENRANGE];e=e.replace(m,C(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(a[s.COMPARATORTRIM],l),o("comparator trim",e,a[s.COMPARATORTRIM]),e=(e=(e=e.replace(a[s.TILDETRIM],c)).replace(a[s.CARETTRIM],u)).split(/\s+/).join(" ");const h=p?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],g=e.split(" ").map((e=>f(e,this.options))).join(" ").split(/\s+/).map((e=>M(e,this.options))).filter(this.options.loose?e=>!!e.match(h):()=>!0).map((e=>new r(e,this.options)));g.length;const v=new Map;for(const e of g){if(d(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const y=[...v.values()];return t.set(n,y),y}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>m(e,n)&&t.set.some((t=>m(t,n)&&e.every((e=>t.every((t=>e.intersects(t,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(w(this.set[t],e,this.options))return!0;return!1}}JT=e;const t=new(function(){if(XT)return KT;XT=1;const e=nO(),t=Symbol("max"),n=Symbol("length"),r=Symbol("lengthCalculator"),o=Symbol("allowStale"),i=Symbol("maxAge"),a=Symbol("dispose"),s=Symbol("noDisposeOnSet"),l=Symbol("lruList"),c=Symbol("cache"),u=Symbol("updateAgeOnGet"),d=()=>1,p=(e,t,n)=>{const r=e[c].get(t);if(r){const t=r.value;if(m(e,t)){if(h(e,r),!e[o])return}else n&&(e[u]&&(r.value.now=Date.now()),e[l].unshiftNode(r));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[i])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[i]&&n>e[i]},f=e=>{if(e[n]>e[t])for(let r=e[l].tail;e[n]>e[t]&&null!==r;){const t=r.prev;h(e,r),r=t}},h=(e,t)=>{if(t){const r=t.value;e[a]&&e[a](r.key,r.value),e[n]-=r.length,e[c].delete(r.key),e[l].removeNode(t)}};class g{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const v=(e,t,n,r)=>{let i=n.value;m(e,i)&&(h(e,n),e[o]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};return KT=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[t]=e.max||1/0;const n=e.length||d;if(this[r]="function"!=typeof n?d:n,this[o]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[i]=e.maxAge||0,this[a]=e.dispose,this[s]=e.noDisposeOnSet||!1,this[u]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[t]=e||1/0,f(this)}get max(){return this[t]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[i]=e,f(this)}get maxAge(){return this[i]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[r]&&(this[r]=e,this[n]=0,this[l].forEach((e=>{e.length=this[r](e.value,e.key),this[n]+=e.length}))),f(this)}get lengthCalculator(){return this[r]}get length(){return this[n]}get itemCount(){return this[l].length}rforEach(e,t){t=t||this;for(let n=this[l].tail;null!==n;){const r=n.prev;v(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[l].head;null!==n;){const r=n.next;v(this,e,n,t),n=r}}keys(){return this[l].toArray().map((e=>e.key))}values(){return this[l].toArray().map((e=>e.value))}reset(){this[a]&&this[l]&&this[l].length&&this[l].forEach((e=>this[a](e.key,e.value))),this[c]=new Map,this[l]=new e,this[n]=0}dump(){return this[l].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[l]}set(e,o,u){if((u=u||this[i])&&"number"!=typeof u)throw new TypeError("maxAge must be a number");const d=u?Date.now():0,p=this[r](o,e);if(this[c].has(e)){if(p>this[t])return h(this,this[c].get(e)),!1;const r=this[c].get(e).value;return this[a]&&(this[s]||this[a](e,r.value)),r.now=d,r.maxAge=u,r.value=o,this[n]+=p-r.length,r.length=p,this.get(e),f(this),!0}const m=new g(e,o,p,d,u);return m.length>this[t]?(this[a]&&this[a](e,o),!1):(this[n]+=m.length,this[l].unshift(m),this[c].set(e,this[l].head),f(this),!0)}has(e){if(!this[c].has(e))return!1;const t=this[c].get(e).value;return!m(this,t)}get(e){return p(this,e,!0)}peek(e){return p(this,e,!1)}pop(){const e=this[l].tail;return e?(h(this,e),e.value):null}del(e){h(this,this[c].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[c].forEach(((e,t)=>p(this,t,!1)))}}}())({max:1e3}),n=TN,r=oO(),o=kN,i=FN,{re:a,t:s,comparatorTrimReplace:l,tildeTrimReplace:c,caretTrimReplace:u}=CN.exports,d=e=>"<0.0.0-0"===e.value,p=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},f=(e,t)=>(o("comp",e,t),e=y(e,t),o("caret",e),e=g(e,t),o("tildes",e),e=x(e,t),o("xrange",e),e=E(e,t),o("stars",e),e),h=e=>!e||"x"===e.toLowerCase()||"*"===e,g=(e,t)=>e.trim().split(/\s+/).map((e=>v(e,t))).join(" "),v=(e,t)=>{const n=t.loose?a[s.TILDELOOSE]:a[s.TILDE];return e.replace(n,((t,n,r,i,a)=>{let s;return o("tilde",e,t,n,r,i,a),h(n)?s="":h(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:h(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",s),s}))},y=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{o("caret",e,t);const n=t.loose?a[s.CARETLOOSE]:a[s.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),h(n)?l="":h(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:h(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},x=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?a[s.XRANGELOOSE]:a[s.XRANGE];return e.replace(n,((n,r,i,a,s,l)=>{o("xRange",e,n,r,i,a,s,l);const c=h(i),u=c||h(a),d=u||h(s),p=d;return"="===r&&p&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(u&&(a=0),s=0,">"===r?(r=">=",u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):u?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},E=(e,t)=>(o("replaceStars",e,t),e.trim().replace(a[s.STAR],"")),M=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?s.GTE0PRE:s.GTE0],"")),C=e=>(t,n,r,o,i,a,s,l,c,u,d,p,m)=>`${n=h(r)?"":h(o)?`>=${r}.0.0${e?"-0":""}`:h(i)?`>=${r}.${o}.0${e?"-0":""}`:a?">="+n:`>=${n}${e?"-0":""}`} ${l=h(c)?"":h(u)?`<${+c+1}.0.0-0`:h(d)?`<${c}.${+u+1}.0-0`:p?`<=${c}.${u}.${d}-${p}`:e?`<${c}.${u}.${+d+1}-0`:"<="+l}`.trim(),w=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==r.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return JT}function oO(){if(eO)return QT;eO=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}a("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],i=t.match(n);if(!i)throw new TypeError("Invalid comparator: "+t);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new s(i[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new l(e.value,n).test(this.value);if(""===e.operator)return""===e.value||new l(this.value,n).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),c=i(this.semver,"<",e.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=i(this.semver,">",e.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||a&&s||c||u}}QT=t;const n=TN,{re:r,t:o}=CN.exports,i=FT,a=kN,s=FN,l=rO();return QT}const iO=rO();var aO=(e,t,n)=>{try{t=new iO(t,n)}catch(e){return!1}return t.test(e)};const sO=rO();var lO=(e,t)=>new sO(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const cO=FN,uO=rO();var dO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new uO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&-1!==o.compare(e)||(r=e,o=new cO(r,n)))})),r};const pO=FN,mO=rO();var fO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new mO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&1!==o.compare(e)||(r=e,o=new pO(r,n)))})),r};const hO=FN,gO=rO(),vO=wT;var yO=(e,t)=>{e=new gO(e,t);let n=new hO("0.0.0");if(e.test(n))return n;if(n=new hO("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let o=null;r.forEach((e=>{const t=new hO(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!vO(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})),!o||n&&!vO(n,o)||(n=o)}return n&&e.test(n)?n:null};const bO=rO();var xO=(e,t)=>{try{return new bO(e,t).range||"*"}catch(e){return null}};const SO=FN,EO=oO(),{ANY:MO}=EO,CO=rO(),wO=aO,kO=wT,NO=NT,TO=IT,OO=AT;var RO=(e,t,n,r)=>{let o,i,a,s,l;switch(e=new SO(e,r),t=new CO(t,r),n){case">":o=kO,i=TO,a=NO,s=">",l=">=";break;case"<":o=NO,i=OO,a=kO,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(wO(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const c=t.set[n];let u=null,d=null;if(c.forEach((e=>{e.semver===MO&&(e=new EO(">=0.0.0")),u=u||e,d=d||e,o(e.semver,u.semver,r)?u=e:a(e.semver,d.semver,r)&&(d=e)})),u.operator===s||u.operator===l)return!1;if((!d.operator||d.operator===s)&&i(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const AO=RO;var LO=(e,t,n)=>AO(e,t,">",n);const IO=RO;var PO=(e,t,n)=>IO(e,t,"<",n);const DO=rO();var qO=(e,t,n)=>(e=new DO(e,n),t=new DO(t,n),e.intersects(t));const zO=aO,BO=eT;const $O=rO(),FO=oO(),{ANY:HO}=FO,jO=aO,VO=eT,WO=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===HO){if(1===t.length&&t[0].semver===HO)return!0;e=n.includePrerelease?[new FO(">=0.0.0-0")]:[new FO(">=0.0.0")]}if(1===t.length&&t[0].semver===HO){if(n.includePrerelease)return!0;t=[new FO(">=0.0.0")]}const r=new Set;let o,i,a,s,l,c,u;for(const t of e)">"===t.operator||">="===t.operator?o=_O(o,t,n):"<"===t.operator||"<="===t.operator?i=UO(i,t,n):r.add(t.semver);if(r.size>1)return null;if(o&&i){if(a=VO(o.semver,i.semver,n),a>0)return null;if(0===a&&(">="!==o.operator||"<="!==i.operator))return null}for(const e of r){if(o&&!jO(e,String(o),n))return null;if(i&&!jO(e,String(i),n))return null;for(const r of t)if(!jO(e,String(r),n))return!1;return!0}let d=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver,p=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver;d&&1===d.prerelease.length&&"<"===i.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(u=u||">"===e.operator||">="===e.operator,c=c||"<"===e.operator||"<="===e.operator,o)if(p&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===p.major&&e.semver.minor===p.minor&&e.semver.patch===p.patch&&(p=!1),">"===e.operator||">="===e.operator){if(s=_O(o,e,n),s===e&&s!==o)return!1}else if(">="===o.operator&&!jO(o.semver,String(e),n))return!1;if(i)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=UO(i,e,n),l===e&&l!==i)return!1}else if("<="===i.operator&&!jO(i.semver,String(e),n))return!1;if(!e.operator&&(i||o)&&0!==a)return!1}return!(o&&c&&!i&&0!==a)&&(!(i&&u&&!o&&0!==a)&&(!p&&!d))},_O=(e,t,n)=>{if(!e)return t;const r=VO(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},UO=(e,t,n)=>{if(!e)return t;const r=VO(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var YO=(e,t,n={})=>{if(e===t)return!0;e=new $O(e,n),t=new $O(t,n);let r=!1;e:for(const o of e.set){for(const e of t.set){const t=WO(o,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const GO=CN.exports;var KO={re:GO.re,src:GO.src,tokens:GO.t,SEMVER_SPEC_VERSION:wN.SEMVER_SPEC_VERSION,SemVer:FN,compareIdentifiers:AN.compareIdentifiers,rcompareIdentifiers:AN.rcompareIdentifiers,parse:UN,valid:GN,clean:XN,inc:ZN,diff:iT,major:sT,minor:cT,patch:dT,prerelease:mT,compare:eT,rcompare:hT,compareLoose:vT,compareBuild:bT,sort:ST,rsort:MT,gt:wT,lt:NT,eq:nT,neq:OT,gte:AT,lte:IT,cmp:FT,coerce:tO,Comparator:oO(),Range:rO(),satisfies:aO,toComparators:lO,maxSatisfying:dO,minSatisfying:fO,minVersion:yO,validRange:xO,outside:RO,gtr:LO,ltr:PO,intersects:qO,simplifyRange:(e,t,n)=>{const r=[];let o=null,i=null;const a=e.sort(((e,t)=>BO(e,t,n)));for(const e of a){zO(e,t,n)?(i=e,o||(o=e)):(i&&r.push([o,i]),i=null,o=null)}o&&r.push([o,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push("<="+t):s.push(`${e} - ${t}`):s.push(">="+e):s.push("*");const l=s.join(" || "),c="string"==typeof t.raw?t.raw:String(t);return l.length<c.length?l:t},subset:YO},XO="0.23.1";const JO=e=>!e||KO.lt(KO.coerce(e),KO.coerce(XO));function ZO(){return function({layout:e}){var t,n,r;const o=E(e,"qHyperCube.qMeasureInfo",[]),i=o.some((({series:e=Ga})=>su(e)===Ua.LINE)),a=pe.continuous(e,(()=>i&&se.isTime(!0,e))),s=!JO(E(e,"version","")),l=o.filter((({series:e=Ga})=>su(e)===Ua.BAR)),c=l.length,u=l.filter((({series:e=Ga})=>e.axis!==Ya.SECONDARY)).length,d=l.filter((({series:e=Ga})=>e.axis===Ya.SECONDARY)).length,p=s?u>1||d>1:c>1,m=("grouped"!==E(e,"barGrouping.grouping")||a)&&p,f=!m&&c>1,h=s&&m&&(u>0&&d>1||u>1&&d>0),g=!(null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qLocked);return{canBeContinuous:se.canBeContinuous(e),isDiscrete:!a,isContinuous:a,isTime:se.isTime(a,e),isSnapshot:pe.snapshot(e),isBarSeriesStacked:m,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:h,isGrouped:f||h,isGroupedByMeasure:f||h,isDimensionLocked:g,groupSize:h?2:c,hasLineSeries:i}}}function QO({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}const eR=e=>"number"==typeof e&&!Number.isNaN(e);function tR({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),o=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),i=o.filter((e=>su(e.series)===Ua.BAR)),a=o.filter((e=>su(e.series)===Ua.LINE)),s=o.filter((e=>su(e.series)===Ua.MARKER));return{min:Math.min(...o.filter((e=>eR(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>eR(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...i.filter((e=>eR(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>eR(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>eR(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>eR(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>eR(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>eR(e.qMax))).map((e=>e.qMax)))}}}}function nR({isPrimary:e,layoutService:t,seriesModel:n}){const r=tR({isPrimary:e,layoutService:t,seriesModel:n}),o=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(Ua.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:o}=n,i={min:NaN,max:NaN};return o.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),i.min=Number.isNaN(i.min)?t:Math.min(t,i.min),i.max=Number.isNaN(i.max)?n:Math.max(n,i.max)})),i}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=o({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function rR({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:o}){const i={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta,o=n.query.series(Ua.BAR).filter((t=>t.isPrimary===e)).length;return!r||o<2?tR({isPrimary:e,layoutService:t,seriesModel:n}):nR({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:o});return{query:{getExtrema:()=>i},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,o=r("measureAxes."+(e?0:1),{});if(o.autoMinMax)return n;const{minMax:i,min:a,max:s}=o;return"min"!==i&&"minMax"!==i||(n.min=a),"max"!==i&&"minMax"!==i||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return i.explicit.min=s,i.explicit.max=l,i.meta.hasExplicitMin=!Number.isNaN(s),i.meta.hasExplicitMax=!Number.isNaN(l),i.meta.hasExplicit=i.meta.hasExplicitMin||i.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:c}=a({dataPage:t}),u=o.query.seriesByAxis(e).some((e=>su(e)===Ua.BAR)),d=u?Math.min(n,0):n,p=u?Math.max(r,0):r,m=u?Math.min(s.min,0):s.min,f=u?Math.max(s.max,0):s.max,h=u?Math.min(l.min,0):l.min,g=u?Math.max(l.max,0):l.max,v=u?Math.min(c.min,0):c.min,y=u?Math.max(c.max,0):c.max;i.implicit.min=Number.isFinite(d)?d:0,i.implicit.max=Number.isFinite(p)?p:0,i.implicit.bar.min=Number.isFinite(m)?m:0,i.implicit.bar.max=Number.isFinite(f)?f:0,i.implicit.line.min=Number.isFinite(h)?h:0,i.implicit.line.max=Number.isFinite(g)?g:0,i.implicit.marker.min=Number.isFinite(v)?v:0,i.implicit.marker.max=Number.isFinite(y)?y:0,i.min=Number.isNaN(i.explicit.min)?i.implicit.min:i.explicit.min,i.max=Number.isNaN(i.explicit.max)?i.implicit.max:i.explicit.max,i.meta.hasExplicitMin&&!i.meta.hasExplicitMax&&(i.max=Math.max(i.min,i.max)),i.meta.hasExplicitMax&&!i.meta.hasExplicitMin&&(i.min=Math.min(i.min,i.max)),i.meta.includesZero=!!((0-i.min)*(0-i.max)<=0)}))}}}}function oR({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function iR({min:e,max:t,count:n,threshold:r,disable:o}){const i=function(e,t,n){const r=Ar().domain([e,t]);return r.nice(n),r}(e,t,n),a=function({min:e,max:t,threshold:n,scale:r,disable:o}){const i={start:!0,stop:!0};if(o)return i;const[a,s]=r.domain();return 0!==e&&0!==a&&(i.start=r(e)>n),0!==t&&0!==s&&(i.stop=r(t)<1-n),i}({min:e,max:t,threshold:r,scale:i,disable:o});if(!a.start||!a.stop){const[e,t]=i.domain(),r=i.ticks(n),o=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;i.domain([a.start?e:e-o,a.stop?t:t+s]),i.nice(n)}return i}const aR=50,sR=100,lR=200,cR=125;function uR({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return aR;case 1:return sR;case 2:return lR;default:return e*cR}})(t.getLayoutValue(e+".spacing",1));return Math.max(1,Math.round(n/r))}function dR({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:i,min:a,max:s}){const l=uR({config:e,layoutService:n,size:i}),c=iR({min:a,max:s,count:l,threshold:.05,disable:!0}),u=c.domain(),d={roundedMin:u[0],roundedMax:u[1],ticks:c.ticks(l)},p="horizontal"===r.meta.major.orientation?"height":"width",m=e=>o(e)[p],f=t.formatter(e.formatter),h=()=>{const e=d.ticks.map(f);return!e.some(((t,n)=>e.indexOf(t)!==n))&&(e=>{const t=i/d.ticks.length;return Math.max(...e.map(m))<=t})(e)};for(let e=l-1;e>0&&!h();e--)c.domain([a,s]),c.nice(e),[d.roundedMin,d.roundedMax]=c.domain(),d.ticks=c.ticks(e);return d}function pR({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function mR({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function fR({config:e,chart:t,extrema:n,min:r,max:o}){const i={roundedMin:0,roundedMax:0,ticks:[]},a=iR({min:r,max:o,count:10,threshold:.15,disable:!0});[i.roundedMin,i.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),c=l?pR:mR;i.ticks=s.filter(((e,t,n)=>c({tick:e,index:t,ticks:n})));i.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(i.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const u=t.formatter(e.formatter),d=i.ticks.map(u);return d.some(((e,t)=>d.indexOf(e)!==t))&&(i.ticks=[i.ticks[0],i.ticks[i.ticks.length-1]]),i}function hR({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function gR({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l}){const{ticks:c,roundedMin:u,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const c=dR({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:a,min:s,max:l});return oR({extrema:o,ticks:c.ticks})?c:fR({config:e,chart:t,extrema:o,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l}),p=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const o=e[r],i=(e[r+1]-o)/(t+1);for(let e=1;e<=t;e++)n.push(o+i*e)}return n}({ticks:c,count:1});return{min:u,max:d,values:[...hR({ticks:c,extrema:o}).map((e=>({value:e,isMinor:!1}))),...p.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value))}}function vR({config:e,chart:t,layoutService:n,dockService:r,measureText:o,extrema:i,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:i});return gR({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l})}function yR({config:e,chart:t,layoutService:n,extremumModel:r,dockService:o,seriesModel:i,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,c=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:o,seriesModel:i,themeService:a}){const{measureText:s}=q.renderer("svg")();return()=>{const l=a.getStyles(),c=function({dockService:e,seriesModel:t,chart:n}){var r;const o=n.component(t.meta.seriesComponentKeys[0]),i=null!==(r=null==o?void 0:o.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?i.height:i.width}({chart:e,dockService:n,seriesModel:i}),u=r.query.getExtrema();return vR({config:t,chart:e,layoutService:o,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:u,size:c})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:o,seriesModel:i,themeService:a}),u=()=>(s.locked&&s.resolved||(s.resolved=c()),s.resolved);return{query:{getValues:()=>u().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:u().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:u().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function bR({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:o,fieldType:i}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===o?"measure"===i?()=>({type:Ua.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===Ua.LINE?2:t!==Ua.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==Ua.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function xR({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function SR({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:o,genericObjectModel:i,layoutService:a,picasso:s,seriesModel:l,viewState:c}){let u;const{theme:d,translator:p}=o,m={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return u=k({picasso:s,model:i,app:n,translator:p,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map((e=>e.color));return{theme:d,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:_a.SCALE.COLOR}},config:{auto:xR,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>m.wrappedScales,legendComponents:()=>m.legendComponents,legendInteractions:()=>m.legendInteractions,updateLegend:()=>{const{components:t,interactions:n,scales:i}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:o,colorService:i,actions:a}){const{options:s}=o,l={eventName:"legend-c",key:_a.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",rtl:"rtl"===s.direction,settings:bR({layoutService:n,seriesModel:r,colorService:i})},{components:c,interactions:u}=i.getLegend(l,{actions:a,navigationDisabled:!a.interact.enabled()}),d=i.getScales();return{components:c.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=d[_a.SCALE.COLOR+"Range"];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:u,scales:d}}({viewState:c,chart:r,environment:o,colorService:u,seriesModel:l,layoutService:a,actions:e});m.wrappedScales=i,m.legendComponents=t,m.legendInteractions=n}}}),u}const ER="REJECTED",MR=()=>{},CR=1e4,wR=2,kR=20,NR=200,TR=10;var OR={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),o=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,o-e.qArea.qTop),s=Math.min(o+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,i-e.qArea.qLeft),c=Math.min(i+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:o,qLeft:i},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-TR<=t.qTop,o=n.qLeft+n.qWidth+TR>=t.qLeft+t.qWidth,i=n.qTop+n.qHeight+TR>=t.qTop+t.qHeight,a=n.qLeft-TR<=t.qLeft;return r&&t.qTop>0||o&&t.qLeft+t.qWidth<e.width||i&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var RR={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),i=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-i),l={qArea:{qHeight:a-i,qWidth:e.qArea.qWidth,qTop:r,qLeft:o},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=i;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-TR<=t.qTop,o=n.qTop+n.qHeight+TR>=t.qTop+t.qHeight;return r&&t.qTop>0||o&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const r={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&r.args.push(600),r}}};var AR={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const LR="pages";const IR="discretePan";function PR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{type:"Pan",key:"discrete:pan",options:{event:IR,pointers:1,threshold:10,enable(r,o){return this.started===IR||!o||!(!t.scroll.enabled()||!i.enabled())&&e.componentsFromPoint({x:o.center.x,y:o.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started=IR;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},discretePanmove(e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&o?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,i.scroll(s)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function DR({chart:e,componentKey:t,actions:n,scroller:r}){return function(o){if(!n.scroll.enabled()||!r.enabled())return;const[i]=e.componentsFromPoint({x:o.clientX,y:o.clientY}).filter((e=>e.key===t));if(!i)return;o.preventDefault();const a=Math.abs(o.deltaY)>Math.abs(o.deltaX)?o.deltaY:o.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function qR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{gestures:[PR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i})],native:{type:"native",events:{wheel:DR({chart:e,actions:t,componentKey:n,scroller:i})}}}}function zR({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(CR/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(NR,n));return{width:e,height:Math.max(kR,Math.min(n*wR,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:o}=t({width:e.qWidth,height:e.qHeight}),i=o?Math.ceil((o-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:o?Math.min(o,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:o?Math.max(0,Math.min(e.qTop-i,n.height-o)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function BR(e){let t,n;const r=o=>{t=o;const{method:i,args:a}=t.request;e[i](...a).then((e=>{if(t.canceled||n)return t.reject(ER),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},o=e=>new Promise(((o,i)=>{const a={request:e,resolve:o,reject:i,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(ER),n=e})(a):r(a)}));return o.isProcessing=()=>!!t,o.hasQueued=()=>!!n,o.cancel=()=>{o.isProcessing()&&t.cancel(),o.hasQueued()&&(n.reject(ER),n=null)},o}const $R={command:{update:()=>{}}};var FR={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:o}=t,i=e.getDataPages()[0],a=o/r;return[a,n.inView>=n.inTotal?a+1:a+i.qArea.qWidth/n.inView]}};var HR={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=void 0===r?4:r,i=Math.max(0,Math.floor(t)-o/2);return{qTop:i,qHeight:Math.min(e.meta.size.y-i,Math.max(0,Math.ceil(n+o))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:o}=t,i=e.getDataPages()[0],a=r/n.inView,s=(o+i.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+i.qArea.qHeight/n.inView]}};function jR(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function VR(e,t){const n=[];for(let r=0;r<e.length;r++){const o=t(e[r]);-1===n.indexOf(o)&&n.push(o)}return n.length}function WR(e){return VR(e.qMatrix,(e=>e[0].qElemNumber))-1}var _R={inTotal:function({layoutService:e}){const t=jR(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=jR(e),i=void 0===r?o:r,a=t/(o+1),s=Math.max(0,Math.floor((t-a-i/2)/o));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+i)/o+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const o=jR(e),i=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=WR(i),c=i.qArea.qHeight*o+l,u=(s+(i.qArea.qTop*o+i.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const UR=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function YR(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return UR(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const o=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const i=e[t][0].qElemNumber;-1===o.indexOf(i)&&(o.push(i),r--)}return n.count=o.length-1,n})(t.qMatrix,n);return r.successful?r.count:UR(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return UR(e,n);return VR(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var GR={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const o=YR(t).itemOffset(e(),n),i=Math.max(0,Math.floor(n-o));return{qTop:i,qHeight:Math.min(t.meta.size.y-i,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:o,upperBound:i}){const a=t.getDataPages()[0],s=o/r.inView,{item:l,pixel:c}=n,u=YR(t).area(e(),l,a.qArea),d=WR(a),p=a.qArea.qHeight+d,m=c===i?(r.inView-p)*s/o:(c+(a.qArea.qTop+u)*s)/o;return[m,r.inView>=r.inTotal?m+1:m+p/r.inView]}};function KR({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:o,renderer:i,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:p,LABELLESS:m}=r[n.meta.chart.mode],f="horizontal"===n.meta.major.orientation,{axisDisplayMode:h="auto",maxVisibleItems:g=10,label:v}=s,y=f?t.width:t.height,b=y/l>=p;switch(h){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);case"auto":default:return c?y/m:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:o,itemSize:i,label:a}){if(o||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:p}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return p>i;const m=(90-d)*(Math.PI/180);return p>Math.cos(m)*i}({chart:e,isHorizontal:f,axisKey:o,renderer:i,isGrouped:a,itemSize:p,label:v})?y/d:l:y/d}}var XR={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function JR({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:r,defaultValue:o,index:i})=>{const a=n&&Object.hasOwnProperty.call(n,r)?n[r]:o;if(void 0===i)return a;const{style:s}=e.getHyperCubeValue((e=>`qMeasureInfo.${e}.styling`)(i),[]).filter((e=>e.key===t))[0]||{};return s&&Object.hasOwnProperty.call(s,r)?s[r]:a}}function ZR({dataset:e,data:t,valueData:n}){var r;const{source:o,label:i,value:a}=n,s=e(o.key).field(o.field);return s.raw().isCustomFormatted?i:""===a||Number.isNaN(a)||"NaN"===a||null!==(r=t.null)&&void 0!==r&&r.value?"-":s.formatter()(a)}function QR({chart:e,actions:t,translator:n,rtl:r,dockService:o,seriesModel:i,colorService:a,themeService:s,propertiesModel:l,custom:c}){const u=s.getStyles(),d=({data:e})=>e.major.value,p=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:m}=_a.COMPONENT,{PRIMARY:f,SECONDARY:h}=Ya,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:o,SLICED_HAT:i}=_a.COMPONENT,{PRIMARY:a,SECONDARY:s}=Ya,{orientation:l}=e.meta.chart,c="vertical"===l,u=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[d]=t,{triggerer:p}=l,m=p===n.MAJOR?d.data.value:d.data.major.value;if(c){const t=e.findShapes("container").find((e=>(e.key===`${i}-max-${a}`||e.key===`${i}-max-${s}`)&&e.data&&e.data.value===m&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const f=e.findShapes("path").find((e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===o+"-max")&&e.data.major.value===m));if(c&&f)return{key:f.key,bounds:f.bounds};const h=e.findShapes("path").find((e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===o+"-min")&&e.data.major.value===m)),g=e.findShapes("*").filter((e=>u.indexOf(e.key)>-1&&e.data&&e.data.major.value===m));if(c&&h&&!g.find((e=>e.data.end.source.field!==h.data.end.source.field)))return{key:h.key,bounds:h.bounds};const v=f||h;return!(c||!v||g.find((e=>e.data.end.source.field!==v.data.end.source.field)))&&{key:v.key,bounds:v.bounds}},"collectible"]}({dockService:o,seriesModel:i});return N({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:u.fontFamily},main:{key:_a.COMPONENT.TOOLTIP,getGroupByValue:d,collectibles:[...i.meta.barComponentKeys.map((e=>({key:e,type:"bar",major:d}))),...i.meta.pointComponentKeys.map((e=>({key:e,type:"point",major:d}))),...i.meta.markers.map((e=>({key:e.key,type:e.type,major:d})))],triggers:[{keys:[_a.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:p},placement:g},{keys:[...i.meta.barComponentKeys,...i.meta.markerComponentKeys,`${m}-max-${f}`,`${m}-max-${h}`,`${m}-min-${f}`,`${m}-min-${h}`,`${_a.COMPONENT.BAR_OOB}-max-${f}`,`${_a.COMPONENT.BAR_OOB}-max-${h}`,`${_a.COMPONENT.BAR_OOB}-min-${f}`,`${_a.COMPONENT.BAR_OOB}-min-${h}`,_a.COMPONENT.DATA_OOB_MARKER+"-max",_a.COMPONENT.DATA_OOB_MARKER+"-min"],collect:{from:"dimension",by:d,filter:p},placement:g},{keys:[...i.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:d,filter:p},placement:g}],section:({h:e,nodes:t,dataset:n,create:r,util:o})=>{const[i]=t,{title:a,description:s,measures:l}=c.isEnabled()?c.getAttributes({dataset:n,nodes:[i]}):{},u=[];a&&u.push(r.text({value:a,style:{bold:!0}})),s&&u.push(r.text({value:s}));const d=c.hideBasic();d&&!l.length&&(a||s)||u.push(r.text({value:i.data.label,style:{bold:!0}})),d||(u.push(r.color({nodes:t,property:_a.SCALE.COLOR})),u.push(...t.map((e=>{const{segment:t,end:i}=e.data,a=t||i,{key:s,field:l}=a.source;return r.measure({label:o.dataset.title(s,l),value:ZR({dataset:n,data:e.data,valueData:a})})})))),l&&u.push(...l.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),c.chart.isEnabled()&&(c.chart.hasLimitation()?(c.chart.destroy(),u.push(r.raw({value:c.chart.createLimitationRow()}))):u.push(r.raw({value:c.chart.createContainer({h:e})})));const{customTooltipImages:p}=i.data;return c.isEnabled()&&p&&u.push(...p.map((t=>r.raw({value:c.createImageRow({value:t,h:e})})))),u},layout:{grouping:!0,single:()=>!(!c.isEnabled()||!c.hasImages())||c.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>c.isEnabled()&&c.hasImages()?c.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{c.chart.isEnabled()&&!c.chart.hasLimitation()&&c.chart.show({nodes:e,properties:l.query.getProperties()})}},interaction:{mouseleave:()=>{c.chart.isEnabled()&&c.chart.hasAlternateState()&&c.chart.hide()}}}},legend:{keys:{tooltip:_a.COMPONENT.LEGEND_TOOLTIP,component:_a.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:eA}=Pd;const tA={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};const nA={query:{getCanScroll:()=>!0}};function rA({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function oA({setSelectionInfo:e,event:t,components:n,clear:r}){const o=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:o,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&o[0]===_a.COMPONENT.LEGEND_CATEGORICAL}),r()}function iA({chart:e,actions:t}){const o=b(),i=a(),[s,l]=n();return r((()=>{if(null==e||!e.update||!e.scale||!o)return null;const n=e.scale(_a.SCALE.MAJOR),r=I({chart:e,actions:t,selections:o,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{clear:rA},selectionEvents:{start:oA}}});r.setLayout(i);const{destroy:a}=r;return l(r),()=>{a()}}),[o,null==e?void 0:e.update,null==e?void 0:e.scale]),r((()=>{null!=s&&s.setLayout&&i&&s.setLayout(i)}),[i]),s}const aA={version:"1.19.0",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var sA=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let o;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)o=su(n[e].qDef.series),o===Ua.BAR?r[0]=1:o===Ua.LINE?r[1]=1:r[2]=1;const i=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(i)},lA=e=>(t,n)=>{let r;const o=t.qHyperCubeDef.qMeasures[n];if(o){const{type:e}=o.qDef.series;r=e===Ua.LINE?"Visualizations.Descriptions.HeightLine":e===Ua.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function cA(e){var t,n;const r=e.qHyperCubeDef.qMeasures,o=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===o&&1===r.length&&su(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===Ua.LINE?e.color.mode="primary":"byDimension"===o&&r.length>1&&(e.color.mode="byMultiple")}function uA(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:sA(t)},measures:{min:1,max:15,description:lA(t),added({qDef:e},t){var n;cA(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:Ua.LINE,axis:Ya.SECONDARY}:e.series={type:Ua.BAR,axis:Ya.PRIMARY})},moved(e,t){cA(t)}}}}function dA(e){const t=uA(e);return{properties:aA,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const o=V.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),i="linechart"===e.properties.visualization,a=[];o.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:i?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return o.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&Z(!0,o.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),o},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>V.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}function pA(e){if(null!=e&&e.isEnabled("SENSECLIENT_IM_311_STYLINGPANEL_COMBOCHART"))return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barSection:{translation:"Visualizations.Descriptions.Bars",component:"accordion",items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue:.7,schemaIgnore:!0}}}}}}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{translation:"Line options",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"Thickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"Type",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"Curve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}};const t={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}]},n={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:e=>"none"!==E(e,`${((e,t)=>{let n=-1;for(let r=0;r<e.length;r++)if(e[r].key===t){n=r;break}return n})(e,"bar")}.${t.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},r={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},o={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},i={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},a={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]};return{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues(e){const s="grouped"===e.barGrouping.grouping,l=e.qHyperCubeDef.qMeasures.filter((e=>su(e.qDef.series)===Ua.BAR)).length,c=s&&l>1;return[{key:"bar",style:{strokeWidth:t.defaultValue,strokeColor:n.defaultValue(),width:c?.9:.7}},{key:"line",style:{dataPointSize:r.defaultValue,lineThickness:o.defaultValue,lineType:i.defaultValue,lineCurve:a.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:t,barStrokeColor:n,barWidth:{component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>su(e.qDef.series)===Ua.LINE));return!pe.continuous(n.layout,r&&se.isTime(!0,n.layout))},defaultValue:.7,min:.01,max:1,step:.01}}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:r,lineThickness:o,lineType:i,lineCurve:a}}}}}}}const mA={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barsSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barsHeader:{component:"header",translation:"Visualizations.Descriptions.Bars"},outlineSection:{component:"items",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891"},width:"auto",component:"color-picker"}}}}},widthSection:{component:"items",items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:.7}}}}}}}}},linesSection:{component:"items",items:{wrapperItem:{component:"items",items:{linesHeader:{component:"header",translation:"Visualizations.Descriptions.Lines"},dataPointSection:{component:"items",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}},optionsSection:{component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollStartPos:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}}}};function fA(e){const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=Ga})=>su(e)===Ua.LINE));return pe.continuous(e,(()=>t&&se.isTime(!0,e)))}function hA(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function gA(e){var t,n,r;return hA(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.mode)&&void 0!==t?t:"primary")}function vA(e){var t,n;return hA(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function yA(e){var t,n,r,o,i;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(o=null==e||null===(i=e.color)||void 0===i?void 0:i.expressionLabel)&&void 0!==o?o:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function bA(e){return vA(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function xA(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...yA(n),...bA(e)]:bA(e)}(t,n,e)))}function SA(e){var t,n;const r={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||fA(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},o={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return su(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ua.MARKER}},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return su(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ua.MARKER&&!["line"].includes(e.qDef.series.marker)}},a={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>hA(...e)},s=null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:r,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:o,seriesMarkerFill:i}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:a,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=s.getDataColorSpecials(),n=null===(e=s.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:gA},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:vA}}}}}}}}}}}}const EA=!0;function MA(e,t,n){let r;const o=n||0;var i,a;t?r=t.getMeasureLayouts():r=null!==(i=null==e||null===(a=e.qHyperCubeDef)||void 0===a?void 0:a.qMeasures)&&void 0!==i?i:[];return r.filter((e=>{const{series:t}=e||{};return 0===o?MN(t,EA):!MN(t,EA)}))}function CA(e,t){return t.getMeasures().filter((e=>su(e.qDef.series)===Ua.LINE)).length>0}function wA(e,t,n){const r=t.getMeasures().filter((e=>su(e.qDef.series)===Ua.BAR));return r.filter((e=>e.qDef.series.axis!==Ya.SECONDARY)).length>n||r.filter((e=>e.qDef.series.axis===Ya.SECONDARY)).length>n}const kA=(e,t,n,r)=>{const o="vertical"===t.layout.orientation||fA(t.layout)?"y":"x",i=MA(e,t,r).map((e=>e.qFallbackTitle));let a;return a=i.length?n.get(`properties.${o}AxisWithInfo`,[i.join(",")]):n.get(`properties.${o}Axis`),a};function NA(e){var t,n,r;const{translator:o,flags:i,anything:a}=e,s=null==e||null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n||null===(r=n.isUnsupportedFeature)||void 0===r?void 0:r.call(n,"continuousData"),l={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>xA(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>hA(e)))}}},c=e=>!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor);const u=(e,t)=>!E(e,"color.auto")&&"primary"===E(e,"color.mode")&&!((e=>E(e,"layout.qHyperCube.qMeasureInfo",[]).filter((e=>!!c(e))).length>0)(t)&&"measure"===E(e,"color.useBaseColors")||function(e){return E(e,"layout.qHyperCube.qDimensionInfo",[]).filter((e=>!!c(e))).length>0}(t)&&"dimension"===E(e,"color.useBaseColors")),d=(e,t)=>{var n,r;return e.qHyperCubeDef.qMeasures.some((e=>hA(e)))||!i.isEnabled("SIMPLE_PROPERTIES_LIBRARY_COLOR")&&!(null!=e&&null!==(n=e.color)&&void 0!==n&&n.auto||"primary"!==(null==e||null===(r=e.color)||void 0===r?void 0:r.mode)||u(e,t))},p={items:{disclaimer:{show:(e,t)=>d(e,t),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&P(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!d(e,t)}}},m={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&wA(0,t,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&CA(0,t),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,o){o.dataPoint.showLineLabels=e,o.dataPoint.show=e}},reset(e){P(e,"dataPoint.show",!1),P(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,o){o.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t)=>o.get(MA(e,t,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&MA(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,o){o.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&MA(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,o){o.measureAxes[1].show=e?"labels":"all"}}}}}}},f={uses:"settings",items:{simpleStyling:null!=i&&i.isEnabled("COMBOCHART_SIMPLE_STYLING")?mA:void 0,simpleLabels:m,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:pA(i),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>wA(0,t,1)&&!fA(n.layout)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>fA(n.layout),convertFunctions:(h="vertical",{get:(e,t,n)=>fA(n.layout)?h:e(t.type),set(e,t,n,r){t(n.type,fA(r.layout)?h:e,h)}})},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!fA(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t)=>CA(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>CA(0,t),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t)=>wA(0,t,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:l,simpleColors:p,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||fA(t.layout)?"x":"y",r=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,t).map((e=>e.qFallbackTitle||"")).join(", ");let i;return i=r?o.get(`properties.${n}AxisWithInfo`,[r]):o.get(`properties.${n}Axis`),i},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||fA(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!fA(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!s}},measureAxis:{uses:"axis.measureAxis",label:(e,t)=>kA(e,t,o,0),show:(e,t)=>MA(e,t,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>kA(e,t,o,0),show:(e,t)=>MA(e,t,0).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&MN(null==e?void 0:e.series,EA)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t)=>"none"!==e.measureAxes[0].show&&MA(e,t,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||fA(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&MA(e,t,0).length>0}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>MA(e,t,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:o,minMax:i,min:a}=(null==r?void 0:r.measureAxes[0])||{};return!0===o?"lowest":o||"min"!==i||0!==a?e(t.type):"zero"},set(e,t,n,r,o){"zero"===e?(P(o,"measureAxes.0.autoMinMax",!1),P(o,"measureAxes.0.minMax","min"),P(o,"measureAxes.0.min",0)):P(o,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t)=>kA(e,t,o,1),show:(e,t)=>MA(e,t,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>kA(e,t,o,1),show:(e,t)=>MA(e,t,1).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!MN(null==e?void 0:e.series,EA)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t)=>"none"!==e.measureAxes[1].show&&MA(e,t,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||fA(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&MA(e,t,1).length>0}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>MA(e,t,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:o,minMax:i,min:a}=(null==r?void 0:r.measureAxes[1])||{};return!0===o?"lowest":o||"min"!==i||0!==a?e(t.type):"zero"},set(e,t,n,r,o){"zero"===e?(P(o,"measureAxes.1.autoMinMax",!1),P(o,"measureAxes.1.minMax","min"),P(o,"measureAxes.1.min",0)):P(o,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var h;i.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(f.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});return{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){var r,o;if(null!=a&&null!==(r=a.sense)&&void 0!==r&&null!==(o=r.isUnsupportedFeature)&&void 0!==o&&o.call(r,"includeZeroValues"))return!1;return!fA(n.layout)}}}},measures:SA(e)}},sorting:{uses:"sortingWithDisclaimer"},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>MN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,EA)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!MN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,EA)},dimRefLines:{uses:"dimReflines"}}},settings:f}}}function TA(e){return e.qHyperCubeDef.qMeasures.filter((e=>su(e.qDef.series)===Ua.LINE)).length>0}function OA(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>TA(e)||!fA(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){var n;return function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>su(e.qDef.series)===Ua.BAR));return t?n.filter((e=>e.qDef.series.axis===Ya.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===Ya.SECONDARY)).length>1:n.length>1}(e,!JO(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!fA(t)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!fA(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>TA(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>TA(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>hA(e)))}}}}}}const RA={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function AA(e,t,n,r,o){const{axis:i,icon:a,tid:s,translation:l}=RA[o];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=o,t.qDef.series.axis=i,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path","data."+t.qDef.cId)}})}function LA(e,t,n,r,o){!function(e,t,n){const{item:r}=e,o=["contextMenu.add",r.name];if(n.canAddMeasure()){const i=e.menu.addItem({translation:o,tid:"add-as"});AA(r,i,t,n,"bar"),AA(r,i,t,n,"line"),AA(r,i,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,o),e.ColorBy(n,t,o),r()}function IA(e){const t={},{tooltip:n}=e;if(n){var r,o;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(o=r.object)||void 0===o?void 0:o.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const PA=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function DA(e){return{definition:NA(e),softDefinition:OA(),support:{snapshot:PA,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:LA,extendMetrics:IA,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=V.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:uA(e),defaultPropertyValues:a,hypercubePath:o,extension:r});return function(e,t,n){const r="linechart"===n.properties.visualization,o=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),o.indexOf(e.qDef.series.axis)<0&&o.push(e.qDef.series.axis)}));const i=o.sort().shift();e.qProperty.measureAxes[i]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&Z(!0,e.qProperty.measureAxes[i],n.properties.measureAxis,{logarithmic:!1}),xA(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return V.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:function(e){return JO(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=Ga),void 0===t.series.type&&(t.series.type=Ga.type),void 0===t.series.axis&&(t.series.axis=t.series.type===Ua.BAR?Ya.PRIMARY:Ya.SECONDARY),t.series.type===Ua.BAR&&t.series.axis===Ya.SECONDARY&&(t.series.axis=Ya.PRIMARY)})),e.version=XO),e}(e)}}}}}}));
47
+ */var CE=EE&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),ME))}};function wE(e){return e&&"[object Function]"==={}.toString.call(e)}function kE(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function NE(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function TE(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=kE(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:TE(NE(e))}function OE(e){return e&&e.referenceNode?e.referenceNode:e}var RE=EE&&!(!window.MSInputMethodContext||!document.documentMode),AE=EE&&/MSIE 10/.test(navigator.userAgent);function LE(e){return 11===e?RE:10===e?AE:RE||AE}function IE(e){if(!e)return document.documentElement;for(var t=LE(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===kE(n,"position")?IE(n):n:e?e.ownerDocument.documentElement:document.documentElement}function PE(e){return null!==e.parentNode?PE(e.parentNode):e}function DE(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,s,l=i.commonAncestorContainer;if(e!==l&&t!==l||r.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&IE(a.firstElementChild)!==a?IE(l):l;var c=PE(e);return c.host?DE(c.host,t):DE(e,PE(t).host)}function qE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function zE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=qE(t,"top"),o=qE(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function BE(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function $E(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],LE(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function FE(e){var t=e.body,n=e.documentElement,r=LE(10)&&getComputedStyle(n);return{height:$E("Height",t,n,r),width:$E("Width",t,n,r)}}var HE=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},jE=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),VE=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},WE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function _E(e){return WE({},e,{right:e.left+e.width,bottom:e.top+e.height})}function UE(e){var t={};try{if(LE(10)){t=e.getBoundingClientRect();var n=qE(e,"top"),r=qE(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?FE(e.ownerDocument):{},a=i.width||e.clientWidth||o.width,s=i.height||e.clientHeight||o.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=kE(e);l-=BE(u,"x"),c-=BE(u,"y"),o.width-=l,o.height-=c}return _E(o)}function YE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=LE(10),o="HTML"===t.nodeName,i=UE(e),a=UE(t),s=TE(e),l=kE(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=_E({top:i.top-a.top-c,left:i.left-a.left-u,width:i.width,height:i.height});if(d.marginTop=0,d.marginLeft=0,!r&&o){var p=parseFloat(l.marginTop,10),m=parseFloat(l.marginLeft,10);d.top-=c-p,d.bottom-=c-p,d.left-=u-m,d.right-=u-m,d.marginTop=p,d.marginLeft=m}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=zE(d,t)),d}function GE(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=YE(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:qE(n),s=t?0:qE(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return _E(l)}function KE(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===kE(e,"position"))return!0;var n=NE(e);return!!n&&KE(n)}function XE(e){if(!e||!e.parentElement||LE())return document.documentElement;for(var t=e.parentElement;t&&"none"===kE(t,"transform");)t=t.parentElement;return t||document.documentElement}function JE(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?XE(e):DE(e,OE(t));if("viewport"===r)i=GE(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=TE(NE(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=YE(s,a,o);if("HTML"!==s.nodeName||KE(a))i=l;else{var c=FE(e.ownerDocument),u=c.height,d=c.width;i.top+=l.top-l.marginTop,i.bottom=u+l.top,i.left+=l.left-l.marginLeft,i.right=d+l.left}}var p="number"==typeof(n=n||0);return i.left+=p?n:n.left||0,i.top+=p?n:n.top||0,i.right-=p?n:n.right||0,i.bottom-=p?n:n.bottom||0,i}function ZE(e){return e.width*e.height}function QE(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=JE(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return WE({key:e},s[e],{area:ZE(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function eM(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?XE(t):DE(t,OE(n));return YE(n,o,r)}function tM(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function nM(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function rM(e,t,n){n=n.split("-")[0];var r=tM(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",l=i?"height":"width",c=i?"width":"height";return o[a]=t[a]+t[l]/2-r[l]/2,o[s]=n===s?t[s]-r[c]:t[nM(s)],o}function oM(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function iM(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=oM(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&wE(n)&&(t.offsets.popper=_E(t.offsets.popper),t.offsets.reference=_E(t.offsets.reference),t=n(t,e))})),t}function aM(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=eM(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=QE(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=rM(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=iM(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function sM(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function lM(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],i=o?""+o+n:e;if(void 0!==document.body.style[i])return i}return null}function cM(){return this.state.isDestroyed=!0,sM(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[lM("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function uM(e){var t=e.ownerDocument;return t?t.defaultView:window}function dM(e,t,n,r){var o="BODY"===e.nodeName,i=o?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),o||dM(TE(i.parentNode),t,n,r),r.push(i)}function pM(e,t,n,r){n.updateBound=r,uM(e).addEventListener("resize",n.updateBound,{passive:!0});var o=TE(e);return dM(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function mM(){this.state.eventsEnabled||(this.state=pM(this.reference,this.options,this.state,this.scheduleUpdate))}function fM(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,uM(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function hM(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function gM(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&hM(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var vM=EE&&/Firefox/i.test(navigator.userAgent);function yM(e,t,n){var r=oM(e,(function(e){return e.name===t})),o=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}var bM=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],xM=bM.slice(3);function SM(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=xM.indexOf(e),r=xM.slice(n+1).concat(xM.slice(0,n));return t?r.reverse():r}var EM="flip",MM="clockwise",CM="counterclockwise";function wM(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(oM(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return _E(s)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){hM(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var kM={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:VE({},l,i[l]),end:VE({},l,i[l]+i[c]-a[c])};e.offsets.popper=WE({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],l=void 0;return l=hM(+n)?[+n,0]:wM(n,i,a,s),"left"===s?(i.top+=l[0],i.left-=l[1]):"right"===s?(i.top+=l[0],i.left+=l[1]):"top"===s?(i.left+=l[0],i.top-=l[1]):"bottom"===s&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||IE(e.instance.popper);e.instance.reference===n&&(n=IE(n));var r=lM("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var l=JE(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),VE({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),VE({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=WE({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<i(r[l])&&(e.offsets.popper[l]=i(r[l])-n[c]),n[l]>i(r[s])&&(e.offsets.popper[l]=i(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!yM(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),p=l?"left":"top",m=l?"bottom":"right",f=tM(r)[c];s[m]-f<a[d]&&(e.offsets.popper[d]-=a[d]-(s[m]-f)),s[d]+f>a[m]&&(e.offsets.popper[d]+=s[d]+f-a[m]),e.offsets.popper=_E(e.offsets.popper);var h=s[d]+s[c]/2-f/2,g=kE(e.instance.popper),v=parseFloat(g["margin"+u],10),y=parseFloat(g["border"+u+"Width"],10),b=h-e.offsets.popper[d]-v-y;return b=Math.max(Math.min(a[c]-f,b),0),e.arrowElement=r,e.offsets.arrow=(VE(n={},d,Math.round(b)),VE(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(sM(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=JE(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=nM(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case EM:a=[r,o];break;case MM:a=SM(r);break;case CM:a=SM(r,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],o=nM(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p="left"===r&&d(c.right)>d(u.left)||"right"===r&&d(c.left)<d(u.right)||"top"===r&&d(c.bottom)>d(u.top)||"bottom"===r&&d(c.top)<d(u.bottom),m=d(c.left)<d(n.left),f=d(c.right)>d(n.right),h=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),v="left"===r&&m||"right"===r&&f||"top"===r&&h||"bottom"===r&&g,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===i&&m||y&&"end"===i&&f||!y&&"start"===i&&h||!y&&"end"===i&&g),x=!!t.flipVariationsByContent&&(y&&"start"===i&&f||y&&"end"===i&&m||!y&&"start"===i&&g||!y&&"end"===i&&h),S=b||x;(p||v||S)&&(e.flipped=!0,(p||v)&&(r=a[l+1]),S&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=WE({},e.offsets.popper,rM(e.instance.popper,e.offsets.reference,e.placement)),e=iM(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=nM(t),e.offsets.popper=_E(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!yM(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=oM(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=oM(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=IE(e.instance.popper),l=UE(s),c={position:o.position},u=function(e,t){var n=e.offsets,r=n.popper,o=n.reference,i=Math.round,a=Math.floor,s=function(e){return e},l=i(o.width),c=i(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),p=t?u||d||l%2==c%2?i:a:s,m=t?i:s;return{left:p(l%2==1&&c%2==1&&!d&&t?r.left-1:r.left),top:m(r.top),bottom:m(r.bottom),right:p(r.right)}}(e,window.devicePixelRatio<2||!vM),d="bottom"===n?"top":"bottom",p="right"===r?"left":"right",m=lM("transform"),f=void 0,h=void 0;if(h="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,f="right"===p?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&m)c[m]="translate3d("+f+"px, "+h+"px, 0)",c[d]=0,c[p]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,v="right"===p?-1:1;c[d]=h*g,c[p]=f*v,c.willChange=d+", "+p}var y={"x-placement":e.placement};return e.attributes=WE({},y,e.attributes),e.styles=WE({},c,e.styles),e.arrowStyles=WE({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return gM(e.instance.popper,e.styles),function(e,t){Object.keys(t).forEach((function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)}))}(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&gM(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){var i=eM(o,t,e,n.positionFixed),a=QE(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),gM(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},NM=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};HE(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=CE(this.update.bind(this)),this.options=WE({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(WE({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=WE({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return WE({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&wE(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return jE(e,[{key:"update",value:function(){return aM.call(this)}},{key:"destroy",value:function(){return cM.call(this)}},{key:"enableEventListeners",value:function(){return mM.call(this)}},{key:"disableEventListeners",value:function(){return fM.call(this)}}]),e}();function TM(e){return"function"==typeof e?e():e}NM.Utils=("undefined"!=typeof window?window:global).PopperUtils,NM.placements=bM,NM.Defaults=kM;var OM="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,RM={},AM=B.forwardRef((function(e,t){var n=e.anchorEl,r=e.children,o=e.container,i=e.disablePortal,a=void 0!==i&&i,s=e.keepMounted,l=void 0!==s&&s,c=e.modifiers,u=e.open,d=e.placement,p=void 0===d?"bottom":d,m=e.popperOptions,f=void 0===m?RM:m,h=e.popperRef,g=e.transition,v=void 0!==g&&g,y=Ip(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),b=B.useRef(null),x=Yv(b,t),S=B.useRef(null),E=Yv(S,h),M=B.useRef(E);OM((function(){M.current=E}),[E]),B.useImperativeHandle(h,(function(){return S.current}),[]);var C=B.useState(!0),w=C[0],k=C[1],N=function(e){if("rtl"!==("undefined"!=typeof window&&document.body.getAttribute("dir")||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(p),T=B.useState(N),O=T[0],R=T[1],A=B.useCallback((function(){if(b.current&&n&&u){S.current&&(S.current.destroy(),M.current(null));var e=function(e){R(e.placement)};TM(n);var t=new NM(TM(n),b.current,Lp({placement:N},f,{modifiers:Lp({},a?{}:{preventOverflow:{boundariesElement:"window"}},{},c,{},f.modifiers),onCreate:ex(e,f.onCreate),onUpdate:ex(e,f.onUpdate)}));M.current(t)}}),[n,a,c,u,N,f]),L=B.useCallback((function(e){Uv(x,e),A()}),[x,A]),I=function(){S.current&&(S.current.destroy(),M.current(null))};if(B.useEffect((function(){A()}),[A]),B.useEffect((function(){return function(){I()}}),[]),B.useEffect((function(){u||v||I()}),[u,v]),!l&&!u&&(!v||w))return null;var P={placement:O};return v&&(P.TransitionProps={in:u,onEnter:function(){k(!1)},onExited:function(){k(!0),I()}}),B.createElement(Qb,{disablePortal:a,container:o},B.createElement("div",Lp({ref:L,role:"tooltip"},y,{style:Lp({position:"fixed",top:0,left:0},y.style)}),"function"==typeof r?r(P):r))})),LM=pb(B.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),IM=pb(B.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),PM=B.createElement(LM,null);var DM=lv((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,n=e.classes;return B.createElement("div",{className:Vg(n.root,t&&n.checked)},PM,B.createElement(IM,{className:n.layer}))})),qM=B.createContext(),zM=B.createElement(DM,{checked:!0}),BM=B.createElement(DM,null),$M=B.forwardRef((function(e,t){var n=e.checked,r=e.classes,o=e.color,i=void 0===o?"secondary":o,a=e.name,s=e.onChange,l=Ip(e,["checked","classes","color","name","onChange"]),c=B.useContext(qM),u=n,d=ex(s,c&&c.onChange),p=a;return c&&(void 0===u&&(u=c.value===e.value),void 0===p&&(p=c.name)),B.createElement(Ib,Lp({color:i,type:"radio",icon:BM,checkedIcon:zM,classes:{root:Vg(r.root,r["color".concat(cv(i))]),checked:r.checked,disabled:r.disabled},name:p,checked:u,onChange:d,ref:t},l))}));function FM(e){return(FM="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})(e)}function HM(e){return(HM="function"==typeof Symbol&&"symbol"===FM(Symbol.iterator)?function(e){return FM(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":FM(e)})(e)}function jM(e,t){return"object"===HM(t)&&null!==t?e===t:String(e)===String(t)}lv((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Tp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Tp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})($M),B.forwardRef((function(e,t){var n=e.actions,r=e.children,o=e.name,i=e.value,a=e.onChange,s=Ip(e,["actions","children","name","value","onChange"]),l=B.useRef(null),c=B.useRef(null!=i).current,u=B.useState((function(){return c?null:e.defaultValue})),d=u[0],p=u[1];B.useImperativeHandle(n,(function(){return{focus:function(){var e=l.current.querySelector("input:not(:disabled):checked");e||(e=l.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var m={name:o,onChange:function(e){c||p(e.target.value),a&&a(e,e.target.value)},value:c?i:d},f=Yv(t,l);return B.createElement(oS,Lp({role:"radiogroup",ref:f},s),B.createElement(qM.Provider,{value:m},r))})),B.Component;var VM=B.forwardRef((function(e,t){var n=e.autoFocus,r=e.autoWidth,o=e.children,i=e.classes,a=e.className,s=e.defaultValue,l=e.disabled,c=e.displayEmpty,u=e.labelId,d=e.IconComponent,p=e.inputRef,m=e.MenuProps,f=void 0===m?{}:m,h=e.multiple,g=e.name,v=e.onBlur,y=e.onChange,b=e.onClose,x=e.onFocus,S=e.onOpen,E=e.open,M=e.readOnly,C=e.renderValue;e.required;var w=e.SelectDisplayProps,k=void 0===w?{}:w,N=e.tabIndex;e.type;var T=e.value,O=e.variant,R=void 0===O?"standard":O,A=Ip(e,["autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","labelId","IconComponent","inputRef","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),L=B.useRef(null!=T).current,I=B.useState(s),P=I[0],D=I[1],q=L?T:P,z=B.useRef(null),$=B.useState(null),F=$[0],H=$[1],j=B.useRef(null!=E).current,V=B.useState(),W=V[0],_=V[1],U=B.useState(!1),Y=U[0],G=U[1],K=Yv(t,p);B.useImperativeHandle(K,(function(){return{focus:function(){F.focus()},node:z.current,value:q}}),[F,q]),B.useEffect((function(){n&&F&&F.focus()}),[n,F]);var X,J,Z=function(e,t){e?S&&S(t):(F.focus(),b&&b(t)),j||(_(r?null:F.clientWidth),G(e))},Q=function(e){return function(t){var n;if(h||Z(!1,t),h){n=Array.isArray(q)?gy(q):[];var r=q.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;L||D(n),y&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),y(t,e))}},ee=null!==F&&(j?E:Y);delete A["aria-invalid"];var te=[],ne=!1;(Yx({value:q})||c)&&(C?X=C(q):ne=!0);var re=B.Children.map(o,(function(e){if(!B.isValidElement(e))return null;var t;if(h){if(!Array.isArray(q))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=q.some((function(t){return jM(t,e.props.value)})))&&ne&&te.push(e.props.children)}else(t=jM(q,e.props.value))&&ne&&(J=e.props.children);return B.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:Q(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ne&&(X=h?te.join(", "):J);var oe,ie=W;!r&&j&&F&&(ie=F.clientWidth),oe=void 0!==N?N:l?null:0;var ae=k.id||(g?"mui-component-select-".concat(g):void 0);return B.createElement(B.Fragment,null,B.createElement("div",Lp({className:Vg(i.root,i.select,i.selectMenu,i[R],a,l&&i.disabled),ref:H,tabIndex:oe,role:"button","aria-expanded":ee?"true":void 0,"aria-labelledby":"".concat(u||""," ").concat(ae||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!M){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Z(!0,e))}},onClick:l||M?null:function(e){Z(!0,e)},onBlur:function(e){!ee&&v&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:q,name:g}}),v(e))},onFocus:x},k,{id:ae}),function(e){return null==e||"string"==typeof e&&!e.trim()}(X)?B.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):X),B.createElement("input",Lp({value:Array.isArray(q)?q.join(","):q,name:g,ref:z,type:"hidden",autoFocus:n},A)),B.createElement(d,{className:Vg(i.icon,i["icon".concat(cv(R))],ee&&i.iconOpen)}),B.createElement(cE,Lp({id:"menu-".concat(g||""),anchorEl:F,open:ee,onClose:function(e){Z(!1,e)}},f,{MenuListProps:Lp({"aria-labelledby":u,role:"listbox",disableListWrap:!0},f.MenuListProps),PaperProps:Lp({},f.PaperProps,{style:Lp({minWidth:ie},null!=f.PaperProps?f.PaperProps.style:null)})}),re))})),WM=hE,_M=B.createElement(TS,null),UM=B.createElement(Zx,null),YM=B.forwardRef((function e(t,n){var r=t.autoWidth,o=void 0!==r&&r,i=t.children,a=t.classes,s=t.displayEmpty,l=void 0!==s&&s,c=t.IconComponent,u=void 0===c?fE:c,d=t.id,p=t.input,m=t.inputProps,f=t.labelId,h=t.MenuProps,g=t.multiple,v=void 0!==g&&g,y=t.native,b=void 0!==y&&y,x=t.onClose,S=t.onOpen,E=t.open,M=t.renderValue,C=t.SelectDisplayProps,w=t.variant,k=void 0===w?"standard":w,N=t.labelWidth,T=void 0===N?0:N,O=Ip(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),R=b?mE:VM,A=Hx({props:t,muiFormControl:Ob(),states:["variant"]}).variant||k,L=p||{standard:_M,outlined:B.createElement(SE,{labelWidth:T}),filled:UM}[A];return B.cloneElement(L,Lp({inputComponent:R,select:!0,inputProps:Lp({children:i,IconComponent:u,variant:A,type:void 0,multiple:v},b?{}:{autoWidth:o,displayEmpty:l,labelId:f,MenuProps:h,onClose:x,onOpen:S,open:E,renderValue:M,SelectDisplayProps:Lp({id:d},C)},{},m,{classes:m?Sg({baseClasses:a,newClasses:m.classes,Component:e}):a},p?p.props.inputProps:{}),ref:n},O))}));YM.muiName="Select";var GM=lv(WM,{name:"MuiSelect"})(YM);var KM=lv((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Lp({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,left:"calc(-50% + -4px)",transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,r=e.className,o=e.open,i=e.value,a=e.valueLabelDisplay;return"off"===a?t:B.cloneElement(t,{className:Vg(t.props.className,(o||"on"===a)&&n.open,n.thumb)},B.createElement("span",{className:Vg(n.offset,r)},B.createElement("span",{className:n.circle},B.createElement("span",{className:n.label},i))))}));function XM(e,t){return e-t}function JM(e,t,n){return e<t?t:e>n?n:e}function ZM(e,t){return e.reduce((function(e,n,r){var o=Math.abs(t-n);return null===e||o<e.distance||o===e.distance?{distance:o,index:r}:e}),null).index}function QM(e,t){if(void 0!==t.current&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var r=e.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function eC(e,t,n){return 100*(e-t)/(n-t)}function tC(e,t){var n=Math.round(e/t)*t;return Number(n.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}(t)))}function nC(e){var t=e.values,n=e.source,r=e.newValue,o=e.index;if(t[o]===r)return n;var i=gy(t);return i[o]=r,i}function rC(e){var t=e.sliderRef,n=e.activeIndex,r=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===n||t.current.querySelector('[data-index="'.concat(n,'"]')).focus(),r&&r(n)}var oC={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},iC=[],aC=function(e){return e},sC=B.forwardRef((function(e,t){var n=e["aria-label"],r=e["aria-labelledby"],o=e["aria-valuetext"],i=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.component,u=void 0===c?"span":c,d=e.defaultValue,p=e.disabled,m=void 0!==p&&p,f=e.getAriaLabel,h=e.getAriaValueText,g=e.marks,v=void 0===g?iC:g,y=e.max,b=void 0===y?100:y,x=e.min,S=void 0===x?0:x,E=e.name,M=e.onChange,C=e.onChangeCommitted,w=e.onMouseDown,k=e.orientation,N=void 0===k?"horizontal":k,T=e.step,O=void 0===T?1:T,R=e.ThumbComponent,A=void 0===R?"span":R,L=e.track,I=void 0===L?"normal":L,P=e.value,D=e.ValueLabelComponent,q=void 0===D?KM:D,z=e.valueLabelDisplay,$=void 0===z?"off":z,F=e.valueLabelFormat,H=void 0===F?aC:F,j=Ip(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),V=sv(),W=B.useRef(null!=P).current,_=B.useRef(),U=B.useState(-1),Y=U[0],G=U[1],K=B.useState(-1),X=K[0],J=K[1],Z=B.useState(d),Q=Z[0],ee=Z[1],te=W?P:Q,ne=Array.isArray(te),re=B.useRef(),oe=ne?gy(te).sort(XM):[te];oe=oe.map((function(e){return JM(e,S,b)}));var ie=!0===v&&null!==O?gy(Array(Math.floor((b-S)/O)+1)).map((function(e,t){return{value:S+O*t}})):v;re.current={source:te};var ae=fy(),se=ae.isFocusVisible,le=ae.onBlurVisible,ce=ae.ref,ue=B.useState(-1),de=ue[0],pe=ue[1],me=B.useRef(),fe=Yv(ce,me),he=Yv(t,fe),ge=ny((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));se(e)&&pe(t),J(t)})),ve=ny((function(){-1!==de&&(pe(-1),le()),J(-1)})),ye=ny((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));J(t)})),be=ny((function(){J(-1)})),xe=ny((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),r=oe[n],o=(b-S)/10,i=ie.map((function(e){return e.value})),a=i.indexOf(r);switch(e.key){case"Home":t=S;break;case"End":t=b;break;case"PageUp":O&&(t=r+o);break;case"PageDown":O&&(t=r-o);break;case"ArrowRight":case"ArrowUp":t=O?r+O:i[a+1]||i[i.length-1];break;case"ArrowLeft":case"ArrowDown":t=O?r-O:i[a-1]||i[0];break;default:return}if(e.preventDefault(),O&&(t=tC(t,O)),t=JM(t,S,b),ne){var s=t;t=nC({values:oe,source:te,newValue:t,index:n}).sort(XM),rC({sliderRef:me,activeIndex:t.indexOf(s)})}W||ee(t),pe(n),M&&M(e,t),C&&C(e,t)})),Se=B.useRef(),Ee=N;"rtl"===V.direction&&"vertical"!==N&&(Ee+="-reverse");var Me=B.useCallback((function(e){var t,n,r=e.finger,o=e.move,i=void 0!==o&&o,a=e.values,s=e.source,l=me.current.getBoundingClientRect(),c=l.width,u=l.height,d=l.bottom,p=l.left;if(t=0===Ee.indexOf("vertical")?(d-r.y)/u:(r.x-p)/c,-1!==Ee.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,S,b),O)n=tC(n,O);else{var m=ie.map((function(e){return e.value}));n=m[ZM(m,n)]}n=JM(n,S,b);var f=0;if(ne){var h=n;f=(n=nC({values:a,source:s,newValue:n,index:f=i?Se.current:ZM(a,n)}).sort(XM)).indexOf(h),Se.current=f}return{newValue:n,activeIndex:f}}),[b,S,Ee,ne,O,ie]),Ce=ny((function(e){var t=QM(e,_);if(t){var n=Me({finger:t,move:!0,values:oe,source:te}),r=n.newValue,o=n.activeIndex;rC({sliderRef:me,activeIndex:o,setActive:G}),W||ee(r),M&&M(e,r)}})),we=ny((function(e){var t=QM(e,_);if(t){var n=Me({finger:t,values:oe,source:te}).newValue;G(-1),"touchend"===e.type&&J(-1),C&&C(e,n),_.current=void 0,document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",we),document.body.removeEventListener("mouseenter",ke),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",we)}})),ke=ny((function(e){0===e.buttons&&we(e)})),Ne=ny((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(_.current=t.identifier);var n=QM(e,_),r=Me({finger:n,values:oe,source:te}),o=r.newValue,i=r.activeIndex;rC({sliderRef:me,activeIndex:i,setActive:G}),W||ee(o),M&&M(e,o),document.body.addEventListener("touchmove",Ce),document.body.addEventListener("touchend",we)}));B.useEffect((function(){var e=me.current;return e.addEventListener("touchstart",Ne),function(){e.removeEventListener("touchstart",Ne),document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",we),document.body.removeEventListener("mouseenter",ke),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",we)}}),[ke,we,Ce,Ne]);var Te=ny((function(e){w&&w(e),e.preventDefault();var t=QM(e,_),n=Me({finger:t,values:oe,source:te}),r=n.newValue,o=n.activeIndex;rC({sliderRef:me,activeIndex:o,setActive:G}),W||ee(r),M&&M(e,r),document.body.addEventListener("mousemove",Ce),document.body.addEventListener("mouseenter",ke),document.body.addEventListener("mouseup",we)})),Oe=eC(ne?oe[0]:S,S,b),Re=eC(oe[oe.length-1],S,b)-Oe,Ae=Lp({},oC[Ee].offset(Oe),{},oC[Ee].leap(Re));return B.createElement(u,Lp({ref:he,className:Vg(i.root,i["color".concat(cv(l))],a,m&&i.disabled,ie.length>0&&ie.some((function(e){return e.label}))&&i.marked,!1===I&&i.trackFalse,{vertical:i.vertical}[N],{inverted:i.trackInverted}[I]),onMouseDown:Te},j),B.createElement("span",{className:i.rail}),B.createElement("span",{className:i.track,style:Ae}),B.createElement("input",{value:oe.join(","),name:E,type:"hidden"}),ie.map((function(e){var t,n=eC(e.value,S,b),r=oC[Ee].offset(n);if(!1===I)t=-1!==oe.indexOf(e.value);else{var o=ne?e.value>=oe[0]&&e.value<=oe[oe.length-1]:e.value<=oe[0];t=o&&"normal"===I||!o&&"inverted"===I}return B.createElement(B.Fragment,{key:e.value},B.createElement("span",{style:r,className:Vg(i.mark,t&&i.markActive)}),B.createElement("span",{"aria-hidden":!0,style:r,className:Vg(i.markLabel,t&&i.markLabelActive)},e.label))})),oe.map((function(e,t){var a=eC(e,S,b),s=oC[Ee].offset(a);return B.createElement(q,{key:t,valueLabelFormat:H,valueLabelDisplay:$,className:i.valueLabel,value:"function"==typeof H?H(e,t):H,index:t,open:X===t||Y===t||"on"===$,disabled:m},B.createElement(A,{className:Vg(i.thumb,i["thumbColor".concat(cv(l))],Y===t&&i.active,m&&i.disabled,de===t&&i.focusVisible),tabIndex:m?null:0,role:"slider",style:s,"data-index":t,"aria-label":f?f(t):n,"aria-labelledby":r,"aria-orientation":N,"aria-valuemax":b,"aria-valuemin":S,"aria-valuenow":e,"aria-valuetext":h?h(e,t):o,onKeyDown:xe,onFocus:ge,onBlur:ve,onMouseOver:ye,onMouseLeave:be}))})))}));lv((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"11px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 11px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?Rp(e.palette.primary.main,.62):Op(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',left:-18,top:-18,right:-18,bottom:-18},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Tp(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Tp(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Tp(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Tp(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:Lp({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:22,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:22,transform:"translateY(50%)"}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(sC);var lC=B.forwardRef((function(e,t){var n=e.action,r=e.classes,o=e.className,i=e.message,a=e.role,s=void 0===a?"alert":a,l=Ip(e,["action","classes","className","message","role"]);return B.createElement(dv,Lp({component:cb,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:s,square:!0,elevation:6,className:Vg(r.root,o),ref:t},l),B.createElement("div",{className:r.message},i),n?B.createElement("div",{className:r.action},n):null)})),cC=lv((function(e){var t="light"===e.palette.type?.8:.98,n=Np(e.palette.background.default,t);return{root:Ap({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(lC),uC=B.forwardRef((function(e,t){var n=e.action,r=e.anchorOrigin,o=(r=void 0===r?{vertical:"bottom",horizontal:"center"}:r).vertical,i=r.horizontal,a=e.autoHideDuration,s=e.children,l=e.classes,c=e.className,u=e.ClickAwayListenerProps,d=e.ContentProps,p=e.disableWindowBlurListener,m=void 0!==p&&p,f=e.message,h=e.onClose,g=e.onEnter,v=e.onEntered,y=e.onEntering,b=e.onExit,x=e.onExited,S=e.onExiting,E=e.onMouseEnter,M=e.onMouseLeave,C=e.open,w=e.resumeHideDuration,k=e.TransitionComponent,N=void 0===k?bS:k,T=e.transitionDuration,O=void 0===T?{enter:Mm.enteringScreen,exit:Mm.leavingScreen}:T,R=e.TransitionProps,A=Ip(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),L=B.useRef(),I=B.useState(!0),P=I[0],D=I[1],q=B.useCallback((function(e){var t=null!=e?e:a;h&&null!=t&&(clearTimeout(L.current),L.current=setTimeout((function(){h&&null!=(null!=e?e:a)&&h(null,"timeout")}),t))}),[a,h]);B.useEffect((function(){return C&&q(),function(){clearTimeout(L.current)}}),[C,q]);var z=function(){clearTimeout(L.current)},$=B.useCallback((function(){if(null!=a){if(null!=w)return void q(w);q(.5*a)}}),[a,w,q]);return B.useEffect((function(){if(!m&&C)return window.addEventListener("focus",$),window.addEventListener("blur",z),function(){window.removeEventListener("focus",$),window.removeEventListener("blur",z)}}),[m,$,C]),!C&&P?null:B.createElement(Gb,Lp({onClickAway:function(e){h&&h(e,"clickaway")}},u),B.createElement("div",Lp({className:Vg(l.root,l["anchorOrigin".concat(cv(o)).concat(cv(i))],c),onMouseEnter:function(e){E&&E(e),z()},onMouseLeave:function(e){M&&M(e),$()},ref:t},A),B.createElement(N,Lp({appear:!0,in:C,onEnter:ex((function(){D(!1)}),g),onEntered:v,onEntering:y,onExit:b,onExited:ex((function(){D(!0)}),x),onExiting:S,timeout:O,direction:"top"===o?"down":"up"},R),s||B.createElement(cC,Lp({message:f,action:n},d)))))}));lv((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},o={justifyContent:"flex-start"},i={top:24},a={bottom:24},s={right:24},l={left:24},c={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Lp({},t,Ap({},e.breakpoints.up("sm"),Lp({},i,{},c))),anchorOriginBottomCenter:Lp({},n,Ap({},e.breakpoints.up("sm"),Lp({},a,{},c))),anchorOriginTopRight:Lp({},t,{},r,Ap({},e.breakpoints.up("sm"),Lp({left:"auto"},i,{},s))),anchorOriginBottomRight:Lp({},n,{},r,Ap({},e.breakpoints.up("sm"),Lp({left:"auto"},a,{},s))),anchorOriginTopLeft:Lp({},t,{},o,Ap({},e.breakpoints.up("sm"),Lp({right:"auto"},i,{},l))),anchorOriginBottomLeft:Lp({},n,{},o,Ap({},e.breakpoints.up("sm"),Lp({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})(uC);var dC=B.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.alternativeLabel,i=e.children,a=e.classes,s=e.className,l=e.completed,c=void 0!==l&&l,u=e.connector,d=e.disabled,p=void 0!==d&&d,m=e.index,f=e.last,h=e.orientation,g=Ip(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return B.createElement("div",Lp({className:Vg(a.root,a[h],s,o&&a.alternativeLabel,c&&a.completed),ref:t},g),u&&o&&0!==m&&B.cloneElement(u,{orientation:h,alternativeLabel:o,index:m,active:r,completed:c,disabled:p}),B.Children.map(i,(function(e){return B.isValidElement(e)?B.cloneElement(e,Lp({active:r,alternativeLabel:o,completed:c,disabled:p,last:f,icon:m+1,orientation:h},e.props)):null})))}));lv({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(dC);var pC=pb(B.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),mC=pb(B.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),fC=B.createElement("circle",{cx:"12",cy:"12",r:"12"}),hC=B.forwardRef((function(e,t){var n=e.completed,r=void 0!==n&&n,o=e.icon,i=e.active,a=void 0!==i&&i,s=e.error,l=void 0!==s&&s,c=e.classes;return"number"==typeof o||"string"==typeof o?l?B.createElement(mC,{className:Vg(c.root,c.error),ref:t}):r?B.createElement(pC,{className:Vg(c.root,c.completed),ref:t}):B.createElement(db,{className:Vg(c.root,a&&c.active),ref:t},fC,B.createElement("text",{className:c.text,x:"12",y:"16",textAnchor:"middle"},o)):o})),gC=lv((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$active":{color:e.palette.primary.main},"&$completed":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(hC),vC=B.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.alternativeLabel,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.completed,u=void 0!==c&&c,d=e.disabled,p=void 0!==d&&d,m=e.error,f=void 0!==m&&m,h=e.icon;e.last;var g=e.optional,v=e.orientation,y=void 0===v?"horizontal":v,b=e.StepIconComponent,x=e.StepIconProps,S=Ip(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),E=b;return h&&!E&&(E=gC),B.createElement("span",Lp({className:Vg(s.root,s[y],l,p&&s.disabled,i&&s.alternativeLabel,f&&s.error),ref:t},S),h||E?B.createElement("span",{className:Vg(s.iconContainer,i&&s.alternativeLabel)},B.createElement(E,Lp({completed:u,active:r,error:f,icon:h},x))):null,B.createElement("span",{className:s.labelContainer},B.createElement(cb,{variant:"body2",component:"span",className:Vg(s.label,i&&s.alternativeLabel,u&&s.completed,r&&s.active,f&&s.error),display:"block"},a),g))}));vC.muiName="StepLabel";var yC=lv((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(vC),bC=B.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,o=e.children,i=e.classes,a=e.className,s=e.completed,l=e.disabled,c=e.icon;e.last;var u=e.optional,d=e.orientation,p=Ip(e,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),m={active:n,alternativeLabel:r,completed:s,disabled:l,icon:c,optional:u,orientation:d},f=Qx(o,["StepLabel"])?B.cloneElement(o,m):B.createElement(yC,m,o);return B.createElement(My,Lp({disabled:l,TouchRippleProps:{className:i.touchRipple},className:Vg(i.root,i[d],a),ref:t},p),f)}));lv({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(bC);var xC=B.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,o=void 0!==r&&r,i=e.classes,a=e.className,s=e.completed,l=e.disabled;e.index;var c=e.orientation,u=void 0===c?"horizontal":c,d=Ip(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return B.createElement("div",Lp({className:Vg(i.root,i[u],a,o&&i.alternativeLabel,n&&i.active,s&&i.completed,l&&i.disabled),ref:t},d),B.createElement("span",{className:Vg(i.line,"vertical"===u?i.lineVertical:i.lineHorizontal)}))})),SC=lv((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(xC),EC=B.forwardRef((function(e,t){var n=e.active;e.alternativeLabel;var r=e.children,o=e.classes,i=e.className;e.completed;var a=e.last;e.optional,e.orientation;var s=e.TransitionComponent,l=void 0===s?Xb:s,c=e.transitionDuration,u=void 0===c?"auto":c,d=e.TransitionProps,p=Ip(e,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),m=u;return"auto"!==u||l.muiSupportAuto||(m=void 0),B.createElement("div",Lp({className:Vg(o.root,i,a&&o.last),ref:t},p),B.createElement(l,Lp({in:n,className:o.transition,timeout:m,unmountOnExit:!0},d),r))}));lv((function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}}),{name:"MuiStepContent"})(EC);var MC=B.createElement(SC,null),CC=B.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,o=e.alternativeLabel,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.connector,u=void 0===c?MC:c,d=e.nonLinear,p=void 0!==d&&d,m=e.orientation,f=void 0===m?"horizontal":m,h=Ip(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),g=B.isValidElement(u)?B.cloneElement(u,{orientation:f}):null,v=B.Children.toArray(a),y=v.map((function(e,t){var n={alternativeLabel:i,connector:u,last:t+1===v.length,orientation:f},o={index:t,active:!1,completed:!1,disabled:!1};return r===t?o.active=!0:!p&&r>t?o.completed=!0:!p&&r<t&&(o.disabled=!0),[!i&&g&&0!==t&&B.cloneElement(g,Lp({key:t},o)),B.cloneElement(e,Lp({},n,{},o,{},e.props))]}));return B.createElement(dv,Lp({square:!0,elevation:0,className:Vg(s.root,s[f],l,i&&s.alternativeLabel),ref:t},h),y)}));lv({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(CC);var wC=B.forwardRef((function(e,t){var n=e.anchor,r=e.classes,o=e.className,i=e.width,a=Ip(e,["anchor","classes","className","width"]);return B.createElement("div",Lp({className:Vg(r.root,r["anchor".concat(cv(n))],o),ref:t,style:Ap({},Ox(n)?"width":"height",i)},a))})),kC=lv((function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}}),{name:"PrivateSwipeArea"})(wC),NC=null;function TC(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function OC(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function RC(e,t){return e?t.clientWidth:t.clientHeight}function AC(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var LC="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),IC={enter:Mm.enteringScreen,exit:Mm.leavingScreen},PC="undefined"!=typeof window?B.useLayoutEffect:B.useEffect;B.forwardRef((function(e,t){var n=e.anchor,r=void 0===n?"left":n,o=e.disableBackdropTransition,i=void 0!==o&&o,a=e.disableDiscovery,s=void 0!==a&&a,l=e.disableSwipeToOpen,c=void 0===l?LC:l,u=e.hideBackdrop,d=e.hysteresis,p=void 0===d?.52:d,m=e.minFlingVelocity,f=void 0===m?450:m,h=e.ModalProps,g=(h=void 0===h?{}:h).BackdropProps,v=Ip(h,["BackdropProps"]),y=e.onClose,b=e.onOpen,x=e.open,S=e.PaperProps,E=void 0===S?{}:S,M=e.SwipeAreaProps,C=e.swipeAreaWidth,w=void 0===C?20:C,k=e.transitionDuration,N=void 0===k?IC:k,T=e.variant,O=void 0===T?"temporary":T,R=Ip(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),A=sv(),L=B.useState(!1),I=L[0],P=L[1],D=B.useRef({isSwiping:null}),q=B.useRef(),z=B.useRef(),$=B.useRef(),F=B.useRef(!1),H=B.useRef();PC((function(){H.current=null}),[x]);var V=B.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,o=void 0===n?null:n,a=t.changeTransition,s=void 0===a||a,l=Rx(A,r),c=-1!==["right","bottom"].indexOf(l)?1:-1,d=Ox(r),p=d?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),m=$.current.style;m.webkitTransform=p,m.transform=p;var f="";if(o&&(f=A.transitions.create("all",_v({timeout:N},{mode:o}))),s&&(m.webkitTransition=f,m.transition=f),!i&&!u){var h=z.current.style;h.opacity=1-e/RC(d,$.current),s&&(h.webkitTransition=f,h.transition=f)}}),[r,i,u,A,N]),W=ny((function(e){if(F.current)if(NC=null,F.current=!1,P(!1),D.current.isSwiping){D.current.isSwiping=null;var t,n=Rx(A,r),o=Ox(r);t=o?TC(n,e.changedTouches):OC(n,e.changedTouches);var i=o?D.current.startX:D.current.startY,a=RC(o,$.current),s=AC(t,i,x,a),l=s/a;Math.abs(D.current.velocity)>f&&(H.current=1e3*Math.abs((a-s)/D.current.velocity)),x?D.current.velocity>f||l>p?y():V(0,{mode:"exit"}):D.current.velocity<-f||1-l>p?b():V(RC(o,$.current),{mode:"enter"})}else D.current.isSwiping=null})),_=ny((function(e){if($.current&&F.current&&(null==NC||NC===D.current)){var t=Rx(A,r),n=Ox(r),o=TC(t,e.touches),i=OC(t,e.touches);if(x&&$.current.contains(e.target)&&null==NC){var a=function(e){var t=e.domTreeShapes,n=e.start,r=e.current,o=e.anchor,i={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=r>=n;"top"!==o&&"left"!==o||(t=!t);var l="left"===o||"right"===o?"x":"y",c=e[i[l]],u=c>0,d=c+e[s[l]]<e[a[l]];return t&&d||!t&&u?e:null}))}({domTreeShapes:function(e,t){for(var n=[];e&&e!==t;){var r=window.getComputedStyle(e);"absolute"===r.getPropertyValue("position")||"hidden"===r.getPropertyValue("overflow-x")?n=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&n.push(e),e=e.parentElement}return n}(e.target,$.current),start:n?D.current.startX:D.current.startY,current:n?o:i,anchor:r});if(a)return void(NC=a);NC=D.current}if(null==D.current.isSwiping){var l=Math.abs(o-D.current.startX),c=Math.abs(i-D.current.startY);l>c&&e.cancelable&&e.preventDefault();var u=n?l>c&&l>3:c>l&&c>3;if(!0===u||(n?c>3:l>3)){if(D.current.isSwiping=u,!u)return void W(e);D.current.startX=o,D.current.startY=i,s||x||(n?D.current.startX-=w:D.current.startY-=w)}}if(D.current.isSwiping){var d=RC(n,$.current),p=n?D.current.startX:D.current.startY;x&&!D.current.paperHit&&(p=Math.min(p,d));var m=AC(n?o:i,p,x,d);if(x)if(D.current.paperHit)0===m&&(D.current.startX=o,D.current.startY=i);else{if(!(n?o<d:i<d))return;D.current.paperHit=!0,D.current.startX=o,D.current.startY=i}null===D.current.lastTranslate&&(D.current.lastTranslate=m,D.current.lastTime=performance.now()+1);var f=(m-D.current.lastTranslate)/(performance.now()-D.current.lastTime)*1e3;D.current.velocity=.4*D.current.velocity+.6*f,D.current.lastTranslate=m,D.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),V(m)}}})),U=ny((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!x||z.current.contains(e.target)||$.current.contains(e.target))){var t=Rx(A,r),n=Ox(r),o=TC(t,e.touches),i=OC(t,e.touches);if(!x){if(c||e.target!==q.current)return;if(n){if(o>w)return}else if(i>w)return}e.muiHandled=!0,NC=null,D.current.startX=o,D.current.startY=i,P(!0),!x&&$.current&&V(RC(n,$.current)+(s?20:-w),{changeTransition:!1}),D.current.velocity=0,D.current.lastTime=null,D.current.lastTranslate=null,D.current.paperHit=!1,F.current=!0}}));B.useEffect((function(){if("temporary"===O)return document.body.addEventListener("touchstart",U),document.body.addEventListener("touchmove",_,{passive:!1}),document.body.addEventListener("touchend",W),function(){document.body.removeEventListener("touchstart",U),document.body.removeEventListener("touchmove",_,{passive:!1}),document.body.removeEventListener("touchend",W)}}),[O,U,_,W]),B.useEffect((function(){return function(){NC===D.current&&(NC=null)}}),[]),B.useEffect((function(){x||P(!1)}),[x]);var Y=B.useCallback((function(e){z.current=j.findDOMNode(e)}),[]),G=B.useCallback((function(e){$.current=j.findDOMNode(e)}),[]);return B.createElement(B.Fragment,null,B.createElement(Ix,Lp({open:!("temporary"!==O||!I)||x,variant:O,ModalProps:Lp({BackdropProps:Lp({},g,{ref:Y})},v),PaperProps:Lp({},E,{style:Lp({pointerEvents:"temporary"!==O||x?"":"none"},E.style),ref:G}),anchor:r,transitionDuration:H.current||N,onClose:y,ref:t},R)),!c&&"temporary"===O&&B.createElement(oy,null,B.createElement(kC,Lp({anchor:r,ref:q,width:w},M))))}));var DC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"secondary":o,a=e.edge,s=void 0!==a&&a,l=e.size,c=void 0===l?"medium":l,u=Ip(e,["classes","className","color","edge","size"]),d=B.createElement("span",{className:n.thumb});return B.createElement("span",{className:Vg(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[s],{small:n["size".concat(cv(c))]}[c])},B.createElement(Ib,Lp({type:"checkbox",icon:d,checkedIcon:d,classes:{root:Vg(n.switchBase,n["color".concat(cv(i))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},u)),B.createElement("span",{className:n.track}))}));lv((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle"},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(50%)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Tp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Tp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(DC);var qC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.disabled,i=void 0!==o&&o,a=e.disableFocusRipple,s=void 0!==a&&a,l=e.fullWidth,c=e.icon,u=e.indicator,d=e.label,p=e.onChange,m=e.onClick,f=e.selected,h=e.textColor,g=void 0===h?"inherit":h,v=e.value,y=e.wrapped,b=void 0!==y&&y,x=Ip(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return B.createElement(My,Lp({focusRipple:!s,className:Vg(n.root,n["textColor".concat(cv(g))],r,i&&n.disabled,f&&n.selected,d&&c&&n.labelIcon,l&&n.fullWidth,b&&n.wrapped),ref:t,role:"tab","aria-selected":f,disabled:i,onClick:function(e){p&&p(e,v),m&&m(e)}},x),B.createElement("span",{className:n.wrapper},c,d),u)}));lv((function(e){var t;return{root:Lp({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},Ap(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),Ap(t,"overflow","hidden"),Ap(t,"whiteSpace","normal"),Ap(t,"textAlign","center"),Ap(t,e.breakpoints.up("sm"),{fontSize:e.typography.pxToRem(13),minWidth:160}),t)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(qC);var zC=B.createContext(),BC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"table":o,a=e.padding,s=void 0===a?"default":a,l=e.size,c=void 0===l?"medium":l,u=e.stickyHeader,d=void 0!==u&&u,p=Ip(e,["classes","className","component","padding","size","stickyHeader"]),m=B.useMemo((function(){return{padding:s,size:c,stickyHeader:d}}),[s,c,d]);return B.createElement(zC.Provider,{value:m},B.createElement(i,Lp({ref:t,className:Vg(n.root,r,d&&n.stickyHeader)},p)))}));lv((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Lp({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(BC);var $C=B.createContext(),FC={variant:"body"},HC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tbody":o,a=Ip(e,["classes","className","component"]);return B.createElement($C.Provider,{value:FC},B.createElement(i,Lp({className:Vg(n.root,r),ref:t},a)))}));lv({root:{display:"table-row-group"}},{name:"MuiTableBody"})(HC);var jC=B.forwardRef((function(e,t){var n,r=e.align,o=void 0===r?"inherit":r,i=e.classes,a=e.className,s=e.component,l=e.padding,c=e.scope,u=e.size,d=e.sortDirection,p=e.variant,m=Ip(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),f=B.useContext(zC),h=B.useContext($C);n=s||(h&&"head"===h.variant?"th":"td");var g=c;!g&&h&&"head"===h.variant&&(g="col");var v=l||(f&&f.padding?f.padding:"default"),y=u||(f&&f.size?f.size:"medium"),b=p||h&&h.variant,x=null;return d&&(x="asc"===d?"ascending":"descending"),B.createElement(n,Lp({ref:t,className:Vg(i.root,i[b],a,"inherit"!==o&&i["align".concat(cv(o))],"default"!==v&&i["padding".concat(cv(v))],"medium"!==y&&i["size".concat(cv(y))],{head:f&&f.stickyHeader&&i.stickyHeader}[b]),"aria-sort":x,scope:g},m))})),VC=lv((function(e){return{root:Lp({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Rp(Tp(e.palette.divider,1),.88):Op(Tp(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(jC),WC={variant:"footer"},_C=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tfoot":o,a=Ip(e,["classes","className","component"]);return B.createElement($C.Provider,{value:WC},B.createElement(i,Lp({className:Vg(n.root,r),ref:t},a)))}));lv({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(_C);var UC={variant:"head"},YC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"thead":o,a=Ip(e,["classes","className","component"]);return B.createElement($C.Provider,{value:UC},B.createElement(i,Lp({className:Vg(n.root,r),ref:t},a)))}));lv({root:{display:"table-header-group"}},{name:"MuiTableHead"})(YC);var GC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=e.disableGutters,s=void 0!==a&&a,l=e.variant,c=void 0===l?"regular":l,u=Ip(e,["classes","className","component","disableGutters","variant"]);return B.createElement(i,Lp({className:Vg(n.root,n[c],r,!s&&n.gutters),ref:t},u))})),KC=lv((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Ap({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(GC),XC=pb(B.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),JC=pb(B.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),ZC=B.createElement(JC,null),QC=B.createElement(XC,null),ew=B.createElement(XC,null),tw=B.createElement(JC,null),nw=B.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,o=e.nextIconButtonProps,i=e.onChangePage,a=e.page,s=e.rowsPerPage,l=Ip(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=sv();return B.createElement("div",Lp({ref:t},l),B.createElement(Ab,Lp({onClick:function(e){i(e,a-1)},disabled:0===a,color:"inherit"},n),"rtl"===c.direction?ZC:QC),B.createElement(Ab,Lp({onClick:function(e){i(e,a+1)},disabled:a>=Math.ceil(r/s)-1,color:"inherit"},o),"rtl"===c.direction?ew:tw))})),rw=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(-1===n?r:n," of ").concat(r)},ow=[10,25,50,100],iw=B.forwardRef((function(e,t){var n,r=e.ActionsComponent,o=void 0===r?nw:r,i=e.backIconButtonProps,a=e.classes,s=e.className,l=e.colSpan,c=e.component,u=void 0===c?VC:c,d=e.count,p=e.labelDisplayedRows,m=void 0===p?rw:p,f=e.labelRowsPerPage,h=void 0===f?"Rows per page:":f,g=e.nextIconButtonProps,v=e.onChangePage,y=e.onChangeRowsPerPage,b=e.page,x=e.rowsPerPage,S=e.rowsPerPageOptions,E=void 0===S?ow:S,M=e.SelectProps,C=void 0===M?{}:M,w=Ip(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);u!==VC&&"td"!==u||(n=l||1e3);var k=C.native?"option":dE;return B.createElement(u,Lp({className:Vg(a.root,s),colSpan:n,ref:t},w),B.createElement(KC,{className:a.toolbar},B.createElement("div",{className:a.spacer}),E.length>1&&B.createElement(cb,{color:"inherit",variant:"body2",className:a.caption},h),E.length>1&&B.createElement(GM,Lp({classes:{select:a.select,icon:a.selectIcon},input:B.createElement(Xx,{className:Vg(a.input,a.selectRoot)}),value:x,onChange:y},C),E.map((function(e){return B.createElement(k,{className:a.menuItem,key:e,value:e.value?e.value:e},e.label?e.label:e)}))),B.createElement(cb,{color:"inherit",variant:"body2",className:a.caption},m({from:0===d?0:b*x+1,to:Math.min(d,(b+1)*x),count:d,page:b})),B.createElement(o,{className:a.actions,backIconButtonProps:i,count:d,nextIconButtonProps:g,onChangePage:v,page:b,rowsPerPage:x})))}));lv((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{top:1},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(iw);var aw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tr":o,a=e.hover,s=void 0!==a&&a,l=e.selected,c=void 0!==l&&l,u=Ip(e,["classes","className","component","hover","selected"]),d=B.useContext($C);return B.createElement(i,Lp({ref:t,className:Vg(n.root,r,d&&{head:n.head,footer:n.footer}[d.variant],s&&n.hover,c&&n.selected)},u))}));lv((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(aw);var sw=pb(B.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),lw=B.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.children,i=e.classes,a=e.className,s=e.direction,l=void 0===s?"desc":s,c=e.hideSortIcon,u=void 0!==c&&c,d=e.IconComponent,p=void 0===d?sw:d,m=Ip(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return B.createElement(My,Lp({className:Vg(i.root,a,r&&i.active),component:"span",disableRipple:!0,ref:t},m),o,u&&!r?null:B.createElement(p,{className:Vg(i.icon,i["iconDirection".concat(cv(l))])}))}));lv((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:1}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(lw);var cw,uw=!("undefined"==typeof window||!window.document||!window.document.createElement);function dw(){if(cw)return cw;if(!uw||!window.document.body)return"indeterminate";var e=window.document.createElement("div");return e.appendChild(document.createTextNode("ABCD")),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),cw="reverse",e.scrollLeft>0?cw="default":(e.scrollLeft=1,0===e.scrollLeft&&(cw="negative")),document.body.removeChild(e),cw}function pw(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=dw();if("indeterminate"===r)return Number.NaN;switch(r){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n}return n}function mw(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var fw={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function hw(e){var t=e.onChange,n=Ip(e,["onChange"]),r=B.useRef(),o=B.useRef(null),i=function(){r.current=o.current.offsetHeight-o.current.clientHeight};return B.useEffect((function(){var e=Cx((function(){var e=r.current;i(),e!==r.current&&t(r.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),B.useEffect((function(){i(),t(r.current)}),[t]),B.createElement("div",Lp({style:fw,ref:o},n))}var gw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=e.orientation,a=Ip(e,["classes","className","color","orientation"]);return B.createElement("span",Lp({className:Vg(n.root,n["color".concat(cv(o))],r,{vertical:n.vertical}[i]),ref:t},a))})),vw=lv((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(gw),yw=B.createElement(XC,{fontSize:"small"}),bw=B.createElement(JC,{fontSize:"small"}),xw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.direction,i=e.orientation,a=e.visible,s=Ip(e,["classes","className","direction","orientation","visible"]),l=Vg(n.root,r,{vertical:n.vertical}[i]);return a?B.createElement(My,Lp({component:"div",className:l,ref:t,role:null,tabIndex:null},s),"left"===o?yw:bw):B.createElement("div",{className:l})})),Sw=lv({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(xw),Ew=B.forwardRef((function(e,t){var n=e.action,r=e.centered,o=void 0!==r&&r,i=e.children,a=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.indicatorColor,d=void 0===u?"secondary":u,p=e.onChange,m=e.orientation,f=void 0===m?"horizontal":m,h=e.ScrollButtonComponent,g=void 0===h?Sw:h,v=e.scrollButtons,y=void 0===v?"auto":v,b=e.TabIndicatorProps,x=void 0===b?{}:b,S=e.textColor,E=void 0===S?"inherit":S,M=e.value,C=e.variant,w=void 0===C?"standard":C,k=Ip(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),N=sv(),T="scrollable"===w,O="rtl"===N.direction,R="vertical"===f,A=R?"scrollTop":"scrollLeft",L=R?"top":"left",I=R?"bottom":"right",P=R?"clientHeight":"clientWidth",D=R?"height":"width",q=B.useState(!1),z=q[0],$=q[1],F=B.useState({}),H=F[0],j=F[1],V=B.useState({start:!1,end:!1}),W=V[0],_=V[1],U=B.useState({overflow:"hidden",marginBottom:null}),Y=U[0],G=U[1],K=new Map,X=B.useRef(null),J=B.useRef(null),Z=function(){var e,t,n=X.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:pw(n,N.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==M){var o=J.current.children;if(o.length>0){var i=o[K.get(M)];t=i?i.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},Q=ny((function(){var e,t=Z(),n=t.tabsMeta,r=t.tabMeta,o=0;if(r&&n)if(R)o=r.top-n.top+n.scrollTop;else{var i=O?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;o=r.left-n.left+i}var a=(Ap(e={},L,o),Ap(e,D,r?r[D]:0),e);if(isNaN(H[L])||isNaN(H[D]))j(a);else{var s=Math.abs(H[L]-a[L]),l=Math.abs(H[D]-a[D]);(s>=1||l>=1)&&j(a)}})),ee=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},i=r.ease,a=void 0===i?mw:i,s=r.duration,l=void 0===s?300:s,c=null,u=t[e],d=!1,p=function(){d=!0},m=function r(i){if(d)o(new Error("Animation cancelled"));else{null===c&&(c=i);var s=Math.min(1,(i-c)/l);t[e]=a(s)*(n-u)+u,s>=1?requestAnimationFrame((function(){o(null)})):requestAnimationFrame(r)}};u===n?o(new Error("Element already at target position")):requestAnimationFrame(m)}(A,X.current,e)},te=function(e){var t=X.current[A];R?t+=e:(t+=e*(O?-1:1),t*=O&&"reverse"===dw()?-1:1),ee(t)},ne=function(){te(-X.current[P])},re=function(){te(X.current[P])},oe=B.useCallback((function(e){G({overflow:null,marginBottom:-e})}),[]),ie=ny((function(){var e=Z(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[L]<t[L]){var r=t[A]+(n[L]-t[L]);ee(r)}else if(n[I]>t[I]){var o=t[A]+(n[I]-t[I]);ee(o)}})),ae=ny((function(){if(T&&"off"!==y){var e,t,n=X.current,r=n.scrollTop,o=n.scrollHeight,i=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(R)e=r>1,t=r<o-i-1;else{var l=pw(X.current,N.direction);e=O?l<a-s-1:l>1,t=O?l>1:l<a-s-1}e===W.start&&t===W.end||_({start:e,end:t})}}));B.useEffect((function(){var e=Cx((function(){Q(),ae()})),t=ix(X.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[Q,ae]);var se=B.useCallback(Cx((function(){ae()})));B.useEffect((function(){return function(){se.clear()}}),[se]),B.useEffect((function(){$(!0)}),[]),B.useEffect((function(){Q(),ae()})),B.useEffect((function(){ie()}),[ie,H]),B.useImperativeHandle(n,(function(){return{updateIndicator:Q,updateScrollButtons:ae}}),[Q,ae]);var le=B.createElement(vw,Lp({className:a.indicator,orientation:f,color:d},x,{style:Lp({},H,{},x.style)})),ce=0,ue=B.Children.map(i,(function(e){if(!B.isValidElement(e))return null;var t=void 0===e.props.value?ce:e.props.value;K.set(t,ce);var n=t===M;return ce+=1,B.cloneElement(e,{fullWidth:"fullWidth"===w,indicator:n&&!z&&le,selected:n,onChange:p,textColor:E,value:t})})),de=function(){var e={};e.scrollbarSizeListener=T?B.createElement(hw,{className:a.scrollable,onChange:oe}):null;var t=W.start||W.end,n=T&&("auto"===y&&t||"desktop"===y||"on"===y);return e.scrollButtonStart=n?B.createElement(g,{orientation:f,direction:O?"right":"left",onClick:ne,visible:W.start,className:Vg(a.scrollButtons,"on"!==y&&a.scrollButtonsDesktop)}):null,e.scrollButtonEnd=n?B.createElement(g,{orientation:f,direction:O?"left":"right",onClick:re,visible:W.end,className:Vg(a.scrollButtons,"on"!==y&&a.scrollButtonsDesktop)}):null,e}();return B.createElement(c,Lp({className:Vg(a.root,s,R&&a.vertical),ref:t},k),de.scrollButtonStart,de.scrollbarSizeListener,B.createElement("div",{className:Vg(a.scroller,T?a.scrollable:a.fixed),style:Y,ref:X,onScroll:se},B.createElement("div",{className:Vg(a.flexContainer,R&&a.flexContainerVertical,o&&!T&&a.centered),ref:J,role:"tablist"},ue),z&&le),de.scrollButtonEnd)}));lv((function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:Ap({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(Ew);var Mw={standard:TS,filled:Zx,outlined:SE},Cw=B.forwardRef((function(e,t){var n=e.autoComplete,r=e.autoFocus,o=e.children,i=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.defaultValue,u=e.error,d=e.FormHelperTextProps,p=e.fullWidth,m=e.helperText,f=e.hiddenLabel,h=e.id,g=e.InputLabelProps,v=e.inputProps,y=e.InputProps,b=e.inputRef,x=e.label,S=e.multiline,E=e.name,M=e.onBlur,C=e.onChange,w=e.onFocus,k=e.placeholder,N=e.required,T=void 0!==N&&N,O=e.rows,R=e.rowsMax,A=e.select,L=void 0!==A&&A,I=e.SelectProps,P=e.type,D=e.value,q=e.variant,z=void 0===q?"standard":q,$=Ip(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),F=B.useState(0),H=F[0],V=F[1],W=B.useRef(null);B.useEffect((function(){if("outlined"===z){var e=j.findDOMNode(W.current);V(null!=e?e.offsetWidth:0)}}),[z,T,x]);var _={};"outlined"===z&&(g&&void 0!==g.shrink&&(_.notched=g.shrink),_.labelWidth=H),L&&(I&&I.native||(_.id=void 0),_["aria-describedby"]=void 0);var U=m&&h?"".concat(h,"-helper-text"):void 0,Y=x&&h?"".concat(h,"-label"):void 0,G=Mw[z],K=B.createElement(G,Lp({"aria-describedby":U,autoComplete:n,autoFocus:r,defaultValue:c,fullWidth:p,multiline:S,name:E,rows:O,rowsMax:R,type:P,value:D,id:h,inputRef:b,onBlur:M,onChange:C,onFocus:w,placeholder:k,inputProps:v},_,y));return B.createElement(tS,Lp({className:Vg(i.root,a),error:u,fullWidth:p,hiddenLabel:f,ref:t,required:T,color:l,variant:z},$),x&&B.createElement(AS,Lp({htmlFor:h,ref:W,id:Y},g),x),L?B.createElement(GM,Lp({"aria-describedby":U,id:h,labelId:Y,value:D,input:K},I),o):K,m&&B.createElement(aS,Lp({id:U},d),m))}));function ww(e){return Math.round(1e5*e)/1e5}lv({root:{}},{name:"MuiTextField"})(Cw);var kw=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.disableFocusListener,i=void 0!==o&&o,a=e.disableHoverListener,s=void 0!==a&&a,l=e.disableTouchListener,c=void 0!==l&&l,u=e.enterDelay,d=void 0===u?0:u,p=e.enterTouchDelay,m=void 0===p?700:p,f=e.id,h=e.interactive,g=void 0!==h&&h,v=e.leaveDelay,y=void 0===v?0:v,b=e.leaveTouchDelay,x=void 0===b?1500:b,S=e.onClose,E=e.onOpen,M=e.open,C=e.placement,w=void 0===C?"bottom":C,k=e.PopperProps,N=e.title,T=e.TransitionComponent,O=void 0===T?bS:T,R=e.TransitionProps,A=Ip(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),L=sv(),I=B.useState(!1),P=I[0],D=I[1],q=B.useState(0)[1],z=B.useState(),$=z[0],F=z[1],H=B.useRef(!1),V=B.useRef(null!=M).current,W=B.useRef(),_=B.useRef(),U=B.useRef(),Y=B.useRef(),G=B.useRef();B.useEffect((function(){W.current||(W.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),M&&q((function(e){return!e}))}),[M]),B.useEffect((function(){return function(){clearTimeout(_.current),clearTimeout(U.current),clearTimeout(Y.current),clearTimeout(G.current)}}),[]);var K=function(e){V||P||D(!0),E&&E(e)},X=function(e){var t=n.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),H.current&&"touchstart"!==e.type||($&&$.removeAttribute("title"),clearTimeout(U.current),clearTimeout(Y.current),d?(e.persist(),U.current=setTimeout((function(){K(e)}),d)):K(e))},J=fy(),Z=J.isFocusVisible,Q=J.onBlurVisible,ee=J.ref,te=B.useState(!1),ne=te[0],re=te[1],oe=function(e){V||D(!1),S&&S(e),clearTimeout(_.current),_.current=setTimeout((function(){H.current=!1}),L.transitions.duration.shortest)},ie=function(e){var t=n.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),ne&&(re(!1),Q())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout(U.current),clearTimeout(Y.current),e.persist(),Y.current=setTimeout((function(){oe(e)}),y)},ae=Yv(F,t),se=Yv(ee,ae),le=B.useCallback((function(e){Uv(se,j.findDOMNode(e))}),[se]),ce=Yv(n.ref,le),ue=V?M:P;""===N&&(ue=!1);var de=!ue&&!s,pe=Lp({"aria-describedby":ue?f||W.current:null,title:de&&"string"==typeof N?N:null},A,{},n.props,{className:Vg(A.className,n.props.className)});c||(pe.onTouchStart=function(e){H.current=!0;var t=n.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout(Y.current),clearTimeout(_.current),clearTimeout(G.current),e.persist(),G.current=setTimeout((function(){X(e)}),m)},pe.onTouchEnd=function(e){n.props.onTouchEnd&&n.props.onTouchEnd(e),clearTimeout(G.current),clearTimeout(Y.current),e.persist(),Y.current=setTimeout((function(){oe(e)}),x)}),s||(pe.onMouseOver=X,pe.onMouseLeave=ie),i||(pe.onFocus=function(e){$||F(e.currentTarget),Z(e)&&(re(!0),X(e));var t=n.props;t.onFocus&&t.onFocus(e)},pe.onBlur=ie);var me=g?{onMouseOver:pe.onMouseOver,onMouseLeave:pe.onMouseLeave,onFocus:pe.onFocus,onBlur:pe.onBlur}:{};return B.createElement(B.Fragment,null,B.cloneElement(n,Lp({ref:ce},pe)),B.createElement(AM,Lp({className:Vg(r.popper,g&&r.popperInteractive),placement:w,anchorEl:$,open:!!$&&ue,id:pe["aria-describedby"],transition:!0},me,k),(function(e){var t=e.placement,n=e.TransitionProps;return B.createElement(O,Lp({timeout:L.transitions.duration.shorter},n,R),B.createElement("div",{className:Vg(r.tooltip,r["tooltipPlacement".concat(cv(t.split("-")[0]))],H.current&&r.touch)},N))})))}));lv((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:Tp(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(ww(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(ww(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:Ap({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:Ap({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:Ap({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:Ap({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(kw);var Nw={entering:{transform:"none"},entered:{transform:"none"}},Tw={enter:Mm.enteringScreen,exit:Mm.leavingScreen};function Ow(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Rw({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const o={fontSize:Ow(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return B.createElement("i",{style:o},B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},B.createElement("path",{d:e})))}B.forwardRef((function(e,t){var n=e.children,r=e.in,o=e.onEnter,i=e.onExit,a=e.style,s=e.timeout,l=void 0===s?Tw:s,c=Ip(e,["children","in","onEnter","onExit","style","timeout"]),u=sv(),d=Yv(n.ref,t);return B.createElement(wv,Lp({appear:!0,in:r,onEnter:function(e,t){Wv(e);var n=_v({style:a,timeout:l},{mode:"enter"});e.style.webkitTransition=u.transitions.create("transform",n),e.style.transition=u.transitions.create("transform",n),o&&o(e,t)},onExit:function(e){var t=_v({style:a,timeout:l},{mode:"exit"});e.style.webkitTransition=u.transitions.create("transform",t),e.style.transition=u.transitions.create("transform",t),i&&i(e)},timeout:l},c),(function(e,t){return B.cloneElement(n,Lp({style:Lp({transform:"scale(0)",visibility:"exited"!==e||r?void 0:"hidden"},Nw[e],{},a,{},n.props.style),ref:d},t))}))}));const Aw={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},Lw={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},Iw="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Pw={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},Dw={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function qw(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Yi.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function zw(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=Z(!0,{},a),l=s.qHyperCubeDef[r][t],c=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];c.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(c.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=c,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,o&&o({oldItem:l,newItem:c,oldProperties:a,newProperties:s,model:e}),qw(e,a,s)}))}function Bw({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){zw(r,e,t,"qDimensions",a)}}}function $w(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var o}function Fw({altList:e,app:t,dir:n,dock:r,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(n)},changeTo(e,t){zw(o,e,t,"qMeasures",i,a)}}}function Hw(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const jw={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},Vw=({children:e,...t})=>B.createElement(yb,lp({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);const Ww=Nm({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const _w=Rm({productionPrefix:"qf8e0",disableGlobal:!0,seed:""});function Uw(e,t,n,r){const o=function(t){const n=String(t);return e(n)};return o.ticks=()=>t.map((t=>{const i=o([t.data.value,r?n-1:0]),a=o([t.data.value,r?0:n-1])+e.bandwidth();return{position:(i+a)/2,label:t.label,data:t.data,start:i,end:a}})),o.bandwidth=()=>e.bandwidth(),o.data=()=>e.data(),o.domain=()=>e.domain(),o.pxScale=function(r){const o=e.pxScale(r);return o===e?this:Uw(o,t,n)},o}function Yw(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const o=t(e,n,r),i=o.domain(),a=o.ticks(),s=[],l=e.measureCount;return i.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),o.domain(s),Uw(o,a,l,e.invert)}))}const Gw={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:o,flipXY:i,symbol:a}){let s="x",l="y",c=r,u=o,d=t<.5?90:-90;return i&&(s="y",l="x",c=o,u=r,d=t<.5?180:0),a(Z({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function Kw({i:e,width:t,height:n,resolved:r,keys:o,flipXY:i,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=Z({},{major:l,majorEnd:c},r.minor.items[e]);o.forEach((t=>{d[t]=r[t].items[e]}));const p=i?n:t,m=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:o}){const i=e>=0?1:-1;let a=Math.min(i*e*t,Number.isNaN(Number(r))?o:r/o);return a=Number.isNaN(Number(n))?a:Math.max(n/o,a),a*i}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:p}),f=(u-m)/2,h=f+d.major+m/2;return{item:d,boxCenter:h,boxWidth:m,boxPadding:f,rendWidth:t,rendHeight:n}}function Xw({keys:e,data:t,defaultSettings:n,style:r,settings:o,width:i,height:a,resolver:s}){const l=Z(!0,{},n||{},r||{}),c={major:"horizontal"===o.orientation?a:i,minor:"horizontal"===o.orientation?i:a},u=o.major;let d;d="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:o.major}});const p=o.minor||{};let m;const f={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{start:{scale:p.scale,ref:"start"},end:{scale:p.scale,ref:"end"},min:{scale:p.scale,ref:"min"},max:{scale:p.scale,ref:"max"},med:{scale:p.scale,ref:"med"}},p)})};for(let n=0,r=e.length;n<r;n++)m=e[n],f[m]=s.resolve({data:t,defaults:l[m],settings:o[m],scaled:c});return f}const Jw=["oob"];const Zw={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:o,style:i,resolver:a,symbol:s}=this,l=Xw({keys:Jw,data:o,defaultSettings:{oob:Gw.getDefaultSettings()},style:i,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l;return function({width:e,height:t,flipXY:n,resolved:r,keys:o,symbol:i,dockValue:a,_calcItemRenderingOpts:s=Kw}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:p,rendWidth:m,rendHeight:f}=s({i:u,width:e,height:t,resolved:r,keys:o,flipXY:n,calcKey:"oob"}),h=c[u].data,g=[];if(d.oob.show){g.push(Gw.createOob({oob:d.oob,dockValue:a,boxCenter:p,rendWidth:m,rendHeight:f,flipXY:n,symbol:i}));const e={type:"container",data:h,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:u,settings:c,width:e,height:t,flipXY:r,resolved:l,keys:Jw,symbol:s,dockValue:n})}},Qw={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},ek=["hat"];function tk(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function nk({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:o,flipXY:i}){let a="x",s="y",l=r,c=o,u=e.hat.alignment||0;i&&(a="y",s="x",l=o,c=r,u=1-u);const d=(n+e.major)*l;let p=[{[a]:d,[s]:0+c},{[a]:d+t*u*l,[s]:8},{[a]:d+t*l,[s]:0+c},{[a]:d+t*l,[s]:0+c+10},{[a]:d,[s]:0+c+10}];const m=Z({},e.hat,{type:"path",d:tk(p)});p=[{[a]:d,[s]:0},{[a]:d+t*(1-u)*l,[s]:0+c-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[m,Z({},e.hat,{type:"path",d:tk(p)})]}const rk={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:o,resolver:i}=this,a=Xw({keys:ek,data:r,defaultSettings:Qw,style:o,settings:this.settings.settings,width:e,height:t,resolver:i}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:r,keys:o,_calcItemRenderingOpts:i=Kw}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m}=i({i:l,width:e,height:t,resolved:r,keys:o,flipXY:n,calcKey:"hat"}),f=s[l].data,h=[];c.hat.show&&h.push(...nk({item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m,flipXY:n}));const g={type:"container",data:f,collider:{type:"bounds"},children:h};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:ek})}};var ok="unclassified",ik="equal-equal",ak="equal-higher",sk="equal-lower",lk="equal-void",ck="higher-equal",uk="higher-higher-acute",dk="higher-higher-obtuse",pk="higher-lower-negative",mk="higher-lower-positive",fk="higher-void",hk="lower-equal",gk="lower-higher-negative",vk="lower-higher-positive",yk="lower-lower-acute",bk="lower-lower-obtuse",xk="lower-void",Sk="void-equal",Ek="void-higher",Mk="void-lower",Ck="void-void";function wk(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function kk(e,t,n){const r=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),o=Math.sqrt((t.x-n.x)**2+(t.y-n.y)**2),i=Math.sqrt((n.x-e.x)**2+(n.y-e.y)**2);return Math.acos((o*o+r*r-i*i)/(2*o*r))*(180/Math.PI)}function Nk({previous:e,current:t,next:n}){const r=e&&e.value,o=t&&t.value,i=n&&n.value;return e||n?e?n?r===o?o===i?ik:o<i?ak:sk:o===i?r>o?ck:hk:r>o?o<i?kk(e,t,n)>90?dk:uk:wk(e,t)>wk(e,n)?mk:pk:o>i?kk(e,t,n)>90?bk:yk:wk(e,t)>wk(e,n)?vk:gk:r===o?lk:r>o?fk:xk:o===i?Sk:o<i?Ek:Mk:Ck}function Tk({bounds:e,size:t}){const{x:n,y:r,width:o,height:i}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(n+o/2)>=0&&Math.ceil(n+o/2)<=t.width&&Math.floor(r+i/2)>=0&&Math.ceil(r+i/2)<=t.height:Math.floor(n+o)>0&&Math.ceil(n)<t.width&&Math.floor(r+i/2)>=0&&Math.ceil(r+i/2)<=t.height}const Ok=1,Rk=0;function Ak({node:e,line:t,groupIndex:n,extract:r,style:o,measureText:i,size:a,horizontal:s,rtl:l,meta:c,showLabel:u}){const d=r.label(e.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;const p=i({fontFamily:o.fontFamily,fontSize:o.fontSize,text:d}),{localBounds:m}=e,{"stroke-width":f}=e.attrs,h=r.pointValue(e.data),g={x:m.x+m.width/2,y:m.y+m.height/2,width:p.width+2*Ok,height:p.height+2*Rk},v=`${g.x}-${g.y}`,y=!s&&!l,b=s?a.height:a.width,x=(s?g.y:g.x)/b,S=(y?1-x:x)<=(b<=200?.25:.1),E={key:v,node:e,line:t,group:n,value:h,labelMeasurements:p,bounds:g,inside:Tk({bounds:m,size:a}),border:f?f/2:0,classification:ok,setClassification(e){E.classification=e},preferences:[],setPreferences(e){E.preferences.push(...e)},placement:void 0,setPlacement(e){E.placement=e},duplicate:!1,setDuplicate(){E.duplicate=!0},extreme:c.getExtreme(v),elite:S,show:u(e)};return E}function Lk({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}){const l=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},n=e.map((e=>{const{localBounds:t}=e,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${n.x}-${n.y}`,center:n}})),r=n.reduce(((e,t)=>((!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e)),{});return t.top=n.filter((e=>e.center.y===r.top.center.y)).map((e=>e.key)),t.right=n.filter((e=>e.center.x===r.right.center.x)).map((e=>e.key)),t.bottom=n.filter((e=>e.center.y===r.bottom.center.y)).map((e=>e.key)),t.left=n.filter((e=>e.center.x===r.left.center.x)).map((e=>e.key)),{getExtrema:e=>({top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}),getExtreme:e=>{const{top:n,right:r,bottom:o,left:i}=t;return[n,r,o,i].some((t=>-1!==t.indexOf(e)))}}}({nodes:e});return function({nodes:e,by:t,lineIndex:n}){const r=e.reduce(((e,r,o)=>{const i=t(r.data);return e[i]||(e[i]={items:[],index:o}),e[i].items.push({node:r,line:r.data[n].value}),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:e,by:t.majorValue,lineIndex:t.lineIndex}).map(((e,c)=>e.map((e=>({line:e.line,item:Ak({node:e.node,line:e.line,groupIndex:c,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,meta:l,showLabel:s})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{}))).filter((e=>Object.keys(e).length))}var Ik={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},Pk={[ik]:[Ik.TOP,Ik.BOTTOM],[ak]:[Ik.BOTTOM,Ik.BOTTOM_RIGHT],[sk]:[Ik.TOP,Ik.TOP_RIGHT],[lk]:[Ik.TOP,Ik.BOTTOM],[ck]:[Ik.LEFT,Ik.BOTTOM_LEFT,Ik.TOP,Ik.TOP_RIGHT],[uk]:[Ik.BOTTOM,Ik.BOTTOM_LEFT,Ik.LEFT,Ik.TOP_RIGHT],[dk]:[Ik.BOTTOM,Ik.TOP],[pk]:[Ik.TOP,Ik.TOP_RIGHT,Ik.RIGHT],[mk]:[Ik.BOTTOM,Ik.BOTTOM_LEFT,Ik.LEFT],[fk]:[Ik.TOP],[hk]:[Ik.TOP],[gk]:[Ik.TOP,Ik.TOP_LEFT],[vk]:[Ik.BOTTOM_RIGHT],[yk]:[Ik.TOP,Ik.TOP_LEFT,Ik.LEFT,Ik.TOP_RIGHT,Ik.RIGHT],[bk]:[Ik.TOP,Ik.BOTTOM],[xk]:[Ik.TOP],[Sk]:[Ik.TOP],[Ek]:[Ik.TOP,Ik.BOTTOM],[Mk]:[Ik.TOP,Ik.BOTTOM,Ik.LEFT],[Ck]:[Ik.TOP]};function Dk({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}){const l=Lk({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}),c=[...l.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[u]=c,d=function({groups:e,threshold:t}){const n=e.map((e=>Object.keys(e).map((t=>e[t])))),r={};for(let e=0;e<=n.length;e++){const t=n[e];if(t)for(let e=0;e<t.length;e++){const n=t[e],{line:o}=n;r[o]||(r[o]=[]),r[o].push(n.bounds)}}const o=Object.keys(r).map((e=>r[e])),i=[];for(let e=0;e<o.length;e++)for(let n=0;n<o[e].length-1;n++){const r=o[e][n],a=o[e][n+1],s={x1:r.x,y1:r.y,x2:a.x,y2:a.y},l=s.x1-s.x2,c=s.y1-s.y2;Math.sqrt(l*l+c*c)>t&&i.push(s)}return i}({groups:l,threshold:u.node.localBounds.height}),p={getItems:()=>c,getLines:()=>d};return function({groups:e}){for(let t=0;t<e.length;t++){const n=Object.keys(e[t]).map((n=>e[t][n]));for(let r=0;r<n.length;r++){const o=n[r],i=Nk({previous:e[t-1]&&e[t-1][o.line],current:o,next:e[t+1]&&e[t+1][o.line]});o.setClassification(i)}}}({groups:l}),p.getItems().forEach((e=>e.setPreferences(Pk[e.classification]))),p}function qk({item:e,placement:t,size:n}){return t.x>=0-n.edgeBleed.left&&t.x<=n.width-e.bounds.width+n.edgeBleed.right&&t.y>=0-n.edgeBleed.top&&t.y<=n.height-e.bounds.height}function zk({line1:e,line2:t}){const n=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===n)return!1;const r=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/n,o=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/n;return r>=0&&r<=1&&o>=0&&o<=1}function Bk({candidate:e,lines:t,rects:n}){return!!n.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const n={x:t.x,y:t.y},r={x:t.x+t.width,y:t.y},o={x:t.x+t.width,y:t.y+t.height},i={x:t.x,y:t.y+t.height},a={x1:r.x,y1:r.y,x2:o.x,y2:o.y},s={x1:o.x,y1:o.y,x2:i.x,y2:i.y},l={x1:i.x,y1:i.y,x2:n.x,y2:n.y};return zk({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||zk({line1:e,line2:a})||zk({line1:e,line2:s})||zk({line1:e,line2:l})}({line:t,rect:e})))}const $k={x:0,width:0,y:0,height:0};const Fk=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Hk=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),jk=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),Vk=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Wk=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),_k=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Uk=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),Yk=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var Gk=2.5,Kk=4;const Xk=[Ik.TOP,Ik.TOP_LEFT,Ik.TOP_RIGHT],Jk=[Ik.BOTTOM,Ik.BOTTOM_LEFT,Ik.BOTTOM_RIGHT];function Zk({position:e}){const t={x:Gk,width:-2*Gk,y:0,height:0},n=Xk.indexOf(e)>-1,r=Jk.indexOf(e)>-1;return n&&(t.y=Kk,t.height=-Kk),r&&(t.height=-Kk),t}function Qk({cx:e,cy:t,r:n,degrees:r}){const o=r*(Math.PI/180);return{x:Math.round(e+n*Math.sin(o)),y:Math.round(t+n*-Math.cos(o))}}function eN({coordinates:e,degrees:t,item:n}){const r={x:e.x,y:e.y};return t<=90?r.y-=n.bounds.height:t>180&&t<=270?r.x-=n.bounds.width:t>270&&(r.y-=n.bounds.height,r.x-=n.bounds.width),r}function tN({item:e,validator:t,force:n=!1}){const r=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),o=e.bounds.x,i=e.bounds.y;for(let a=0;a<r.length;a++){const s=r[a];for(let r=40;r<=180;r+=15){const a=eN({coordinates:Qk({cx:o,cy:i,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}for(let r=320;r>180;r-=15){const a=eN({coordinates:Qk({cx:o,cy:i,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}}return!1}const nN=void 0;function rN({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys(Ik).map((e=>Ik[e])).filter((t=>-1===e.preferences.indexOf(t)))],o={[Ik.TOP]:Fk,[Ik.TOP_RIGHT]:Hk,[Ik.RIGHT]:jk,[Ik.BOTTOM_RIGHT]:Vk,[Ik.BOTTOM]:Wk,[Ik.BOTTOM_LEFT]:_k,[Ik.LEFT]:Uk,[Ik.TOP_LEFT]:Yk},i=[];for(let a=0;a<r.length;a++){const s=r[a],l=o[s]({item:e}),c=Zk({position:s}),u=t({item:e,placement:l,adjustment:c,ignoreLines:n});if(n&&u.inside&&i.push(l),u.valid)return l}const a=()=>tN({item:e,validator:t,force:n});if(n){const e=a();return e||(i[0]||nN)}return(e.extreme||e.elite)&&a()||nN}function oN({model:e,size:t,all:n}){const r={},o=e.getItems(),i=[...o.map((e=>({x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2})))],a=[],s=e.getLines();o.forEach((e=>{const{data:o}=e.node;if(!e.show||!e.inside||o.null&&o.null.value||o.interpolated&&o.interpolated.value)return;const{key:l}=e;if(r[l])return void e.setDuplicate();r[l]=!0;const c=function({size:e,lines:t,placements:n}){return function({item:r,placement:o,adjustment:i=$k,ignoreLines:a=!1}){const s={inside:qk({item:r,placement:o,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=Bk({candidate:{x:o.x+i.x,y:o.y+i.y,width:r.bounds.width+i.width,height:r.bounds.height+i.height},lines:a?[]:t,rects:n}),s.valid=!s.collides,s):s}}({size:t,lines:s,placements:i}),u=rN({item:e,validator:c});u?(u.height=e.bounds.height,u.width=e.bounds.width,i.push(u),e.setPlacement(u)):n&&a.push({item:e,validator:c})})),a.forEach((e=>{const{item:t,validator:n}=e,r=rN({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,i.push(r),t.setPlacement(r))}))}var iN={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,connect:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},target:{point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge",labelSpace:{use:()=>!1,size:10}},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},{orientation:t,rtl:n,labelSpace:r}=this.settings.settings,{use:o,size:i}=r;if(o()){const r="horizontal"===t;e.edgeBleed.top=r?i:0,e.edgeBleed[n?"left":"right"]=r?0:i}return e},render(){if(!this.chart.component(this.settings.settings.target.point))return[];const{allPoints:e}=this.settings.settings.target,t=e.length?e=>this.settings.settings.target.allPoints.includes(e.key):e=>e.key===this.settings.settings.target.point,n=this.chart.findShapes("circle").filter(t);if(!n.length)return[];const{settings:r}=this.settings,o="horizontal"===r.orientation,i=o?"x":"y";n.sort(((e,t)=>e.localBounds[i]-t.localBounds[i]));const a={label:r.label,pointValue:r.pointValue,majorValue:r.majorValue,lineIndex:r.lineIndex},{height:s,width:l,edgeBleed:c}=this.rect,u={height:s,width:l,edgeBleed:c,insideStrategy:r.insideStrategy},{style:d}=this,p=Dk({nodes:n,extract:a,style:d,measureText:this.renderer.measureText,size:u,horizontal:o,rtl:r.rtl,showLabel:r.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:p}),oN({model:p,size:u,all:r.all}),p.getItems().filter((e=>e.placement&&e.node.key===this.settings.settings.target.point)).map((e=>({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:d.fontSize,fontFamily:d.fontFamily,fill:d.fill,text:a.label(e.node.data),baseline:"central",anchor:"middle"})))}},aN={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var sN={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:o,size:i,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,c=this.settings.settings.primaryExtremum(),u=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==c,p=l.length&&void 0!==u;if(!d&&!p)return[];const m=s.map((e=>e.ref)),f=l.map((e=>e.ref)),h=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:o=[],primarySeries:i=[],secondarySeries:a=[]}){const s=[];return[...i,...a].forEach((i=>{const a=i.isPrimary?t:n,l=i.isPrimary?r:o;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const o="max"===e?e=>e>t:e=>e<t,i=n?e=>o(e.point.value<0?e.start.value:e.end.value):e=>o(e.end.value);return r.filter(i)})({type:e,extremum:a,items:l}))})),(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])})}({type:t,primaryExtremum:c,secondaryExtremum:u,primaryItems:e.filter((e=>m.includes(e.end.source.field))),secondaryItems:e.filter((e=>f.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!h.length)return[];const g="horizontal"===n,v=this.rect[g?"width":"height"],y=this.resolver.resolve({data:{items:h},settings:{major:a},scaled:{major:v}}),b=("max"===t?90:-90)-(g?0:90)-(!g&&r?180:0),x=i/2*o,{fill:S}=this.settings.style;return y.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:o,y:i,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:o,y:i,data:a})}({symbol:this.symbol,size:i,fill:S,startAngle:b,x:g?v*e.major:x,y:g?x:v*e.major,data:e.data})))}};function lN({x:e,y:t,size:n,stroke:r,strokeWidth:o,fill:i}){return{type:"container",children:[{type:"line",stroke:r||i,strokeWidth:o,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:i,cx:e,cy:t,r:.25*n}]}}function cN({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))];return e.findShapes("path").filter((e=>r.some((t=>t===e.key)))).reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function uN({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function dN({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(_a.SCALE.MAJOR),o=r&&r.max&&r.max(),i="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===o?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&i(e,t.max)))}}function pN({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:o,chart:i}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:c,legendTap:u}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let p=[c?e=>e.color.value:r[d]].filter(Boolean);if(o&&l&&p.push((e=>e.color.value)),!o&&u&&(p=[e=>e.color.value]),!p.length)return[];const m=function({brush:e,chart:t}){return("value"===e.type?uN:dN)({brush:e,chart:t})}({brush:s,chart:i});return m?n.reduce(((e,t,n)=>(p.some((e=>m({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function mN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(_a.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,d=i.domain().map((e=>({color:i(Math.min(l,Math.max(s,e)))||o,offset:Math.min(1,Math.max(0,(e-s)/u))}))),p=d.map((e=>e.offset)),m=p.lastIndexOf(0),f=p.indexOf(1),h=d.slice(-1===m?0:m,-1===f?d.length:f+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:h}}function fN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(_a.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,c=0===l?1:l,u=i.domain(),d=[];for(let e=0;e<u.length-1;e++){const t=u[e],n=i(t)||o;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/c))});const r=u[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/c))})}const p=d.map((e=>e.offset)),m=p.lastIndexOf(0),f=p.indexOf(1),h=d.slice(-1===m?0:m,-1===f?d.length:f+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:h}}function hN({property:e,chart:t,connection:n,attrs:r,colorSettings:o,colorByData:i,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:c,orientation:u,rtl:d}){const p=r[e];if("gradient"!==p.type)return p;const{type:m,nil:f}=o;if(s||!i)return function({chart:e,selected:t,connection:n,gradient:r,fallback:o,orientation:i,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:c}){const u=e.scale(_a.SCALE.MAJOR),d=e.scale(_a.SCALE.COLOR),p=s?e=>u([e,0])+u.bandwidth()*l/2:e=>u(e),m=t.filter((e=>-1!==n.indexOf(e.index))),f=("vertical"===i&&c?m.reverse():m).map((e=>e.item)),h=f.map((e=>p(e.major.value))),g=Math.min(...h),v=Math.max(...h)-g,y=0===v?1:v,b=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-g)/y)),x=[];for(let e=0;e<f.length;e++){const t=f[e],n=a?t.color.value:d(t.color.value)||o,r=b[e];x.push({color:n,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:n,offset:e===f.length-1?1:Math.max(0,parseFloat((r+(b[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:x}}({chart:t,selected:a,connection:n,gradient:p,fallback:f,orientation:u,isColorCode:"color"===m,groupedByMeasure:l,itemsPerGroup:c,rtl:d});return("continuous"===m?mN:fN)({chart:t,selected:a,connection:n,gradient:p,fallback:f})}function gN({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:o,groupedByMeasure:i,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:d,rtl:p,count:m}){const f=t.getLine(l,c),{attrs:h}=f,g=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:h.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:i,orientation:a,selected:s,connection:l,commands:c,attrs:u,rtl:d,count:p}){return{path:l.map(((e,t)=>{const n=c[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:u,stroke:hN({property:"stroke",chart:e,connection:l,attrs:u,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:i,orientation:a,rtl:d,count:p})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:o,groupedByMeasure:i,itemsPerGroup:a,orientation:s,selected:u,connection:t,commands:g,attrs:h,rtl:p,count:m})))}function vN({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:o,items:i,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:d,orientation:p,rtl:m}){const f=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const o=n.typeIndex.value;var i;return e[o]||(e[o]={key:o,items:[],index:r,measureIx:null===(i=n.colorMeasureIdx)||void 0===i?void 0:i.value,primary:t.primary.some((e=>e.typeIndex===o))}),e[o].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:o}=t;return!r||(o?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:i,selectionInfo:o,seriesInfo:n}),seriesInfo:n}),{lines:h}=f.reduce(((n,i)=>{const f=pN({brush:r,selectionInfo:o,items:i.items,selectionValues:a,colorByData:l,chart:e});if(f.length<2)return n;const h=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:f});return h.length?(n.lines.push(...gN({chart:e,pathModel:t,colorSettings:s(i.measureIx),colorByData:l(i.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:d,orientation:p,lineKey:i.lineKey,primary:i.primary,selected:f,connections:h,rtl:m,count:i.items.length})),n):n}),{lines:[]}),g=[];return h.forEach((e=>g.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),g}var yN={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:cN({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=vN({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=cN({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return vN({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const bN={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},xN=e=>void 0===e.marker?bN.circle:bN[e.marker],SN=e=>void 0===e.markerFill||e.markerFill;function EN({series:e,layoutService:t}){switch(su(e)){case Ua.MARKER:return(e=>({marker:xN(e),fill:SN(e)}))(e);case Ua.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);default:return{}}}function MN(e=Ga,t){return t?e.axis===Ya.PRIMARY:e.axis===Ya.PRIMARY||su(e)===Ua.BAR}var CN={exports:{}};var wN={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};var kN="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=wN,r=kN,o=(t=e.exports={}).re=[],i=t.src=[],a=t.t={};let s=0;const l=(e,t,n)=>{const l=s++;r(l,t),a[e]=l,i[l]=t,o[l]=new RegExp(t,n?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),l("FULL",`^${i[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),l("LOOSE",`^${i[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",i[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",i[a.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),l("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",i[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}(CN,CN.exports);const NN=["includePrerelease","loose","rtl"];var TN=e=>e?"object"!=typeof e?{loose:!0}:NN.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const ON=/^[0-9]+$/,RN=(e,t)=>{const n=ON.test(e),r=ON.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var AN={compareIdentifiers:RN,rcompareIdentifiers:(e,t)=>RN(t,e)};const LN=kN,{MAX_LENGTH:IN,MAX_SAFE_INTEGER:PN}=wN,{re:DN,t:qN}=CN.exports,zN=TN,{compareIdentifiers:BN}=AN;class $N{constructor(e,t){if(t=zN(t),e instanceof $N){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>IN)throw new TypeError(`version is longer than ${IN} characters`);LN("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?DN[qN.LOOSE]:DN[qN.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>PN||this.major<0)throw new TypeError("Invalid major version");if(this.minor>PN||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>PN||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<PN)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(e){if(LN("SemVer.compare",this.version,this.options,e),!(e instanceof $N)){if("string"==typeof e&&e===this.version)return 0;e=new $N(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof $N||(e=new $N(e,this.options)),BN(this.major,e.major)||BN(this.minor,e.minor)||BN(this.patch,e.patch)}comparePre(e){if(e instanceof $N||(e=new $N(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],r=e.prerelease[t];if(LN("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return BN(n,r)}while(++t)}compareBuild(e){e instanceof $N||(e=new $N(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(LN("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return BN(n,r)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}var FN=$N;const{MAX_LENGTH:HN}=wN,{re:jN,t:VN}=CN.exports,WN=FN,_N=TN;var UN=(e,t)=>{if(t=_N(t),e instanceof WN)return e;if("string"!=typeof e)return null;if(e.length>HN)return null;if(!(t.loose?jN[VN.LOOSE]:jN[VN.FULL]).test(e))return null;try{return new WN(e,t)}catch(e){return null}};const YN=UN;var GN=(e,t)=>{const n=YN(e,t);return n?n.version:null};const KN=UN;var XN=(e,t)=>{const n=KN(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const JN=FN;var ZN=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new JN(e,n).inc(t,r).version}catch(e){return null}};const QN=FN;var eT=(e,t,n)=>new QN(e,n).compare(new QN(t,n));const tT=eT;var nT=(e,t,n)=>0===tT(e,t,n);const rT=UN,oT=nT;var iT=(e,t)=>{if(oT(e,t))return null;{const n=rT(e),r=rT(t),o=n.prerelease.length||r.prerelease.length,i=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==r[e])return i+e;return a}};const aT=FN;var sT=(e,t)=>new aT(e,t).major;const lT=FN;var cT=(e,t)=>new lT(e,t).minor;const uT=FN;var dT=(e,t)=>new uT(e,t).patch;const pT=UN;var mT=(e,t)=>{const n=pT(e,t);return n&&n.prerelease.length?n.prerelease:null};const fT=eT;var hT=(e,t,n)=>fT(t,e,n);const gT=eT;var vT=(e,t)=>gT(e,t,!0);const yT=FN;var bT=(e,t,n)=>{const r=new yT(e,n),o=new yT(t,n);return r.compare(o)||r.compareBuild(o)};const xT=bT;var ST=(e,t)=>e.sort(((e,n)=>xT(e,n,t)));const ET=bT;var MT=(e,t)=>e.sort(((e,n)=>ET(n,e,t)));const CT=eT;var wT=(e,t,n)=>CT(e,t,n)>0;const kT=eT;var NT=(e,t,n)=>kT(e,t,n)<0;const TT=eT;var OT=(e,t,n)=>0!==TT(e,t,n);const RT=eT;var AT=(e,t,n)=>RT(e,t,n)>=0;const LT=eT;var IT=(e,t,n)=>LT(e,t,n)<=0;const PT=nT,DT=OT,qT=wT,zT=AT,BT=NT,$T=IT;var FT=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return PT(e,n,r);case"!=":return DT(e,n,r);case">":return qT(e,n,r);case">=":return zT(e,n,r);case"<":return BT(e,n,r);case"<=":return $T(e,n,r);default:throw new TypeError("Invalid operator: "+t)}};const HT=FN,jT=UN,{re:VT,t:WT}=CN.exports;var _T,UT,YT,GT,KT,XT,JT,ZT,QT,eO,tO=(e,t)=>{if(e instanceof HT)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=VT[WT.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),VT[WT.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;VT[WT.COERCERTL].lastIndex=-1}else n=e.match(VT[WT.COERCE]);return null===n?null:jT(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};function nO(){if(GT)return YT;function e(t){var n=this;if(n instanceof e||(n=new e),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(e){n.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)n.push(arguments[r]);return n}function t(e,t,n){var r=t===e.head?new o(n,null,t,e):new o(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function n(e,t){e.tail=new o(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function r(e,t){e.head=new o(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function o(e,t,n,r){if(!(this instanceof o))return new o(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}GT=1,YT=e,e.Node=o,e.create=e,e.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},e.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},e.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},e.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)n(this,arguments[e]);return this.length},e.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)r(this,arguments[e]);return this.length},e.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},e.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},e.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},e.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},e.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},e.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},e.prototype.map=function(t,n){n=n||this;for(var r=new e,o=this.head;null!==o;)r.push(t.call(n,o.value,this)),o=o.next;return r},e.prototype.mapReverse=function(t,n){n=n||this;for(var r=new e,o=this.tail;null!==o;)r.push(t.call(n,o.value,this)),o=o.prev;return r},e.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},e.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},e.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},e.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},e.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var o=0,i=this.head;null!==i&&o<t;o++)i=i.next;for(;null!==i&&o<n;o++,i=i.next)r.push(i.value);return r},e.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var o=this.length,i=this.tail;null!==i&&o>n;o--)i=i.prev;for(;null!==i&&o>t;o--,i=i.prev)r.push(i.value);return r},e.prototype.splice=function(e,n,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;var a=[];for(o=0;i&&o<n;o++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(o=0;o<r.length;o++)i=t(this,i,r[o]);return a},e.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{(UT?_T:(UT=1,_T=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}))(e)}catch(e){}return YT}function rO(){if(ZT)return JT;ZT=1;class e{constructor(t,o){if(o=n(o),t instanceof e)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new e(t.raw,o);if(t instanceof r)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+t);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!d(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&p(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=t.get(n);if(i)return i;const p=this.options.loose,m=p?a[s.HYPHENRANGELOOSE]:a[s.HYPHENRANGE];e=e.replace(m,C(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(a[s.COMPARATORTRIM],l),o("comparator trim",e,a[s.COMPARATORTRIM]),e=(e=(e=e.replace(a[s.TILDETRIM],c)).replace(a[s.CARETTRIM],u)).split(/\s+/).join(" ");const h=p?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],g=e.split(" ").map((e=>f(e,this.options))).join(" ").split(/\s+/).map((e=>M(e,this.options))).filter(this.options.loose?e=>!!e.match(h):()=>!0).map((e=>new r(e,this.options)));g.length;const v=new Map;for(const e of g){if(d(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const y=[...v.values()];return t.set(n,y),y}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>m(e,n)&&t.set.some((t=>m(t,n)&&e.every((e=>t.every((t=>e.intersects(t,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(w(this.set[t],e,this.options))return!0;return!1}}JT=e;const t=new(function(){if(XT)return KT;XT=1;const e=nO(),t=Symbol("max"),n=Symbol("length"),r=Symbol("lengthCalculator"),o=Symbol("allowStale"),i=Symbol("maxAge"),a=Symbol("dispose"),s=Symbol("noDisposeOnSet"),l=Symbol("lruList"),c=Symbol("cache"),u=Symbol("updateAgeOnGet"),d=()=>1,p=(e,t,n)=>{const r=e[c].get(t);if(r){const t=r.value;if(m(e,t)){if(h(e,r),!e[o])return}else n&&(e[u]&&(r.value.now=Date.now()),e[l].unshiftNode(r));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[i])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[i]&&n>e[i]},f=e=>{if(e[n]>e[t])for(let r=e[l].tail;e[n]>e[t]&&null!==r;){const t=r.prev;h(e,r),r=t}},h=(e,t)=>{if(t){const r=t.value;e[a]&&e[a](r.key,r.value),e[n]-=r.length,e[c].delete(r.key),e[l].removeNode(t)}};class g{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const v=(e,t,n,r)=>{let i=n.value;m(e,i)&&(h(e,n),e[o]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};return KT=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[t]=e.max||1/0;const n=e.length||d;if(this[r]="function"!=typeof n?d:n,this[o]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[i]=e.maxAge||0,this[a]=e.dispose,this[s]=e.noDisposeOnSet||!1,this[u]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[t]=e||1/0,f(this)}get max(){return this[t]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[i]=e,f(this)}get maxAge(){return this[i]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[r]&&(this[r]=e,this[n]=0,this[l].forEach((e=>{e.length=this[r](e.value,e.key),this[n]+=e.length}))),f(this)}get lengthCalculator(){return this[r]}get length(){return this[n]}get itemCount(){return this[l].length}rforEach(e,t){t=t||this;for(let n=this[l].tail;null!==n;){const r=n.prev;v(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[l].head;null!==n;){const r=n.next;v(this,e,n,t),n=r}}keys(){return this[l].toArray().map((e=>e.key))}values(){return this[l].toArray().map((e=>e.value))}reset(){this[a]&&this[l]&&this[l].length&&this[l].forEach((e=>this[a](e.key,e.value))),this[c]=new Map,this[l]=new e,this[n]=0}dump(){return this[l].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[l]}set(e,o,u){if((u=u||this[i])&&"number"!=typeof u)throw new TypeError("maxAge must be a number");const d=u?Date.now():0,p=this[r](o,e);if(this[c].has(e)){if(p>this[t])return h(this,this[c].get(e)),!1;const r=this[c].get(e).value;return this[a]&&(this[s]||this[a](e,r.value)),r.now=d,r.maxAge=u,r.value=o,this[n]+=p-r.length,r.length=p,this.get(e),f(this),!0}const m=new g(e,o,p,d,u);return m.length>this[t]?(this[a]&&this[a](e,o),!1):(this[n]+=m.length,this[l].unshift(m),this[c].set(e,this[l].head),f(this),!0)}has(e){if(!this[c].has(e))return!1;const t=this[c].get(e).value;return!m(this,t)}get(e){return p(this,e,!0)}peek(e){return p(this,e,!1)}pop(){const e=this[l].tail;return e?(h(this,e),e.value):null}del(e){h(this,this[c].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[c].forEach(((e,t)=>p(this,t,!1)))}}}())({max:1e3}),n=TN,r=oO(),o=kN,i=FN,{re:a,t:s,comparatorTrimReplace:l,tildeTrimReplace:c,caretTrimReplace:u}=CN.exports,d=e=>"<0.0.0-0"===e.value,p=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},f=(e,t)=>(o("comp",e,t),e=y(e,t),o("caret",e),e=g(e,t),o("tildes",e),e=x(e,t),o("xrange",e),e=E(e,t),o("stars",e),e),h=e=>!e||"x"===e.toLowerCase()||"*"===e,g=(e,t)=>e.trim().split(/\s+/).map((e=>v(e,t))).join(" "),v=(e,t)=>{const n=t.loose?a[s.TILDELOOSE]:a[s.TILDE];return e.replace(n,((t,n,r,i,a)=>{let s;return o("tilde",e,t,n,r,i,a),h(n)?s="":h(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:h(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",s),s}))},y=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{o("caret",e,t);const n=t.loose?a[s.CARETLOOSE]:a[s.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),h(n)?l="":h(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:h(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},x=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?a[s.XRANGELOOSE]:a[s.XRANGE];return e.replace(n,((n,r,i,a,s,l)=>{o("xRange",e,n,r,i,a,s,l);const c=h(i),u=c||h(a),d=u||h(s),p=d;return"="===r&&p&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(u&&(a=0),s=0,">"===r?(r=">=",u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):u?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},E=(e,t)=>(o("replaceStars",e,t),e.trim().replace(a[s.STAR],"")),M=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?s.GTE0PRE:s.GTE0],"")),C=e=>(t,n,r,o,i,a,s,l,c,u,d,p,m)=>`${n=h(r)?"":h(o)?`>=${r}.0.0${e?"-0":""}`:h(i)?`>=${r}.${o}.0${e?"-0":""}`:a?">="+n:`>=${n}${e?"-0":""}`} ${l=h(c)?"":h(u)?`<${+c+1}.0.0-0`:h(d)?`<${c}.${+u+1}.0-0`:p?`<=${c}.${u}.${d}-${p}`:e?`<${c}.${u}.${+d+1}-0`:"<="+l}`.trim(),w=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==r.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return JT}function oO(){if(eO)return QT;eO=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}a("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],i=t.match(n);if(!i)throw new TypeError("Invalid comparator: "+t);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new s(i[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new l(e.value,n).test(this.value);if(""===e.operator)return""===e.value||new l(this.value,n).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),c=i(this.semver,"<",e.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=i(this.semver,">",e.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||a&&s||c||u}}QT=t;const n=TN,{re:r,t:o}=CN.exports,i=FT,a=kN,s=FN,l=rO();return QT}const iO=rO();var aO=(e,t,n)=>{try{t=new iO(t,n)}catch(e){return!1}return t.test(e)};const sO=rO();var lO=(e,t)=>new sO(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const cO=FN,uO=rO();var dO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new uO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&-1!==o.compare(e)||(r=e,o=new cO(r,n)))})),r};const pO=FN,mO=rO();var fO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new mO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&1!==o.compare(e)||(r=e,o=new pO(r,n)))})),r};const hO=FN,gO=rO(),vO=wT;var yO=(e,t)=>{e=new gO(e,t);let n=new hO("0.0.0");if(e.test(n))return n;if(n=new hO("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let o=null;r.forEach((e=>{const t=new hO(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!vO(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})),!o||n&&!vO(n,o)||(n=o)}return n&&e.test(n)?n:null};const bO=rO();var xO=(e,t)=>{try{return new bO(e,t).range||"*"}catch(e){return null}};const SO=FN,EO=oO(),{ANY:MO}=EO,CO=rO(),wO=aO,kO=wT,NO=NT,TO=IT,OO=AT;var RO=(e,t,n,r)=>{let o,i,a,s,l;switch(e=new SO(e,r),t=new CO(t,r),n){case">":o=kO,i=TO,a=NO,s=">",l=">=";break;case"<":o=NO,i=OO,a=kO,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(wO(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const c=t.set[n];let u=null,d=null;if(c.forEach((e=>{e.semver===MO&&(e=new EO(">=0.0.0")),u=u||e,d=d||e,o(e.semver,u.semver,r)?u=e:a(e.semver,d.semver,r)&&(d=e)})),u.operator===s||u.operator===l)return!1;if((!d.operator||d.operator===s)&&i(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const AO=RO;var LO=(e,t,n)=>AO(e,t,">",n);const IO=RO;var PO=(e,t,n)=>IO(e,t,"<",n);const DO=rO();var qO=(e,t,n)=>(e=new DO(e,n),t=new DO(t,n),e.intersects(t));const zO=aO,BO=eT;const $O=rO(),FO=oO(),{ANY:HO}=FO,jO=aO,VO=eT,WO=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===HO){if(1===t.length&&t[0].semver===HO)return!0;e=n.includePrerelease?[new FO(">=0.0.0-0")]:[new FO(">=0.0.0")]}if(1===t.length&&t[0].semver===HO){if(n.includePrerelease)return!0;t=[new FO(">=0.0.0")]}const r=new Set;let o,i,a,s,l,c,u;for(const t of e)">"===t.operator||">="===t.operator?o=_O(o,t,n):"<"===t.operator||"<="===t.operator?i=UO(i,t,n):r.add(t.semver);if(r.size>1)return null;if(o&&i){if(a=VO(o.semver,i.semver,n),a>0)return null;if(0===a&&(">="!==o.operator||"<="!==i.operator))return null}for(const e of r){if(o&&!jO(e,String(o),n))return null;if(i&&!jO(e,String(i),n))return null;for(const r of t)if(!jO(e,String(r),n))return!1;return!0}let d=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver,p=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver;d&&1===d.prerelease.length&&"<"===i.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(u=u||">"===e.operator||">="===e.operator,c=c||"<"===e.operator||"<="===e.operator,o)if(p&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===p.major&&e.semver.minor===p.minor&&e.semver.patch===p.patch&&(p=!1),">"===e.operator||">="===e.operator){if(s=_O(o,e,n),s===e&&s!==o)return!1}else if(">="===o.operator&&!jO(o.semver,String(e),n))return!1;if(i)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=UO(i,e,n),l===e&&l!==i)return!1}else if("<="===i.operator&&!jO(i.semver,String(e),n))return!1;if(!e.operator&&(i||o)&&0!==a)return!1}return!(o&&c&&!i&&0!==a)&&(!(i&&u&&!o&&0!==a)&&(!p&&!d))},_O=(e,t,n)=>{if(!e)return t;const r=VO(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},UO=(e,t,n)=>{if(!e)return t;const r=VO(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var YO=(e,t,n={})=>{if(e===t)return!0;e=new $O(e,n),t=new $O(t,n);let r=!1;e:for(const o of e.set){for(const e of t.set){const t=WO(o,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const GO=CN.exports;var KO={re:GO.re,src:GO.src,tokens:GO.t,SEMVER_SPEC_VERSION:wN.SEMVER_SPEC_VERSION,SemVer:FN,compareIdentifiers:AN.compareIdentifiers,rcompareIdentifiers:AN.rcompareIdentifiers,parse:UN,valid:GN,clean:XN,inc:ZN,diff:iT,major:sT,minor:cT,patch:dT,prerelease:mT,compare:eT,rcompare:hT,compareLoose:vT,compareBuild:bT,sort:ST,rsort:MT,gt:wT,lt:NT,eq:nT,neq:OT,gte:AT,lte:IT,cmp:FT,coerce:tO,Comparator:oO(),Range:rO(),satisfies:aO,toComparators:lO,maxSatisfying:dO,minSatisfying:fO,minVersion:yO,validRange:xO,outside:RO,gtr:LO,ltr:PO,intersects:qO,simplifyRange:(e,t,n)=>{const r=[];let o=null,i=null;const a=e.sort(((e,t)=>BO(e,t,n)));for(const e of a){zO(e,t,n)?(i=e,o||(o=e)):(i&&r.push([o,i]),i=null,o=null)}o&&r.push([o,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push("<="+t):s.push(`${e} - ${t}`):s.push(">="+e):s.push("*");const l=s.join(" || "),c="string"==typeof t.raw?t.raw:String(t);return l.length<c.length?l:t},subset:YO},XO="0.23.1";const JO=e=>!e||KO.lt(KO.coerce(e),KO.coerce(XO));function ZO(){return function({layout:e}){var t,n,r;const o=E(e,"qHyperCube.qMeasureInfo",[]),i=o.some((({series:e=Ga})=>su(e)===Ua.LINE)),a=pe.continuous(e,(()=>i&&se.isTime(!0,e))),s=!JO(E(e,"version","")),l=o.filter((({series:e=Ga})=>su(e)===Ua.BAR)),c=l.length,u=l.filter((({series:e=Ga})=>e.axis!==Ya.SECONDARY)).length,d=l.filter((({series:e=Ga})=>e.axis===Ya.SECONDARY)).length,p=s?u>1||d>1:c>1,m=("grouped"!==E(e,"barGrouping.grouping")||a)&&p,f=!m&&c>1,h=s&&m&&(u>0&&d>1||u>1&&d>0),g=!(null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qLocked);return{canBeContinuous:se.canBeContinuous(e),isDiscrete:!a,isContinuous:a,isTime:se.isTime(a,e),isSnapshot:pe.snapshot(e),isBarSeriesStacked:m,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:h,isGrouped:f||h,isGroupedByMeasure:f||h,isDimensionLocked:g,groupSize:h?2:c,hasLineSeries:i}}}function QO({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}const eR=e=>"number"==typeof e&&!Number.isNaN(e);function tR({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),o=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),i=o.filter((e=>su(e.series)===Ua.BAR)),a=o.filter((e=>su(e.series)===Ua.LINE)),s=o.filter((e=>su(e.series)===Ua.MARKER));return{min:Math.min(...o.filter((e=>eR(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>eR(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...i.filter((e=>eR(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>eR(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>eR(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>eR(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>eR(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>eR(e.qMax))).map((e=>e.qMax)))}}}}function nR({isPrimary:e,layoutService:t,seriesModel:n}){const r=tR({isPrimary:e,layoutService:t,seriesModel:n}),o=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(Ua.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:o}=n,i={min:NaN,max:NaN};return o.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),i.min=Number.isNaN(i.min)?t:Math.min(t,i.min),i.max=Number.isNaN(i.max)?n:Math.max(n,i.max)})),i}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=o({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function rR({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:o}){const i={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta,o=n.query.series(Ua.BAR).filter((t=>t.isPrimary===e)).length;return!r||o<2?tR({isPrimary:e,layoutService:t,seriesModel:n}):nR({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:o});return{query:{getExtrema:()=>i},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,o=r("measureAxes."+(e?0:1),{});if(o.autoMinMax)return n;const{minMax:i,min:a,max:s}=o;return"min"!==i&&"minMax"!==i||(n.min=a),"max"!==i&&"minMax"!==i||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return i.explicit.min=s,i.explicit.max=l,i.meta.hasExplicitMin=!Number.isNaN(s),i.meta.hasExplicitMax=!Number.isNaN(l),i.meta.hasExplicit=i.meta.hasExplicitMin||i.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:c}=a({dataPage:t}),u=o.query.seriesByAxis(e).some((e=>su(e)===Ua.BAR)),d=u?Math.min(n,0):n,p=u?Math.max(r,0):r,m=u?Math.min(s.min,0):s.min,f=u?Math.max(s.max,0):s.max,h=u?Math.min(l.min,0):l.min,g=u?Math.max(l.max,0):l.max,v=u?Math.min(c.min,0):c.min,y=u?Math.max(c.max,0):c.max;i.implicit.min=Number.isFinite(d)?d:0,i.implicit.max=Number.isFinite(p)?p:0,i.implicit.bar.min=Number.isFinite(m)?m:0,i.implicit.bar.max=Number.isFinite(f)?f:0,i.implicit.line.min=Number.isFinite(h)?h:0,i.implicit.line.max=Number.isFinite(g)?g:0,i.implicit.marker.min=Number.isFinite(v)?v:0,i.implicit.marker.max=Number.isFinite(y)?y:0,i.min=Number.isNaN(i.explicit.min)?i.implicit.min:i.explicit.min,i.max=Number.isNaN(i.explicit.max)?i.implicit.max:i.explicit.max,i.meta.hasExplicitMin&&!i.meta.hasExplicitMax&&(i.max=Math.max(i.min,i.max)),i.meta.hasExplicitMax&&!i.meta.hasExplicitMin&&(i.min=Math.min(i.min,i.max)),i.meta.includesZero=!!((0-i.min)*(0-i.max)<=0)}))}}}}function oR({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function iR({min:e,max:t,count:n,threshold:r,disable:o}){const i=function(e,t,n){const r=Ar().domain([e,t]);return r.nice(n),r}(e,t,n),a=function({min:e,max:t,threshold:n,scale:r,disable:o}){const i={start:!0,stop:!0};if(o)return i;const[a,s]=r.domain();return 0!==e&&0!==a&&(i.start=r(e)>n),0!==t&&0!==s&&(i.stop=r(t)<1-n),i}({min:e,max:t,threshold:r,scale:i,disable:o});if(!a.start||!a.stop){const[e,t]=i.domain(),r=i.ticks(n),o=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;i.domain([a.start?e:e-o,a.stop?t:t+s]),i.nice(n)}return i}const aR=50,sR=100,lR=200,cR=125;function uR({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return aR;case 1:return sR;case 2:return lR;default:return e*cR}})(t.getLayoutValue(e+".spacing",1));return Math.max(1,Math.round(n/r))}function dR({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:i,min:a,max:s}){const l=uR({config:e,layoutService:n,size:i}),c=iR({min:a,max:s,count:l,threshold:.05,disable:!0}),u=c.domain(),d={roundedMin:u[0],roundedMax:u[1],ticks:c.ticks(l)},p="horizontal"===r.meta.major.orientation?"height":"width",m=e=>o(e)[p],f=t.formatter(e.formatter),h=()=>{const e=d.ticks.map(f);return!e.some(((t,n)=>e.indexOf(t)!==n))&&(e=>{const t=i/d.ticks.length;return Math.max(...e.map(m))<=t})(e)};for(let e=l-1;e>0&&!h();e--)c.domain([a,s]),c.nice(e),[d.roundedMin,d.roundedMax]=c.domain(),d.ticks=c.ticks(e);return d}function pR({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function mR({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function fR({config:e,chart:t,extrema:n,min:r,max:o}){const i={roundedMin:0,roundedMax:0,ticks:[]},a=iR({min:r,max:o,count:10,threshold:.15,disable:!0});[i.roundedMin,i.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),c=l?pR:mR;i.ticks=s.filter(((e,t,n)=>c({tick:e,index:t,ticks:n})));i.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(i.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const u=t.formatter(e.formatter),d=i.ticks.map(u);return d.some(((e,t)=>d.indexOf(e)!==t))&&(i.ticks=[i.ticks[0],i.ticks[i.ticks.length-1]]),i}function hR({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function gR({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l}){const{ticks:c,roundedMin:u,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const c=dR({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:a,min:s,max:l});return oR({extrema:o,ticks:c.ticks})?c:fR({config:e,chart:t,extrema:o,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l}),p=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const o=e[r],i=(e[r+1]-o)/(t+1);for(let e=1;e<=t;e++)n.push(o+i*e)}return n}({ticks:c,count:1});return{min:u,max:d,values:[...hR({ticks:c,extrema:o}).map((e=>({value:e,isMinor:!1}))),...p.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value))}}function vR({config:e,chart:t,layoutService:n,dockService:r,measureText:o,extrema:i,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:i});return gR({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l})}function yR({config:e,chart:t,layoutService:n,extremumModel:r,dockService:o,seriesModel:i,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,c=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:o,seriesModel:i,themeService:a}){const{measureText:s}=q.renderer("svg")();return()=>{const l=a.getStyles(),c=function({dockService:e,seriesModel:t,chart:n}){var r;const o=n.component(t.meta.seriesComponentKeys[0]),i=null!==(r=null==o?void 0:o.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?i.height:i.width}({chart:e,dockService:n,seriesModel:i}),u=r.query.getExtrema();return vR({config:t,chart:e,layoutService:o,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:u,size:c})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:o,seriesModel:i,themeService:a}),u=()=>(s.locked&&s.resolved||(s.resolved=c()),s.resolved);return{query:{getValues:()=>u().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:u().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:u().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function bR({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:o,fieldType:i}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===o?"measure"===i?()=>({type:Ua.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===Ua.LINE?2:t!==Ua.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==Ua.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function xR({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function SR({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:o,genericObjectModel:i,layoutService:a,picasso:s,seriesModel:l,viewState:c}){let u;const{theme:d,translator:p}=o,m={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return u=k({picasso:s,model:i,app:n,translator:p,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map((e=>e.color));return{theme:d,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:_a.SCALE.COLOR}},config:{auto:xR,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>m.wrappedScales,legendComponents:()=>m.legendComponents,legendInteractions:()=>m.legendInteractions,updateLegend:()=>{const{components:t,interactions:n,scales:i}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:o,colorService:i,actions:a}){const{options:s}=o,l={eventName:"legend-c",key:_a.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",rtl:"rtl"===s.direction,settings:bR({layoutService:n,seriesModel:r,colorService:i})},{components:c,interactions:u}=i.getLegend(l,{actions:a,navigationDisabled:!a.interact.enabled()}),d=i.getScales();return{components:c.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=d[_a.SCALE.COLOR+"Range"];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:u,scales:d}}({viewState:c,chart:r,environment:o,colorService:u,seriesModel:l,layoutService:a,actions:e});m.wrappedScales=i,m.legendComponents=t,m.legendInteractions=n}}}),u}const ER="REJECTED",MR=()=>{},CR=1e4,wR=2,kR=20,NR=200,TR=10;var OR={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),o=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,o-e.qArea.qTop),s=Math.min(o+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,i-e.qArea.qLeft),c=Math.min(i+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:o,qLeft:i},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-TR<=t.qTop,o=n.qLeft+n.qWidth+TR>=t.qLeft+t.qWidth,i=n.qTop+n.qHeight+TR>=t.qTop+t.qHeight,a=n.qLeft-TR<=t.qLeft;return r&&t.qTop>0||o&&t.qLeft+t.qWidth<e.width||i&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var RR={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),i=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-i),l={qArea:{qHeight:a-i,qWidth:e.qArea.qWidth,qTop:r,qLeft:o},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=i;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-TR<=t.qTop,o=n.qTop+n.qHeight+TR>=t.qTop+t.qHeight;return r&&t.qTop>0||o&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const r={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&r.args.push(600),r}}};var AR={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const LR="pages";const IR="discretePan";function PR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{type:"Pan",key:"discrete:pan",options:{event:IR,pointers:1,threshold:10,enable(r,o){return this.started===IR||!o||!(!t.scroll.enabled()||!i.enabled())&&e.componentsFromPoint({x:o.center.x,y:o.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started=IR;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},discretePanmove(e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&o?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,i.scroll(s)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function DR({chart:e,componentKey:t,actions:n,scroller:r}){return function(o){if(!n.scroll.enabled()||!r.enabled())return;const[i]=e.componentsFromPoint({x:o.clientX,y:o.clientY}).filter((e=>e.key===t));if(!i)return;o.preventDefault();const a=Math.abs(o.deltaY)>Math.abs(o.deltaX)?o.deltaY:o.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function qR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{gestures:[PR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i})],native:{type:"native",events:{wheel:DR({chart:e,actions:t,componentKey:n,scroller:i})}}}}function zR({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(CR/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(NR,n));return{width:e,height:Math.max(kR,Math.min(n*wR,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:o}=t({width:e.qWidth,height:e.qHeight}),i=o?Math.ceil((o-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:o?Math.min(o,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:o?Math.max(0,Math.min(e.qTop-i,n.height-o)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function BR(e){let t,n;const r=o=>{t=o;const{method:i,args:a}=t.request;e[i](...a).then((e=>{if(t.canceled||n)return t.reject(ER),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},o=e=>new Promise(((o,i)=>{const a={request:e,resolve:o,reject:i,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(ER),n=e})(a):r(a)}));return o.isProcessing=()=>!!t,o.hasQueued=()=>!!n,o.cancel=()=>{o.isProcessing()&&t.cancel(),o.hasQueued()&&(n.reject(ER),n=null)},o}const $R={command:{update:()=>{}}};var FR={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:o}=t,i=e.getDataPages()[0],a=o/r;return[a,n.inView>=n.inTotal?a+1:a+i.qArea.qWidth/n.inView]}};var HR={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=void 0===r?4:r,i=Math.max(0,Math.floor(t)-o/2);return{qTop:i,qHeight:Math.min(e.meta.size.y-i,Math.max(0,Math.ceil(n+o))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:o}=t,i=e.getDataPages()[0],a=r/n.inView,s=(o+i.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+i.qArea.qHeight/n.inView]}};function jR(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function VR(e,t){const n=[];for(let r=0;r<e.length;r++){const o=t(e[r]);-1===n.indexOf(o)&&n.push(o)}return n.length}function WR(e){return VR(e.qMatrix,(e=>e[0].qElemNumber))-1}var _R={inTotal:function({layoutService:e}){const t=jR(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=jR(e),i=void 0===r?o:r,a=t/(o+1),s=Math.max(0,Math.floor((t-a-i/2)/o));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+i)/o+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const o=jR(e),i=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=WR(i),c=i.qArea.qHeight*o+l,u=(s+(i.qArea.qTop*o+i.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const UR=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function YR(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return UR(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const o=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const i=e[t][0].qElemNumber;-1===o.indexOf(i)&&(o.push(i),r--)}return n.count=o.length-1,n})(t.qMatrix,n);return r.successful?r.count:UR(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return UR(e,n);return VR(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var GR={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const o=YR(t).itemOffset(e(),n),i=Math.max(0,Math.floor(n-o));return{qTop:i,qHeight:Math.min(t.meta.size.y-i,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:o,upperBound:i}){const a=t.getDataPages()[0],s=o/r.inView,{item:l,pixel:c}=n,u=YR(t).area(e(),l,a.qArea),d=WR(a),p=a.qArea.qHeight+d,m=c===i?(r.inView-p)*s/o:(c+(a.qArea.qTop+u)*s)/o;return[m,r.inView>=r.inTotal?m+1:m+p/r.inView]}};function KR({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:o,renderer:i,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:p,LABELLESS:m}=r[n.meta.chart.mode],f="horizontal"===n.meta.major.orientation,{axisDisplayMode:h="auto",maxVisibleItems:g=10,label:v}=s,y=f?t.width:t.height,b=y/l>=p;switch(h){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);case"auto":default:return c?y/m:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:o,itemSize:i,label:a}){if(o||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:p}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return p>i;const m=(90-d)*(Math.PI/180);return p>Math.cos(m)*i}({chart:e,isHorizontal:f,axisKey:o,renderer:i,isGrouped:a,itemSize:p,label:v})?y/d:l:y/d}}var XR={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function JR({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:r,defaultValue:o,index:i})=>{const a=n&&Object.hasOwnProperty.call(n,r)?n[r]:o;if(void 0===i)return a;const{style:s}=e.getHyperCubeValue((e=>`qMeasureInfo.${e}.styling`)(i),[]).filter((e=>e.key===t))[0]||{};return s&&Object.hasOwnProperty.call(s,r)?s[r]:a}}function ZR({dataset:e,data:t,valueData:n}){var r;const{source:o,label:i,value:a}=n,s=e(o.key).field(o.field);return s.raw().isCustomFormatted?i:"-"===i||""===a||Number.isNaN(a)||"NaN"===a||null!==(r=t.null)&&void 0!==r&&r.value?"-":s.formatter()(a)}function QR({chart:e,actions:t,translator:n,rtl:r,dockService:o,seriesModel:i,colorService:a,themeService:s,propertiesModel:l,custom:c}){const u=s.getStyles(),d=({data:e})=>e.major.value,p=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:m}=_a.COMPONENT,{PRIMARY:f,SECONDARY:h}=Ya,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:o,SLICED_HAT:i}=_a.COMPONENT,{PRIMARY:a,SECONDARY:s}=Ya,{orientation:l}=e.meta.chart,c="vertical"===l,u=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[d]=t,{triggerer:p}=l,m=p===n.MAJOR?d.data.value:d.data.major.value;if(c){const t=e.findShapes("container").find((e=>(e.key===`${i}-max-${a}`||e.key===`${i}-max-${s}`)&&e.data&&e.data.value===m&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const f=e.findShapes("path").find((e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===o+"-max")&&e.data.major.value===m));if(c&&f)return{key:f.key,bounds:f.bounds};const h=e.findShapes("path").find((e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===o+"-min")&&e.data.major.value===m)),g=e.findShapes("*").filter((e=>u.indexOf(e.key)>-1&&e.data&&e.data.major.value===m));if(c&&h&&!g.find((e=>e.data.end.source.field!==h.data.end.source.field)))return{key:h.key,bounds:h.bounds};const v=f||h;return!(c||!v||g.find((e=>e.data.end.source.field!==v.data.end.source.field)))&&{key:v.key,bounds:v.bounds}},"collectible"]}({dockService:o,seriesModel:i});return N({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:u.fontFamily},main:{key:_a.COMPONENT.TOOLTIP,getGroupByValue:d,collectibles:[...i.meta.barComponentKeys.map((e=>({key:e,type:"bar",major:d}))),...i.meta.pointComponentKeys.map((e=>({key:e,type:"point",major:d}))),...i.meta.markers.map((e=>({key:e.key,type:e.type,major:d})))],triggers:[{keys:[_a.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:p},placement:g},{keys:[...i.meta.barComponentKeys,...i.meta.markerComponentKeys,`${m}-max-${f}`,`${m}-max-${h}`,`${m}-min-${f}`,`${m}-min-${h}`,`${_a.COMPONENT.BAR_OOB}-max-${f}`,`${_a.COMPONENT.BAR_OOB}-max-${h}`,`${_a.COMPONENT.BAR_OOB}-min-${f}`,`${_a.COMPONENT.BAR_OOB}-min-${h}`,_a.COMPONENT.DATA_OOB_MARKER+"-max",_a.COMPONENT.DATA_OOB_MARKER+"-min"],collect:{from:"dimension",by:d,filter:p},placement:g},{keys:[...i.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:d,filter:p},placement:g}],section:({h:e,nodes:t,dataset:n,create:r,util:o})=>{const[i]=t,{title:a,description:s,measures:l}=c.isEnabled()?c.getAttributes({dataset:n,nodes:[i]}):{},u=[];a&&u.push(r.text({value:a,style:{bold:!0}})),s&&u.push(r.text({value:s}));const d=c.hideBasic();d&&!l.length&&(a||s)||u.push(r.text({value:i.data.label,style:{bold:!0}})),d||(u.push(r.color({nodes:t,property:_a.SCALE.COLOR})),u.push(...t.map((e=>{const{segment:t,end:i}=e.data,a=t||i,{key:s,field:l}=a.source;return r.measure({label:o.dataset.title(s,l),value:ZR({dataset:n,data:e.data,valueData:a})})})))),l&&u.push(...l.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),c.chart.isEnabled()&&(c.chart.hasLimitation()?(c.chart.destroy(),u.push(r.raw({value:c.chart.createLimitationRow()}))):u.push(r.raw({value:c.chart.createContainer({h:e})})));const{customTooltipImages:p}=i.data;return c.isEnabled()&&p&&u.push(...p.map((t=>r.raw({value:c.createImageRow({value:t,h:e})})))),u},layout:{grouping:!0,single:()=>!(!c.isEnabled()||!c.hasImages())||c.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>c.isEnabled()&&c.hasImages()?c.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{c.chart.isEnabled()&&!c.chart.hasLimitation()&&c.chart.show({nodes:e,properties:l.query.getProperties()})}},interaction:{mouseleave:()=>{c.chart.isEnabled()&&c.chart.hasAlternateState()&&c.chart.hide()}}}},legend:{keys:{tooltip:_a.COMPONENT.LEGEND_TOOLTIP,component:_a.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:eA}=Pd;const tA={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};const nA={query:{getCanScroll:()=>!0}};function rA({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function oA({setSelectionInfo:e,event:t,components:n,clear:r}){const o=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:o,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&o[0]===_a.COMPONENT.LEGEND_CATEGORICAL}),r()}function iA({chart:e,actions:t}){const o=b(),i=a(),[s,l]=n();return r((()=>{if(null==e||!e.update||!e.scale||!o)return null;const n=e.scale(_a.SCALE.MAJOR),r=I({chart:e,actions:t,selections:o,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{clear:rA},selectionEvents:{start:oA}}});r.setLayout(i);const{destroy:a}=r;return l(r),()=>{a()}}),[o,null==e?void 0:e.update,null==e?void 0:e.scale]),r((()=>{null!=s&&s.setLayout&&i&&s.setLayout(i)}),[i]),s}const aA={version:"1.19.2",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var sA=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let o;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)o=su(n[e].qDef.series),o===Ua.BAR?r[0]=1:o===Ua.LINE?r[1]=1:r[2]=1;const i=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(i)},lA=e=>(t,n)=>{let r;const o=t.qHyperCubeDef.qMeasures[n];if(o){const{type:e}=o.qDef.series;r=e===Ua.LINE?"Visualizations.Descriptions.HeightLine":e===Ua.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function cA(e){var t,n;const r=e.qHyperCubeDef.qMeasures,o=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===o&&1===r.length&&su(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===Ua.LINE?e.color.mode="primary":"byDimension"===o&&r.length>1&&(e.color.mode="byMultiple")}function uA(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:sA(t)},measures:{min:1,max:15,description:lA(t),added({qDef:e},t){var n;cA(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:Ua.LINE,axis:Ya.SECONDARY}:e.series={type:Ua.BAR,axis:Ya.PRIMARY})},moved(e,t){cA(t)}}}}function dA(e){const t=uA(e);return{properties:aA,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const o=V.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),i="linechart"===e.properties.visualization,a=[];o.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:i?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return o.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&Z(!0,o.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),o},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>V.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}function pA(e){if(null!=e&&e.isEnabled("SENSECLIENT_IM_311_STYLINGPANEL_COMBOCHART"))return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barSection:{translation:"Visualizations.Descriptions.Bars",component:"accordion",items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue:.7,schemaIgnore:!0}}}}}}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{translation:"Line options",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"Thickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"Type",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"Curve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}};const t={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}]},n={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:e=>"none"!==E(e,`${((e,t)=>{let n=-1;for(let r=0;r<e.length;r++)if(e[r].key===t){n=r;break}return n})(e,"bar")}.${t.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},r={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},o={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},i={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},a={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]};return{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues(e){const s="grouped"===e.barGrouping.grouping,l=e.qHyperCubeDef.qMeasures.filter((e=>su(e.qDef.series)===Ua.BAR)).length,c=s&&l>1;return[{key:"bar",style:{strokeWidth:t.defaultValue,strokeColor:n.defaultValue(),width:c?.9:.7}},{key:"line",style:{dataPointSize:r.defaultValue,lineThickness:o.defaultValue,lineType:i.defaultValue,lineCurve:a.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:t,barStrokeColor:n,barWidth:{component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>su(e.qDef.series)===Ua.LINE));return!pe.continuous(n.layout,r&&se.isTime(!0,n.layout))},defaultValue:.7,min:.01,max:1,step:.01}}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:r,lineThickness:o,lineType:i,lineCurve:a}}}}}}}const mA={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barsSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barsHeader:{component:"header",translation:"Visualizations.Descriptions.Bars"},outlineSection:{component:"items",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891"},width:"auto",component:"color-picker"}}}}},widthSection:{component:"items",items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:.7}}}}}}}}},linesSection:{component:"items",items:{wrapperItem:{component:"items",items:{linesHeader:{component:"header",translation:"Visualizations.Descriptions.Lines"},dataPointSection:{component:"items",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}},optionsSection:{component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollStartPos:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}}}};function fA(e){const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=Ga})=>su(e)===Ua.LINE));return pe.continuous(e,(()=>t&&se.isTime(!0,e)))}function hA(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function gA(e){var t,n,r;return hA(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.mode)&&void 0!==t?t:"primary")}function vA(e){var t,n;return hA(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function yA(e){var t,n,r,o,i;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(o=null==e||null===(i=e.color)||void 0===i?void 0:i.expressionLabel)&&void 0!==o?o:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function bA(e){return vA(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function xA(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...yA(n),...bA(e)]:bA(e)}(t,n,e)))}function SA(e){var t,n;const r={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||fA(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},o={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return su(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ua.MARKER}},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return su(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ua.MARKER&&!["line"].includes(e.qDef.series.marker)}},a={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>hA(...e)},s=null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:r,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:o,seriesMarkerFill:i}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:a,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=s.getDataColorSpecials(),n=null===(e=s.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:gA},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:vA}}}}}}}}}}}}const EA=!0;function MA(e,t,n){let r;const o=n||0;var i,a;t?r=t.getMeasureLayouts():r=null!==(i=null==e||null===(a=e.qHyperCubeDef)||void 0===a?void 0:a.qMeasures)&&void 0!==i?i:[];return r.filter((e=>{const{series:t}=e||{};return 0===o?MN(t,EA):!MN(t,EA)}))}function CA(e,t){return t.getMeasures().filter((e=>su(e.qDef.series)===Ua.LINE)).length>0}function wA(e,t,n){const r=t.getMeasures().filter((e=>su(e.qDef.series)===Ua.BAR));return r.filter((e=>e.qDef.series.axis!==Ya.SECONDARY)).length>n||r.filter((e=>e.qDef.series.axis===Ya.SECONDARY)).length>n}const kA=(e,t,n,r)=>{const o="vertical"===t.layout.orientation||fA(t.layout)?"y":"x",i=MA(e,t,r).map((e=>e.qFallbackTitle));let a;return a=i.length?n.get(`properties.${o}AxisWithInfo`,[i.join(",")]):n.get(`properties.${o}Axis`),a};function NA(e){var t,n,r;const{translator:o,flags:i,anything:a}=e,s=null==e||null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n||null===(r=n.isUnsupportedFeature)||void 0===r?void 0:r.call(n,"continuousData"),l={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>xA(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>hA(e)))}}},c=e=>!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor);const u=(e,t)=>!E(e,"color.auto")&&"primary"===E(e,"color.mode")&&!((e=>E(e,"layout.qHyperCube.qMeasureInfo",[]).filter((e=>!!c(e))).length>0)(t)&&"measure"===E(e,"color.useBaseColors")||function(e){return E(e,"layout.qHyperCube.qDimensionInfo",[]).filter((e=>!!c(e))).length>0}(t)&&"dimension"===E(e,"color.useBaseColors")),d=(e,t)=>{var n,r;return e.qHyperCubeDef.qMeasures.some((e=>hA(e)))||!i.isEnabled("SIMPLE_PROPERTIES_LIBRARY_COLOR")&&!(null!=e&&null!==(n=e.color)&&void 0!==n&&n.auto||"primary"!==(null==e||null===(r=e.color)||void 0===r?void 0:r.mode)||u(e,t))},p={items:{disclaimer:{show:(e,t)=>d(e,t),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&P(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!d(e,t)}}},m={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&wA(0,t,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&CA(0,t),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,o){o.dataPoint.showLineLabels=e,o.dataPoint.show=e}},reset(e){P(e,"dataPoint.show",!1),P(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,o){o.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t)=>o.get(MA(e,t,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&MA(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,o){o.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&MA(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,o){o.measureAxes[1].show=e?"labels":"all"}}}}}}},f={uses:"settings",items:{simpleStyling:null!=i&&i.isEnabled("COMBOCHART_SIMPLE_STYLING")?mA:void 0,simpleLabels:m,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:pA(i),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>wA(0,t,1)&&!fA(n.layout)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>fA(n.layout),convertFunctions:(h="vertical",{get:(e,t,n)=>fA(n.layout)?h:e(t.type),set(e,t,n,r){t(n.type,fA(r.layout)?h:e,h)}})},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!fA(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t)=>CA(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>CA(0,t),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t)=>wA(0,t,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:l,simpleColors:p,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||fA(t.layout)?"x":"y",r=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,t).map((e=>e.qFallbackTitle||"")).join(", ");let i;return i=r?o.get(`properties.${n}AxisWithInfo`,[r]):o.get(`properties.${n}Axis`),i},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||fA(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!fA(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!s}},measureAxis:{uses:"axis.measureAxis",label:(e,t)=>kA(e,t,o,0),show:(e,t)=>MA(e,t,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>kA(e,t,o,0),show:(e,t)=>MA(e,t,0).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&MN(null==e?void 0:e.series,EA)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t)=>"none"!==e.measureAxes[0].show&&MA(e,t,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||fA(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&MA(e,t,0).length>0}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>MA(e,t,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:o,minMax:i,min:a}=(null==r?void 0:r.measureAxes[0])||{};return!0===o?"lowest":o||"min"!==i||0!==a?e(t.type):"zero"},set(e,t,n,r,o){"zero"===e?(P(o,"measureAxes.0.autoMinMax",!1),P(o,"measureAxes.0.minMax","min"),P(o,"measureAxes.0.min",0)):P(o,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t)=>kA(e,t,o,1),show:(e,t)=>MA(e,t,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>kA(e,t,o,1),show:(e,t)=>MA(e,t,1).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!MN(null==e?void 0:e.series,EA)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t)=>"none"!==e.measureAxes[1].show&&MA(e,t,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||fA(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&MA(e,t,1).length>0}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>MA(e,t,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:o,minMax:i,min:a}=(null==r?void 0:r.measureAxes[1])||{};return!0===o?"lowest":o||"min"!==i||0!==a?e(t.type):"zero"},set(e,t,n,r,o){"zero"===e?(P(o,"measureAxes.1.autoMinMax",!1),P(o,"measureAxes.1.minMax","min"),P(o,"measureAxes.1.min",0)):P(o,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var h;i.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(f.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});return{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){var r,o;if(null!=a&&null!==(r=a.sense)&&void 0!==r&&null!==(o=r.isUnsupportedFeature)&&void 0!==o&&o.call(r,"includeZeroValues"))return!1;return!fA(n.layout)}}}},measures:SA(e)}},sorting:{uses:"sortingWithDisclaimer"},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>MN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,EA)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!MN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,EA)},dimRefLines:{uses:"dimReflines"}}},settings:f}}}function TA(e){return e.qHyperCubeDef.qMeasures.filter((e=>su(e.qDef.series)===Ua.LINE)).length>0}function OA(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>TA(e)||!fA(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){var n;return function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>su(e.qDef.series)===Ua.BAR));return t?n.filter((e=>e.qDef.series.axis===Ya.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===Ya.SECONDARY)).length>1:n.length>1}(e,!JO(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!fA(t)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!fA(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>TA(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>TA(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>hA(e)))}}}}}}const RA={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function AA(e,t,n,r,o){const{axis:i,icon:a,tid:s,translation:l}=RA[o];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=o,t.qDef.series.axis=i,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path","data."+t.qDef.cId)}})}function LA(e,t,n,r,o){!function(e,t,n){const{item:r}=e,o=["contextMenu.add",r.name];if(n.canAddMeasure()){const i=e.menu.addItem({translation:o,tid:"add-as"});AA(r,i,t,n,"bar"),AA(r,i,t,n,"line"),AA(r,i,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,o),e.ColorBy(n,t,o),r()}function IA(e){const t={},{tooltip:n}=e;if(n){var r,o;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(o=r.object)||void 0===o?void 0:o.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const PA=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function DA(e){return{definition:NA(e),softDefinition:OA(),support:{snapshot:PA,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:LA,extendMetrics:IA,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=V.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:uA(e),defaultPropertyValues:a,hypercubePath:o,extension:r});return function(e,t,n){const r="linechart"===n.properties.visualization,o=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),o.indexOf(e.qDef.series.axis)<0&&o.push(e.qDef.series.axis)}));const i=o.sort().shift();e.qProperty.measureAxes[i]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&Z(!0,e.qProperty.measureAxes[i],n.properties.measureAxis,{logarithmic:!1}),xA(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return V.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:function(e){return JO(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=Ga),void 0===t.series.type&&(t.series.type=Ga.type),void 0===t.series.axis&&(t.series.axis=t.series.type===Ua.BAR?Ya.PRIMARY:Ya.SECONDARY),t.series.type===Ua.BAR&&t.series.axis===Ya.SECONDARY&&(t.series.axis=Ya.PRIMARY)})),e.version=XO),e}(e)}}}}}}));