@nebula.js/sn-combo-chart 1.23.2 → 1.23.3

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.23.2
2
+ * @nebula.js/sn-combo-chart v1.23.3
3
3
  * Copyright (c) 2023 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,W;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.setValue,C=e.cache,w=e.debouncer,k=e.throttler,N=e.colorService,T=e.tooltipService,O=e.layoutService,R=e.dockService,A=e.themeService,L=e.pluginService,I=e.storage,P=e.selectionService,D=e.fontResolver},function(e){q=e.default},function(e){z=e.default},function(e){$=e.default},function(e){B=e.default,F=e.Children,H=e.isValidElement,j=e.cloneElement},function(e){V=e.default},function(e){W=e.default}],execute:function(){e("default",(function(e){var b,M;const{flags:w}=e,N=null===(b=e.anything)||void 0===b||null===(M=b.sense)||void 0===M?void 0:M.isUnsupportedFeature,T=(()=>{const e=z();return e.use($),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Sp(e))};return void e.interaction("hammer",Sp(Hammer))}(q)),e.use(_w),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",V.render(function(e,t){return B.createElement(Hg,{generateClassName:t},B.createElement(hv,{theme:jw},e))}(e,Vw),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&V.unmountComponentAtNode(r),i),destroy(){r&&r.parentElement&&(V.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(o=e(t)),o)};return i}}()),e.component("data-title",function(e){function t({title:e,selected:t,onClick:n}){const r=Se.detectTextDirection(e);return B.createElement(BS,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},B.createElement(jS,{style:{minWidth:32}},B.createElement(Nw,{d:t?Rw:""})),B.createElement(_S,{primaryTypographyProps:{dir:r}},e))}function n({alignTo:e,changeTo:n,current:r,dir:o,dock:i,list:a,onClose:s,show:l,instruction:c}){const u=a.map((e=>B.createElement(t,{key:e.id,title:e.title,onClick:()=>n(e.id)})));return B.createElement(ZS,Ep({anchorEl:e,open:l,onClose:s},Fw[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),B.createElement(qS,{dense:!0,dir:o,"aria-label":c,component:"nav"},B.createElement(t,{title:r,selected:!0,onClick:s}),u))}t.propTypes={title:Mp.exports.string.isRequired,selected:Mp.exports.bool,onClick:Mp.exports.func.isRequired},t.defaultProps={selected:!1},n.propTypes={alignTo:Mp.exports.any,changeTo:Mp.exports.func.isRequired,current:Mp.exports.string.isRequired,dir:Mp.exports.string.isRequired,dock:Mp.exports.string.isRequired,list:Mp.exports.array,onClose:Mp.exports.func.isRequired,show:Mp.exports.bool.isRequired,instruction:Mp.exports.string.isRequired},n.defaultProps={list:[],alignTo:null};class r extends B.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasValidAlternatives:!1},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))}componentDidUpdate(e,t){const{popover:n,supportConditional:r}=this.props;n&&r&&n.getAlternatives().then((e=>{t.hasValidAlternatives!==(0!==e.length)&&this.setState({hasValidAlternatives:0!==e.length})}))}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.id,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:t,translator:r,disabled:o,isDimension:i,padding:a,minWidth:s,hasAlternative:l,supportConditional:c}=this.props,u={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,p=o||this.state.inSelection,m=e.breadcrumbs.map(((t,n)=>B.createElement(Hw,{style:{display:"flex",alignItems:"center",color:p&&"rgba(89, 89, 89, 0.8)",pointerEvents:p?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>p?void 0:e.drillUp(d-n),title:t},B.createElement("span",{style:u},t),B.createElement(Nw,Ep({},Lw,{size:"small",style:{margin:"0 8px"}}))))),f=c?this.state.hasValidAlternatives:l,h=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||o||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!i&&g&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(v.background="rgba(0,0,0,0.08)");const y=e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},b=e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"};a&&(v.padding=a),s&&(v.minWidth=s);const x=Se.detectTextDirection(e.text),S=B.createElement(Hw,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:v,onClick:g?void 0:h,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:y,onBlur:g?void 0:b,onMouseDown:e=>{e.preventDefault()}},e.locked&&B.createElement(Nw,Ep({},Ow,{size:"small",title:r.get("Tooltip.selections.locked")})),B.createElement("span",{style:u,dir:x},e.text),t&&f&&B.createElement(Nw,Ep({},Aw,{size:"small",style:{margin:"0 8px"}})));return B.createElement(B.Fragment,null,e.drilldown&&B.createElement(Nw,Ep({},Tw,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,B.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:f?"auto":"none",height:"100%"}},S),t&&f&&B.createElement(n,{dock:t.dock,dir:t.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 o(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 i(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function a(e){return!e.isDimension&&ce(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}function s(e){return e.isDimension&&ce(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0}return r.propTypes={disabled:Mp.exports.bool.isRequired,padding:Mp.exports.string,minWidth:Mp.exports.string,titleData:Mp.exports.shape({breadcrumbs:Mp.exports.arrayOf(Mp.exports.string).isRequired,drilldown:Mp.exports.bool.isRequired,index:Mp.exports.number.isRequired,locked:Mp.exports.bool.isRequired,text:Mp.exports.string.isRequired,popoverText:Mp.exports.string.isRequired,drillUp:Mp.exports.func,id:Mp.exports.string.isRequired}).isRequired,popover:Mp.exports.shape({dir:Mp.exports.string.isRequired,dock:Mp.exports.string.isRequired,changeTo:Mp.exports.func.isRequired,getAlternatives:Mp.exports.func.isRequired}),translator:Mp.exports.shape({get:Mp.exports.func.isRequired}).isRequired,selections:Mp.exports.shape({isActive:Mp.exports.func,addListener:Mp.exports.func,removeListener:Mp.exports.func}),style:Mp.exports.shape({fontSize:Mp.exports.string,color:Mp.exports.string,fontFamily:Mp.exports.string}).isRequired,isDimension:Mp.exports.bool.isRequired,hasAlternative:Mp.exports.bool.isRequired,supportConditional:Mp.exports.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:t}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||a(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:l,hyperCubeDef:c,isDimension:u,minWidth:d,model:p,onChangeToAlternative:m,padding:f,rtl:h,selections:g,skipAttributeExpressions:v,translator:y,supportConditional:b=!1},layout:{dock:x}}=this.settings,S="top"!==x&&"bottom"!==x||!h?"ltr":"rtl",E=o(x,this.rect),M=c&&c.qLayoutExclude&&c.qLayoutExclude.qHyperCubeDef,C=M&&M[u?"qDimensions":"qMeasures"]||[],w=n||l[u?"qDimensionInfo":"qMeasureInfo"],k=u?qw:$w,N=u?zw:Bw,T=p&&p.colorSupport&&p.modifiers&&k({altList:C,app:e,dir:h?"rtl":"ltr",dock:i(x),model:p,onChange:m,skipAttributeExpressions:v,translator:y}),O=s(this.settings.settings)||a(this.settings.settings),R=w.map(((e,n)=>{const o="number"==typeof e.explicitColumn?e.explicitColumn:n,i=N(e,o,p),a=n===w.length-1;return B.createElement(B.Fragment,{key:e.cId},B.createElement(r,{popover:T,titleData:i,model:p,translator:y,selections:g,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:d,hasAlternative:O,supportConditional:b}),!a&&B.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return B.createElement("div",{style:E,dir:S},R)}}}(e.renderer("svg")())),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:Mp.exports.string.isRequired,spanStyle:Mp.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",ll),e.component("point-label",rN),e.component("label-space",oN),e.component("time-axis",Zd.picassoComponents.timeAxis),e.component("axis-overlay",Zd.picassoComponents.axisOverlay),e.component("reference-line-labels",ja),e.component("box-sliced-hat",tk),e.component("box-out-of-bounds",Xw),e.component("data-out-of-bounds-marker",iN),e.component("scroll-hint",_i),e.component("brush-highlighter",gN),e.scale("time",Zd.picassoScales.time),e.symbol("line-point",aN),e})();return{qae:cA(e),ext:PA(e),component(){const e=function(){const[e,t]=n();return r((()=>t(C())),[]),e}(),b=function(){const[e,t]=n();return r((()=>{t(I({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),M=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:QR,hidden:!a||!p||f,active:l,action:h})),[p,f,l,a,d.language()]),{action:h,enabled:()=>a,active:()=>l}}();let d=eA;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||eA}},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:T,environment:M}),q=rA({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,M]=n(),[w,N]=n(),T=s(),I=l(),P=c(),D=u(),q=d();r((()=>{if(!(y&&null!=t&&t.update&&p&&f))return;const n=O({source:y,metaAdditionsFn:XO()}),{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(he).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:JO({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:T,layoutService:n}),d=R({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=(({layoutService:e})=>{const t=!KO(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[es.BAR]:0,[es.LINE]:0,[es.MARKER]:0};return({series:r=ns},o)=>{const i=SN(r,t),a=hu(r);return{id:o,type:a,typeIndex:n[a]++,ref:"qMeasureInfo/"+o,refIndex:o,isPrimary:i,scale:i?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY,collection:i?Qa.COLLECTION.PRIMARY:Qa.COLLECTION.SECONDARY,options:xN({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>hu(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,es.BAR),l=r(o,es.BAR),c=r(i,es.BAR),u=e=>n.filter((t=>hu(t)===e)),d=u(es.LINE).map((e=>$l(Qa.COMPONENT.POINT,e))),p=u(es.MARKER).map((e=>({key:$l(Qa.COMPONENT.MARKER,e),type:e.options.marker}))),m=p.map((e=>e.key)),f=[];l>0&&f.push(`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`);c>0&&f.push(`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`);const h=[...f,...d,...m],{MINI_CHART:g}=Qa.COMPONENT,v=u(es.LINE).map((e=>$l(g.LINE,e))),y=u(es.MARKER).map((e=>$l(g.MARKER,e))),b=e.meta.isContinuous?[`${g.BAR}-${ts.PRIMARY}`,`${g.BAR}-${ts.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:SN}}})({layoutService:n,flags:m}),w=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:o,viewState:i,rtl:a,actions:s,picasso:l}){const c=Qd(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=C(),v=function({qMode:e}){switch(e){case"S":default:return NR;case"K":return TR;case"T":return OR}}({qMode:o.getHyperCubeValue("qMode")}),y=function({state:e,contains:t}){return e.set(RR,[]),{add:t=>{const n=e.get(RR);n.length=0,n.push(t)},getCurrent:()=>e.get(RR)[0],getAll:()=>e.get(RR),contains:n=>t(e.get(RR)[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=zR,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:DR({layoutService:r}),request:c({layoutService:r,definitionPath:i}),process:qR(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=k(((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==xR)throw e}))}),50);return function(e,{onProcessing:t=SR,onDataPage:n=SR}={}){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 $R;if(!n)return BR;return r?VR:UR}({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:YR({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(ER/(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}),M=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:PR({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=>M(e)}}}({chart:e,actions:s,componentKey:c,enigmaModel:t,layoutService:n,dockService:r,viewState:i,rtl:a,itemWidths:GR,options:{axisKey:Qa.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:T,layoutService:n,dockService:d,seriesModel:S,viewState:f,rtl:"rtl"===p.options.direction,actions:g,picasso:e}):void 0,N=n.meta.isContinuous?ZR({model:T,layoutService:n,viewState:f,viewCache:h}):void 0,z=bR({actions:g,appLayoutModel:P,appModel:I,chart:t,environment:p,flags:m,genericObjectModel:T,layoutService:n,picasso:e,seriesModel:S,viewState:f}),$=A({theme:p.theme,config:{id:"comboChart",resolve:[["object","label.value","numFontSize","12px",e=>parseInt(e,10)]]}}),B=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:S}),F=tR({isPrimary:!0,layoutService:n,reducedModel:u,seriesModel:S,continuousModel:N,flags:m}),H=tR({isPrimary:!1,layoutService:n,reducedModel:u,seriesModel:S,continuousModel:N,flags:m}),j=gR({config:{measureAxesRef:"measureAxes.0",formatter:Qa.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:F,dockService:d,seriesModel:S,themeService:$}),V=gR({config:{measureAxesRef:"measureAxes.1",formatter:Qa.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:H,dockService:d,seriesModel:S,themeService:$}),W=function({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){if(me.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:T,layoutService:n}),_=Es({flags:m,layout:y,app:I,model:T,picasso:e,chart:t,translator:o,localeInfo:P.qLocaleInfo,embed:q,options:r}),U=JR({chart:t,actions:g,translator:o,rtl:s,dockService:d,seriesModel:S,colorService:z,themeService:$,propertiesModel:W,custom:_}),Y=function({layoutService:e,dockService:t,themeService:n,flags:r}){const{BAR:o,LINE:i,POINT:a}=Gl,s=n.getStyles(),l=KR({layoutService:e,key:"bar"}),c=KR({layoutService:e,key:"line"}),u=()=>l({property:"width",defaultValue:.7}),d=()=>{const e=l({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},p=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0;return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>u(),getHasStrokeWidth:()=>!!d(),getStrokeWidth:()=>d(),getStrokeColor:()=>l({property:"strokeColor",defaultValue:{index:-1,color:o.STROKE.COLOR}}).color,label:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f,h,g,v;return{fill:null!==(e=null===(t=p("bar"))||void 0===t||null===(n=t.bar)||void 0===n||null===(r=n.label)||void 0===r||null===(o=r.value)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=p("bar"))||void 0===l||null===(c=l.bar)||void 0===c||null===(u=c.label)||void 0===u||null===(d=u.value)||void 0===d?void 0:d.fontSize)&&void 0!==a?a:s.label.value.numFontSize,fontFamily:null!==(m=null===(f=p("bar"))||void 0===f||null===(h=f.bar)||void 0===h||null===(g=h.label)||void 0===g||null===(v=g.value)||void 0===v?void 0:v.fontFamily)&&void 0!==m?m:s.label.value.fontFamily}}}},line:{getCurveFn:()=>(e,t)=>c({property:"lineCurve",defaultValue:i.CURVE.LINEAR,index:t}),getStrokeWidthFn:()=>(e,n)=>c({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?i.WIDTH.FULL.DEFAULT:i.WIDTH.LESS.DEFAULT,index:n}),getStrokeDasharrayFn:()=>(e,t)=>{const n=c({property:"lineType",defaultValue:i.TYPE.SOLID,index:t});return n&&i.TYPE[n.toUpperCase()]}},point:{getSize:e=>c({property:"dataPointSize",defaultValue:a.SIZE.DEFAULT,index:e}),label:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f,h,g,v;return{fill:null!==(e=null===(t=p("line"))||void 0===t||null===(n=t.line)||void 0===n||null===(r=n.label)||void 0===r||null===(o=r.value)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=p("line"))||void 0===l||null===(c=l.line)||void 0===c||null===(u=c.label)||void 0===u||null===(d=u.value)||void 0===d?void 0:d.fontSize)&&void 0!==a?a:s.label.value.fontSize,fontFamily:null!==(m=null===(f=p("line"))||void 0===f||null===(h=f.line)||void 0===h||null===(g=h.label)||void 0===g||null===(v=g.value)||void 0===v?void 0:v.fontFamily)&&void 0!==m?m:s.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f;return{fontFamily:null!==(e=null===(t=p("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.title)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.axis.title.fontFamily,fontSize:null!==(o=null===(i=p("axis"))||void 0===i||null===(a=i.axis)||void 0===a||null===(l=a.title)||void 0===l?void 0:l.fontSize)&&void 0!==o?o:s.axis.title.fontSize,color:null!==(c=null===(u=p("axis"))||void 0===u||null===(d=u.axis)||void 0===d||null===(m=d.title)||void 0===m||null===(f=m.color)||void 0===f?void 0:f.color)&&void 0!==c?c:s.axis.title.color}}},label:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f,h,g,v;return{fill:null!==(e=null===(t=p("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.label)||void 0===r||null===(o=r.name)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.color)&&void 0!==e?e:s.axis.label.name.color,fontSize:null!==(a=null===(l=p("axis"))||void 0===l||null===(c=l.axis)||void 0===c||null===(u=c.label)||void 0===u||null===(d=u.name)||void 0===d?void 0:d.fontSize)&&void 0!==a?a:s.axis.label.name.fontSize,fontFamily:null!==(m=null===(f=p("axis"))||void 0===f||null===(h=f.axis)||void 0===h||null===(g=h.label)||void 0===g||null===(v=g.name)||void 0===v?void 0:v.fontFamily)&&void 0!==m?m:s.axis.label.name.fontFamily}}}}}}}({layoutService:n,dockService:d,themeService:$,flags:m}),G=function({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:o}=e.meta,i=e.getLayout(),a="K"===i.qHyperCube.qMode,s=me.dimensionless(i),l=Ma.getMeasureRefLines(i),c=Ma.getDimensionRefLines(i,s),u=Ma.getMeasureRefLineLabels(i),d=Ma.getDimensionRefLineLabels(i,s);let p={},m={};const f=t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:o}=n;return Ma.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 Ma.isOutOfDataPages({label:n,dataPages:o})}return!0},g=()=>!(!c||!c.length)&&!c.every((t=>{const n=Ma.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=>Ma.getRefLines(i,e),getRefLineLabels:e=>Ma.getRefLineLabels(i,e)},update:()=>{m=v.dimensionRefLineInfo,g()&&(p=Ma.getDimensionValuesInfo({layout:i,canBeContinuous:r,discreteModel:t,layoutService:e}),v.dimensionValuesInfo=p,c.forEach((t=>{const n=Ma.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:w}),K=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:Qa.SCALE.MAJOR,MAJOR_INNER:Qa.SCALE.MAJOR_INNER,MINOR:{PRIMARY:Qa.SCALE.MINOR.PRIMARY,SECONDARY:Qa.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,BAR_SECONDARY:`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,AXIS:{MAJOR:Qa.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:Qa.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:Qa.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:Qa.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:Qa.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:Qa.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:Qa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:Qa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:Qa.COLLECTION.MAIN}}}}(n),X=L({picassoInstance:e,plugins:D,pluginArgs:K});M({selectionService:v,genericObjectModel:T,appModel:I,dockService:d,styleModel:Y,layoutService:n,fieldModel:B,seriesModel:S,reducedModel:u,primaryExtremumModel:F,secondaryExtremumModel:H,primaryTickModel:j,secondaryTickModel:V,propertiesModel:W,colorService:z,themeService:$,appLayoutModel:P,tooltipService:U,flags:m,...w&&{discreteModel:w},...N&&{continuousModel:N},refLineModel:G,pluginService:X})}),[y,T,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&&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(),T?i.command.initialize():Promise.resolve(),u,c(),g.scroll.attachDiscreteModel(s)]))().then((()=>d()))}),[S]);if(z)throw z;return w})({picasso:T,chart:D,environment:M,flags:w,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})=>{const{event:{onZoomIntercept:i,onZoomChange:a}}=Zd;r((()=>{if(!t||!n||!o)return;const{layoutService:r,continuousModel:s,refLineModel:l,seriesModel:c}=t,{miniComponentKeys:u}=c.meta,d=()=>{l&&l.update(),e.update({partialData:!0,excludeFromUpdate:[...yp,...u]})};n.onChanged("scrollOffset",d),r.meta.isContinuous&&(n.onChanged("zoom",a({layoutService:r,continuousDataModel:s},d)),n.intercept("zoom",i({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:hp({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s}),data:i&&[gp({models:n}),...vp({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:T,chart:D,models:z,environment:M,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:hp({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:T,chart:D,models:z,environment:M,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:fe(t,Qa.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:fe(t,Qa.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])})({models:z,chart:D,viewState:b})}}}));var _=Object.prototype.hasOwnProperty,U=Object.prototype.toString,Y=Object.defineProperty,G=Object.getOwnPropertyDescriptor,K=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===U.call(e)},X=function(e){if(!e||"[object Object]"!==U.call(e))return!1;var t,n=_.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&_.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||_.call(e,t)},J=function(e,t){Y&&"__proto__"===t.name?Y(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Z=function(e,t){if("__proto__"===t){if(!_.call(e,t))return;if(G)return G(e,t).value}return e[t]},Q=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=Z(s,n),s!==(o=Z(t,n))&&(u&&o&&(X(o)||(i=K(o)))?(i?(i=!1,a=r&&K(r)?r:[]):a=r&&X(r)?r:{},J(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&J(s,{name:n,newValue:o}));return s};const ee="center",te="bottom";var ne={NoDataExist:{label:"NoDataExist",alignment:ee,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:ee,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:ee,default:!1},LimitedData:{label:"LimitedData",alignment:te,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:te,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:te,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:te,default:!1}};const re=[["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}]],oe={};re.forEach((([e,{width:t,height:n}])=>{oe[e]={width:t,height:n}}));const ie={getLayoutModes:()=>oe,getLayoutMode(e,t){let n;for(n=0;n<re.length;++n)if(e>=re[n][1].width&&t>=re[n][1].height)return re[n][0];return"SPARK"}};const ae=["$date","$timestamp","$time"],se=["D","TS","T"],le={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>ae.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&se.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(le.hasTimeTag(t)&&le.hasUnknownFormat(t)||le.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&le.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){var t,n,r;const o=null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(r=null==o?void 0:o.length)&&void 0!==r?r:0)<1)&&le.canBeContinuousDimension(o[0])},maxNumberOfLines:12},ce=(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},ue=e=>ce(e,"qHyperCube.qDimensionInfo",[]),de=e=>ce(e,"qHyperCube.qMeasureInfo",[]),pe=e=>ce(e,"barGrouping.grouping"),me={continuous:(e,t=!1)=>!!le.canBeContinuous(e)&&(ce(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!ue(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===pe(e)&&(ue(e).length>1||de(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&ue(e).length>1&&1===de(e).length},groupedByMeasure(e){return this.grouped(e)&&1===ue(e).length&&de(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==pe(e)||this.continuous(e))&&(ue(e).length>1||de(e).length>1)},stackedByDimension(e){return this.stacked(e)&&ue(e).length>1&&1===de(e).length},stackedByMeasure(e){return this.stacked(e)&&1===ue(e).length&&de(e).length>1},simple:e=>0===ue(e).length||1===ue(e).length&&1===de(e).length,snapshot:e=>!!ce(e,"snapshotData")};function fe(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const he=e=>{throw e.isHandled=!0,e};const ge={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?ge.getVerticalDock(t):n?ge.getOppositeDock(ge.getHorizontalDock(t)):ge.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},ve={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=ve.getCharacterRatios(e[n]),r.latin+=o.latin,r.cjk+=o.cjk})):e.forEach((e=>{o=ve.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=ve.getTotalCharacterRatios(t,n,r),i=o.latinRatio*e,a=o.cjkRatio*e;return Math.ceil(ve.stringWidthOverMWidth(i)+1.0909090909090908*a)}},ye=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),be=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),xe=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Se={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ye.test(e),isRtlChar:e=>be.test(e)||xe.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Se.isLtrChar(r))return"ltr";if(Se.isRtlChar(r))return"rtl"}return"ltr"}},Ee={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?Ee.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=Se.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=Se.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:Se.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=Se.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=Se.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Ee.getColorSymbol(e,t)]:[Ee.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=Se.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Se.detectTextDirection(e.value);let l;return l=o?r?[e.value,Ee.getColorSymbol(t,n)]:[Ee.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 Me(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ce(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function we(){}var ke=.7,Ne=1/ke,Te="\\s*([+-]?\\d+)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ae=/^#([0-9a-f]{3,8})$/,Le=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),Ie=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),Pe=new RegExp(`^rgba\\(${Te},${Te},${Te},${Oe}\\)$`),De=new RegExp(`^rgba\\(${Re},${Re},${Re},${Oe}\\)$`),qe=new RegExp(`^hsl\\(${Oe},${Re},${Re}\\)$`),ze=new RegExp(`^hsla\\(${Oe},${Re},${Re},${Oe}\\)$`),$e={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 Fe(){return this.rgb().formatRgb()}function He(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ae.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?je(t):3===n?new Ue(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ve(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ve(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=Le.exec(e))?new Ue(t[1],t[2],t[3],1):(t=Ie.exec(e))?new Ue(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Pe.exec(e))?Ve(t[1],t[2],t[3],t[4]):(t=De.exec(e))?Ve(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=qe.exec(e))?Ze(t[1],t[2]/100,t[3]/100,1):(t=ze.exec(e))?Ze(t[1],t[2]/100,t[3]/100,t[4]):$e.hasOwnProperty(e)?je($e[e]):"transparent"===e?new Ue(NaN,NaN,NaN,0):null}function je(e){return new Ue(e>>16&255,e>>8&255,255&e,1)}function Ve(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ue(e,t,n,r)}function We(e){return e instanceof we||(e=He(e)),e?new Ue((e=e.rgb()).r,e.g,e.b,e.opacity):new Ue}function _e(e,t,n,r){return 1===arguments.length?We(e):new Ue(e,t,n,null==r?1:r)}function Ue(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ye(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}`}function Ge(){const e=Ke(this.opacity);return`${1===e?"rgb(":"rgba("}${Xe(this.r)}, ${Xe(this.g)}, ${Xe(this.b)}${1===e?")":`, ${e})`}`}function Ke(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Je(e){return((e=Xe(e))<16?"0":"")+e.toString(16)}function Ze(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new et(e,t,n,r)}function Qe(e){if(e instanceof et)return new et(e.h,e.s,e.l,e.opacity);if(e instanceof we||(e=He(e)),!e)return new et;if(e instanceof et)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 et(a,s,l,e.opacity)}function et(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function tt(e){return(e=(e||0)%360)<0?e+360:e}function nt(e){return Math.max(0,Math.min(1,e||0))}function rt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Me(we,He,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Be,formatHex:Be,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Qe(this).formatHsl()},formatRgb:Fe,toString:Fe}),Me(Ue,_e,Ce(we,{brighter(e){return e=null==e?Ne:Math.pow(Ne,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ue(Xe(this.r),Xe(this.g),Xe(this.b),Ke(this.opacity))},displayable(){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:Ye,formatHex:Ye,formatHex8:function(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}${Je(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ge,toString:Ge})),Me(et,(function(e,t,n,r){return 1===arguments.length?Qe(e):new et(e,t,n,null==r?1:r)}),Ce(we,{brighter(e){return e=null==e?Ne:Math.pow(Ne,e),new et(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new et(this.h,this.s,this.l*e,this.opacity)},rgb(){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 Ue(rt(e>=240?e-240:e+120,o,r),rt(e,o,r),rt(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new et(tt(this.h),nt(this.s),nt(this.l),Ke(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ke(this.opacity);return`${1===e?"hsl(":"hsla("}${tt(this.h)}, ${100*nt(this.s)}%, ${100*nt(this.l)}%${1===e?")":`, ${e})`}`}}));const ot=Math.PI/180,it=180/Math.PI,at=.96422,st=.82521,lt=4/29,ct=6/29,ut=3*ct*ct;function dt(e){if(e instanceof pt)return new pt(e.l,e.a,e.b,e.opacity);if(e instanceof bt)return xt(e);e instanceof Ue||(e=We(e));var t,n,r=gt(e.r),o=gt(e.g),i=gt(e.b),a=mt((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=mt((.4360747*r+.3850649*o+.1430804*i)/at),n=mt((.0139322*r+.0971045*o+.7141733*i)/st)),new pt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function pt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function mt(e){return e>.008856451679035631?Math.pow(e,1/3):e/ut+lt}function ft(e){return e>ct?e*e*e:ut*(e-lt)}function ht(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function gt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vt(e){if(e instanceof bt)return new bt(e.h,e.c,e.l,e.opacity);if(e instanceof pt||(e=dt(e)),0===e.a&&0===e.b)return new bt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*it;return new bt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function yt(e,t,n,r){return 1===arguments.length?vt(e):new bt(e,t,n,null==r?1:r)}function bt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function xt(e){if(isNaN(e.h))return new pt(e.l,0,0,e.opacity);var t=e.h*ot;return new pt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Me(pt,(function(e,t,n,r){return 1===arguments.length?dt(e):new pt(e,t,n,null==r?1:r)}),Ce(we,{brighter(e){return new pt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new pt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){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 Ue(ht(3.1338561*(t=at*ft(t))-1.6168667*(e=1*ft(e))-.4906146*(n=st*ft(n))),ht(-.9787684*t+1.9161415*e+.033454*n),ht(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Me(bt,yt,Ce(we,{brighter(e){return new bt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new bt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return xt(this).rgb()}}));var St=-.14861,Et=1.78277,Mt=-.29227,Ct=-.90649,wt=1.97294,kt=wt*Ct,Nt=wt*Et,Tt=Et*Mt-Ct*St;function Ot(e){if(e instanceof Rt)return new Rt(e.h,e.s,e.l,e.opacity);e instanceof Ue||(e=We(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Tt*r+kt*t-Nt*n)/-5.9615122912,i=r-o,a=(wt*(n-o)-Mt*i)/Ct,s=Math.sqrt(a*a+i*i)/(wt*o*(1-o)),l=s?Math.atan2(a,i)*it-120:NaN;return new Rt(l<0?l+360:l,s,o,e.opacity)}function Rt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Me(Rt,(function(e,t,n,r){return 1===arguments.length?Ot(e):new Rt(e,t,n,null==r?1:r)}),Ce(we,{brighter(e){return e=null==e?Ne:Math.pow(Ne,e),new Rt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new Rt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*ot,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Ue(255*(t+n*(St*r+Et*o)),255*(t+n*(Mt*r+Ct*o)),255*(t+n*(wt*r)),this.opacity)}}));var At={isDark:function(e){return yt(e).l<70}};function Lt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function It(e){return 1===e.length&&(e=function(e){return function(t,n){return Lt(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 Pt=It(Lt).right,Dt=Math.sqrt(50),qt=Math.sqrt(10),zt=Math.sqrt(2);function $t(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>=Dt?10:i>=qt?5:i>=zt?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Dt?10:i>=qt?5:i>=zt?2:1)}function Bt(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>=Dt?o*=10:i>=qt?o*=5:i>=zt&&(o*=2),t<e?-o:o}function Ft(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Ht="$";function jt(){}function Vt(e,t){var n=new jt;if(e instanceof jt)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 Wt(){}jt.prototype=Vt.prototype={constructor:jt,has:function(e){return Ht+e in this},get:function(e){return this[Ht+e]},set:function(e,t){return this[Ht+e]=t,this},remove:function(e){var t=Ht+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Ht&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Ht&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Ht&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Ht&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Ht&&++e;return e},empty:function(){for(var e in this)if(e[0]===Ht)return!1;return!0},each:function(e){for(var t in this)t[0]===Ht&&e(this[t],t.slice(1),this)}};var _t=Vt.prototype;Wt.prototype={constructor:Wt,has:_t.has,add:function(e){return this[Ht+(e+="")]=e,this},remove:_t.remove,clear:_t.clear,values:_t.keys,size:_t.size,empty:_t.empty,each:_t.each};var Ut=Array.prototype,Yt=Ut.map,Gt=Ut.slice;function Kt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Jt(){}var Zt=.7,Qt=1/Zt,en="\\s*([+-]?\\d+)\\s*",tn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",nn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rn=/^#([0-9a-f]{3})$/,on=/^#([0-9a-f]{6})$/,an=new RegExp("^rgb\\("+[en,en,en]+"\\)$"),sn=new RegExp("^rgb\\("+[nn,nn,nn]+"\\)$"),ln=new RegExp("^rgba\\("+[en,en,en,tn]+"\\)$"),cn=new RegExp("^rgba\\("+[nn,nn,nn,tn]+"\\)$"),un=new RegExp("^hsl\\("+[tn,nn,nn]+"\\)$"),dn=new RegExp("^hsla\\("+[tn,nn,nn,tn]+"\\)$"),pn={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 mn(e){var t;return e=(e+"").trim().toLowerCase(),(t=rn.exec(e))?new yn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=on.exec(e))?fn(parseInt(t[1],16)):(t=an.exec(e))?new yn(t[1],t[2],t[3],1):(t=sn.exec(e))?new yn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ln.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=cn.exec(e))?hn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=un.exec(e))?xn(t[1],t[2]/100,t[3]/100,1):(t=dn.exec(e))?xn(t[1],t[2]/100,t[3]/100,t[4]):pn.hasOwnProperty(e)?fn(pn[e]):"transparent"===e?new yn(NaN,NaN,NaN,0):null}function fn(e){return new yn(e>>16&255,e>>8&255,255&e,1)}function hn(e,t,n,r){return r<=0&&(e=t=n=NaN),new yn(e,t,n,r)}function gn(e){return e instanceof Jt||(e=mn(e)),e?new yn((e=e.rgb()).r,e.g,e.b,e.opacity):new yn}function vn(e,t,n,r){return 1===arguments.length?gn(e):new yn(e,t,n,null==r?1:r)}function yn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function bn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function xn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new En(e,t,n,r)}function Sn(e){if(e instanceof En)return new En(e.h,e.s,e.l,e.opacity);if(e instanceof Jt||(e=mn(e)),!e)return new En;if(e instanceof En)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 En(a,s,l,e.opacity)}function En(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Mn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Kt(Jt,mn,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Kt(yn,vn,Xt(Jt,{brighter:function(e){return e=null==e?Qt:Math.pow(Qt,e),new yn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Zt:Math.pow(Zt,e),new yn(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"#"+bn(this.r)+bn(this.g)+bn(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+")")}})),Kt(En,(function(e,t,n,r){return 1===arguments.length?Sn(e):new En(e,t,n,null==r?1:r)}),Xt(Jt,{brighter:function(e){return e=null==e?Qt:Math.pow(Qt,e),new En(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Zt:Math.pow(Zt,e),new En(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 yn(Mn(e>=240?e-240:e+120,o,r),Mn(e,o,r),Mn(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 Cn=Math.PI/180,wn=180/Math.PI,kn=.96422,Nn=.82521,Tn=4/29,On=6/29,Rn=3*On*On;function An(e){if(e instanceof Ln)return new Ln(e.l,e.a,e.b,e.opacity);if(e instanceof $n){if(isNaN(e.h))return new Ln(e.l,0,0,e.opacity);var t=e.h*Cn;return new Ln(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof yn||(e=gn(e));var n,r,o=qn(e.r),i=qn(e.g),a=qn(e.b),s=In((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=In((.4360747*o+.3850649*i+.1430804*a)/kn),r=In((.0139322*o+.0971045*i+.7141733*a)/Nn)),new Ln(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Ln(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function In(e){return e>.008856451679035631?Math.pow(e,1/3):e/Rn+Tn}function Pn(e){return e>On?e*e*e:Rn*(e-Tn)}function Dn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function qn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function zn(e){if(e instanceof $n)return new $n(e.h,e.c,e.l,e.opacity);if(e instanceof Ln||(e=An(e)),0===e.a&&0===e.b)return new $n(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*wn;return new $n(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function $n(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Kt(Ln,(function(e,t,n,r){return 1===arguments.length?An(e):new Ln(e,t,n,null==r?1:r)}),Xt(Jt,{brighter:function(e){return new Ln(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ln(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 yn(Dn(3.1338561*(t=kn*Pn(t))-1.6168667*(e=1*Pn(e))-.4906146*(n=Nn*Pn(n))),Dn(-.9787684*t+1.9161415*e+.033454*n),Dn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Kt($n,(function(e,t,n,r){return 1===arguments.length?zn(e):new $n(e,t,n,null==r?1:r)}),Xt(Jt,{brighter:function(e){return new $n(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new $n(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return An(this).rgb()}}));var Bn=-.14861,Fn=1.78277,Hn=-.29227,jn=-.90649,Vn=1.97294,Wn=Vn*jn,_n=Vn*Fn,Un=Fn*Hn-jn*Bn;function Yn(e){if(e instanceof Kn)return new Kn(e.h,e.s,e.l,e.opacity);e instanceof yn||(e=gn(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Un*r+Wn*t-_n*n)/(Un+Wn-_n),i=r-o,a=(Vn*(n-o)-Hn*i)/jn,s=Math.sqrt(a*a+i*i)/(Vn*o*(1-o)),l=s?Math.atan2(a,i)*wn-120:NaN;return new Kn(l<0?l+360:l,s,o,e.opacity)}function Gn(e,t,n,r){return 1===arguments.length?Yn(e):new Kn(e,t,n,null==r?1:r)}function Kn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Xn(e){return function(){return e}}function Jn(e,t){return function(n){return e+n*t}}function Zn(e){return 1==(e=+e)?Qn: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):Xn(isNaN(t)?n:t)}}function Qn(e,t){var n=t-e;return n?Jn(e,n):Xn(isNaN(e)?t:e)}Kt(Kn,Gn,Xt(Jt,{brighter:function(e){return e=null==e?Qt:Math.pow(Qt,e),new Kn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Zt:Math.pow(Zt,e),new Kn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Cn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new yn(255*(t+n*(Bn*r+Fn*o)),255*(t+n*(Hn*r+jn*o)),255*(t+n*(Vn*r)),this.opacity)}}));var er=function e(t){var n=Zn(t);function r(e,t){var r=n((e=vn(e)).r,(t=vn(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Qn(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 tr(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]=lr(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 nr(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function rr(e,t){return t-=e=+e,function(n){return e+t*n}}function or(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]=lr(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var ir=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ar=new RegExp(ir.source,"g");function sr(e,t){var n,r,o,i=ir.lastIndex=ar.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=ir.exec(e))&&(r=ar.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:rr(n,r)})),i=ar.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 lr(e,t){var n,r=typeof t;return null==t||"boolean"===r?Xn(t):("number"===r?rr:"string"===r?(n=mn(t))?(t=n,er):sr:t instanceof mn?er:t instanceof Date?nr:Array.isArray(t)?tr:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?or:rr)(e,t)}function cr(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function ur(e){return function t(n){function r(t,r){var o=e((t=Gn(t)).h,(r=Gn(r)).h),i=Qn(t.s,r.s),a=Qn(t.l,r.l),s=Qn(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 dr(e){return+e}ur((function(e,t){var n=t-e;return n?Jn(e,n>180||n<-180?n-360*Math.round(n/360):n):Xn(isNaN(e)?t:e)})),ur(Qn);var pr=[0,1];function mr(e){return e}function fr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function hr(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 gr(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=fr(o,r),i=n(a,i)):(r=fr(r,o),i=n(i,a)),function(e){return i(r(e))}}function vr(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]=fr(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=Pt(e,t,1,r)-1;return i[n](o[n](t))}}function yr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function br(e,t){return function(){var e,t,n,r,o,i,a=pr,s=pr,l=lr,c=mr;function u(){return r=Math.min(a.length,s.length)>2?vr:gr,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),rr)))(n)))},d.domain=function(e){return arguments.length?(a=Yt.call(e,dr),c===mr||(c=hr(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=Gt.call(e),u()):s.slice()},d.rangeRound=function(e){return s=Gt.call(e),l=cr,u()},d.clamp=function(e){return arguments.length?(c=e?hr(a):mr,d):c!==mr},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 xr(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 Sr(e){return(e=xr(Math.abs(e)))?e[1]:NaN}var Er,Mr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cr(e){return new wr(e)}function wr(e){if(!(t=Mr.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 kr(e,t){var n=xr(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")}Cr.prototype=wr.prototype,wr.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 Nr={"%":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 kr(100*e,t)},r:kr,s:function(e,t){var n=xr(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Er=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")+xr(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 Tr(e){return e}var Or,Rr,Ar,Lr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ir(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)}):Tr,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):Tr,s=e.percent||"%";function l(e){var t=(e=Cr(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"):Nr[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=Nr[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?Lr[8+Er/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=Cr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Sr(t)/3))),o=Math.pow(10,-r),i=Lr[8+r/3];return function(e){return n(o*e)+i}}}}function Pr(e,t,n,r){var o,i=Bt(e,t,n);switch((r=Cr(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(Sr(t)/3)))-Sr(Math.abs(e)))}(i,a))||(r.precision=o),Ar(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,Sr(t)-Sr(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,-Sr(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return Rr(r)}function Dr(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=$t(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 Pr(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=$t(s,l,n))>0?r=$t(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=$t(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 qr(){var e=br(mr,mr);return e.copy=function(){return yr(e,qr())},Ft.apply(e,arguments),Dr(e)}Or=Ir({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Rr=Or.format,Ar=Or.formatPrefix;var zr=new Date,$r=new Date;function Br(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 Br((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 zr.setTime(+t),$r.setTime(+r),e(zr),e($r),Math.floor(n(zr,$r))},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 Fr=Br((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Fr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Br((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Fr:null},Fr.range;var Hr=1e3,jr=6e4,Vr=36e5,Wr=864e5,_r=6048e5,Ur=Br((function(e){e.setTime(Math.floor(e/Hr)*Hr)}),(function(e,t){e.setTime(+e+t*Hr)}),(function(e,t){return(t-e)/Hr}),(function(e){return e.getUTCSeconds()}));Ur.range,Br((function(e){e.setTime(Math.floor(e/jr)*jr)}),(function(e,t){e.setTime(+e+t*jr)}),(function(e,t){return(t-e)/jr}),(function(e){return e.getMinutes()})).range,Br((function(e){var t=e.getTimezoneOffset()*jr%Vr;t<0&&(t+=Vr),e.setTime(Math.floor((+e-t)/Vr)*Vr+t)}),(function(e,t){e.setTime(+e+t*Vr)}),(function(e,t){return(t-e)/Vr}),(function(e){return e.getHours()})).range;var Yr=Br((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())*jr)/Wr}),(function(e){return e.getDate()-1}));function Gr(e){return Br((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())*jr)/_r}))}Yr.range;var Kr=Gr(0),Xr=Gr(1),Jr=Gr(2),Zr=Gr(3),Qr=Gr(4),eo=Gr(5),to=Gr(6);Kr.range,Xr.range,Jr.range,Zr.range,Qr.range,eo.range,to.range,Br((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 no=Br((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()}));no.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Br((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},no.range;var ro=Br((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*jr)}),(function(e,t){return(t-e)/jr}),(function(e){return e.getUTCMinutes()}));ro.range;var oo=Br((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Vr)}),(function(e,t){return(t-e)/Vr}),(function(e){return e.getUTCHours()}));oo.range;var io=Br((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Wr}),(function(e){return e.getUTCDate()-1}));function ao(e){return Br((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)/_r}))}io.range;var so=ao(0),lo=ao(1),co=ao(2),uo=ao(3),po=ao(4),mo=ao(5),fo=ao(6);so.range,lo.range,co.range,uo.range,po.range,mo.range,fo.range;var ho=Br((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()}));ho.range;var go=Br((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 vo(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 yo(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 bo(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}go.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Br((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},go.range;var xo,So,Eo,Mo={"-":"",_:" ",0:"0"},Co=/^\s*\d+/,wo=/^%/,ko=/[\\^$*+?|[\]().{}]/g;function No(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 To(e){return e.replace(ko,"\\$&")}function Oo(e){return new RegExp("^(?:"+e.map(To).join("|")+")","i")}function Ro(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Ao(e,t,n){var r=Co.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Lo(e,t,n){var r=Co.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Io(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Po(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Do(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function qo(e,t,n){var r=Co.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function zo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function $o(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 Bo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Fo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ho(e,t,n){var r=Co.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function jo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Vo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Wo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _o(e,t,n){var r=Co.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Uo(e,t,n){var r=Co.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Yo(e,t,n){var r=wo.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Go(e,t,n){var r=Co.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ko(e,t,n){var r=Co.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Xo(e,t){return No(e.getDate(),t,2)}function Jo(e,t){return No(e.getHours(),t,2)}function Zo(e,t){return No(e.getHours()%12||12,t,2)}function Qo(e,t){return No(1+Yr.count(no(e),e),t,3)}function ei(e,t){return No(e.getMilliseconds(),t,3)}function ti(e,t){return ei(e,t)+"000"}function ni(e,t){return No(e.getMonth()+1,t,2)}function ri(e,t){return No(e.getMinutes(),t,2)}function oi(e,t){return No(e.getSeconds(),t,2)}function ii(e){var t=e.getDay();return 0===t?7:t}function ai(e,t){return No(Kr.count(no(e),e),t,2)}function si(e,t){var n=e.getDay();return e=n>=4||0===n?Qr(e):Qr.ceil(e),No(Qr.count(no(e),e)+(4===no(e).getDay()),t,2)}function li(e){return e.getDay()}function ci(e,t){return No(Xr.count(no(e),e),t,2)}function ui(e,t){return No(e.getFullYear()%100,t,2)}function di(e,t){return No(e.getFullYear()%1e4,t,4)}function pi(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+No(t/60|0,"0",2)+No(t%60,"0",2)}function mi(e,t){return No(e.getUTCDate(),t,2)}function fi(e,t){return No(e.getUTCHours(),t,2)}function hi(e,t){return No(e.getUTCHours()%12||12,t,2)}function gi(e,t){return No(1+io.count(go(e),e),t,3)}function vi(e,t){return No(e.getUTCMilliseconds(),t,3)}function yi(e,t){return vi(e,t)+"000"}function bi(e,t){return No(e.getUTCMonth()+1,t,2)}function xi(e,t){return No(e.getUTCMinutes(),t,2)}function Si(e,t){return No(e.getUTCSeconds(),t,2)}function Ei(e){var t=e.getUTCDay();return 0===t?7:t}function Mi(e,t){return No(so.count(go(e),e),t,2)}function Ci(e,t){var n=e.getUTCDay();return e=n>=4||0===n?po(e):po.ceil(e),No(po.count(go(e),e)+(4===go(e).getUTCDay()),t,2)}function wi(e){return e.getUTCDay()}function ki(e,t){return No(lo.count(go(e),e),t,2)}function Ni(e,t){return No(e.getUTCFullYear()%100,t,2)}function Ti(e,t){return No(e.getUTCFullYear()%1e4,t,4)}function Oi(){return"+0000"}function Ri(){return"%"}function Ai(e){return+e}function Li(e){return Math.floor(+e/1e3)}!function(e){(xo=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=Oo(o),u=Ro(o),d=Oo(i),p=Ro(i),m=Oo(a),f=Ro(a),h=Oo(s),g=Ro(s),v=Oo(l),y=Ro(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:Xo,e:Xo,f:ti,H:Jo,I:Zo,j:Qo,L:ei,m:ni,M:ri,p:function(e){return o[+(e.getHours()>=12)]},Q:Ai,s:Li,S:oi,u:ii,U:ai,V:si,w:li,W:ci,x:null,X:null,y:ui,Y:di,Z:pi,"%":Ri},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:mi,e:mi,f:yi,H:fi,I:hi,j:gi,L:vi,m:bi,M:xi,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:Ai,s:Li,S:Si,u:Ei,U:Mi,V:Ci,w:wi,W:ki,x:null,X:null,y:Ni,Y:Ti,Z:Oi,"%":Ri},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:Fo,e:Fo,f:Uo,H:jo,I:jo,j:Ho,L:_o,m:Bo,M:Vo,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:Go,s:Ko,S:Wo,u:Lo,U:Io,V:Po,w:Ao,W:Do,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:zo,Y:qo,Z:$o,"%":Yo};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=Mo[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=bo(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=yo(bo(i.y))).getUTCDay(),r=o>4||0===o?lo.ceil(r):lo(r),r=io.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(bo(i.y))).getDay(),r=o>4||0===o?Xr.ceil(r):Xr(r),r=Yr.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?yo(bo(i.y)).getUTCDay():t(bo(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,yo(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 Mo?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+="",vo);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,yo);return t.toString=function(){return e},t}}}(e)).format,xo.parse,So=xo.utcFormat,Eo=xo.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 Ii="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||So(Ii),+new Date("2000-01-01T00:00:00.000Z")||Eo(Ii);var Pi=1e3,Di=6e4,qi=36e5,zi=864e5,$i=2592e6,Bi=31536e6;function Fi(e){return new Date(e)}function Hi(e){return e instanceof Date?+e:+new Date(+e)}function ji(e,t,n,r,o,i,a,s,l){var c=br(mr,mr),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,Pi],[a,5,5e3],[a,15,15e3],[a,30,3e4],[i,1,Di],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,qi],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,zi],[r,2,1728e5],[n,1,6048e5],[t,1,$i],[t,3,7776e6],[e,1,Bi]];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=It((function(e){return e[2]})).right(x,i);a===x.length?(o=Bt(n/Bi,r/Bi,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(Bt(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(Yt.call(e,Hi)):d().map(Fi)},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 yr(c,ji(e,t,n,r,o,i,a,s,l))},c}const Vi={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"}}},Wi=e=>e+" 12px -12px inset rgba(0, 0, 0, 0.0625)";var _i={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=Vi[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Wi(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Wi(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 Ui({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 Yi;function Gi(){Yi=Yi||document.createElement("canvas").getContext("2d")}const Ki={measureTextWidth(e){Gi();const{width:t}=Yi.measureText(e);return t},lineWrap(e,t,n,r){let o,i;Gi();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&&(Yi.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=Ki.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(Gi(),!e||!e.length)return[];n&&(Yi.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||Ki.measureTextWidth(c)<=t?i.push(c):(s=Ki.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]?Ki.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]=Ki.truncate(i[i.length-1],t,n,o).text):(c=i[i.length-1],c&&c.length>1&&Ki.measureTextWidth(c)>t&&(i[i.length-1]=Ki.truncate(c,t,n,o).text)),i},truncate(e,t,n,r="…"){Gi();let o,i,a,s,l=e;const c=Ki.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(Yi.font=n),e&&t){if(Ki.measureTextWidth(l)>t){for(o=Math.min(u,l.length);o>0;o--)if(i=l.substring(0,o-1),a=i.trim()+r,Ki.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;Gi();let i,a=e,s="",l=[];if(Ki.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),!(Ki.measureTextWidth(a)<=t));o--);return(!o&&!a||Ki.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Ki.measureTextWidth(s)>t?(s=Ki.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Gi(),e&&t?(n&&(Yi.font=n),Ki.explodeWord(e,t,r,Math.max(1,Ki.measureTextWidth("i")))):[]),wrapText(e,t,n,r,o){let i;return Number.isNaN(t)?[e]:(i=r>1?Ki.lineWrap(e,t,n,r):[e],i=Ki.wordWrap(i,t,n,r,o),i)},getFontHeight:e=>(Gi(),e&&(Yi.font=e),1.5*Ki.measureTextWidth("m")),tokenize(e,t,n,r,o,i,a=1){Gi(),t&&(Yi.font=t);const s=Ki.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(Ki.wrapText(e,o,t,c[n])))})):d=Ki.wrapText(e,o,t,c[0],n),d}},Xi={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(Q({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},Ji=Q.bind(null,!0),Zi={},{isArray:Qi}=Array;function ea(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ta(e){return void 0===e}function na(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ra(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]=ta(e[r||t])?i:e[t],e=e[r||t]})),e}function oa(e,t){let n=!0;if(ea(e)&&ea(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{oa(e[r],t[r])||(n=!1)})),n);if(Qi(e)&&Qi(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!oa(e[n],t[n]))return!1;return!0}return e===t}Zi.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Ji({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;oa(i,a)||na(t,o)||(ta(a)?r.push({op:"add",path:s,value:i}):ea(i)&&ea(a)?r=r.concat(Zi.generate(a,i,s)):Qi(i)&&Qi(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]&&ta(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(oa(t,o))return r;if(!ta(t[0])&&ta(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(Zi.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=>{ta(t[o])&&!na(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},Zi.apply=function(e,t){t.forEach((t=>{let n=ra(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(Qi(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Qi(o)&&Qi(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(ea(o)&&ea(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!na(a,e)&&delete a[e]})),Ji(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=ra(e,t.from);Qi(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Qi(n)?n.splice(+r,1):delete n[r]);var a}))},Zi.clone=function(e){return Ji({},e)},Zi.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},Zi.updateObject=function(e,t){Object.keys(e).length?Zi.apply(e,Zi.generate(e,t)):Ji(e,t)};const ia=[[2,4,6],[2,4],[3]],aa=[,[,,[[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 sa(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 la(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)sa(e[r],t,n)}!function(){let e,t;for(la(ia,1,10),e=0;e<aa.length;e++)if(aa[e])for(t=0;t<aa[e].length;t++)Array.isArray(aa[e][t])&&la(aa[e][t])}();const ca={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=ca.findSegmentPositionMeetMin(e,t);return ca.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=ca.findSegmentPositionMeetMax(e,n);return ca.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=ca.findSegmentPositionMeetMaxThenMin(i,s,(i.center+a.center-r)/2),s=i.position+i.radius+r/2;a.position=ca.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,ca.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)ca.layoutPositionFromMin(e,t,n,r),ca.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=ca.findSegmentPositionMeetMaxThenMin(r,t,n)}}},ua=(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},da=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,pa=e=>e.filter(da),ma=(e,t)=>pa(ce(e,t,[])),fa=e=>da(e)&&(!1!==e.showValue||!1!==e.showLabel),ha=e=>e.filter(fa),ga=(e,t)=>ha(ce(e,t,[])),va=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,ya=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},ba=({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},xa=({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},Sa=({value:e,qMin:t})=>"NaN"!==t&&e<t,Ea=({value:e,qMax:t})=>"NaN"!==t&&e>t,Ma={isRefLineVisible:da,getVisibleRefLines:pa,getRefLines:ma,getMeasureRefLines:e=>ma(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:ma(e,"refLine.dimRefLines"),isRefLineLabelVisible:fa,getVisibleRefLineLabels:ha,getRefLineLabels:ga,getMeasureRefLineLabels:e=>ga(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:ga(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=ua(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=ua(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=ua(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=ce(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():ce(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const c=ce(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:va,extractInfoFromInputValue:ya,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=va({refLineLayout:e,layoutService:n});return ya(r,t,"id")},isDiscreteMinOutOfBounds:ba,isDiscreteMaxOutOfBounds:xa,isContinuousMinOutOfBounds:Sa,isContinuousMaxOutOfBounds:Ea,isOutOfRange:({value:e,qMin:t,qMax:n})=>Sa({value:e,qMin:t})||Ea({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&xa({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&ba({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n};function Ca(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines=Ki.tokenize(o.title,t,"… "+o.valueString,3,n),o.maxNumLines=o.lines.length}}function wa({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=Ki.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 ka({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=e.map((e=>wa({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 Na(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Ta=3,Oa=2;function Ra({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 Aa=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(Ma.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(Ma.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Ma.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Ma.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},La={hasEngineFormat:Ra,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:o,rtl:i,isContinuous:a,isDimension:s}){const l=Ma.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=Aa({label:i,dataPages:u,qMin:p,qMax:m});i.scaledValue=1===f?l?-.1:1.1:-1===f?l?1.1:-.1:Ma.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=Ra({inputValue:s,inputValueLabel:l,localeInfo:o})?l:t?t(a):a,r.valueString=`${Se.lrm}(${i})${Se.lrm}`,r.title=La.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=Ra({inputValue:a,inputValueLabel:s,localeInfo:o})?s:r,n.valueString=`${Se.lrm}(${i})${Se.lrm}`,n.title=La.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];i=n.valueText,n.valueString=`${Se.lrm}(${i})${Se.lrm}`,n.title=La.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=La.getTotalNumLines(e)-r;if(t<=0)return;La.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,La.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;La.calculateLabelPositions({labels:e,scale:t,size:v,layoutService:m,orientation:u,rtl:p,isContinuous:f,isDimension:h}),Na(e,"center"),La.addLabelsNeighborInfo(e,r,o,i),Ca(e,a,s),La.reduceTotalMaxNumLines(g,l,o-(g.length-1)*i),"vertical"===u&&(La.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=Ki.tokenize(o.title,t,"… "+o.valueString,o.maxNumLines,n))}}(e,a,s)),La.addLabelsSize(e,s,l,d),La.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:o,lineHeight:i=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=o,{fontSize:d,fontFamily:p,background:m}=t;let f=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,o=t.map(((t,o)=>{const m={type:"text",text:t,title:wa({title:e.title,font:a,ellipsis:"… "+e.valueString}),dx:0,dy:0,maxWidth:n,width:n,fontSize:d,fontFamily:p,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return m[l]=u,m[s]=e.segment.position,m.y+=(o-(r-1)/2)*i,m}));e.background&&f.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:o,lineHeight:i,background:a}){const{lines:s}=o,{borderRadius:l=Ta,padding:c={}}=a,{top:u=Oa,bottom:d=Oa,left:p=Oa,right:m=Oa}=c,f=s.length,h={type:"rect",rx:l,ry:l,fill:o.background.fill,width:o.width+(p+m),height:o.height+(u+d),value:o.value,dock:r};return h[n]=e,h[t]=o.segment.position,h.x-=o.width/2+p,h.y-=f*i/2+u,h}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:i,background:m})),f=f.concat(o)})),f}};function Ia(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 Pa(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 La.getMaxTextWidth(e)>a&&(Ca(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,La.getMaxTextWidth(e))+n+r}(t,n)}function Da(e,t){return t?e.domain():[0,1]}function qa(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 za(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 $a(e,t){return e>9?t[1]:t[0]}function Ba({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,dock:h}=s,g=o[f],v=Xi.createOob({oob:Xi.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:i});v.dock=h;const y="c"+p,b="c"+m,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:h};x[b]=g/2,x[y]=a;const S={type:"text",text:u>9?"9+":u,title:ka({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:h};return S[m]=g/2,S[p]=a,[v,x,S]}function Fa(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:Ki.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 Ha=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 ja={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=Ha(this.settings.labels),s=Ia(this.chart,this.settings.formatter,e);La.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]=Da(t,n);return qa(e,r,o)}if(r){const t=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return qa(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=Fa(t.label),{dock:n}=this.settings.layout;return La.measureLabelsWidth(u,this.measureText),d=Pa(n,u,e),d}const p=za(this.measureText),m=l?$a(l,p):0,f=c?$a(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=Ha(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}=Fa(n.label),E=Ia(this.chart,this.settings.formatter,e),M=v;La.addLabelTitles({labels:c,formatter:E,isContinuous:i,canBeContinuous:l,localeInfo:s}),La.calculateLabelPositions({labels:c,scale:e,size:M,layoutService:r,orientation:h,rtl:d,isContinuous:i,isDimension:a});const[C,w]=Da(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}=qa(e,t,n,c),m="scaledValue"!==c&&Ma.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=za(l),b=$a(g,y),x=$a(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;Na(N),Na(T);const D=Ba({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=Ba({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});La.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}),ca.layout(k.map((e=>e.segment)),I,P,n.label.gap);const z=k.filter((e=>ca.isInside(e.segment,I,P,i)));return La.createLabels({labels:z,style:n.label,maxLabelWidth:S,areaProps:m,area:f,lineHeight:b,font:y,theme:o}).concat([...D,...q])}};var Va={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function Wa(e){const{qHyperCube:t,...n}=e,{qDataPages:r,qStackedDataPages:o,qTreeDataPages:i,...a}=t,s=Q(!0,{},{...n,qHyperCube:{...a,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:l}=Va;return l.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==E(s,e)&&M(s,e,null);else{const e=t[0],n=t[1].split("].")[1];E(s,e,[]).forEach((e=>{void 0!==E(e,n)&&M(e,n,null)}))}})),s}var _a={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return o=>{if(e||t||n){var i;if("line"===o.type)return null!==(i=o.tickValue)&&void 0!==i?i:"axis";if("text"===o.type)return`${o.tickValue} ${o.text}`;if("container"===o.type){const e=o.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${o.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===o.type&&void 0===o.tickValue)return"axis";const e=o.transform&&o.transform.match(/rotate/gi)?"rotated":"horizontal";return`${o.data.group?o.data.group.value+" ":""}${o.data.value} ${o.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:o}){return({currentNodes:i,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===o&&i.forEach((e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)})),"left"!==o&&"right"!==o||i.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==o&&"bottom"!==o||i.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?i.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?i.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)})):i.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=o):e.transform=`translate(${-r}, ${-o})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=o,e.y-=r):(e.x-=r,e.y-=o)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=o,e.y2-=o):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:o/e.major.size,n="y"===e.minor.p?o/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:""+e.data.major.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.cx-=r,e.cy-=o}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return""+e.value;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y,i=t.width-n.width,a=t.height-n.height;let s=-r,l=-o;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":i<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":o>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=Wa(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Wa(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:Ua,extractInfoFromInputValue:Ya,resolveValue:Ga}=Ma;var Ka={resolveValue:Ga,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Ua({refLineLayout:e,layoutService:n});return Ya(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Ua({refLineLayout:e,layoutService:n});return Ya(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:o}=n.meta,i=Ua({refLineLayout:e,layoutService:n});return r[i]&&o?r[i].qText:i},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Ua({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:o}=t;return o[r]}};function Xa({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:o,animationsEnabled:i,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:d,path:p,minimumLayoutMode:m}){const f=e?t.dimensionRefLines:p?t.query.getRefLines(p):t.measureRefLines;if(!f.length)return!1;const h={key:u,type:"ref-line",layout:{minimumLayoutMode:m},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:i,trackBy:_a.lines.trackBy,compensateForLayoutChanges:_a.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==o.meta.major.orientation||!c),v=!e||n.meta.isContinuous;return f.forEach((i=>{h.lines[l].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.valueInfo=Ka.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),f.value=()=>{var e;const o=Ma.getScaledPosition({scale:a.scale(s),value:Ka.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:f.valueInfo,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:i,refLineModel:t,layoutService:n,colorModel:r,dockService:o,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:v}))})),h}const Ja={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 Za({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:o,dock:i,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:d,key:p,path:m}){const f=e?t.dimensionRefLineLabels:m?t.query.getRefLineLabels(m):t.measureRefLineLabels;if(!f.length)return[];const h=[],g=!e||n.meta.isContinuous,v=f.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=()=>Ka.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>Ka.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>Ka.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g})));return h.push((({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:o,scale:i,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:d,localeInfo:p})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:o,formatter:a,scale:i,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:d,isDimension:e,localeInfo:p,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:_a.refLineLabels.trackBy,compensateForLayoutChanges:_a.refLineLabels.compensateForLayoutChanges}}))({isDimension:e,rtl:d,style:Q(!0,Ja,s),dock:i,key:p,labels:v,scale:a,formatter:l,layoutService:n,animationsEnabled:o,theme:c,isContinuous:g,localeInfo:u})),h}var Qa={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"}},es={LINE:"line",BAR:"bar",MARKER:"marker"},ts={PRIMARY:0,SECONDARY:1},ns={type:"bar",axis:0};const rs={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 os(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const is={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 as(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){var t,n,r,o,i;let a,s,l,c,u,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(r=n.session)&&void 0!==r&&r.sessionConfig||null!==(o=e.session)&&void 0!==o&&null!==(i=o.config)&&void 0!==i&&i.url)){var p;if(a=e.session.options||(null===(p=e.enigmaModel)||void 0===p?void 0:p.session.sessionConfig),!a){var m;a=null===(m=e.session)||void 0===m?void 0:m.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",c=a.port?":"+a.port:"",u=a.prefix?a.prefix:"/","/"!==u[u.length-1]&&(u+="/"),s+l+c+u}return""}(n);o&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[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 is.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}async function ss(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 as(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&&os(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await is.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 is.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(os(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await is.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 ls={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(ss(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}},cs={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await ls.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>ls.checkIfPromisesExist({customTooltipModel:e})};const us=(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:rs.CHART.CHART_PARENT_TYPE,qId:rs.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},ds=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:rs.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const ps={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=rs.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:rs.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 ps.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=rs.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=rs.CHART.STATE,a=us(t,i),s=await e.createSessionObject(a),l=ds(t);if(s.id!==rs.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(rs.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 ps.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(ps.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(rs.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=rs.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 ms(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function fs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=rs.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function hs(e){const t=fs();return e.filter((e=>t[e.id]))}const gs={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}=gs.getAttrExprData(a);i.length||n.length?cs.handlePromises({customTooltipModel:o,nodes:gs.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&&ps.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>cs.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[rs.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[rs.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[rs.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(hs(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[rs.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[rs.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=ms(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===hs(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=ms(e)||[];[...o,t].forEach((e=>{const t=hs(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=fs(),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:Se.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Se.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 vs(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 rs.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case rs.CUSTOM.TITLE:case rs.CUSTOM.DESCRIPTION:case rs.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 ys={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>vs(t,e,r,n)}}};const bs={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={[rs.CUSTOM.TITLE]:!0,[rs.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=gs.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===rs.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===rs.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Ee.getMeasure(e,t))),e,i)}};function xs({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(bs.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:Ss}=rs;function Es({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:gs,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=xs({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Ss.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Ss.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>gs.checkIfPromisesExist({customTooltipModel:m}),createImageRow:({value:e,h:t})=>gs.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const o=gs.getDataNodes(i,r),a=gs.getAttrExprData(t);return cs.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})=>ps.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>gs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>ps.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:()=>ps.hide({app:n,customTooltipModel:m}),destroy:()=>ps.destroyVisualization({customTooltipModel:m})}}}function Ms({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===es.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:ys.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 Cs({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:ys.getNode(i.getLayout(),i.meta),...o.getDatumProps(t)}})))}}]}return[]}function ws({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===es.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 ks={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Ns={OPTIONS:ks,DEFAULT:ks.MINI_CHART};function Ts({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 Os({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 Rs=e=>({miniChart:e===Ns.OPTIONS.MINI_CHART.value,bar:e===Ns.OPTIONS.BAR.value,none:e===Ns.OPTIONS.NONE.value});function As({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Rs(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Rs(Ns.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),o=e.getLayoutValue("preferContinuousAxis");return Rs(!n&&(r||!r&&o)?Ns.OPTIONS.NONE.value:Ns.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Ns.OPTIONS.MINI_CHART.value,n.bar=t.value===Ns.OPTIONS.BAR.value,n.none=t.value===Ns.OPTIONS.NONE.value),n}function Ls({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]=Os({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 Is({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]=Os({layoutService:o,viewState:n,viewCache:r});return{size:u,thumbSize:(p-d)*u}}}function Ps({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ls({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Is({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 Ds="data-scrollbar-handle";function qs({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Ds)||""}const zs="scrollbarResize";function $s({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s}){const l=Ls({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:zs,threshold:0,enable(e,t){return!(!i.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[zs]=this[zs]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&qs({e:t})&&(this[zs].panningEvent=t.srcEvent),!!this[zs].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[zs]=this[zs]||{},this[zs].panningEvent&&t.component(e).emit("dragStart",this[zs].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[zs]=this[zs]||{},!this[zs].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=qs({e:this[zs].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[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")}}}}const Bs="scrollbarPan";function Fs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ls({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Is({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:Bs,threshold:0,enable(r,o){return this[Bs]=this[Bs]||{},!(o&&!this[Bs].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[Bs]=this[Bs]||{},this[Bs].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[Bs].relative=a.relative,this[Bs].zoom=r.get("zoom"),this[Bs].zoom.span=this[Bs].zoom.max-this[Bs].zoom.min,this[Bs].zoom.fullSpan=i-n}else if(a.onThumb)this[Bs].offset=a.thumb;else{const e=u();this[Bs].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=c(n);if(this[Bs]=this[Bs]||{},i.meta.isContinuous){const e=a.relative-this[Bs].relative,{fullSpan:t,span:n,min:i,max:s}=this[Bs].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[Bs].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[Bs]=this[Bs]||{},this[Bs].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[Bs]=this[Bs]||{},this[Bs].isPanning=!1,t.component(e).emit("unlockState")}}}}function Hs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return[Ps({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}),$s({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),Fs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})]}function js({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 Vs={background:"rgba(0, 0, 0, 0.1)"},Ws={top:-1,bottom:-1,width:6},_s={width:2,background:"#595959"};var Us={before:Vs,after:Vs,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Ws,endHandle:Ws,startHandleBorder:_s,endHandleBorder:_s};const Ys={background:"rgba(0, 0, 0, 0.1)"},Gs={top:-1,bottom:-1,width:6},Ks={width:2,background:"#595959"};var Xs={before:Ys,after:Ys,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Gs,endHandle:Gs,startHandleBorder:Ks,endHandleBorder:Ks};const Js={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Zs={pointerEvents:"initial"},Qs={pointerEvents:"none"};const el="ew-resize",tl="default";function nl(){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 rl(){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?el:tl}function ol(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 il(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function al(){const{size:e,start:t,end:n}=nl.call(this);this.renderer.render(this.elements(this.h,ol.call(this,e,t,n)))}function sl(){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?Xs:Us;return{container:{...Js},before:{...Js,...n.before,...t.before},after:{...Js,...n.after,...t.after},thumb:{...Js,...n.thumb,...t.thumb},startHandle:{...Js,...Zs,...n.startHandle},endHandle:{...Js,...Zs,...n.endHandle},startHandleBorder:{...Js,...Qs,...n.startHandleBorder},endHandleBorder:{...Js,...Qs,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var ll={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(){al.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||!il.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=qs({e:e});t&&(this.state.hover[t]=!0),rl.call(this),al.call(this)},leave(){this.state.locked||(this.state.hover.reset(),rl.call(this),al.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=qs({e:e});t&&(this.state.drag[t]=!0),rl.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),rl.call(this),al.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}=nl.call(this);return this.elements(e,ol.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",[Ds]:"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",[Ds]:"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:sl.call(this),continuous:o.isContinuous,invert:"horizontal"===o.orientation&&o.rtl,injections:i})}};function cl({layoutService:e}){return e.meta.isContinuous&&As({layoutService:e}).miniChart}function ul({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:o}=e,{primarySeries:i,secondarySeries:a}=r.meta,s=r.query.series(es.LINE),l=[...Cs({forceCreate:!0,key:Qa.COLLECTION.PRIMARY,series:i,fieldModel:n,colorService:o,layoutService:t}),...Cs({key:Qa.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:o,layoutService:t}),...Cs({key:Qa.COLLECTION.LINE,series:s,fieldModel:n,colorService:o,layoutService:t}),...Ms({key:Qa.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:o,series:i}),...Ms({key:Qa.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:o,series:a}),...ws({key:Qa.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:i}),...ws({key:Qa.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return cl(e)&&(l.push(...Cs({key:Qa.COLLECTION.REDUCED,source:Qa.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:o,layoutService:t})),l.push(...Cs({key:Qa.COLLECTION.REDUCED_PRIMARY,source:Qa.DATA.REDUCED,series:i,fieldModel:n,colorService:o,layoutService:t})),l.push(...Cs({key:Qa.COLLECTION.REDUCED_SECONDARY,source:Qa.DATA.REDUCED,series:a,fieldModel:n,colorService:o,layoutService:t})),l.push(...Ms({key:Qa.COLLECTION.REDUCED_STACKED_PRIMARY,source:Qa.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===es.BAR)),colorService:o})),l.push(...Ms({key:Qa.COLLECTION.REDUCED_STACKED_SECONDARY,source:Qa.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===es.BAR)),colorService:o}))),l}const dl=({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 pl({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 ml=({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:dl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:pl({models:e})}},fl=({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:dl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:pl({models:e})}};function hl({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 gl({viewCache:e,mainMajor:t}){return Q(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function vl({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 yl({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:vl({viewState:t,viewCache:n,layoutService:i})};return{[Qa.SCALE.MAJOR]:Q(!0,{},p,{ticks:{level:"outer"}}),[Qa.SCALE.MAJOR_INNER]:Q(!0,{},p,{ticks:{level:"inner"}})}}function bl({picasso:e,models:t,viewState:n,viewCache:r,environment:o}){const{meta:i}=t.layoutService,a=i.isTime?{...yl({picasso:e,viewState:n,viewCache:r,models:t,environment:o})}:i.isContinuous?{[Qa.SCALE.MAJOR]:hl({models:t,viewState:n,environment:o})}:i.isBarSeriesGrouped?{[Qa.SCALE.MAJOR]:fl({models:t,environment:o})}:{[Qa.SCALE.MAJOR]:i.isBarSeriesStackedInBothAxis?fl({models:t,environment:o}):ml({models:t,environment:o})};return cl(t)?{...a,[Qa.SCALE.REDUCED]:gl({viewCache:r,mainMajor:a[Qa.SCALE.MAJOR]})}:a}function xl({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 Sl({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!cl({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 El({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{...bl({picasso:e,models:t,viewState:n,viewCache:r,environment:o}),[Qa.SCALE.MINOR.PRIMARY]:xl({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:o}),[Qa.SCALE.MINOR.SECONDARY]:xl({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:o}),[Qa.SCALE.MINOR.REDUCED_PRIMARY]:Sl({layoutService:i,tickModel:s,dockService:u,environment:o}),[Qa.SCALE.MINOR.REDUCED_SECONDARY]:Sl({layoutService:i,tickModel:l,dockService:u,environment:o}),...c.custom.wrappedScales()}}var Ml={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 Cl=["all","labels"];function wl({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:o,styleModel:i}=e,a=t.getLayoutValue("measureAxes");if(!a||!a.length)return[];const s=o.getStyles(),l=i.query.axis.label.getStyle(),{measureAxes:c}=r.meta;return c.filter((e=>{const t=e.isPrimary?0:1;return Cl.some((e=>a[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?Qa.COMPONENT.AXIS.MINOR.PRIMARY:Qa.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:Ml.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{stroke:s.axis.line.major.color},ticks:{stroke:s.axis.line.major.color},minorTicks:{stroke:s.axis.line.minor.color}}})))}var kl=.5,Nl=3,Tl=13;function Ol({models:e,environment:t}){const{layoutService:n,dockService:r,styleModel:o}=e,i="rtl"===t.options.direction,a=n.getLayoutValue("dimensionAxis"),s=o.query.axis.label.getStyle(),l=(({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return ve.getAdjustedMaxGlyphCount(t,r,0,"qText")})({layoutService:n}),{orientation:c}=r.meta.major,u="horizontal"===c?a.label:"auto";return{type:"axis",key:Qa.COMPONENT.AXIS.MAJOR,scale:Qa.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:Ml.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>Nl&&l<Tl?1:void 0,fontFamily:s.fontFamily,fontSize:s.fontSize,fill:s.fill},line:{show:!1},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:kl}}}]}}}function Rl({models:e}){const{dockService:t,styleModel:n}=e,{orientation:r}=t.meta.major,o=n.query.axis.label.getStyle();return{type:"axis",key:Qa.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:Qa.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:Ml.AXIS.MAJOR[r.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:o.fontFamily,fontSize:o.fontSize,fill:o.fill},line:{show:!1}}}}function Al({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,styleModel:o}=e,i="rtl"===t.options.direction,{orientation:a}=n.meta.major,s="bottom"===n.meta.major.dock?0:1,l=r.getStyles(),c=o.query.axis.label.getStyle(),u=i?1:0,d={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:Ml.AXIS.MAJOR[a]},preferredSize:()=>({size:2*parseFloat(c.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:i?"end":"start",label:{align:s,justify:u},guideLine:{major:{justify:u},minor:{align:s}},line:{show:!1}},style:{label:{fontFamily:c.fontFamily,fontSize:c.fontSize,fill:c.fill},majorGuideLine:{stroke:l.axis.line.major.color},minorGuideLine:{stroke:l.axis.line.minor.color}}};return[Q(!0,{},d,{key:Qa.COMPONENT.AXIS.TIME_INNER,scale:Qa.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:l.axis.line.minor.color},minorGuideLine:{stroke:l.axis.line.major.color}}}),Q(!0,{},d,{key:Qa.COMPONENT.AXIS.TIME_OUTER,scale:Qa.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[Rl({models:e})]:[Ol({models:e,environment:t})]}const Ll=({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,Il=({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 Pl({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:kl},...n}}}]}}var Dl="max",ql="min";function zl(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 $l=(e,t)=>`${e}-${t.id}`,Bl=4,Fl=12,Hl=4;function jl({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:o}){if(t.meta.isContinuous)return()=>Hl+"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(Qa.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Bl,Math.min(Fl,l));i.size=("bar"===o?2*c:c)+"px"}return i.size}}const{isDark:Vl}=At;const Wl=({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 zl(t,v)},b=$l(Qa.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:Qa.SCALE.MAJOR,fn:Il({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?Vl(t)?function(e){return _e(e).brighter(.5).toString()}(t):function(e){return _e(e).darker().toString()}(t):t},size:jl({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:Pl({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:kl}}})}};function _l({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:o}){return function(i){const{datum:a,resources:{scale:s}}=i,l=s(Qa.SCALE.MAJOR),c=s(Qa.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 Ul({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?_l({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?_l({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(Qa.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(Qa.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 Yl=({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=Il({layoutService:r,seriesModel:o,rtl:s,orientation:l});return{key:$l(Qa.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:Qa.SCALE.MAJOR,fn:c},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:Ul({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:Pl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:kl},inactive:{opacity:kl}})}};var Gl={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 Kl({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 Xl=3,Jl=20;function Zl({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}=Gl,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=Kl({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 zl(t,b)};return{type:"point",key:$l(Qa.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:Qa.SCALE.MAJOR,fn:Il({layoutService:r,seriesModel:i,rtl:y,orientation:p}),ref:"major"},sizeLimits:{minPx:Xl,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:Pl({layoutService:r,active:{r:e=>e.r+Gl.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[Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const Ql=(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 ec({chart:e,models:t,environment:n,series:r,lineSeries:o}){const{layoutService:i,dockService:a,styleModel: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.query.point.label.getStyle();return{type:"point-label",key:`${Qa.COMPONENT.POINT_LABEL}-${u}`,layout:{displayOrder:2,minimumLayoutMode:Ml.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:r.options.showAsConnections,label:t=>Ql(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{point:`${Qa.COMPONENT.POINT}-${u}`,allPoints:o.map((e=>`${Qa.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>zl(e.value,m))(e.data),labelSpace:{use:()=>{const t=e.component(Qa.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:f.fontFamily,fontSize:f.fontSize,fill:f.fill}}}const tc=({chart:e,dock:t})=>{let n=t;const r=e.component(`${Qa.COMPONENT.SLICED_HAT}-${Dl}`),o=e.component(`${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.PRIMARY}`),i=e.component(`${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.SECONDARY}`);return r?n=`@${Qa.COMPONENT.SLICED_HAT}-${Dl}`:o?n=`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.PRIMARY}`:i&&(n=`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.SECONDARY}`),n},nc=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${Qa.COMPONENT.SLICED_HAT}-${Dl}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.PRIMARY}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${Qa.COMPONENT.SLICED_HAT}-${ql}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${ql}-${ts.PRIMARY}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${ql}-${ts.SECONDARY}`||"vertical"!==t||n||(r=4),r};function rc({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:Qa.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:Ml.LABEL_SPACE,dock:tc({chart:e,dock:u?"top":p})},settings:{size:10},preferredSize:()=>{const t=e.component(`${Qa.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(Qa.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(Qa.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 oc={min:"Min",max:"Max"};function ic(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 ac(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 sc(e,t,n){return ic(e,t,n)||ac(e,t,n)}function lc(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function cc(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function uc(e,t){return lc(e,t)||cc(e,t)}function dc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta["hasExplicit"+oc[t]]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Dl?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===Dl?!lc(r,e):!cc(r,e)}({extrema:e,type:t}))}var pc=Object.freeze({__proto__:null,isSegmentMaxOutOfBounds:ic,isSegmentMinOutOfBounds:ac,isSegmentOutOfBounds:sc,isMaxOutOfBounds:lc,isMinOutOfBounds:cc,isOutOfBounds:uc,shouldShowOob:dc});const mc={min:"Min",max:"Max"},fc=({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===Dl,{isBarSeriesGrouped:M}=p.meta,C=(({chart:e,type:t,opposite:n,dock:r})=>{let o=t===Dl?n:r;const i=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),s=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`),l=e.component(Qa.COMPONENT.LABEL_SPACE),c=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`),d=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.SECONDARY}`);return i?o=`@${Qa.COMPONENT.SLICED_HAT}-${t}`:a?o=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`:s?o=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`:c||u||d?l&&t===Dl?o="@"+Qa.COMPONENT.LABEL_SPACE:c?o=`@${Qa.COMPONENT.BAR_OOB}-${t}`:u?o=`@${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`:d&&(o=`@${Qa.COMPONENT.BAR_OOB}-${t}-${ts.SECONDARY}`):l&&t===Dl&&(o="@"+Qa.COMPONENT.LABEL_SPACE),o})({chart:e,type:a,opposite:y,dock:v}),w=Il({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&&pc[`is${mc[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,$=e=>"NaN"!==e.qNum?e.qNum:0,B=p.meta.isContinuous?z:q;return{type:"data-out-of-bounds-marker",key:`${Qa.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:C,minimumLayoutMode:Ml.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:B},end:{field:e,value:n.showAsZeros?$: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:Qa.SCALE.MAJOR,fn:w},markerOffset:nc({dockPosition:C,orientation:b,rtl:g})},brush:Pl({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}}},hc={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function gc({chart:e,models:t,viewState:n,viewCache:r,axis:o}){const i=C(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${Qa.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=hc[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=hc[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 vc=({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 yc(e){return Math.min(Math.max(0,e),1)}const bc=({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?ts.PRIMARY:ts.SECONDARY,b=o?Qa.SCALE.MINOR.PRIMARY:Qa.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 yc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return yc(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=v(e);return yc(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 yc(e.scale(n))}}},S=(o?d:p).query.getExtrema(),E=f?({start:e,end:t})=>sc(e.value,t.value,S):({end:e})=>uc(e.value,S);return{type:"box",key:`${Qa.COMPONENT.BAR}-${y}`,data:{filter:(()=>{if(f)return;const e=l.query.series(es.BAR).filter((e=>e.isPrimary===o)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?o?Qa.COLLECTION.STACKED_PRIMARY:Qa.COLLECTION.STACKED_SECONDARY:o?Qa.COLLECTION.PRIMARY:Qa.COLLECTION.SECONDARY},preferredSize:m?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:Qa.SCALE.MAJOR,fn:Ll({layoutService:i,axis:y}),ref:m?{start:"major",end:"major"}:void 0},minor:x,box:{width:vc({isContinuous:m,isBarSeriesGrouped:h,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:g}),minWidthPx:m?gc({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:Pl({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:kl}}})}},xc=({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?ts.PRIMARY:ts.SECONDARY,g=o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${Qa.COMPONENT.STACK_BAR}-${h}`,type:"box",data:{collection:o?Qa.COLLECTION.STACKED_TOTAL_PRIMARY:Qa.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:Qa.SCALE.MAJOR,fn:Ll({layoutService:i,axis:h}),ref:p?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:o?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:vc({isContinuous:p,isBarSeriesGrouped:m,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:f}),minWidthPx:p?gc({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 Sc(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,o=e.styleModel.query.bar.label.getStyle(),i=o.fill===r.color;return{placements:t.simplifiedPlacements.map((e=>function({simplifiedPlacement:e,fill: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:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:i&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>At.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):o.fill,isHorizontal:n}))),label:t.label}}function Ec(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 Mc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},Cc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function wc(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 kc=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:o,styleModel:i,themeService:a}=e,{meta:s}=r,l="rtl"===t.options.direction,c=a.getStyles(),u=i.query.bar.label.getStyle(),d=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),p=n?ts.PRIMARY:ts.SECONDARY;if(!(n?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!Mc(d,s))return!1;let m;!s.isBarSeriesStacked&&(m=s.isBarSeriesStacked?1:0);const f={label:e=>Ql(e.data,e),simplifiedPlacements:wc(m,0===m?1:0,s.isBarSeriesStacked?.5:1,s.isContinuous),style:c.label.value},h=[Sc(e,f)],g=[{component:`${Qa.COMPONENT.BAR}-${p}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Ec(t.data.end.value,e.dockService.meta.minor.orientation,l,0),labels:h,fontSize:parseInt(u.fontSize,10),fontFamily:u.fontFamily}}}];return{type:"labels",key:`${Qa.COMPONENT.BAR_LABEL}-${p}`,layout:{minimumLayoutMode:Ml.VALUE_LABEL},settings:{sources:g}}};function Nc(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 Tc({chart:e,models:t,environment:n,isPrimary:r}){const{meta:o}=t.layoutService,i="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.styleModel.query.bar.label.getStyle(),l=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),c=r?ts.PRIMARY:ts.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Cc(l,o))return!1;const u=e.formatter(r?Qa.FORMATTER.PRIMARY:Qa.FORMATTER.SECONDARY)||(e=>e),d=e=>0===e?"":u(e),p={label:e=>d(e.data.sumOfPositives.value),simplifiedPlacements:Nc("outside",true,o.isContinuous),style:a.label.value},m={label:e=>d(e.data.sumOfNegatives.value),simplifiedPlacements:Nc("opposite",true,o.isContinuous),style:a.label.value},f=[Sc(t,p),Sc(t,m)];return{type:"labels",key:`${Qa.COMPONENT.STACK_BAR_LABEL}-${c}`,layout:{displayOrder:2,minimumLayoutMode:Ml.VALUE_LABEL},settings:{sources:[{component:`${Qa.COMPONENT.STACK_BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Ec(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,i),labels:f,fontSize:parseInt(s.fontSize,10),fontFamily:s.fontFamily}}}]}}}var Oc=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 Rc={min:"Min",max:"Max"};function Ac({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?xc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):bc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),v=i?l.query.getExtrema():c.query.getExtrema(),y=n===Dl,b=i?ts.PRIMARY:ts.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta["hasExplicit"+Rc[t]]}(v,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,o=Number(r.toFixed(13));return!Oc[`has${Rc[t]}Hat`](o,e)}(v,n,y)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta["hasExplicit"+Rc[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?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let o=r;const i=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),a=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`);return i&&a&&(o=n?r:`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),o})({chart:e,type:n,isPrimary:i,dock:y?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${Qa.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:Q({},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:vc({isContinuous:m,isBarSeriesGrouped:f,styleModel:u,discreteModel:d,isBarSeriesStackedInBothAxis:h}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:Pl({layoutService:a})}}const Lc={min:"Min",max:"Max"},Ic={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Pc({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?xc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):bc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),h=i?l.query.getExtrema():c.query.getExtrema(),g=n===Dl?h.implicit.bar.max:h.implicit.bar.min,v=Number(g.toFixed(13)),y=i?ts.PRIMARY:ts.SECONDARY;if(!f)return!1;if(!pc[`is${Lc[n]}OutOfBounds`](v,h))return!1;const b=(({chart:e,type:t,end:n,start:r,isPrimary:o})=>{let i=t===Dl?n:r;const a=e.component(Qa.COMPONENT.LABEL_SPACE),s=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),l=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`),c=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`),u=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.SECONDARY}`);return s?i=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`:l?i=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`:c&&u&&!o?i=`@${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`:a&&t===Dl&&(i="@"+Qa.COMPONENT.LABEL_SPACE),i})({chart:e,type:n,end:d,start:p,isPrimary:i});let x="end";m&&(x=n===Dl?"sumOfPositives":"sumOfNegatives");return{type:"box-out-of-bounds",key:`${Qa.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:ge.getDockValue(n===Dl?d:p),oob:Q({},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=pc[`is${Lc[n]}OutOfBounds`](e.datum[x].value,h,n);return(!r||function({type:e,item:t,prop:n,extrema:r}){const o=t.datum[Ic[n]].value;return 0!==o&&pc[`is${Lc[e]}OutOfBounds`](o,r,e)}({type:n,item:e,prop:x,extrema:h}))&&o}})},brush:Pl({layoutService:a})}}function Dc(e){return Math.min(Math.max(0,e),1)}const qc=({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?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY),m=r?ts.PRIMARY:ts.SECONDARY,f=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),h=n===Dl;if(!dc({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:`${Qa.COMPONENT.GHOST_BAR_OOB}-${n}-${m}`,data:{filter:(()=>{if(l)return;const e=a.query.series(es.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?Qa.COLLECTION.STACKED_TOTAL_PRIMARY:Qa.COLLECTION.STACKED_TOTAL_SECONDARY:r?Qa.COLLECTION.PRIMARY:Qa.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:Qa.SCALE.MAJOR,fn:Ll({layoutService:s,axis:m}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:r?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Dc(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=v(e,"sumOfPositives");return Dc(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=v(e,"sumOfNegatives");return Dc(e.scale(t))}}:{ref:"end",fn:e=>{const t=v(e);return Dc(e.scale(t))}}},box:{width:vc({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 zc(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 $c=({chart:e,models:t,type:n,environment:r,isPrimary:o})=>{const{layoutService:i,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,styleModel:c,seriesModel:u,themeService:d}=t,p=d.getStyles(),m=c.query.bar.label.getStyle(),{meta:f}=i,{isBarSeriesStacked:h}=f,g=e.formatter(o?Qa.FORMATTER.PRIMARY:Qa.FORMATTER.SECONDARY),v=i.getLayoutValue("dataPoint.showBarLabels",!1),y="horizontal"===a.meta.major.orientation,b="rtl"===r.options.direction;if(!(o?u.meta.primaryBarSeriesCount:u.meta.secondaryBarSeriesCount)||!h&&!Mc(v,f)||h&&!Cc(v,f))return!1;const x=o?s.query.getExtrema():l.query.getExtrema();if(!x.meta.hasExplicit)return!1;const S=n===Dl?x.implicit.bar.max:x.implicit.bar.min;if(!(n===Dl?lc(S,x):cc(S,x)))return!1;let E=e=>Ql(e.data,e);f.isBarSeriesStacked&&(E=n===Dl?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(lc(e.data.sumOfPositives.value,x)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return g?g(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(cc(e.data.sumOfNegatives.value,x)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return g?g(t):t}return""});const M={label:E,simplifiedPlacements:zc("outside",true,f.isContinuous,y,b),style:p.label.value},C={label:E,simplifiedPlacements:zc("opposite",true,f.isContinuous,y,b),style:p.label.value},w=[Sc(t,M),Sc(t,C)],k=o?ts.PRIMARY:ts.SECONDARY,N="horizontal"===a.meta.major.orientation?"down":"right",T=[{component:`${Qa.COMPONENT.GHOST_BAR_OOB}-${n}-${k}`,selector:"rect",strategy:{type:"bar",settings:{direction:N,labels:w,fontSize:parseInt(m.fontSize,10),fontFamily:m.fontFamily}}}];return{key:`${Qa.COMPONENT.BAR_OOB_LABEL}-${n}-${k}`,type:"labels",layout:{minimumLayoutMode:Ml.VALUE_LABEL},settings:{sources:T}}},Bc=({chart:e,models:t,viewState:n,viewCache:r})=>[bc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),bc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Fc=({chart:e,models:t,viewState:n,viewCache:r})=>[xc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),xc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Hc=({chart:e,models:t,environment:n})=>{const{isBarSeriesStacked:r}=t.layoutService.meta;if(r){return[Tc({chart:e,models:t,environment:n,isPrimary:!0}),Tc({chart:e,models:t,environment:n,isPrimary:!1})]}return[kc({models:t,environment:n,isPrimary:!0}),kc({models:t,environment:n,isPrimary:!1})]},jc=({chart:e,models:t,viewCache:n,viewState:r})=>[Ac({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Ac({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Vc=({chart:e,models:t,viewCache:n,viewState:r})=>[Pc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Pc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Pc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Pc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Wc=({chart:e,models:t})=>[qc({chart:e,models:t,type:"max",isPrimary:!0}),qc({chart:e,models:t,type:"min",isPrimary:!0}),qc({chart:e,models:t,type:"max",isPrimary:!1}),qc({chart:e,models:t,type:"min",isPrimary:!1})],_c=({chart:e,models:t,environment:n})=>[$c({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),$c({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),$c({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),$c({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],Uc=({chart:e,environment:t,models:n,viewState:r,viewCache:o})=>{const{seriesModel:i}=n,a=i.query.series(es.BAR).slice(-1),s=i.query.series(es.LINE),l=i.query.series(es.MARKER);return[...Bc({chart:e,models:n,viewState:r,viewCache:o}),...Fc({chart:e,models:n,viewState:r,viewCache:o}),...s.map((e=>Yl({models:n,environment:t,series:e}))),...s.map((e=>Zl({models:n,series:e,environment:t}))),...l.map((r=>Wl({chart:e,models:n,series:r,environment:t}))),...s.map((r=>ec({chart:e,models:n,environment:t,series:r,lineSeries:s}))),...Hc({chart:e,models:n,environment:t}),...jc({chart:e,models:n,viewCache:o,viewState:r}),...Vc({chart:e,models:n,viewCache:o,viewState:r}),...Wc({chart:e,models:n}),..._c({chart:e,models:n,environment:t}),fc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),fc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),rc({chart:e,models:n,environment:t,lineSeries:s})]},Yc=0,Gc=1,Kc=3;function Xc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:o}=e,{auto:i,spacing:a}=r.getLayoutValue("gridLine",{});if(!i&&a===Yc)return!1;const s=o.getStyles(),l=n.meta.primarySeries.length>0;return{key:Qa.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:Ml.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!i&&a===Gc)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!i&&a===Kc,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY}}function Jc({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:Qa.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:Ml.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===o.meta.minor.orientation?"x":"y"]:[{value:0,scale:Qa.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function Zc({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:Ml.GRID_LINE},ticks:{stroke:i.grid.line.major.color},minorTicks:{show:!1,stroke:i.grid.line.minor.color}};return o?[Q(!0,{},a,{key:"time-inner-grid",x:{scale:Qa.SCALE.MAJOR_INNER},ticks:{stroke:i.grid.line.minor.color}}),Q(!0,{},a,{key:"time-outer-grid",x:{scale:Qa.SCALE.MAJOR}})]:[Q(!0,{},a,{key:"continuous-grid",x:{scale:Qa.SCALE.MAJOR},minorTicks:{show:!0}})]}function Qc({models:e}){return[Xc({models:e}),Jc({models:e}),...Zc({models:e})]}function eu({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,propertiesModel:i,appModel:a,genericObjectModel:s,styleModel: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.query.axis.title.getStyle();return{type:"data-title",key:Qa.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:o.meta.major.dock,minimumLayoutMode:Ml.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.fontFamily,fontSize:m.fontSize,color:m.color}}}const tu=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function nu({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,seriesModel:i,propertiesModel:a,appModel:s,genericObjectModel:l,styleModel:c}=e,u=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return[];const p=c.query.axis.title.getStyle(),{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?Qa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:Qa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:c?o.meta.minor.dock:o.meta.minorSecondary.dock,minimumLayoutMode:Ml.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!1,explicitItemInfos:tu(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.fontFamily,fontSize:p.fontSize,color:p.color}};return d&&(m.settings.padding="0",m.settings.minWidth="auto"),m}))}function ru({models:e,environment:t,actions:n}){return[eu({models:e,environment:t,actions:n}),...nu({models:e,environment:t,actions:n})]}function ou({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=As({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:()=>Os({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=()=>[Ts({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:Ns.OPTIONS.BAR.value},deviceType:t.deviceType})}function iu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o}){const{layoutService:i}=t,a=bc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o});if(!a)return!1;const s=o?ts.PRIMARY:ts.SECONDARY;return a.key=`${Qa.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=i.meta.isBarSeriesStacked?o?Qa.COLLECTION.REDUCED_STACKED_PRIMARY:Qa.COLLECTION.REDUCED_STACKED_SECONDARY:o?Qa.COLLECTION.REDUCED_PRIMARY:Qa.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=o?Qa.SCALE.MINOR.REDUCED_PRIMARY:Qa.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=Qa.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function au({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(es.LINE).map((r=>{const o=Yl({models:t,environment:e,series:r});return o.key=$l(Qa.COMPONENT.MINI_CHART.LINE,r),o.data.collection=Qa.COLLECTION.REDUCED,o.settings.coordinates.minor.scale=r.isPrimary?Qa.SCALE.MINOR.REDUCED_PRIMARY:Qa.SCALE.MINOR.REDUCED_SECONDARY,o.settings.coordinates.major.scale=Qa.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 su({models:e,environment:t}){return e.seriesModel.query.series(es.MARKER).map((n=>{const r=Wl({models:e,environment:t,series:n});return r.key=$l(Qa.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=Qa.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?Qa.SCALE.MINOR.REDUCED_PRIMARY:Qa.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=Qa.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function lu({chart:e,models:t,viewState:n,viewCache:r,environment:o}){return cl(t)?[iu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),iu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...au({environment:o,models:t}),...su({models:t,environment:o})]:[]}function cu({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=Ml.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return o?[{type:"axis-overlay",key:Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:Qa.SCALE.MAJOR_INNER,layout:{dock:"@"+Qa.COMPONENT.AXIS.TIME_INNER,minimumLayoutMode:a}},{type:"axis-overlay",key:Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:Qa.SCALE.MAJOR,layout:{dock:"@"+Qa.COMPONENT.AXIS.TIME_OUTER,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:Qa.SCALE.MAJOR,layout:{dock:"@"+Qa.COMPONENT.AXIS.MAJOR_CONTINUOUS,minimumLayoutMode:a}}]}function uu({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(es.BAR).filter((e=>e.isPrimary)),h=c.query.series(es.BAR).filter((e=>!e.isPrimary)),g=c.query.series(es.LINE),v=c.query.series(es.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?Za({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.dock:a.meta.minor.opposite,scale:Qa.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:Qa.FORMATTER.PRIMARY,theme:p,localeInfo:u,rtl:m,key:Qa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],C=x?Za({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.opposite:a.meta.minor.dock,scale:Qa.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:Qa.FORMATTER.SECONDARY,theme:p,localeInfo:u,rtl:m,key:Qa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&Xa({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:Qa.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Qa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:Ml.REFERENCE_LINE}),!!x&&Xa({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:Qa.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Qa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:Ml.REFERENCE_LINE}),Xa({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:Qa.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:m,key:Qa.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`:h.length?`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`:g.length?`${Qa.COMPONENT.LINE}-${g[0].id}`:v.length?`${Qa.COMPONENT.MARKER}-${v[0].id}`:`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,minimumLayoutMode:Ml.REFERENCE_LINE}),...M,...C,...Za({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dock:a.meta.major.opposite,scale:Qa.SCALE.MAJOR,style:s.getStyles(),theme:p,localeInfo:u,rtl:m,key:Qa.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function du(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var pu=[{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(du)},{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 mu({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=pu.length;a<s;a++){o=pu[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:ne[e].alignment},settings:{label:o.get("Object.Disclaimer."+e),rtl:i},style:r}}(c.key,{translator:r},{rtl:"rtl"===o.direction},{fontFamily:u})}function fu({layoutService:e}){return!!cl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:Qa.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function hu(e){return(null==e?void 0:e.type)||es.BAR}function gu({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=>hu(e)===es.LINE)).map((e=>({key:$l(Qa.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:Qa.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 vu({models:{fieldModel:e}}){return{[Qa.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[Qa.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var yu={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:bu}=yu;function xu({layoutService:e,largeDataService:t}){const{maxNumPoints:n=bu}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Su}=yu,Eu=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Su}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!xu({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Mu}=yu,{MAX_NUM_POINTS:Cu,DEFAULT_NUM_POINTS:wu,DEFAULT_NUM_LINES:ku}=yu,{DEFAULT_NUM_POINTS:Nu}=yu,Tu=({layoutService:e,largeDataService:t})=>{if(!xu({layoutService:e,largeDataService:t})){const{maxNumPoints:e=Nu}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:r=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:o=ku,maxNumPoints:i=wu,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Eu({layoutService:e,largeDataService:t})*r[0]<=i)return r[0];const s=Math.max(1,Math.min(o,r[1])),l=i/s,c=Math.floor(r[0]<=l?l:l/4),u=2*s*(s+1);return a&&(s>ku||i>wu)?Math.min(c,Math.ceil(Cu/u)):c})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Mu}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},o=4+2*(r-1);return Math.floor(n/(r*o))})({layoutService:e,largeDataService:t})};function Ou({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>xu({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Tu({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Eu({layoutService:t,largeDataService:n}),fetch:(o,i)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:o,definitionPath:i})=>{const a={qStart:e,qEnd:t,qNbrPoints:Tu({layoutService:r,largeDataService:o}),qMaxNbrTicks:300,qMaxNumberLines:Eu({layoutService:r,largeDataService:o})};return n.getHyperCubeContinuousData(i,a,!1)})({start:o,end:i,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function Ru(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Au({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 Lu(){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 Iu(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],o=Lu(),i=Lu();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 Pu(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Du(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=Iu(e,t,n.qMatrix),o=Pu(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 qu=2**.5,zu=1/qu;function $u(e){return e.qIsOtherCell}function Bu({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some($u)){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($u)||t++})),t}(n)}const Fu={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var Hu={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 ju(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Vu(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},tickValue:e.value}}}}(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=ju(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=o&&n.value<=i,x1:l,y1:0,x2:l,y2:ju(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(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 Wu(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=ju(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:i,y1:ju(o,n.minorGuideLine.strokeWidth),x2:i,y2:ju(t.guideLine.minor.size+o,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function _u(e){return e.filter((e=>e.show)).map((e=>Q({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var Uu={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=ju(1,t.line.strokeWidth);return{show:n.line.show,x1:ju(0,t.line.strokeWidth),y1:r,x2:ju(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=Vu(n,this),this.state.minor=Wu(r,this)},render(){return[..._u([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>Q({},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",tickValue:e.tickValue})))),..._u(this.state.major.map((e=>e.guideLine))),..._u(this.state.minor.map((e=>e.guideLine)))];var e}};function Yu(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 Gu(e){return e.qTags.indexOf("$qualified")>-1}function Ku({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const o=r+1,i=e[r],a=e[o];Yu(i,a)?(Gu(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 Xu({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 Ju({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 Zu({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 Qu({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:o,scale:i},{attributesFactory:a=Ju,queryFactory:s=Zu}={attributesFactory:Ju,queryFactory:Zu}){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 ed({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:o},{metaFactory:i=Qu,mapper:a=Ku,resolver:s=Xu}={metaFactory:Qu,mapper:Ku,resolver:Xu}){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 td(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const nd=td(0).getTime();function rd(e){return(e.getTime()-nd)/86400/1e3}var od=new Date,id=new Date;function ad(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 ad((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 od.setTime(+t),id.setTime(+r),e(od),e(id),Math.floor(n(od,id))},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 sd=ad((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));sd.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ad((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):sd:null},sd.range;var ld=1e3,cd=6e4,ud=36e5,dd=864e5,pd=6048e5,md=ad((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*ld)}),(function(e,t){return(t-e)/ld}),(function(e){return e.getUTCSeconds()}));function fd(e){return ad((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())*cd)/pd}))}md.range,ad((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ld)}),(function(e,t){e.setTime(+e+t*cd)}),(function(e,t){return(t-e)/cd}),(function(e){return e.getMinutes()})).range,ad((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ld-e.getMinutes()*cd)}),(function(e,t){e.setTime(+e+t*ud)}),(function(e,t){return(t-e)/ud}),(function(e){return e.getHours()})).range,ad((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())*cd)/dd}),(function(e){return e.getDate()-1})).range;var hd=fd(0),gd=fd(1),vd=fd(2),yd=fd(3),bd=fd(4),xd=fd(5),Sd=fd(6);hd.range,gd.range,vd.range,yd.range,bd.range,xd.range,Sd.range,ad((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 Ed=ad((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()}));Ed.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ad((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},Ed.range;var Md=ad((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*cd)}),(function(e,t){return(t-e)/cd}),(function(e){return e.getUTCMinutes()}));Md.range;var Cd=ad((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*ud)}),(function(e,t){return(t-e)/ud}),(function(e){return e.getUTCHours()}));Cd.range;var wd=ad((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/dd}),(function(e){return e.getUTCDate()-1}));function kd(e){return ad((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)/pd}))}wd.range;var Nd=kd(0),Td=kd(1),Od=kd(2),Rd=kd(3),Ad=kd(4),Ld=kd(5),Id=kd(6);Nd.range,Td.range,Od.range,Rd.range,Ad.range,Ld.range,Id.range;var Pd=ad((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()}));Pd.range;var Dd=ad((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()}));Dd.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ad((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},Dd.range;const qd=1,zd=2,$d=3,Bd=4,Fd=5,Hd=6;function jd({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 Dd.filter((t=>(t.getUTCFullYear()-i.getUTCFullYear())%e==0))}const s=md.count(e,t),l=Md.count(e,t),c=Cd.count(e,t),u=wd.count(e,t),d=Nd.count(e,t),p=Pd.count(e,t),m=Dd.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:Dd.every(1),formatter:r.year.formatter,offset:e=>Dd.offset(e,-1),floor:Dd.floor};if(s<=f)y.type=qd,y.desc="second",y.count=s,y.interval=md.every(1),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-1),y.floor=md.floor;else if(s/2<=f)y.type=qd,y.desc="every other second",y.count=s/2,y.interval=md.every(2),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-2),y.floor=md.floor;else if(s/5<=f)y.type=qd,y.desc="every 5 second",y.count=s/5,y.interval=md.every(5),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-5),y.floor=md.floor;else if(s/15<=f)y.type=qd,y.desc="every 15 second",y.count=s/15,y.interval=md.every(15),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-15),y.floor=md.floor;else if(s/30<=f)y.type=qd,y.desc="every 30 second",y.count=s/30,y.interval=md.every(30),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-30),y.floor=md.floor;else if(l<=h)y.type=zd,y.desc="minute",y.count=l,y.interval=Md.every(1),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-1),y.floor=Md.floor;else if(l/2<=h)y.type=zd,y.desc="every 2 minute",y.count=l/2,y.interval=Md.every(2),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-2),y.floor=Md.floor;else if(l/5<=h)y.type=zd,y.desc="every 5 minute",y.count=l/5,y.interval=Md.every(5),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-5),y.floor=Md.floor;else if(l/10<=h)y.type=zd,y.desc="every 10 minute",y.count=l/10,y.interval=Md.every(10),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-10),y.floor=Md.floor;else if(l/15<=h)y.type=zd,y.desc="every 15 minute",y.count=l/15,y.interval=Md.every(15),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-15),y.floor=Md.floor;else if(l/30<=h)y.type=zd,y.desc="every 30 minute",y.count=l/30,y.interval=Md.every(30),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-30),y.floor=Md.floor;else if(c<=h)y.type=$d,y.desc="hour",y.count=c,y.interval=Cd.every(1),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-1),y.floor=Cd.floor;else if(c/2<=h)y.type=$d,y.desc="every 2 hour",y.count=c/2,y.interval=Cd.every(2),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-2),y.floor=Cd.floor;else if(c/3<=h)y.type=$d,y.desc="every 3 hour",y.count=c/3,y.interval=Cd.every(3),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-3),y.floor=Cd.floor;else if(c/6<=h)y.type=$d,y.desc="every 6 hour",y.count=c/6,y.interval=Cd.every(6),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-6),y.floor=Cd.floor;else if(c/12<=h||o)y.type=$d,y.desc="every 12 hour",y.count=c/12,y.interval=Cd.every(12),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-12),y.floor=Cd.floor;else if(u<=g)y.type=Bd,y.desc="day",y.count=u,y.interval=wd.every(1),y.formatter=r.date.formatter,y.offset=e=>wd.offset(e,-1),y.floor=wd.floor;else if(u/2<=g)y.type=Bd,y.desc="every 2 day",y.count=u/2,y.interval=wd.every(2),y.formatter=r.date.formatter,y.offset=e=>wd.offset(e,-2),y.floor=wd.floor;else if(u/3<=g)y.type=Bd,y.desc="every 3 day",y.count=u/3,y.interval=wd.every(3),y.formatter=r.date.formatter,y.offset=e=>wd.offset(e,-3),y.floor=wd.floor;else if(d<=g)y.type=Bd,y.desc="week",y.count=d,y.interval=Nd.every(1),y.formatter=r.date.formatter,y.offset=e=>Nd.offset(e,-1),y.floor=wd.floor;else if(d/2<=g)y.type=Bd,y.desc="every 2 week",y.count=d/2,y.interval=Nd.every(2),y.formatter=r.date.formatter,y.offset=e=>Nd.offset(e,-2),y.floor=wd.floor;else if(p<=g)y.type=Fd,y.desc="month",y.count=p,y.interval=Pd.every(1),y.formatter=r.date.formatter,y.offset=e=>Pd.offset(e,-1),y.floor=wd.floor;else if(p/3<=g)y.type=Fd,y.desc="quarter",y.count=p/3,y.interval=Pd.every(3),y.formatter=r.date.formatter,y.offset=e=>Pd.offset(e,-3),y.floor=wd.floor;else if(p/6<=g)y.type=Fd,y.desc="half year",y.count=p/6,y.interval=Pd.every(6),y.formatter=r.date.formatter,y.offset=e=>Pd.offset(e,-6),y.floor=wd.floor;else if(m<=v)y.type=Hd,y.desc="year",y.count=m,y.interval=Dd.every(1),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-1),y.floor=Dd.floor;else if(m/2<=v)y.type=Hd,y.desc="every 2 year",y.count=m/2,y.interval=a(2),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-2),y.floor=Dd.floor;else if(m/5<=v)y.type=Hd,y.desc="every 5 year",y.count=m/5,y.interval=a(5),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-5),y.floor=Dd.floor;else if(m/10<=v)y.type=Hd,y.desc="every 10 year",y.count=m/10,y.interval=a(10),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-10),y.floor=Dd.floor;else{const e=Math.floor(m/v);y.type=Hd,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=r.year.formatter,y.offset=t=>Dd.offset(t,-e),y.floor=Dd.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<=$d){const n=t.getFormat("date"),r=e.ticks(wd.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(wd.offset(r[0],-1)),m=(r.length?r:[wd.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 Vd=86400,Wd=1440,_d={};function Ud(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Yd(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 Ft.apply(ji(go,ho,so,io,oo,ro,Ur,Fr,So).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([td(l),td(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)=>jd({timeScale:u,labels:n,distance:e,isDayOrShorter:o,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:td(r.initialMin)}):e=>function(e,t,n,r,o,i=!1){if(_d[[t,n,r,r,i]])return _d[[t,n,r,r,i]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=td(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,p=t/(o-r),m=p/1440,f=p/Vd,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/Vd):v<2?(k=2,w=1/Vd*2):v<5?(k=5,w=1/Vd*5):v<10?(k=10,w=1/Vd*10):v<30?(k=30,w=1/Vd*30):y<1?(N=1,w=1/Wd):y<2?(N=2,w=1/Wd*2):y<5?(N=5,w=1/Wd*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?Ud("year",[l+E*A,0,1],[l+M*A,0,1],a.year.formatter):R?Ud("month",[l,c+E*R,1],[l,c+M*R,1],a.date.formatter):O?Ud("day",[l,c,u+E*O],[l,c,u+M*O],a.date.formatter):T?Ud("hour",[l,c,u,0+E*T],[l,c,u,0+M*T],a.minute.formatter):N?Ud("minute",[l,c,u,0,0+E*N],[l,c,u,0,0+M*N],a.minute.formatter):Ud("second",[l,c,u,0,0,0+E*k],[l,c,u,0,0,0+M*k],a.second.formatter),C=rd(S.start),L.inner.push(S);const e=Math.floor(C);if(!(i||A||R||O)){const t={type:"day",start:td(e),end:td(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,_d[[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?rd(t.start):"end"===o?rd(t.end):(rd(t.start)+rd(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:rd(t.start),end:rd(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return m}const Gd=/t+/i;const Kd={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 Xd(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 Jd="continuousPan";var Zd={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Fu,viewCache:o,viewState:i,definitionPath:a},s={}){const{engineFetcherFactory:l=Ou,snapshotFetcherFactory:c=Au,cacheFetcherFactory:u=Ru,cache:d={initial:{},merged:{}}}=s,p=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),m=c({layoutService:t,viewCache:o}),f=u({cache:d}),h=e=>{throw e.isHandled=!0,e};let g,v,y;return{update(e){var n,r;({initialMin:v,initialMax:y}=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])),o.set("continuousMin",v),o.set("continuousMax",y),o.set("minimiumZoomSpan",(n=v,r=y,Math.max(1e-6,2.3841857910156157e-7*(r-n)))),g=t.meta.isSnapshot?m:p,t.meta.isSnapshot&&({zoom:{min:v,max:y}}=m.getSnapshotData()),i.preventSet("zoom",{min:v,max:y})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return g.fetch(v,y).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=Pu(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Du(v,y,e))).then((e=>this.updateLayout(e))).catch(h)},fetch:(e,t)=>g.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=Pu(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}(d.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Du(e,t,n))).catch(h),fetchFromCache:(e,t)=>f.fetch(e,t).then((n=>Du(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return Q({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return Q({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Bu(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.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=w(((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 k(((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?zu:qu)*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:Jd,pointers:1,threshold:10,enable(r,o){return this.started===Jd||!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=Jd;const{min:o,max:i}=r.get("zoom");this[Jd]={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[Jd],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:Hu,timeAxis:Uu},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]=Q(!0,{},t[o],i)})),r}(t,Kd,n),{qAxis:o}=r,i=qr(),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=>(Xd(a,p),a.instance(e)),p.normInvert=e=>(Xd(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&&Gd.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=td(t[0].data.start),o=td(t[n-1].data.start);return wd.count(r,o)/n>=1?i.date:Cd.count(r,o)/n>0?i.minute:Md.count(r,o)/n>0?i.second:i.date},t}(r);return u=Yd(i.copy(),r,m),c=ed({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 Qd=e=>e.meta.seriesComponentKeys[0];function ep({chart:e,models:t,actions:n,viewState:r,viewCache:o,environment:i}){const{event:{onZoom:a}}=Zd,{layoutService:s,seriesModel:l}=t,c=Qd(l),u=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:o},{rtl:"rtl"===i.options.direction,threshold:50,targetKey:c}):()=>{};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===Qa.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===c));e&&(u(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const tp="continuousPinchZoom";function np({chart:e,models:t,environment:n,viewState:r,viewCache:o,actions:i,selectables:a}){const s=Zd.interactions.areaPan,{layoutService:l,dockService:c,discreteModel:u,colorService:d,tooltipService:p}=t,m="rtl"===n.options.direction,f=p.getInteractions(),h=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return{gestures:[...Hs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})],native:js({componentKey:e,chart:t,actions:n,layoutService:i})}}({componentKey:"scrollbar",chart:e,actions:i,viewState:r,viewCache:o,discrete:u,layoutService:l,dockService:c,rtl:m}),g={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...h.gestures,...f.gestures]},v=[ep({chart:e,models:t,actions:i,viewState:r,viewCache:o,environment:n}),h.native,f.native];return l.meta.isDiscrete&&(g.gestures.push(...u.interactions.gestures),v.push(u.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:Qd(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=Zd.event.onZoom({viewCache:o,viewState:r,chart:t},{threshold:100,rtl:i,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:tp,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:{[tp+"start"](e){a.last=e.scale,e.preventDefault()},[tp+"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:Qd(t.seriesModel),chart:e,actions:i,viewState:r,viewCache:o,rtl:m})),[g,...v]}const rp="lasso",op=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},o)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:rp,enable(e,n){if(this.started===rp||!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!==rp&&(o.actions.select.emit("start",rp),this.chart.component(e).emit("lassoStart",t),this.started=rp)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),o.actions.select.emit("end",rp),"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});const ip=({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),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:i.largeDataService,chart:this.chart})}}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 ap=({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 sp=({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),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},[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"==typeof i.updateOnEnd&&i.updateOnEnd()}}});function lp(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=sp(e,t,"range");return{interactions:[e.onEdited?ap(e,t):null,r].filter(Boolean),components:[n]}}const cp=/axis|legend/;function up({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:[ip(e,t)],components:[]}}({targets:[`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,...n.query.series(es.MARKER).map((e=>$l(Qa.COMPONENT.MARKER,e))),...n.query.series(es.LINE).map((e=>$l(Qa.COMPONENT.POINT,e))),Qa.COMPONENT.AXIS.MAJOR,Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Qa.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===[Qa.COMPONENT.AXIS.MAJOR,Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Qa.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=>cp.test(e.type))))(e)?0:3,debouncer:w,flags:i})}function dp({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,Qa.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:[sp(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[Qa.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const pp={components:[],interactions:[]};function mp({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"))&&lp({eventName:"minorRange",key:"minor-range-brush",targets:[Qa.COMPONENT.AXIS.MINOR.PRIMARY,`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,...o.query.series(es.MARKER).filter((e=>e.isPrimary)).map((e=>$l(Qa.COMPONENT.MARKER,e))),...o.query.series(es.LINE).filter((e=>e.isPrimary)).map((e=>$l(Qa.COMPONENT.POINT,e)))],fillTargets:[Qa.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:Qa.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||pp,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"))&&lp({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[Qa.COMPONENT.AXIS.MINOR.SECONDARY,`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,...o.query.series(es.MARKER).filter((e=>!e.isPrimary)).map((e=>$l(Qa.COMPONENT.MARKER,e))),...o.query.series(es.LINE).filter((e=>!e.isPrimary)).map((e=>$l(Qa.COMPONENT.POINT,e)))],fillTargets:[Qa.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:Qa.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||pp,a=dp({actions:e,models:n})||pp,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?[Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return lp({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,...i.query.series(es.MARKER).map((e=>$l(Qa.COMPONENT.MARKER,e))),...i.query.series(es.LINE).map((e=>$l(Qa.COMPONENT.POINT,e))),...l],fillTargets:l,dock:o.meta.major.dock,scale:s?Qa.SCALE.MAJOR_INNER:Qa.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const o=s?r.formatter():t.formatter(Qa.FORMATTER.PRIMARY),i=t.scale(Qa.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===i;return`${e!==Math.max(...n)||a?"":"<"}${o(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||pp,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=Qa.SCALE.COLOR+"Range",{type:l,key:c}=o,u=i[s];return!("legend-seq"!==l||!u||u.min>=u.max)&&lp({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})||pp;return{components:[...o.components,...i.components,...a.components,...s.components,...l.components],interactions:[...o.interactions,...i.interactions,...a.interactions,...s.interactions,...l.interactions]}}function fp({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:[op(n,t)],components:[r]}}({key:"lasso",componentTargetKey:o[0],components:o.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function hp({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:ie.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=mu({environment:n,models:t});return"center"===(null==d||null===(a=d.layout)||void 0===a?void 0:a.dock)?[d]:[...Qc({models:t}),...wl({models:t}),...Uc({chart:e,models:t,environment:n,viewState:r,viewCache:o}),gu({models:t,environment:n}),...Al({models:t,environment:n}),...ru({models:t,environment:n,actions:i}),Ui({viewState:r,viewCache:o,layoutService:l,dockService:c}),...cu({models:t}),...uu({chart:e,models:t,environment:n}),ou({models:t,environment:n,viewState:r,viewCache:o}),...s.custom.legendComponents(),fu(t),...lu({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=up({actions:e,models:n});if(i)return{components:[...a.components],gestures:[...a.interactions]};const s=mp({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=fp({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:ul({models:n}),scales:El({picasso:e,models:n,viewState:o,viewCache:i,environment:r}),components:h,formatters:vu({models:n}),interactions:np({chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a,selectables:f}),strategy:p,palettes:l.getPalettes()}}const gp=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:Qa.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),vp=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:Qa.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],yp=[Qa.COMPONENT.AXIS_TITLE.MAJOR,Qa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,Qa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,Qa.COMPONENT.GRID_LINE,Qa.COMPONENT.ZERO_LINE],bp={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function xp(e){return bp[e]||e}function Sp(e){return function(t,n,r){let o,i,a,s,l=[],c=!0;function u(){"function"==typeof o.enable&&(o.enable=o.enable.bind(i)()),o.enable&&(o.gestures.forEach((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));const n=xp(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(i),a.on(e,t.events[e])})),l.push(t))})),o.gestures.forEach((t=>{const n=xp(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,o=e,i={chart:t,mediator:n,settings:o},o.gestures=o.gestures||[],void 0===o.enable&&(o.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,i=null,o=null}}}}function Ep(){return(Ep=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 Mp={exports:{}};function Cp(){}function wp(){}wp.resetWarningCache=Cp;Mp.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:wp,resetWarningCache:Cp};return n.PropTypes=n,n}();var kp={black:"#000",white:"#fff"},Np="#e57373",Tp="#f44336",Op="#d32f2f",Rp="#ff4081",Ap="#f50057",Lp="#c51162",Ip="#7986cb",Pp="#3f51b5",Dp="#303f9f",qp={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 zp(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 $p(e){if(e.type)return e;if("#"===e.charAt(0))return $p(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 Bp(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 Fp(e){var t="hsl"===(e=$p(e)).type?$p(function(e){var t=(e=$p(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])),Bp({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 Hp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return Fp(e)>.5?Vp(e,t):Wp(e,t)}function jp(e,t){return e=$p(e),t=zp(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,Bp(e)}function Vp(e,t){if(e=$p(e),t=zp(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 Bp(e)}function Wp(e,t){if(e=$p(e),t=zp(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 Bp(e)}function _p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Up(){return(Up=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 Yp(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}function Gp(e,t){if(null==e)return{};var n,r,o=Yp(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 Kp(e){return(Kp="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 Xp(e){return(Xp="function"==typeof Symbol&&"symbol"===Kp(Symbol.iterator)?function(e){return Kp(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Kp(e)})(e)}function Jp(e){return e&&"object"===Xp(e)&&!Array.isArray(e)}function Zp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Up({},e):e;return Jp(e)&&Jp(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Jp(t[o])&&o in e?r[o]=Zp(e[o],t[o],n):r[o]=t[o])})),r}(Mp.exports.element,function(){return null}).isRequired=(Mp.exports.element.isRequired,function(){return null});var Qp={exports:{}},em={};
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,W;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.setValue,C=e.cache,w=e.debouncer,k=e.throttler,N=e.colorService,T=e.tooltipService,O=e.layoutService,R=e.dockService,A=e.themeService,L=e.pluginService,I=e.storage,P=e.selectionService,D=e.fontResolver},function(e){q=e.default},function(e){z=e.default},function(e){$=e.default},function(e){B=e.default,F=e.Children,H=e.isValidElement,j=e.cloneElement},function(e){V=e.default},function(e){W=e.default}],execute:function(){e("default",(function(e){var b,M;const{flags:w}=e,N=null===(b=e.anything)||void 0===b||null===(M=b.sense)||void 0===M?void 0:M.isUnsupportedFeature,T=(()=>{const e=z();return e.use($),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Sp(e))};return void e.interaction("hammer",Sp(Hammer))}(q)),e.use(_w),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",V.render(function(e,t){return B.createElement(Hg,{generateClassName:t},B.createElement(hv,{theme:jw},e))}(e,Vw),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&V.unmountComponentAtNode(r),i),destroy(){r&&r.parentElement&&(V.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(o=e(t)),o)};return i}}()),e.component("data-title",function(e){function t({title:e,selected:t,onClick:n}){const r=Se.detectTextDirection(e);return B.createElement(BS,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},B.createElement(jS,{style:{minWidth:32}},B.createElement(Nw,{d:t?Rw:""})),B.createElement(_S,{primaryTypographyProps:{dir:r}},e))}function n({alignTo:e,changeTo:n,current:r,dir:o,dock:i,list:a,onClose:s,show:l,instruction:c}){const u=a.map((e=>B.createElement(t,{key:e.id,title:e.title,onClick:()=>n(e.id)})));return B.createElement(ZS,Ep({anchorEl:e,open:l,onClose:s},Fw[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),B.createElement(qS,{dense:!0,dir:o,"aria-label":c,component:"nav"},B.createElement(t,{title:r,selected:!0,onClick:s}),u))}t.propTypes={title:Mp.exports.string.isRequired,selected:Mp.exports.bool,onClick:Mp.exports.func.isRequired},t.defaultProps={selected:!1},n.propTypes={alignTo:Mp.exports.any,changeTo:Mp.exports.func.isRequired,current:Mp.exports.string.isRequired,dir:Mp.exports.string.isRequired,dock:Mp.exports.string.isRequired,list:Mp.exports.array,onClose:Mp.exports.func.isRequired,show:Mp.exports.bool.isRequired,instruction:Mp.exports.string.isRequired},n.defaultProps={list:[],alignTo:null};class r extends B.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasValidAlternatives:!1},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))}componentDidUpdate(e,t){const{popover:n,supportConditional:r}=this.props;n&&r&&n.getAlternatives().then((e=>{t.hasValidAlternatives!==(0!==e.length)&&this.setState({hasValidAlternatives:0!==e.length})}))}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.id,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:t,translator:r,disabled:o,isDimension:i,padding:a,minWidth:s,hasAlternative:l,supportConditional:c}=this.props,u={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,p=o||this.state.inSelection,m=e.breadcrumbs.map(((t,n)=>B.createElement(Hw,{style:{display:"flex",alignItems:"center",color:p&&"rgba(89, 89, 89, 0.8)",pointerEvents:p?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>p?void 0:e.drillUp(d-n),title:t},B.createElement("span",{style:u},t),B.createElement(Nw,Ep({},Lw,{size:"small",style:{margin:"0 8px"}}))))),f=c?this.state.hasValidAlternatives:l,h=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||o||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!i&&g&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(v.background="rgba(0,0,0,0.08)");const y=e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},b=e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"};a&&(v.padding=a),s&&(v.minWidth=s);const x=Se.detectTextDirection(e.text),S=B.createElement(Hw,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:v,onClick:g?void 0:h,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:y,onBlur:g?void 0:b,onMouseDown:e=>{e.preventDefault()}},e.locked&&B.createElement(Nw,Ep({},Ow,{size:"small",title:r.get("Tooltip.selections.locked")})),B.createElement("span",{style:u,dir:x},e.text),t&&f&&B.createElement(Nw,Ep({},Aw,{size:"small",style:{margin:"0 8px"}})));return B.createElement(B.Fragment,null,e.drilldown&&B.createElement(Nw,Ep({},Tw,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,B.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:f?"auto":"none",height:"100%"}},S),t&&f&&B.createElement(n,{dock:t.dock,dir:t.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 o(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 i(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function a(e){return!e.isDimension&&ce(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}function s(e){return e.isDimension&&ce(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0}return r.propTypes={disabled:Mp.exports.bool.isRequired,padding:Mp.exports.string,minWidth:Mp.exports.string,titleData:Mp.exports.shape({breadcrumbs:Mp.exports.arrayOf(Mp.exports.string).isRequired,drilldown:Mp.exports.bool.isRequired,index:Mp.exports.number.isRequired,locked:Mp.exports.bool.isRequired,text:Mp.exports.string.isRequired,popoverText:Mp.exports.string.isRequired,drillUp:Mp.exports.func,id:Mp.exports.string.isRequired}).isRequired,popover:Mp.exports.shape({dir:Mp.exports.string.isRequired,dock:Mp.exports.string.isRequired,changeTo:Mp.exports.func.isRequired,getAlternatives:Mp.exports.func.isRequired}),translator:Mp.exports.shape({get:Mp.exports.func.isRequired}).isRequired,selections:Mp.exports.shape({isActive:Mp.exports.func,addListener:Mp.exports.func,removeListener:Mp.exports.func}),style:Mp.exports.shape({fontSize:Mp.exports.string,color:Mp.exports.string,fontFamily:Mp.exports.string}).isRequired,isDimension:Mp.exports.bool.isRequired,hasAlternative:Mp.exports.bool.isRequired,supportConditional:Mp.exports.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:t}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||a(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:l,hyperCubeDef:c,isDimension:u,minWidth:d,model:p,onChangeToAlternative:m,padding:f,rtl:h,selections:g,skipAttributeExpressions:v,translator:y,supportConditional:b=!1},layout:{dock:x}}=this.settings,S="top"!==x&&"bottom"!==x||!h?"ltr":"rtl",E=o(x,this.rect),M=c&&c.qLayoutExclude&&c.qLayoutExclude.qHyperCubeDef,C=M&&M[u?"qDimensions":"qMeasures"]||[],w=n||l[u?"qDimensionInfo":"qMeasureInfo"],k=u?qw:$w,N=u?zw:Bw,T=p&&p.colorSupport&&p.modifiers&&k({altList:C,app:e,dir:h?"rtl":"ltr",dock:i(x),model:p,onChange:m,skipAttributeExpressions:v,translator:y}),O=s(this.settings.settings)||a(this.settings.settings),R=w.map(((e,n)=>{const o="number"==typeof e.explicitColumn?e.explicitColumn:n,i=N(e,o,p),a=n===w.length-1;return B.createElement(B.Fragment,{key:e.cId},B.createElement(r,{popover:T,titleData:i,model:p,translator:y,selections:g,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:d,hasAlternative:O,supportConditional:b}),!a&&B.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return B.createElement("div",{style:E,dir:S},R)}}}(e.renderer("svg")())),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:Mp.exports.string.isRequired,spanStyle:Mp.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",ll),e.component("point-label",rN),e.component("label-space",oN),e.component("time-axis",Zd.picassoComponents.timeAxis),e.component("axis-overlay",Zd.picassoComponents.axisOverlay),e.component("reference-line-labels",ja),e.component("box-sliced-hat",tk),e.component("box-out-of-bounds",Xw),e.component("data-out-of-bounds-marker",iN),e.component("scroll-hint",_i),e.component("brush-highlighter",gN),e.scale("time",Zd.picassoScales.time),e.symbol("line-point",aN),e})();return{qae:cA(e),ext:PA(e),component(){const e=function(){const[e,t]=n();return r((()=>t(C())),[]),e}(),b=function(){const[e,t]=n();return r((()=>{t(I({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),M=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:QR,hidden:!a||!p||f,active:l,action:h})),[p,f,l,a,d.language()]),{action:h,enabled:()=>a,active:()=>l}}();let d=eA;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||eA}},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:T,environment:M}),q=rA({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,M]=n(),[w,N]=n(),T=s(),I=l(),P=c(),D=u(),q=d();r((()=>{if(!(y&&null!=t&&t.update&&p&&f))return;const n=O({source:y,metaAdditionsFn:XO()}),{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(he).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:JO({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:T,layoutService:n}),d=R({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=(({layoutService:e})=>{const t=!KO(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[es.BAR]:0,[es.LINE]:0,[es.MARKER]:0};return({series:r=ns},o)=>{const i=SN(r,t),a=hu(r);return{id:o,type:a,typeIndex:n[a]++,ref:"qMeasureInfo/"+o,refIndex:o,isPrimary:i,scale:i?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY,collection:i?Qa.COLLECTION.PRIMARY:Qa.COLLECTION.SECONDARY,options:xN({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>hu(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,es.BAR),l=r(o,es.BAR),c=r(i,es.BAR),u=e=>n.filter((t=>hu(t)===e)),d=u(es.LINE).map((e=>$l(Qa.COMPONENT.POINT,e))),p=u(es.MARKER).map((e=>({key:$l(Qa.COMPONENT.MARKER,e),type:e.options.marker}))),m=p.map((e=>e.key)),f=[];l>0&&f.push(`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`);c>0&&f.push(`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`);const h=[...f,...d,...m],{MINI_CHART:g}=Qa.COMPONENT,v=u(es.LINE).map((e=>$l(g.LINE,e))),y=u(es.MARKER).map((e=>$l(g.MARKER,e))),b=e.meta.isContinuous?[`${g.BAR}-${ts.PRIMARY}`,`${g.BAR}-${ts.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:SN}}})({layoutService:n,flags:m}),w=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:o,viewState:i,rtl:a,actions:s,picasso:l}){const c=Qd(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=C(),v=function({qMode:e}){switch(e){case"S":default:return NR;case"K":return TR;case"T":return OR}}({qMode:o.getHyperCubeValue("qMode")}),y=function({state:e,contains:t}){return e.set(RR,[]),{add:t=>{const n=e.get(RR);n.length=0,n.push(t)},getCurrent:()=>e.get(RR)[0],getAll:()=>e.get(RR),contains:n=>t(e.get(RR)[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=zR,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:DR({layoutService:r}),request:c({layoutService:r,definitionPath:i}),process:qR(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=k(((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==xR)throw e}))}),50);return function(e,{onProcessing:t=SR,onDataPage:n=SR}={}){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 $R;if(!n)return BR;return r?VR:UR}({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:YR({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(ER/(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}),M=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:PR({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=>M(e)}}}({chart:e,actions:s,componentKey:c,enigmaModel:t,layoutService:n,dockService:r,viewState:i,rtl:a,itemWidths:GR,options:{axisKey:Qa.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:T,layoutService:n,dockService:d,seriesModel:S,viewState:f,rtl:"rtl"===p.options.direction,actions:g,picasso:e}):void 0,N=n.meta.isContinuous?ZR({model:T,layoutService:n,viewState:f,viewCache:h}):void 0,z=bR({actions:g,appLayoutModel:P,appModel:I,chart:t,environment:p,flags:m,genericObjectModel:T,layoutService:n,picasso:e,seriesModel:S,viewState:f}),$=A({theme:p.theme,config:{id:"comboChart",resolve:[["object","label.value","numFontSize","12px",e=>parseInt(e,10)]]}}),B=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:S}),F=tR({isPrimary:!0,layoutService:n,reducedModel:u,seriesModel:S,continuousModel:N,flags:m}),H=tR({isPrimary:!1,layoutService:n,reducedModel:u,seriesModel:S,continuousModel:N,flags:m}),j=gR({config:{measureAxesRef:"measureAxes.0",formatter:Qa.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:F,dockService:d,seriesModel:S,themeService:$}),V=gR({config:{measureAxesRef:"measureAxes.1",formatter:Qa.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:H,dockService:d,seriesModel:S,themeService:$}),W=function({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){if(me.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:T,layoutService:n}),_=Es({flags:m,layout:y,app:I,model:T,picasso:e,chart:t,translator:o,localeInfo:P.qLocaleInfo,embed:q,options:r}),U=JR({chart:t,actions:g,translator:o,rtl:s,dockService:d,seriesModel:S,colorService:z,themeService:$,propertiesModel:W,custom:_}),Y=function({layoutService:e,dockService:t,themeService:n,flags:r}){const{BAR:o,LINE:i,POINT:a}=Gl,s=n.getStyles(),l=KR({layoutService:e,key:"bar"}),c=KR({layoutService:e,key:"line"}),u=()=>l({property:"width",defaultValue:.7}),d=()=>{const e=l({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},p=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0;return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>u(),getHasStrokeWidth:()=>!!d(),getStrokeWidth:()=>d(),getStrokeColor:()=>l({property:"strokeColor",defaultValue:{index:-1,color:o.STROKE.COLOR}}).color,label:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f,h,g,v;return{fill:null!==(e=null===(t=p("bar"))||void 0===t||null===(n=t.bar)||void 0===n||null===(r=n.label)||void 0===r||null===(o=r.value)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=p("bar"))||void 0===l||null===(c=l.bar)||void 0===c||null===(u=c.label)||void 0===u||null===(d=u.value)||void 0===d?void 0:d.fontSize)&&void 0!==a?a:s.label.value.numFontSize,fontFamily:null!==(m=null===(f=p("bar"))||void 0===f||null===(h=f.bar)||void 0===h||null===(g=h.label)||void 0===g||null===(v=g.value)||void 0===v?void 0:v.fontFamily)&&void 0!==m?m:s.label.value.fontFamily}}}},line:{getCurveFn:()=>(e,t)=>c({property:"lineCurve",defaultValue:i.CURVE.LINEAR,index:t}),getStrokeWidthFn:()=>(e,n)=>c({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?i.WIDTH.FULL.DEFAULT:i.WIDTH.LESS.DEFAULT,index:n}),getStrokeDasharrayFn:()=>(e,t)=>{const n=c({property:"lineType",defaultValue:i.TYPE.SOLID,index:t});return n&&i.TYPE[n.toUpperCase()]}},point:{getSize:e=>c({property:"dataPointSize",defaultValue:a.SIZE.DEFAULT,index:e}),label:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f,h,g,v;return{fill:null!==(e=null===(t=p("line"))||void 0===t||null===(n=t.line)||void 0===n||null===(r=n.label)||void 0===r||null===(o=r.value)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=p("line"))||void 0===l||null===(c=l.line)||void 0===c||null===(u=c.label)||void 0===u||null===(d=u.value)||void 0===d?void 0:d.fontSize)&&void 0!==a?a:s.label.value.fontSize,fontFamily:null!==(m=null===(f=p("line"))||void 0===f||null===(h=f.line)||void 0===h||null===(g=h.label)||void 0===g||null===(v=g.value)||void 0===v?void 0:v.fontFamily)&&void 0!==m?m:s.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f;return{fontFamily:null!==(e=null===(t=p("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.title)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.axis.title.fontFamily,fontSize:null!==(o=null===(i=p("axis"))||void 0===i||null===(a=i.axis)||void 0===a||null===(l=a.title)||void 0===l?void 0:l.fontSize)&&void 0!==o?o:s.axis.title.fontSize,color:null!==(c=null===(u=p("axis"))||void 0===u||null===(d=u.axis)||void 0===d||null===(m=d.title)||void 0===m||null===(f=m.color)||void 0===f?void 0:f.color)&&void 0!==c?c:s.axis.title.color}}},label:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f,h,g,v;return{fill:null!==(e=null===(t=p("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.label)||void 0===r||null===(o=r.name)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.color)&&void 0!==e?e:s.axis.label.name.color,fontSize:null!==(a=null===(l=p("axis"))||void 0===l||null===(c=l.axis)||void 0===c||null===(u=c.label)||void 0===u||null===(d=u.name)||void 0===d?void 0:d.fontSize)&&void 0!==a?a:s.axis.label.name.fontSize,fontFamily:null!==(m=null===(f=p("axis"))||void 0===f||null===(h=f.axis)||void 0===h||null===(g=h.label)||void 0===g||null===(v=g.name)||void 0===v?void 0:v.fontFamily)&&void 0!==m?m:s.axis.label.name.fontFamily}}}}}}}({layoutService:n,dockService:d,themeService:$,flags:m}),G=function({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:o}=e.meta,i=e.getLayout(),a="K"===i.qHyperCube.qMode,s=me.dimensionless(i),l=Ma.getMeasureRefLines(i),c=Ma.getDimensionRefLines(i,s),u=Ma.getMeasureRefLineLabels(i),d=Ma.getDimensionRefLineLabels(i,s);let p={},m={};const f=t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:o}=n;return Ma.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 Ma.isOutOfDataPages({label:n,dataPages:o})}return!0},g=()=>!(!c||!c.length)&&!c.every((t=>{const n=Ma.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=>Ma.getRefLines(i,e),getRefLineLabels:e=>Ma.getRefLineLabels(i,e)},update:()=>{m=v.dimensionRefLineInfo,g()&&(p=Ma.getDimensionValuesInfo({layout:i,canBeContinuous:r,discreteModel:t,layoutService:e}),v.dimensionValuesInfo=p,c.forEach((t=>{const n=Ma.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:w}),K=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:Qa.SCALE.MAJOR,MAJOR_INNER:Qa.SCALE.MAJOR_INNER,MINOR:{PRIMARY:Qa.SCALE.MINOR.PRIMARY,SECONDARY:Qa.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,BAR_SECONDARY:`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,AXIS:{MAJOR:Qa.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:Qa.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:Qa.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:Qa.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:Qa.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:Qa.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:Qa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:Qa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:Qa.COLLECTION.MAIN}}}}(n),X=L({picassoInstance:e,plugins:D,pluginArgs:K});M({selectionService:v,genericObjectModel:T,appModel:I,dockService:d,styleModel:Y,layoutService:n,fieldModel:B,seriesModel:S,reducedModel:u,primaryExtremumModel:F,secondaryExtremumModel:H,primaryTickModel:j,secondaryTickModel:V,propertiesModel:W,colorService:z,themeService:$,appLayoutModel:P,tooltipService:U,flags:m,...w&&{discreteModel:w},...N&&{continuousModel:N},refLineModel:G,pluginService:X})}),[y,T,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&&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(),T?i.command.initialize():Promise.resolve(),u,c(),g.scroll.attachDiscreteModel(s)]))().then((()=>d()))}),[S]);if(z)throw z;return w})({picasso:T,chart:D,environment:M,flags:w,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})=>{const{event:{onZoomIntercept:i,onZoomChange:a}}=Zd;r((()=>{if(!t||!n||!o)return;const{layoutService:r,continuousModel:s,refLineModel:l,seriesModel:c}=t,{miniComponentKeys:u}=c.meta,d=()=>{l&&l.update(),e.update({partialData:!0,excludeFromUpdate:[...yp,...u]})};n.onChanged("scrollOffset",d),r.meta.isContinuous&&(n.onChanged("zoom",a({layoutService:r,continuousDataModel:s},d)),n.intercept("zoom",i({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:hp({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s}),data:i&&[gp({models:n}),...vp({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:T,chart:D,models:z,environment:M,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:hp({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:T,chart:D,models:z,environment:M,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:fe(t,Qa.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:fe(t,Qa.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])})({models:z,chart:D,viewState:b})}}}));var _=Object.prototype.hasOwnProperty,U=Object.prototype.toString,Y=Object.defineProperty,G=Object.getOwnPropertyDescriptor,K=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===U.call(e)},X=function(e){if(!e||"[object Object]"!==U.call(e))return!1;var t,n=_.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&_.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||_.call(e,t)},J=function(e,t){Y&&"__proto__"===t.name?Y(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Z=function(e,t){if("__proto__"===t){if(!_.call(e,t))return;if(G)return G(e,t).value}return e[t]},Q=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=Z(s,n),s!==(o=Z(t,n))&&(u&&o&&(X(o)||(i=K(o)))?(i?(i=!1,a=r&&K(r)?r:[]):a=r&&X(r)?r:{},J(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&J(s,{name:n,newValue:o}));return s};const ee="center",te="bottom";var ne={NoDataExist:{label:"NoDataExist",alignment:ee,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:ee,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:ee,default:!1},LimitedData:{label:"LimitedData",alignment:te,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:te,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:te,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:te,default:!1}};const re=[["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}]],oe={};re.forEach((([e,{width:t,height:n}])=>{oe[e]={width:t,height:n}}));const ie={getLayoutModes:()=>oe,getLayoutMode(e,t){let n;for(n=0;n<re.length;++n)if(e>=re[n][1].width&&t>=re[n][1].height)return re[n][0];return"SPARK"}};const ae=["$date","$timestamp","$time"],se=["D","TS","T"],le={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>ae.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&se.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(le.hasTimeTag(t)&&le.hasUnknownFormat(t)||le.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&le.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){var t,n,r;const o=null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(r=null==o?void 0:o.length)&&void 0!==r?r:0)<1)&&le.canBeContinuousDimension(o[0])},maxNumberOfLines:12},ce=(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},ue=e=>ce(e,"qHyperCube.qDimensionInfo",[]),de=e=>ce(e,"qHyperCube.qMeasureInfo",[]),pe=e=>ce(e,"barGrouping.grouping"),me={continuous:(e,t=!1)=>!!le.canBeContinuous(e)&&(ce(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!ue(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===pe(e)&&(ue(e).length>1||de(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&ue(e).length>1&&1===de(e).length},groupedByMeasure(e){return this.grouped(e)&&1===ue(e).length&&de(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==pe(e)||this.continuous(e))&&(ue(e).length>1||de(e).length>1)},stackedByDimension(e){return this.stacked(e)&&ue(e).length>1&&1===de(e).length},stackedByMeasure(e){return this.stacked(e)&&1===ue(e).length&&de(e).length>1},simple:e=>0===ue(e).length||1===ue(e).length&&1===de(e).length,snapshot:e=>!!ce(e,"snapshotData")};function fe(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const he=e=>{throw e.isHandled=!0,e};const ge={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?ge.getVerticalDock(t):n?ge.getOppositeDock(ge.getHorizontalDock(t)):ge.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},ve={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=ve.getCharacterRatios(e[n]),r.latin+=o.latin,r.cjk+=o.cjk})):e.forEach((e=>{o=ve.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=ve.getTotalCharacterRatios(t,n,r),i=o.latinRatio*e,a=o.cjkRatio*e;return Math.ceil(ve.stringWidthOverMWidth(i)+1.0909090909090908*a)}},ye=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),be=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),xe=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Se={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ye.test(e),isRtlChar:e=>be.test(e)||xe.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Se.isLtrChar(r))return"ltr";if(Se.isRtlChar(r))return"rtl"}return"ltr"}},Ee={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?Ee.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=Se.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=Se.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:Se.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=Se.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=Se.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Ee.getColorSymbol(e,t)]:[Ee.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=Se.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Se.detectTextDirection(e.value);let l;return l=o?r?[e.value,Ee.getColorSymbol(t,n)]:[Ee.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 Me(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ce(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function we(){}var ke=.7,Ne=1/ke,Te="\\s*([+-]?\\d+)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ae=/^#([0-9a-f]{3,8})$/,Le=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),Ie=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),Pe=new RegExp(`^rgba\\(${Te},${Te},${Te},${Oe}\\)$`),De=new RegExp(`^rgba\\(${Re},${Re},${Re},${Oe}\\)$`),qe=new RegExp(`^hsl\\(${Oe},${Re},${Re}\\)$`),ze=new RegExp(`^hsla\\(${Oe},${Re},${Re},${Oe}\\)$`),$e={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 Fe(){return this.rgb().formatRgb()}function He(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ae.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?je(t):3===n?new Ue(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ve(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ve(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=Le.exec(e))?new Ue(t[1],t[2],t[3],1):(t=Ie.exec(e))?new Ue(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Pe.exec(e))?Ve(t[1],t[2],t[3],t[4]):(t=De.exec(e))?Ve(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=qe.exec(e))?Ze(t[1],t[2]/100,t[3]/100,1):(t=ze.exec(e))?Ze(t[1],t[2]/100,t[3]/100,t[4]):$e.hasOwnProperty(e)?je($e[e]):"transparent"===e?new Ue(NaN,NaN,NaN,0):null}function je(e){return new Ue(e>>16&255,e>>8&255,255&e,1)}function Ve(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ue(e,t,n,r)}function We(e){return e instanceof we||(e=He(e)),e?new Ue((e=e.rgb()).r,e.g,e.b,e.opacity):new Ue}function _e(e,t,n,r){return 1===arguments.length?We(e):new Ue(e,t,n,null==r?1:r)}function Ue(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ye(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}`}function Ge(){const e=Ke(this.opacity);return`${1===e?"rgb(":"rgba("}${Xe(this.r)}, ${Xe(this.g)}, ${Xe(this.b)}${1===e?")":`, ${e})`}`}function Ke(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Je(e){return((e=Xe(e))<16?"0":"")+e.toString(16)}function Ze(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new et(e,t,n,r)}function Qe(e){if(e instanceof et)return new et(e.h,e.s,e.l,e.opacity);if(e instanceof we||(e=He(e)),!e)return new et;if(e instanceof et)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 et(a,s,l,e.opacity)}function et(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function tt(e){return(e=(e||0)%360)<0?e+360:e}function nt(e){return Math.max(0,Math.min(1,e||0))}function rt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Me(we,He,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Be,formatHex:Be,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Qe(this).formatHsl()},formatRgb:Fe,toString:Fe}),Me(Ue,_e,Ce(we,{brighter(e){return e=null==e?Ne:Math.pow(Ne,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ue(Xe(this.r),Xe(this.g),Xe(this.b),Ke(this.opacity))},displayable(){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:Ye,formatHex:Ye,formatHex8:function(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}${Je(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ge,toString:Ge})),Me(et,(function(e,t,n,r){return 1===arguments.length?Qe(e):new et(e,t,n,null==r?1:r)}),Ce(we,{brighter(e){return e=null==e?Ne:Math.pow(Ne,e),new et(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new et(this.h,this.s,this.l*e,this.opacity)},rgb(){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 Ue(rt(e>=240?e-240:e+120,o,r),rt(e,o,r),rt(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new et(tt(this.h),nt(this.s),nt(this.l),Ke(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ke(this.opacity);return`${1===e?"hsl(":"hsla("}${tt(this.h)}, ${100*nt(this.s)}%, ${100*nt(this.l)}%${1===e?")":`, ${e})`}`}}));const ot=Math.PI/180,it=180/Math.PI,at=.96422,st=.82521,lt=4/29,ct=6/29,ut=3*ct*ct;function dt(e){if(e instanceof pt)return new pt(e.l,e.a,e.b,e.opacity);if(e instanceof bt)return xt(e);e instanceof Ue||(e=We(e));var t,n,r=gt(e.r),o=gt(e.g),i=gt(e.b),a=mt((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=mt((.4360747*r+.3850649*o+.1430804*i)/at),n=mt((.0139322*r+.0971045*o+.7141733*i)/st)),new pt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function pt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function mt(e){return e>.008856451679035631?Math.pow(e,1/3):e/ut+lt}function ft(e){return e>ct?e*e*e:ut*(e-lt)}function ht(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function gt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vt(e){if(e instanceof bt)return new bt(e.h,e.c,e.l,e.opacity);if(e instanceof pt||(e=dt(e)),0===e.a&&0===e.b)return new bt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*it;return new bt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function yt(e,t,n,r){return 1===arguments.length?vt(e):new bt(e,t,n,null==r?1:r)}function bt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function xt(e){if(isNaN(e.h))return new pt(e.l,0,0,e.opacity);var t=e.h*ot;return new pt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Me(pt,(function(e,t,n,r){return 1===arguments.length?dt(e):new pt(e,t,n,null==r?1:r)}),Ce(we,{brighter(e){return new pt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new pt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){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 Ue(ht(3.1338561*(t=at*ft(t))-1.6168667*(e=1*ft(e))-.4906146*(n=st*ft(n))),ht(-.9787684*t+1.9161415*e+.033454*n),ht(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Me(bt,yt,Ce(we,{brighter(e){return new bt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new bt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return xt(this).rgb()}}));var St=-.14861,Et=1.78277,Mt=-.29227,Ct=-.90649,wt=1.97294,kt=wt*Ct,Nt=wt*Et,Tt=Et*Mt-Ct*St;function Ot(e){if(e instanceof Rt)return new Rt(e.h,e.s,e.l,e.opacity);e instanceof Ue||(e=We(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Tt*r+kt*t-Nt*n)/-5.9615122912,i=r-o,a=(wt*(n-o)-Mt*i)/Ct,s=Math.sqrt(a*a+i*i)/(wt*o*(1-o)),l=s?Math.atan2(a,i)*it-120:NaN;return new Rt(l<0?l+360:l,s,o,e.opacity)}function Rt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Me(Rt,(function(e,t,n,r){return 1===arguments.length?Ot(e):new Rt(e,t,n,null==r?1:r)}),Ce(we,{brighter(e){return e=null==e?Ne:Math.pow(Ne,e),new Rt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new Rt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*ot,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Ue(255*(t+n*(St*r+Et*o)),255*(t+n*(Mt*r+Ct*o)),255*(t+n*(wt*r)),this.opacity)}}));var At={isDark:function(e){return yt(e).l<70}};function Lt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function It(e){return 1===e.length&&(e=function(e){return function(t,n){return Lt(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 Pt=It(Lt).right,Dt=Math.sqrt(50),qt=Math.sqrt(10),zt=Math.sqrt(2);function $t(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>=Dt?10:i>=qt?5:i>=zt?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Dt?10:i>=qt?5:i>=zt?2:1)}function Bt(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>=Dt?o*=10:i>=qt?o*=5:i>=zt&&(o*=2),t<e?-o:o}function Ft(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Ht="$";function jt(){}function Vt(e,t){var n=new jt;if(e instanceof jt)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 Wt(){}jt.prototype=Vt.prototype={constructor:jt,has:function(e){return Ht+e in this},get:function(e){return this[Ht+e]},set:function(e,t){return this[Ht+e]=t,this},remove:function(e){var t=Ht+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Ht&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Ht&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Ht&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Ht&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Ht&&++e;return e},empty:function(){for(var e in this)if(e[0]===Ht)return!1;return!0},each:function(e){for(var t in this)t[0]===Ht&&e(this[t],t.slice(1),this)}};var _t=Vt.prototype;Wt.prototype={constructor:Wt,has:_t.has,add:function(e){return this[Ht+(e+="")]=e,this},remove:_t.remove,clear:_t.clear,values:_t.keys,size:_t.size,empty:_t.empty,each:_t.each};var Ut=Array.prototype,Yt=Ut.map,Gt=Ut.slice;function Kt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Jt(){}var Zt=.7,Qt=1/Zt,en="\\s*([+-]?\\d+)\\s*",tn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",nn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rn=/^#([0-9a-f]{3})$/,on=/^#([0-9a-f]{6})$/,an=new RegExp("^rgb\\("+[en,en,en]+"\\)$"),sn=new RegExp("^rgb\\("+[nn,nn,nn]+"\\)$"),ln=new RegExp("^rgba\\("+[en,en,en,tn]+"\\)$"),cn=new RegExp("^rgba\\("+[nn,nn,nn,tn]+"\\)$"),un=new RegExp("^hsl\\("+[tn,nn,nn]+"\\)$"),dn=new RegExp("^hsla\\("+[tn,nn,nn,tn]+"\\)$"),pn={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 mn(e){var t;return e=(e+"").trim().toLowerCase(),(t=rn.exec(e))?new yn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=on.exec(e))?fn(parseInt(t[1],16)):(t=an.exec(e))?new yn(t[1],t[2],t[3],1):(t=sn.exec(e))?new yn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ln.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=cn.exec(e))?hn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=un.exec(e))?xn(t[1],t[2]/100,t[3]/100,1):(t=dn.exec(e))?xn(t[1],t[2]/100,t[3]/100,t[4]):pn.hasOwnProperty(e)?fn(pn[e]):"transparent"===e?new yn(NaN,NaN,NaN,0):null}function fn(e){return new yn(e>>16&255,e>>8&255,255&e,1)}function hn(e,t,n,r){return r<=0&&(e=t=n=NaN),new yn(e,t,n,r)}function gn(e){return e instanceof Jt||(e=mn(e)),e?new yn((e=e.rgb()).r,e.g,e.b,e.opacity):new yn}function vn(e,t,n,r){return 1===arguments.length?gn(e):new yn(e,t,n,null==r?1:r)}function yn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function bn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function xn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new En(e,t,n,r)}function Sn(e){if(e instanceof En)return new En(e.h,e.s,e.l,e.opacity);if(e instanceof Jt||(e=mn(e)),!e)return new En;if(e instanceof En)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 En(a,s,l,e.opacity)}function En(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Mn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Kt(Jt,mn,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Kt(yn,vn,Xt(Jt,{brighter:function(e){return e=null==e?Qt:Math.pow(Qt,e),new yn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Zt:Math.pow(Zt,e),new yn(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"#"+bn(this.r)+bn(this.g)+bn(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+")")}})),Kt(En,(function(e,t,n,r){return 1===arguments.length?Sn(e):new En(e,t,n,null==r?1:r)}),Xt(Jt,{brighter:function(e){return e=null==e?Qt:Math.pow(Qt,e),new En(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Zt:Math.pow(Zt,e),new En(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 yn(Mn(e>=240?e-240:e+120,o,r),Mn(e,o,r),Mn(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 Cn=Math.PI/180,wn=180/Math.PI,kn=.96422,Nn=.82521,Tn=4/29,On=6/29,Rn=3*On*On;function An(e){if(e instanceof Ln)return new Ln(e.l,e.a,e.b,e.opacity);if(e instanceof $n){if(isNaN(e.h))return new Ln(e.l,0,0,e.opacity);var t=e.h*Cn;return new Ln(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof yn||(e=gn(e));var n,r,o=qn(e.r),i=qn(e.g),a=qn(e.b),s=In((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=In((.4360747*o+.3850649*i+.1430804*a)/kn),r=In((.0139322*o+.0971045*i+.7141733*a)/Nn)),new Ln(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Ln(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function In(e){return e>.008856451679035631?Math.pow(e,1/3):e/Rn+Tn}function Pn(e){return e>On?e*e*e:Rn*(e-Tn)}function Dn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function qn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function zn(e){if(e instanceof $n)return new $n(e.h,e.c,e.l,e.opacity);if(e instanceof Ln||(e=An(e)),0===e.a&&0===e.b)return new $n(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*wn;return new $n(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function $n(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Kt(Ln,(function(e,t,n,r){return 1===arguments.length?An(e):new Ln(e,t,n,null==r?1:r)}),Xt(Jt,{brighter:function(e){return new Ln(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ln(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 yn(Dn(3.1338561*(t=kn*Pn(t))-1.6168667*(e=1*Pn(e))-.4906146*(n=Nn*Pn(n))),Dn(-.9787684*t+1.9161415*e+.033454*n),Dn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Kt($n,(function(e,t,n,r){return 1===arguments.length?zn(e):new $n(e,t,n,null==r?1:r)}),Xt(Jt,{brighter:function(e){return new $n(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new $n(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return An(this).rgb()}}));var Bn=-.14861,Fn=1.78277,Hn=-.29227,jn=-.90649,Vn=1.97294,Wn=Vn*jn,_n=Vn*Fn,Un=Fn*Hn-jn*Bn;function Yn(e){if(e instanceof Kn)return new Kn(e.h,e.s,e.l,e.opacity);e instanceof yn||(e=gn(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Un*r+Wn*t-_n*n)/(Un+Wn-_n),i=r-o,a=(Vn*(n-o)-Hn*i)/jn,s=Math.sqrt(a*a+i*i)/(Vn*o*(1-o)),l=s?Math.atan2(a,i)*wn-120:NaN;return new Kn(l<0?l+360:l,s,o,e.opacity)}function Gn(e,t,n,r){return 1===arguments.length?Yn(e):new Kn(e,t,n,null==r?1:r)}function Kn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Xn(e){return function(){return e}}function Jn(e,t){return function(n){return e+n*t}}function Zn(e){return 1==(e=+e)?Qn: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):Xn(isNaN(t)?n:t)}}function Qn(e,t){var n=t-e;return n?Jn(e,n):Xn(isNaN(e)?t:e)}Kt(Kn,Gn,Xt(Jt,{brighter:function(e){return e=null==e?Qt:Math.pow(Qt,e),new Kn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Zt:Math.pow(Zt,e),new Kn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Cn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new yn(255*(t+n*(Bn*r+Fn*o)),255*(t+n*(Hn*r+jn*o)),255*(t+n*(Vn*r)),this.opacity)}}));var er=function e(t){var n=Zn(t);function r(e,t){var r=n((e=vn(e)).r,(t=vn(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Qn(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 tr(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]=lr(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 nr(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function rr(e,t){return t-=e=+e,function(n){return e+t*n}}function or(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]=lr(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var ir=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ar=new RegExp(ir.source,"g");function sr(e,t){var n,r,o,i=ir.lastIndex=ar.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=ir.exec(e))&&(r=ar.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:rr(n,r)})),i=ar.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 lr(e,t){var n,r=typeof t;return null==t||"boolean"===r?Xn(t):("number"===r?rr:"string"===r?(n=mn(t))?(t=n,er):sr:t instanceof mn?er:t instanceof Date?nr:Array.isArray(t)?tr:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?or:rr)(e,t)}function cr(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function ur(e){return function t(n){function r(t,r){var o=e((t=Gn(t)).h,(r=Gn(r)).h),i=Qn(t.s,r.s),a=Qn(t.l,r.l),s=Qn(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 dr(e){return+e}ur((function(e,t){var n=t-e;return n?Jn(e,n>180||n<-180?n-360*Math.round(n/360):n):Xn(isNaN(e)?t:e)})),ur(Qn);var pr=[0,1];function mr(e){return e}function fr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function hr(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 gr(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=fr(o,r),i=n(a,i)):(r=fr(r,o),i=n(i,a)),function(e){return i(r(e))}}function vr(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]=fr(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=Pt(e,t,1,r)-1;return i[n](o[n](t))}}function yr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function br(e,t){return function(){var e,t,n,r,o,i,a=pr,s=pr,l=lr,c=mr;function u(){return r=Math.min(a.length,s.length)>2?vr:gr,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),rr)))(n)))},d.domain=function(e){return arguments.length?(a=Yt.call(e,dr),c===mr||(c=hr(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=Gt.call(e),u()):s.slice()},d.rangeRound=function(e){return s=Gt.call(e),l=cr,u()},d.clamp=function(e){return arguments.length?(c=e?hr(a):mr,d):c!==mr},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 xr(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 Sr(e){return(e=xr(Math.abs(e)))?e[1]:NaN}var Er,Mr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cr(e){return new wr(e)}function wr(e){if(!(t=Mr.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 kr(e,t){var n=xr(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")}Cr.prototype=wr.prototype,wr.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 Nr={"%":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 kr(100*e,t)},r:kr,s:function(e,t){var n=xr(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Er=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")+xr(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 Tr(e){return e}var Or,Rr,Ar,Lr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ir(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)}):Tr,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):Tr,s=e.percent||"%";function l(e){var t=(e=Cr(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"):Nr[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=Nr[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?Lr[8+Er/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=Cr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Sr(t)/3))),o=Math.pow(10,-r),i=Lr[8+r/3];return function(e){return n(o*e)+i}}}}function Pr(e,t,n,r){var o,i=Bt(e,t,n);switch((r=Cr(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(Sr(t)/3)))-Sr(Math.abs(e)))}(i,a))||(r.precision=o),Ar(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,Sr(t)-Sr(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,-Sr(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return Rr(r)}function Dr(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=$t(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 Pr(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=$t(s,l,n))>0?r=$t(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=$t(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 qr(){var e=br(mr,mr);return e.copy=function(){return yr(e,qr())},Ft.apply(e,arguments),Dr(e)}Or=Ir({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Rr=Or.format,Ar=Or.formatPrefix;var zr=new Date,$r=new Date;function Br(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 Br((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 zr.setTime(+t),$r.setTime(+r),e(zr),e($r),Math.floor(n(zr,$r))},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 Fr=Br((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Fr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Br((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Fr:null},Fr.range;var Hr=1e3,jr=6e4,Vr=36e5,Wr=864e5,_r=6048e5,Ur=Br((function(e){e.setTime(Math.floor(e/Hr)*Hr)}),(function(e,t){e.setTime(+e+t*Hr)}),(function(e,t){return(t-e)/Hr}),(function(e){return e.getUTCSeconds()}));Ur.range,Br((function(e){e.setTime(Math.floor(e/jr)*jr)}),(function(e,t){e.setTime(+e+t*jr)}),(function(e,t){return(t-e)/jr}),(function(e){return e.getMinutes()})).range,Br((function(e){var t=e.getTimezoneOffset()*jr%Vr;t<0&&(t+=Vr),e.setTime(Math.floor((+e-t)/Vr)*Vr+t)}),(function(e,t){e.setTime(+e+t*Vr)}),(function(e,t){return(t-e)/Vr}),(function(e){return e.getHours()})).range;var Yr=Br((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())*jr)/Wr}),(function(e){return e.getDate()-1}));function Gr(e){return Br((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())*jr)/_r}))}Yr.range;var Kr=Gr(0),Xr=Gr(1),Jr=Gr(2),Zr=Gr(3),Qr=Gr(4),eo=Gr(5),to=Gr(6);Kr.range,Xr.range,Jr.range,Zr.range,Qr.range,eo.range,to.range,Br((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 no=Br((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()}));no.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Br((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},no.range;var ro=Br((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*jr)}),(function(e,t){return(t-e)/jr}),(function(e){return e.getUTCMinutes()}));ro.range;var oo=Br((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Vr)}),(function(e,t){return(t-e)/Vr}),(function(e){return e.getUTCHours()}));oo.range;var io=Br((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Wr}),(function(e){return e.getUTCDate()-1}));function ao(e){return Br((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)/_r}))}io.range;var so=ao(0),lo=ao(1),co=ao(2),uo=ao(3),po=ao(4),mo=ao(5),fo=ao(6);so.range,lo.range,co.range,uo.range,po.range,mo.range,fo.range;var ho=Br((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()}));ho.range;var go=Br((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 vo(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 yo(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 bo(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}go.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Br((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},go.range;var xo,So,Eo,Mo={"-":"",_:" ",0:"0"},Co=/^\s*\d+/,wo=/^%/,ko=/[\\^$*+?|[\]().{}]/g;function No(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 To(e){return e.replace(ko,"\\$&")}function Oo(e){return new RegExp("^(?:"+e.map(To).join("|")+")","i")}function Ro(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Ao(e,t,n){var r=Co.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Lo(e,t,n){var r=Co.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Io(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Po(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Do(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function qo(e,t,n){var r=Co.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function zo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function $o(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 Bo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Fo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ho(e,t,n){var r=Co.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function jo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Vo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Wo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _o(e,t,n){var r=Co.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Uo(e,t,n){var r=Co.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Yo(e,t,n){var r=wo.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Go(e,t,n){var r=Co.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ko(e,t,n){var r=Co.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Xo(e,t){return No(e.getDate(),t,2)}function Jo(e,t){return No(e.getHours(),t,2)}function Zo(e,t){return No(e.getHours()%12||12,t,2)}function Qo(e,t){return No(1+Yr.count(no(e),e),t,3)}function ei(e,t){return No(e.getMilliseconds(),t,3)}function ti(e,t){return ei(e,t)+"000"}function ni(e,t){return No(e.getMonth()+1,t,2)}function ri(e,t){return No(e.getMinutes(),t,2)}function oi(e,t){return No(e.getSeconds(),t,2)}function ii(e){var t=e.getDay();return 0===t?7:t}function ai(e,t){return No(Kr.count(no(e),e),t,2)}function si(e,t){var n=e.getDay();return e=n>=4||0===n?Qr(e):Qr.ceil(e),No(Qr.count(no(e),e)+(4===no(e).getDay()),t,2)}function li(e){return e.getDay()}function ci(e,t){return No(Xr.count(no(e),e),t,2)}function ui(e,t){return No(e.getFullYear()%100,t,2)}function di(e,t){return No(e.getFullYear()%1e4,t,4)}function pi(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+No(t/60|0,"0",2)+No(t%60,"0",2)}function mi(e,t){return No(e.getUTCDate(),t,2)}function fi(e,t){return No(e.getUTCHours(),t,2)}function hi(e,t){return No(e.getUTCHours()%12||12,t,2)}function gi(e,t){return No(1+io.count(go(e),e),t,3)}function vi(e,t){return No(e.getUTCMilliseconds(),t,3)}function yi(e,t){return vi(e,t)+"000"}function bi(e,t){return No(e.getUTCMonth()+1,t,2)}function xi(e,t){return No(e.getUTCMinutes(),t,2)}function Si(e,t){return No(e.getUTCSeconds(),t,2)}function Ei(e){var t=e.getUTCDay();return 0===t?7:t}function Mi(e,t){return No(so.count(go(e),e),t,2)}function Ci(e,t){var n=e.getUTCDay();return e=n>=4||0===n?po(e):po.ceil(e),No(po.count(go(e),e)+(4===go(e).getUTCDay()),t,2)}function wi(e){return e.getUTCDay()}function ki(e,t){return No(lo.count(go(e),e),t,2)}function Ni(e,t){return No(e.getUTCFullYear()%100,t,2)}function Ti(e,t){return No(e.getUTCFullYear()%1e4,t,4)}function Oi(){return"+0000"}function Ri(){return"%"}function Ai(e){return+e}function Li(e){return Math.floor(+e/1e3)}!function(e){(xo=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=Oo(o),u=Ro(o),d=Oo(i),p=Ro(i),m=Oo(a),f=Ro(a),h=Oo(s),g=Ro(s),v=Oo(l),y=Ro(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:Xo,e:Xo,f:ti,H:Jo,I:Zo,j:Qo,L:ei,m:ni,M:ri,p:function(e){return o[+(e.getHours()>=12)]},Q:Ai,s:Li,S:oi,u:ii,U:ai,V:si,w:li,W:ci,x:null,X:null,y:ui,Y:di,Z:pi,"%":Ri},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:mi,e:mi,f:yi,H:fi,I:hi,j:gi,L:vi,m:bi,M:xi,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:Ai,s:Li,S:Si,u:Ei,U:Mi,V:Ci,w:wi,W:ki,x:null,X:null,y:Ni,Y:Ti,Z:Oi,"%":Ri},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:Fo,e:Fo,f:Uo,H:jo,I:jo,j:Ho,L:_o,m:Bo,M:Vo,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:Go,s:Ko,S:Wo,u:Lo,U:Io,V:Po,w:Ao,W:Do,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:zo,Y:qo,Z:$o,"%":Yo};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=Mo[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=bo(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=yo(bo(i.y))).getUTCDay(),r=o>4||0===o?lo.ceil(r):lo(r),r=io.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(bo(i.y))).getDay(),r=o>4||0===o?Xr.ceil(r):Xr(r),r=Yr.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?yo(bo(i.y)).getUTCDay():t(bo(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,yo(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 Mo?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+="",vo);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,yo);return t.toString=function(){return e},t}}}(e)).format,xo.parse,So=xo.utcFormat,Eo=xo.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 Ii="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||So(Ii),+new Date("2000-01-01T00:00:00.000Z")||Eo(Ii);var Pi=1e3,Di=6e4,qi=36e5,zi=864e5,$i=2592e6,Bi=31536e6;function Fi(e){return new Date(e)}function Hi(e){return e instanceof Date?+e:+new Date(+e)}function ji(e,t,n,r,o,i,a,s,l){var c=br(mr,mr),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,Pi],[a,5,5e3],[a,15,15e3],[a,30,3e4],[i,1,Di],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,qi],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,zi],[r,2,1728e5],[n,1,6048e5],[t,1,$i],[t,3,7776e6],[e,1,Bi]];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=It((function(e){return e[2]})).right(x,i);a===x.length?(o=Bt(n/Bi,r/Bi,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(Bt(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(Yt.call(e,Hi)):d().map(Fi)},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 yr(c,ji(e,t,n,r,o,i,a,s,l))},c}const Vi={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"}}},Wi=e=>e+" 12px -12px inset rgba(0, 0, 0, 0.0625)";var _i={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=Vi[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Wi(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Wi(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 Ui({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 Yi;function Gi(){Yi=Yi||document.createElement("canvas").getContext("2d")}const Ki={measureTextWidth(e){Gi();const{width:t}=Yi.measureText(e);return t},lineWrap(e,t,n,r){let o,i;Gi();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&&(Yi.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=Ki.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(Gi(),!e||!e.length)return[];n&&(Yi.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||Ki.measureTextWidth(c)<=t?i.push(c):(s=Ki.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]?Ki.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]=Ki.truncate(i[i.length-1],t,n,o).text):(c=i[i.length-1],c&&c.length>1&&Ki.measureTextWidth(c)>t&&(i[i.length-1]=Ki.truncate(c,t,n,o).text)),i},truncate(e,t,n,r="…"){Gi();let o,i,a,s,l=e;const c=Ki.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(Yi.font=n),e&&t){if(Ki.measureTextWidth(l)>t){for(o=Math.min(u,l.length);o>0;o--)if(i=l.substring(0,o-1),a=i.trim()+r,Ki.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;Gi();let i,a=e,s="",l=[];if(Ki.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),!(Ki.measureTextWidth(a)<=t));o--);return(!o&&!a||Ki.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Ki.measureTextWidth(s)>t?(s=Ki.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Gi(),e&&t?(n&&(Yi.font=n),Ki.explodeWord(e,t,r,Math.max(1,Ki.measureTextWidth("i")))):[]),wrapText(e,t,n,r,o){let i;return Number.isNaN(t)?[e]:(i=r>1?Ki.lineWrap(e,t,n,r):[e],i=Ki.wordWrap(i,t,n,r,o),i)},getFontHeight:e=>(Gi(),e&&(Yi.font=e),1.5*Ki.measureTextWidth("m")),tokenize(e,t,n,r,o,i,a=1){Gi(),t&&(Yi.font=t);const s=Ki.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(Ki.wrapText(e,o,t,c[n])))})):d=Ki.wrapText(e,o,t,c[0],n),d}},Xi={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(Q({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},Ji=Q.bind(null,!0),Zi={},{isArray:Qi}=Array;function ea(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ta(e){return void 0===e}function na(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ra(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]=ta(e[r||t])?i:e[t],e=e[r||t]})),e}function oa(e,t){let n=!0;if(ea(e)&&ea(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{oa(e[r],t[r])||(n=!1)})),n);if(Qi(e)&&Qi(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!oa(e[n],t[n]))return!1;return!0}return e===t}Zi.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Ji({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;oa(i,a)||na(t,o)||(ta(a)?r.push({op:"add",path:s,value:i}):ea(i)&&ea(a)?r=r.concat(Zi.generate(a,i,s)):Qi(i)&&Qi(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]&&ta(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(oa(t,o))return r;if(!ta(t[0])&&ta(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(Zi.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=>{ta(t[o])&&!na(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},Zi.apply=function(e,t){t.forEach((t=>{let n=ra(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(Qi(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Qi(o)&&Qi(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(ea(o)&&ea(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!na(a,e)&&delete a[e]})),Ji(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=ra(e,t.from);Qi(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Qi(n)?n.splice(+r,1):delete n[r]);var a}))},Zi.clone=function(e){return Ji({},e)},Zi.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},Zi.updateObject=function(e,t){Object.keys(e).length?Zi.apply(e,Zi.generate(e,t)):Ji(e,t)};const ia=[[2,4,6],[2,4],[3]],aa=[,[,,[[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 sa(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 la(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)sa(e[r],t,n)}!function(){let e,t;for(la(ia,1,10),e=0;e<aa.length;e++)if(aa[e])for(t=0;t<aa[e].length;t++)Array.isArray(aa[e][t])&&la(aa[e][t])}();const ca={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=ca.findSegmentPositionMeetMin(e,t);return ca.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=ca.findSegmentPositionMeetMax(e,n);return ca.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=ca.findSegmentPositionMeetMaxThenMin(i,s,(i.center+a.center-r)/2),s=i.position+i.radius+r/2;a.position=ca.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,ca.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)ca.layoutPositionFromMin(e,t,n,r),ca.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=ca.findSegmentPositionMeetMaxThenMin(r,t,n)}}},ua=(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},da=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,pa=e=>e.filter(da),ma=(e,t)=>pa(ce(e,t,[])),fa=e=>da(e)&&(!1!==e.showValue||!1!==e.showLabel),ha=e=>e.filter(fa),ga=(e,t)=>ha(ce(e,t,[])),va=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,ya=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},ba=({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},xa=({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},Sa=({value:e,qMin:t})=>"NaN"!==t&&e<t,Ea=({value:e,qMax:t})=>"NaN"!==t&&e>t,Ma={isRefLineVisible:da,getVisibleRefLines:pa,getRefLines:ma,getMeasureRefLines:e=>ma(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:ma(e,"refLine.dimRefLines"),isRefLineLabelVisible:fa,getVisibleRefLineLabels:ha,getRefLineLabels:ga,getMeasureRefLineLabels:e=>ga(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:ga(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=ua(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=ua(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=ua(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=ce(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():ce(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const c=ce(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:va,extractInfoFromInputValue:ya,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=va({refLineLayout:e,layoutService:n});return ya(r,t,"id")},isDiscreteMinOutOfBounds:ba,isDiscreteMaxOutOfBounds:xa,isContinuousMinOutOfBounds:Sa,isContinuousMaxOutOfBounds:Ea,isOutOfRange:({value:e,qMin:t,qMax:n})=>Sa({value:e,qMin:t})||Ea({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&xa({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&ba({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n};function Ca(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines=Ki.tokenize(o.title,t,"… "+o.valueString,3,n),o.maxNumLines=o.lines.length}}function wa({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=Ki.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 ka({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=e.map((e=>wa({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 Na(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Ta=3,Oa=2;function Ra({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 Aa=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(Ma.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(Ma.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Ma.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Ma.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},La={hasEngineFormat:Ra,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:o,rtl:i,isContinuous:a,isDimension:s}){const l=Ma.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=Aa({label:i,dataPages:u,qMin:p,qMax:m});i.scaledValue=1===f?l?-.1:1.1:-1===f?l?1.1:-.1:Ma.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=Ra({inputValue:s,inputValueLabel:l,localeInfo:o})?l:t?t(a):a,r.valueString=`${Se.lrm}(${i})${Se.lrm}`,r.title=La.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=Ra({inputValue:a,inputValueLabel:s,localeInfo:o})?s:r,n.valueString=`${Se.lrm}(${i})${Se.lrm}`,n.title=La.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];i=n.valueText,n.valueString=`${Se.lrm}(${i})${Se.lrm}`,n.title=La.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=La.getTotalNumLines(e)-r;if(t<=0)return;La.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,La.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;La.calculateLabelPositions({labels:e,scale:t,size:v,layoutService:m,orientation:u,rtl:p,isContinuous:f,isDimension:h}),Na(e,"center"),La.addLabelsNeighborInfo(e,r,o,i),Ca(e,a,s),La.reduceTotalMaxNumLines(g,l,o-(g.length-1)*i),"vertical"===u&&(La.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=Ki.tokenize(o.title,t,"… "+o.valueString,o.maxNumLines,n))}}(e,a,s)),La.addLabelsSize(e,s,l,d),La.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:o,lineHeight:i=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=o,{fontSize:d,fontFamily:p,background:m}=t;let f=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,o=t.map(((t,o)=>{const m={type:"text",text:t,title:wa({title:e.title,font:a,ellipsis:"… "+e.valueString}),dx:0,dy:0,maxWidth:n,width:n,fontSize:d,fontFamily:p,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return m[l]=u,m[s]=e.segment.position,m.y+=(o-(r-1)/2)*i,m}));e.background&&f.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:o,lineHeight:i,background:a}){const{lines:s}=o,{borderRadius:l=Ta,padding:c={}}=a,{top:u=Oa,bottom:d=Oa,left:p=Oa,right:m=Oa}=c,f=s.length,h={type:"rect",rx:l,ry:l,fill:o.background.fill,width:o.width+(p+m),height:o.height+(u+d),value:o.value,dock:r};return h[n]=e,h[t]=o.segment.position,h.x-=o.width/2+p,h.y-=f*i/2+u,h}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:i,background:m})),f=f.concat(o)})),f}};function Ia(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 Pa(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 La.getMaxTextWidth(e)>a&&(Ca(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,La.getMaxTextWidth(e))+n+r}(t,n)}function Da(e,t){return t?e.domain():[0,1]}function qa(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 za(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 $a(e,t){return e>9?t[1]:t[0]}function Ba({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,dock:h}=s,g=o[f],v=Xi.createOob({oob:Xi.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:i});v.dock=h;const y="c"+p,b="c"+m,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:h};x[b]=g/2,x[y]=a;const S={type:"text",text:u>9?"9+":u,title:ka({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:h};return S[m]=g/2,S[p]=a,[v,x,S]}function Fa(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:Ki.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 Ha=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 ja={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=Ha(this.settings.labels),s=Ia(this.chart,this.settings.formatter,e);La.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]=Da(t,n);return qa(e,r,o)}if(r){const t=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return qa(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=Fa(t.label),{dock:n}=this.settings.layout;return La.measureLabelsWidth(u,this.measureText),d=Pa(n,u,e),d}const p=za(this.measureText),m=l?$a(l,p):0,f=c?$a(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=Ha(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}=Fa(n.label),E=Ia(this.chart,this.settings.formatter,e),M=v;La.addLabelTitles({labels:c,formatter:E,isContinuous:i,canBeContinuous:l,localeInfo:s}),La.calculateLabelPositions({labels:c,scale:e,size:M,layoutService:r,orientation:h,rtl:d,isContinuous:i,isDimension:a});const[C,w]=Da(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}=qa(e,t,n,c),m="scaledValue"!==c&&Ma.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=za(l),b=$a(g,y),x=$a(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;Na(N),Na(T);const D=Ba({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=Ba({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});La.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}),ca.layout(k.map((e=>e.segment)),I,P,n.label.gap);const z=k.filter((e=>ca.isInside(e.segment,I,P,i)));return La.createLabels({labels:z,style:n.label,maxLabelWidth:S,areaProps:m,area:f,lineHeight:b,font:y,theme:o}).concat([...D,...q])}};var Va={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function Wa(e){const{qHyperCube:t,...n}=e,{qDataPages:r,qStackedDataPages:o,qTreeDataPages:i,...a}=t,s=Q(!0,{},{...n,qHyperCube:{...a,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:l}=Va;return l.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==E(s,e)&&M(s,e,null);else{const e=t[0],n=t[1].split("].")[1];E(s,e,[]).forEach((e=>{void 0!==E(e,n)&&M(e,n,null)}))}})),s}var _a={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return o=>{if(e||t||n){var i;if("line"===o.type)return null!==(i=o.tickValue)&&void 0!==i?i:"axis";if("text"===o.type)return`${o.tickValue} ${o.text}`;if("container"===o.type){const e=o.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${o.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===o.type&&void 0===o.tickValue)return"axis";const e=o.transform&&o.transform.match(/rotate/gi)?"rotated":"horizontal";return`${o.data.group?o.data.group.value+" ":""}${o.data.value} ${o.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:o}){return({currentNodes:i,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===o&&i.forEach((e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)})),"left"!==o&&"right"!==o||i.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==o&&"bottom"!==o||i.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?i.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?i.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)})):i.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=o):e.transform=`translate(${-r}, ${-o})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=o,e.y-=r):(e.x-=r,e.y-=o)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=o,e.y2-=o):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:o/e.major.size,n="y"===e.minor.p?o/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:""+e.data.major.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.cx-=r,e.cy-=o}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return""+e.value;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y,i=t.width-n.width,a=t.height-n.height;let s=-r,l=-o;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":i<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":o>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=Wa(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Wa(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:Ua,extractInfoFromInputValue:Ya,resolveValue:Ga}=Ma;var Ka={resolveValue:Ga,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Ua({refLineLayout:e,layoutService:n});return Ya(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Ua({refLineLayout:e,layoutService:n});return Ya(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:o}=n.meta,i=Ua({refLineLayout:e,layoutService:n});return r[i]&&o?r[i].qText:i},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Ua({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:o}=t;return o[r]}};function Xa({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:o,animationsEnabled:i,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:d,path:p,minimumLayoutMode:m}){const f=e?t.dimensionRefLines:p?t.query.getRefLines(p):t.measureRefLines;if(!f.length)return!1;const h={key:u,type:"ref-line",layout:{minimumLayoutMode:m},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:i,trackBy:_a.lines.trackBy,compensateForLayoutChanges:_a.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==o.meta.major.orientation||!c),v=!e||n.meta.isContinuous;return f.forEach((i=>{h.lines[l].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.valueInfo=Ka.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),f.value=()=>{var e;const o=Ma.getScaledPosition({scale:a.scale(s),value:Ka.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:f.valueInfo,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:i,refLineModel:t,layoutService:n,colorModel:r,dockService:o,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:v}))})),h}const Ja={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 Za({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:o,dock:i,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:d,key:p,path:m}){const f=e?t.dimensionRefLineLabels:m?t.query.getRefLineLabels(m):t.measureRefLineLabels;if(!f.length)return[];const h=[],g=!e||n.meta.isContinuous,v=f.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=()=>Ka.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>Ka.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>Ka.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g})));return h.push((({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:o,scale:i,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:d,localeInfo:p})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:o,formatter:a,scale:i,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:d,isDimension:e,localeInfo:p,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:_a.refLineLabels.trackBy,compensateForLayoutChanges:_a.refLineLabels.compensateForLayoutChanges}}))({isDimension:e,rtl:d,style:Q(!0,Ja,s),dock:i,key:p,labels:v,scale:a,formatter:l,layoutService:n,animationsEnabled:o,theme:c,isContinuous:g,localeInfo:u})),h}var Qa={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"}},es={LINE:"line",BAR:"bar",MARKER:"marker"},ts={PRIMARY:0,SECONDARY:1},ns={type:"bar",axis:0};const rs={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 os(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const is={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 as(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){var t,n,r,o,i;let a,s,l,c,u,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(r=n.session)&&void 0!==r&&r.sessionConfig||null!==(o=e.session)&&void 0!==o&&null!==(i=o.config)&&void 0!==i&&i.url)){var p;if(a=e.session.options||(null===(p=e.enigmaModel)||void 0===p?void 0:p.session.sessionConfig),!a){var m;a=null===(m=e.session)||void 0===m?void 0:m.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",c=a.port?":"+a.port:"",u=a.prefix?a.prefix:"/","/"!==u[u.length-1]&&(u+="/"),s+l+c+u}return""}(n);o&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[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 is.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}async function ss(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 as(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&&os(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await is.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 is.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(os(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await is.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 ls={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(ss(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}},cs={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await ls.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>ls.checkIfPromisesExist({customTooltipModel:e})};const us=(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:rs.CHART.CHART_PARENT_TYPE,qId:rs.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},ds=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:rs.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const ps={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=rs.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:rs.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 ps.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=rs.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=rs.CHART.STATE,a=us(t,i),s=await e.createSessionObject(a),l=ds(t);if(s.id!==rs.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(rs.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 ps.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(ps.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(rs.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=rs.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 ms(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function fs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=rs.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function hs(e){const t=fs();return e.filter((e=>t[e.id]))}const gs={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}=gs.getAttrExprData(a);i.length||n.length?cs.handlePromises({customTooltipModel:o,nodes:gs.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&&ps.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>cs.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[rs.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[rs.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[rs.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(hs(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[rs.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[rs.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=ms(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===hs(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=ms(e)||[];[...o,t].forEach((e=>{const t=hs(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=fs(),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:Se.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Se.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 vs(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 rs.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case rs.CUSTOM.TITLE:case rs.CUSTOM.DESCRIPTION:case rs.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 ys={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>vs(t,e,r,n)}}};const bs={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={[rs.CUSTOM.TITLE]:!0,[rs.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=gs.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===rs.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===rs.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Ee.getMeasure(e,t))),e,i)}};function xs({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(bs.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:Ss}=rs;function Es({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:gs,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=xs({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Ss.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Ss.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>gs.checkIfPromisesExist({customTooltipModel:m}),createImageRow:({value:e,h:t})=>gs.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const o=gs.getDataNodes(i,r),{attrExps:a}=gs.getAttrExprData(t);return cs.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})=>ps.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>gs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>ps.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:()=>ps.hide({app:n,customTooltipModel:m}),destroy:()=>ps.destroyVisualization({customTooltipModel:m})}}}function Ms({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===es.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:ys.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 Cs({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:ys.getNode(i.getLayout(),i.meta),...o.getDatumProps(t)}})))}}]}return[]}function ws({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===es.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 ks={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Ns={OPTIONS:ks,DEFAULT:ks.MINI_CHART};function Ts({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 Os({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 Rs=e=>({miniChart:e===Ns.OPTIONS.MINI_CHART.value,bar:e===Ns.OPTIONS.BAR.value,none:e===Ns.OPTIONS.NONE.value});function As({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Rs(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Rs(Ns.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),o=e.getLayoutValue("preferContinuousAxis");return Rs(!n&&(r||!r&&o)?Ns.OPTIONS.NONE.value:Ns.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Ns.OPTIONS.MINI_CHART.value,n.bar=t.value===Ns.OPTIONS.BAR.value,n.none=t.value===Ns.OPTIONS.NONE.value),n}function Ls({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]=Os({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 Is({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]=Os({layoutService:o,viewState:n,viewCache:r});return{size:u,thumbSize:(p-d)*u}}}function Ps({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ls({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Is({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 Ds="data-scrollbar-handle";function qs({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Ds)||""}const zs="scrollbarResize";function $s({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s}){const l=Ls({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:zs,threshold:0,enable(e,t){return!(!i.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[zs]=this[zs]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&qs({e:t})&&(this[zs].panningEvent=t.srcEvent),!!this[zs].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[zs]=this[zs]||{},this[zs].panningEvent&&t.component(e).emit("dragStart",this[zs].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[zs]=this[zs]||{},!this[zs].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=qs({e:this[zs].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[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")}}}}const Bs="scrollbarPan";function Fs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ls({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Is({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:Bs,threshold:0,enable(r,o){return this[Bs]=this[Bs]||{},!(o&&!this[Bs].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[Bs]=this[Bs]||{},this[Bs].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[Bs].relative=a.relative,this[Bs].zoom=r.get("zoom"),this[Bs].zoom.span=this[Bs].zoom.max-this[Bs].zoom.min,this[Bs].zoom.fullSpan=i-n}else if(a.onThumb)this[Bs].offset=a.thumb;else{const e=u();this[Bs].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=c(n);if(this[Bs]=this[Bs]||{},i.meta.isContinuous){const e=a.relative-this[Bs].relative,{fullSpan:t,span:n,min:i,max:s}=this[Bs].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[Bs].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[Bs]=this[Bs]||{},this[Bs].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[Bs]=this[Bs]||{},this[Bs].isPanning=!1,t.component(e).emit("unlockState")}}}}function Hs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return[Ps({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}),$s({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),Fs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})]}function js({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 Vs={background:"rgba(0, 0, 0, 0.1)"},Ws={top:-1,bottom:-1,width:6},_s={width:2,background:"#595959"};var Us={before:Vs,after:Vs,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Ws,endHandle:Ws,startHandleBorder:_s,endHandleBorder:_s};const Ys={background:"rgba(0, 0, 0, 0.1)"},Gs={top:-1,bottom:-1,width:6},Ks={width:2,background:"#595959"};var Xs={before:Ys,after:Ys,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Gs,endHandle:Gs,startHandleBorder:Ks,endHandleBorder:Ks};const Js={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Zs={pointerEvents:"initial"},Qs={pointerEvents:"none"};const el="ew-resize",tl="default";function nl(){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 rl(){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?el:tl}function ol(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 il(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function al(){const{size:e,start:t,end:n}=nl.call(this);this.renderer.render(this.elements(this.h,ol.call(this,e,t,n)))}function sl(){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?Xs:Us;return{container:{...Js},before:{...Js,...n.before,...t.before},after:{...Js,...n.after,...t.after},thumb:{...Js,...n.thumb,...t.thumb},startHandle:{...Js,...Zs,...n.startHandle},endHandle:{...Js,...Zs,...n.endHandle},startHandleBorder:{...Js,...Qs,...n.startHandleBorder},endHandleBorder:{...Js,...Qs,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var ll={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(){al.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||!il.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=qs({e:e});t&&(this.state.hover[t]=!0),rl.call(this),al.call(this)},leave(){this.state.locked||(this.state.hover.reset(),rl.call(this),al.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=qs({e:e});t&&(this.state.drag[t]=!0),rl.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),rl.call(this),al.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}=nl.call(this);return this.elements(e,ol.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",[Ds]:"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",[Ds]:"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:sl.call(this),continuous:o.isContinuous,invert:"horizontal"===o.orientation&&o.rtl,injections:i})}};function cl({layoutService:e}){return e.meta.isContinuous&&As({layoutService:e}).miniChart}function ul({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:o}=e,{primarySeries:i,secondarySeries:a}=r.meta,s=r.query.series(es.LINE),l=[...Cs({forceCreate:!0,key:Qa.COLLECTION.PRIMARY,series:i,fieldModel:n,colorService:o,layoutService:t}),...Cs({key:Qa.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:o,layoutService:t}),...Cs({key:Qa.COLLECTION.LINE,series:s,fieldModel:n,colorService:o,layoutService:t}),...Ms({key:Qa.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:o,series:i}),...Ms({key:Qa.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:o,series:a}),...ws({key:Qa.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:i}),...ws({key:Qa.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return cl(e)&&(l.push(...Cs({key:Qa.COLLECTION.REDUCED,source:Qa.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:o,layoutService:t})),l.push(...Cs({key:Qa.COLLECTION.REDUCED_PRIMARY,source:Qa.DATA.REDUCED,series:i,fieldModel:n,colorService:o,layoutService:t})),l.push(...Cs({key:Qa.COLLECTION.REDUCED_SECONDARY,source:Qa.DATA.REDUCED,series:a,fieldModel:n,colorService:o,layoutService:t})),l.push(...Ms({key:Qa.COLLECTION.REDUCED_STACKED_PRIMARY,source:Qa.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===es.BAR)),colorService:o})),l.push(...Ms({key:Qa.COLLECTION.REDUCED_STACKED_SECONDARY,source:Qa.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===es.BAR)),colorService:o}))),l}const dl=({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 pl({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 ml=({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:dl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:pl({models:e})}},fl=({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:dl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:pl({models:e})}};function hl({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 gl({viewCache:e,mainMajor:t}){return Q(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function vl({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 yl({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:vl({viewState:t,viewCache:n,layoutService:i})};return{[Qa.SCALE.MAJOR]:Q(!0,{},p,{ticks:{level:"outer"}}),[Qa.SCALE.MAJOR_INNER]:Q(!0,{},p,{ticks:{level:"inner"}})}}function bl({picasso:e,models:t,viewState:n,viewCache:r,environment:o}){const{meta:i}=t.layoutService,a=i.isTime?{...yl({picasso:e,viewState:n,viewCache:r,models:t,environment:o})}:i.isContinuous?{[Qa.SCALE.MAJOR]:hl({models:t,viewState:n,environment:o})}:i.isBarSeriesGrouped?{[Qa.SCALE.MAJOR]:fl({models:t,environment:o})}:{[Qa.SCALE.MAJOR]:i.isBarSeriesStackedInBothAxis?fl({models:t,environment:o}):ml({models:t,environment:o})};return cl(t)?{...a,[Qa.SCALE.REDUCED]:gl({viewCache:r,mainMajor:a[Qa.SCALE.MAJOR]})}:a}function xl({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 Sl({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!cl({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 El({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{...bl({picasso:e,models:t,viewState:n,viewCache:r,environment:o}),[Qa.SCALE.MINOR.PRIMARY]:xl({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:o}),[Qa.SCALE.MINOR.SECONDARY]:xl({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:o}),[Qa.SCALE.MINOR.REDUCED_PRIMARY]:Sl({layoutService:i,tickModel:s,dockService:u,environment:o}),[Qa.SCALE.MINOR.REDUCED_SECONDARY]:Sl({layoutService:i,tickModel:l,dockService:u,environment:o}),...c.custom.wrappedScales()}}var Ml={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 Cl=["all","labels"];function wl({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:o,styleModel:i}=e,a=t.getLayoutValue("measureAxes");if(!a||!a.length)return[];const s=o.getStyles(),l=i.query.axis.label.getStyle(),{measureAxes:c}=r.meta;return c.filter((e=>{const t=e.isPrimary?0:1;return Cl.some((e=>a[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?Qa.COMPONENT.AXIS.MINOR.PRIMARY:Qa.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:Ml.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{stroke:s.axis.line.major.color},ticks:{stroke:s.axis.line.major.color},minorTicks:{stroke:s.axis.line.minor.color}}})))}var kl=.5,Nl=3,Tl=13;function Ol({models:e,environment:t}){const{layoutService:n,dockService:r,styleModel:o}=e,i="rtl"===t.options.direction,a=n.getLayoutValue("dimensionAxis"),s=o.query.axis.label.getStyle(),l=(({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return ve.getAdjustedMaxGlyphCount(t,r,0,"qText")})({layoutService:n}),{orientation:c}=r.meta.major,u="horizontal"===c?a.label:"auto";return{type:"axis",key:Qa.COMPONENT.AXIS.MAJOR,scale:Qa.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:Ml.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>Nl&&l<Tl?1:void 0,fontFamily:s.fontFamily,fontSize:s.fontSize,fill:s.fill},line:{show:!1},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:kl}}}]}}}function Rl({models:e}){const{dockService:t,styleModel:n}=e,{orientation:r}=t.meta.major,o=n.query.axis.label.getStyle();return{type:"axis",key:Qa.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:Qa.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:Ml.AXIS.MAJOR[r.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:o.fontFamily,fontSize:o.fontSize,fill:o.fill},line:{show:!1}}}}function Al({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,styleModel:o}=e,i="rtl"===t.options.direction,{orientation:a}=n.meta.major,s="bottom"===n.meta.major.dock?0:1,l=r.getStyles(),c=o.query.axis.label.getStyle(),u=i?1:0,d={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:Ml.AXIS.MAJOR[a]},preferredSize:()=>({size:2*parseFloat(c.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:i?"end":"start",label:{align:s,justify:u},guideLine:{major:{justify:u},minor:{align:s}},line:{show:!1}},style:{label:{fontFamily:c.fontFamily,fontSize:c.fontSize,fill:c.fill},majorGuideLine:{stroke:l.axis.line.major.color},minorGuideLine:{stroke:l.axis.line.minor.color}}};return[Q(!0,{},d,{key:Qa.COMPONENT.AXIS.TIME_INNER,scale:Qa.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:l.axis.line.minor.color},minorGuideLine:{stroke:l.axis.line.major.color}}}),Q(!0,{},d,{key:Qa.COMPONENT.AXIS.TIME_OUTER,scale:Qa.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[Rl({models:e})]:[Ol({models:e,environment:t})]}const Ll=({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,Il=({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 Pl({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:kl},...n}}}]}}var Dl="max",ql="min";function zl(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 $l=(e,t)=>`${e}-${t.id}`,Bl=4,Fl=12,Hl=4;function jl({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:o}){if(t.meta.isContinuous)return()=>Hl+"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(Qa.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Bl,Math.min(Fl,l));i.size=("bar"===o?2*c:c)+"px"}return i.size}}const{isDark:Vl}=At;const Wl=({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 zl(t,v)},b=$l(Qa.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:Qa.SCALE.MAJOR,fn:Il({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?Vl(t)?function(e){return _e(e).brighter(.5).toString()}(t):function(e){return _e(e).darker().toString()}(t):t},size:jl({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:Pl({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:kl}}})}};function _l({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:o}){return function(i){const{datum:a,resources:{scale:s}}=i,l=s(Qa.SCALE.MAJOR),c=s(Qa.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 Ul({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?_l({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?_l({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(Qa.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(Qa.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 Yl=({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=Il({layoutService:r,seriesModel:o,rtl:s,orientation:l});return{key:$l(Qa.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:Qa.SCALE.MAJOR,fn:c},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:Ul({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:Pl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:kl},inactive:{opacity:kl}})}};var Gl={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 Kl({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 Xl=3,Jl=20;function Zl({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}=Gl,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=Kl({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 zl(t,b)};return{type:"point",key:$l(Qa.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:Qa.SCALE.MAJOR,fn:Il({layoutService:r,seriesModel:i,rtl:y,orientation:p}),ref:"major"},sizeLimits:{minPx:Xl,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:Pl({layoutService:r,active:{r:e=>e.r+Gl.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[Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const Ql=(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 ec({chart:e,models:t,environment:n,series:r,lineSeries:o}){const{layoutService:i,dockService:a,styleModel: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.query.point.label.getStyle();return{type:"point-label",key:`${Qa.COMPONENT.POINT_LABEL}-${u}`,layout:{displayOrder:2,minimumLayoutMode:Ml.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:r.options.showAsConnections,label:t=>Ql(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{point:`${Qa.COMPONENT.POINT}-${u}`,allPoints:o.map((e=>`${Qa.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>zl(e.value,m))(e.data),labelSpace:{use:()=>{const t=e.component(Qa.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:f.fontFamily,fontSize:f.fontSize,fill:f.fill}}}const tc=({chart:e,dock:t})=>{let n=t;const r=e.component(`${Qa.COMPONENT.SLICED_HAT}-${Dl}`),o=e.component(`${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.PRIMARY}`),i=e.component(`${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.SECONDARY}`);return r?n=`@${Qa.COMPONENT.SLICED_HAT}-${Dl}`:o?n=`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.PRIMARY}`:i&&(n=`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.SECONDARY}`),n},nc=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${Qa.COMPONENT.SLICED_HAT}-${Dl}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.PRIMARY}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${Qa.COMPONENT.SLICED_HAT}-${ql}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${ql}-${ts.PRIMARY}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${ql}-${ts.SECONDARY}`||"vertical"!==t||n||(r=4),r};function rc({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:Qa.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:Ml.LABEL_SPACE,dock:tc({chart:e,dock:u?"top":p})},settings:{size:10},preferredSize:()=>{const t=e.component(`${Qa.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(Qa.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(Qa.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 oc={min:"Min",max:"Max"};function ic(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 ac(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 sc(e,t,n){return ic(e,t,n)||ac(e,t,n)}function lc(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function cc(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function uc(e,t){return lc(e,t)||cc(e,t)}function dc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta["hasExplicit"+oc[t]]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Dl?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===Dl?!lc(r,e):!cc(r,e)}({extrema:e,type:t}))}var pc=Object.freeze({__proto__:null,isSegmentMaxOutOfBounds:ic,isSegmentMinOutOfBounds:ac,isSegmentOutOfBounds:sc,isMaxOutOfBounds:lc,isMinOutOfBounds:cc,isOutOfBounds:uc,shouldShowOob:dc});const mc={min:"Min",max:"Max"},fc=({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===Dl,{isBarSeriesGrouped:M}=p.meta,C=(({chart:e,type:t,opposite:n,dock:r})=>{let o=t===Dl?n:r;const i=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),s=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`),l=e.component(Qa.COMPONENT.LABEL_SPACE),c=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`),d=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.SECONDARY}`);return i?o=`@${Qa.COMPONENT.SLICED_HAT}-${t}`:a?o=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`:s?o=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`:c||u||d?l&&t===Dl?o="@"+Qa.COMPONENT.LABEL_SPACE:c?o=`@${Qa.COMPONENT.BAR_OOB}-${t}`:u?o=`@${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`:d&&(o=`@${Qa.COMPONENT.BAR_OOB}-${t}-${ts.SECONDARY}`):l&&t===Dl&&(o="@"+Qa.COMPONENT.LABEL_SPACE),o})({chart:e,type:a,opposite:y,dock:v}),w=Il({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&&pc[`is${mc[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,$=e=>"NaN"!==e.qNum?e.qNum:0,B=p.meta.isContinuous?z:q;return{type:"data-out-of-bounds-marker",key:`${Qa.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:C,minimumLayoutMode:Ml.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:B},end:{field:e,value:n.showAsZeros?$: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:Qa.SCALE.MAJOR,fn:w},markerOffset:nc({dockPosition:C,orientation:b,rtl:g})},brush:Pl({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}}},hc={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function gc({chart:e,models:t,viewState:n,viewCache:r,axis:o}){const i=C(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${Qa.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=hc[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=hc[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 vc=({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 yc(e){return Math.min(Math.max(0,e),1)}const bc=({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?ts.PRIMARY:ts.SECONDARY,b=o?Qa.SCALE.MINOR.PRIMARY:Qa.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 yc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return yc(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=v(e);return yc(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 yc(e.scale(n))}}},S=(o?d:p).query.getExtrema(),E=f?({start:e,end:t})=>sc(e.value,t.value,S):({end:e})=>uc(e.value,S);return{type:"box",key:`${Qa.COMPONENT.BAR}-${y}`,data:{filter:(()=>{if(f)return;const e=l.query.series(es.BAR).filter((e=>e.isPrimary===o)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?o?Qa.COLLECTION.STACKED_PRIMARY:Qa.COLLECTION.STACKED_SECONDARY:o?Qa.COLLECTION.PRIMARY:Qa.COLLECTION.SECONDARY},preferredSize:m?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:Qa.SCALE.MAJOR,fn:Ll({layoutService:i,axis:y}),ref:m?{start:"major",end:"major"}:void 0},minor:x,box:{width:vc({isContinuous:m,isBarSeriesGrouped:h,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:g}),minWidthPx:m?gc({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:Pl({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:kl}}})}},xc=({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?ts.PRIMARY:ts.SECONDARY,g=o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${Qa.COMPONENT.STACK_BAR}-${h}`,type:"box",data:{collection:o?Qa.COLLECTION.STACKED_TOTAL_PRIMARY:Qa.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:Qa.SCALE.MAJOR,fn:Ll({layoutService:i,axis:h}),ref:p?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:o?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:vc({isContinuous:p,isBarSeriesGrouped:m,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:f}),minWidthPx:p?gc({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 Sc(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,o=e.styleModel.query.bar.label.getStyle(),i=o.fill===r.color;return{placements:t.simplifiedPlacements.map((e=>function({simplifiedPlacement:e,fill: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:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:i&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>At.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):o.fill,isHorizontal:n}))),label:t.label}}function Ec(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 Mc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},Cc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function wc(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 kc=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:o,styleModel:i,themeService:a}=e,{meta:s}=r,l="rtl"===t.options.direction,c=a.getStyles(),u=i.query.bar.label.getStyle(),d=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),p=n?ts.PRIMARY:ts.SECONDARY;if(!(n?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!Mc(d,s))return!1;let m;!s.isBarSeriesStacked&&(m=s.isBarSeriesStacked?1:0);const f={label:e=>Ql(e.data,e),simplifiedPlacements:wc(m,0===m?1:0,s.isBarSeriesStacked?.5:1,s.isContinuous),style:c.label.value},h=[Sc(e,f)],g=[{component:`${Qa.COMPONENT.BAR}-${p}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Ec(t.data.end.value,e.dockService.meta.minor.orientation,l,0),labels:h,fontSize:parseInt(u.fontSize,10),fontFamily:u.fontFamily}}}];return{type:"labels",key:`${Qa.COMPONENT.BAR_LABEL}-${p}`,layout:{minimumLayoutMode:Ml.VALUE_LABEL},settings:{sources:g}}};function Nc(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 Tc({chart:e,models:t,environment:n,isPrimary:r}){const{meta:o}=t.layoutService,i="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.styleModel.query.bar.label.getStyle(),l=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),c=r?ts.PRIMARY:ts.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Cc(l,o))return!1;const u=e.formatter(r?Qa.FORMATTER.PRIMARY:Qa.FORMATTER.SECONDARY)||(e=>e),d=e=>0===e?"":u(e),p={label:e=>d(e.data.sumOfPositives.value),simplifiedPlacements:Nc("outside",true,o.isContinuous),style:a.label.value},m={label:e=>d(e.data.sumOfNegatives.value),simplifiedPlacements:Nc("opposite",true,o.isContinuous),style:a.label.value},f=[Sc(t,p),Sc(t,m)];return{type:"labels",key:`${Qa.COMPONENT.STACK_BAR_LABEL}-${c}`,layout:{displayOrder:2,minimumLayoutMode:Ml.VALUE_LABEL},settings:{sources:[{component:`${Qa.COMPONENT.STACK_BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Ec(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,i),labels:f,fontSize:parseInt(s.fontSize,10),fontFamily:s.fontFamily}}}]}}}var Oc=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 Rc={min:"Min",max:"Max"};function Ac({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?xc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):bc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),v=i?l.query.getExtrema():c.query.getExtrema(),y=n===Dl,b=i?ts.PRIMARY:ts.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta["hasExplicit"+Rc[t]]}(v,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,o=Number(r.toFixed(13));return!Oc[`has${Rc[t]}Hat`](o,e)}(v,n,y)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta["hasExplicit"+Rc[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?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let o=r;const i=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),a=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`);return i&&a&&(o=n?r:`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),o})({chart:e,type:n,isPrimary:i,dock:y?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${Qa.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:Q({},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:vc({isContinuous:m,isBarSeriesGrouped:f,styleModel:u,discreteModel:d,isBarSeriesStackedInBothAxis:h}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:Pl({layoutService:a})}}const Lc={min:"Min",max:"Max"},Ic={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Pc({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?xc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):bc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),h=i?l.query.getExtrema():c.query.getExtrema(),g=n===Dl?h.implicit.bar.max:h.implicit.bar.min,v=Number(g.toFixed(13)),y=i?ts.PRIMARY:ts.SECONDARY;if(!f)return!1;if(!pc[`is${Lc[n]}OutOfBounds`](v,h))return!1;const b=(({chart:e,type:t,end:n,start:r,isPrimary:o})=>{let i=t===Dl?n:r;const a=e.component(Qa.COMPONENT.LABEL_SPACE),s=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),l=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`),c=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`),u=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.SECONDARY}`);return s?i=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`:l?i=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`:c&&u&&!o?i=`@${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`:a&&t===Dl&&(i="@"+Qa.COMPONENT.LABEL_SPACE),i})({chart:e,type:n,end:d,start:p,isPrimary:i});let x="end";m&&(x=n===Dl?"sumOfPositives":"sumOfNegatives");return{type:"box-out-of-bounds",key:`${Qa.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:ge.getDockValue(n===Dl?d:p),oob:Q({},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=pc[`is${Lc[n]}OutOfBounds`](e.datum[x].value,h,n);return(!r||function({type:e,item:t,prop:n,extrema:r}){const o=t.datum[Ic[n]].value;return 0!==o&&pc[`is${Lc[e]}OutOfBounds`](o,r,e)}({type:n,item:e,prop:x,extrema:h}))&&o}})},brush:Pl({layoutService:a})}}function Dc(e){return Math.min(Math.max(0,e),1)}const qc=({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?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY),m=r?ts.PRIMARY:ts.SECONDARY,f=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),h=n===Dl;if(!dc({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:`${Qa.COMPONENT.GHOST_BAR_OOB}-${n}-${m}`,data:{filter:(()=>{if(l)return;const e=a.query.series(es.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?Qa.COLLECTION.STACKED_TOTAL_PRIMARY:Qa.COLLECTION.STACKED_TOTAL_SECONDARY:r?Qa.COLLECTION.PRIMARY:Qa.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:Qa.SCALE.MAJOR,fn:Ll({layoutService:s,axis:m}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:r?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Dc(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=v(e,"sumOfPositives");return Dc(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=v(e,"sumOfNegatives");return Dc(e.scale(t))}}:{ref:"end",fn:e=>{const t=v(e);return Dc(e.scale(t))}}},box:{width:vc({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 zc(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 $c=({chart:e,models:t,type:n,environment:r,isPrimary:o})=>{const{layoutService:i,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,styleModel:c,seriesModel:u,themeService:d}=t,p=d.getStyles(),m=c.query.bar.label.getStyle(),{meta:f}=i,{isBarSeriesStacked:h}=f,g=e.formatter(o?Qa.FORMATTER.PRIMARY:Qa.FORMATTER.SECONDARY),v=i.getLayoutValue("dataPoint.showBarLabels",!1),y="horizontal"===a.meta.major.orientation,b="rtl"===r.options.direction;if(!(o?u.meta.primaryBarSeriesCount:u.meta.secondaryBarSeriesCount)||!h&&!Mc(v,f)||h&&!Cc(v,f))return!1;const x=o?s.query.getExtrema():l.query.getExtrema();if(!x.meta.hasExplicit)return!1;const S=n===Dl?x.implicit.bar.max:x.implicit.bar.min;if(!(n===Dl?lc(S,x):cc(S,x)))return!1;let E=e=>Ql(e.data,e);f.isBarSeriesStacked&&(E=n===Dl?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(lc(e.data.sumOfPositives.value,x)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return g?g(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(cc(e.data.sumOfNegatives.value,x)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return g?g(t):t}return""});const M={label:E,simplifiedPlacements:zc("outside",true,f.isContinuous,y,b),style:p.label.value},C={label:E,simplifiedPlacements:zc("opposite",true,f.isContinuous,y,b),style:p.label.value},w=[Sc(t,M),Sc(t,C)],k=o?ts.PRIMARY:ts.SECONDARY,N="horizontal"===a.meta.major.orientation?"down":"right",T=[{component:`${Qa.COMPONENT.GHOST_BAR_OOB}-${n}-${k}`,selector:"rect",strategy:{type:"bar",settings:{direction:N,labels:w,fontSize:parseInt(m.fontSize,10),fontFamily:m.fontFamily}}}];return{key:`${Qa.COMPONENT.BAR_OOB_LABEL}-${n}-${k}`,type:"labels",layout:{minimumLayoutMode:Ml.VALUE_LABEL},settings:{sources:T}}},Bc=({chart:e,models:t,viewState:n,viewCache:r})=>[bc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),bc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Fc=({chart:e,models:t,viewState:n,viewCache:r})=>[xc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),xc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Hc=({chart:e,models:t,environment:n})=>{const{isBarSeriesStacked:r}=t.layoutService.meta;if(r){return[Tc({chart:e,models:t,environment:n,isPrimary:!0}),Tc({chart:e,models:t,environment:n,isPrimary:!1})]}return[kc({models:t,environment:n,isPrimary:!0}),kc({models:t,environment:n,isPrimary:!1})]},jc=({chart:e,models:t,viewCache:n,viewState:r})=>[Ac({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Ac({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Vc=({chart:e,models:t,viewCache:n,viewState:r})=>[Pc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Pc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Pc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Pc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Wc=({chart:e,models:t})=>[qc({chart:e,models:t,type:"max",isPrimary:!0}),qc({chart:e,models:t,type:"min",isPrimary:!0}),qc({chart:e,models:t,type:"max",isPrimary:!1}),qc({chart:e,models:t,type:"min",isPrimary:!1})],_c=({chart:e,models:t,environment:n})=>[$c({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),$c({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),$c({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),$c({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],Uc=({chart:e,environment:t,models:n,viewState:r,viewCache:o})=>{const{seriesModel:i}=n,a=i.query.series(es.BAR).slice(-1),s=i.query.series(es.LINE),l=i.query.series(es.MARKER);return[...Bc({chart:e,models:n,viewState:r,viewCache:o}),...Fc({chart:e,models:n,viewState:r,viewCache:o}),...s.map((e=>Yl({models:n,environment:t,series:e}))),...s.map((e=>Zl({models:n,series:e,environment:t}))),...l.map((r=>Wl({chart:e,models:n,series:r,environment:t}))),...s.map((r=>ec({chart:e,models:n,environment:t,series:r,lineSeries:s}))),...Hc({chart:e,models:n,environment:t}),...jc({chart:e,models:n,viewCache:o,viewState:r}),...Vc({chart:e,models:n,viewCache:o,viewState:r}),...Wc({chart:e,models:n}),..._c({chart:e,models:n,environment:t}),fc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),fc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),rc({chart:e,models:n,environment:t,lineSeries:s})]},Yc=0,Gc=1,Kc=3;function Xc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:o}=e,{auto:i,spacing:a}=r.getLayoutValue("gridLine",{});if(!i&&a===Yc)return!1;const s=o.getStyles(),l=n.meta.primarySeries.length>0;return{key:Qa.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:Ml.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!i&&a===Gc)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!i&&a===Kc,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY}}function Jc({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:Qa.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:Ml.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===o.meta.minor.orientation?"x":"y"]:[{value:0,scale:Qa.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function Zc({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:Ml.GRID_LINE},ticks:{stroke:i.grid.line.major.color},minorTicks:{show:!1,stroke:i.grid.line.minor.color}};return o?[Q(!0,{},a,{key:"time-inner-grid",x:{scale:Qa.SCALE.MAJOR_INNER},ticks:{stroke:i.grid.line.minor.color}}),Q(!0,{},a,{key:"time-outer-grid",x:{scale:Qa.SCALE.MAJOR}})]:[Q(!0,{},a,{key:"continuous-grid",x:{scale:Qa.SCALE.MAJOR},minorTicks:{show:!0}})]}function Qc({models:e}){return[Xc({models:e}),Jc({models:e}),...Zc({models:e})]}function eu({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,propertiesModel:i,appModel:a,genericObjectModel:s,styleModel: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.query.axis.title.getStyle();return{type:"data-title",key:Qa.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:o.meta.major.dock,minimumLayoutMode:Ml.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.fontFamily,fontSize:m.fontSize,color:m.color}}}const tu=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function nu({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,seriesModel:i,propertiesModel:a,appModel:s,genericObjectModel:l,styleModel:c}=e,u=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return[];const p=c.query.axis.title.getStyle(),{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?Qa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:Qa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:c?o.meta.minor.dock:o.meta.minorSecondary.dock,minimumLayoutMode:Ml.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!1,explicitItemInfos:tu(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.fontFamily,fontSize:p.fontSize,color:p.color}};return d&&(m.settings.padding="0",m.settings.minWidth="auto"),m}))}function ru({models:e,environment:t,actions:n}){return[eu({models:e,environment:t,actions:n}),...nu({models:e,environment:t,actions:n})]}function ou({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=As({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:()=>Os({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=()=>[Ts({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:Ns.OPTIONS.BAR.value},deviceType:t.deviceType})}function iu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o}){const{layoutService:i}=t,a=bc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o});if(!a)return!1;const s=o?ts.PRIMARY:ts.SECONDARY;return a.key=`${Qa.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=i.meta.isBarSeriesStacked?o?Qa.COLLECTION.REDUCED_STACKED_PRIMARY:Qa.COLLECTION.REDUCED_STACKED_SECONDARY:o?Qa.COLLECTION.REDUCED_PRIMARY:Qa.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=o?Qa.SCALE.MINOR.REDUCED_PRIMARY:Qa.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=Qa.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function au({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(es.LINE).map((r=>{const o=Yl({models:t,environment:e,series:r});return o.key=$l(Qa.COMPONENT.MINI_CHART.LINE,r),o.data.collection=Qa.COLLECTION.REDUCED,o.settings.coordinates.minor.scale=r.isPrimary?Qa.SCALE.MINOR.REDUCED_PRIMARY:Qa.SCALE.MINOR.REDUCED_SECONDARY,o.settings.coordinates.major.scale=Qa.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 su({models:e,environment:t}){return e.seriesModel.query.series(es.MARKER).map((n=>{const r=Wl({models:e,environment:t,series:n});return r.key=$l(Qa.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=Qa.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?Qa.SCALE.MINOR.REDUCED_PRIMARY:Qa.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=Qa.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function lu({chart:e,models:t,viewState:n,viewCache:r,environment:o}){return cl(t)?[iu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),iu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...au({environment:o,models:t}),...su({models:t,environment:o})]:[]}function cu({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=Ml.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return o?[{type:"axis-overlay",key:Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:Qa.SCALE.MAJOR_INNER,layout:{dock:"@"+Qa.COMPONENT.AXIS.TIME_INNER,minimumLayoutMode:a}},{type:"axis-overlay",key:Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:Qa.SCALE.MAJOR,layout:{dock:"@"+Qa.COMPONENT.AXIS.TIME_OUTER,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:Qa.SCALE.MAJOR,layout:{dock:"@"+Qa.COMPONENT.AXIS.MAJOR_CONTINUOUS,minimumLayoutMode:a}}]}function uu({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(es.BAR).filter((e=>e.isPrimary)),h=c.query.series(es.BAR).filter((e=>!e.isPrimary)),g=c.query.series(es.LINE),v=c.query.series(es.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?Za({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.dock:a.meta.minor.opposite,scale:Qa.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:Qa.FORMATTER.PRIMARY,theme:p,localeInfo:u,rtl:m,key:Qa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],C=x?Za({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.opposite:a.meta.minor.dock,scale:Qa.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:Qa.FORMATTER.SECONDARY,theme:p,localeInfo:u,rtl:m,key:Qa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&Xa({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:Qa.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Qa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:Ml.REFERENCE_LINE}),!!x&&Xa({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:Qa.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Qa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:Ml.REFERENCE_LINE}),Xa({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:Qa.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:m,key:Qa.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`:h.length?`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`:g.length?`${Qa.COMPONENT.LINE}-${g[0].id}`:v.length?`${Qa.COMPONENT.MARKER}-${v[0].id}`:`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,minimumLayoutMode:Ml.REFERENCE_LINE}),...M,...C,...Za({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dock:a.meta.major.opposite,scale:Qa.SCALE.MAJOR,style:s.getStyles(),theme:p,localeInfo:u,rtl:m,key:Qa.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function du(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var pu=[{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(du)},{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 mu({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=pu.length;a<s;a++){o=pu[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:ne[e].alignment},settings:{label:o.get("Object.Disclaimer."+e),rtl:i},style:r}}(c.key,{translator:r},{rtl:"rtl"===o.direction},{fontFamily:u})}function fu({layoutService:e}){return!!cl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:Qa.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function hu(e){return(null==e?void 0:e.type)||es.BAR}function gu({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=>hu(e)===es.LINE)).map((e=>({key:$l(Qa.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:Qa.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 vu({models:{fieldModel:e}}){return{[Qa.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[Qa.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var yu={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:bu}=yu;function xu({layoutService:e,largeDataService:t}){const{maxNumPoints:n=bu}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Su}=yu,Eu=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Su}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!xu({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Mu}=yu,{MAX_NUM_POINTS:Cu,DEFAULT_NUM_POINTS:wu,DEFAULT_NUM_LINES:ku}=yu,{DEFAULT_NUM_POINTS:Nu}=yu,Tu=({layoutService:e,largeDataService:t})=>{if(!xu({layoutService:e,largeDataService:t})){const{maxNumPoints:e=Nu}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:r=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:o=ku,maxNumPoints:i=wu,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Eu({layoutService:e,largeDataService:t})*r[0]<=i)return r[0];const s=Math.max(1,Math.min(o,r[1])),l=i/s,c=Math.floor(r[0]<=l?l:l/4),u=2*s*(s+1);return a&&(s>ku||i>wu)?Math.min(c,Math.ceil(Cu/u)):c})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Mu}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},o=4+2*(r-1);return Math.floor(n/(r*o))})({layoutService:e,largeDataService:t})};function Ou({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>xu({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Tu({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Eu({layoutService:t,largeDataService:n}),fetch:(o,i)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:o,definitionPath:i})=>{const a={qStart:e,qEnd:t,qNbrPoints:Tu({layoutService:r,largeDataService:o}),qMaxNbrTicks:300,qMaxNumberLines:Eu({layoutService:r,largeDataService:o})};return n.getHyperCubeContinuousData(i,a,!1)})({start:o,end:i,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function Ru(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Au({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 Lu(){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 Iu(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],o=Lu(),i=Lu();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 Pu(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Du(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=Iu(e,t,n.qMatrix),o=Pu(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 qu=2**.5,zu=1/qu;function $u(e){return e.qIsOtherCell}function Bu({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some($u)){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($u)||t++})),t}(n)}const Fu={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var Hu={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 ju(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Vu(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},tickValue:e.value}}}}(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=ju(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=o&&n.value<=i,x1:l,y1:0,x2:l,y2:ju(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(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 Wu(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=ju(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:i,y1:ju(o,n.minorGuideLine.strokeWidth),x2:i,y2:ju(t.guideLine.minor.size+o,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function _u(e){return e.filter((e=>e.show)).map((e=>Q({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var Uu={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=ju(1,t.line.strokeWidth);return{show:n.line.show,x1:ju(0,t.line.strokeWidth),y1:r,x2:ju(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=Vu(n,this),this.state.minor=Wu(r,this)},render(){return[..._u([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>Q({},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",tickValue:e.tickValue})))),..._u(this.state.major.map((e=>e.guideLine))),..._u(this.state.minor.map((e=>e.guideLine)))];var e}};function Yu(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 Gu(e){return e.qTags.indexOf("$qualified")>-1}function Ku({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const o=r+1,i=e[r],a=e[o];Yu(i,a)?(Gu(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 Xu({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 Ju({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 Zu({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 Qu({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:o,scale:i},{attributesFactory:a=Ju,queryFactory:s=Zu}={attributesFactory:Ju,queryFactory:Zu}){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 ed({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:o},{metaFactory:i=Qu,mapper:a=Ku,resolver:s=Xu}={metaFactory:Qu,mapper:Ku,resolver:Xu}){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 td(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const nd=td(0).getTime();function rd(e){return(e.getTime()-nd)/86400/1e3}var od=new Date,id=new Date;function ad(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 ad((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 od.setTime(+t),id.setTime(+r),e(od),e(id),Math.floor(n(od,id))},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 sd=ad((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));sd.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ad((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):sd:null},sd.range;var ld=1e3,cd=6e4,ud=36e5,dd=864e5,pd=6048e5,md=ad((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*ld)}),(function(e,t){return(t-e)/ld}),(function(e){return e.getUTCSeconds()}));function fd(e){return ad((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())*cd)/pd}))}md.range,ad((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ld)}),(function(e,t){e.setTime(+e+t*cd)}),(function(e,t){return(t-e)/cd}),(function(e){return e.getMinutes()})).range,ad((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ld-e.getMinutes()*cd)}),(function(e,t){e.setTime(+e+t*ud)}),(function(e,t){return(t-e)/ud}),(function(e){return e.getHours()})).range,ad((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())*cd)/dd}),(function(e){return e.getDate()-1})).range;var hd=fd(0),gd=fd(1),vd=fd(2),yd=fd(3),bd=fd(4),xd=fd(5),Sd=fd(6);hd.range,gd.range,vd.range,yd.range,bd.range,xd.range,Sd.range,ad((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 Ed=ad((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()}));Ed.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ad((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},Ed.range;var Md=ad((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*cd)}),(function(e,t){return(t-e)/cd}),(function(e){return e.getUTCMinutes()}));Md.range;var Cd=ad((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*ud)}),(function(e,t){return(t-e)/ud}),(function(e){return e.getUTCHours()}));Cd.range;var wd=ad((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/dd}),(function(e){return e.getUTCDate()-1}));function kd(e){return ad((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)/pd}))}wd.range;var Nd=kd(0),Td=kd(1),Od=kd(2),Rd=kd(3),Ad=kd(4),Ld=kd(5),Id=kd(6);Nd.range,Td.range,Od.range,Rd.range,Ad.range,Ld.range,Id.range;var Pd=ad((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()}));Pd.range;var Dd=ad((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()}));Dd.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ad((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},Dd.range;const qd=1,zd=2,$d=3,Bd=4,Fd=5,Hd=6;function jd({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 Dd.filter((t=>(t.getUTCFullYear()-i.getUTCFullYear())%e==0))}const s=md.count(e,t),l=Md.count(e,t),c=Cd.count(e,t),u=wd.count(e,t),d=Nd.count(e,t),p=Pd.count(e,t),m=Dd.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:Dd.every(1),formatter:r.year.formatter,offset:e=>Dd.offset(e,-1),floor:Dd.floor};if(s<=f)y.type=qd,y.desc="second",y.count=s,y.interval=md.every(1),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-1),y.floor=md.floor;else if(s/2<=f)y.type=qd,y.desc="every other second",y.count=s/2,y.interval=md.every(2),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-2),y.floor=md.floor;else if(s/5<=f)y.type=qd,y.desc="every 5 second",y.count=s/5,y.interval=md.every(5),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-5),y.floor=md.floor;else if(s/15<=f)y.type=qd,y.desc="every 15 second",y.count=s/15,y.interval=md.every(15),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-15),y.floor=md.floor;else if(s/30<=f)y.type=qd,y.desc="every 30 second",y.count=s/30,y.interval=md.every(30),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-30),y.floor=md.floor;else if(l<=h)y.type=zd,y.desc="minute",y.count=l,y.interval=Md.every(1),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-1),y.floor=Md.floor;else if(l/2<=h)y.type=zd,y.desc="every 2 minute",y.count=l/2,y.interval=Md.every(2),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-2),y.floor=Md.floor;else if(l/5<=h)y.type=zd,y.desc="every 5 minute",y.count=l/5,y.interval=Md.every(5),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-5),y.floor=Md.floor;else if(l/10<=h)y.type=zd,y.desc="every 10 minute",y.count=l/10,y.interval=Md.every(10),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-10),y.floor=Md.floor;else if(l/15<=h)y.type=zd,y.desc="every 15 minute",y.count=l/15,y.interval=Md.every(15),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-15),y.floor=Md.floor;else if(l/30<=h)y.type=zd,y.desc="every 30 minute",y.count=l/30,y.interval=Md.every(30),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-30),y.floor=Md.floor;else if(c<=h)y.type=$d,y.desc="hour",y.count=c,y.interval=Cd.every(1),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-1),y.floor=Cd.floor;else if(c/2<=h)y.type=$d,y.desc="every 2 hour",y.count=c/2,y.interval=Cd.every(2),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-2),y.floor=Cd.floor;else if(c/3<=h)y.type=$d,y.desc="every 3 hour",y.count=c/3,y.interval=Cd.every(3),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-3),y.floor=Cd.floor;else if(c/6<=h)y.type=$d,y.desc="every 6 hour",y.count=c/6,y.interval=Cd.every(6),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-6),y.floor=Cd.floor;else if(c/12<=h||o)y.type=$d,y.desc="every 12 hour",y.count=c/12,y.interval=Cd.every(12),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-12),y.floor=Cd.floor;else if(u<=g)y.type=Bd,y.desc="day",y.count=u,y.interval=wd.every(1),y.formatter=r.date.formatter,y.offset=e=>wd.offset(e,-1),y.floor=wd.floor;else if(u/2<=g)y.type=Bd,y.desc="every 2 day",y.count=u/2,y.interval=wd.every(2),y.formatter=r.date.formatter,y.offset=e=>wd.offset(e,-2),y.floor=wd.floor;else if(u/3<=g)y.type=Bd,y.desc="every 3 day",y.count=u/3,y.interval=wd.every(3),y.formatter=r.date.formatter,y.offset=e=>wd.offset(e,-3),y.floor=wd.floor;else if(d<=g)y.type=Bd,y.desc="week",y.count=d,y.interval=Nd.every(1),y.formatter=r.date.formatter,y.offset=e=>Nd.offset(e,-1),y.floor=wd.floor;else if(d/2<=g)y.type=Bd,y.desc="every 2 week",y.count=d/2,y.interval=Nd.every(2),y.formatter=r.date.formatter,y.offset=e=>Nd.offset(e,-2),y.floor=wd.floor;else if(p<=g)y.type=Fd,y.desc="month",y.count=p,y.interval=Pd.every(1),y.formatter=r.date.formatter,y.offset=e=>Pd.offset(e,-1),y.floor=wd.floor;else if(p/3<=g)y.type=Fd,y.desc="quarter",y.count=p/3,y.interval=Pd.every(3),y.formatter=r.date.formatter,y.offset=e=>Pd.offset(e,-3),y.floor=wd.floor;else if(p/6<=g)y.type=Fd,y.desc="half year",y.count=p/6,y.interval=Pd.every(6),y.formatter=r.date.formatter,y.offset=e=>Pd.offset(e,-6),y.floor=wd.floor;else if(m<=v)y.type=Hd,y.desc="year",y.count=m,y.interval=Dd.every(1),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-1),y.floor=Dd.floor;else if(m/2<=v)y.type=Hd,y.desc="every 2 year",y.count=m/2,y.interval=a(2),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-2),y.floor=Dd.floor;else if(m/5<=v)y.type=Hd,y.desc="every 5 year",y.count=m/5,y.interval=a(5),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-5),y.floor=Dd.floor;else if(m/10<=v)y.type=Hd,y.desc="every 10 year",y.count=m/10,y.interval=a(10),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-10),y.floor=Dd.floor;else{const e=Math.floor(m/v);y.type=Hd,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=r.year.formatter,y.offset=t=>Dd.offset(t,-e),y.floor=Dd.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<=$d){const n=t.getFormat("date"),r=e.ticks(wd.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(wd.offset(r[0],-1)),m=(r.length?r:[wd.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 Vd=86400,Wd=1440,_d={};function Ud(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Yd(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 Ft.apply(ji(go,ho,so,io,oo,ro,Ur,Fr,So).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([td(l),td(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)=>jd({timeScale:u,labels:n,distance:e,isDayOrShorter:o,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:td(r.initialMin)}):e=>function(e,t,n,r,o,i=!1){if(_d[[t,n,r,r,i]])return _d[[t,n,r,r,i]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=td(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,p=t/(o-r),m=p/1440,f=p/Vd,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/Vd):v<2?(k=2,w=1/Vd*2):v<5?(k=5,w=1/Vd*5):v<10?(k=10,w=1/Vd*10):v<30?(k=30,w=1/Vd*30):y<1?(N=1,w=1/Wd):y<2?(N=2,w=1/Wd*2):y<5?(N=5,w=1/Wd*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?Ud("year",[l+E*A,0,1],[l+M*A,0,1],a.year.formatter):R?Ud("month",[l,c+E*R,1],[l,c+M*R,1],a.date.formatter):O?Ud("day",[l,c,u+E*O],[l,c,u+M*O],a.date.formatter):T?Ud("hour",[l,c,u,0+E*T],[l,c,u,0+M*T],a.minute.formatter):N?Ud("minute",[l,c,u,0,0+E*N],[l,c,u,0,0+M*N],a.minute.formatter):Ud("second",[l,c,u,0,0,0+E*k],[l,c,u,0,0,0+M*k],a.second.formatter),C=rd(S.start),L.inner.push(S);const e=Math.floor(C);if(!(i||A||R||O)){const t={type:"day",start:td(e),end:td(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,_d[[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?rd(t.start):"end"===o?rd(t.end):(rd(t.start)+rd(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:rd(t.start),end:rd(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return m}const Gd=/t+/i;const Kd={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 Xd(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 Jd="continuousPan";var Zd={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Fu,viewCache:o,viewState:i,definitionPath:a},s={}){const{engineFetcherFactory:l=Ou,snapshotFetcherFactory:c=Au,cacheFetcherFactory:u=Ru,cache:d={initial:{},merged:{}}}=s,p=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),m=c({layoutService:t,viewCache:o}),f=u({cache:d}),h=e=>{throw e.isHandled=!0,e};let g,v,y;return{update(e){var n,r;({initialMin:v,initialMax:y}=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])),o.set("continuousMin",v),o.set("continuousMax",y),o.set("minimiumZoomSpan",(n=v,r=y,Math.max(1e-6,2.3841857910156157e-7*(r-n)))),g=t.meta.isSnapshot?m:p,t.meta.isSnapshot&&({zoom:{min:v,max:y}}=m.getSnapshotData()),i.preventSet("zoom",{min:v,max:y})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return g.fetch(v,y).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=Pu(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Du(v,y,e))).then((e=>this.updateLayout(e))).catch(h)},fetch:(e,t)=>g.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=Pu(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}(d.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Du(e,t,n))).catch(h),fetchFromCache:(e,t)=>f.fetch(e,t).then((n=>Du(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return Q({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return Q({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Bu(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.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=w(((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 k(((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?zu:qu)*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:Jd,pointers:1,threshold:10,enable(r,o){return this.started===Jd||!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=Jd;const{min:o,max:i}=r.get("zoom");this[Jd]={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[Jd],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:Hu,timeAxis:Uu},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]=Q(!0,{},t[o],i)})),r}(t,Kd,n),{qAxis:o}=r,i=qr(),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=>(Xd(a,p),a.instance(e)),p.normInvert=e=>(Xd(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&&Gd.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=td(t[0].data.start),o=td(t[n-1].data.start);return wd.count(r,o)/n>=1?i.date:Cd.count(r,o)/n>0?i.minute:Md.count(r,o)/n>0?i.second:i.date},t}(r);return u=Yd(i.copy(),r,m),c=ed({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 Qd=e=>e.meta.seriesComponentKeys[0];function ep({chart:e,models:t,actions:n,viewState:r,viewCache:o,environment:i}){const{event:{onZoom:a}}=Zd,{layoutService:s,seriesModel:l}=t,c=Qd(l),u=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:o},{rtl:"rtl"===i.options.direction,threshold:50,targetKey:c}):()=>{};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===Qa.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===c));e&&(u(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const tp="continuousPinchZoom";function np({chart:e,models:t,environment:n,viewState:r,viewCache:o,actions:i,selectables:a}){const s=Zd.interactions.areaPan,{layoutService:l,dockService:c,discreteModel:u,colorService:d,tooltipService:p}=t,m="rtl"===n.options.direction,f=p.getInteractions(),h=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return{gestures:[...Hs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})],native:js({componentKey:e,chart:t,actions:n,layoutService:i})}}({componentKey:"scrollbar",chart:e,actions:i,viewState:r,viewCache:o,discrete:u,layoutService:l,dockService:c,rtl:m}),g={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...h.gestures,...f.gestures]},v=[ep({chart:e,models:t,actions:i,viewState:r,viewCache:o,environment:n}),h.native,f.native];return l.meta.isDiscrete&&(g.gestures.push(...u.interactions.gestures),v.push(u.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:Qd(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=Zd.event.onZoom({viewCache:o,viewState:r,chart:t},{threshold:100,rtl:i,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:tp,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:{[tp+"start"](e){a.last=e.scale,e.preventDefault()},[tp+"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:Qd(t.seriesModel),chart:e,actions:i,viewState:r,viewCache:o,rtl:m})),[g,...v]}const rp="lasso",op=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},o)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:rp,enable(e,n){if(this.started===rp||!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!==rp&&(o.actions.select.emit("start",rp),this.chart.component(e).emit("lassoStart",t),this.started=rp)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),o.actions.select.emit("end",rp),"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});const ip=({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),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:i.largeDataService,chart:this.chart})}}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 ap=({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 sp=({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),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},[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"==typeof i.updateOnEnd&&i.updateOnEnd()}}});function lp(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=sp(e,t,"range");return{interactions:[e.onEdited?ap(e,t):null,r].filter(Boolean),components:[n]}}const cp=/axis|legend/;function up({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:[ip(e,t)],components:[]}}({targets:[`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,...n.query.series(es.MARKER).map((e=>$l(Qa.COMPONENT.MARKER,e))),...n.query.series(es.LINE).map((e=>$l(Qa.COMPONENT.POINT,e))),Qa.COMPONENT.AXIS.MAJOR,Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Qa.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===[Qa.COMPONENT.AXIS.MAJOR,Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Qa.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=>cp.test(e.type))))(e)?0:3,debouncer:w,flags:i})}function dp({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,Qa.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:[sp(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[Qa.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const pp={components:[],interactions:[]};function mp({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"))&&lp({eventName:"minorRange",key:"minor-range-brush",targets:[Qa.COMPONENT.AXIS.MINOR.PRIMARY,`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,...o.query.series(es.MARKER).filter((e=>e.isPrimary)).map((e=>$l(Qa.COMPONENT.MARKER,e))),...o.query.series(es.LINE).filter((e=>e.isPrimary)).map((e=>$l(Qa.COMPONENT.POINT,e)))],fillTargets:[Qa.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:Qa.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||pp,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"))&&lp({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[Qa.COMPONENT.AXIS.MINOR.SECONDARY,`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,...o.query.series(es.MARKER).filter((e=>!e.isPrimary)).map((e=>$l(Qa.COMPONENT.MARKER,e))),...o.query.series(es.LINE).filter((e=>!e.isPrimary)).map((e=>$l(Qa.COMPONENT.POINT,e)))],fillTargets:[Qa.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:Qa.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||pp,a=dp({actions:e,models:n})||pp,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?[Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return lp({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,...i.query.series(es.MARKER).map((e=>$l(Qa.COMPONENT.MARKER,e))),...i.query.series(es.LINE).map((e=>$l(Qa.COMPONENT.POINT,e))),...l],fillTargets:l,dock:o.meta.major.dock,scale:s?Qa.SCALE.MAJOR_INNER:Qa.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const o=s?r.formatter():t.formatter(Qa.FORMATTER.PRIMARY),i=t.scale(Qa.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===i;return`${e!==Math.max(...n)||a?"":"<"}${o(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||pp,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=Qa.SCALE.COLOR+"Range",{type:l,key:c}=o,u=i[s];return!("legend-seq"!==l||!u||u.min>=u.max)&&lp({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})||pp;return{components:[...o.components,...i.components,...a.components,...s.components,...l.components],interactions:[...o.interactions,...i.interactions,...a.interactions,...s.interactions,...l.interactions]}}function fp({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:[op(n,t)],components:[r]}}({key:"lasso",componentTargetKey:o[0],components:o.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function hp({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:ie.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=mu({environment:n,models:t});return"center"===(null==d||null===(a=d.layout)||void 0===a?void 0:a.dock)?[d]:[...Qc({models:t}),...wl({models:t}),...Uc({chart:e,models:t,environment:n,viewState:r,viewCache:o}),gu({models:t,environment:n}),...Al({models:t,environment:n}),...ru({models:t,environment:n,actions:i}),Ui({viewState:r,viewCache:o,layoutService:l,dockService:c}),...cu({models:t}),...uu({chart:e,models:t,environment:n}),ou({models:t,environment:n,viewState:r,viewCache:o}),...s.custom.legendComponents(),fu(t),...lu({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=up({actions:e,models:n});if(i)return{components:[...a.components],gestures:[...a.interactions]};const s=mp({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=fp({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:ul({models:n}),scales:El({picasso:e,models:n,viewState:o,viewCache:i,environment:r}),components:h,formatters:vu({models:n}),interactions:np({chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a,selectables:f}),strategy:p,palettes:l.getPalettes()}}const gp=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:Qa.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),vp=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:Qa.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],yp=[Qa.COMPONENT.AXIS_TITLE.MAJOR,Qa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,Qa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,Qa.COMPONENT.GRID_LINE,Qa.COMPONENT.ZERO_LINE],bp={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function xp(e){return bp[e]||e}function Sp(e){return function(t,n,r){let o,i,a,s,l=[],c=!0;function u(){"function"==typeof o.enable&&(o.enable=o.enable.bind(i)()),o.enable&&(o.gestures.forEach((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));const n=xp(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(i),a.on(e,t.events[e])})),l.push(t))})),o.gestures.forEach((t=>{const n=xp(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,o=e,i={chart:t,mediator:n,settings:o},o.gestures=o.gestures||[],void 0===o.enable&&(o.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,i=null,o=null}}}}function Ep(){return(Ep=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 Mp={exports:{}};function Cp(){}function wp(){}wp.resetWarningCache=Cp;Mp.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:wp,resetWarningCache:Cp};return n.PropTypes=n,n}();var kp={black:"#000",white:"#fff"},Np="#e57373",Tp="#f44336",Op="#d32f2f",Rp="#ff4081",Ap="#f50057",Lp="#c51162",Ip="#7986cb",Pp="#3f51b5",Dp="#303f9f",qp={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 zp(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 $p(e){if(e.type)return e;if("#"===e.charAt(0))return $p(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 Bp(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 Fp(e){var t="hsl"===(e=$p(e)).type?$p(function(e){var t=(e=$p(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])),Bp({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 Hp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return Fp(e)>.5?Vp(e,t):Wp(e,t)}function jp(e,t){return e=$p(e),t=zp(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,Bp(e)}function Vp(e,t){if(e=$p(e),t=zp(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 Bp(e)}function Wp(e,t){if(e=$p(e),t=zp(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 Bp(e)}function _p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Up(){return(Up=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 Yp(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}function Gp(e,t){if(null==e)return{};var n,r,o=Yp(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 Kp(e){return(Kp="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 Xp(e){return(Xp="function"==typeof Symbol&&"symbol"===Kp(Symbol.iterator)?function(e){return Kp(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Kp(e)})(e)}function Jp(e){return e&&"object"===Xp(e)&&!Array.isArray(e)}function Zp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Up({},e):e;return Jp(e)&&Jp(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Jp(t[o])&&o in e?r[o]=Zp(e[o],t[o],n):r[o]=t[o])})),r}(Mp.exports.element,function(){return null}).isRequired=(Mp.exports.element.isRequired,function(){return null});var Qp={exports:{}},em={};
8
8
  /** @license React v16.11.0
9
9
  * react-is.production.min.js
10
10
  *
@@ -44,4 +44,4 @@ Object.defineProperty(em,"__esModule",{value:!0});var tm="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 ME=SE&&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()}),EE))}};function CE(e){return e&&"[object Function]"==={}.toString.call(e)}function wE(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function kE(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function NE(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=wE(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:NE(kE(e))}function TE(e){return e&&e.referenceNode?e.referenceNode:e}var OE=SE&&!(!window.MSInputMethodContext||!document.documentMode),RE=SE&&/MSIE 10/.test(navigator.userAgent);function AE(e){return 11===e?OE:10===e?RE:OE||RE}function LE(e){if(!e)return document.documentElement;for(var t=AE(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"===wE(n,"position")?LE(n):n:e?e.ownerDocument.documentElement:document.documentElement}function IE(e){return null!==e.parentNode?IE(e.parentNode):e}function PE(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&&LE(a.firstElementChild)!==a?LE(l):l;var c=IE(e);return c.host?PE(c.host,t):PE(e,IE(t).host)}function DE(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 qE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=DE(t,"top"),o=DE(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 zE(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],AE(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function BE(e){var t=e.body,n=e.documentElement,r=AE(10)&&getComputedStyle(n);return{height:$E("Height",t,n,r),width:$E("Width",t,n,r)}}var FE=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},HE=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}}(),jE=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},VE=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 WE(e){return VE({},e,{right:e.left+e.width,bottom:e.top+e.height})}function _E(e){var t={};try{if(AE(10)){t=e.getBoundingClientRect();var n=DE(e,"top"),r=DE(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?BE(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=wE(e);l-=zE(u,"x"),c-=zE(u,"y"),o.width-=l,o.height-=c}return WE(o)}function UE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=AE(10),o="HTML"===t.nodeName,i=_E(e),a=_E(t),s=NE(e),l=wE(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=WE({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=qE(d,t)),d}function YE(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=UE(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:DE(n),s=t?0:DE(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return WE(l)}function GE(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===wE(e,"position"))return!0;var n=kE(e);return!!n&&GE(n)}function KE(e){if(!e||!e.parentElement||AE())return document.documentElement;for(var t=e.parentElement;t&&"none"===wE(t,"transform");)t=t.parentElement;return t||document.documentElement}function XE(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?KE(e):PE(e,TE(t));if("viewport"===r)i=YE(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=NE(kE(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=UE(s,a,o);if("HTML"!==s.nodeName||GE(a))i=l;else{var c=BE(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 JE(e){return e.width*e.height}function ZE(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=XE(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 VE({key:e},s[e],{area:JE(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 QE(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?KE(t):PE(t,TE(n));return UE(n,o,r)}function eM(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 tM(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 nM(e,t,n){n=n.split("-")[0];var r=eM(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[tM(s)],o}function rM(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function oM(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=rM(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&&CE(n)&&(t.offsets.popper=WE(t.offsets.popper),t.offsets.reference=WE(t.offsets.reference),t=n(t,e))})),t}function iM(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=QE(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=ZE(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=nM(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=oM(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function aM(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function sM(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 lM(){return this.state.isDestroyed=!0,aM(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[sM("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function cM(e){var t=e.ownerDocument;return t?t.defaultView:window}function uM(e,t,n,r){var o="BODY"===e.nodeName,i=o?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),o||uM(NE(i.parentNode),t,n,r),r.push(i)}function dM(e,t,n,r){n.updateBound=r,cM(e).addEventListener("resize",n.updateBound,{passive:!0});var o=NE(e);return uM(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function pM(){this.state.eventsEnabled||(this.state=dM(this.reference,this.options,this.state,this.scheduleUpdate))}function mM(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,cM(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 fM(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function hM(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&fM(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var gM=SE&&/Firefox/i.test(navigator.userAgent);function vM(e,t,n){var r=rM(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 yM=["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"],bM=yM.slice(3);function xM(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=bM.indexOf(e),r=bM.slice(n+1).concat(bM.slice(0,n));return t?r.reverse():r}var SM="flip",EM="clockwise",MM="counterclockwise";function CM(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(rM(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 WE(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){fM(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var wM={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:jE({},l,i[l]),end:jE({},l,i[l]+i[c]-a[c])};e.offsets.popper=VE({},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=fM(+n)?[+n,0]:CM(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||LE(e.instance.popper);e.instance.reference===n&&(n=LE(n));var r=sM("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var l=XE(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])),jE({},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))),jE({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=VE({},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(!vM(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=eM(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=WE(e.offsets.popper);var h=s[d]+s[c]/2-f/2,g=wE(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=(jE(n={},d,Math.round(b)),jE(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(aM(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=XE(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=tM(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case SM:a=[r,o];break;case EM:a=xM(r);break;case MM:a=xM(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=tM(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=VE({},e.offsets.popper,nM(e.instance.popper,e.offsets.reference,e.placement)),e=oM(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=tM(t),e.offsets.popper=WE(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!vM(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=rM(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=rM(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=LE(e.instance.popper),l=_E(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||!gM),d="bottom"===n?"top":"bottom",p="right"===r?"left":"right",m=sM("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=VE({},y,e.attributes),e.styles=VE({},c,e.styles),e.arrowStyles=VE({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return hM(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&&hM(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){var i=QE(o,t,e,n.positionFixed),a=ZE(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),hM(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},kM=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};FE(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=ME(this.update.bind(this)),this.options=VE({},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(VE({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=VE({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return VE({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&CE(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 HE(e,[{key:"update",value:function(){return iM.call(this)}},{key:"destroy",value:function(){return lM.call(this)}},{key:"enableEventListeners",value:function(){return pM.call(this)}},{key:"disableEventListeners",value:function(){return mM.call(this)}}]),e}();function NM(e){return"function"==typeof e?e():e}kM.Utils=("undefined"!=typeof window?window:global).PopperUtils,kM.placements=yM,kM.Defaults=wM;var TM="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,OM={},RM=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?OM:m,h=e.popperRef,g=e.transition,v=void 0!==g&&g,y=Gp(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),b=B.useRef(null),x=ey(b,t),S=B.useRef(null),E=ey(S,h),M=B.useRef(E);TM((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)};NM(n);var t=new kM(NM(n),b.current,Up({placement:N},f,{modifiers:Up({},a?{}:{preventOverflow:{boundariesElement:"window"}},{},c,{},f.modifiers),onCreate:rx(e,f.onCreate),onUpdate:rx(e,f.onUpdate)}));M.current(t)}}),[n,a,c,u,N,f]),L=B.useCallback((function(e){Qv(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(nx,{disablePortal:a,container:o},B.createElement("div",Up({ref:L,role:"tooltip"},y,{style:Up({position:"fixed",top:0,left:0},y.style)}),"function"==typeof r?r(P):r))})),AM=hb(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"})),LM=hb(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"})),IM=B.createElement(AM,null);var PM=bv((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:ev(n.root,t&&n.checked)},IM,B.createElement(LM,{className:n.layer}))})),DM=B.createContext(),qM=B.createElement(PM,{checked:!0}),zM=B.createElement(PM,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=Gp(e,["checked","classes","color","name","onChange"]),c=B.useContext(DM),u=n,d=rx(s,c&&c.onChange),p=a;return c&&(void 0===u&&(u=c.value===e.value),void 0===p&&(p=c.name)),B.createElement(qb,Up({color:i,type:"radio",icon:zM,checkedIcon:qM,classes:{root:ev(r.root,r["color".concat(xv(i))]),checked:r.checked,disabled:r.disabled},name:p,checked:u,onChange:d,ref:t},l))}));function BM(e,t){return"object"===Xp(t)&&null!==t?e===t:String(e)===String(t)}bv((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:jp(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:jp(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=Gp(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=ey(t,l);return B.createElement(rS,Up({role:"radiogroup",ref:f},s),B.createElement(DM.Provider,{value:m},r))})),B.Component;var FM=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=Gp(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=ey(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)?Ih(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;(Ux({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 BM(t,e.props.value)})))&&ne&&te.push(e.props.children)}else(t=BM(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",Up({className:ev(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",Up({value:Array.isArray(q)?q.join(","):q,name:g,ref:z,type:"hidden",autoFocus:n},A)),B.createElement(d,{className:ev(i.icon,i["icon".concat(xv(R))],ee&&i.iconOpen)}),B.createElement(lE,Up({id:"menu-".concat(g||""),anchorEl:F,open:ee,onClose:function(e){Z(!1,e)}},f,{MenuListProps:Up({"aria-labelledby":u,role:"listbox",disableListWrap:!0},f.MenuListProps),PaperProps:Up({},f.PaperProps,{style:Up({minWidth:ie},null!=f.PaperProps?f.PaperProps.style:null)})}),re))})),HM=fE,jM=B.createElement(NS,null),VM=B.createElement(Jx,null),WM=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?mE: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=Gp(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),R=b?pE:FM,A=Fx({props:t,muiFormControl:Lb(),states:["variant"]}).variant||k,L=p||{standard:jM,outlined:B.createElement(xE,{labelWidth:T}),filled:VM}[A];return B.cloneElement(L,Up({inputComponent:R,select:!0,inputProps:Up({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:Up({id:d},C)},{},m,{classes:m?Ag({baseClasses:a,newClasses:m.classes,Component:e}):a},p?p.props.inputProps:{}),ref:n},O))}));WM.muiName="Select";var _M=bv(HM,{name:"MuiSelect"})(WM);var UM=bv((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Up({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:ev(t.props.className,(o||"on"===a)&&n.open,n.thumb)},B.createElement("span",{className:ev(n.offset,r)},B.createElement("span",{className:n.circle},B.createElement("span",{className:n.label},i))))}));function YM(e,t){return e-t}function GM(e,t,n){return e<t?t:e>n?n:e}function KM(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 XM(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 JM(e,t,n){return 100*(e-t)/(n-t)}function ZM(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 QM(e){var t=e.values,n=e.source,r=e.newValue,o=e.index;if(t[o]===r)return n;var i=Ih(t);return i[o]=r,i}function eC(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 tC={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,"%")}}}},nC=[],rC=function(e){return e},oC=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?nC: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?UM:D,z=e.valueLabelDisplay,$=void 0===z?"off":z,F=e.valueLabelFormat,H=void 0===F?rC:F,j=Gp(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=yv(),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?Ih(te).sort(YM):[te];oe=oe.map((function(e){return GM(e,S,b)}));var ie=!0===v&&null!==O?Ih(Array(Math.floor((b-S)/O)+1)).map((function(e,t){return{value:S+O*t}})):v;re.current={source:te};var ae=Sy(),se=ae.isFocusVisible,le=ae.onBlurVisible,ce=ae.ref,ue=B.useState(-1),de=ue[0],pe=ue[1],me=B.useRef(),fe=ey(ce,me),he=ey(t,fe),ge=cy((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));se(e)&&pe(t),J(t)})),ve=cy((function(){-1!==de&&(pe(-1),le()),J(-1)})),ye=cy((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));J(t)})),be=cy((function(){J(-1)})),xe=cy((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=ZM(t,O)),t=GM(t,S,b),ne){var s=t;t=QM({values:oe,source:te,newValue:t,index:n}).sort(YM),eC({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=ZM(n,O);else{var m=ie.map((function(e){return e.value}));n=m[KM(m,n)]}n=GM(n,S,b);var f=0;if(ne){var h=n;f=(n=QM({values:a,source:s,newValue:n,index:f=i?Se.current:KM(a,n)}).sort(YM)).indexOf(h),Se.current=f}return{newValue:n,activeIndex:f}}),[b,S,Ee,ne,O,ie]),Ce=cy((function(e){var t=XM(e,_);if(t){var n=Me({finger:t,move:!0,values:oe,source:te}),r=n.newValue,o=n.activeIndex;eC({sliderRef:me,activeIndex:o,setActive:G}),W||ee(r),M&&M(e,r)}})),we=cy((function(e){var t=XM(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=cy((function(e){0===e.buttons&&we(e)})),Ne=cy((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(_.current=t.identifier);var n=XM(e,_),r=Me({finger:n,values:oe,source:te}),o=r.newValue,i=r.activeIndex;eC({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=cy((function(e){w&&w(e),e.preventDefault();var t=XM(e,_),n=Me({finger:t,values:oe,source:te}),r=n.newValue,o=n.activeIndex;eC({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=JM(ne?oe[0]:S,S,b),Re=JM(oe[oe.length-1],S,b)-Oe,Ae=Up({},tC[Ee].offset(Oe),{},tC[Ee].leap(Re));return B.createElement(u,Up({ref:he,className:ev(i.root,i["color".concat(xv(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=JM(e.value,S,b),r=tC[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:ev(i.mark,t&&i.markActive)}),B.createElement("span",{"aria-hidden":!0,style:r,className:ev(i.markLabel,t&&i.markLabelActive)},e.label))})),oe.map((function(e,t){var a=JM(e,S,b),s=tC[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:ev(i.thumb,i["thumbColor".concat(xv(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}))})))}));bv((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?Wp(e.palette.primary.main,.62):Vp(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(jp(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(jp(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(jp(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(jp(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:Up({},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"})(oC);var iC=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=Gp(e,["action","classes","className","message","role"]);return B.createElement(Ev,Up({component:pb,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:s,square:!0,elevation:6,className:ev(r.root,o),ref:t},l),B.createElement("div",{className:r.message},i),n?B.createElement("div",{className:r.action},n):null)})),aC=bv((function(e){var t="light"===e.palette.type?.8:.98,n=Hp(e.palette.background.default,t);return{root:_p({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"})(iC),sC=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?yS:k,T=e.transitionDuration,O=void 0===T?{enter:zm.enteringScreen,exit:zm.leavingScreen}:T,R=e.TransitionProps,A=Gp(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(Jb,Up({onClickAway:function(e){h&&h(e,"clickaway")}},u),B.createElement("div",Up({className:ev(l.root,l["anchorOrigin".concat(xv(o)).concat(xv(i))],c),onMouseEnter:function(e){E&&E(e),z()},onMouseLeave:function(e){M&&M(e),$()},ref:t},A),B.createElement(N,Up({appear:!0,in:C,onEnter:rx((function(){D(!1)}),g),onEntered:v,onEntering:y,onExit:b,onExited:rx((function(){D(!0)}),x),onExiting:S,timeout:O,direction:"top"===o?"down":"up"},R),s||B.createElement(aC,Up({message:f,action:n},d)))))}));bv((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:Up({},t,_p({},e.breakpoints.up("sm"),Up({},i,{},c))),anchorOriginBottomCenter:Up({},n,_p({},e.breakpoints.up("sm"),Up({},a,{},c))),anchorOriginTopRight:Up({},t,{},r,_p({},e.breakpoints.up("sm"),Up({left:"auto"},i,{},s))),anchorOriginBottomRight:Up({},n,{},r,_p({},e.breakpoints.up("sm"),Up({left:"auto"},a,{},s))),anchorOriginTopLeft:Up({},t,{},o,_p({},e.breakpoints.up("sm"),Up({right:"auto"},i,{},l))),anchorOriginBottomLeft:Up({},n,{},o,_p({},e.breakpoints.up("sm"),Up({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})(sC);var lC=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=Gp(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return B.createElement("div",Up({className:ev(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,Up({active:r,alternativeLabel:o,completed:c,disabled:p,last:f,icon:m+1,orientation:h},e.props)):null})))}));bv({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(lC);var cC=hb(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"})),uC=hb(B.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),dC=B.createElement("circle",{cx:"12",cy:"12",r:"12"}),pC=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(uC,{className:ev(c.root,c.error),ref:t}):r?B.createElement(cC,{className:ev(c.root,c.completed),ref:t}):B.createElement(fb,{className:ev(c.root,a&&c.active),ref:t},dC,B.createElement("text",{className:c.text,x:"12",y:"16",textAnchor:"middle"},o)):o})),mC=bv((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"})(pC),fC=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=Gp(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),E=b;return h&&!E&&(E=mC),B.createElement("span",Up({className:ev(s.root,s[y],l,p&&s.disabled,i&&s.alternativeLabel,f&&s.error),ref:t},S),h||E?B.createElement("span",{className:ev(s.iconContainer,i&&s.alternativeLabel)},B.createElement(E,Up({completed:u,active:r,error:f,icon:h},x))):null,B.createElement("span",{className:s.labelContainer},B.createElement(pb,{variant:"body2",component:"span",className:ev(s.label,i&&s.alternativeLabel,u&&s.completed,r&&s.active,f&&s.error),display:"block"},a),g))}));fC.muiName="StepLabel";var hC=bv((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"})(fC),gC=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=Gp(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=Zx(o,["StepLabel"])?B.cloneElement(o,m):B.createElement(hC,m,o);return B.createElement(Ty,Up({disabled:l,TouchRippleProps:{className:i.touchRipple},className:ev(i.root,i[d],a),ref:t},p),f)}));bv({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"})(gC);var vC=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=Gp(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return B.createElement("div",Up({className:ev(i.root,i[u],a,o&&i.alternativeLabel,n&&i.active,s&&i.completed,l&&i.disabled),ref:t},d),B.createElement("span",{className:ev(i.line,"vertical"===u?i.lineVertical:i.lineHorizontal)}))})),yC=bv((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"})(vC),bC=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?Qb:s,c=e.transitionDuration,u=void 0===c?"auto":c,d=e.TransitionProps,p=Gp(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",Up({className:ev(o.root,i,a&&o.last),ref:t},p),B.createElement(l,Up({in:n,className:o.transition,timeout:m,unmountOnExit:!0},d),r))}));bv((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"})(bC);var xC=B.createElement(yC,null),SC=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?xC:c,d=e.nonLinear,p=void 0!==d&&d,m=e.orientation,f=void 0===m?"horizontal":m,h=Gp(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,Up({key:t},o)),B.cloneElement(e,Up({},n,{},o,{},e.props))]}));return B.createElement(Ev,Up({square:!0,elevation:0,className:ev(s.root,s[f],l,i&&s.alternativeLabel),ref:t},h),y)}));bv({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(SC);var EC=B.forwardRef((function(e,t){var n=e.anchor,r=e.classes,o=e.className,i=e.width,a=Gp(e,["anchor","classes","className","width"]);return B.createElement("div",Up({className:ev(r.root,r["anchor".concat(xv(n))],o),ref:t,style:_p({},Ox(n)?"width":"height",i)},a))})),MC=bv((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"})(EC),CC=null;function wC(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function kC(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function NC(e,t){return e?t.clientWidth:t.clientHeight}function TC(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var OC="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),RC={enter:zm.enteringScreen,exit:zm.leavingScreen},AC="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?OC: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=Gp(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?RC:k,T=e.variant,O=void 0===T?"temporary":T,R=Gp(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),A=yv(),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();AC((function(){H.current=null}),[x]);var j=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",Zv({timeout:N},{mode:o}))),s&&(m.webkitTransition=f,m.transition=f),!i&&!u){var h=z.current.style;h.opacity=1-e/NC(d,$.current),s&&(h.webkitTransition=f,h.transition=f)}}),[r,i,u,A,N]),W=cy((function(e){if(F.current)if(CC=null,F.current=!1,P(!1),D.current.isSwiping){D.current.isSwiping=null;var t,n=Rx(A,r),o=Ox(r);t=o?wC(n,e.changedTouches):kC(n,e.changedTouches);var i=o?D.current.startX:D.current.startY,a=NC(o,$.current),s=TC(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():j(0,{mode:"exit"}):D.current.velocity<-f||1-l>p?b():j(NC(o,$.current),{mode:"enter"})}else D.current.isSwiping=null})),_=cy((function(e){if($.current&&F.current&&(null==CC||CC===D.current)){var t=Rx(A,r),n=Ox(r),o=wC(t,e.touches),i=kC(t,e.touches);if(x&&$.current.contains(e.target)&&null==CC){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(CC=a);CC=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=NC(n,$.current),p=n?D.current.startX:D.current.startY;x&&!D.current.paperHit&&(p=Math.min(p,d));var m=TC(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(),j(m)}}})),U=cy((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=wC(t,e.touches),i=kC(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,CC=null,D.current.startX=o,D.current.startY=i,P(!0),!x&&$.current&&j(NC(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(){CC===D.current&&(CC=null)}}),[]),B.useEffect((function(){x||P(!1)}),[x]);var Y=B.useCallback((function(e){z.current=V.findDOMNode(e)}),[]),G=B.useCallback((function(e){$.current=V.findDOMNode(e)}),[]);return B.createElement(B.Fragment,null,B.createElement(Ix,Up({open:!("temporary"!==O||!I)||x,variant:O,ModalProps:Up({BackdropProps:Up({},g,{ref:Y})},v),PaperProps:Up({},E,{style:Up({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(dy,null,B.createElement(MC,Up({anchor:r,ref:q,width:w},M))))}));var LC=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=Gp(e,["classes","className","color","edge","size"]),d=B.createElement("span",{className:n.thumb});return B.createElement("span",{className:ev(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[s],{small:n["size".concat(xv(c))]}[c])},B.createElement(qb,Up({type:"checkbox",icon:d,checkedIcon:d,classes:{root:ev(n.switchBase,n["color".concat(xv(i))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},u)),B.createElement("span",{className:n.track}))}));bv((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:jp(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:jp(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"})(LC);var IC=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=Gp(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return B.createElement(Ty,Up({focusRipple:!s,className:ev(n.root,n["textColor".concat(xv(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)}));bv((function(e){var t;return{root:Up({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},_p(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),_p(t,"overflow","hidden"),_p(t,"whiteSpace","normal"),_p(t,"textAlign","center"),_p(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"})(IC);var PC=B.createContext(),DC=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=Gp(e,["classes","className","component","padding","size","stickyHeader"]),m=B.useMemo((function(){return{padding:s,size:c,stickyHeader:d}}),[s,c,d]);return B.createElement(PC.Provider,{value:m},B.createElement(i,Up({ref:t,className:ev(n.root,r,d&&n.stickyHeader)},p)))}));bv((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Up({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(DC);var qC=B.createContext(),zC={variant:"body"},$C=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tbody":o,a=Gp(e,["classes","className","component"]);return B.createElement(qC.Provider,{value:zC},B.createElement(i,Up({className:ev(n.root,r),ref:t},a)))}));bv({root:{display:"table-row-group"}},{name:"MuiTableBody"})($C);var BC=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=Gp(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),f=B.useContext(PC),h=B.useContext(qC);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,Up({ref:t,className:ev(i.root,i[b],a,"inherit"!==o&&i["align".concat(xv(o))],"default"!==v&&i["padding".concat(xv(v))],"medium"!==y&&i["size".concat(xv(y))],{head:f&&f.stickyHeader&&i.stickyHeader}[b]),"aria-sort":x,scope:g},m))})),FC=bv((function(e){return{root:Up({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Wp(jp(e.palette.divider,1),.88):Vp(jp(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"})(BC),HC={variant:"footer"},jC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tfoot":o,a=Gp(e,["classes","className","component"]);return B.createElement(qC.Provider,{value:HC},B.createElement(i,Up({className:ev(n.root,r),ref:t},a)))}));bv({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(jC);var VC={variant:"head"},WC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"thead":o,a=Gp(e,["classes","className","component"]);return B.createElement(qC.Provider,{value:VC},B.createElement(i,Up({className:ev(n.root,r),ref:t},a)))}));bv({root:{display:"table-header-group"}},{name:"MuiTableHead"})(WC);var _C=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=Gp(e,["classes","className","component","disableGutters","variant"]);return B.createElement(i,Up({className:ev(n.root,n[c],r,!s&&n.gutters),ref:t},u))})),UC=bv((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:_p({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"})(_C),YC=hb(B.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),GC=hb(B.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),KC=B.createElement(GC,null),XC=B.createElement(YC,null),JC=B.createElement(YC,null),ZC=B.createElement(GC,null),QC=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=Gp(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=yv();return B.createElement("div",Up({ref:t},l),B.createElement(Pb,Up({onClick:function(e){i(e,a-1)},disabled:0===a,color:"inherit"},n),"rtl"===c.direction?KC:XC),B.createElement(Pb,Up({onClick:function(e){i(e,a+1)},disabled:a>=Math.ceil(r/s)-1,color:"inherit"},o),"rtl"===c.direction?JC:ZC))})),ew=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(-1===n?r:n," of ").concat(r)},tw=[10,25,50,100],nw=B.forwardRef((function(e,t){var n,r=e.ActionsComponent,o=void 0===r?QC:r,i=e.backIconButtonProps,a=e.classes,s=e.className,l=e.colSpan,c=e.component,u=void 0===c?FC:c,d=e.count,p=e.labelDisplayedRows,m=void 0===p?ew: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?tw:S,M=e.SelectProps,C=void 0===M?{}:M,w=Gp(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);u!==FC&&"td"!==u||(n=l||1e3);var k=C.native?"option":uE;return B.createElement(u,Up({className:ev(a.root,s),colSpan:n,ref:t},w),B.createElement(UC,{className:a.toolbar},B.createElement("div",{className:a.spacer}),E.length>1&&B.createElement(pb,{color:"inherit",variant:"body2",className:a.caption},h),E.length>1&&B.createElement(_M,Up({classes:{select:a.select,icon:a.selectIcon},input:B.createElement(Kx,{className:ev(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(pb,{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})))}));bv((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"})(nw);var rw=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=Gp(e,["classes","className","component","hover","selected"]),d=B.useContext(qC);return B.createElement(i,Up({ref:t,className:ev(n.root,r,d&&{head:n.head,footer:n.footer}[d.variant],s&&n.hover,c&&n.selected)},u))}));bv((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"})(rw);var ow=hb(B.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),iw=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?ow:d,m=Gp(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return B.createElement(Ty,Up({className:ev(i.root,a,r&&i.active),component:"span",disableRipple:!0,ref:t},m),o,u&&!r?null:B.createElement(p,{className:ev(i.icon,i["iconDirection".concat(xv(l))])}))}));bv((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"})(iw);var aw,sw=!("undefined"==typeof window||!window.document||!window.document.createElement);function lw(){if(aw)return aw;if(!sw||!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),aw="reverse",e.scrollLeft>0?aw="default":(e.scrollLeft=1,0===e.scrollLeft&&(aw="negative")),document.body.removeChild(e),aw}function cw(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=lw();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 uw(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var dw={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function pw(e){var t=e.onChange,n=Gp(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",Up({style:dw,ref:o},n))}var mw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=e.orientation,a=Gp(e,["classes","className","color","orientation"]);return B.createElement("span",Up({className:ev(n.root,n["color".concat(xv(o))],r,{vertical:n.vertical}[i]),ref:t},a))})),fw=bv((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"})(mw),hw=B.createElement(YC,{fontSize:"small"}),gw=B.createElement(GC,{fontSize:"small"}),vw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.direction,i=e.orientation,a=e.visible,s=Gp(e,["classes","className","direction","orientation","visible"]),l=ev(n.root,r,{vertical:n.vertical}[i]);return a?B.createElement(Ty,Up({component:"div",className:l,ref:t,role:null,tabIndex:null},s),"left"===o?hw:gw):B.createElement("div",{className:l})})),yw=bv({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(vw),bw=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?yw: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=Gp(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),N=yv(),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:cw(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=cy((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=(_p(e={},L,o),_p(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?uw: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"===lw()?-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=cy((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=cy((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=cw(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(fw,Up({className:a.indicator,orientation:f,color:d},x,{style:Up({},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(pw,{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:ev(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:ev(a.scrollButtons,"on"!==y&&a.scrollButtonsDesktop)}):null,e}();return B.createElement(c,Up({className:ev(a.root,s,R&&a.vertical),ref:t},k),de.scrollButtonStart,de.scrollbarSizeListener,B.createElement("div",{className:ev(a.scroller,T?a.scrollable:a.fixed),style:Y,ref:X,onScroll:se},B.createElement("div",{className:ev(a.flexContainer,R&&a.flexContainerVertical,o&&!T&&a.centered),ref:J,role:"tablist"},ue),z&&le),de.scrollButtonEnd)}));bv((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:_p({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(bw);var xw={standard:NS,filled:Jx,outlined:xE},Sw=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,$=Gp(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],j=F[1],W=B.useRef(null);B.useEffect((function(){if("outlined"===z){var e=V.findDOMNode(W.current);j(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=xw[z],K=B.createElement(G,Up({"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(eS,Up({className:ev(i.root,a),error:u,fullWidth:p,hiddenLabel:f,ref:t,required:T,color:l,variant:z},$),x&&B.createElement(RS,Up({htmlFor:h,ref:W,id:Y},g),x),L?B.createElement(_M,Up({"aria-describedby":U,id:h,labelId:Y,value:D,input:K},I),o):K,m&&B.createElement(iS,Up({id:U},d),m))}));function Ew(e){return Math.round(1e5*e)/1e5}bv({root:{}},{name:"MuiTextField"})(Sw);var Mw=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?yS:T,R=e.TransitionProps,A=Gp(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),L=yv(),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),j=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){j||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=Sy(),Z=J.isFocusVisible,Q=J.onBlurVisible,ee=J.ref,te=B.useState(!1),ne=te[0],re=te[1],oe=function(e){j||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=ey(F,t),se=ey(ee,ae),le=B.useCallback((function(e){Qv(se,V.findDOMNode(e))}),[se]),ce=ey(n.ref,le),ue=j?M:P;""===N&&(ue=!1);var de=!ue&&!s,pe=Up({"aria-describedby":ue?f||W.current:null,title:de&&"string"==typeof N?N:null},A,{},n.props,{className:ev(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,Up({ref:ce},pe)),B.createElement(RM,Up({className:ev(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,Up({timeout:L.transitions.duration.shorter},n,R),B.createElement("div",{className:ev(r.tooltip,r["tooltipPlacement".concat(xv(t.split("-")[0]))],H.current&&r.touch)},N))})))}));bv((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:jp(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(Ew(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(Ew(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:_p({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:_p({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:_p({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:_p({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(Mw);var Cw={entering:{transform:"none"},entered:{transform:"none"}},ww={enter:zm.enteringScreen,exit:zm.leavingScreen};function kw(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Nw({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const o={fontSize:kw(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?ww:s,c=Gp(e,["children","in","onEnter","onExit","style","timeout"]),u=yv(),d=ey(n.ref,t);return B.createElement(Iv,Up({appear:!0,in:r,onEnter:function(e,t){Jv(e);var n=Zv({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=Zv({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,Up({style:Up({transform:"scale(0)",visibility:"exited"!==e||r?void 0:"hidden"},Cw[e],{},a,{},n.props.style),ref:d},t))}))}));const Tw={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"},Ow={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"},Rw="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Aw={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"},Lw={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 Iw(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.",e.layout);let r=Zi.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 Pw(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),c=Q(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],i||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,o&&o({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),Iw(e,a,c)}))}const Dw=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))};function qw({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives:()=>Dw(i,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).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})))))))),changeTo(e,t){Pw(r,e,t,"qDimensions",a)}}}function zw(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)},id:e.cId};var o}function $w({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:()=>Dw(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).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})))))))),changeTo(e,t){Pw(o,e,t,"qMeasures",i,a)}}}function Bw(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const Fw={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"}}},Hw=({children:e,...t})=>B.createElement(Sb,Ep({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);const jw=Hm({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 Vw=Wm({productionPrefix:"qbfa7",disableGlobal:!0,seed:""});function Ww(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:Ww(o,t,n)},o}function _w(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),Ww(o,a,l,e.invert)}))}const Uw={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(Q({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function Yw({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=Q({},{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 Gw({keys:e,data:t,defaultSettings:n,style:r,settings:o,width:i,height:a,resolver:s}){const l=Q(!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:Q(!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:Q(!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:Q(!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 Kw=["oob"];const Xw={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=Gw({keys:Kw,data:o,defaultSettings:{oob:Uw.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=Yw}){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(Uw.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:Kw,symbol:s,dockValue:n})}},Jw={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Zw=["hat"];function Qw(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 ek({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=Q({},e.hat,{type:"path",d:Qw(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,Q({},e.hat,{type:"path",d:Qw(p)})]}const tk={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=Gw({keys:Zw,data:r,defaultSettings:Jw,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=Yw}){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(...ek({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:Zw})}};var nk="unclassified",rk="equal-equal",ok="equal-higher",ik="equal-lower",ak="equal-void",sk="higher-equal",lk="higher-higher-acute",ck="higher-higher-obtuse",uk="higher-lower-negative",dk="higher-lower-positive",pk="higher-void",mk="lower-equal",fk="lower-higher-negative",hk="lower-higher-positive",gk="lower-lower-acute",vk="lower-lower-obtuse",yk="lower-void",bk="void-equal",xk="void-higher",Sk="void-lower",Ek="void-void";function Mk(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function Ck(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 wk({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?rk:o<i?ok:ik:o===i?r>o?sk:mk:r>o?o<i?Ck(e,t,n)>90?ck:lk:Mk(e,t)>Mk(e,n)?dk:uk:o>i?Ck(e,t,n)>90?vk:gk:Mk(e,t)>Mk(e,n)?hk:fk:r===o?ak:r>o?pk:yk:o===i?bk:o<i?xk:Sk:Ek}function kk({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 Nk=1,Tk=0;function Ok({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*Nk,height:p.height+2*Tk},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:kk({bounds:m,size:a}),border:f?f/2:0,classification:nk,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 Rk({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:Ok({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 Ak={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},Lk={[rk]:[Ak.TOP,Ak.BOTTOM],[ok]:[Ak.BOTTOM,Ak.BOTTOM_RIGHT],[ik]:[Ak.TOP,Ak.TOP_RIGHT],[ak]:[Ak.TOP,Ak.BOTTOM],[sk]:[Ak.LEFT,Ak.BOTTOM_LEFT,Ak.TOP,Ak.TOP_RIGHT],[lk]:[Ak.BOTTOM,Ak.BOTTOM_LEFT,Ak.LEFT,Ak.TOP_RIGHT],[ck]:[Ak.BOTTOM,Ak.TOP],[uk]:[Ak.TOP,Ak.TOP_RIGHT,Ak.RIGHT],[dk]:[Ak.BOTTOM,Ak.BOTTOM_LEFT,Ak.LEFT],[pk]:[Ak.TOP],[mk]:[Ak.TOP],[fk]:[Ak.TOP,Ak.TOP_LEFT],[hk]:[Ak.BOTTOM_RIGHT],[gk]:[Ak.TOP,Ak.TOP_LEFT,Ak.LEFT,Ak.TOP_RIGHT,Ak.RIGHT],[vk]:[Ak.TOP,Ak.BOTTOM],[yk]:[Ak.TOP],[bk]:[Ak.TOP],[xk]:[Ak.TOP,Ak.BOTTOM],[Sk]:[Ak.TOP,Ak.BOTTOM,Ak.LEFT],[Ek]:[Ak.TOP]};function Ik({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}){const l=Rk({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=wk({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(Lk[e.classification]))),p}function Pk({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 Dk({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 qk({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 Dk({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||Dk({line1:e,line2:a})||Dk({line1:e,line2:s})||Dk({line1:e,line2:l})}({line:t,rect:e})))}const zk={x:0,width:0,y:0,height:0};const $k=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Bk=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Fk=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),Hk=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),jk=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Vk=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Wk=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),_k=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var Uk=2.5,Yk=4;const Gk=[Ak.TOP,Ak.TOP_LEFT,Ak.TOP_RIGHT],Kk=[Ak.BOTTOM,Ak.BOTTOM_LEFT,Ak.BOTTOM_RIGHT];function Xk({position:e}){const t={x:Uk,width:-2*Uk,y:0,height:0},n=Gk.indexOf(e)>-1,r=Kk.indexOf(e)>-1;return n&&(t.y=Yk,t.height=-Yk),r&&(t.height=-Yk),t}function Jk({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 Zk({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 Qk({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=Zk({coordinates:Jk({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=Zk({coordinates:Jk({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 eN=void 0;function tN({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys(Ak).map((e=>Ak[e])).filter((t=>-1===e.preferences.indexOf(t)))],o={[Ak.TOP]:$k,[Ak.TOP_RIGHT]:Bk,[Ak.RIGHT]:Fk,[Ak.BOTTOM_RIGHT]:Hk,[Ak.BOTTOM]:jk,[Ak.BOTTOM_LEFT]:Vk,[Ak.LEFT]:Wk,[Ak.TOP_LEFT]:_k},i=[];for(let a=0;a<r.length;a++){const s=r[a],l=o[s]({item:e}),c=Xk({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=()=>Qk({item:e,validator:t,force:n});if(n){const e=a();return e||(i[0]||eN)}return(e.extreme||e.elite)&&a()||eN}function nN({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=zk,ignoreLines:a=!1}){const s={inside:Pk({item:r,placement:o,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=qk({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=tN({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=tN({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,i.push(r),t.setPlacement(r))}))}var rN={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(){const{settings:e}=this.settings,{target:t,enabled:n}=e;if(!this.chart.component(t.point))return[];if("function"==typeof n&&!n())return[];const{allPoints:r}=t,o=r.length?e=>r.includes(e.key):e=>e.key===t.point,i=this.chart.findShapes("circle").filter(o);if(!i.length)return[];const a="horizontal"===e.orientation,s=a?"x":"y";i.sort(((e,t)=>e.localBounds[s]-t.localBounds[s]));const l={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineIndex:e.lineIndex},{height:c,width:u,edgeBleed:d}=this.rect,p={height:c,width:u,edgeBleed:d,insideStrategy:e.insideStrategy},{style:m}=this,f=Ik({nodes:i,extract:l,style:m,measureText:this.renderer.measureText,size:p,horizontal:a,rtl:e.rtl,showLabel:e.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:f}),nN({model:f,size:p,all:e.all}),f.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:m.fontSize,fontFamily:m.fontFamily,fill:m.fill,text:l.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})))}},oN={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var iN={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 aN({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 sN({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 lN({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function cN({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(Qa.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 uN({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?lN:cN)({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 dN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(Qa.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 pN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(Qa.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 mN({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(Qa.SCALE.MAJOR),d=e.scale(Qa.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?dN:pN)({chart:t,selected:a,connection:n,gradient:p,fallback:f})}function fN({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:mN({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 hN({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=uN({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(...fN({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 gN={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:sN({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=hN({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=sN({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return hN({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 vN={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},yN=e=>void 0===e.marker?vN.circle:vN[e.marker],bN=e=>void 0===e.markerFill||e.markerFill;function xN({series:e,layoutService:t}){switch(hu(e)){case es.MARKER:return(e=>({marker:yN(e),fill:bN(e)}))(e);case es.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);default:return{}}}function SN(e=ns,t){return t?e.axis===ts.PRIMARY:e.axis===ts.PRIMARY||hu(e)===es.BAR}var EN={exports:{}};var MN={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};var CN="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}=MN,r=CN,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*$")}(EN,EN.exports);const wN=["includePrerelease","loose","rtl"];var kN=e=>e?"object"!=typeof e?{loose:!0}:wN.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const NN=/^[0-9]+$/,TN=(e,t)=>{const n=NN.test(e),r=NN.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var ON={compareIdentifiers:TN,rcompareIdentifiers:(e,t)=>TN(t,e)};const RN=CN,{MAX_LENGTH:AN,MAX_SAFE_INTEGER:LN}=MN,{re:IN,t:PN}=EN.exports,DN=kN,{compareIdentifiers:qN}=ON;class zN{constructor(e,t){if(t=DN(t),e instanceof zN){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>AN)throw new TypeError(`version is longer than ${AN} characters`);RN("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?IN[PN.LOOSE]:IN[PN.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>LN||this.major<0)throw new TypeError("Invalid major version");if(this.minor>LN||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>LN||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<LN)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(RN("SemVer.compare",this.version,this.options,e),!(e instanceof zN)){if("string"==typeof e&&e===this.version)return 0;e=new zN(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof zN||(e=new zN(e,this.options)),qN(this.major,e.major)||qN(this.minor,e.minor)||qN(this.patch,e.patch)}comparePre(e){if(e instanceof zN||(e=new zN(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(RN("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 qN(n,r)}while(++t)}compareBuild(e){e instanceof zN||(e=new zN(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(RN("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 qN(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 $N=zN;const{MAX_LENGTH:BN}=MN,{re:FN,t:HN}=EN.exports,jN=$N,VN=kN;var WN=(e,t)=>{if(t=VN(t),e instanceof jN)return e;if("string"!=typeof e)return null;if(e.length>BN)return null;if(!(t.loose?FN[HN.LOOSE]:FN[HN.FULL]).test(e))return null;try{return new jN(e,t)}catch(e){return null}};const _N=WN;var UN=(e,t)=>{const n=_N(e,t);return n?n.version:null};const YN=WN;var GN=(e,t)=>{const n=YN(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const KN=$N;var XN=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new KN(e,n).inc(t,r).version}catch(e){return null}};const JN=$N;var ZN=(e,t,n)=>new JN(e,n).compare(new JN(t,n));const QN=ZN;var eT=(e,t,n)=>0===QN(e,t,n);const tT=WN,nT=eT;var rT=(e,t)=>{if(nT(e,t))return null;{const n=tT(e),r=tT(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 oT=$N;var iT=(e,t)=>new oT(e,t).major;const aT=$N;var sT=(e,t)=>new aT(e,t).minor;const lT=$N;var cT=(e,t)=>new lT(e,t).patch;const uT=WN;var dT=(e,t)=>{const n=uT(e,t);return n&&n.prerelease.length?n.prerelease:null};const pT=ZN;var mT=(e,t,n)=>pT(t,e,n);const fT=ZN;var hT=(e,t)=>fT(e,t,!0);const gT=$N;var vT=(e,t,n)=>{const r=new gT(e,n),o=new gT(t,n);return r.compare(o)||r.compareBuild(o)};const yT=vT;var bT=(e,t)=>e.sort(((e,n)=>yT(e,n,t)));const xT=vT;var ST=(e,t)=>e.sort(((e,n)=>xT(n,e,t)));const ET=ZN;var MT=(e,t,n)=>ET(e,t,n)>0;const CT=ZN;var wT=(e,t,n)=>CT(e,t,n)<0;const kT=ZN;var NT=(e,t,n)=>0!==kT(e,t,n);const TT=ZN;var OT=(e,t,n)=>TT(e,t,n)>=0;const RT=ZN;var AT=(e,t,n)=>RT(e,t,n)<=0;const LT=eT,IT=NT,PT=MT,DT=OT,qT=wT,zT=AT;var $T=(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 LT(e,n,r);case"!=":return IT(e,n,r);case">":return PT(e,n,r);case">=":return DT(e,n,r);case"<":return qT(e,n,r);case"<=":return zT(e,n,r);default:throw new TypeError("Invalid operator: "+t)}};const BT=$N,FT=WN,{re:HT,t:jT}=EN.exports;var VT,WT,_T,UT,YT,GT,KT,XT,JT,ZT,QT=(e,t)=>{if(e instanceof BT)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=HT[jT.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),HT[jT.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;HT[jT.COERCERTL].lastIndex=-1}else n=e.match(HT[jT.COERCE]);return null===n?null:FT(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};function eO(){if(UT)return _T;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}UT=1,_T=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{(WT?VT:(WT=1,VT=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}))(e)}catch(e){}return _T}function tO(){if(XT)return KT;XT=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}}KT=e;const t=new(function(){if(GT)return YT;GT=1;const e=eO(),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 YT=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=kN,r=nO(),o=CN,i=$N,{re:a,t:s,comparatorTrimReplace:l,tildeTrimReplace:c,caretTrimReplace:u}=EN.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 KT}function nO(){if(ZT)return JT;ZT=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}}JT=t;const n=kN,{re:r,t:o}=EN.exports,i=$T,a=CN,s=$N,l=tO();return JT}const rO=tO();var oO=(e,t,n)=>{try{t=new rO(t,n)}catch(e){return!1}return t.test(e)};const iO=tO();var aO=(e,t)=>new iO(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const sO=$N,lO=tO();var cO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new lO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&-1!==o.compare(e)||(r=e,o=new sO(r,n)))})),r};const uO=$N,dO=tO();var pO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new dO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&1!==o.compare(e)||(r=e,o=new uO(r,n)))})),r};const mO=$N,fO=tO(),hO=MT;var gO=(e,t)=>{e=new fO(e,t);let n=new mO("0.0.0");if(e.test(n))return n;if(n=new mO("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 mO(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!hO(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})),!o||n&&!hO(n,o)||(n=o)}return n&&e.test(n)?n:null};const vO=tO();var yO=(e,t)=>{try{return new vO(e,t).range||"*"}catch(e){return null}};const bO=$N,xO=nO(),{ANY:SO}=xO,EO=tO(),MO=oO,CO=MT,wO=wT,kO=AT,NO=OT;var TO=(e,t,n,r)=>{let o,i,a,s,l;switch(e=new bO(e,r),t=new EO(t,r),n){case">":o=CO,i=kO,a=wO,s=">",l=">=";break;case"<":o=wO,i=NO,a=CO,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(MO(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===SO&&(e=new xO(">=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 OO=TO;var RO=(e,t,n)=>OO(e,t,">",n);const AO=TO;var LO=(e,t,n)=>AO(e,t,"<",n);const IO=tO();var PO=(e,t,n)=>(e=new IO(e,n),t=new IO(t,n),e.intersects(t));const DO=oO,qO=ZN;const zO=tO(),$O=nO(),{ANY:BO}=$O,FO=oO,HO=ZN,jO=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===BO){if(1===t.length&&t[0].semver===BO)return!0;e=n.includePrerelease?[new $O(">=0.0.0-0")]:[new $O(">=0.0.0")]}if(1===t.length&&t[0].semver===BO){if(n.includePrerelease)return!0;t=[new $O(">=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=VO(o,t,n):"<"===t.operator||"<="===t.operator?i=WO(i,t,n):r.add(t.semver);if(r.size>1)return null;if(o&&i){if(a=HO(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&&!FO(e,String(o),n))return null;if(i&&!FO(e,String(i),n))return null;for(const r of t)if(!FO(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=VO(o,e,n),s===e&&s!==o)return!1}else if(">="===o.operator&&!FO(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=WO(i,e,n),l===e&&l!==i)return!1}else if("<="===i.operator&&!FO(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))},VO=(e,t,n)=>{if(!e)return t;const r=HO(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},WO=(e,t,n)=>{if(!e)return t;const r=HO(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var _O=(e,t,n={})=>{if(e===t)return!0;e=new zO(e,n),t=new zO(t,n);let r=!1;e:for(const o of e.set){for(const e of t.set){const t=jO(o,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const UO=EN.exports;var YO={re:UO.re,src:UO.src,tokens:UO.t,SEMVER_SPEC_VERSION:MN.SEMVER_SPEC_VERSION,SemVer:$N,compareIdentifiers:ON.compareIdentifiers,rcompareIdentifiers:ON.rcompareIdentifiers,parse:WN,valid:UN,clean:GN,inc:XN,diff:rT,major:iT,minor:sT,patch:cT,prerelease:dT,compare:ZN,rcompare:mT,compareLoose:hT,compareBuild:vT,sort:bT,rsort:ST,gt:MT,lt:wT,eq:eT,neq:NT,gte:OT,lte:AT,cmp:$T,coerce:QT,Comparator:nO(),Range:tO(),satisfies:oO,toComparators:aO,maxSatisfying:cO,minSatisfying:pO,minVersion:gO,validRange:yO,outside:TO,gtr:RO,ltr:LO,intersects:PO,simplifyRange:(e,t,n)=>{const r=[];let o=null,i=null;const a=e.sort(((e,t)=>qO(e,t,n)));for(const e of a){DO(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:_O},GO="0.23.1";const KO=e=>!e||YO.lt(YO.coerce(e),YO.coerce(GO));function XO(){return function({layout:e}){var t,n,r;const o=E(e,"qHyperCube.qMeasureInfo",[]),i=o.some((({series:e=ns})=>hu(e)===es.LINE)),a=me.continuous(e,(()=>i&&le.isTime(!0,e))),s=!KO(E(e,"version","")),l=o.filter((({series:e=ns})=>hu(e)===es.BAR)),c=l.length,u=l.filter((({series:e=ns})=>e.axis!==ts.SECONDARY)).length,d=l.filter((({series:e=ns})=>e.axis===ts.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:le.canBeContinuous(e),isDiscrete:!a,isContinuous:a,isTime:le.isTime(a,e),isSnapshot:me.snapshot(e),isBarSeriesStacked:m,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:h,isGrouped:f||h,isGroupedByMeasure:f||h,isDimensionLocked:g,groupSize:h?2:c,hasLineSeries:i}}}function JO({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 ZO=e=>"number"==typeof e&&!Number.isNaN(e);function QO({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=>hu(e.series)===es.BAR)),a=o.filter((e=>hu(e.series)===es.LINE)),s=o.filter((e=>hu(e.series)===es.MARKER));return{min:Math.min(...o.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>ZO(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...i.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>ZO(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>ZO(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>ZO(e.qMax))).map((e=>e.qMax)))}}}}function eR({isPrimary:e,layoutService:t,seriesModel:n}){const r=QO({isPrimary:e,layoutService:t,seriesModel:n}),o=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(es.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 tR({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(es.BAR).filter((t=>t.isPrimary===e)).length;return!r||o<2?QO({isPrimary:e,layoutService:t,seriesModel:n}):eR({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=>hu(e)===es.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 nR({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 rR({min:e,max:t,count:n,threshold:r,disable:o}){const i=function(e,t,n){const r=qr().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 oR=50,iR=100,aR=200,sR=125;function lR({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return oR;case 1:return iR;case 2:return aR;default:return e*sR}})(t.getLayoutValue(e+".spacing",1));return Math.max(1,Math.round(n/r))}function cR({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:i,min:a,max:s}){const l=lR({config:e,layoutService:n,size:i}),c=rR({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 uR({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function dR({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function pR({config:e,chart:t,extrema:n,min:r,max:o}){const i={roundedMin:0,roundedMax:0,ticks:[]},a=rR({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?uR:dR;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 mR({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 fR({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=cR({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:a,min:s,max:l});return nR({extrema:o,ticks:c.ticks})?c:pR({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:[...mR({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 hR({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 fR({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l})}function gR({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}=z.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 hR({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 vR({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:es.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===es.LINE?2:t!==es.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==es.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function yR({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function bR({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=N({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:Qa.SCALE.COLOR}},config:{auto:yR,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:Qa.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",rtl:"rtl"===s.direction,settings:vR({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[Qa.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 xR="REJECTED",SR=()=>{},ER=1e4,MR=2,CR=20,wR=200,kR=10;var NR={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-kR<=t.qTop,o=n.qLeft+n.qWidth+kR>=t.qLeft+t.qWidth,i=n.qTop+n.qHeight+kR>=t.qTop+t.qHeight,a=n.qLeft-kR<=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 TR={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-kR<=t.qTop,o=n.qTop+n.qHeight+kR>=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 OR={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 RR="pages";const AR="discretePan";function LR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{type:"Pan",key:"discrete:pan",options:{event:AR,pointers:1,threshold:10,enable(r,o){return this.started===AR||!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=AR;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 IR({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 PR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{gestures:[LR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i})],native:{type:"native",events:{wheel:IR({chart:e,actions:t,componentKey:n,scroller:i})}}}}function DR({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(ER/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(wR,n));return{width:e,height:Math.max(CR,Math.min(n*MR,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 qR(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(xR),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(xR),n=e})(a):r(a)}));return o.isProcessing=()=>!!t,o.hasQueued=()=>!!n,o.cancel=()=>{o.isProcessing()&&t.cancel(),o.hasQueued()&&(n.reject(xR),n=null)},o}const zR={command:{update:()=>{}}};var $R={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 BR={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 FR(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function HR(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 jR(e){return HR(e.qMatrix,(e=>e[0].qElemNumber))-1}var VR={inTotal:function({layoutService:e}){const t=FR(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=FR(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=FR(e),i=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=jR(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 WR=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function _R(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return WR(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:WR(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return WR(e,n);return HR(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var UR={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=_R(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=_R(t).area(e(),l,a.qArea),d=jR(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 YR({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 GR={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 KR({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 XR({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 JR({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}=Qa.COMPONENT,{PRIMARY:f,SECONDARY:h}=ts,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:o,SLICED_HAT:i}=Qa.COMPONENT,{PRIMARY:a,SECONDARY:s}=ts,{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 T({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:u.fontFamily},main:{key:Qa.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:[Qa.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}`,`${Qa.COMPONENT.BAR_OOB}-max-${f}`,`${Qa.COMPONENT.BAR_OOB}-max-${h}`,`${Qa.COMPONENT.BAR_OOB}-min-${f}`,`${Qa.COMPONENT.BAR_OOB}-min-${h}`,Qa.COMPONENT.DATA_OOB_MARKER+"-max",Qa.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:Qa.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:XR({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:Qa.COMPONENT.LEGEND_TOOLTIP,component:Qa.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:ZR}=Zd;const QR={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 eA={query:{getCanScroll:()=>!0}};function tA({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function nA({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]===Qa.COMPONENT.LEGEND_CATEGORICAL}),r()}function rA({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(Qa.SCALE.MAJOR),r=P({chart:e,actions:t,selections:o,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{clear:tA},selectionEvents:{start:nA}}});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 oA={version:"1.23.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 iA=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=hu(n[e].qDef.series),o===es.BAR?r[0]=1:o===es.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)},aA=e=>(t,n)=>{let r;const o=t.qHyperCubeDef.qMeasures[n];if(o){const{type:e}=o.qDef.series;r=e===es.LINE?"Visualizations.Descriptions.HeightLine":e===es.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function sA(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&&hu(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===es.LINE?e.color.mode="primary":"byDimension"===o&&r.length>1&&(e.color.mode="byMultiple")}function lA(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:iA(t),added(e,t){gs.addCallbackCustomTooltip(t)},moved(e,t){gs.moveCallbackCustomTooltip(t,e)},removed(e,t){gs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){gs.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:aA(t),added({qDef:e},t){var n;sA(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:es.LINE,axis:ts.SECONDARY}:e.series={type:es.BAR,axis:ts.PRIMARY})},moved(e,t){sA(t)}}}}function cA(e){const t=lA(e);return{properties:oA,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const o=W.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&&Q(!0,o.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),o},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>W.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const uA=(e,t,n,r)=>{const o=t+".fontFamily",i=t+".fontSize";return{fontFamilyItem:{component:"dropdown",ref:e+".fontFamily",options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:e+".fontSize",options:()=>n.getOptions(i),defaultValue:()=>n.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:e+".color",defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function dA(e,t,n){const r=D({theme:t,translator:n,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value"]}});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,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2431_COMBOCHART_BG"),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}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:uA("bar.label.value","label.value",r,t)}}}:void 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}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:uA("line.label.value","label.value",r,t)}}}:void 0}},axisTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:uA("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:uA("axis.label.name","axis.label.name",r,t)}}}:void 0}};const o={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"}]},i={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")}.${o.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},a={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},s={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},l={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"}]},c={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 t="grouped"===e.barGrouping.grouping,n=e.qHyperCubeDef.qMeasures.filter((e=>hu(e.qDef.series)===es.BAR)).length,r=t&&n>1;return[{key:"bar",style:{strokeWidth:o.defaultValue,strokeColor:i.defaultValue(),width:r?.9:.7}},{key:"line",style:{dataPointSize:a.defaultValue,lineThickness:s.defaultValue,lineType:l.defaultValue,lineCurve:c.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:o,barStrokeColor:i,barWidth:{component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>hu(e.qDef.series)===es.LINE));return!me.continuous(n.layout,r&&le.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:a,lineThickness:s,lineType:l,lineCurve:c}}}}}}}const pA={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",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 mA(e){const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=ns})=>hu(e)===es.LINE));return me.continuous(e,(()=>t&&le.isTime(!0,e)))}function fA(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function hA(e){var t,n,r;return fA(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 gA(e){var t,n;return fA(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function vA(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 yA(e){return gA(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function bA(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?[...vA(n),...yA(e)]:yA(e)}(t,n,e)))}function xA(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||mA(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 hu(null===(t=e.qDef)||void 0===t?void 0:t.series)===es.MARKER}},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return hu(null===(t=e.qDef)||void 0===t?void 0:t.series)===es.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)=>fA(...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:hA},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:gA}}}}}}}}}}}}const SA=!0;function EA(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?SN(t,SA):!SN(t,SA)}))}function MA(e,t){return t.getMeasures().filter((e=>hu(e.qDef.series)===es.LINE)).length>0}function CA(e,t,n){const r=t.getMeasures().filter((e=>hu(e.qDef.series)===es.BAR));return r.filter((e=>e.qDef.series.axis!==ts.SECONDARY)).length>n||r.filter((e=>e.qDef.series.axis===ts.SECONDARY)).length>n}const wA=(e,t,n,r)=>{const o="vertical"===t.layout.orientation||mA(t.layout)?"y":"x",i=EA(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 kA(e){var t,n,r,o,i;const{translator:a,flags:s,anything:l}=e,c=null==e||null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme,u=null==e||null===(r=e.anything)||void 0===r||null===(o=r.sense)||void 0===o||null===(i=o.isUnsupportedFeature)||void 0===i?void 0:i.call(o,"continuousData"),d={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>bA(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>fA(e)))}}},p=e=>!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor);const m=(e,t)=>!E(e,"color.auto")&&"primary"===E(e,"color.mode")&&!((e=>E(e,"layout.qHyperCube.qMeasureInfo",[]).filter((e=>!!p(e))).length>0)(t)&&"measure"===E(e,"color.useBaseColors")||function(e){return E(e,"layout.qHyperCube.qDimensionInfo",[]).filter((e=>!!p(e))).length>0}(t)&&"dimension"===E(e,"color.useBaseColors")),f=(e,t)=>{var n,r;return e.qHyperCubeDef.qMeasures.some((e=>fA(e)))||!s.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)||m(e,t))},h={items:{disclaimer:{show:(e,t)=>f(e,t),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&M(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!f(e,t)}}},g={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&&CA(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&&MA(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){M(e,"dataPoint.show",!1),M(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)=>a.get(EA(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&&EA(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&&EA(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"}}}}}}},v={uses:"settings",items:{simpleStyling:null!=s&&s.isEnabled("COMBOCHART_SIMPLE_STYLING")?pA:void 0,simpleLabels:g,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:dA(s,c,a),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)=>CA(0,t,1)&&!mA(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)=>mA(n.layout),convertFunctions:(y="vertical",{get:(e,t,n)=>mA(n.layout)?y:e(t.type),set(e,t,n,r){t(n.type,mA(r.layout)?y:e,y)}})},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)=>!mA(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)=>MA(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>MA(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)=>CA(0,t,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:d,simpleColors:h,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||mA(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 o;return o=r?a.get(`properties.${n}AxisWithInfo`,[r]):a.get(`properties.${n}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||mA(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)=>!mA(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:!u}},measureAxis:{uses:"axis.measureAxis",label:(e,t)=>wA(e,t,a,0),show:(e,t)=>EA(e,t,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>wA(e,t,a,0),show:(e,t)=>EA(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)&&SN(null==e?void 0:e.series,SA)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t)=>"none"!==e.measureAxes[0].show&&EA(e,t,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||mA(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&&EA(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)=>EA(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?(M(o,"measureAxes.0.autoMinMax",!1),M(o,"measureAxes.0.minMax","min"),M(o,"measureAxes.0.min",0)):M(o,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t)=>wA(e,t,a,1),show:(e,t)=>EA(e,t,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>wA(e,t,a,1),show:(e,t)=>EA(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)&&!SN(null==e?void 0:e.series,SA)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t)=>"none"!==e.measureAxes[1].show&&EA(e,t,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||mA(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&&EA(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)=>EA(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?(M(o,"measureAxes.1.autoMinMax",!1),M(o,"measureAxes.1.minMax","min"),M(o,"measureAxes.1.min",0)):M(o,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var y;s.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(v.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!=l&&null!==(r=l.sense)&&void 0!==r&&null!==(o=r.isUnsupportedFeature)&&void 0!==o&&o.call(r,"includeZeroValues"))return!1;return!mA(n.layout)}}}},measures:xA(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=>SN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,SA)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!SN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,SA)},dimRefLines:{uses:"dimReflines"}}},settings:v}}}function NA(e){return e.qHyperCubeDef.qMeasures.filter((e=>hu(e.qDef.series)===es.LINE)).length>0}function TA(){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)=>NA(e)||!mA(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=>hu(e.qDef.series)===es.BAR));return t?n.filter((e=>e.qDef.series.axis===ts.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===ts.SECONDARY)).length>1:n.length>1}(e,!KO(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!mA(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)=>!mA(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=>NA(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>NA(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>fA(e)))}}}}}}const OA={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 RA(e,t,n,r,o){const{axis:i,icon:a,tid:s,translation:l}=OA[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 AA(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"});RA(r,i,t,n,"bar"),RA(r,i,t,n,"line"),RA(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 LA(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 IA=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function PA(e){return{definition:kA(e),softDefinition:TA(),support:{snapshot:IA,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:AA,extendMetrics:LA,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=W.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:lA(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&&Q(!0,e.qProperty.measureAxes[i],n.properties.measureAxis,{logarithmic:!1}),bA(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return W.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:function(e){return KO(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=ns),void 0===t.series.type&&(t.series.type=ns.type),void 0===t.series.axis&&(t.series.axis=t.series.type===es.BAR?ts.PRIMARY:ts.SECONDARY),t.series.type===es.BAR&&t.series.axis===ts.SECONDARY&&(t.series.axis=ts.PRIMARY)})),e.version=GO),e}(e)}}}}}}));
47
+ */var ME=SE&&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()}),EE))}};function CE(e){return e&&"[object Function]"==={}.toString.call(e)}function wE(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function kE(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function NE(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=wE(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:NE(kE(e))}function TE(e){return e&&e.referenceNode?e.referenceNode:e}var OE=SE&&!(!window.MSInputMethodContext||!document.documentMode),RE=SE&&/MSIE 10/.test(navigator.userAgent);function AE(e){return 11===e?OE:10===e?RE:OE||RE}function LE(e){if(!e)return document.documentElement;for(var t=AE(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"===wE(n,"position")?LE(n):n:e?e.ownerDocument.documentElement:document.documentElement}function IE(e){return null!==e.parentNode?IE(e.parentNode):e}function PE(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&&LE(a.firstElementChild)!==a?LE(l):l;var c=IE(e);return c.host?PE(c.host,t):PE(e,IE(t).host)}function DE(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 qE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=DE(t,"top"),o=DE(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 zE(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],AE(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function BE(e){var t=e.body,n=e.documentElement,r=AE(10)&&getComputedStyle(n);return{height:$E("Height",t,n,r),width:$E("Width",t,n,r)}}var FE=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},HE=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}}(),jE=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},VE=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 WE(e){return VE({},e,{right:e.left+e.width,bottom:e.top+e.height})}function _E(e){var t={};try{if(AE(10)){t=e.getBoundingClientRect();var n=DE(e,"top"),r=DE(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?BE(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=wE(e);l-=zE(u,"x"),c-=zE(u,"y"),o.width-=l,o.height-=c}return WE(o)}function UE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=AE(10),o="HTML"===t.nodeName,i=_E(e),a=_E(t),s=NE(e),l=wE(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=WE({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=qE(d,t)),d}function YE(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=UE(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:DE(n),s=t?0:DE(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return WE(l)}function GE(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===wE(e,"position"))return!0;var n=kE(e);return!!n&&GE(n)}function KE(e){if(!e||!e.parentElement||AE())return document.documentElement;for(var t=e.parentElement;t&&"none"===wE(t,"transform");)t=t.parentElement;return t||document.documentElement}function XE(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?KE(e):PE(e,TE(t));if("viewport"===r)i=YE(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=NE(kE(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=UE(s,a,o);if("HTML"!==s.nodeName||GE(a))i=l;else{var c=BE(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 JE(e){return e.width*e.height}function ZE(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=XE(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 VE({key:e},s[e],{area:JE(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 QE(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?KE(t):PE(t,TE(n));return UE(n,o,r)}function eM(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 tM(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 nM(e,t,n){n=n.split("-")[0];var r=eM(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[tM(s)],o}function rM(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function oM(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=rM(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&&CE(n)&&(t.offsets.popper=WE(t.offsets.popper),t.offsets.reference=WE(t.offsets.reference),t=n(t,e))})),t}function iM(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=QE(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=ZE(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=nM(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=oM(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function aM(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function sM(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 lM(){return this.state.isDestroyed=!0,aM(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[sM("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function cM(e){var t=e.ownerDocument;return t?t.defaultView:window}function uM(e,t,n,r){var o="BODY"===e.nodeName,i=o?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),o||uM(NE(i.parentNode),t,n,r),r.push(i)}function dM(e,t,n,r){n.updateBound=r,cM(e).addEventListener("resize",n.updateBound,{passive:!0});var o=NE(e);return uM(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function pM(){this.state.eventsEnabled||(this.state=dM(this.reference,this.options,this.state,this.scheduleUpdate))}function mM(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,cM(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 fM(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function hM(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&fM(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var gM=SE&&/Firefox/i.test(navigator.userAgent);function vM(e,t,n){var r=rM(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 yM=["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"],bM=yM.slice(3);function xM(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=bM.indexOf(e),r=bM.slice(n+1).concat(bM.slice(0,n));return t?r.reverse():r}var SM="flip",EM="clockwise",MM="counterclockwise";function CM(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(rM(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 WE(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){fM(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var wM={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:jE({},l,i[l]),end:jE({},l,i[l]+i[c]-a[c])};e.offsets.popper=VE({},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=fM(+n)?[+n,0]:CM(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||LE(e.instance.popper);e.instance.reference===n&&(n=LE(n));var r=sM("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var l=XE(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])),jE({},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))),jE({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=VE({},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(!vM(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=eM(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=WE(e.offsets.popper);var h=s[d]+s[c]/2-f/2,g=wE(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=(jE(n={},d,Math.round(b)),jE(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(aM(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=XE(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=tM(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case SM:a=[r,o];break;case EM:a=xM(r);break;case MM:a=xM(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=tM(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=VE({},e.offsets.popper,nM(e.instance.popper,e.offsets.reference,e.placement)),e=oM(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=tM(t),e.offsets.popper=WE(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!vM(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=rM(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=rM(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=LE(e.instance.popper),l=_E(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||!gM),d="bottom"===n?"top":"bottom",p="right"===r?"left":"right",m=sM("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=VE({},y,e.attributes),e.styles=VE({},c,e.styles),e.arrowStyles=VE({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return hM(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&&hM(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){var i=QE(o,t,e,n.positionFixed),a=ZE(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),hM(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},kM=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};FE(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=ME(this.update.bind(this)),this.options=VE({},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(VE({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=VE({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return VE({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&CE(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 HE(e,[{key:"update",value:function(){return iM.call(this)}},{key:"destroy",value:function(){return lM.call(this)}},{key:"enableEventListeners",value:function(){return pM.call(this)}},{key:"disableEventListeners",value:function(){return mM.call(this)}}]),e}();function NM(e){return"function"==typeof e?e():e}kM.Utils=("undefined"!=typeof window?window:global).PopperUtils,kM.placements=yM,kM.Defaults=wM;var TM="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,OM={},RM=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?OM:m,h=e.popperRef,g=e.transition,v=void 0!==g&&g,y=Gp(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),b=B.useRef(null),x=ey(b,t),S=B.useRef(null),E=ey(S,h),M=B.useRef(E);TM((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)};NM(n);var t=new kM(NM(n),b.current,Up({placement:N},f,{modifiers:Up({},a?{}:{preventOverflow:{boundariesElement:"window"}},{},c,{},f.modifiers),onCreate:rx(e,f.onCreate),onUpdate:rx(e,f.onUpdate)}));M.current(t)}}),[n,a,c,u,N,f]),L=B.useCallback((function(e){Qv(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(nx,{disablePortal:a,container:o},B.createElement("div",Up({ref:L,role:"tooltip"},y,{style:Up({position:"fixed",top:0,left:0},y.style)}),"function"==typeof r?r(P):r))})),AM=hb(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"})),LM=hb(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"})),IM=B.createElement(AM,null);var PM=bv((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:ev(n.root,t&&n.checked)},IM,B.createElement(LM,{className:n.layer}))})),DM=B.createContext(),qM=B.createElement(PM,{checked:!0}),zM=B.createElement(PM,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=Gp(e,["checked","classes","color","name","onChange"]),c=B.useContext(DM),u=n,d=rx(s,c&&c.onChange),p=a;return c&&(void 0===u&&(u=c.value===e.value),void 0===p&&(p=c.name)),B.createElement(qb,Up({color:i,type:"radio",icon:zM,checkedIcon:qM,classes:{root:ev(r.root,r["color".concat(xv(i))]),checked:r.checked,disabled:r.disabled},name:p,checked:u,onChange:d,ref:t},l))}));function BM(e,t){return"object"===Xp(t)&&null!==t?e===t:String(e)===String(t)}bv((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:jp(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:jp(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=Gp(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=ey(t,l);return B.createElement(rS,Up({role:"radiogroup",ref:f},s),B.createElement(DM.Provider,{value:m},r))})),B.Component;var FM=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=Gp(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=ey(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)?Ih(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;(Ux({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 BM(t,e.props.value)})))&&ne&&te.push(e.props.children)}else(t=BM(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",Up({className:ev(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",Up({value:Array.isArray(q)?q.join(","):q,name:g,ref:z,type:"hidden",autoFocus:n},A)),B.createElement(d,{className:ev(i.icon,i["icon".concat(xv(R))],ee&&i.iconOpen)}),B.createElement(lE,Up({id:"menu-".concat(g||""),anchorEl:F,open:ee,onClose:function(e){Z(!1,e)}},f,{MenuListProps:Up({"aria-labelledby":u,role:"listbox",disableListWrap:!0},f.MenuListProps),PaperProps:Up({},f.PaperProps,{style:Up({minWidth:ie},null!=f.PaperProps?f.PaperProps.style:null)})}),re))})),HM=fE,jM=B.createElement(NS,null),VM=B.createElement(Jx,null),WM=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?mE: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=Gp(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),R=b?pE:FM,A=Fx({props:t,muiFormControl:Lb(),states:["variant"]}).variant||k,L=p||{standard:jM,outlined:B.createElement(xE,{labelWidth:T}),filled:VM}[A];return B.cloneElement(L,Up({inputComponent:R,select:!0,inputProps:Up({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:Up({id:d},C)},{},m,{classes:m?Ag({baseClasses:a,newClasses:m.classes,Component:e}):a},p?p.props.inputProps:{}),ref:n},O))}));WM.muiName="Select";var _M=bv(HM,{name:"MuiSelect"})(WM);var UM=bv((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Up({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:ev(t.props.className,(o||"on"===a)&&n.open,n.thumb)},B.createElement("span",{className:ev(n.offset,r)},B.createElement("span",{className:n.circle},B.createElement("span",{className:n.label},i))))}));function YM(e,t){return e-t}function GM(e,t,n){return e<t?t:e>n?n:e}function KM(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 XM(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 JM(e,t,n){return 100*(e-t)/(n-t)}function ZM(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 QM(e){var t=e.values,n=e.source,r=e.newValue,o=e.index;if(t[o]===r)return n;var i=Ih(t);return i[o]=r,i}function eC(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 tC={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,"%")}}}},nC=[],rC=function(e){return e},oC=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?nC: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?UM:D,z=e.valueLabelDisplay,$=void 0===z?"off":z,F=e.valueLabelFormat,H=void 0===F?rC:F,j=Gp(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=yv(),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?Ih(te).sort(YM):[te];oe=oe.map((function(e){return GM(e,S,b)}));var ie=!0===v&&null!==O?Ih(Array(Math.floor((b-S)/O)+1)).map((function(e,t){return{value:S+O*t}})):v;re.current={source:te};var ae=Sy(),se=ae.isFocusVisible,le=ae.onBlurVisible,ce=ae.ref,ue=B.useState(-1),de=ue[0],pe=ue[1],me=B.useRef(),fe=ey(ce,me),he=ey(t,fe),ge=cy((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));se(e)&&pe(t),J(t)})),ve=cy((function(){-1!==de&&(pe(-1),le()),J(-1)})),ye=cy((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));J(t)})),be=cy((function(){J(-1)})),xe=cy((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=ZM(t,O)),t=GM(t,S,b),ne){var s=t;t=QM({values:oe,source:te,newValue:t,index:n}).sort(YM),eC({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=ZM(n,O);else{var m=ie.map((function(e){return e.value}));n=m[KM(m,n)]}n=GM(n,S,b);var f=0;if(ne){var h=n;f=(n=QM({values:a,source:s,newValue:n,index:f=i?Se.current:KM(a,n)}).sort(YM)).indexOf(h),Se.current=f}return{newValue:n,activeIndex:f}}),[b,S,Ee,ne,O,ie]),Ce=cy((function(e){var t=XM(e,_);if(t){var n=Me({finger:t,move:!0,values:oe,source:te}),r=n.newValue,o=n.activeIndex;eC({sliderRef:me,activeIndex:o,setActive:G}),W||ee(r),M&&M(e,r)}})),we=cy((function(e){var t=XM(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=cy((function(e){0===e.buttons&&we(e)})),Ne=cy((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(_.current=t.identifier);var n=XM(e,_),r=Me({finger:n,values:oe,source:te}),o=r.newValue,i=r.activeIndex;eC({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=cy((function(e){w&&w(e),e.preventDefault();var t=XM(e,_),n=Me({finger:t,values:oe,source:te}),r=n.newValue,o=n.activeIndex;eC({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=JM(ne?oe[0]:S,S,b),Re=JM(oe[oe.length-1],S,b)-Oe,Ae=Up({},tC[Ee].offset(Oe),{},tC[Ee].leap(Re));return B.createElement(u,Up({ref:he,className:ev(i.root,i["color".concat(xv(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=JM(e.value,S,b),r=tC[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:ev(i.mark,t&&i.markActive)}),B.createElement("span",{"aria-hidden":!0,style:r,className:ev(i.markLabel,t&&i.markLabelActive)},e.label))})),oe.map((function(e,t){var a=JM(e,S,b),s=tC[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:ev(i.thumb,i["thumbColor".concat(xv(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}))})))}));bv((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?Wp(e.palette.primary.main,.62):Vp(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(jp(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(jp(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(jp(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(jp(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:Up({},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"})(oC);var iC=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=Gp(e,["action","classes","className","message","role"]);return B.createElement(Ev,Up({component:pb,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:s,square:!0,elevation:6,className:ev(r.root,o),ref:t},l),B.createElement("div",{className:r.message},i),n?B.createElement("div",{className:r.action},n):null)})),aC=bv((function(e){var t="light"===e.palette.type?.8:.98,n=Hp(e.palette.background.default,t);return{root:_p({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"})(iC),sC=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?yS:k,T=e.transitionDuration,O=void 0===T?{enter:zm.enteringScreen,exit:zm.leavingScreen}:T,R=e.TransitionProps,A=Gp(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(Jb,Up({onClickAway:function(e){h&&h(e,"clickaway")}},u),B.createElement("div",Up({className:ev(l.root,l["anchorOrigin".concat(xv(o)).concat(xv(i))],c),onMouseEnter:function(e){E&&E(e),z()},onMouseLeave:function(e){M&&M(e),$()},ref:t},A),B.createElement(N,Up({appear:!0,in:C,onEnter:rx((function(){D(!1)}),g),onEntered:v,onEntering:y,onExit:b,onExited:rx((function(){D(!0)}),x),onExiting:S,timeout:O,direction:"top"===o?"down":"up"},R),s||B.createElement(aC,Up({message:f,action:n},d)))))}));bv((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:Up({},t,_p({},e.breakpoints.up("sm"),Up({},i,{},c))),anchorOriginBottomCenter:Up({},n,_p({},e.breakpoints.up("sm"),Up({},a,{},c))),anchorOriginTopRight:Up({},t,{},r,_p({},e.breakpoints.up("sm"),Up({left:"auto"},i,{},s))),anchorOriginBottomRight:Up({},n,{},r,_p({},e.breakpoints.up("sm"),Up({left:"auto"},a,{},s))),anchorOriginTopLeft:Up({},t,{},o,_p({},e.breakpoints.up("sm"),Up({right:"auto"},i,{},l))),anchorOriginBottomLeft:Up({},n,{},o,_p({},e.breakpoints.up("sm"),Up({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})(sC);var lC=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=Gp(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return B.createElement("div",Up({className:ev(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,Up({active:r,alternativeLabel:o,completed:c,disabled:p,last:f,icon:m+1,orientation:h},e.props)):null})))}));bv({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(lC);var cC=hb(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"})),uC=hb(B.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),dC=B.createElement("circle",{cx:"12",cy:"12",r:"12"}),pC=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(uC,{className:ev(c.root,c.error),ref:t}):r?B.createElement(cC,{className:ev(c.root,c.completed),ref:t}):B.createElement(fb,{className:ev(c.root,a&&c.active),ref:t},dC,B.createElement("text",{className:c.text,x:"12",y:"16",textAnchor:"middle"},o)):o})),mC=bv((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"})(pC),fC=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=Gp(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),E=b;return h&&!E&&(E=mC),B.createElement("span",Up({className:ev(s.root,s[y],l,p&&s.disabled,i&&s.alternativeLabel,f&&s.error),ref:t},S),h||E?B.createElement("span",{className:ev(s.iconContainer,i&&s.alternativeLabel)},B.createElement(E,Up({completed:u,active:r,error:f,icon:h},x))):null,B.createElement("span",{className:s.labelContainer},B.createElement(pb,{variant:"body2",component:"span",className:ev(s.label,i&&s.alternativeLabel,u&&s.completed,r&&s.active,f&&s.error),display:"block"},a),g))}));fC.muiName="StepLabel";var hC=bv((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"})(fC),gC=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=Gp(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=Zx(o,["StepLabel"])?B.cloneElement(o,m):B.createElement(hC,m,o);return B.createElement(Ty,Up({disabled:l,TouchRippleProps:{className:i.touchRipple},className:ev(i.root,i[d],a),ref:t},p),f)}));bv({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"})(gC);var vC=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=Gp(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return B.createElement("div",Up({className:ev(i.root,i[u],a,o&&i.alternativeLabel,n&&i.active,s&&i.completed,l&&i.disabled),ref:t},d),B.createElement("span",{className:ev(i.line,"vertical"===u?i.lineVertical:i.lineHorizontal)}))})),yC=bv((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"})(vC),bC=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?Qb:s,c=e.transitionDuration,u=void 0===c?"auto":c,d=e.TransitionProps,p=Gp(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",Up({className:ev(o.root,i,a&&o.last),ref:t},p),B.createElement(l,Up({in:n,className:o.transition,timeout:m,unmountOnExit:!0},d),r))}));bv((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"})(bC);var xC=B.createElement(yC,null),SC=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?xC:c,d=e.nonLinear,p=void 0!==d&&d,m=e.orientation,f=void 0===m?"horizontal":m,h=Gp(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,Up({key:t},o)),B.cloneElement(e,Up({},n,{},o,{},e.props))]}));return B.createElement(Ev,Up({square:!0,elevation:0,className:ev(s.root,s[f],l,i&&s.alternativeLabel),ref:t},h),y)}));bv({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(SC);var EC=B.forwardRef((function(e,t){var n=e.anchor,r=e.classes,o=e.className,i=e.width,a=Gp(e,["anchor","classes","className","width"]);return B.createElement("div",Up({className:ev(r.root,r["anchor".concat(xv(n))],o),ref:t,style:_p({},Ox(n)?"width":"height",i)},a))})),MC=bv((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"})(EC),CC=null;function wC(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function kC(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function NC(e,t){return e?t.clientWidth:t.clientHeight}function TC(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var OC="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),RC={enter:zm.enteringScreen,exit:zm.leavingScreen},AC="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?OC: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=Gp(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?RC:k,T=e.variant,O=void 0===T?"temporary":T,R=Gp(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),A=yv(),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();AC((function(){H.current=null}),[x]);var j=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",Zv({timeout:N},{mode:o}))),s&&(m.webkitTransition=f,m.transition=f),!i&&!u){var h=z.current.style;h.opacity=1-e/NC(d,$.current),s&&(h.webkitTransition=f,h.transition=f)}}),[r,i,u,A,N]),W=cy((function(e){if(F.current)if(CC=null,F.current=!1,P(!1),D.current.isSwiping){D.current.isSwiping=null;var t,n=Rx(A,r),o=Ox(r);t=o?wC(n,e.changedTouches):kC(n,e.changedTouches);var i=o?D.current.startX:D.current.startY,a=NC(o,$.current),s=TC(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():j(0,{mode:"exit"}):D.current.velocity<-f||1-l>p?b():j(NC(o,$.current),{mode:"enter"})}else D.current.isSwiping=null})),_=cy((function(e){if($.current&&F.current&&(null==CC||CC===D.current)){var t=Rx(A,r),n=Ox(r),o=wC(t,e.touches),i=kC(t,e.touches);if(x&&$.current.contains(e.target)&&null==CC){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(CC=a);CC=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=NC(n,$.current),p=n?D.current.startX:D.current.startY;x&&!D.current.paperHit&&(p=Math.min(p,d));var m=TC(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(),j(m)}}})),U=cy((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=wC(t,e.touches),i=kC(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,CC=null,D.current.startX=o,D.current.startY=i,P(!0),!x&&$.current&&j(NC(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(){CC===D.current&&(CC=null)}}),[]),B.useEffect((function(){x||P(!1)}),[x]);var Y=B.useCallback((function(e){z.current=V.findDOMNode(e)}),[]),G=B.useCallback((function(e){$.current=V.findDOMNode(e)}),[]);return B.createElement(B.Fragment,null,B.createElement(Ix,Up({open:!("temporary"!==O||!I)||x,variant:O,ModalProps:Up({BackdropProps:Up({},g,{ref:Y})},v),PaperProps:Up({},E,{style:Up({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(dy,null,B.createElement(MC,Up({anchor:r,ref:q,width:w},M))))}));var LC=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=Gp(e,["classes","className","color","edge","size"]),d=B.createElement("span",{className:n.thumb});return B.createElement("span",{className:ev(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[s],{small:n["size".concat(xv(c))]}[c])},B.createElement(qb,Up({type:"checkbox",icon:d,checkedIcon:d,classes:{root:ev(n.switchBase,n["color".concat(xv(i))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},u)),B.createElement("span",{className:n.track}))}));bv((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:jp(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:jp(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"})(LC);var IC=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=Gp(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return B.createElement(Ty,Up({focusRipple:!s,className:ev(n.root,n["textColor".concat(xv(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)}));bv((function(e){var t;return{root:Up({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},_p(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),_p(t,"overflow","hidden"),_p(t,"whiteSpace","normal"),_p(t,"textAlign","center"),_p(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"})(IC);var PC=B.createContext(),DC=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=Gp(e,["classes","className","component","padding","size","stickyHeader"]),m=B.useMemo((function(){return{padding:s,size:c,stickyHeader:d}}),[s,c,d]);return B.createElement(PC.Provider,{value:m},B.createElement(i,Up({ref:t,className:ev(n.root,r,d&&n.stickyHeader)},p)))}));bv((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Up({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(DC);var qC=B.createContext(),zC={variant:"body"},$C=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tbody":o,a=Gp(e,["classes","className","component"]);return B.createElement(qC.Provider,{value:zC},B.createElement(i,Up({className:ev(n.root,r),ref:t},a)))}));bv({root:{display:"table-row-group"}},{name:"MuiTableBody"})($C);var BC=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=Gp(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),f=B.useContext(PC),h=B.useContext(qC);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,Up({ref:t,className:ev(i.root,i[b],a,"inherit"!==o&&i["align".concat(xv(o))],"default"!==v&&i["padding".concat(xv(v))],"medium"!==y&&i["size".concat(xv(y))],{head:f&&f.stickyHeader&&i.stickyHeader}[b]),"aria-sort":x,scope:g},m))})),FC=bv((function(e){return{root:Up({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Wp(jp(e.palette.divider,1),.88):Vp(jp(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"})(BC),HC={variant:"footer"},jC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tfoot":o,a=Gp(e,["classes","className","component"]);return B.createElement(qC.Provider,{value:HC},B.createElement(i,Up({className:ev(n.root,r),ref:t},a)))}));bv({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(jC);var VC={variant:"head"},WC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"thead":o,a=Gp(e,["classes","className","component"]);return B.createElement(qC.Provider,{value:VC},B.createElement(i,Up({className:ev(n.root,r),ref:t},a)))}));bv({root:{display:"table-header-group"}},{name:"MuiTableHead"})(WC);var _C=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=Gp(e,["classes","className","component","disableGutters","variant"]);return B.createElement(i,Up({className:ev(n.root,n[c],r,!s&&n.gutters),ref:t},u))})),UC=bv((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:_p({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"})(_C),YC=hb(B.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),GC=hb(B.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),KC=B.createElement(GC,null),XC=B.createElement(YC,null),JC=B.createElement(YC,null),ZC=B.createElement(GC,null),QC=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=Gp(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=yv();return B.createElement("div",Up({ref:t},l),B.createElement(Pb,Up({onClick:function(e){i(e,a-1)},disabled:0===a,color:"inherit"},n),"rtl"===c.direction?KC:XC),B.createElement(Pb,Up({onClick:function(e){i(e,a+1)},disabled:a>=Math.ceil(r/s)-1,color:"inherit"},o),"rtl"===c.direction?JC:ZC))})),ew=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(-1===n?r:n," of ").concat(r)},tw=[10,25,50,100],nw=B.forwardRef((function(e,t){var n,r=e.ActionsComponent,o=void 0===r?QC:r,i=e.backIconButtonProps,a=e.classes,s=e.className,l=e.colSpan,c=e.component,u=void 0===c?FC:c,d=e.count,p=e.labelDisplayedRows,m=void 0===p?ew: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?tw:S,M=e.SelectProps,C=void 0===M?{}:M,w=Gp(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);u!==FC&&"td"!==u||(n=l||1e3);var k=C.native?"option":uE;return B.createElement(u,Up({className:ev(a.root,s),colSpan:n,ref:t},w),B.createElement(UC,{className:a.toolbar},B.createElement("div",{className:a.spacer}),E.length>1&&B.createElement(pb,{color:"inherit",variant:"body2",className:a.caption},h),E.length>1&&B.createElement(_M,Up({classes:{select:a.select,icon:a.selectIcon},input:B.createElement(Kx,{className:ev(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(pb,{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})))}));bv((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"})(nw);var rw=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=Gp(e,["classes","className","component","hover","selected"]),d=B.useContext(qC);return B.createElement(i,Up({ref:t,className:ev(n.root,r,d&&{head:n.head,footer:n.footer}[d.variant],s&&n.hover,c&&n.selected)},u))}));bv((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"})(rw);var ow=hb(B.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),iw=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?ow:d,m=Gp(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return B.createElement(Ty,Up({className:ev(i.root,a,r&&i.active),component:"span",disableRipple:!0,ref:t},m),o,u&&!r?null:B.createElement(p,{className:ev(i.icon,i["iconDirection".concat(xv(l))])}))}));bv((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"})(iw);var aw,sw=!("undefined"==typeof window||!window.document||!window.document.createElement);function lw(){if(aw)return aw;if(!sw||!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),aw="reverse",e.scrollLeft>0?aw="default":(e.scrollLeft=1,0===e.scrollLeft&&(aw="negative")),document.body.removeChild(e),aw}function cw(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=lw();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 uw(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var dw={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function pw(e){var t=e.onChange,n=Gp(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",Up({style:dw,ref:o},n))}var mw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=e.orientation,a=Gp(e,["classes","className","color","orientation"]);return B.createElement("span",Up({className:ev(n.root,n["color".concat(xv(o))],r,{vertical:n.vertical}[i]),ref:t},a))})),fw=bv((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"})(mw),hw=B.createElement(YC,{fontSize:"small"}),gw=B.createElement(GC,{fontSize:"small"}),vw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.direction,i=e.orientation,a=e.visible,s=Gp(e,["classes","className","direction","orientation","visible"]),l=ev(n.root,r,{vertical:n.vertical}[i]);return a?B.createElement(Ty,Up({component:"div",className:l,ref:t,role:null,tabIndex:null},s),"left"===o?hw:gw):B.createElement("div",{className:l})})),yw=bv({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(vw),bw=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?yw: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=Gp(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),N=yv(),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:cw(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=cy((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=(_p(e={},L,o),_p(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?uw: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"===lw()?-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=cy((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=cy((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=cw(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(fw,Up({className:a.indicator,orientation:f,color:d},x,{style:Up({},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(pw,{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:ev(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:ev(a.scrollButtons,"on"!==y&&a.scrollButtonsDesktop)}):null,e}();return B.createElement(c,Up({className:ev(a.root,s,R&&a.vertical),ref:t},k),de.scrollButtonStart,de.scrollbarSizeListener,B.createElement("div",{className:ev(a.scroller,T?a.scrollable:a.fixed),style:Y,ref:X,onScroll:se},B.createElement("div",{className:ev(a.flexContainer,R&&a.flexContainerVertical,o&&!T&&a.centered),ref:J,role:"tablist"},ue),z&&le),de.scrollButtonEnd)}));bv((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:_p({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(bw);var xw={standard:NS,filled:Jx,outlined:xE},Sw=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,$=Gp(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],j=F[1],W=B.useRef(null);B.useEffect((function(){if("outlined"===z){var e=V.findDOMNode(W.current);j(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=xw[z],K=B.createElement(G,Up({"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(eS,Up({className:ev(i.root,a),error:u,fullWidth:p,hiddenLabel:f,ref:t,required:T,color:l,variant:z},$),x&&B.createElement(RS,Up({htmlFor:h,ref:W,id:Y},g),x),L?B.createElement(_M,Up({"aria-describedby":U,id:h,labelId:Y,value:D,input:K},I),o):K,m&&B.createElement(iS,Up({id:U},d),m))}));function Ew(e){return Math.round(1e5*e)/1e5}bv({root:{}},{name:"MuiTextField"})(Sw);var Mw=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?yS:T,R=e.TransitionProps,A=Gp(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),L=yv(),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),j=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){j||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=Sy(),Z=J.isFocusVisible,Q=J.onBlurVisible,ee=J.ref,te=B.useState(!1),ne=te[0],re=te[1],oe=function(e){j||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=ey(F,t),se=ey(ee,ae),le=B.useCallback((function(e){Qv(se,V.findDOMNode(e))}),[se]),ce=ey(n.ref,le),ue=j?M:P;""===N&&(ue=!1);var de=!ue&&!s,pe=Up({"aria-describedby":ue?f||W.current:null,title:de&&"string"==typeof N?N:null},A,{},n.props,{className:ev(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,Up({ref:ce},pe)),B.createElement(RM,Up({className:ev(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,Up({timeout:L.transitions.duration.shorter},n,R),B.createElement("div",{className:ev(r.tooltip,r["tooltipPlacement".concat(xv(t.split("-")[0]))],H.current&&r.touch)},N))})))}));bv((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:jp(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(Ew(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(Ew(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:_p({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:_p({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:_p({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:_p({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(Mw);var Cw={entering:{transform:"none"},entered:{transform:"none"}},ww={enter:zm.enteringScreen,exit:zm.leavingScreen};function kw(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Nw({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const o={fontSize:kw(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?ww:s,c=Gp(e,["children","in","onEnter","onExit","style","timeout"]),u=yv(),d=ey(n.ref,t);return B.createElement(Iv,Up({appear:!0,in:r,onEnter:function(e,t){Jv(e);var n=Zv({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=Zv({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,Up({style:Up({transform:"scale(0)",visibility:"exited"!==e||r?void 0:"hidden"},Cw[e],{},a,{},n.props.style),ref:d},t))}))}));const Tw={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"},Ow={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"},Rw="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Aw={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"},Lw={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 Iw(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.",e.layout);let r=Zi.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 Pw(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),c=Q(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],i||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,o&&o({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),Iw(e,a,c)}))}const Dw=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))};function qw({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives:()=>Dw(i,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).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})))))))),changeTo(e,t){Pw(r,e,t,"qDimensions",a)}}}function zw(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)},id:e.cId};var o}function $w({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:()=>Dw(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).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})))))))),changeTo(e,t){Pw(o,e,t,"qMeasures",i,a)}}}function Bw(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const Fw={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"}}},Hw=({children:e,...t})=>B.createElement(Sb,Ep({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);const jw=Hm({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 Vw=Wm({productionPrefix:"qf3b2",disableGlobal:!0,seed:""});function Ww(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:Ww(o,t,n)},o}function _w(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),Ww(o,a,l,e.invert)}))}const Uw={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(Q({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function Yw({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=Q({},{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 Gw({keys:e,data:t,defaultSettings:n,style:r,settings:o,width:i,height:a,resolver:s}){const l=Q(!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:Q(!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:Q(!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:Q(!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 Kw=["oob"];const Xw={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=Gw({keys:Kw,data:o,defaultSettings:{oob:Uw.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=Yw}){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(Uw.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:Kw,symbol:s,dockValue:n})}},Jw={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Zw=["hat"];function Qw(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 ek({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=Q({},e.hat,{type:"path",d:Qw(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,Q({},e.hat,{type:"path",d:Qw(p)})]}const tk={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=Gw({keys:Zw,data:r,defaultSettings:Jw,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=Yw}){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(...ek({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:Zw})}};var nk="unclassified",rk="equal-equal",ok="equal-higher",ik="equal-lower",ak="equal-void",sk="higher-equal",lk="higher-higher-acute",ck="higher-higher-obtuse",uk="higher-lower-negative",dk="higher-lower-positive",pk="higher-void",mk="lower-equal",fk="lower-higher-negative",hk="lower-higher-positive",gk="lower-lower-acute",vk="lower-lower-obtuse",yk="lower-void",bk="void-equal",xk="void-higher",Sk="void-lower",Ek="void-void";function Mk(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function Ck(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 wk({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?rk:o<i?ok:ik:o===i?r>o?sk:mk:r>o?o<i?Ck(e,t,n)>90?ck:lk:Mk(e,t)>Mk(e,n)?dk:uk:o>i?Ck(e,t,n)>90?vk:gk:Mk(e,t)>Mk(e,n)?hk:fk:r===o?ak:r>o?pk:yk:o===i?bk:o<i?xk:Sk:Ek}function kk({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 Nk=1,Tk=0;function Ok({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*Nk,height:p.height+2*Tk},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:kk({bounds:m,size:a}),border:f?f/2:0,classification:nk,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 Rk({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:Ok({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 Ak={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},Lk={[rk]:[Ak.TOP,Ak.BOTTOM],[ok]:[Ak.BOTTOM,Ak.BOTTOM_RIGHT],[ik]:[Ak.TOP,Ak.TOP_RIGHT],[ak]:[Ak.TOP,Ak.BOTTOM],[sk]:[Ak.LEFT,Ak.BOTTOM_LEFT,Ak.TOP,Ak.TOP_RIGHT],[lk]:[Ak.BOTTOM,Ak.BOTTOM_LEFT,Ak.LEFT,Ak.TOP_RIGHT],[ck]:[Ak.BOTTOM,Ak.TOP],[uk]:[Ak.TOP,Ak.TOP_RIGHT,Ak.RIGHT],[dk]:[Ak.BOTTOM,Ak.BOTTOM_LEFT,Ak.LEFT],[pk]:[Ak.TOP],[mk]:[Ak.TOP],[fk]:[Ak.TOP,Ak.TOP_LEFT],[hk]:[Ak.BOTTOM_RIGHT],[gk]:[Ak.TOP,Ak.TOP_LEFT,Ak.LEFT,Ak.TOP_RIGHT,Ak.RIGHT],[vk]:[Ak.TOP,Ak.BOTTOM],[yk]:[Ak.TOP],[bk]:[Ak.TOP],[xk]:[Ak.TOP,Ak.BOTTOM],[Sk]:[Ak.TOP,Ak.BOTTOM,Ak.LEFT],[Ek]:[Ak.TOP]};function Ik({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}){const l=Rk({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=wk({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(Lk[e.classification]))),p}function Pk({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 Dk({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 qk({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 Dk({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||Dk({line1:e,line2:a})||Dk({line1:e,line2:s})||Dk({line1:e,line2:l})}({line:t,rect:e})))}const zk={x:0,width:0,y:0,height:0};const $k=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Bk=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Fk=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),Hk=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),jk=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Vk=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Wk=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),_k=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var Uk=2.5,Yk=4;const Gk=[Ak.TOP,Ak.TOP_LEFT,Ak.TOP_RIGHT],Kk=[Ak.BOTTOM,Ak.BOTTOM_LEFT,Ak.BOTTOM_RIGHT];function Xk({position:e}){const t={x:Uk,width:-2*Uk,y:0,height:0},n=Gk.indexOf(e)>-1,r=Kk.indexOf(e)>-1;return n&&(t.y=Yk,t.height=-Yk),r&&(t.height=-Yk),t}function Jk({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 Zk({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 Qk({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=Zk({coordinates:Jk({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=Zk({coordinates:Jk({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 eN=void 0;function tN({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys(Ak).map((e=>Ak[e])).filter((t=>-1===e.preferences.indexOf(t)))],o={[Ak.TOP]:$k,[Ak.TOP_RIGHT]:Bk,[Ak.RIGHT]:Fk,[Ak.BOTTOM_RIGHT]:Hk,[Ak.BOTTOM]:jk,[Ak.BOTTOM_LEFT]:Vk,[Ak.LEFT]:Wk,[Ak.TOP_LEFT]:_k},i=[];for(let a=0;a<r.length;a++){const s=r[a],l=o[s]({item:e}),c=Xk({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=()=>Qk({item:e,validator:t,force:n});if(n){const e=a();return e||(i[0]||eN)}return(e.extreme||e.elite)&&a()||eN}function nN({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=zk,ignoreLines:a=!1}){const s={inside:Pk({item:r,placement:o,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=qk({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=tN({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=tN({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,i.push(r),t.setPlacement(r))}))}var rN={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(){const{settings:e}=this.settings,{target:t,enabled:n}=e;if(!this.chart.component(t.point))return[];if("function"==typeof n&&!n())return[];const{allPoints:r}=t,o=r.length?e=>r.includes(e.key):e=>e.key===t.point,i=this.chart.findShapes("circle").filter(o);if(!i.length)return[];const a="horizontal"===e.orientation,s=a?"x":"y";i.sort(((e,t)=>e.localBounds[s]-t.localBounds[s]));const l={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineIndex:e.lineIndex},{height:c,width:u,edgeBleed:d}=this.rect,p={height:c,width:u,edgeBleed:d,insideStrategy:e.insideStrategy},{style:m}=this,f=Ik({nodes:i,extract:l,style:m,measureText:this.renderer.measureText,size:p,horizontal:a,rtl:e.rtl,showLabel:e.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:f}),nN({model:f,size:p,all:e.all}),f.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:m.fontSize,fontFamily:m.fontFamily,fill:m.fill,text:l.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})))}},oN={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var iN={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 aN({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 sN({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 lN({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function cN({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(Qa.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 uN({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?lN:cN)({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 dN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(Qa.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 pN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(Qa.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 mN({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(Qa.SCALE.MAJOR),d=e.scale(Qa.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?dN:pN)({chart:t,selected:a,connection:n,gradient:p,fallback:f})}function fN({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:mN({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 hN({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=uN({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(...fN({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 gN={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:sN({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=hN({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=sN({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return hN({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 vN={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},yN=e=>void 0===e.marker?vN.circle:vN[e.marker],bN=e=>void 0===e.markerFill||e.markerFill;function xN({series:e,layoutService:t}){switch(hu(e)){case es.MARKER:return(e=>({marker:yN(e),fill:bN(e)}))(e);case es.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);default:return{}}}function SN(e=ns,t){return t?e.axis===ts.PRIMARY:e.axis===ts.PRIMARY||hu(e)===es.BAR}var EN={exports:{}};var MN={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};var CN="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}=MN,r=CN,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*$")}(EN,EN.exports);const wN=["includePrerelease","loose","rtl"];var kN=e=>e?"object"!=typeof e?{loose:!0}:wN.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const NN=/^[0-9]+$/,TN=(e,t)=>{const n=NN.test(e),r=NN.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var ON={compareIdentifiers:TN,rcompareIdentifiers:(e,t)=>TN(t,e)};const RN=CN,{MAX_LENGTH:AN,MAX_SAFE_INTEGER:LN}=MN,{re:IN,t:PN}=EN.exports,DN=kN,{compareIdentifiers:qN}=ON;class zN{constructor(e,t){if(t=DN(t),e instanceof zN){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>AN)throw new TypeError(`version is longer than ${AN} characters`);RN("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?IN[PN.LOOSE]:IN[PN.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>LN||this.major<0)throw new TypeError("Invalid major version");if(this.minor>LN||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>LN||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<LN)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(RN("SemVer.compare",this.version,this.options,e),!(e instanceof zN)){if("string"==typeof e&&e===this.version)return 0;e=new zN(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof zN||(e=new zN(e,this.options)),qN(this.major,e.major)||qN(this.minor,e.minor)||qN(this.patch,e.patch)}comparePre(e){if(e instanceof zN||(e=new zN(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(RN("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 qN(n,r)}while(++t)}compareBuild(e){e instanceof zN||(e=new zN(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(RN("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 qN(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 $N=zN;const{MAX_LENGTH:BN}=MN,{re:FN,t:HN}=EN.exports,jN=$N,VN=kN;var WN=(e,t)=>{if(t=VN(t),e instanceof jN)return e;if("string"!=typeof e)return null;if(e.length>BN)return null;if(!(t.loose?FN[HN.LOOSE]:FN[HN.FULL]).test(e))return null;try{return new jN(e,t)}catch(e){return null}};const _N=WN;var UN=(e,t)=>{const n=_N(e,t);return n?n.version:null};const YN=WN;var GN=(e,t)=>{const n=YN(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const KN=$N;var XN=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new KN(e,n).inc(t,r).version}catch(e){return null}};const JN=$N;var ZN=(e,t,n)=>new JN(e,n).compare(new JN(t,n));const QN=ZN;var eT=(e,t,n)=>0===QN(e,t,n);const tT=WN,nT=eT;var rT=(e,t)=>{if(nT(e,t))return null;{const n=tT(e),r=tT(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 oT=$N;var iT=(e,t)=>new oT(e,t).major;const aT=$N;var sT=(e,t)=>new aT(e,t).minor;const lT=$N;var cT=(e,t)=>new lT(e,t).patch;const uT=WN;var dT=(e,t)=>{const n=uT(e,t);return n&&n.prerelease.length?n.prerelease:null};const pT=ZN;var mT=(e,t,n)=>pT(t,e,n);const fT=ZN;var hT=(e,t)=>fT(e,t,!0);const gT=$N;var vT=(e,t,n)=>{const r=new gT(e,n),o=new gT(t,n);return r.compare(o)||r.compareBuild(o)};const yT=vT;var bT=(e,t)=>e.sort(((e,n)=>yT(e,n,t)));const xT=vT;var ST=(e,t)=>e.sort(((e,n)=>xT(n,e,t)));const ET=ZN;var MT=(e,t,n)=>ET(e,t,n)>0;const CT=ZN;var wT=(e,t,n)=>CT(e,t,n)<0;const kT=ZN;var NT=(e,t,n)=>0!==kT(e,t,n);const TT=ZN;var OT=(e,t,n)=>TT(e,t,n)>=0;const RT=ZN;var AT=(e,t,n)=>RT(e,t,n)<=0;const LT=eT,IT=NT,PT=MT,DT=OT,qT=wT,zT=AT;var $T=(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 LT(e,n,r);case"!=":return IT(e,n,r);case">":return PT(e,n,r);case">=":return DT(e,n,r);case"<":return qT(e,n,r);case"<=":return zT(e,n,r);default:throw new TypeError("Invalid operator: "+t)}};const BT=$N,FT=WN,{re:HT,t:jT}=EN.exports;var VT,WT,_T,UT,YT,GT,KT,XT,JT,ZT,QT=(e,t)=>{if(e instanceof BT)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=HT[jT.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),HT[jT.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;HT[jT.COERCERTL].lastIndex=-1}else n=e.match(HT[jT.COERCE]);return null===n?null:FT(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};function eO(){if(UT)return _T;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}UT=1,_T=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{(WT?VT:(WT=1,VT=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}))(e)}catch(e){}return _T}function tO(){if(XT)return KT;XT=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}}KT=e;const t=new(function(){if(GT)return YT;GT=1;const e=eO(),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 YT=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=kN,r=nO(),o=CN,i=$N,{re:a,t:s,comparatorTrimReplace:l,tildeTrimReplace:c,caretTrimReplace:u}=EN.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 KT}function nO(){if(ZT)return JT;ZT=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}}JT=t;const n=kN,{re:r,t:o}=EN.exports,i=$T,a=CN,s=$N,l=tO();return JT}const rO=tO();var oO=(e,t,n)=>{try{t=new rO(t,n)}catch(e){return!1}return t.test(e)};const iO=tO();var aO=(e,t)=>new iO(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const sO=$N,lO=tO();var cO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new lO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&-1!==o.compare(e)||(r=e,o=new sO(r,n)))})),r};const uO=$N,dO=tO();var pO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new dO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&1!==o.compare(e)||(r=e,o=new uO(r,n)))})),r};const mO=$N,fO=tO(),hO=MT;var gO=(e,t)=>{e=new fO(e,t);let n=new mO("0.0.0");if(e.test(n))return n;if(n=new mO("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 mO(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!hO(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})),!o||n&&!hO(n,o)||(n=o)}return n&&e.test(n)?n:null};const vO=tO();var yO=(e,t)=>{try{return new vO(e,t).range||"*"}catch(e){return null}};const bO=$N,xO=nO(),{ANY:SO}=xO,EO=tO(),MO=oO,CO=MT,wO=wT,kO=AT,NO=OT;var TO=(e,t,n,r)=>{let o,i,a,s,l;switch(e=new bO(e,r),t=new EO(t,r),n){case">":o=CO,i=kO,a=wO,s=">",l=">=";break;case"<":o=wO,i=NO,a=CO,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(MO(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===SO&&(e=new xO(">=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 OO=TO;var RO=(e,t,n)=>OO(e,t,">",n);const AO=TO;var LO=(e,t,n)=>AO(e,t,"<",n);const IO=tO();var PO=(e,t,n)=>(e=new IO(e,n),t=new IO(t,n),e.intersects(t));const DO=oO,qO=ZN;const zO=tO(),$O=nO(),{ANY:BO}=$O,FO=oO,HO=ZN,jO=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===BO){if(1===t.length&&t[0].semver===BO)return!0;e=n.includePrerelease?[new $O(">=0.0.0-0")]:[new $O(">=0.0.0")]}if(1===t.length&&t[0].semver===BO){if(n.includePrerelease)return!0;t=[new $O(">=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=VO(o,t,n):"<"===t.operator||"<="===t.operator?i=WO(i,t,n):r.add(t.semver);if(r.size>1)return null;if(o&&i){if(a=HO(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&&!FO(e,String(o),n))return null;if(i&&!FO(e,String(i),n))return null;for(const r of t)if(!FO(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=VO(o,e,n),s===e&&s!==o)return!1}else if(">="===o.operator&&!FO(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=WO(i,e,n),l===e&&l!==i)return!1}else if("<="===i.operator&&!FO(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))},VO=(e,t,n)=>{if(!e)return t;const r=HO(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},WO=(e,t,n)=>{if(!e)return t;const r=HO(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var _O=(e,t,n={})=>{if(e===t)return!0;e=new zO(e,n),t=new zO(t,n);let r=!1;e:for(const o of e.set){for(const e of t.set){const t=jO(o,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const UO=EN.exports;var YO={re:UO.re,src:UO.src,tokens:UO.t,SEMVER_SPEC_VERSION:MN.SEMVER_SPEC_VERSION,SemVer:$N,compareIdentifiers:ON.compareIdentifiers,rcompareIdentifiers:ON.rcompareIdentifiers,parse:WN,valid:UN,clean:GN,inc:XN,diff:rT,major:iT,minor:sT,patch:cT,prerelease:dT,compare:ZN,rcompare:mT,compareLoose:hT,compareBuild:vT,sort:bT,rsort:ST,gt:MT,lt:wT,eq:eT,neq:NT,gte:OT,lte:AT,cmp:$T,coerce:QT,Comparator:nO(),Range:tO(),satisfies:oO,toComparators:aO,maxSatisfying:cO,minSatisfying:pO,minVersion:gO,validRange:yO,outside:TO,gtr:RO,ltr:LO,intersects:PO,simplifyRange:(e,t,n)=>{const r=[];let o=null,i=null;const a=e.sort(((e,t)=>qO(e,t,n)));for(const e of a){DO(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:_O},GO="0.23.1";const KO=e=>!e||YO.lt(YO.coerce(e),YO.coerce(GO));function XO(){return function({layout:e}){var t,n,r;const o=E(e,"qHyperCube.qMeasureInfo",[]),i=o.some((({series:e=ns})=>hu(e)===es.LINE)),a=me.continuous(e,(()=>i&&le.isTime(!0,e))),s=!KO(E(e,"version","")),l=o.filter((({series:e=ns})=>hu(e)===es.BAR)),c=l.length,u=l.filter((({series:e=ns})=>e.axis!==ts.SECONDARY)).length,d=l.filter((({series:e=ns})=>e.axis===ts.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:le.canBeContinuous(e),isDiscrete:!a,isContinuous:a,isTime:le.isTime(a,e),isSnapshot:me.snapshot(e),isBarSeriesStacked:m,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:h,isGrouped:f||h,isGroupedByMeasure:f||h,isDimensionLocked:g,groupSize:h?2:c,hasLineSeries:i}}}function JO({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 ZO=e=>"number"==typeof e&&!Number.isNaN(e);function QO({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=>hu(e.series)===es.BAR)),a=o.filter((e=>hu(e.series)===es.LINE)),s=o.filter((e=>hu(e.series)===es.MARKER));return{min:Math.min(...o.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>ZO(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...i.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>ZO(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>ZO(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>ZO(e.qMax))).map((e=>e.qMax)))}}}}function eR({isPrimary:e,layoutService:t,seriesModel:n}){const r=QO({isPrimary:e,layoutService:t,seriesModel:n}),o=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(es.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 tR({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(es.BAR).filter((t=>t.isPrimary===e)).length;return!r||o<2?QO({isPrimary:e,layoutService:t,seriesModel:n}):eR({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=>hu(e)===es.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 nR({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 rR({min:e,max:t,count:n,threshold:r,disable:o}){const i=function(e,t,n){const r=qr().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 oR=50,iR=100,aR=200,sR=125;function lR({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return oR;case 1:return iR;case 2:return aR;default:return e*sR}})(t.getLayoutValue(e+".spacing",1));return Math.max(1,Math.round(n/r))}function cR({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:i,min:a,max:s}){const l=lR({config:e,layoutService:n,size:i}),c=rR({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 uR({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function dR({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function pR({config:e,chart:t,extrema:n,min:r,max:o}){const i={roundedMin:0,roundedMax:0,ticks:[]},a=rR({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?uR:dR;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 mR({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 fR({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=cR({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:a,min:s,max:l});return nR({extrema:o,ticks:c.ticks})?c:pR({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:[...mR({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 hR({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 fR({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l})}function gR({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}=z.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 hR({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 vR({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:es.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===es.LINE?2:t!==es.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==es.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function yR({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function bR({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=N({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:Qa.SCALE.COLOR}},config:{auto:yR,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:Qa.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",rtl:"rtl"===s.direction,settings:vR({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[Qa.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 xR="REJECTED",SR=()=>{},ER=1e4,MR=2,CR=20,wR=200,kR=10;var NR={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-kR<=t.qTop,o=n.qLeft+n.qWidth+kR>=t.qLeft+t.qWidth,i=n.qTop+n.qHeight+kR>=t.qTop+t.qHeight,a=n.qLeft-kR<=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 TR={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-kR<=t.qTop,o=n.qTop+n.qHeight+kR>=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 OR={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 RR="pages";const AR="discretePan";function LR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{type:"Pan",key:"discrete:pan",options:{event:AR,pointers:1,threshold:10,enable(r,o){return this.started===AR||!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=AR;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 IR({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 PR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{gestures:[LR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i})],native:{type:"native",events:{wheel:IR({chart:e,actions:t,componentKey:n,scroller:i})}}}}function DR({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(ER/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(wR,n));return{width:e,height:Math.max(CR,Math.min(n*MR,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 qR(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(xR),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(xR),n=e})(a):r(a)}));return o.isProcessing=()=>!!t,o.hasQueued=()=>!!n,o.cancel=()=>{o.isProcessing()&&t.cancel(),o.hasQueued()&&(n.reject(xR),n=null)},o}const zR={command:{update:()=>{}}};var $R={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 BR={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 FR(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function HR(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 jR(e){return HR(e.qMatrix,(e=>e[0].qElemNumber))-1}var VR={inTotal:function({layoutService:e}){const t=FR(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=FR(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=FR(e),i=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=jR(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 WR=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function _R(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return WR(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:WR(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return WR(e,n);return HR(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var UR={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=_R(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=_R(t).area(e(),l,a.qArea),d=jR(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 YR({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 GR={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 KR({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 XR({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 JR({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}=Qa.COMPONENT,{PRIMARY:f,SECONDARY:h}=ts,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:o,SLICED_HAT:i}=Qa.COMPONENT,{PRIMARY:a,SECONDARY:s}=ts,{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 T({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:u.fontFamily},main:{key:Qa.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:[Qa.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}`,`${Qa.COMPONENT.BAR_OOB}-max-${f}`,`${Qa.COMPONENT.BAR_OOB}-max-${h}`,`${Qa.COMPONENT.BAR_OOB}-min-${f}`,`${Qa.COMPONENT.BAR_OOB}-min-${h}`,Qa.COMPONENT.DATA_OOB_MARKER+"-max",Qa.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:Qa.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:XR({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:Qa.COMPONENT.LEGEND_TOOLTIP,component:Qa.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:ZR}=Zd;const QR={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 eA={query:{getCanScroll:()=>!0}};function tA({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function nA({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]===Qa.COMPONENT.LEGEND_CATEGORICAL}),r()}function rA({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(Qa.SCALE.MAJOR),r=P({chart:e,actions:t,selections:o,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{clear:tA},selectionEvents:{start:nA}}});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 oA={version:"1.23.3",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 iA=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=hu(n[e].qDef.series),o===es.BAR?r[0]=1:o===es.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)},aA=e=>(t,n)=>{let r;const o=t.qHyperCubeDef.qMeasures[n];if(o){const{type:e}=o.qDef.series;r=e===es.LINE?"Visualizations.Descriptions.HeightLine":e===es.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function sA(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&&hu(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===es.LINE?e.color.mode="primary":"byDimension"===o&&r.length>1&&(e.color.mode="byMultiple")}function lA(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:iA(t),added(e,t){gs.addCallbackCustomTooltip(t)},moved(e,t){gs.moveCallbackCustomTooltip(t,e)},removed(e,t){gs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){gs.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:aA(t),added({qDef:e},t){var n;sA(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:es.LINE,axis:ts.SECONDARY}:e.series={type:es.BAR,axis:ts.PRIMARY})},moved(e,t){sA(t)}}}}function cA(e){const t=lA(e);return{properties:oA,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const o=W.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&&Q(!0,o.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),o},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>W.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const uA=(e,t,n,r)=>{const o=t+".fontFamily",i=t+".fontSize";return{fontFamilyItem:{component:"dropdown",ref:e+".fontFamily",options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:e+".fontSize",options:()=>n.getOptions(i),defaultValue:()=>n.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:e+".color",defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function dA(e,t,n){const r=D({theme:t,translator:n,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value"]}});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,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2431_COMBOCHART_BG"),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}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:uA("bar.label.value","label.value",r,t)}}}:void 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}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:uA("line.label.value","label.value",r,t)}}}:void 0}},axisTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:uA("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:uA("axis.label.name","axis.label.name",r,t)}}}:void 0}};const o={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"}]},i={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")}.${o.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},a={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},s={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},l={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"}]},c={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 t="grouped"===e.barGrouping.grouping,n=e.qHyperCubeDef.qMeasures.filter((e=>hu(e.qDef.series)===es.BAR)).length,r=t&&n>1;return[{key:"bar",style:{strokeWidth:o.defaultValue,strokeColor:i.defaultValue(),width:r?.9:.7}},{key:"line",style:{dataPointSize:a.defaultValue,lineThickness:s.defaultValue,lineType:l.defaultValue,lineCurve:c.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:o,barStrokeColor:i,barWidth:{component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>hu(e.qDef.series)===es.LINE));return!me.continuous(n.layout,r&&le.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:a,lineThickness:s,lineType:l,lineCurve:c}}}}}}}const pA={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",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 mA(e){const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=ns})=>hu(e)===es.LINE));return me.continuous(e,(()=>t&&le.isTime(!0,e)))}function fA(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function hA(e){var t,n,r;return fA(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 gA(e){var t,n;return fA(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function vA(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 yA(e){return gA(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function bA(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?[...vA(n),...yA(e)]:yA(e)}(t,n,e)))}function xA(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||mA(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 hu(null===(t=e.qDef)||void 0===t?void 0:t.series)===es.MARKER}},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return hu(null===(t=e.qDef)||void 0===t?void 0:t.series)===es.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)=>fA(...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:hA},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:gA}}}}}}}}}}}}const SA=!0;function EA(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?SN(t,SA):!SN(t,SA)}))}function MA(e,t){return t.getMeasures().filter((e=>hu(e.qDef.series)===es.LINE)).length>0}function CA(e,t,n){const r=t.getMeasures().filter((e=>hu(e.qDef.series)===es.BAR));return r.filter((e=>e.qDef.series.axis!==ts.SECONDARY)).length>n||r.filter((e=>e.qDef.series.axis===ts.SECONDARY)).length>n}const wA=(e,t,n,r)=>{const o="vertical"===t.layout.orientation||mA(t.layout)?"y":"x",i=EA(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 kA(e){var t,n,r,o,i;const{translator:a,flags:s,anything:l}=e,c=null==e||null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme,u=null==e||null===(r=e.anything)||void 0===r||null===(o=r.sense)||void 0===o||null===(i=o.isUnsupportedFeature)||void 0===i?void 0:i.call(o,"continuousData"),d={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>bA(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>fA(e)))}}},p=e=>!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor);const m=(e,t)=>!E(e,"color.auto")&&"primary"===E(e,"color.mode")&&!((e=>E(e,"layout.qHyperCube.qMeasureInfo",[]).filter((e=>!!p(e))).length>0)(t)&&"measure"===E(e,"color.useBaseColors")||function(e){return E(e,"layout.qHyperCube.qDimensionInfo",[]).filter((e=>!!p(e))).length>0}(t)&&"dimension"===E(e,"color.useBaseColors")),f=(e,t)=>{var n,r;return e.qHyperCubeDef.qMeasures.some((e=>fA(e)))||!s.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)||m(e,t))},h={items:{disclaimer:{show:(e,t)=>f(e,t),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&M(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!f(e,t)}}},g={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&&CA(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&&MA(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){M(e,"dataPoint.show",!1),M(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)=>a.get(EA(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&&EA(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&&EA(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"}}}}}}},v={uses:"settings",items:{simpleStyling:null!=s&&s.isEnabled("COMBOCHART_SIMPLE_STYLING")?pA:void 0,simpleLabels:g,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:dA(s,c,a),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)=>CA(0,t,1)&&!mA(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)=>mA(n.layout),convertFunctions:(y="vertical",{get:(e,t,n)=>mA(n.layout)?y:e(t.type),set(e,t,n,r){t(n.type,mA(r.layout)?y:e,y)}})},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)=>!mA(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)=>MA(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>MA(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)=>CA(0,t,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:d,simpleColors:h,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||mA(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 o;return o=r?a.get(`properties.${n}AxisWithInfo`,[r]):a.get(`properties.${n}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||mA(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)=>!mA(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:!u}},measureAxis:{uses:"axis.measureAxis",label:(e,t)=>wA(e,t,a,0),show:(e,t)=>EA(e,t,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>wA(e,t,a,0),show:(e,t)=>EA(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)&&SN(null==e?void 0:e.series,SA)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t)=>"none"!==e.measureAxes[0].show&&EA(e,t,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||mA(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&&EA(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)=>EA(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?(M(o,"measureAxes.0.autoMinMax",!1),M(o,"measureAxes.0.minMax","min"),M(o,"measureAxes.0.min",0)):M(o,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t)=>wA(e,t,a,1),show:(e,t)=>EA(e,t,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>wA(e,t,a,1),show:(e,t)=>EA(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)&&!SN(null==e?void 0:e.series,SA)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t)=>"none"!==e.measureAxes[1].show&&EA(e,t,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||mA(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&&EA(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)=>EA(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?(M(o,"measureAxes.1.autoMinMax",!1),M(o,"measureAxes.1.minMax","min"),M(o,"measureAxes.1.min",0)):M(o,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var y;s.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(v.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!=l&&null!==(r=l.sense)&&void 0!==r&&null!==(o=r.isUnsupportedFeature)&&void 0!==o&&o.call(r,"includeZeroValues"))return!1;return!mA(n.layout)}}}},measures:xA(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=>SN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,SA)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!SN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,SA)},dimRefLines:{uses:"dimReflines"}}},settings:v}}}function NA(e){return e.qHyperCubeDef.qMeasures.filter((e=>hu(e.qDef.series)===es.LINE)).length>0}function TA(){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)=>NA(e)||!mA(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=>hu(e.qDef.series)===es.BAR));return t?n.filter((e=>e.qDef.series.axis===ts.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===ts.SECONDARY)).length>1:n.length>1}(e,!KO(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!mA(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)=>!mA(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=>NA(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>NA(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>fA(e)))}}}}}}const OA={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 RA(e,t,n,r,o){const{axis:i,icon:a,tid:s,translation:l}=OA[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 AA(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"});RA(r,i,t,n,"bar"),RA(r,i,t,n,"line"),RA(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 LA(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 IA=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function PA(e){return{definition:kA(e),softDefinition:TA(),support:{snapshot:IA,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:AA,extendMetrics:LA,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=W.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:lA(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&&Q(!0,e.qProperty.measureAxes[i],n.properties.measureAxis,{logarithmic:!1}),bA(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return W.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:function(e){return KO(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=ns),void 0===t.series.type&&(t.series.type=ns.type),void 0===t.series.axis&&(t.series.axis=t.series.type===es.BAR?ts.PRIMARY:ts.SECONDARY),t.series.type===es.BAR&&t.series.axis===ts.SECONDARY&&(t.series.axis=ts.PRIMARY)})),e.version=GO),e}(e)}}}}}}));