@nebula.js/sn-bar-chart 1.31.2 → 1.31.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,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-bar-chart v1.31.2
2
+ * @nebula.js/sn-bar-chart v1.31.3
3
3
  * Copyright (c) 2023 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -84,4 +84,4 @@ var eR=ZD.exports,tR=rN,nR=Z_.exports;function rR(e,t,n,r,i,o,a,s){if(!e){if(e=v
84
84
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
85
85
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
86
86
  * SOFTWARE.
87
- */var zG=RG&&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()}),PG))}};function FG(e){return e&&"[object Function]"==={}.toString.call(e)}function jG(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function BG(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function HG(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=jG(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:HG(BG(e))}function VG(e){return e&&e.referenceNode?e.referenceNode:e}var WG=RG&&!(!window.MSInputMethodContext||!document.documentMode),UG=RG&&/MSIE 10/.test(navigator.userAgent);function $G(e){return 11===e?WG:10===e?UG:WG||UG}function YG(e){if(!e)return document.documentElement;for(var t=$G(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"===jG(n,"position")?YG(n):n:e?e.ownerDocument.documentElement:document.documentElement}function KG(e){return null!==e.parentNode?KG(e.parentNode):e}function GG(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,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&YG(a.firstElementChild)!==a?YG(l):l;var c=KG(e);return c.host?GG(c.host,t):GG(e,KG(t).host)}function XG(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 i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function JG(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=XG(t,"top"),i=XG(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function ZG(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 QG(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],$G(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function eX(e){var t=e.body,n=e.documentElement,r=$G(10)&&getComputedStyle(n);return{height:QG("Height",t,n,r),width:QG("Width",t,n,r)}}var tX=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},nX=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}}(),rX=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},iX=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 oX(e){return iX({},e,{right:e.left+e.width,bottom:e.top+e.height})}function aX(e){var t={};try{if($G(10)){t=e.getBoundingClientRect();var n=XG(e,"top"),r=XG(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?eX(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,s=o.height||e.clientHeight||i.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=jG(e);l-=ZG(u,"x"),c-=ZG(u,"y"),i.width-=l,i.height-=c}return oX(i)}function sX(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=$G(10),i="HTML"===t.nodeName,o=aX(e),a=aX(t),s=HG(e),l=jG(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=oX({top:o.top-a.top-c,left:o.left-a.left-u,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!r&&i){var f=parseFloat(l.marginTop,10),h=parseFloat(l.marginLeft,10);d.top-=c-f,d.bottom-=c-f,d.left-=u-h,d.right-=u-h,d.marginTop=f,d.marginLeft=h}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=JG(d,t)),d}function lX(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=sX(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:XG(n),s=t?0:XG(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return oX(l)}function cX(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===jG(e,"position"))return!0;var n=BG(e);return!!n&&cX(n)}function uX(e){if(!e||!e.parentElement||$G())return document.documentElement;for(var t=e.parentElement;t&&"none"===jG(t,"transform");)t=t.parentElement;return t||document.documentElement}function dX(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?uX(e):GG(e,VG(t));if("viewport"===r)o=lX(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=HG(BG(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=sX(s,a,i);if("HTML"!==s.nodeName||cX(a))o=l;else{var c=eX(e.ownerDocument),u=c.height,d=c.width;o.top+=l.top-l.marginTop,o.bottom=u+l.top,o.left+=l.left-l.marginLeft,o.right=d+l.left}}var f="number"==typeof(n=n||0);return o.left+=f?n:n.left||0,o.top+=f?n:n.top||0,o.right-=f?n:n.right||0,o.bottom-=f?n:n.bottom||0,o}function fX(e){return e.width*e.height}function hX(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=dX(n,r,o,i),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 iX({key:e},s[e],{area:fX(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 pX(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?uX(t):GG(t,VG(n));return sX(n,i,r)}function mX(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 gX(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 yX(e,t,n){n=n.split("-")[0];var r=mX(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[c]:t[gX(s)],i}function vX(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function bX(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=vX(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&&FG(n)&&(t.offsets.popper=oX(t.offsets.popper),t.offsets.reference=oX(t.offsets.reference),t=n(t,e))})),t}function xX(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=pX(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=hX(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=yX(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=bX(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function wX(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function SX(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function kX(){return this.state.isDestroyed=!0,wX(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[SX("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function MX(e){var t=e.ownerDocument;return t?t.defaultView:window}function CX(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||CX(HG(o.parentNode),t,n,r),r.push(o)}function EX(e,t,n,r){n.updateBound=r,MX(e).addEventListener("resize",n.updateBound,{passive:!0});var i=HG(e);return CX(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function TX(){this.state.eventsEnabled||(this.state=EX(this.reference,this.options,this.state,this.scheduleUpdate))}function qX(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,MX(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 DX(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function NX(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&DX(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var AX=RG&&/Firefox/i.test(navigator.userAgent);function OX(e,t,n){var r=vX(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var LX=["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"],IX=LX.slice(3);function _X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=IX.indexOf(e),r=IX.slice(n+1).concat(IX.slice(0,n));return t?r.reverse():r}var RX="flip",PX="clockwise",zX="counterclockwise";function FX(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(vX(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 i=(1===r?!o:o)?"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 i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return oX(s)[t]/100*o}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*o;return o}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){DX(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var jX={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 i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:rX({},l,o[l]),end:rX({},l,o[l]+o[c]-a[c])};e.offsets.popper=iX({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=DX(+n)?[+n,0]:FX(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||YG(e.instance.popper);e.instance.reference===n&&(n=YG(n));var r=SX("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=dX(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[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])),rX({},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))),rX({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=iX({},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,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[c]),n[l]>o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!OX(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 i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),f=l?"left":"top",h=l?"bottom":"right",p=mX(r)[c];s[h]-p<a[d]&&(e.offsets.popper[d]-=a[d]-(s[h]-p)),s[d]+p>a[h]&&(e.offsets.popper[d]+=s[d]+p-a[h]),e.offsets.popper=oX(e.offsets.popper);var m=s[d]+s[c]/2-p/2,g=jG(e.instance.popper),y=parseFloat(g["margin"+u],10),v=parseFloat(g["border"+u+"Width"],10),b=m-e.offsets.popper[d]-y-v;return b=Math.max(Math.min(a[c]-p,b),0),e.arrowElement=r,e.offsets.arrow=(rX(n={},d,Math.round(b)),rX(n,f,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(wX(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=dX(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=gX(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case RX:a=[r,i];break;case PX:a=_X(r);break;case zX:a=_X(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],i=gX(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,f="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),h=d(c.left)<d(n.left),p=d(c.right)>d(n.right),m=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),y="left"===r&&h||"right"===r&&p||"top"===r&&m||"bottom"===r&&g,v=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(v&&"start"===o&&h||v&&"end"===o&&p||!v&&"start"===o&&m||!v&&"end"===o&&g),x=!!t.flipVariationsByContent&&(v&&"start"===o&&p||v&&"end"===o&&h||!v&&"start"===o&&g||!v&&"end"===o&&m),w=b||x;(f||y||w)&&(e.flipped=!0,(f||y)&&(r=a[l+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=iX({},e.offsets.popper,yX(e.instance.popper,e.offsets.reference,e.placement)),e=bX(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,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=gX(t),e.offsets.popper=oX(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!OX(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=vX(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,i=e.offsets.popper,o=vX(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=YG(e.instance.popper),l=aX(s),c={position:i.position},u=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},l=o(i.width),c=o(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),f=t?u||d||l%2==c%2?o:a:s,h=t?o:s;return{left:f(l%2==1&&c%2==1&&!d&&t?r.left-1:r.left),top:h(r.top),bottom:h(r.bottom),right:f(r.right)}}(e,window.devicePixelRatio<2||!AX),d="bottom"===n?"top":"bottom",f="right"===r?"left":"right",h=SX("transform"),p=void 0,m=void 0;if(m="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,p="right"===f?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&h)c[h]="translate3d("+p+"px, "+m+"px, 0)",c[d]=0,c[f]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,y="right"===f?-1:1;c[d]=m*g,c[f]=p*y,c.willChange=d+", "+f}var v={"x-placement":e.placement};return e.attributes=iX({},v,e.attributes),e.styles=iX({},c,e.styles),e.arrowStyles=iX({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return NX(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&&NX(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=pX(i,t,e,n.positionFixed),a=hX(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),NX(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},BX=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};tX(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=zG(this.update.bind(this)),this.options=iX({},e.Defaults,i),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(iX({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){r.options.modifiers[t]=iX({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return iX({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&FG(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return nX(e,[{key:"update",value:function(){return xX.call(this)}},{key:"destroy",value:function(){return kX.call(this)}},{key:"enableEventListeners",value:function(){return TX.call(this)}},{key:"disableEventListeners",value:function(){return qX.call(this)}}]),e}();function HX(e){return"function"==typeof e?e():e}BX.Utils=("undefined"!=typeof window?window:global).PopperUtils,BX.placements=LX,BX.Defaults=jX;var VX="undefined"!=typeof window?KN.useLayoutEffect:KN.useEffect,WX={},UX=KN.forwardRef((function(e,t){var n=e.anchorEl,r=e.children,i=e.container,o=e.disablePortal,a=void 0!==o&&o,s=e.keepMounted,l=void 0!==s&&s,c=e.modifiers,u=e.open,d=e.placement,f=void 0===d?"bottom":d,h=e.popperOptions,p=void 0===h?WX:h,m=e.popperRef,g=e.transition,y=void 0!==g&&g,v=xA(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),b=KN.useRef(null),x=mU(b,t),w=KN.useRef(null),S=mU(w,m),k=KN.useRef(S);VX((function(){k.current=S}),[S]),KN.useImperativeHandle(m,(function(){return w.current}),[]);var M=KN.useState(!0),C=M[0],E=M[1],T=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}}(f),q=KN.useState(T),D=q[0],N=q[1],A=KN.useCallback((function(){if(b.current&&n&&u){w.current&&(w.current.destroy(),k.current(null));var e=function(e){N(e.placement)};HX(n);var t=new BX(HX(n),b.current,vA({placement:T},p,{modifiers:vA({},a?{}:{preventOverflow:{boundariesElement:"window"}},{},c,{},p.modifiers),onCreate:vY(e,p.onCreate),onUpdate:vY(e,p.onUpdate)}));k.current(t)}}),[n,a,c,u,T,p]),O=KN.useCallback((function(e){pU(x,e),A()}),[x,A]),L=function(){w.current&&(w.current.destroy(),k.current(null))};if(KN.useEffect((function(){A()}),[A]),KN.useEffect((function(){return function(){L()}}),[]),KN.useEffect((function(){u||y||L()}),[u,y]),!l&&!u&&(!y||C))return null;var I={placement:D};return y&&(I.TransitionProps={in:u,onEnter:function(){E(!1)},onExited:function(){E(!0),L()}}),KN.createElement(yY,{disablePortal:a,container:i},KN.createElement("div",vA({ref:O,role:"tooltip"},v,{style:vA({position:"fixed",top:0,left:0},v.style)}),"function"==typeof r?r(I):r))})),$X=N$(KN.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"})),YX=N$(KN.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"})),KX=KN.createElement($X,null);var GX=W_((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 KN.createElement("div",{className:C_(n.root,t&&n.checked)},KX,KN.createElement(YX,{className:n.layer}))})),XX=KN.createContext(),JX=KN.createElement(GX,{checked:!0}),ZX=KN.createElement(GX,null),QX=KN.forwardRef((function(e,t){var n=e.checked,r=e.classes,i=e.color,o=void 0===i?"secondary":i,a=e.name,s=e.onChange,l=xA(e,["checked","classes","color","name","onChange"]),c=KN.useContext(XX),u=n,d=vY(s,c&&c.onChange),f=a;return c&&(void 0===u&&(u=c.value===e.value),void 0===f&&(f=c.name)),KN.createElement(J$,vA({color:o,type:"radio",icon:ZX,checkedIcon:JX,classes:{root:C_(r.root,r["color".concat(U_(o))]),checked:r.checked,disabled:r.disabled},name:f,checked:u,onChange:d,ref:t},l))}));function eJ(e,t){return"object"===SA(t)&&null!==t?e===t:String(e)===String(t)}W_((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:pA(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:pA(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})(QX),KN.forwardRef((function(e,t){var n=e.actions,r=e.children,i=e.name,o=e.value,a=e.onChange,s=xA(e,["actions","children","name","value","onChange"]),l=KN.useRef(null),c=KN.useRef(null!=o).current,u=KN.useState((function(){return c?null:e.defaultValue})),d=u[0],f=u[1];KN.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 h={name:i,onChange:function(e){c||f(e.target.value),a&&a(e,e.target.value)},value:c?o:d},p=mU(t,l);return KN.createElement(vK,vA({role:"radiogroup",ref:p},s),KN.createElement(XX.Provider,{value:h},r))})),KN.Component;var tJ=KN.forwardRef((function(e,t){var n=e.autoFocus,r=e.autoWidth,i=e.children,o=e.classes,a=e.className,s=e.defaultValue,l=e.disabled,c=e.displayEmpty,u=e.labelId,d=e.IconComponent,f=e.inputRef,h=e.MenuProps,p=void 0===h?{}:h,m=e.multiple,g=e.name,y=e.onBlur,v=e.onChange,b=e.onClose,x=e.onFocus,w=e.onOpen,S=e.open,k=e.readOnly,M=e.renderValue;e.required;var C=e.SelectDisplayProps,E=void 0===C?{}:C,T=e.tabIndex;e.type;var q=e.value,D=e.variant,N=void 0===D?"standard":D,A=xA(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"]),O=KN.useRef(null!=q).current,L=KN.useState(s),I=L[0],_=L[1],R=O?q:I,P=KN.useRef(null),z=KN.useState(null),F=z[0],j=z[1],B=KN.useRef(null!=S).current,H=KN.useState(),V=H[0],W=H[1],U=KN.useState(!1),$=U[0],Y=U[1],K=mU(t,f);KN.useImperativeHandle(K,(function(){return{focus:function(){F.focus()},node:P.current,value:R}}),[F,R]),KN.useEffect((function(){n&&F&&F.focus()}),[n,F]);var G,X,J=function(e,t){e?w&&w(t):(F.focus(),b&&b(t)),B||(W(r?null:F.clientWidth),Y(e))},Z=function(e){return function(t){var n;if(m||J(!1,t),m){n=Array.isArray(R)?iI(R):[];var r=R.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;O||_(n),v&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),v(t,e))}},Q=null!==F&&(B?S:$);delete A["aria-invalid"];var ee=[],te=!1;(sK({value:R})||c)&&(M?G=M(R):te=!0);var ne=KN.Children.map(i,(function(e){if(!KN.isValidElement(e))return null;var t;if(m){if(!Array.isArray(R))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=R.some((function(t){return eJ(t,e.props.value)})))&&te&&ee.push(e.props.children)}else(t=eJ(R,e.props.value))&&te&&(X=e.props.children);return KN.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:Z(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})}));te&&(G=m?ee.join(", "):X);var re,ie=V;!r&&B&&F&&(ie=F.clientWidth),re=void 0!==T?T:l?null:0;var oe=E.id||(g?"mui-component-select-".concat(g):void 0);return KN.createElement(KN.Fragment,null,KN.createElement("div",vA({className:C_(o.root,o.select,o.selectMenu,o[N],a,l&&o.disabled),ref:j,tabIndex:re,role:"button","aria-expanded":Q?"true":void 0,"aria-labelledby":"".concat(u||""," ").concat(oe||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!k){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),J(!0,e))}},onClick:l||k?null:function(e){J(!0,e)},onBlur:function(e){!Q&&y&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:R,name:g}}),y(e))},onFocus:x},E,{id:oe}),function(e){return null==e||"string"==typeof e&&!e.trim()}(G)?KN.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):G),KN.createElement("input",vA({value:Array.isArray(R)?R.join(","):R,name:g,ref:P,type:"hidden",autoFocus:n},A)),KN.createElement(d,{className:C_(o.icon,o["icon".concat(U_(N))],Q&&o.iconOpen)}),KN.createElement(kG,vA({id:"menu-".concat(g||""),anchorEl:F,open:Q,onClose:function(e){J(!1,e)}},p,{MenuListProps:vA({"aria-labelledby":u,role:"listbox",disableListWrap:!0},p.MenuListProps),PaperProps:vA({},p.PaperProps,{style:vA({minWidth:ie},null!=p.PaperProps?p.PaperProps.style:null)})}),ne))})),nJ=DG,rJ=KN.createElement(HK,null),iJ=KN.createElement(fK,null),oJ=KN.forwardRef((function e(t,n){var r=t.autoWidth,i=void 0!==r&&r,o=t.children,a=t.classes,s=t.displayEmpty,l=void 0!==s&&s,c=t.IconComponent,u=void 0===c?qG:c,d=t.id,f=t.input,h=t.inputProps,p=t.labelId,m=t.MenuProps,g=t.multiple,y=void 0!==g&&g,v=t.native,b=void 0!==v&&v,x=t.onClose,w=t.onOpen,S=t.open,k=t.renderValue,M=t.SelectDisplayProps,C=t.variant,E=void 0===C?"standard":C,T=t.labelWidth,q=void 0===T?0:T,D=xA(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),N=b?TG:tJ,A=tK({props:t,muiFormControl:Y$(),states:["variant"]}).variant||E,O=f||{standard:rJ,outlined:KN.createElement(_G,{labelWidth:q}),filled:iJ}[A];return KN.cloneElement(O,vA({inputComponent:N,select:!0,inputProps:vA({children:o,IconComponent:u,variant:A,type:void 0,multiple:y},b?{}:{autoWidth:i,displayEmpty:l,labelId:p,MenuProps:m,onClose:x,onOpen:w,open:S,renderValue:k,SelectDisplayProps:vA({id:d},M)},{},h,{classes:h?n_({baseClasses:a,newClasses:h.classes,Component:e}):a},f?f.props.inputProps:{}),ref:n},D))}));oJ.muiName="Select";var aJ=W_(nJ,{name:"MuiSelect"})(oJ);var sJ=W_((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:vA({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,i=e.open,o=e.value,a=e.valueLabelDisplay;return"off"===a?t:KN.cloneElement(t,{className:C_(t.props.className,(i||"on"===a)&&n.open,n.thumb)},KN.createElement("span",{className:C_(n.offset,r)},KN.createElement("span",{className:n.circle},KN.createElement("span",{className:n.label},o))))}));function lJ(e,t){return e-t}function cJ(e,t,n){return e<t?t:e>n?n:e}function uJ(e,t){return e.reduce((function(e,n,r){var i=Math.abs(t-n);return null===e||i<e.distance||i===e.distance?{distance:i,index:r}:e}),null).index}function dJ(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 fJ(e,t,n){return 100*(e-t)/(n-t)}function hJ(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 pJ(e){var t=e.values,n=e.source,r=e.newValue,i=e.index;if(t[i]===r)return n;var o=iI(t);return o[i]=r,o}function mJ(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 gJ={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,"%")}}}},yJ=[],vJ=function(e){return e},bJ=KN.forwardRef((function(e,t){var n=e["aria-label"],r=e["aria-labelledby"],i=e["aria-valuetext"],o=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,f=e.disabled,h=void 0!==f&&f,p=e.getAriaLabel,m=e.getAriaValueText,g=e.marks,y=void 0===g?yJ:g,v=e.max,b=void 0===v?100:v,x=e.min,w=void 0===x?0:x,S=e.name,k=e.onChange,M=e.onChangeCommitted,C=e.onMouseDown,E=e.orientation,T=void 0===E?"horizontal":E,q=e.step,D=void 0===q?1:q,N=e.ThumbComponent,A=void 0===N?"span":N,O=e.track,L=void 0===O?"normal":O,I=e.value,_=e.ValueLabelComponent,R=void 0===_?sJ:_,P=e.valueLabelDisplay,z=void 0===P?"off":P,F=e.valueLabelFormat,j=void 0===F?vJ:F,B=xA(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"]),H=V_(),V=KN.useRef(null!=I).current,W=KN.useRef(),U=KN.useState(-1),$=U[0],Y=U[1],K=KN.useState(-1),G=K[0],X=K[1],J=KN.useState(d),Z=J[0],Q=J[1],ee=V?I:Z,te=Array.isArray(ee),ne=KN.useRef(),re=te?iI(ee).sort(lJ):[ee];re=re.map((function(e){return cJ(e,w,b)}));var ie=!0===y&&null!==D?iI(Array(Math.floor((b-w)/D)+1)).map((function(e,t){return{value:w+D*t}})):y;ne.current={source:ee};var oe=RU(),ae=oe.isFocusVisible,se=oe.onBlurVisible,le=oe.ref,ce=KN.useState(-1),ue=ce[0],de=ce[1],fe=KN.useRef(),he=mU(le,fe),pe=mU(t,he),me=MU((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));ae(e)&&de(t),X(t)})),ge=MU((function(){-1!==ue&&(de(-1),se()),X(-1)})),ye=MU((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));X(t)})),ve=MU((function(){X(-1)})),be=MU((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),r=re[n],i=(b-w)/10,o=ie.map((function(e){return e.value})),a=o.indexOf(r);switch(e.key){case"Home":t=w;break;case"End":t=b;break;case"PageUp":D&&(t=r+i);break;case"PageDown":D&&(t=r-i);break;case"ArrowRight":case"ArrowUp":t=D?r+D:o[a+1]||o[o.length-1];break;case"ArrowLeft":case"ArrowDown":t=D?r-D:o[a-1]||o[0];break;default:return}if(e.preventDefault(),D&&(t=hJ(t,D)),t=cJ(t,w,b),te){var s=t;t=pJ({values:re,source:ee,newValue:t,index:n}).sort(lJ),mJ({sliderRef:fe,activeIndex:t.indexOf(s)})}V||Q(t),de(n),k&&k(e,t),M&&M(e,t)})),xe=KN.useRef(),we=T;"rtl"===H.direction&&"vertical"!==T&&(we+="-reverse");var Se=KN.useCallback((function(e){var t,n,r=e.finger,i=e.move,o=void 0!==i&&i,a=e.values,s=e.source,l=fe.current.getBoundingClientRect(),c=l.width,u=l.height,d=l.bottom,f=l.left;if(t=0===we.indexOf("vertical")?(d-r.y)/u:(r.x-f)/c,-1!==we.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,w,b),D)n=hJ(n,D);else{var h=ie.map((function(e){return e.value}));n=h[uJ(h,n)]}n=cJ(n,w,b);var p=0;if(te){var m=n;p=(n=pJ({values:a,source:s,newValue:n,index:p=o?xe.current:uJ(a,n)}).sort(lJ)).indexOf(m),xe.current=p}return{newValue:n,activeIndex:p}}),[b,w,we,te,D,ie]),ke=MU((function(e){var t=dJ(e,W);if(t){var n=Se({finger:t,move:!0,values:re,source:ee}),r=n.newValue,i=n.activeIndex;mJ({sliderRef:fe,activeIndex:i,setActive:Y}),V||Q(r),k&&k(e,r)}})),Me=MU((function(e){var t=dJ(e,W);if(t){var n=Se({finger:t,values:re,source:ee}).newValue;Y(-1),"touchend"===e.type&&X(-1),M&&M(e,n),W.current=void 0,document.body.removeEventListener("mousemove",ke),document.body.removeEventListener("mouseup",Me),document.body.removeEventListener("mouseenter",Ce),document.body.removeEventListener("touchmove",ke),document.body.removeEventListener("touchend",Me)}})),Ce=MU((function(e){0===e.buttons&&Me(e)})),Ee=MU((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(W.current=t.identifier);var n=dJ(e,W),r=Se({finger:n,values:re,source:ee}),i=r.newValue,o=r.activeIndex;mJ({sliderRef:fe,activeIndex:o,setActive:Y}),V||Q(i),k&&k(e,i),document.body.addEventListener("touchmove",ke),document.body.addEventListener("touchend",Me)}));KN.useEffect((function(){var e=fe.current;return e.addEventListener("touchstart",Ee),function(){e.removeEventListener("touchstart",Ee),document.body.removeEventListener("mousemove",ke),document.body.removeEventListener("mouseup",Me),document.body.removeEventListener("mouseenter",Ce),document.body.removeEventListener("touchmove",ke),document.body.removeEventListener("touchend",Me)}}),[Ce,Me,ke,Ee]);var Te=MU((function(e){C&&C(e),e.preventDefault();var t=dJ(e,W),n=Se({finger:t,values:re,source:ee}),r=n.newValue,i=n.activeIndex;mJ({sliderRef:fe,activeIndex:i,setActive:Y}),V||Q(r),k&&k(e,r),document.body.addEventListener("mousemove",ke),document.body.addEventListener("mouseenter",Ce),document.body.addEventListener("mouseup",Me)})),qe=fJ(te?re[0]:w,w,b),De=fJ(re[re.length-1],w,b)-qe,Ne=vA({},gJ[we].offset(qe),{},gJ[we].leap(De));return KN.createElement(u,vA({ref:pe,className:C_(o.root,o["color".concat(U_(l))],a,h&&o.disabled,ie.length>0&&ie.some((function(e){return e.label}))&&o.marked,!1===L&&o.trackFalse,{vertical:o.vertical}[T],{inverted:o.trackInverted}[L]),onMouseDown:Te},B),KN.createElement("span",{className:o.rail}),KN.createElement("span",{className:o.track,style:Ne}),KN.createElement("input",{value:re.join(","),name:S,type:"hidden"}),ie.map((function(e){var t,n=fJ(e.value,w,b),r=gJ[we].offset(n);if(!1===L)t=-1!==re.indexOf(e.value);else{var i=te?e.value>=re[0]&&e.value<=re[re.length-1]:e.value<=re[0];t=i&&"normal"===L||!i&&"inverted"===L}return KN.createElement(KN.Fragment,{key:e.value},KN.createElement("span",{style:r,className:C_(o.mark,t&&o.markActive)}),KN.createElement("span",{"aria-hidden":!0,style:r,className:C_(o.markLabel,t&&o.markLabelActive)},e.label))})),re.map((function(e,t){var a=fJ(e,w,b),s=gJ[we].offset(a);return KN.createElement(R,{key:t,valueLabelFormat:j,valueLabelDisplay:z,className:o.valueLabel,value:"function"==typeof j?j(e,t):j,index:t,open:G===t||$===t||"on"===z,disabled:h},KN.createElement(A,{className:C_(o.thumb,o["thumbColor".concat(U_(l))],$===t&&o.active,h&&o.disabled,ue===t&&o.focusVisible),tabIndex:h?null:0,role:"slider",style:s,"data-index":t,"aria-label":p?p(t):n,"aria-labelledby":r,"aria-orientation":T,"aria-valuemax":b,"aria-valuemin":w,"aria-valuenow":e,"aria-valuetext":m?m(e,t):i,onKeyDown:be,onFocus:me,onBlur:ge,onMouseOver:ye,onMouseLeave:ve}))})))}));W_((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?gA(e.palette.primary.main,.62):mA(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(pA(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(pA(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(pA(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(pA(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:vA({},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"})(bJ);var xJ=KN.forwardRef((function(e,t){var n=e.action,r=e.classes,i=e.className,o=e.message,a=e.role,s=void 0===a?"alert":a,l=xA(e,["action","classes","className","message","role"]);return KN.createElement(Y_,vA({component:T$,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:s,square:!0,elevation:6,className:C_(r.root,i),ref:t},l),KN.createElement("div",{className:r.message},o),n?KN.createElement("div",{className:r.action},n):null)})),wJ=W_((function(e){var t="light"===e.palette.type?.8:.98,n=hA(e.palette.background.default,t);return{root:yA({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"})(xJ),SJ=KN.forwardRef((function(e,t){var n=e.action,r=e.anchorOrigin,i=(r=void 0===r?{vertical:"bottom",horizontal:"center"}:r).vertical,o=r.horizontal,a=e.autoHideDuration,s=e.children,l=e.classes,c=e.className,u=e.ClickAwayListenerProps,d=e.ContentProps,f=e.disableWindowBlurListener,h=void 0!==f&&f,p=e.message,m=e.onClose,g=e.onEnter,y=e.onEntered,v=e.onEntering,b=e.onExit,x=e.onExited,w=e.onExiting,S=e.onMouseEnter,k=e.onMouseLeave,M=e.open,C=e.resumeHideDuration,E=e.TransitionComponent,T=void 0===E?LK:E,q=e.transitionDuration,D=void 0===q?{enter:cO.enteringScreen,exit:cO.leavingScreen}:q,N=e.TransitionProps,A=xA(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"]),O=KN.useRef(),L=KN.useState(!0),I=L[0],_=L[1],R=KN.useCallback((function(e){var t=null!=e?e:a;m&&null!=t&&(clearTimeout(O.current),O.current=setTimeout((function(){m&&null!=(null!=e?e:a)&&m(null,"timeout")}),t))}),[a,m]);KN.useEffect((function(){return M&&R(),function(){clearTimeout(O.current)}}),[M,R]);var P=function(){clearTimeout(O.current)},z=KN.useCallback((function(){if(null!=a){if(null!=C)return void R(C);R(.5*a)}}),[a,C,R]);return KN.useEffect((function(){if(!h&&M)return window.addEventListener("focus",z),window.addEventListener("blur",P),function(){window.removeEventListener("focus",z),window.removeEventListener("blur",P)}}),[h,z,M]),!M&&I?null:KN.createElement(fY,vA({onClickAway:function(e){m&&m(e,"clickaway")}},u),KN.createElement("div",vA({className:C_(l.root,l["anchorOrigin".concat(U_(i)).concat(U_(o))],c),onMouseEnter:function(e){S&&S(e),P()},onMouseLeave:function(e){k&&k(e),z()},ref:t},A),KN.createElement(T,vA({appear:!0,in:M,onEnter:vY((function(){_(!1)}),g),onEntered:y,onEntering:v,onExit:b,onExited:vY((function(){_(!0)}),x),onExiting:w,timeout:D,direction:"top"===i?"down":"up"},N),s||KN.createElement(wJ,vA({message:p,action:n},d)))))}));W_((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},i={justifyContent:"flex-start"},o={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:vA({},t,yA({},e.breakpoints.up("sm"),vA({},o,{},c))),anchorOriginBottomCenter:vA({},n,yA({},e.breakpoints.up("sm"),vA({},a,{},c))),anchorOriginTopRight:vA({},t,{},r,yA({},e.breakpoints.up("sm"),vA({left:"auto"},o,{},s))),anchorOriginBottomRight:vA({},n,{},r,yA({},e.breakpoints.up("sm"),vA({left:"auto"},a,{},s))),anchorOriginTopLeft:vA({},t,{},i,yA({},e.breakpoints.up("sm"),vA({right:"auto"},o,{},l))),anchorOriginBottomLeft:vA({},n,{},i,yA({},e.breakpoints.up("sm"),vA({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})(SJ);var kJ=KN.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=e.children,a=e.classes,s=e.className,l=e.completed,c=void 0!==l&&l,u=e.connector,d=e.disabled,f=void 0!==d&&d,h=e.index,p=e.last,m=e.orientation,g=xA(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return KN.createElement("div",vA({className:C_(a.root,a[m],s,i&&a.alternativeLabel,c&&a.completed),ref:t},g),u&&i&&0!==h&&KN.cloneElement(u,{orientation:m,alternativeLabel:i,index:h,active:r,completed:c,disabled:f}),KN.Children.map(o,(function(e){return KN.isValidElement(e)?KN.cloneElement(e,vA({active:r,alternativeLabel:i,completed:c,disabled:f,last:p,icon:h+1,orientation:m},e.props)):null})))}));W_({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(kJ);var MJ=N$(KN.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"})),CJ=N$(KN.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),EJ=KN.createElement("circle",{cx:"12",cy:"12",r:"12"}),TJ=KN.forwardRef((function(e,t){var n=e.completed,r=void 0!==n&&n,i=e.icon,o=e.active,a=void 0!==o&&o,s=e.error,l=void 0!==s&&s,c=e.classes;return"number"==typeof i||"string"==typeof i?l?KN.createElement(CJ,{className:C_(c.root,c.error),ref:t}):r?KN.createElement(MJ,{className:C_(c.root,c.completed),ref:t}):KN.createElement(D$,{className:C_(c.root,a&&c.active),ref:t},EJ,KN.createElement("text",{className:c.text,x:"12",y:"16",textAnchor:"middle"},i)):i})),qJ=W_((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"})(TJ),DJ=KN.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.completed,u=void 0!==c&&c,d=e.disabled,f=void 0!==d&&d,h=e.error,p=void 0!==h&&h,m=e.icon;e.last;var g=e.optional,y=e.orientation,v=void 0===y?"horizontal":y,b=e.StepIconComponent,x=e.StepIconProps,w=xA(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),S=b;return m&&!S&&(S=qJ),KN.createElement("span",vA({className:C_(s.root,s[v],l,f&&s.disabled,o&&s.alternativeLabel,p&&s.error),ref:t},w),m||S?KN.createElement("span",{className:C_(s.iconContainer,o&&s.alternativeLabel)},KN.createElement(S,vA({completed:u,active:r,error:p,icon:m},x))):null,KN.createElement("span",{className:s.labelContainer},KN.createElement(T$,{variant:"body2",component:"span",className:C_(s.label,o&&s.alternativeLabel,u&&s.completed,r&&s.active,p&&s.error),display:"block"},a),g))}));DJ.muiName="StepLabel";var NJ=W_((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"})(DJ),AJ=KN.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=e.children,o=e.classes,a=e.className,s=e.completed,l=e.disabled,c=e.icon;e.last;var u=e.optional,d=e.orientation,f=xA(e,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),h={active:n,alternativeLabel:r,completed:s,disabled:l,icon:c,optional:u,orientation:d},p=hK(i,["StepLabel"])?KN.cloneElement(i,h):KN.createElement(NJ,h,i);return KN.createElement(VU,vA({disabled:l,TouchRippleProps:{className:o.touchRipple},className:C_(o.root,o[d],a),ref:t},f),p)}));W_({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"})(AJ);var OJ=KN.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=void 0!==r&&r,o=e.classes,a=e.className,s=e.completed,l=e.disabled;e.index;var c=e.orientation,u=void 0===c?"horizontal":c,d=xA(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return KN.createElement("div",vA({className:C_(o.root,o[u],a,i&&o.alternativeLabel,n&&o.active,s&&o.completed,l&&o.disabled),ref:t},d),KN.createElement("span",{className:C_(o.line,"vertical"===u?o.lineVertical:o.lineHorizontal)}))})),LJ=W_((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"})(OJ),IJ=KN.forwardRef((function(e,t){var n=e.active;e.alternativeLabel;var r=e.children,i=e.classes,o=e.className;e.completed;var a=e.last;e.optional,e.orientation;var s=e.TransitionComponent,l=void 0===s?pY:s,c=e.transitionDuration,u=void 0===c?"auto":c,d=e.TransitionProps,f=xA(e,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),h=u;return"auto"!==u||l.muiSupportAuto||(h=void 0),KN.createElement("div",vA({className:C_(i.root,o,a&&i.last),ref:t},f),KN.createElement(l,vA({in:n,className:i.transition,timeout:h,unmountOnExit:!0},d),r))}));W_((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"})(IJ);var _J=KN.createElement(LJ,null),RJ=KN.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.connector,u=void 0===c?_J:c,d=e.nonLinear,f=void 0!==d&&d,h=e.orientation,p=void 0===h?"horizontal":h,m=xA(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),g=KN.isValidElement(u)?KN.cloneElement(u,{orientation:p}):null,y=KN.Children.toArray(a),v=y.map((function(e,t){var n={alternativeLabel:o,connector:u,last:t+1===y.length,orientation:p},i={index:t,active:!1,completed:!1,disabled:!1};return r===t?i.active=!0:!f&&r>t?i.completed=!0:!f&&r<t&&(i.disabled=!0),[!o&&g&&0!==t&&KN.cloneElement(g,vA({key:t},i)),KN.cloneElement(e,vA({},n,{},i,{},e.props))]}));return KN.createElement(Y_,vA({square:!0,elevation:0,className:C_(s.root,s[p],l,o&&s.alternativeLabel),ref:t},m),v)}));W_({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(RJ);var PJ=KN.forwardRef((function(e,t){var n=e.anchor,r=e.classes,i=e.className,o=e.width,a=xA(e,["anchor","classes","className","width"]);return KN.createElement("div",vA({className:C_(r.root,r["anchor".concat(U_(n))],i),ref:t,style:yA({},WY(n)?"width":"height",o)},a))})),zJ=W_((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"})(PJ),FJ=null;function jJ(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function BJ(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function HJ(e,t){return e?t.clientWidth:t.clientHeight}function VJ(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var WJ="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),UJ={enter:cO.enteringScreen,exit:cO.leavingScreen},$J="undefined"!=typeof window?KN.useLayoutEffect:KN.useEffect;KN.forwardRef((function(e,t){var n=e.anchor,r=void 0===n?"left":n,i=e.disableBackdropTransition,o=void 0!==i&&i,a=e.disableDiscovery,s=void 0!==a&&a,l=e.disableSwipeToOpen,c=void 0===l?WJ:l,u=e.hideBackdrop,d=e.hysteresis,f=void 0===d?.52:d,h=e.minFlingVelocity,p=void 0===h?450:h,m=e.ModalProps,g=(m=void 0===m?{}:m).BackdropProps,y=xA(m,["BackdropProps"]),v=e.onClose,b=e.onOpen,x=e.open,w=e.PaperProps,S=void 0===w?{}:w,k=e.SwipeAreaProps,M=e.swipeAreaWidth,C=void 0===M?20:M,E=e.transitionDuration,T=void 0===E?UJ:E,q=e.variant,D=void 0===q?"temporary":q,N=xA(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),A=V_(),O=KN.useState(!1),L=O[0],I=O[1],_=KN.useRef({isSwiping:null}),R=KN.useRef(),P=KN.useRef(),z=KN.useRef(),F=KN.useRef(!1),j=KN.useRef();$J((function(){j.current=null}),[x]);var B=KN.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,i=void 0===n?null:n,a=t.changeTransition,s=void 0===a||a,l=UY(A,r),c=-1!==["right","bottom"].indexOf(l)?1:-1,d=WY(r),f=d?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),h=z.current.style;h.webkitTransform=f,h.transform=f;var p="";if(i&&(p=A.transitions.create("all",hU({timeout:T},{mode:i}))),s&&(h.webkitTransition=p,h.transition=p),!o&&!u){var m=P.current.style;m.opacity=1-e/HJ(d,z.current),s&&(m.webkitTransition=p,m.transition=p)}}),[r,o,u,A,T]),H=MU((function(e){if(F.current)if(FJ=null,F.current=!1,I(!1),_.current.isSwiping){_.current.isSwiping=null;var t,n=UY(A,r),i=WY(r);t=i?jJ(n,e.changedTouches):BJ(n,e.changedTouches);var o=i?_.current.startX:_.current.startY,a=HJ(i,z.current),s=VJ(t,o,x,a),l=s/a;Math.abs(_.current.velocity)>p&&(j.current=1e3*Math.abs((a-s)/_.current.velocity)),x?_.current.velocity>p||l>f?v():B(0,{mode:"exit"}):_.current.velocity<-p||1-l>f?b():B(HJ(i,z.current),{mode:"enter"})}else _.current.isSwiping=null})),V=MU((function(e){if(z.current&&F.current&&(null==FJ||FJ===_.current)){var t=UY(A,r),n=WY(r),i=jJ(t,e.touches),o=BJ(t,e.touches);if(x&&z.current.contains(e.target)&&null==FJ){var a=function(e){var t=e.domTreeShapes,n=e.start,r=e.current,i=e.anchor,o={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=r>=n;"top"!==i&&"left"!==i||(t=!t);var l="left"===i||"right"===i?"x":"y",c=e[o[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,z.current),start:n?_.current.startX:_.current.startY,current:n?i:o,anchor:r});if(a)return void(FJ=a);FJ=_.current}if(null==_.current.isSwiping){var l=Math.abs(i-_.current.startX),c=Math.abs(o-_.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(_.current.isSwiping=u,!u)return void H(e);_.current.startX=i,_.current.startY=o,s||x||(n?_.current.startX-=C:_.current.startY-=C)}}if(_.current.isSwiping){var d=HJ(n,z.current),f=n?_.current.startX:_.current.startY;x&&!_.current.paperHit&&(f=Math.min(f,d));var h=VJ(n?i:o,f,x,d);if(x)if(_.current.paperHit)0===h&&(_.current.startX=i,_.current.startY=o);else{if(!(n?i<d:o<d))return;_.current.paperHit=!0,_.current.startX=i,_.current.startY=o}null===_.current.lastTranslate&&(_.current.lastTranslate=h,_.current.lastTime=performance.now()+1);var p=(h-_.current.lastTranslate)/(performance.now()-_.current.lastTime)*1e3;_.current.velocity=.4*_.current.velocity+.6*p,_.current.lastTranslate=h,_.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),B(h)}}})),W=MU((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!x||P.current.contains(e.target)||z.current.contains(e.target))){var t=UY(A,r),n=WY(r),i=jJ(t,e.touches),o=BJ(t,e.touches);if(!x){if(c||e.target!==R.current)return;if(n){if(i>C)return}else if(o>C)return}e.muiHandled=!0,FJ=null,_.current.startX=i,_.current.startY=o,I(!0),!x&&z.current&&B(HJ(n,z.current)+(s?20:-C),{changeTransition:!1}),_.current.velocity=0,_.current.lastTime=null,_.current.lastTranslate=null,_.current.paperHit=!1,F.current=!0}}));KN.useEffect((function(){if("temporary"===D)return document.body.addEventListener("touchstart",W),document.body.addEventListener("touchmove",V,{passive:!1}),document.body.addEventListener("touchend",H),function(){document.body.removeEventListener("touchstart",W),document.body.removeEventListener("touchmove",V,{passive:!1}),document.body.removeEventListener("touchend",H)}}),[D,W,V,H]),KN.useEffect((function(){return function(){FJ===_.current&&(FJ=null)}}),[]),KN.useEffect((function(){x||I(!1)}),[x]);var U=KN.useCallback((function(e){P.current=jW.findDOMNode(e)}),[]),$=KN.useCallback((function(e){z.current=jW.findDOMNode(e)}),[]);return KN.createElement(KN.Fragment,null,KN.createElement(KY,vA({open:!("temporary"!==D||!L)||x,variant:D,ModalProps:vA({BackdropProps:vA({},g,{ref:U})},y),PaperProps:vA({},S,{style:vA({pointerEvents:"temporary"!==D||x?"":"none"},S.style),ref:$}),anchor:r,transitionDuration:j.current||T,onClose:v,ref:t},N)),!c&&"temporary"===D&&KN.createElement(EU,null,KN.createElement(zJ,vA({anchor:r,ref:R,width:C},k))))}));var YJ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=void 0===i?"secondary":i,a=e.edge,s=void 0!==a&&a,l=e.size,c=void 0===l?"medium":l,u=xA(e,["classes","className","color","edge","size"]),d=KN.createElement("span",{className:n.thumb});return KN.createElement("span",{className:C_(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[s],{small:n["size".concat(U_(c))]}[c])},KN.createElement(J$,vA({type:"checkbox",icon:d,checkedIcon:d,classes:{root:C_(n.switchBase,n["color".concat(U_(o))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},u)),KN.createElement("span",{className:n.track}))}));W_((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:pA(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:pA(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"})(YJ);var KJ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.disabled,o=void 0!==i&&i,a=e.disableFocusRipple,s=void 0!==a&&a,l=e.fullWidth,c=e.icon,u=e.indicator,d=e.label,f=e.onChange,h=e.onClick,p=e.selected,m=e.textColor,g=void 0===m?"inherit":m,y=e.value,v=e.wrapped,b=void 0!==v&&v,x=xA(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return KN.createElement(VU,vA({focusRipple:!s,className:C_(n.root,n["textColor".concat(U_(g))],r,o&&n.disabled,p&&n.selected,d&&c&&n.labelIcon,l&&n.fullWidth,b&&n.wrapped),ref:t,role:"tab","aria-selected":p,disabled:o,onClick:function(e){f&&f(e,y),h&&h(e)}},x),KN.createElement("span",{className:n.wrapper},c,d),u)}));W_((function(e){var t;return{root:vA({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},yA(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),yA(t,"overflow","hidden"),yA(t,"whiteSpace","normal"),yA(t,"textAlign","center"),yA(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"})(KJ);var GJ=KN.createContext(),XJ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"table":i,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,f=xA(e,["classes","className","component","padding","size","stickyHeader"]),h=KN.useMemo((function(){return{padding:s,size:c,stickyHeader:d}}),[s,c,d]);return KN.createElement(GJ.Provider,{value:h},KN.createElement(o,vA({ref:t,className:C_(n.root,r,d&&n.stickyHeader)},f)))}));W_((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":vA({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(XJ);var JJ=KN.createContext(),ZJ={variant:"body"},QJ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tbody":i,a=xA(e,["classes","className","component"]);return KN.createElement(JJ.Provider,{value:ZJ},KN.createElement(o,vA({className:C_(n.root,r),ref:t},a)))}));W_({root:{display:"table-row-group"}},{name:"MuiTableBody"})(QJ);var eZ=KN.forwardRef((function(e,t){var n,r=e.align,i=void 0===r?"inherit":r,o=e.classes,a=e.className,s=e.component,l=e.padding,c=e.scope,u=e.size,d=e.sortDirection,f=e.variant,h=xA(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),p=KN.useContext(GJ),m=KN.useContext(JJ);n=s||(m&&"head"===m.variant?"th":"td");var g=c;!g&&m&&"head"===m.variant&&(g="col");var y=l||(p&&p.padding?p.padding:"default"),v=u||(p&&p.size?p.size:"medium"),b=f||m&&m.variant,x=null;return d&&(x="asc"===d?"ascending":"descending"),KN.createElement(n,vA({ref:t,className:C_(o.root,o[b],a,"inherit"!==i&&o["align".concat(U_(i))],"default"!==y&&o["padding".concat(U_(y))],"medium"!==v&&o["size".concat(U_(v))],{head:p&&p.stickyHeader&&o.stickyHeader}[b]),"aria-sort":x,scope:g},h))})),tZ=W_((function(e){return{root:vA({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?gA(pA(e.palette.divider,1),.88):mA(pA(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"})(eZ),nZ={variant:"footer"},rZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tfoot":i,a=xA(e,["classes","className","component"]);return KN.createElement(JJ.Provider,{value:nZ},KN.createElement(o,vA({className:C_(n.root,r),ref:t},a)))}));W_({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(rZ);var iZ={variant:"head"},oZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"thead":i,a=xA(e,["classes","className","component"]);return KN.createElement(JJ.Provider,{value:iZ},KN.createElement(o,vA({className:C_(n.root,r),ref:t},a)))}));W_({root:{display:"table-header-group"}},{name:"MuiTableHead"})(oZ);var aZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.disableGutters,s=void 0!==a&&a,l=e.variant,c=void 0===l?"regular":l,u=xA(e,["classes","className","component","disableGutters","variant"]);return KN.createElement(o,vA({className:C_(n.root,n[c],r,!s&&n.gutters),ref:t},u))})),sZ=W_((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:yA({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"})(aZ),lZ=N$(KN.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),cZ=N$(KN.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),uZ=KN.createElement(cZ,null),dZ=KN.createElement(lZ,null),fZ=KN.createElement(lZ,null),hZ=KN.createElement(cZ,null),pZ=KN.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,i=e.nextIconButtonProps,o=e.onChangePage,a=e.page,s=e.rowsPerPage,l=xA(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=V_();return KN.createElement("div",vA({ref:t},l),KN.createElement(G$,vA({onClick:function(e){o(e,a-1)},disabled:0===a,color:"inherit"},n),"rtl"===c.direction?uZ:dZ),KN.createElement(G$,vA({onClick:function(e){o(e,a+1)},disabled:a>=Math.ceil(r/s)-1,color:"inherit"},i),"rtl"===c.direction?fZ:hZ))})),mZ=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(-1===n?r:n," of ").concat(r)},gZ=[10,25,50,100],yZ=KN.forwardRef((function(e,t){var n,r=e.ActionsComponent,i=void 0===r?pZ:r,o=e.backIconButtonProps,a=e.classes,s=e.className,l=e.colSpan,c=e.component,u=void 0===c?tZ:c,d=e.count,f=e.labelDisplayedRows,h=void 0===f?mZ:f,p=e.labelRowsPerPage,m=void 0===p?"Rows per page:":p,g=e.nextIconButtonProps,y=e.onChangePage,v=e.onChangeRowsPerPage,b=e.page,x=e.rowsPerPage,w=e.rowsPerPageOptions,S=void 0===w?gZ:w,k=e.SelectProps,M=void 0===k?{}:k,C=xA(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);u!==tZ&&"td"!==u||(n=l||1e3);var E=M.native?"option":CG;return KN.createElement(u,vA({className:C_(a.root,s),colSpan:n,ref:t},C),KN.createElement(sZ,{className:a.toolbar},KN.createElement("div",{className:a.spacer}),S.length>1&&KN.createElement(T$,{color:"inherit",variant:"body2",className:a.caption},m),S.length>1&&KN.createElement(aJ,vA({classes:{select:a.select,icon:a.selectIcon},input:KN.createElement(uK,{className:C_(a.input,a.selectRoot)}),value:x,onChange:v},M),S.map((function(e){return KN.createElement(E,{className:a.menuItem,key:e,value:e.value?e.value:e},e.label?e.label:e)}))),KN.createElement(T$,{color:"inherit",variant:"body2",className:a.caption},h({from:0===d?0:b*x+1,to:Math.min(d,(b+1)*x),count:d,page:b})),KN.createElement(i,{className:a.actions,backIconButtonProps:o,count:d,nextIconButtonProps:g,onChangePage:y,page:b,rowsPerPage:x})))}));W_((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"})(yZ);var vZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tr":i,a=e.hover,s=void 0!==a&&a,l=e.selected,c=void 0!==l&&l,u=xA(e,["classes","className","component","hover","selected"]),d=KN.useContext(JJ);return KN.createElement(o,vA({ref:t,className:C_(n.root,r,d&&{head:n.head,footer:n.footer}[d.variant],s&&n.hover,c&&n.selected)},u))}));W_((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"})(vZ);var bZ=N$(KN.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),xZ=KN.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.children,o=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,f=void 0===d?bZ:d,h=xA(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return KN.createElement(VU,vA({className:C_(o.root,a,r&&o.active),component:"span",disableRipple:!0,ref:t},h),i,u&&!r?null:KN.createElement(f,{className:C_(o.icon,o["iconDirection".concat(U_(l))])}))}));W_((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"})(xZ);var wZ,SZ=!("undefined"==typeof window||!window.document||!window.document.createElement);function kZ(){if(wZ)return wZ;if(!SZ||!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),wZ="reverse",e.scrollLeft>0?wZ="default":(e.scrollLeft=1,0===e.scrollLeft&&(wZ="negative")),document.body.removeChild(e),wZ}function MZ(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=kZ();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 CZ(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var EZ={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function TZ(e){var t=e.onChange,n=xA(e,["onChange"]),r=KN.useRef(),i=KN.useRef(null),o=function(){r.current=i.current.offsetHeight-i.current.clientHeight};return KN.useEffect((function(){var e=FY((function(){var e=r.current;o(),e!==r.current&&t(r.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),KN.useEffect((function(){o(),t(r.current)}),[t]),KN.createElement("div",vA({style:EZ,ref:i},n))}var qZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=e.orientation,a=xA(e,["classes","className","color","orientation"]);return KN.createElement("span",vA({className:C_(n.root,n["color".concat(U_(i))],r,{vertical:n.vertical}[o]),ref:t},a))})),DZ=W_((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"})(qZ),NZ=KN.createElement(lZ,{fontSize:"small"}),AZ=KN.createElement(cZ,{fontSize:"small"}),OZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.direction,o=e.orientation,a=e.visible,s=xA(e,["classes","className","direction","orientation","visible"]),l=C_(n.root,r,{vertical:n.vertical}[o]);return a?KN.createElement(VU,vA({component:"div",className:l,ref:t,role:null,tabIndex:null},s),"left"===i?NZ:AZ):KN.createElement("div",{className:l})})),LZ=W_({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(OZ),IZ=KN.forwardRef((function(e,t){var n=e.action,r=e.centered,i=void 0!==r&&r,o=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,f=e.onChange,h=e.orientation,p=void 0===h?"horizontal":h,m=e.ScrollButtonComponent,g=void 0===m?LZ:m,y=e.scrollButtons,v=void 0===y?"auto":y,b=e.TabIndicatorProps,x=void 0===b?{}:b,w=e.textColor,S=void 0===w?"inherit":w,k=e.value,M=e.variant,C=void 0===M?"standard":M,E=xA(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),T=V_(),q="scrollable"===C,D="rtl"===T.direction,N="vertical"===p,A=N?"scrollTop":"scrollLeft",O=N?"top":"left",L=N?"bottom":"right",I=N?"clientHeight":"clientWidth",_=N?"height":"width",R=KN.useState(!1),P=R[0],z=R[1],F=KN.useState({}),j=F[0],B=F[1],H=KN.useState({start:!1,end:!1}),V=H[0],W=H[1],U=KN.useState({overflow:"hidden",marginBottom:null}),$=U[0],Y=U[1],K=new Map,G=KN.useRef(null),X=KN.useRef(null),J=function(){var e,t,n=G.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:MZ(n,T.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==k){var i=X.current.children;if(i.length>0){var o=i[K.get(k)];t=o?o.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},Z=MU((function(){var e,t=J(),n=t.tabsMeta,r=t.tabMeta,i=0;if(r&&n)if(N)i=r.top-n.top+n.scrollTop;else{var o=D?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;i=r.left-n.left+o}var a=(yA(e={},O,i),yA(e,_,r?r[_]:0),e);if(isNaN(j[O])||isNaN(j[_]))B(a);else{var s=Math.abs(j[O]-a[O]),l=Math.abs(j[_]-a[_]);(s>=1||l>=1)&&B(a)}})),Q=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=r.ease,a=void 0===o?CZ:o,s=r.duration,l=void 0===s?300:s,c=null,u=t[e],d=!1,f=function(){d=!0},h=function r(o){if(d)i(new Error("Animation cancelled"));else{null===c&&(c=o);var s=Math.min(1,(o-c)/l);t[e]=a(s)*(n-u)+u,s>=1?requestAnimationFrame((function(){i(null)})):requestAnimationFrame(r)}};u===n?i(new Error("Element already at target position")):requestAnimationFrame(h)}(A,G.current,e)},ee=function(e){var t=G.current[A];N?t+=e:(t+=e*(D?-1:1),t*=D&&"reverse"===kZ()?-1:1),Q(t)},te=function(){ee(-G.current[I])},ne=function(){ee(G.current[I])},re=KN.useCallback((function(e){Y({overflow:null,marginBottom:-e})}),[]),ie=MU((function(){var e=J(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[O]<t[O]){var r=t[A]+(n[O]-t[O]);Q(r)}else if(n[L]>t[L]){var i=t[A]+(n[L]-t[L]);Q(i)}})),oe=MU((function(){if(q&&"off"!==v){var e,t,n=G.current,r=n.scrollTop,i=n.scrollHeight,o=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(N)e=r>1,t=r<i-o-1;else{var l=MZ(G.current,T.direction);e=D?l<a-s-1:l>1,t=D?l>1:l<a-s-1}e===V.start&&t===V.end||W({start:e,end:t})}}));KN.useEffect((function(){var e=FY((function(){Z(),oe()})),t=xY(G.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[Z,oe]);var ae=KN.useCallback(FY((function(){oe()})));KN.useEffect((function(){return function(){ae.clear()}}),[ae]),KN.useEffect((function(){z(!0)}),[]),KN.useEffect((function(){Z(),oe()})),KN.useEffect((function(){ie()}),[ie,j]),KN.useImperativeHandle(n,(function(){return{updateIndicator:Z,updateScrollButtons:oe}}),[Z,oe]);var se=KN.createElement(DZ,vA({className:a.indicator,orientation:p,color:d},x,{style:vA({},j,{},x.style)})),le=0,ce=KN.Children.map(o,(function(e){if(!KN.isValidElement(e))return null;var t=void 0===e.props.value?le:e.props.value;K.set(t,le);var n=t===k;return le+=1,KN.cloneElement(e,{fullWidth:"fullWidth"===C,indicator:n&&!P&&se,selected:n,onChange:f,textColor:S,value:t})})),ue=function(){var e={};e.scrollbarSizeListener=q?KN.createElement(TZ,{className:a.scrollable,onChange:re}):null;var t=V.start||V.end,n=q&&("auto"===v&&t||"desktop"===v||"on"===v);return e.scrollButtonStart=n?KN.createElement(g,{orientation:p,direction:D?"right":"left",onClick:te,visible:V.start,className:C_(a.scrollButtons,"on"!==v&&a.scrollButtonsDesktop)}):null,e.scrollButtonEnd=n?KN.createElement(g,{orientation:p,direction:D?"left":"right",onClick:ne,visible:V.end,className:C_(a.scrollButtons,"on"!==v&&a.scrollButtonsDesktop)}):null,e}();return KN.createElement(c,vA({className:C_(a.root,s,N&&a.vertical),ref:t},E),ue.scrollButtonStart,ue.scrollbarSizeListener,KN.createElement("div",{className:C_(a.scroller,q?a.scrollable:a.fixed),style:$,ref:G,onScroll:ae},KN.createElement("div",{className:C_(a.flexContainer,N&&a.flexContainerVertical,i&&!q&&a.centered),ref:X,role:"tablist"},ce),P&&se),ue.scrollButtonEnd)}));W_((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:yA({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(IZ);var _Z={standard:HK,filled:fK,outlined:_G},RZ=KN.forwardRef((function(e,t){var n=e.autoComplete,r=e.autoFocus,i=e.children,o=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.defaultValue,u=e.error,d=e.FormHelperTextProps,f=e.fullWidth,h=e.helperText,p=e.hiddenLabel,m=e.id,g=e.InputLabelProps,y=e.inputProps,v=e.InputProps,b=e.inputRef,x=e.label,w=e.multiline,S=e.name,k=e.onBlur,M=e.onChange,C=e.onFocus,E=e.placeholder,T=e.required,q=void 0!==T&&T,D=e.rows,N=e.rowsMax,A=e.select,O=void 0!==A&&A,L=e.SelectProps,I=e.type,_=e.value,R=e.variant,P=void 0===R?"standard":R,z=xA(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=KN.useState(0),j=F[0],B=F[1],H=KN.useRef(null);KN.useEffect((function(){if("outlined"===P){var e=jW.findDOMNode(H.current);B(null!=e?e.offsetWidth:0)}}),[P,q,x]);var V={};"outlined"===P&&(g&&void 0!==g.shrink&&(V.notched=g.shrink),V.labelWidth=j),O&&(L&&L.native||(V.id=void 0),V["aria-describedby"]=void 0);var W=h&&m?"".concat(m,"-helper-text"):void 0,U=x&&m?"".concat(m,"-label"):void 0,$=_Z[P],Y=KN.createElement($,vA({"aria-describedby":W,autoComplete:n,autoFocus:r,defaultValue:c,fullWidth:f,multiline:w,name:S,rows:D,rowsMax:N,type:I,value:_,id:m,inputRef:b,onBlur:k,onChange:M,onFocus:C,placeholder:E,inputProps:y},V,v));return KN.createElement(mK,vA({className:C_(o.root,a),error:u,fullWidth:f,hiddenLabel:p,ref:t,required:q,color:l,variant:P},z),x&&KN.createElement(UK,vA({htmlFor:m,ref:H,id:U},g),x),O?KN.createElement(aJ,vA({"aria-describedby":W,id:m,labelId:U,value:_,input:Y},L),i):Y,h&&KN.createElement(xK,vA({id:W},d),h))}));function PZ(e){return Math.round(1e5*e)/1e5}W_({root:{}},{name:"MuiTextField"})(RZ);var zZ=KN.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.disableFocusListener,o=void 0!==i&&i,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,f=e.enterTouchDelay,h=void 0===f?700:f,p=e.id,m=e.interactive,g=void 0!==m&&m,y=e.leaveDelay,v=void 0===y?0:y,b=e.leaveTouchDelay,x=void 0===b?1500:b,w=e.onClose,S=e.onOpen,k=e.open,M=e.placement,C=void 0===M?"bottom":M,E=e.PopperProps,T=e.title,q=e.TransitionComponent,D=void 0===q?LK:q,N=e.TransitionProps,A=xA(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),O=V_(),L=KN.useState(!1),I=L[0],_=L[1],R=KN.useState(0)[1],P=KN.useState(),z=P[0],F=P[1],j=KN.useRef(!1),B=KN.useRef(null!=k).current,H=KN.useRef(),V=KN.useRef(),W=KN.useRef(),U=KN.useRef(),$=KN.useRef();KN.useEffect((function(){H.current||(H.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),k&&R((function(e){return!e}))}),[k]),KN.useEffect((function(){return function(){clearTimeout(V.current),clearTimeout(W.current),clearTimeout(U.current),clearTimeout($.current)}}),[]);var Y=function(e){B||I||_(!0),S&&S(e)},K=function(e){var t=n.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),j.current&&"touchstart"!==e.type||(z&&z.removeAttribute("title"),clearTimeout(W.current),clearTimeout(U.current),d?(e.persist(),W.current=setTimeout((function(){Y(e)}),d)):Y(e))},G=RU(),X=G.isFocusVisible,J=G.onBlurVisible,Z=G.ref,Q=KN.useState(!1),ee=Q[0],te=Q[1],ne=function(e){B||_(!1),w&&w(e),clearTimeout(V.current),V.current=setTimeout((function(){j.current=!1}),O.transitions.duration.shortest)},re=function(e){var t=n.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),ee&&(te(!1),J())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout(W.current),clearTimeout(U.current),e.persist(),U.current=setTimeout((function(){ne(e)}),v)},ie=mU(F,t),oe=mU(Z,ie),ae=KN.useCallback((function(e){pU(oe,jW.findDOMNode(e))}),[oe]),se=mU(n.ref,ae),le=B?k:I;""===T&&(le=!1);var ce=!le&&!s,ue=vA({"aria-describedby":le?p||H.current:null,title:ce&&"string"==typeof T?T:null},A,{},n.props,{className:C_(A.className,n.props.className)});c||(ue.onTouchStart=function(e){j.current=!0;var t=n.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout(U.current),clearTimeout(V.current),clearTimeout($.current),e.persist(),$.current=setTimeout((function(){K(e)}),h)},ue.onTouchEnd=function(e){n.props.onTouchEnd&&n.props.onTouchEnd(e),clearTimeout($.current),clearTimeout(U.current),e.persist(),U.current=setTimeout((function(){ne(e)}),x)}),s||(ue.onMouseOver=K,ue.onMouseLeave=re),o||(ue.onFocus=function(e){z||F(e.currentTarget),X(e)&&(te(!0),K(e));var t=n.props;t.onFocus&&t.onFocus(e)},ue.onBlur=re);var de=g?{onMouseOver:ue.onMouseOver,onMouseLeave:ue.onMouseLeave,onFocus:ue.onFocus,onBlur:ue.onBlur}:{};return KN.createElement(KN.Fragment,null,KN.cloneElement(n,vA({ref:se},ue)),KN.createElement(UX,vA({className:C_(r.popper,g&&r.popperInteractive),placement:C,anchorEl:z,open:!!z&&le,id:ue["aria-describedby"],transition:!0},de,E),(function(e){var t=e.placement,n=e.TransitionProps;return KN.createElement(D,vA({timeout:O.transitions.duration.shorter},n,N),KN.createElement("div",{className:C_(r.tooltip,r["tooltipPlacement".concat(U_(t.split("-")[0]))],j.current&&r.touch)},T))})))}));W_((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:pA(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(PZ(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(PZ(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:yA({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:yA({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:yA({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:yA({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(zZ);var FZ={entering:{transform:"none"},entered:{transform:"none"}},jZ={enter:cO.enteringScreen,exit:cO.leavingScreen};function BZ(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function HZ({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:BZ(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return KN.createElement("i",{style:i},KN.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},KN.createElement("path",{d:e})))}KN.forwardRef((function(e,t){var n=e.children,r=e.in,i=e.onEnter,o=e.onExit,a=e.style,s=e.timeout,l=void 0===s?jZ:s,c=xA(e,["children","in","onEnter","onExit","style","timeout"]),u=V_(),d=mU(n.ref,t);return KN.createElement(KW,vA({appear:!0,in:r,onEnter:function(e,t){fU(e);var n=hU({style:a,timeout:l},{mode:"enter"});e.style.webkitTransition=u.transitions.create("transform",n),e.style.transition=u.transitions.create("transform",n),i&&i(e,t)},onExit:function(e){var t=hU({style:a,timeout:l},{mode:"exit"});e.style.webkitTransition=u.transitions.create("transform",t),e.style.transition=u.transitions.create("transform",t),o&&o(e)},timeout:l},c),(function(e,t){return KN.cloneElement(n,vA({style:vA({transform:"scale(0)",visibility:"exited"!==e||r?void 0:"hidden"},FZ[e],{},a,{},n.props.style),ref:d},t))}))}));const VZ={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"},WZ={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"},UZ="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",$Z={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"},YZ={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 KZ(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=ak.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 GZ(e,t,n,r,i,o){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=ny(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,i&&i({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),KZ(e,a,c)}))}const XZ=(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 JZ({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives:()=>XZ(o,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 i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){GZ(r,e,t,"qDimensions",a)}}}function ZZ(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:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var i}function QZ({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives:()=>XZ(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 i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){GZ(i,e,t,"qMeasures",o,a)}}}function eQ(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const tQ={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"}}},nQ=({children:e,...t})=>KN.createElement(R$,Yg({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function rQ(e){function t({title:e,selected:t,onClick:n}){const r=Ay.detectTextDirection(e);return KN.createElement(eG,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},KN.createElement(rG,{style:{minWidth:32}},KN.createElement(HZ,{d:t?UZ:""})),KN.createElement(aG,{primaryTypographyProps:{dir:r}},e))}function n({alignTo:e,changeTo:n,current:r,dir:i,dock:o,list:a,onClose:s,show:l,instruction:c}){const u=a.map((e=>KN.createElement(t,{key:e.id,title:e.title,onClick:()=>n(e.id)})));return KN.createElement(hG,Yg({anchorEl:e,open:l,onClose:s},tQ[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),KN.createElement(JK,{dense:!0,dir:i,"aria-label":c,component:"nav"},KN.createElement(t,{title:r,selected:!0,onClick:s}),u))}t.propTypes={title:GN.exports.string.isRequired,selected:GN.exports.bool,onClick:GN.exports.func.isRequired},t.defaultProps={selected:!1},n.propTypes={alignTo:GN.exports.any,changeTo:GN.exports.func.isRequired,current:GN.exports.string.isRequired,dir:GN.exports.string.isRequired,dock:GN.exports.string.isRequired,list:GN.exports.array,onClose:GN.exports.func.isRequired,show:GN.exports.bool.isRequired,instruction:GN.exports.string.isRequired},n.defaultProps={list:[],alignTo:null};class r extends KN.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=KN.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:i,isDimension:o,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,f=i||this.state.inSelection,h=e.breadcrumbs.map(((t,n)=>KN.createElement(nQ,{style:{display:"flex",alignItems:"center",color:f&&"rgba(89, 89, 89, 0.8)",pointerEvents:f?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>f?void 0:e.drillUp(d-n),title:t},KN.createElement("span",{style:u},t),KN.createElement(HZ,Yg({},YZ,{size:"small",style:{margin:"0 8px"}}))))),p=c?this.state.hasValidAlternatives:l,m=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||i||this.state.inSelection,y={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&g&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(y.background="rgba(0,0,0,0.08)");a&&(y.padding=a),s&&(y.minWidth=s);const v=Ay.detectTextDirection(e.text),b=KN.createElement(nQ,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:y,onClick:g?void 0:m,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:g?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&KN.createElement(HZ,Yg({},WZ,{size:"small",title:r.get("Tooltip.selections.locked")})),KN.createElement("span",{style:u,dir:v},e.text),t&&p&&KN.createElement(HZ,Yg({},$Z,{size:"small",style:{margin:"0 8px"}})));return KN.createElement(KN.Fragment,null,e.drilldown&&KN.createElement(HZ,Yg({},VZ,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),h,KN.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:p?"auto":"none",height:"100%"}},b),t&&p&&KN.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 i(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&hy(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:GN.exports.bool.isRequired,padding:GN.exports.string,minWidth:GN.exports.string,titleData:GN.exports.shape({breadcrumbs:GN.exports.arrayOf(GN.exports.string).isRequired,drilldown:GN.exports.bool.isRequired,index:GN.exports.number.isRequired,locked:GN.exports.bool.isRequired,text:GN.exports.string.isRequired,popoverText:GN.exports.string.isRequired,drillUp:GN.exports.func,id:GN.exports.string.isRequired}).isRequired,popover:GN.exports.shape({dir:GN.exports.string.isRequired,dock:GN.exports.string.isRequired,changeTo:GN.exports.func.isRequired,getAlternatives:GN.exports.func.isRequired}),translator:GN.exports.shape({get:GN.exports.func.isRequired}).isRequired,selections:GN.exports.shape({isActive:GN.exports.func,addListener:GN.exports.func,removeListener:GN.exports.func}),style:GN.exports.shape({fontSize:GN.exports.string,color:GN.exports.string,fontFamily:GN.exports.string}).isRequired,isDimension:GN.exports.bool.isRequired,hasAlternative:GN.exports.bool.isRequired,supportConditional:GN.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||o(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:a,hyperCubeDef:s,isDimension:l,minWidth:c,model:u,onChangeToAlternative:d,padding:f,rtl:h,selections:p,skipAttributeExpressions:m,translator:g,supportConditional:y=!1},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!h?"ltr":"rtl",x=function(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}(v,this.rect),w=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,S=w&&w[l?"qDimensions":"qMeasures"]||[],k=n||a[l?"qDimensionInfo":"qMeasureInfo"],M=l?JZ:QZ,C=l?ZZ:eQ,E=u&&u.colorSupport&&u.modifiers&&M({altList:S,app:e,dir:h?"rtl":"ltr",dock:i(v),model:u,onChange:d,skipAttributeExpressions:m,translator:g}),T=(q=this.settings.settings).isDimension&&hy(q,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings);var q;const D=k.map(((e,n)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:n,o=C(e,i,u),a=n===k.length-1;return KN.createElement(KN.Fragment,{key:e.cId},KN.createElement(r,{popover:E,titleData:o,model:u,translator:g,selections:p,disabled:t(),style:this.style,isDimension:l,padding:f,minWidth:c,hasAlternative:T,supportConditional:y}),!a&&KN.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return KN.createElement("div",{style:x,dir:b},D)}}}const iQ=hO({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 oQ=gO({productionPrefix:"qb739",disableGlobal:!0,seed:""});function aQ(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){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!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={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=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",jW.render(function(e,t){return KN.createElement(f_,{generateClassName:t},KN.createElement(j_,{theme:iQ},e))}(e,oQ),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&jW.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(jW.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function sQ(){return function(e){e.renderer("react",aQ()),e.component("data-title",rQ(e.renderer("svg")())),e.component("disclaimer",function(){class e extends KN.Component{render(){const{label:e,spanStyle:t}=this.props;return KN.createElement(KN.Fragment,null,KN.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:GN.exports.string.isRequired,spanStyle:GN.exports.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,o="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(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}(i,r,this.rect),s="center"===r?t:"* "+t,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return KN.createElement("div",{style:a,dir:o},KN.createElement(KN.Fragment,null,KN.createElement(e,{label:s,spanStyle:l})))}}}())}}var lQ={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:cQ}=lQ;function uQ({layoutService:e,largeDataService:t}){const{maxNumPoints:n=cQ}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:dQ}=lQ,fQ=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=dQ}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!uQ({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:hQ}=lQ,{MAX_NUM_POINTS:pQ,DEFAULT_NUM_POINTS:mQ,DEFAULT_NUM_LINES:gQ}=lQ,{DEFAULT_NUM_POINTS:yQ}=lQ,vQ=({layoutService:e,largeDataService:t})=>{if(!uQ({layoutService:e,largeDataService:t})){const{maxNumPoints:e=yQ}=(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:i=gQ,maxNumPoints:o=mQ,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(fQ({layoutService:e,largeDataService:t})*r[0]<=o)return r[0];const s=Math.max(1,Math.min(i,r[1])),l=o/s,c=Math.floor(r[0]<=l?l:l/4),u=2*s*(s+1);return a&&(s>gQ||o>mQ)?Math.min(c,Math.ceil(pQ/u)):c})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=hQ}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})};function bQ({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>uQ({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>vQ({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>fQ({layoutService:t,largeDataService:n}),fetch:(i,o)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:vQ({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:fQ({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)})({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function xQ(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function wQ({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,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function SQ(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,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 kQ(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=SQ(),o=SQ();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function MQ(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function CQ(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=kQ(e,t,n.qMatrix),i=MQ(n.qArea,r);return{...n,qArea:i,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 EQ=2**.5,TQ=1/EQ;function qQ(e){return e.qIsOtherCell}function DQ({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(qQ)){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(qQ)||t++})),t}(n)}const NQ={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var AQ={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],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.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 OQ(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function LQ(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=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*i,1===e.end&&(u-=d));const f={x:u+i,y:i,width:d-2*i,height:t.height-2*i},h=s(l[0]+"…").width,p=Math.max(0,f.width-c.width),m=Math.max(0,f.height-c.height),g=o*p,y=a*m;return{show:f.width>=Math.min(h,c.width),text:l,dx:g,dy:y,rect:f,style:n.label,segment:{x:u+g,width:c.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=OQ(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:OQ(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:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=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&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function IQ(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=OQ(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:OQ(i,n.minorGuideLine.strokeWidth),x2:o,y2:OQ(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function _Q(e){return e.filter((e=>e.show)).map((e=>ny({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var RQ={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=OQ(1,t.line.strokeWidth);return{show:n.line.show,x1:OQ(0,t.line.strokeWidth),y1:r,x2:OQ(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=LQ(n,this),this.state.minor=IQ(r,this)},render(){return[..._Q([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>ny({},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})))),..._Q(this.state.major.map((e=>e.guideLine))),..._Q(this.state.minor.map((e=>e.guideLine)))];var e}};function PQ(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 zQ(e){return e.qTags.indexOf("$qualified")>-1}function FQ({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];PQ(o,a)?(zQ(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function jQ({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=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(i=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function BQ({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(""+e.qText).width+16}))),r.clamp(n),i.rangeAndWidth}}}function HQ({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 VQ({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=BQ,queryFactory:s=HQ}={attributesFactory:BQ,queryFactory:HQ}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t))),c=e.map((e=>l[e])),u=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function WQ({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=VQ,mapper:a=FQ,resolver:s=jQ}={metaFactory:VQ,mapper:FQ,resolver:jQ}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:i}),f=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 i=f.resolve(t);return n.set(r,i),i}}}function UQ(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const $Q=UQ(0).getTime();function YQ(e){return(e.getTime()-$Q)/86400/1e3}var KQ=new Date,GQ=new Date;function XQ(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return XQ((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&&(i.count=function(t,r){return KQ.setTime(+t),GQ.setTime(+r),e(KQ),e(GQ),Math.floor(n(KQ,GQ))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var JQ=XQ((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));JQ.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?XQ((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):JQ:null},JQ.range;var ZQ=1e3,QQ=6e4,e0=36e5,t0=864e5,n0=6048e5,r0=XQ((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*ZQ)}),(function(e,t){return(t-e)/ZQ}),(function(e){return e.getUTCSeconds()}));function i0(e){return XQ((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())*QQ)/n0}))}r0.range,XQ((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ZQ)}),(function(e,t){e.setTime(+e+t*QQ)}),(function(e,t){return(t-e)/QQ}),(function(e){return e.getMinutes()})).range,XQ((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ZQ-e.getMinutes()*QQ)}),(function(e,t){e.setTime(+e+t*e0)}),(function(e,t){return(t-e)/e0}),(function(e){return e.getHours()})).range,XQ((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())*QQ)/t0}),(function(e){return e.getDate()-1})).range;var o0=i0(0),a0=i0(1),s0=i0(2),l0=i0(3),c0=i0(4),u0=i0(5),d0=i0(6);o0.range,a0.range,s0.range,l0.range,c0.range,u0.range,d0.range,XQ((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 f0=XQ((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()}));f0.every=function(e){return isFinite(e=Math.floor(e))&&e>0?XQ((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},f0.range;var h0=XQ((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*QQ)}),(function(e,t){return(t-e)/QQ}),(function(e){return e.getUTCMinutes()}));h0.range;var p0=XQ((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*e0)}),(function(e,t){return(t-e)/e0}),(function(e){return e.getUTCHours()}));p0.range;var m0=XQ((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/t0}),(function(e){return e.getUTCDate()-1}));function g0(e){return XQ((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)/n0}))}m0.range;var y0=g0(0),v0=g0(1),b0=g0(2),x0=g0(3),w0=g0(4),S0=g0(5),k0=g0(6);y0.range,v0.range,b0.range,x0.range,w0.range,S0.range,k0.range;var M0=XQ((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()}));M0.range;var C0=XQ((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()}));C0.every=function(e){return isFinite(e=Math.floor(e))&&e>0?XQ((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},C0.range;const E0=1,T0=2,q0=3,D0=4,N0=5,A0=6;function O0({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=i.key({distance:n});let u;i.get(c,1)?u=i.get(c,1):(u=function(e,t,n,r,i,o){function a(e){return C0.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=r0.count(e,t),l=h0.count(e,t),c=p0.count(e,t),u=m0.count(e,t),d=y0.count(e,t),f=M0.count(e,t),h=C0.count(e,t),p=n/r.second.width-1,m=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:C0.every(1),formatter:r.year.formatter,offset:e=>C0.offset(e,-1),floor:C0.floor};if(s<=p)v.type=E0,v.desc="second",v.count=s,v.interval=r0.every(1),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-1),v.floor=r0.floor;else if(s/2<=p)v.type=E0,v.desc="every other second",v.count=s/2,v.interval=r0.every(2),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-2),v.floor=r0.floor;else if(s/5<=p)v.type=E0,v.desc="every 5 second",v.count=s/5,v.interval=r0.every(5),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-5),v.floor=r0.floor;else if(s/15<=p)v.type=E0,v.desc="every 15 second",v.count=s/15,v.interval=r0.every(15),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-15),v.floor=r0.floor;else if(s/30<=p)v.type=E0,v.desc="every 30 second",v.count=s/30,v.interval=r0.every(30),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-30),v.floor=r0.floor;else if(l<=m)v.type=T0,v.desc="minute",v.count=l,v.interval=h0.every(1),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-1),v.floor=h0.floor;else if(l/2<=m)v.type=T0,v.desc="every 2 minute",v.count=l/2,v.interval=h0.every(2),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-2),v.floor=h0.floor;else if(l/5<=m)v.type=T0,v.desc="every 5 minute",v.count=l/5,v.interval=h0.every(5),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-5),v.floor=h0.floor;else if(l/10<=m)v.type=T0,v.desc="every 10 minute",v.count=l/10,v.interval=h0.every(10),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-10),v.floor=h0.floor;else if(l/15<=m)v.type=T0,v.desc="every 15 minute",v.count=l/15,v.interval=h0.every(15),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-15),v.floor=h0.floor;else if(l/30<=m)v.type=T0,v.desc="every 30 minute",v.count=l/30,v.interval=h0.every(30),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-30),v.floor=h0.floor;else if(c<=m)v.type=q0,v.desc="hour",v.count=c,v.interval=p0.every(1),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-1),v.floor=p0.floor;else if(c/2<=m)v.type=q0,v.desc="every 2 hour",v.count=c/2,v.interval=p0.every(2),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-2),v.floor=p0.floor;else if(c/3<=m)v.type=q0,v.desc="every 3 hour",v.count=c/3,v.interval=p0.every(3),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-3),v.floor=p0.floor;else if(c/6<=m)v.type=q0,v.desc="every 6 hour",v.count=c/6,v.interval=p0.every(6),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-6),v.floor=p0.floor;else if(c/12<=m||i)v.type=q0,v.desc="every 12 hour",v.count=c/12,v.interval=p0.every(12),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-12),v.floor=p0.floor;else if(u<=g)v.type=D0,v.desc="day",v.count=u,v.interval=m0.every(1),v.formatter=r.date.formatter,v.offset=e=>m0.offset(e,-1),v.floor=m0.floor;else if(u/2<=g)v.type=D0,v.desc="every 2 day",v.count=u/2,v.interval=m0.every(2),v.formatter=r.date.formatter,v.offset=e=>m0.offset(e,-2),v.floor=m0.floor;else if(u/3<=g)v.type=D0,v.desc="every 3 day",v.count=u/3,v.interval=m0.every(3),v.formatter=r.date.formatter,v.offset=e=>m0.offset(e,-3),v.floor=m0.floor;else if(d<=g)v.type=D0,v.desc="week",v.count=d,v.interval=y0.every(1),v.formatter=r.date.formatter,v.offset=e=>y0.offset(e,-1),v.floor=m0.floor;else if(d/2<=g)v.type=D0,v.desc="every 2 week",v.count=d/2,v.interval=y0.every(2),v.formatter=r.date.formatter,v.offset=e=>y0.offset(e,-2),v.floor=m0.floor;else if(f<=g)v.type=N0,v.desc="month",v.count=f,v.interval=M0.every(1),v.formatter=r.date.formatter,v.offset=e=>M0.offset(e,-1),v.floor=m0.floor;else if(f/3<=g)v.type=N0,v.desc="quarter",v.count=f/3,v.interval=M0.every(3),v.formatter=r.date.formatter,v.offset=e=>M0.offset(e,-3),v.floor=m0.floor;else if(f/6<=g)v.type=N0,v.desc="half year",v.count=f/6,v.interval=M0.every(6),v.formatter=r.date.formatter,v.offset=e=>M0.offset(e,-6),v.floor=m0.floor;else if(h<=y)v.type=A0,v.desc="year",v.count=h,v.interval=C0.every(1),v.formatter=r.year.formatter,v.offset=e=>C0.offset(e,-1),v.floor=C0.floor;else if(h/2<=y)v.type=A0,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>C0.offset(e,-2),v.floor=C0.floor;else if(h/5<=y)v.type=A0,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>C0.offset(e,-5),v.floor=C0.floor;else if(h/10<=y)v.type=A0,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>C0.offset(e,-10),v.floor=C0.floor;else{const e=Math.floor(h/y);v.type=A0,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>C0.offset(t,-e),v.floor=C0.floor}return v}(s,l,n,t.all(),r,a),i.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 f=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 h=[];if(!o&&u.type<=q0){const n=t.getFormat("date"),r=e.ticks(m0.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(m0.offset(r[0],-1)),h=(r.length?r:[m0.floor(s)]).map(((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}}))}return{inner:f,outer:h}}const L0=86400,I0=1440,_0={};function R0(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function P0(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=function(){return Xv.apply(XS(Mw,kw,gw,pw,hw,fw,tw,Gx,Dw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([UQ(l),UQ(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let f;f="d3"===d.type?(e,i)=>O0({timeScale:u,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:UQ(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(_0[[t,n,r,r,o]])return _0[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=UQ(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,f=t/(i-r),h=f/1440,p=f/L0,m=366*f,g=3*f*30,y=a.second.width/p,v=a.minute.width/h,b=a.date.width/g,x=a.year.width/m;let w,S,k,M=0,C=0,E=null,T=null,q=null,D=null,N=null,A=null;const O={outer:[],inner:[]};for(y<1?(E=1,C=1/L0):y<2?(E=2,C=1/L0*2):y<5?(E=5,C=1/L0*5):y<10?(E=10,C=1/L0*10):y<30?(E=30,C=1/L0*30):v<1?(T=1,C=1/I0):v<2?(T=2,C=1/I0*2):v<5?(T=5,C=1/I0*5):v<10?(T=10,C=.006944444444444445):v<30?(T=30,C=.020833333333333336):v<60?(q=1,C=1/24):v<120?(q=2,C=2/24):v<360?(q=6,C=.25):v<720?(q=12,C=.5):b<1/90?(C=1,D=1):b<2/90?(C=2,D=2):b<7/90?(C=7,D=7):b<31/90?(N=1,C=31):b<1?(N=3,C=90):x<1?(A=1,C=366):x<2?(A=2,C=732):x<5?(A=5,C=1826.25):(A=10,C=3652.5),S=Math.floor((d+n%1)/C);M<i;){k=S+1,w=A?R0("year",[l+S*A,0,1],[l+k*A,0,1],a.year.formatter):N?R0("month",[l,c+S*N,1],[l,c+k*N,1],a.date.formatter):D?R0("day",[l,c,u+S*D],[l,c,u+k*D],a.date.formatter):q?R0("hour",[l,c,u,0+S*q],[l,c,u,0+k*q],a.minute.formatter):T?R0("minute",[l,c,u,0,0+S*T],[l,c,u,0,0+k*T],a.minute.formatter):R0("second",[l,c,u,0,0,0+S*E],[l,c,u,0,0,0+k*E],a.second.formatter),M=YQ(w.start),O.inner.push(w);const e=Math.floor(M);if(!(o||A||N||D)){const t={type:"day",start:UQ(e),end:UQ(e+1),formatter:a.date.formatter,qStart:e};O.outer[O.outer.length-1]&&O.outer[O.outer.length-1].qStart===t.qStart||O.outer.push(t)}S++}return O.min=r,O.max=i,_0[[t,n,r,r,o]]=O,O}(n,e,d.min,l,c,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{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)=>f(t,n)[a].map((t=>{let n;return n="start"===i?YQ(t.start):"end"===i?YQ(t.end):(YQ(t.start)+YQ(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:YQ(t.start),end:YQ(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return h}const z0=/t+/i;const F0={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 j0(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 B0="continuousPan";var H0={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=NQ,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=bQ,snapshotFetcherFactory:c=wQ,cacheFetcherFactory:u=xQ,cache:d={initial:{},merged:{}}}=s,f=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=c({layoutService:t,viewCache:i}),p=u({cache:d}),m=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",function(e,t){return Math.max(1e-6,2.3841857910156157e-7*(t-e))}(y,v)),g=t.meta.isSnapshot?h:f,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=h.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return g.fetch(y,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=MQ(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=>CQ(y,v,e))).then((e=>this.updateLayout(e))).catch(m)},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,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=MQ(e.qArea,r);return{...e,qArea:i,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}))),i=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(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=>CQ(e,t,n))).catch(m),fetchFromCache:(e,t)=>p.fetch(e,t).then((n=>CQ(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return ny({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return ny({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>DQ(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 i(e,n,i){return r[e](n,i).then((e=>(r.updateLayout(e),t(),e)))}const o=$E(((e,t)=>i("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return YE(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=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=i?1-o:o,{min:u,max:d}=t.get("zoom"),f=Math.abs(d-u),h=f-(r>0?TQ:EQ)*f,p=u+h*c,m=d-h*(1-c),g=p<a?a-p:0,y=m>s?m-s:0;t.set("zoom",{min:Math.max(p-y,a),max:Math.min(m+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:B0,pointers:1,threshold:10,enable(r,i){return this.started===B0||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=B0;const{min:i,max:o}=r.get("zoom");this[B0]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[B0],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:AQ,timeAxis:RQ},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=ny(!0,{},t[i],o)})),r}(t,F0,n),{qAxis:i}=r,o=Ux(),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,i);let c,u,d=[];const f=function(e){return Number.isNaN(+e)?NaN:o(e)};f.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=u.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=u.generate(e,n.isDayOrShorter)),d},f.invert=e=>o.invert(e),f.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),f.range=e=>Array.isArray(e)?o.range(e):o.range(),f.norm=e=>(j0(a,f),a.instance(e)),f.normInvert=e=>(j0(a,f),a.instance.invert(e)),f.copy=()=>e(t,n),f.clamp=(e=!0)=>(o.clamp(e),o.clamp()),f.min=()=>Math.min(s,l),f.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const h=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={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 i&&z0.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)})),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return o.date;const r=UQ(t[0].data.start),i=UQ(t[n-1].data.start);return m0.count(r,i)/n>=1?o.date:p0.count(r,i)/n>0?o.minute:h0.count(r,i)/n>0?o.second:o.date},t}(r);return u=P0(o.copy(),r,h),c=WQ({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:r.cache,scale:f}),f.data=()=>({fields:[{formatter:f.formatter,id:()=>"qHyperCube/"+r.field,key:()=>r.field,raw:HE(n,"fields.0.raw",(()=>({})))}]}),f.formatter=()=>h.getFormatFromTicks(d).formatter,f}}};const V0={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var W0={OPTIONS:V0,DEFAULT:V0.MINI_CHART};function U0({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<o){const e=(o-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=o}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 $0({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const Y0=e=>({miniChart:e===W0.OPTIONS.MINI_CHART.value,bar:e===W0.OPTIONS.BAR.value,none:e===W0.OPTIONS.NONE.value});function K0({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Y0(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Y0(W0.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return Y0(!n&&(r||!r&&i)?W0.OPTIONS.NONE.value:W0.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===W0.OPTIONS.MINI_CHART.value,n.bar=t.value===W0.OPTIONS.BAR.value,n.none=t.value===W0.OPTIONS.NONE.value),n}function G0({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=K0({layoutService:e,override:l});if(d.none)return!1;const{orientation:f}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===f?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:f,rtl:s,isContinuous:e.meta.isContinuous,range:()=>$0({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(h.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(h.settings.injections=()=>[U0({layoutService:e,discrete:n})]),h}function X0({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),f="horizontal"===o.meta.major.orientation,h=f?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,p=f?d.rect.computedInner.width:d.rect.computedInner.height,m=f&&a?p-h:h,g=Math.max(0,Math.min(m/p,1)),[y,v]=$0({layoutService:i,viewState:n,viewCache:r}),b=g<y,x=g>v,w=!b&&!x;return{pixel:m,relative:g,thumb:w?m-y*p:0,beforeThumb:b,afterThumb:x,onThumb:w}}}function J0({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,f]=$0({layoutService:i,viewState:n,viewCache:r});return{size:u,thumbSize:(f-d)*u}}}function Z0({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=X0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=J0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-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 Q0="data-scrollbar-handle";function e1({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Q0)||""}const t1="scrollbarResize";function n1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=X0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:t1,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[t1]=this[t1]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&e1({e:t})&&(this[t1].panningEvent=t.srcEvent),!!this[t1].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[t1]=this[t1]||{},this[t1].panningEvent&&t.component(e).emit("dragStart",this[t1].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[t1]=this[t1]||{},!this[t1].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),c=i.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=e1({e:this[t1].panningEvent});let f="start"===d?Math.min(u,o.max):o.min,h="end"===d?Math.max(u,o.min):o.max;f===h&&(f-="start"===d?c:0,h+="end"===d?c:0),r.set("zoom",{min:f,max:h}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[t1]=this[t1]||{},delete this[t1].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[t1]=this[t1]||{},delete this[t1].panningEvent,t.component(e).emit("dragEnd")}}}}const r1="scrollbarPan";function i1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=X0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=J0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:r1,threshold:0,enable(r,i){return this[r1]=this[r1]||{},!(i&&!this[r1].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e)))}},events:{scrollbarPanstart(n){n.preventDefault();const a=c(n);if(this[r1]=this[r1]||{},this[r1].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[r1].relative=a.relative,this[r1].zoom=r.get("zoom"),this[r1].zoom.span=this[r1].zoom.max-this[r1].zoom.min,this[r1].zoom.fullSpan=o-n}else if(a.onThumb)this[r1].offset=a.thumb;else{const e=u();this[r1].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=c(n);if(this[r1]=this[r1]||{},o.meta.isContinuous){const e=a.relative-this[r1].relative,{fullSpan:t,span:n,min:o,max:s}=this[r1].zoom,l=i.get("continuousMin"),c=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[r1].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[r1]=this[r1]||{},this[r1].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[r1]=this[r1]||{},this[r1].isPanning=!1,t.component(e).emit("unlockState")}}}}function o1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[Z0({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),n1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),i1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function a1({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}function s1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...o1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:a1({componentKey:e,chart:t,actions:n,layoutService:o})}}const l1={background:"rgba(0, 0, 0, 0.1)"},c1={top:-1,bottom:-1,width:6},u1={width:2,background:"#595959"};var d1={before:l1,after:l1,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:c1,endHandle:c1,startHandleBorder:u1,endHandleBorder:u1};const f1={background:"rgba(0, 0, 0, 0.1)"},h1={top:-1,bottom:-1,width:6},p1={width:2,background:"#595959"};var m1={before:f1,after:f1,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:h1,endHandle:h1,startHandleBorder:p1,endHandleBorder:p1};const g1={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},y1={pointerEvents:"initial"},v1={pointerEvents:"none"};const b1="ew-resize",x1="default";function w1(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function S1(){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?b1:x1}function k1(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function M1(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function C1(){const{size:e,start:t,end:n}=w1.call(this);this.renderer.render(this.elements(this.h,k1.call(this,e,t,n)))}function E1(){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?m1:d1;return{container:{...g1},before:{...g1,...n.before,...t.before},after:{...g1,...n.after,...t.after},thumb:{...g1,...n.thumb,...t.thumb},startHandle:{...g1,...y1,...n.startHandle},endHandle:{...g1,...y1,...n.endHandle},startHandleBorder:{...g1,...v1,...n.startHandleBorder},endHandleBorder:{...g1,...v1,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var T1={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(){C1.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||!M1.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=e1({e:e});t&&(this.state.hover[t]=!0),S1.call(this),C1.call(this)},leave(){this.state.locked||(this.state.hover.reset(),S1.call(this),C1.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=e1({e:e});t&&(this.state.drag[t]=!0),S1.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),S1.call(this),C1.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*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}=w1.call(this);return this.elements(e,k1.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:i}=this.settings,o=i.injections().map((t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[i.end]:t-n},f={[i.start]:r},h={left:-3},p={left:1},m={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?f:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?d:f},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?m:h},class:"scrollbar--start-handle",[Q0]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:p}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?h:m},class:"scrollbar--end-handle",[Q0]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?p:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...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:E1.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};const q1={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:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(ny({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function D1({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,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=ny({},{major:l,majorEnd:c},r.minor.items[e]);i.forEach((t=>{d[t]=r[t].items[e]}));const f=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:f}),p=(u-h)/2,m=p+d.major+h/2;return{item:d,boxCenter:m,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function N1({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=ny(!0,{},n||{},r||{}),c={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},u=i.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:ny(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.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:ny(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:i.major}});const f=i.minor||{};let h;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:ny(!0,{},{start:{scale:f.scale,ref:"start"},end:{scale:f.scale,ref:"end"},min:{scale:f.scale,ref:"min"},max:{scale:f.scale,ref:"max"},med:{scale:f.scale,ref:"med"}},f)})};for(let n=0,r=e.length;n<r;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:i[h],scaled:c});return p}const A1=["oob"];const O1={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:i,style:o,resolver:a,symbol:s}=this,l=N1({keys:A1,data:i,defaultSettings:{oob:q1.getDefaultSettings()},style:o,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:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=D1}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:f,rendWidth:h,rendHeight:p}=s({i:u,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),m=c[u].data,g=[];if(d.oob.show){g.push(q1.createOob({oob:d.oob,dockValue:a,boxCenter:f,rendWidth:h,rendHeight:p,flipXY:n,symbol:o}));const e={type:"container",data:m,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:u,settings:c,width:e,height:t,flipXY:r,resolved:l,keys:A1,symbol:s,dockValue:n})}},L1={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},I1=["hat"];function _1(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 R1({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,c=i,u=e.hat.alignment||0;o&&(a="y",s="x",l=i,c=r,u=1-u);const d=(n+e.major)*l;let f=[{[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 h=ny({},e.hat,{type:"path",d:_1(f)});f=[{[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[h,ny({},e.hat,{type:"path",d:_1(f)})]}const P1={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:i,resolver:o}=this,a=N1({keys:I1,data:r,defaultSettings:L1,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=D1}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),p=s[l].data,m=[];c.hat.show&&m.push(...R1({item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:m};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:I1})}};function z1(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map((t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:z1(i,t,n)},i}function F1(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),i.domain(s),z1(i,a,l,e.invert)}))}function j1(){const e=Yp();return e.use(Fg),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Hg(e))};e.interaction("hammer",Hg(Hammer))}($g)),e.use(sQ()),e.use(F1),e.component("box-sliced-hat",P1),e.component("box-out-of-bounds",O1),e.component("scrollbar",T1),e.component("scroll-hint",QS),e.component("reference-line-labels",Qk),e.component("axis-overlay",H0.picassoComponents.axisOverlay),e.component("time-axis",H0.picassoComponents.timeAxis),e.scale("q-time-axis",H0.picassoScales.time),e}const B1={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 H1(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const V1={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={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=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(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=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function W1(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r,i,o;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!==(i=e.session)&&void 0!==i&&null!==(o=i.config)&&void 0!==o&&o.url)){var f;if(a=e.session.options||(null===(f=e.enigmaModel)||void 0===f?void 0:f.session.sessionConfig),!a){var h;a=null===(h=e.session)||void 0===h?void 0:h.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);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await V1.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function U1(e,t,n,r){var i,o,a,s,l,c;const{app:u,flags:d}=t,f=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!f)return[];const[h]=f,p=h.size||"small",m=h.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===h.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===m&&null!==(l=h.ref)&&void 0!==l&&null!==(c=l.qStaticContentUrl)&&void 0!==c&&c.qUrl)return W1(h,p,u);if("url"===m)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&H1(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:i,imageError:s}=await V1.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await V1.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(u,d,h,p,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===m&&v&&v.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(H1(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:o,imageError:a}=await V1.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(u,n[g],p,v)}return[]}const $1={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(U1(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},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}},Y1={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await $1.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>$1.checkIfPromisesExist({customTooltipModel:e})};const K1=(e,t)=>{var n,r,i;const o=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===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:B1.CHART.CHART_PARENT_TYPE,qId:B1.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},G1=e=>{var t,n,r;const i=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:B1.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const X1={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,i,o;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=B1.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:B1.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:i,rtl:o})=>{var a,s,l;const c=i,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 X1.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=B1.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=B1.CHART.STATE,a=K1(t,o),s=await e.createSessionObject(a),l=G1(t);if(s.id!==B1.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(c.miniChartToken.alternateState&&c.miniChartToken.sessionObj&&a){var d,f,h,p;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(f=n[0].data)||void 0===f?void 0:f.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var m,g;const e=null!==(m=n[0].data.selectionOuterDimension)&&void 0!==m?m:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.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(B1.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};c.miniChartToken.vis=await i.embed.render({element:s,model:c.miniChartToken.model,options:l,id:null===(h=c.miniChartToken.model)||void 0===h?void 0:h.id,type:null===(p=c.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await X1.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(X1.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(B1.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=B1.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 J1(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function Z1(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=B1.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function Q1(e){const t=Z1();return e.filter((e=>t[e.id]))}const e2={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 i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const c=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[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(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[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:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=e2.getAttrExprData(a);o.length||n.length?Y1.handlePromises({customTooltipModel:i,nodes:e2.getDataNodes(s,o.length>0?o: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!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&X1.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Y1.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.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[B1.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[B1.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[B1.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(Q1(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[B1.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[B1.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=J1(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===Q1(i).length){var o,a;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=J1(e)||[];[...i,t].forEach((e=>{const t=Q1(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=Z1(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[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:Ay.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Ay.detectTextDirection(e.src),r=[],i={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"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function t2(e,t,n,r){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[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 i=c.qValues&&c.qValues[t]?c.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case B1.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case B1.CUSTOM.TITLE:case B1.CUSTOM.DESCRIPTION:case B1.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const n2={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>t2(t,e,r,n)}}};const r2={getCustomAttrExps(e,t,n){var r,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,n,r){const i={[B1.CUSTOM.TITLE]:!0,[B1.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=e2.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===B1.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===B1.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Oy.getMeasure(e,t))),e,o)}};function i2({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(r2.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:[]})}function o2(e){const t=B1.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function a2(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var s2={attrExpr:{migrateProperties(e){var t,n,r,i;const o=ny(!0,{},e),a=(null===(t=o.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=a2(o);return s=function(e,t){return t.concat(e.map((e=>o2(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,o),null===(i=o.tooltip)||void 0===i||delete i.data,o},getPatches(e){var t,n,r,i;const o=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qDimensions.length)-1;return function(e,t,n){let r=e.length;const i=[];return t.forEach((e=>{const t=o2(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(a2(e),o,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,i,o,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],c=(null===(i=t.tooltip)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.qHyperCube)||{},u=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((t=>{if(u){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}},l2=7005;const c2=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2},u2=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&py(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},d2=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&py(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&py(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},f2=e=>{if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))},h2=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===r.length){const r=n[0];return r.qLibraryId?t.getDimension(r.qLibraryId).then((e=>e.getLayout())).then((t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;d2(e,n)}return r})):t.getField(r.qDef.qFieldDefs[0]).then((t=>t.getCardinal().then((t=>(d2(e,t),r)))),(()=>r))}return u2(e),Promise.resolve()};function p2(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:r}}=e;t.length>1&&e.color?VE(e,"color.persistent",!0):"byDimension"===r&&n.length>1?VE(e,"color.mode","byMultiple"):"byExpression"===r&&0===n.length?VE(e,"color.mode","primary"):0===t.length&&n.length>0&&(VE(e,"color.byMeasureDef",void 0),VE(e,"color.byDimDef",void 0),1===n.length&&VE(e,"color.mode","primary"))}const m2=(e,t)=>{p2(t),Bv(e),e2.addCallbackCustomTooltip(t)},g2=e=>{p2(e)};function y2({translator:e}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,r,i){let o;const a=null!=i&&i.layout?i.layout.qHyperCube.qDimensionInfo.filter((e=>c2(e))).length:t.qHyperCubeDef.qDimensions.length;return r.isAutoChart&&n>a-1?o="Visualizations.Descriptions.Color":a>1&&0===n?"stacked"===t.barGrouping.grouping?o="Visualizations.Descriptions.Stack":(o="Visualizations.Descriptions.Group",t.qHyperCubeDef.qColumnOrder=[0,1,2]):o="Visualizations.Descriptions.Bars",e.get(o)},add:(e,t,n)=>(t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),null!=n&&n.app?h2(t,n.app).then((()=>(m2(e,t),e))):(f2(t),m2(e,t),e)),move(e,t,n){n.layout.qHyperCube.qDimensionInfo.filter((e=>c2(e))).length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),u2(t),p2(t),e2.moveCallbackCustomTooltip(t,e)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;p2(t),1===n.length&&(t.qHyperCubeDef.qMode="S"),e2.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){e2.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>null!=n&&n.app?h2(t,n.app).then((()=>(e.qSortBy.qSortByNumeric=-1,g2(t),e))):(f2(t),g2(t),e),move(e,t){u2(t),p2(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;p2(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function v2(e){return{properties:{version:"1.31.2",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!0,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[{path:"/qHyperCubeDef",...y2(e)}]}}}var b2={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function x2({env:t}){var n,r;const{flags:i}=t,o=null===(n=t.anything)||void 0===n||null===(r=n.sense)||void 0===r?void 0:r.isUnsupportedFeature,a=e.useTranslator();!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(b2).forEach((t=>{e.add(b2[t])}))}}(t.translator);const s=e.useEmbed(),l=e.useTheme(),[c,u]=e.useState(),d=e.useDeviceType(),f=e.useAppLayout(),{qLocaleInfo:h}=f;return e.useEffect((()=>{u({translator:a,theme:l,embed:s,deviceType:d,localeInfo:h,isUnsupportedFeature:o,flags:i})}),[h,o,a.language(),l.name(),d]),c}function w2(){const[t]=e.useState((()=>WE())),[n]=e.useState((()=>function(e){var t=tM({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({viewRange:[0,1],scrollOffset:void 0})));return{viewCache:t,viewState:n}}const S2="REJECTED",k2=()=>{},M2=2,C2=20,E2=200,T2=10;var q2={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)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),c=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:i,qLeft:o},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-T2<=t.qTop,i=n.qLeft+n.qWidth+T2>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+T2>=t.qTop+t.qHeight,a=n.qLeft-T2<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var D2={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),i=Math.max(t.qLeft,e.qArea.qLeft),o=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-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;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-T2<=t.qTop,i=n.qTop+n.qHeight+T2>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&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 N2={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 A2="pages";const O2="discretePan";function L2({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:O2,pointers:1,threshold:10,enable(r,i){return this.started===O2||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started=O2;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&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function I2({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter((e=>e.key===t));if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function _2({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(E2,n));return{width:e,height:Math.max(C2,Math.min(n*M2,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function R2(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject(S2),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=e=>new Promise(((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(S2),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(S2),n=null)},i}const P2={command:{update:()=>{}}};function z2({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=P2,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,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 i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&c&&c();const u=r(l);return o(i(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:_2({layoutService:r}),request:c({layoutService:r,definitionPath:o}),process:R2(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=YE(((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==S2)throw e}))}),50);return function(e,{onProcessing:t=k2,onDataPage:n=k2}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var F2={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:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var j2={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 i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function B2(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function H2(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function V2(e){return H2(e.qMatrix,(e=>e[0].qElemNumber))-1}var W2={inTotal:function({layoutService:e}){const t=B2(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=B2(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=B2(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=V2(o),c=o.qArea.qHeight*i+l,u=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const U2=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function $2(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return U2(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:U2(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return U2(e,n);return H2(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var Y2={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 i=$2(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,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:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:c}=n,u=$2(t).area(e(),l,a.qArea),d=V2(a),f=a.qArea.qHeight+d,h=c===o?(r.inView-f)*s/i:(c+(a.qArea.qTop+u)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+f/r.inView]}};function K2({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:f,LABELLESS:h}=r[n.meta.chart.mode],p="horizontal"===n.meta.major.orientation,{axisDisplayMode:m="auto",maxVisibleItems:g=10,label:y}=s,v=p?t.width:t.height,b=v/l>=f;switch(m){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);case"auto":default:return c?v/h:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"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:f}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return f>o;const h=(90-d)*(Math.PI/180);return f>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:i,renderer:o,isGrouped:a,itemSize:f,label:y})?v/d:l:v/d}}function G2({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:d,scaleRange:f}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?F2:n?r?W2:Y2:j2}({layoutService:r}),h=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,p=e=>e?h()/e:0,m=(e,t)=>-(e-t)*p(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=u({layoutService:r});return{inTotal:l,inView:K2({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,m(n,r))),o=r?Math.abs(r*i/h()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return m(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,o+e/i]}({viewSize:h(),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 o=f({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:m(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=m(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*p(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(p(r)*n)}}}}function X2({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:f,rtl:h}){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 p=G2({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:h}),m=()=>{const e=p.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=e=>{const t=Date.now(),r=m(),a=g({pixelOffset:e,items:r}),s=p.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((p.validate.offset({pixelOffset:e,items:r})||f.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),f.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item})));f.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};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 a=m();n.set("itemSize",p.getItemSize({items:a}));const c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=f.get("scrollOffset");if(void 0===n)return 1===t?p.getUpperBound({items:e}):0;if("number"==typeof n)return p.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return p.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),u=g({pixelOffset:c,items:a});f.preventSet("viewRange",p.getViewRange({pixelOffset:u.start.pixel,items:a}));const d=p.getArea({itemOffset:u.start.item,items:a});return new Promise((e=>{i(d,{onDataPage:()=>{n.set("scaleRange",p.getScaleRange({offsets:u.start,items:a})),f.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),r=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(r)}}}function J2({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:d,axisKey:f,renderer:h,areaBuffer:p,processDataPage:m=(()=>{})}={}}){const g=WE(),y=function({qMode:e}){switch(e){case"S":default:return q2;case"K":return D2;case"T":return N2}}({qMode:i.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(A2,[]),{add:t=>{const n=e.get(A2);n.length=0,n.push(t)},getCurrent:()=>e.get(A2)[0],getAll:()=>e.get(A2),contains:n=>t(e.get(A2)[0],n)}}({state:g,contains:y.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:v,composition:y});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),x=z2({dataStore:v,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:u,processDataPage:m}),w=X2({chart:e,componentKey:n,state:g,dataStore:v,pageData:x,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:f,renderer:h,areaBuffer:b,viewState:l,rtl:c}),S=function({layoutService:e,dataStore:t}){return function(n){const r=HE(n,""+e.refs.dataPages);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:v});return{interactions:function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[L2({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:I2({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:w}),query:{getCanScroll:()=>w.enabled(),getItemSize:()=>w.itemSize(),getScaleRange:()=>w.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>w.initialize(),scrollTo:e=>w.scrollToRelative(e),setSnapshotData:e=>S(e)}}}var Z2="AVERAGE",Q2="LINEAR",e5="POLYNOMIAL2",t5="POLYNOMIAL3",n5="POLYNOMIAL4",r5="EXPONENTIAL",i5="LOG",o5="POWER";function a5({dimValue:e,value:t,qTrendLine:n}){const{qType:r,qCoeff:i}=n,o={x:e,y:i[2]*t**2+i[1]*t+i[0]};switch(r){default:case e5:return o;case t5:return o.y+=i[3]*t**3,o;case n5:return o.y+=i[4]*t**4+i[3]*t**3,o}}var s5={average:function({dimValue:e,qTrendLine:t}){return{x:e,y:t.qCoeff[0]}},linear:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]*t+n.qCoeff[0]}},polynomial2:a5,polynomial3:a5,polynomial4:a5,exponential:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:Math.exp(n.qCoeff[0]+t*n.qCoeff[1])}},log:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]+n.qCoeff[0]*Math.log(t)}},power:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:10**(n.qCoeff[0]+n.qCoeff[1]*Math.log(t)*Math.LOG10E)}}};function l5(e,t){const n=s5[t.qType.toLowerCase()],r=Math.max(1,e/500);let i=1/0,o=-1/0;for(let a=0;a<e;a+=r){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});i=Math.min(e,i),o=Math.max(e,o)}return{min:i,max:o}}function c5(e){return s5[e.qType.toLowerCase()]}function u5(e,t){return e.meta.isContinuous?function(e,t){return{generate:(e,n,r)=>{const i=[],o=c5(e),{min:a,max:s}=t.get("zoom"),l=(s-a)/100;if(l>0){const t=t=>{const a=o({dimValue:t,value:t,qTrendLine:e});a.layerId=n,a.measureIndex=r,a.dimValue=t,i.push(a)};let c=a;for(let e=a;e<=s;e+=l)t(e),c=e;c!==s&&t(s)}return i},calculate:(e,t)=>c5(e)({dimValue:t,value:t,qTrendLine:e}),findMinMax(e,t){const n=this.generate(t).map((({y:e})=>e));return{min:Math.min(...n),max:Math.max(...n)}}}}(0,t):e.meta.mode.K?function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qData[0].qSubNodes,s=o.qArea.qTop,l=s5[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const o=a[e],c=l({dimValue:o.qElemNo,value:e+s+1,qTrendLine:t});c.layerId=n,c.measureIndex=r,c.dimValue=o.qText,i.push(c)}return i},findMinMax:l5}}(e):function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qMatrix,s=o.qArea.qTop,l=s5[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const o=a[e][0],c=e+s+1,u=l({dimValue:o.qElemNumber,value:c,qTrendLine:t});u.layerId=n,u.measureIndex=r,u.dimValue=o.qText,i.push(u)}return i},calculate:(e,t,n)=>(0,s5[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e}),findMinMax:l5}}(e)}var d5={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},f5={color:"#f93f17",index:9};const{isDark:h5}=jv,p5={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},m5=({layoutService:e,viewState:t,colorModel:n,chart:r,env:i,keys:{colorScale:o},isEnabled:a=(()=>!1)})=>{const{translator:s}=i,l=[p5],c=[],u=[],d=u5(e,t);e.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach(((e,t)=>{Array.isArray(e.qTrendLines)&&(c.push(...e.qTrendLines),u.push(...e.qTrendLines.map((()=>t))))}));return{query:{hasTrendLines:()=>!!c.length&&a(),getData:()=>l,getStroke:UE((e=>{const{style:t}=c[e]||{},i=n.settings();if(t.autoColor){if("measure"===i.mode){const t=u[e],n=r.scale(o)(t);return h5(n)?function(e){const t=Tv(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(n):function(e){const t=Tv(e);return t.l-=5,t.toString()}(n)}return n.resolveUIColor(f5)}return t.paletteColor?n.resolveUIColor(t.paletteColor):"none"})),getLineDash:e=>{const{style:t}=c[e]||{};return t.lineDash},getLabel:e=>(c[e]||{}).label,getType:e=>{const{qType:t}=c[e]||{};return s.get(d5.TYPES[t])},getMinMax:()=>{let t=1/0,n=-1/0;return c.forEach((r=>{const i=d.findMinMax(e.meta.size.y,r);t=Math.min(i.min,t),n=Math.max(i.max,n)})),{min:t,max:n}},getCalculatedValue:(e,t,n)=>{const r=c[e];return d.calculate(r,t,n)}},command:{update:()=>{l.length=0,c.forEach(((e,t)=>{const n=d.generate(e,t,u[t]);l.push(...n)}))}}}};var g5={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const y5=({meta:e})=>e.isContinuous?({scale:e,datum:t})=>e(t.value):e.isGroupedByMeasure?({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2:({scale:e,datum:t})=>e(t.value)+e.bandwidth()/2,v5=(e,{layoutService:t,trendLineModel:n,dockService:r,animationsEnabled:i})=>{if(!n.query.hasTrendLines())return[];return[(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:r,dockService:i,animationsEnabled:o})=>{const a=y5(r);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:g5,settings:{connect:!0,orientation:i.meta.major.orientation,coordinates:{major:{scale:e,fn:a},minor:{scale:t},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:2,stroke:({datum:e})=>n.query.getStroke(e.layer.value),strokeDasharray:({datum:e})=>n.query.getLineDash(e.layer.value)}}},animations:{enabled:o,trackBy:HD.nonUpdatingNode.trackBy,compensateForLayoutChanges:HD.lines.compensateForLayoutChanges}}})(e,{trendLineModel:n,layoutService:t,dockService:r,animationsEnabled:i}),(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:r,dockService:i})=>{const o=y5(r),a="horizontal"===i.meta.major.orientation,s={scale:e,fn:o},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:g5,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:r})]};function b5(e,t){const{getLabel:n,getType:r,getLineDash:i,getStroke:o}=t.query;return({node:t,resources:a})=>{const s={type:"icon",style:{stroke:o(t.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":i(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:r(t.data.layer.value)}],style:{"min-width":"136px"}};return{title:t.data.dimValue.label,row:[s,l,{content:a.formatter(e.formatter)(t.data.minor.value)}]}}}function x5(e,{h:t,style:n}){return e.map((e=>{const r={style:{direction:"string"==typeof e.content?Ay.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(r.colspan=e.colspan);const i=function(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map((t=>e("span",{style:t.style,direction:Ay.detectTextDirection(t.content)},t.content)))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:"16px",x2:"16px",y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},t)}(e):t.content}(t,e);return t("td",r,i)}))}function w5(e,t){return({h:n,data:r,style:i})=>{const o=r[0].title,a=r.filter((e=>e.title===o)),s=[function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:Ay.detectTextDirection(t)},t);return e("tr",{},n)}(n,o)];if(a.slice(0,2).forEach((e=>{s.push(n("tr",{},x5(e.row,{h:n,style:i})))})),r.length>2){const i=r.length-2;s.push(...function(e,t,n,r){const i=t?t.get("Object.ChartTooltip.NMore",r):`+${r} more`,o=Ay.detectTextDirection(i);return[e("tr",{},e("td",{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:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:o},colspan:3},i))]}(n,e,t,i))}return s}}function S5(e,{trendLineModel:t,translator:n},r={}){if(!t.query.hasTrendLines())return!1;const{rtl:i}=r,o=Ty({key:e.tooltip,rtl:i});return ny(!0,o,{settings:{extract:b5(e,t),content:w5(n,i),placement:"pointer",direction:r.rtl?"rtl":"ltr"}})}function k5(e,t){const n=t.element.getBoundingClientRect();return{x:(e.center?e.center.x:e.clientX)-n.left,y:(e.center?e.center.y:e.clientY)-n.top}}function M5(e,{chart:t,viewState:n,trendLineModel:r,layoutService:i,rtl:o}){const{isContinuous:a}=i.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=k5(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:i}=r.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(r,a)=>{const l=k5(r,t),c=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(c.length){const r=function(e,t,n,r){let i=(e.x-t.rect.computed.x)/t.rect.computed.width;i=r?1-i:i;const{min:o,max:a}=n.get("zoom");return o+(a-o)*i}(l,a,n,o),s=t.scale(e.majorInnerScale),u=(null!=s&&s.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(r);c.forEach((e=>{e.data.dimValue.value=r,e.data.dimValue.label=u,e.data.minor.value=i(e.data.layer.value,r).y}))}return c}}return n=>{const r=t.component(e.tooltip);if(r&&(n=>t.componentsFromPoint({x:n.center?n.center.x:n.clientX,y:n.center?n.center.y:n.clientY}).some((t=>t.key===e.tooltipOverlay)))(n)){const e=l(n,r);return e.length?(r.emit("show",n,{nodes:e}),!0):(r.emit("hide"),!1)}return!1}}const C5=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},E5=e=>{C5(e),e.qMultiDimMode="Sum",e.qXColIx=0};function T5(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:r=!1}=e;return{show:(e,t,{layout:n})=>!by.dimensionless(n)&&!by.groupedByDimension(n)&&(r||!by.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:d5.HEADER,itemTitleRef:e=>{const n=typeof e.label;return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(d5.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:d5.ADD_BUTTON,add:E5,globalChange:e=>{const t=HE(e,"qHyperCubeDef.qMeasures",[]).reduce(((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e)),[]),r=(e=>!HE(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach((e=>{e.qContinuousXAxis=r})),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:d5.TYPE,options:[{value:Z2,translation:d5.TYPES.AVERAGE},{value:Q2,translation:d5.TYPES.LINEAR},{value:e5,translation:d5.TYPES.POLYNOMIAL2},{value:t5,translation:d5.TYPES.POLYNOMIAL3},{value:n5,translation:d5.TYPES.POLYNOMIAL4},{value:r5,translation:d5.TYPES.EXPONENTIAL},{value:i5,translation:d5.TYPES.LOG},{value:o5,translation:d5.TYPES.POWER}],defaultValue:Z2},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:f5,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:d5.STYLE.DASHED,type:"boolean",defaultValue:!0,change:C5}}}}var q5={};function D5(){D5.init.call(this)}q5.isObject=function(e){return"object"==typeof e&&null!==e},q5.isNumber=function(e){return"number"==typeof e},q5.isUndefined=function(e){return void 0===e},q5.isFunction=function(e){return"function"==typeof e};var N5=D5;D5.EventEmitter=D5,D5.prototype._events=void 0,D5.prototype._maxListeners=void 0,D5.defaultMaxListeners=10,D5.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},D5.prototype.setMaxListeners=function(e){if(!q5.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},D5.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],q5.isUndefined(n))return!1;if(q5.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(q5.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},D5.prototype.addListener=function(e,t){var n;if(!q5.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,q5.isFunction(t.listener)?t.listener:t),this._events[e]?q5.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,q5.isObject(this._events[e])&&!this._events[e].warned)&&((n=q5.isUndefined(this._maxListeners)?D5.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,q5.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),q5.isFunction(console.trace)&&console.trace()));return this},D5.prototype.on=D5.prototype.addListener,D5.prototype.once=function(e,t){if(!q5.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},D5.prototype.removeListener=function(e,t){var n,r,i,o;if(!q5.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||q5.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(q5.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},D5.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],q5.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},D5.prototype.listeners=function(e){return this._events&&this._events[e]?q5.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},D5.listenerCount=function(e,t){return e._events&&e._events[t]?q5.isFunction(e._events[t])?1:e._events[t].length:0};const A5={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"}}]};function O5(){const[t]=e.useState({}),[n]=e.useState({}),r=function(){var t,n,r,i;const o=e.useLayout(),a=e.useTranslator(),s=!(null==o||null===(t=o.qSelectionInfo)||void 0===t||!t.qInSelections),l=!(null==o||null===(n=o.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r||null===(i=r[0])||void 0===i||!i.qIsOneAndOnlyOne),[c,u]=e.useState(!1),[d,f]=e.useState(!1),[h,p]=e.useState({key:"lasso",enabled:()=>!1,active:()=>!1,action:()=>!1}),m=e=>{f("boolean"==typeof e?e:!d)};return e.useAction((()=>(p({key:"lasso",action:m,enabled:()=>c,active:()=>d}),{key:"lasso",label:a.get(d?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:A5,hidden:!c||!s||l,active:d,action:m})),[s,l,d,c,a.language()]),{get:()=>h,setAllows:e=>{u(!!e)}}}(),[i,o]=e.useState();return e.useEffect((()=>{const e={};e.scroll={key:"scroll",isActive:!0,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled(){const{layoutService:e,discrete:r}=t;return n.allowScroll&&((null==e?void 0:e.meta.isContinuous)||(null==r?void 0:r.query.getCanScroll()))}},e.interact={key:"interact",isEnabled:!0,enabled:()=>n.allowInteract},e.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action(e){this.isActive=!!e},active(){return this.isActive},enabled:()=>n.allowTooltip},e.select={key:"select",isActive:!1,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled:()=>n.allowSelect},e.lasso=r.get(),Object.keys(e).forEach((t=>{return n=e[t],Object.keys(N5.prototype).forEach((e=>{n[e]=N5.prototype[e]})),N5.init(n),n;var n})),o(e)}),[]),e.useEffect((()=>{i&&r&&(i.lasso={...i.lasso,...r.get()})}),[r]),{get:()=>i,setAllows:e=>{Object.assign(n,e),r.setAllows(null==e?void 0:e.allowSelect)},setContext:e=>{Object.assign(t,e)},destroy:()=>{Object.keys(i).forEach((e=>i[e].removeAllListeners()))}}}var L5={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}},I5={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",MAJOR_NUM:"majorNum",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",GHOST_BAR_OOB:"ghost-bar",STACK:"stack",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"},STYLING:{AXIS:"axis"}};function _5({layout:e}){const t=fy.canBeContinuous(e),n=by.continuous(e),r=by.dimensionless(e);return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:fy.isTime(n,e),isDimensionless:r,isSimple:by.simple(e),isGrouped:by.grouped(e),isGroupedByMeasure:by.groupedByMeasure(e),isGroupedByDimension:by.groupedByDimension(e),isStacked:by.stacked(e),isStackedByDimension:by.stackedByDimension(e),isStackedByMeasure:by.stackedByMeasure(e),isSnapshot:by.snapshot(e)}}const R5={extractDimsAndNode(e){const t=[];let n;return e.forEach((e=>{if(e.key===I5.COMPONENT.BAR){n=e;const r=HE(e,"data.selectionDimension",!1);r&&(t.push(r.label),r.label!==e.data.label&&t.push(e.data.label))}})),{nodeDims:t,node:n}}};function P5(e,t,n="/qHyperCubeDef"){return{fetch(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(wy).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.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:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize")}}}))}(e,t,this.settings())},settings(){const e=t.getHyperCubeValue("qDimensionInfo"),r=t.meta.isStacked&&e.length>1?1:0,i=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:r,qWidth:e.length+i.length+r,qHeight:Math.min(2e3,1e4/(i.length+1))},zoomLevel:-1,filter:"D1"}}}}function z5({enigma:e,layoutService:t,viewModel:n,definitionPath:r,reducedHyperCubePath:i},o={}){const a=P5(e,t,r),s=function(e,t="reducedHyperCube"){return{fetch:()=>Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}(t,i),l=function(e){return{fetch:()=>{const t=e.getHyperCube(),n={...t,qDataPages:t.qDataPages.slice()};return Promise.resolve({reducedCube:n})}}}(t),c=function({layoutService:e}){const{isSnapshot:t,isStackedByDimension:n}=e.meta,r=e=>{e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return r.should=e=>t&&n&&1===e.qDimensionInfo.length,r}({layoutService:t}),u={mode:{isReduced:!1}};return{fetch(){if(t.meta.isSnapshot)return s.fetch();if(t.meta.isContinuous)return l.fetch();if(!t.meta.isStacked){if(t.getHyperCubeValue("qSize.qcy",NaN)===t.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN))return l.fetch()}return a.fetch()},model:()=>u,update(e){var r;c.should(e)&&c(e),u.mode=ny(u.mode,t.meta),u.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,u.mode.isStackedByDimension=u.mode.isStacked&&(2===(r=e).qDimensionInfo.length&&2===r.qMeasureInfo.length),u.mode.isStackedByMeasure=u.mode.isStacked&&function(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}(e),u.fields={major:u.mode.isStackedByDimension?"qDimensionInfo/"+(e.qDimensionInfo.length-1):n.fields.major,majorGroup:n.fields.majorGroup,minor:u.mode.isStackedByDimension?e.qMeasureInfo.map(((e,t)=>"qMeasureInfo/"+t)):n.fields.minor},u.scales={major:I5.SCALE.REDUCED.MAJOR,minor:I5.SCALE.REDUCED.MINOR},u.cube=e,o.qDataPages=e.qDataPages},fetchMinMaxData(){if(o.qDataPages)return Promise.resolve(o.qDataPages);let n=a.settings();const r="K"===t.getHyperCubeValue("qMode")?1:n.rect.qHeight;return n=ny(!0,{},n,{rect:{qHeight:r}}),e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).then((e=>e))},setSnapshotData(e){e.reducedHyperCube=u.cube}}}function F5({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:r,selectionInfo:i}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==i.event&&r({componentName:"continuousRangeBrush",brushName:!1})}function j5({layout:e,defaultAuto:t}){return e.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:e.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:t(e)}function B5({picasso:t,chart:n,environment:r,viewState:i,viewCache:o}){const a=e.useStaleLayout(),s=e.useModel(),l=e.useApp(),c=e.usePlugins(),u=e.useSelections(),d=e.useOptions(),[f,h]=e.useState(),[p,m]=e.useState(),[g,y]=e.useState(),v=e.useConstraints(),b=O5();return e.useEffect((()=>{if(!n)return()=>{};const e=b.get(),t=function({chart:e,actions:t,selections:n}){const r=e.scale(I5.SCALE.MAIN.MAJOR);return kD({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:r,selectionActions:{clear:F5},custom:{getActions:()=>t},setBrushAliases({defaultFunc:e,brush:t}){e(),t.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),t.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}})}({chart:n,actions:e,selections:u});return m(e),y(t),()=>{t.destroy(),b.destroy()}}),[n]),e.useEffect((()=>{if(!v)return;const e={allowScroll:!v.active,allowInteract:!v.active,allowTooltip:!v.passive,allowSelect:!v.select&&!v.active};b.setAllows(e)}),[v]),e.useEffect((()=>{if(!g||!r)return;const{theme:e,translator:u,localeInfo:f,flags:m,embed:y}=r,{direction:v="ltr"}=d,x=ZE({source:a,metaAdditionsFn:_5,experimental:{filter:m.isEnabled("IM_1579_HIDE_DIM_MEA")}});g.setFilteredFields(x.meta.filteredFields);const w=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(x.getLayout())?ZE({source:x.getLayout()}):void 0,S=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:a,options:d}),k=function({layoutService:e,viewCache:t,flags:n,options:r}){const i={};return i.fields=function(e){const{meta:t}=e,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/"+(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map(((e,t)=>"qDimensionInfo/"+t)),minor:e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>"qMeasureInfo/"+t))};return n.majorNumeric=(t.isStackedByDimension?n.majorStack:n.major)+":numeric",n}(e),i.selectionDimensionIdx=(e=>{const t=e.qDimensionInfo.length;for(let n=0;n<t;n++){const r=e.qDimensionInfo[n];if(!(r.qLocked||r.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}})(e.getHyperCube()),i.isDimensionLocked=t=>e.getHyperCube().qDimensionInfo[t].qLocked,i.selectionDimensionProp=e=>void 0===i.selectionDimensionIdx||void 0!==e&&i.selectionDimensionIdx!==e?{}:{selectionDimension:{field:i.selectionDimensionIdx}},i.animations={enabled:()=>!1!==r.chartAnimations&&!!n.isEnabled("IM_1355_ANIMATIONS_BAR")&&!(i.animations.isPartialUpdating||i.animations.isSizeChanging||i.animations.hasSlicedHats)&&!HD.propertiesHaveChanged({viewCache:t,layout:e.getLayout()}),isPartialUpdating:!1,isSizeChanging:!1,hasSlicedHats:!1},i}({layoutService:x,viewCache:o,flags:m,options:d}),M=BE({chart:n,layoutService:x,config:{logicalSize:S,rtl:"rtl"===v},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),C=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:ND(a),styles:void 0};return d.styles=OD({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=OD({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:e,config:{id:"barChart",transform:[["label.value.fontSize",e=>parseInt(e,10)]]}}),E=function({layoutService:e,themeService:t,flags:n}){const r=t.getStyles(),i=t=>n.isEnabled("CLIENT_IM_747")?(e.getLayoutValue("components",[])||[]).find((e=>e.key===t)):void 0;return{axis:{title:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,h,p;return{fontFamily:null!==(e=null===(t=i("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(o=n.title)||void 0===o?void 0:o.fontFamily)&&void 0!==e?e:r.axis.title.fontFamily,fontSize:null!==(a=null===(s=i("axis"))||void 0===s||null===(l=s.axis)||void 0===l||null===(c=l.title)||void 0===c?void 0:c.fontSize)&&void 0!==a?a:r.axis.title.fontSize,color:null!==(u=null===(d=i("axis"))||void 0===d||null===(f=d.axis)||void 0===f||null===(h=f.title)||void 0===h||null===(p=h.color)||void 0===p?void 0:p.color)&&void 0!==u?u:r.axis.title.color}}},label:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,h,p,m,g,y;return{fill:null!==(e=null===(t=i("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(o=n.label)||void 0===o||null===(a=o.name)||void 0===a||null===(s=a.color)||void 0===s?void 0:s.color)&&void 0!==e?e:r.axis.label.name.color,fontSize:null!==(l=null===(c=i("axis"))||void 0===c||null===(u=c.axis)||void 0===u||null===(d=u.label)||void 0===d||null===(f=d.name)||void 0===f?void 0:f.fontSize)&&void 0!==l?l:r.axis.label.name.fontSize,fontFamily:null!==(h=null===(p=i("axis"))||void 0===p||null===(m=p.axis)||void 0===m||null===(g=m.label)||void 0===g||null===(y=g.name)||void 0===y?void 0:y.fontFamily)&&void 0!==h?h:r.axis.label.name.fontFamily}}}},label:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,h,p;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(n=t.label)||void 0===n||null===(o=n.value)||void 0===o||null===(a=o.color)||void 0===a?void 0:a.color)&&void 0!==e?e:r.label.value.color,fontSize:null!==(s=null===(l=i("label"))||void 0===l||null===(c=l.label)||void 0===c||null===(u=c.value)||void 0===u?void 0:u.fontSize)&&void 0!==s?s:r.label.value.fontSize,fontFamily:null!==(d=null===(f=i("label"))||void 0===f||null===(h=f.label)||void 0===h||null===(p=h.value)||void 0===p?void 0:p.fontFamily)&&void 0!==d?d:r.label.value.fontFamily}}}}}({layoutService:x,themeService:C,flags:m}),T=H0.model({model:s,layoutService:x,viewCache:o,viewState:i}),q=z5({enigma:s,layoutService:x,viewModel:k});!function({layoutService:e,viewState:t,viewStateOptions:n={}}){const r=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):n;t.preventSet("scrollOffset",r.scrollOffset),t.preventSet("legendScrollOffset",r.legendScrollOffset||0),r.zoom&&t.preventSet("zoom",r.zoom)}({layoutService:x,viewState:i,viewStateOptions:null==d?void 0:d.viewState});const D=function({app:e,model:t,translator:n,picasso:r,localeInfo:i,theme:o,continuousDataModel:a,layoutService:s,legendLayoutService:l,reducedDataModel:c}){const{isContinuous:u,isStacked:d}=s.meta,f={main:void 0,mini:{getScales:()=>({}),getColor:()=>e=>e,getDatumProps:()=>({}),getAuxiliarySettings:()=>{}}};return{initialize:()=>{const h=[],{isReduced:p}=c.model().mode,m=u||p||d,g=!u&&(p||d)&&l?l.getHyperCube():void 0,y=g?"legendCube":void 0;return f.main=AE({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:j5,key:I5.SCALE.MAIN.COLOR},createConfig:()=>({hc:m?g||s.getHyperCube():c.model().cube,source:m?y:"miniCube",theme:o})}),h.push(f.main.initialize()),u&&(f.mini=AE({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:j5,key:I5.SCALE.REDUCED.COLOR},createConfig:()=>({layout:a.getInitialLayout(),hc:a.getInitialCube(),source:"miniCube",theme:o})}),h.push(f.mini.initialize())),Promise.all(h)},getMain:()=>f.main,getMini:()=>f.mini}}({picasso:t,model:s,app:l,translator:u,localeInfo:f,theme:e,continuousDataModel:T,layoutService:x,legendLayoutService:w,reducedDataModel:q}),N=m5({layoutService:x,viewState:i,colorModel:{settings:()=>D.getMain().getSettings(),resolveUIColor:e=>D.getMain().getPaletteColor(e)},chart:n,env:r,keys:{colorScale:I5.SCALE.MAIN.COLOR},isEnabled:()=>!x.meta.isGroupedByDimension&&(!x.meta.isStackedByDimension||m.isEnabled("TRENDLINES_STACKED_DIM"))&&!x.meta.isDimensionless});s2.attrExpr.updateProperties(s,a);const A=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:e2,miniChartToken:{},embed:s}}({layout:a,app:l,model:s,picasso:t,chart:n,translator:u,localeInfo:f,embed:y,extractDimsAndNode:R5.extractDimsAndNode});let O;x.meta.isDiscrete&&(O=J2({chart:n,actions:p,componentKey:I5.COMPONENT.BAR,enigmaModel:s,layoutService:x,dockService:M,trendLineModel:N,itemWidths:L5,viewState:i,rtl:"rtl"===v,options:{axisKey:I5.COMPONENT.BAR_AXIS,renderer:t.renderer("svg")()}}));const L=XD({layoutService:x,discreteModel:O}),I=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:I5.SCALE.MAIN.MINOR,MAJOR:I5.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:I5.COMPONENT.BAR,BAR_AXIS:I5.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:I5.COLLECTION.MAIN}}}}(x),_=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return oM(nM().mark((function e(){var r,a,s,l;return nM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=oM(nM().mark((function e(n){var r;return nM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(tM({},i));case 4:if("object"===rM(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(tM({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,cM(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=lM(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=xM(!0,{},n.brush);xM(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===rM(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=QE({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=QE({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:t,plugins:c||[],pluginArgs:I});b.setContext({discrete:O,layoutService:x}),h({discrete:O,continuous:H0,legendLayoutService:w,layoutService:x,viewModel:k,dockService:M,themeService:C,styleService:E,continuousDataModel:T,reducedDataModel:q,colorService:D,trendLineModel:N,refLineModel:L,pluginService:_,customTooltipModel:A,selectionService:g,logicalSize:S})}),[g,d,r,a]),f}function H5(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function V5(e){return e.some(H5)}function W5(e,t){let n=NaN,r=NaN;return e.forEach((e=>{V5(e)||e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),r=Number.isNaN(r)?e.qNum:Math.max(e.qNum,r))}))})),{min:n,max:r}}function U5(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const r=e.getLayoutValue("measureAxis.minMax");"min"!==r&&"minMax"!==r||(t=+e.getLayoutValue("measureAxis.min")),"max"!==r&&"minMax"!==r||(n=+e.getLayoutValue("measureAxis.max"))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function $5(e,t){let n=NaN,r=NaN;return e.forEach((e=>{if(!V5(e)){let i=0,o=0;e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?o+=e.qNum:i+=e.qNum)})),n=Number.isNaN(n)?i:Math.min(i,n),r=Number.isNaN(r)?o:Math.max(o,r)}})),{min:n,max:r}}function Y5(e,t){const n={};e.forEach((e=>{if(!V5(e)){const r=e[0].qElemNumber;n[r]=n[r]?n[r]:{min:0,max:0,cId:r},e.slice(t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[r].max+=e.qNum:n[r].min+=e.qNum)}))}}));let r=NaN,i=NaN;return Object.keys(n).forEach((e=>{r=Number.isNaN(r)?n[e].min:Math.min(n[e].min,r),i=Number.isNaN(i)?n[e].max:Math.max(n[e].max,i)})),{min:r,max:i}}function K5(e){return"number"==typeof e&&!Number.isNaN(e)}function G5(e){const t=e.getHyperCubeValue("qMeasureInfo");return{min:Math.min(...t.filter((e=>K5(e.qMin))).map((e=>e.qMin))),max:Math.max(...t.filter((e=>K5(e.qMax))).map((e=>e.qMax)))}}function X5(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function J5(e){return!Number.isNaN(+e.qNum)}function Z5(e){return e.qNum}function Q5(e){return!Number.isNaN(+e.qNum)}function e3(e){return e.qNum}function t3(e,t){return e.push(...t),e}const{getValueWithOffset:n3,isNumber:r3}=mk;function i3(e,t){return Math.abs(e/t)<5||0===t}function o3({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:r=$5,stackedByDimensionExtractor:i=Y5,straightExtractor:o=W5,measureInfoExtractor:a=G5,explicitExtractor:s=U5}=n,{meta:l}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:r,count:i}){let o,a;if(Array.isArray(n)?({min:o,max:a}=this.extractFromStacked(n)):({min:o,max:a}=this.extractFromStraight(e,i)),t.query.hasTrendLines()){const{min:e,max:n}=t.query.getMinMax();o=Number.isFinite(e)?Math.min(o,e):o,a=Number.isFinite(n)?Math.max(a,n):a}const{min:s,max:l}=this.extractOthers(r),c=this.extractExplicit(),u=[0,o,a].filter((e=>r3(e)));let d=Math.min(...u),f=Math.max(...u);d=i3(s,d)?Math.min(d,s):d,f=i3(l,f)?Math.max(f,l):f;const h=[c.explicitMin,c.explicitMax,d,f].filter((e=>r3(e)));return o=Number.isNaN(c.explicitMin)?Math.min(...h):c.explicitMin,a=Number.isNaN(c.explicitMax)?Math.max(...h):c.explicitMax,o===a&&(Number.isNaN(c.explicitMin)?o=n3(o,-.2):Number.isNaN(c.explicitMax)&&(a=n3(a,.2))),{min:o,max:a,implicitMin:d,implicitMax:f,otherMin:s,otherMax:l,hasOtherMin:s<o,hasOtherMax:l>a,...c}},extractExplicit(){const{min:t,max:n,isExplicitMin:r,isExplicitMax:i}=s(e);return{hasExplicitMinMax:r||i,hasExplicitMin:r,hasExplicitMax:i,explicitMin:t,explicitMax:n}},extractFromStacked:e=>function(e){return e.length?{min:Math.min(...e[0].qSubNodes.map((e=>e.qMinNeg))),max:Math.max(...e[0].qSubNodes.map((e=>e.qMaxPos)))}:{min:0,max:0}}(e.length?e[0].qData:[]),extractFromStraight(t,n){const s=t.length?t[0].qMatrix:[];return l.isStackedByMeasure?r(s,n):l.isStackedByDimension?i(s,n):e.getHyperCubeValue("qHasOtherValues")?o(s,n):a(e)},extractOthers:e=>l.isStackedByDimension?function(e){const t=X5(HE(e,"0.qData.0.qSubNodes",[]),H5,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):l.isGroupedByDimension?function(e){const t=HE(e,"0.qMatrix",[]).filter(V5).reduce(t3,[]).filter(Q5).map(e3);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=X5(HE(e,"0.qMatrix",[]),V5,[]).filter(J5).map(Z5);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function a3(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:r,getHyperCubeValue:i}=t,o=e=>!e.length&&r.mode.K,a=e=>{const t=i("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=i("qMeasureInfo").length,s=i("qDimensionInfo").length,l=i("qHasOtherValues");if(!r.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(r.isContinuous){const e=r.isStackedByDimension?s:t;return n.fetchMinMaxData().then((t=>({qDataPages:t,count:e})))}const c=r.isStackedByDimension?1:t;return e.fetchMinMaxData().then((e=>{if(o(e))return a(l);let t=[];return l&&(t=r.mode.K?i("qStackedDataPages",[]):i("qDataPages",[])),{qDataPages:e,count:c,others:t}}))}}}(e),n=o3(e);return t.resolve().then((e=>n.extract(e)))}const s3="lasso",l3=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:s3,enable(e,n){if(this.started===s3||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.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!==s3&&(i.actions.select.emit("start",s3),this.chart.component(e).emit("lassoStart",t),this.started=s3)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",s3),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const c3=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.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:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),f=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&f&&f.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.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,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(f&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,f,{nodes:n,opts:o,customTooltipModel:e})}else f.emit("show",t,{nodes:d})}else h&&f.emit("hide")}}}};const u3=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({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&&(!!i.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 d3=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:"event:"+t,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.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+"-"))}(i,t)?(this.started=e,!0):a.length>0}},events:{[e+"start"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.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 o.updateOnMove&&o.updateOnMove(this.chart)},[e+"end"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(a+"End",n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function f3(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:f}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>"@"+e)).join(",")},on:f?{bubbleEnd(){f()}}:{},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:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=d3(e,t,"range");return{interactions:[e.onEdited?u3(e,t):null,r].filter(Boolean),components:[n]}}const h3={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}},p3="inner-time-axis",m3="outer-time-axis";const g3={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:r}=n[t];return r},getDimensionSize(e){var t;const n=null==e||null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal,{qLocked:r=0,qOption:i=0,qSelected:o=0}=(null==e?void 0:e.qStateCounts)||{};return[void 0,0].includes(n)?r+i+o:n}},y3={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const r=t?0:e.qDimensionInfo.length-1;n=g3.getMaxGlyphCount(e,r)}else e.qMeasureInfo.forEach((e=>{n=Math.max(n,e.qFallbackTitle.length)}));return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?HE(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=y3.getAxisData(e,t),r=!e.qDimensionInfo.length,i=r||t?void 0:e.qDimensionInfo.length-1,o=y3.getMajorAxisMaxGlyphCount(e,t),a=r?"qFallbackTitle":"qText";return My.getAdjustedMaxGlyphCount(o,n,i,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=y3.getAxisData(e),n=g3.getMaxGlyphCount(e,0);return My.getAdjustedMaxGlyphCount(n,t,0)}};var v3=3,b3=13;function x3(e,t,n,r){const{meta:i}=t.layoutService,o=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);i.isContinuous?o.push(...function(e,t,n,r){const{meta:i}=t.layoutService,{axis:o,grid:a}=t.themeService.getStyles(),s=t.styleService.axis.label.getStyle(),{auto:l,spacing:c}=t.layoutService.getLayoutValue("gridLine",{}),u=[],d="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,f=h3[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode,h={type:"grid-line",x:{},layout:{minimumLayoutMode:h3.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color},animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.lines.trackBy,compensateForLayoutChanges:HD.lines.compensateForLayoutChanges}},p=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(i.isTime){if(d){const e=n?"end":"start",r=n?1:0,i="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},majorGuideLine:{stroke:o.line.major.color},minorGuideLine:{stroke:o.line.minor.color}},d={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},preferredSize:()=>({size:2*parseFloat(s.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:i,justify:r},guideLine:{major:{justify:r},minor:{align:i}}},style:a,animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.axes.trackBy({isTime:!0}),compensateForLayoutChanges:HD.axes.compensateForLayoutChanges({isTime:!0})}};u.push(ny(!0,{},d,{key:p3,scale:I5.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!l&&0===c}},style:ny(!0,{},a,{line:{stroke:o.line.major.color},majorGuideLine:{stroke:o.line.minor.color},minorGuideLine:{stroke:o.line.major.color}})})),u.push(ny(!0,{},d,{key:m3,scale:I5.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),u.push({type:"axis-overlay",key:"outer-axis-overlay",scale:I5.SCALE.MAIN.MAJOR,layout:{dock:"@outer-time-axis",minimumLayoutMode:f}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:I5.SCALE.MAIN.MAJOR_INNER,layout:{dock:"@inner-time-axis",minimumLayoutMode:f}}),u.push(p)}return u.push(ny(!0,{},h,{key:"inner-time-grid",x:{scale:I5.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),u.push(ny(!0,{},h,{key:"outer-time-grid",x:{scale:I5.SCALE.MAIN.MAJOR}})),u}if(i.isContinuous){const e="continuous-axis";d&&(u.push({type:"axis",key:e,scale:I5.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},settings:{labels:{align:0,offset:4,fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},ticks:{show:!0,stroke:o.line.major.color},line:{show:!r},minorTicks:{show:!1}},animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:HD.axes.compensateForLayoutChanges({isContinuous:!0})}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:I5.SCALE.MAIN.MAJOR,layout:{dock:"@"+e,minimumLayoutMode:f}}),u.push(p)),u.push(ny(!0,{},h,{key:"continuous-grid",x:{scale:I5.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return u}(e,t,n,r)):o.push(...function(e,t,n,r){if("none"===e.dimensionAxis.show)return[];const{meta:i}=t.layoutService,o=t.themeService.getStyles(),a=[],s=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),l=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),c="horizontal"===t.dockService.meta.major.orientation,u=c?e.dimensionAxis.label:"auto",d="horizontal"===u?void 0:t.dockService.meta.minor.size/4,f=t.styleService.axis.label.getStyle(),h={type:"axis",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:h3[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:u,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,...f},line:{show:!r,stroke:o.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:HD.axes.compensateForLayoutChanges({isHorizontal:c})}};l&&a.push(ny(!0,{},h,{key:"group-axis",scale:I5.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":h.settings.labels.mode,maxGlyphCount:y3.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(c||!s)&&h.settings.line.show}}}));const p=y3.getBarAxisMaxGlyphCount(e.qHyperCube,i.isStackedByDimension);return s&&a.push(ny(!0,{},h,{key:I5.COMPONENT.BAR_AXIS,scale:I5.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:p,maxLengthPx:d,tiltThreshold:p>v3&&p<b3?1:void 0},line:{show:!(c&&l)&&h.settings.line.show}}})),c||2!==a.length?a:[a[1],a[0]]}(e,t,n,r));const l=t.themeService.getStyles(),c=t.styleService.axis.label.getStyle();return a&&o.push({type:"axis",key:"y-axis",formatter:I5.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:h3.measureAxis.minimumLayoutMode},scale:I5.SCALE.MAIN.MINOR,settings:{labels:{show:s,...c},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}},animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:HD.axes.compensateForLayoutChanges({isMeasure:!0,dock:t.dockService.meta.minor.dock})}}),o}var w3={BAR:{WIDTH:.7,STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function S3({layoutService:e,discrete:t,componentKey:n}){var r;const{isContinuous:i,isGrouped:o}=e.meta;if(i)return 1;const a=(e.getLayoutValue("components",[])||[]).filter((e=>e.key===n))[0];if(null!=a&&null!==(r=a.style)&&void 0!==r&&r.width){const{style:e}=a;return e.strokeWidth&&"none"!==e.strokeWidth?function(){const n=w3.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),r=e.width+n;return r>1?e.width-(r-1):e.width}:e.width}return o?.9:.7}const k3={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function M3(e,t,n={}){return({data:r})=>{const i=e.chart.component(t).rect;if(!r.items.length||!i)return 2;const{min:o,max:a}=e.viewState.get("zoom");if(n[[o,a]])return n[[o,a]];const s=k3[ly.getLayoutMode(i.width,Number.MAX_VALUE)];n={};const l=Math.abs(a-o),c=Math.abs(e.viewCache.get("continuousMax")-e.viewCache.get("continuousMin"));if(0===c)return s;const u=function(e,t,n){return e*(1-n)+t*n}(2,s,1-Math.min(l/c/.2,1));return n[[o,a]]=Math.max(2,Math.min(s,u)),n[[o,a]]}}function C3(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r<=0}function E3(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r>=0}function T3(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r>0}function q3(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r<0}const D3="max",N3="min",A3={min:"Min",max:"Max"};function O3(e,t,n){return void 0===n?C3(e,t)||E3(e,t):n===D3?C3(e,t):E3(e,t)}function L3({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e["hasExplicit"+A3[t]]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===D3?e.implicitMax:e.implicitMin;return!O3(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function I3(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,dockService:o,themeService:a}=e,s=i.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===D3?s.implicitMax:s.implicitMin;if(!O3(Number(l.toFixed(13)),s,n))return!1;const{orientation:c}=t.settings,u=n===D3?o.meta.minor.end:o.meta.minor.start;let d="end";r&&(d=n===D3?"sumOfPositives":"sumOfNegatives");const f=a.getStyles();return{type:"box-out-of-bounds",key:"bar-oob-"+n,layout:{dock:u},data:t.data,brush:t.brush,settings:{orientation:c,major:t.settings.major,minor:t.settings.minor,dockValue:Sy.getDockValue(u),oob:ny({},t.settings.box,{fill:f.outOfRange.color,alignment:1,opacity:1,show:function(e){var t;return!0!==(null===(t=e.datum.null)||void 0===t?void 0:t.value)&&((!r||0!==e.datum[d].value)&&O3(e.datum[d].value,s,n))}})},animations:{enabled:e.viewModel.animations.enabled,compensateForLayoutChanges:HD.barOobs.compensateForLayoutChanges}}}function _3(e){return Math.min(Math.max(0,e),1)}const R3=(e,{chart:t,type:n,componentKey:r,collectionKey:i})=>{const{layoutService:o,dockService:a,viewCache:s}=e,{isStacked:l}=o.meta,c=s.get("minorMinMax"),{meta:u}=e.layoutService;if(!L3({minorMinMax:c,type:n}))return!1;let d;u.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:u.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);return{type:"box",key:`${I5.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:i},settings:{orientation:a.meta.minor.orientation,major:{scale:I5.SCALE.MAIN.MAJOR,fn:d},minor:{scale:I5.SCALE.MAIN.MINOR,start(e){var n,r;return _3(t.scale(I5.SCALE.MAIN.MINOR)((null==e||null===(n=e.datum)||void 0===n||null===(r=n.start)||void 0===r?void 0:r.value)||0))},end(e){const r=t.scale(I5.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r[n]();return _3(r(o))}},box:{width:S3({layoutService:e.layoutService,discrete:e.discrete,componentKey:r}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const r=t.scale(I5.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r.max();return"max"===n?o>r.max():o<r.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function P3(e,t){const{style:n,styleService:r,dockService:i}=t,o=r.label.getStyle(),a=o.fill!==n.color||e.onBackground?o.fill:function(e){return function(t){return jv.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}(n),s="horizontal"===i.meta.major.orientation,l=e.padding||{left:s?0:4,right:s?0:4,top:s?4:0,bottom:s?4:0};return{position:e.position,justify:e.justify,fill:a,overflow:e.overflow,background:e.background,padding:l}}function z3(e){return{placements:e.simplifiedPlacements.map((t=>P3(t,e))),label:e.label}}function F3(e,t){if(t){if(function(e,t){return C3(e,t)}(e,t))return-1;if(function(e,t){return E3(e,t)}(e,t))return 1}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)}function j3(e,t,n,r){const i=F3(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}function B3(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!r||!i&&!!n.showSegmentLabels}function H3(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!!r&&(!!i||!1!==n.showTotalLabels)}function V3(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}function W3({layout:e,component:t,minorScale:n},r,i){if(!B3(e,r))return!1;const{viewModel:o,ds:a,viewCache:s,layoutService:l,dockService:c,themeService:u}=r,{meta:d}=l,f=s.get("minorMinMax"),h=u.getStyles(),p=r.styleService.label.getStyle();let m;!d.isStacked&&(m=d.isStacked?1:0);const g=0===m?1:0,y=d.isStacked?.5:1,v=o.fields.minor[0],b=void 0===v?void 0:a.field(v).formatter();let x,w=-1;x=d.isStacked?d.isStackedByMeasure||!b?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>w?b(e.data.segment.value):""}:function(e){return e.data.end.label};const S={label:x,simplifiedPlacements:V3(m,g,y,d.isContinuous),style:h.label.value},k=[z3(ny(r,S))],M={key:"bar-labels",type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>j3(e.data.end.value,c.meta.minor.orientation,i,f),labels:k,fontSize:parseInt(p.fontSize,10),fontFamily:p.fontFamily,linkData:HD.labels.linkData}}}]},animations:{enabled:r.viewModel.animations.enabled,trackBy:HD.labels.trackBy,compensateForLayoutChanges:HD.labels.compensateForLayoutChanges}};return d.isStackedByDimension&&b&&(M.beforeRender=()=>{w=function(e,t,n){const r="vertical"===t.dockService.meta.minor.orientation?"height":"width",i=t.chart.component(e),o=i&&i.rect?i.rect[r]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/o}(t,r,n)}),M}const U3={isSameMeasureAndColorRow:(e,t,n)=>t&&e&&t[0].content[0]===e[0].content[0]&&t[0].content[1]===e[0].content[1]&&t[1].content[n?0:1]===e[1].content[0],getTitle(e,t){const n=e.data;let r;return t.isStackedByDimension?r=n.stack?n.stack.label:void 0:t.isGroupedByDimension&&(r=n.group?n.group.label:void 0),void 0!==r?`${n.label}, ${r}`:n.label},getMeasure(e,t,n,r,i){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;const o=t.data,a=n.isStacked?r.viewModel.fields.minor[n.isStackedByDimension?0:o.measureIndex.value]:void 0,s=n.isStacked?{source:{key:o.source.key,field:a},label:!0===(null===(l=o.null)||void 0===l?void 0:l.value)?"":n.isStackedByDimension&&i?i(o.segment.value):o.segment.label}:o.end;var l;return Oy.getMeasure(e,s)},getMeasures(e,t,n,r,i){const o=e.resources.dataset;return t.map((e=>U3.getMeasure(o,e,n,r,i))).filter(Boolean)},getCustomTooltipAttrExps(e,t,n){const r=e.resources.dataset;return i2({nodes:t,layout:n.layoutService.getLayout(),dataset:r})},extractBarTooltipData(e,t,n,r,i){const o={title:U3.getTitle(t,n),color:Oy.getColor(e,t,r),measures:U3.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,r,i)};if(U3.useCustomTooltip(r)){var a,s,l,c;const n=U3.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],r);o.customMeasures=n.customTooltipAttrExpsArr,o.customTitle=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===B1.CUSTOM.TITLE)),o.customDescription=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===B1.CUSTOM.DESCRIPTION));let i=[];(t.childrenNodes?t.childrenNodes:[t]).forEach((e=>{var t;(null===(t=e.data.customTooltipImages)||void 0===t?void 0:t.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(i=e.data.customTooltipImages)})),i.length>0&&(o.customImages=i);const p=r.layoutService.getLayout();var u,d,f,h;if(null!==(a=p.tooltip)&&void 0!==a&&null!==(s=a.chart)&&void 0!==s&&null!==(l=s.object)&&void 0!==l&&l.refId&&r.app&&r.customTooltipModel.embed&&"function"==typeof(null===(c=r.customTooltipModel.model)||void 0===c?void 0:c.getEffectiveProperties))if(null!==(u=(d=r.app).isInModalSelection)&&void 0!==u&&u.call(d)){if((null==p||null===(f=p.qHyperCube)||void 0===f||null===(h=f.qDimensionInfo)||void 0===h?void 0:h.length)>0){X1.destroyVisualization({customTooltipModel:r.customTooltipModel});const e=r.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");o.customLimitation=e}}else{const t=X1.createContainer({ctx:e,layout:p});o.customChart=t}}return o},getTotalStackTitle:(e,t)=>e>0?t?t.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives":e<0?t?t.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives":"",extractStackTotalBarTooltipData:(e,t,n)=>({title:e.data.label,measures:[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter((e=>0!==e)).map((e=>({label:""+U3.getTotalStackTitle(e,t),value:n?n(e):e})))}),extractTooltipData(e,t){const n=t.chart.formatter(I5.FORMATTER.MINOR),{meta:r}=t.layoutService,i=e.node.childrenNodes?e.node.childrenNodes:[e.node],o=Math.max(0,i.length-6);i.length=Math.min(i.length,6);const{stackTotalBarNodes:a}=e.node,s=a&&a.length?a.map((e=>U3.extractStackTotalBarTooltipData(e,t.translator,n))):[];return{barTooltipData:i.map((i=>U3.extractBarTooltipData(e,i,r,t,n))),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:o}},extractBarNodeData(e,t,n,r,i,o,a){let s=!i&&Oy.getTitleRow(t,r);const l=Oy.hideColorRow(t,n),c=!o&&!l&&Oy.getColorRow(e,t,r),u=t.measures.map((i=>!a&&Oy.getMeasureRow(i,e,t,r,l&&i.field===n.coloring.field))).filter((e=>!U3.isSameMeasureAndColorRow(e,c,r)));if(U3.useCustomTooltip(n)){const n=i?[]:t.customMeasures.map((n=>Oy.getMeasureRow(n,e,t,r,!1))),o=!(!t.customTitle[0]||i)&&Oy.getTitleRow(t.customTitle[0],r),a=!(!t.customDescription[0]||i)&&Oy.getDescriptionRow(t.customDescription[0],r);s=!U3.shouldIgnoreTitleRowForCtt(o,a,u,n)&&s;const l=[o,a,s,c,...u,...n];if(t.customChart&&l.push(t.customChart),t.customLimitation&&l.push(e2.getFooterRow(t.customLimitation,r)),t.customImages){const n=t.customImages.map((t=>e2.getImageRow(t,e)));l.push(...n)}return l.filter(Boolean)}return[s,c,...u].filter(Boolean)},extractStackTotalBarNodeData:(e,t,n)=>[!!t.measures.length&&Oy.getTitleRow(t,n),...t.measures.map((r=>Oy.getMeasureRow(r,e,t,n,!1)))].filter(Boolean),useCustomTooltip:e=>HE(e,"customTooltipModel.useCustomTooltip",!1),shouldIgnoreTitleRow:(e,t)=>e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension,shouldIgnoreTitleRowForCtt:(e,t,n,r)=>!1===n[0]&&0===r.length&&(e.length>0||t.length>0),shouldIgnoreColorRow:(e,t)=>t>0&&(e.isGroupedByMeasure||e.isStackedByMeasure),shouldIgnoreMeasureRow:(e,t,n)=>e&&t.measures.some((e=>e.field===n.coloring.field)),shouldIgnoreDefaultRows:(e,t)=>U3.useCustomTooltip(t)&&HE(e,"tooltip.hideBasic",0),extractBarsData(e,t,n,r){const{meta:i}=t.layoutService,o=t.layoutService.getLayout(),a=r.length;let s,l,c=[];const u=U3.shouldIgnoreDefaultRows(o,t);for(s=0;s<a;s++){l=r[s];const o=U3.shouldIgnoreTitleRow(i,s),d=u||U3.shouldIgnoreColorRow(i,s),f=u||U3.shouldIgnoreMeasureRow(d,l,t);if(c=c.concat(U3.extractBarNodeData(e,l,t,n,o,d,f)),c.length>=6||l.customImages||l.customChart||l.customLimitation)return{barsData:c,numInvisibleNodesPhase2:a-(s+1)}}return{barsData:c,numInvisibleNodesPhase2:0}},extractStackTotalBarsData(e,t,n){let r=[];return n.some((e=>e.measures.length))&&n.forEach((n=>{r=r.concat(U3.extractStackTotalBarNodeData(e,n,t))})),r},extractData(e,t,n){const{barTooltipData:r,numInvisibleNodesPhase1:i,stackTotalBarTooltipData:o}=U3.extractTooltipData(e,t),a=U3.extractStackTotalBarsData(e,n,o);a.length&&a.push(Oy.getSeparatorRow());const{barsData:s,numInvisibleNodesPhase2:l}=U3.extractBarsData(e,t,n,r),c=a.concat(s),u=i+l;return u&&c.push(Oy.getNMoreRow(u,t.translator,n)),c},calculateBoundsFromBars(e){const t=e.filter((e=>{const t=e.bounds;return t.width>0&&t.height>0})),n=t.length?t:e;return JD.combineBounds(n.map((e=>e.bounds)))},calculateBoundsFromScale({opts:e,barKey:t,scale:n,majorScale:r,data:i,groupProp:o}){const a=e.chart.component(t).rect,{orientation:s}=e.dockService.meta.major,l="horizontal"===s?"width":"height",c=e.chart.scale(n).pxScale(a[l]);let u,d,f;if(e.layoutService.meta.isGroupedByMeasure){const t=e.viewModel.fields.minor.length;u=i.value,d=n===r&&void 0!==u?(c([u,0])+c([u,t-1]))/2:0,f=n===r&&void 0!==u?c.bandwidth([u,0]):0}else{const{value:e}=i;u=i[o]?i[o].value:void 0,d=c(n===r&&void 0!==u?[u,e]:e),f=n===r&&void 0!==u?c.bandwidth([u,e]):c.bandwidth(e)}const h=(d+f/2)*a[l],p={width:0,height:0};return"horizontal"===s?(p.x=h,p.y=a.height):(p.y=h,p.x=0),p},calculateTotalBounds({opts:e,labels:t,bars:n,barKey:r,barAxisKey:i,majorScale:o,majorInnerScale:a,groupProp:s}){const l=n.filter((e=>e.children&&e.children.length));let c;return c=l.length?U3.calculateBoundsFromBars(l):U3.calculateBoundsFromScale({opts:e,barKey:r,scale:t[0].key===i?o:a,majorScale:o,data:t[0].data,groupProp:s}),c},filterNodesOnKeys:(e,t)=>e.filter((e=>e.data&&t.indexOf(e.key)>-1)),isBarMatchingLabel:(e,t)=>t.data.value===e.data.value,isBarMatchingLabelOnProp:(e,t,n)=>t.data.value===(e.data[n]?e.data[n].value:e.data.value),findBarsMatchingLabels:(e,t,n,r)=>e.filter((e=>t.some((t=>n(e,t,r))))),findBarsFromGroupLabelsInGroupedByDim(e,t,n){const r=U3.isBarMatchingLabelOnProp;return U3.findBarsMatchingLabels(e,t,r,n)},findBarsFromBarLabelsInGroupedByDim:(e,t,n)=>e.filter((e=>t.some((t=>t.data.group&&t.data.group.value===e.data[n].value&&t.data.value===e.data.value)))),findBarsFromLabelsInSingleDim(e,t){const n=U3.isBarMatchingLabel;return U3.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim(e,t,n,r){const i=t.filter((e=>e.key===n)),o=t.filter((e=>e.key!==n)),a=U3.findBarsFromBarLabelsInGroupedByDim(e,i,r),s=U3.findBarsFromGroupLabelsInGroupedByDim(e,o,r);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim(e,t){const n=U3.isBarMatchingLabel;return U3.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure(e,t){const n=U3.isBarMatchingLabel;return U3.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim(e,t,n){const r=U3.isBarMatchingLabelOnProp;return U3.findBarsMatchingLabels(e,t,r,n)},findBarsFromLabelsInStackedByMeasure:(e,t)=>U3.findBarsFromLabelsInSingleDim(e,t),findBarsFromLabels({labels:e,opts:t,filterKeys:n,barAxisKey:r,groupProp:i,stackProp:o}){const{meta:a}=t.layoutService,s=U3.filterNodesOnKeys(t.chart.findShapes("container"),n);return a.isStackedByDimension?U3.findBarsFromLabelsInStackedByDim(s,e,o):a.isStackedByMeasure?U3.findBarsFromLabelsInStackedByMeasure(s,e):a.isGroupedByDimension?U3.findBarsFromLabelsInGroupedByDim(s,e,r,i):U3.findBarsFromLabelsInSingleDim(s,e)},findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:n}){const{meta:r}=t.layoutService;if(r.isStacked){const i=U3.filterNodesOnKeys(t.chart.findShapes("container"),[n]);return r.isStackedByDimension?U3.findStackTotalBarsFromLabelsInStackedByDim(i,e):U3.findStackTotalBarsFromLabelsInStackedByMeasure(i,e)}return[]},isSingleBarMode:(e,t)=>(e.isSimple||1===t.length)&&t[0].children&&t[0].children.length,filterNodesOnLabels({labels:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l,majorScale:c,majorInnerScale:u,filterFn:d}){const{meta:f}=t.layoutService;if(e.length){let h=U3.findBarsFromLabels({labels:e,opts:t,filterKeys:[n],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});if(d&&(h=h.filter(d)),U3.isSingleBarMode(f,h))return[h[0]];if(h.length){let f=U3.findBarsFromLabels({labels:e,opts:t,filterKeys:[n,o,a],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});d&&(f=f.filter(d));const p=U3.calculateTotalBounds({opts:t,labels:e,bars:f,barKey:n,barAxisKey:i,groupProp:s,majorScale:c,majorInnerScale:u}),m=U3.findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:r});return[{key:n,bounds:p,childrenNodes:h,data:h.map((e=>e.data)),stackTotalBarNodes:m}]}return[]}return[]},filterNodesForOob:(e,t,n)=>e.key===t&&0===e.children.length||e.key===n,filterNodes({nodes:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,groupAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d}){let f=U3.filterNodesOnKeys(e,[i,o]),h=f&&f.length?[f[0]]:[];const p=U3.filterNodesOnLabels({labels:h,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d});if(p&&p.length)return p;const{meta:m}=t.layoutService;if(m.isStackedByMeasure){f=U3.filterNodesOnKeys(e,[a,s]),h=f&&f.length?[f[0]]:[];const o=e=>U3.filterNodesForOob(e,n,a),p=U3.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:o});if(p&&p.length)return p[0].stackTotalBarNodes=void 0,p}if(m.isStackedByDimension){f=U3.filterNodesOnKeys(e,[a,s]),h=f&&f.length?[f[0]]:[];const o=e=>U3.filterNodesForOob(e,n,a),p=U3.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:o});if(p&&p.length)return p[0].stackTotalBarNodes=void 0,p}const g=U3.filterNodesOnKeys(e,[n,a,s]);return g.length?[g[0]]:[]}};function $3(e,t={},n){let r=[];const i=Ty({key:I5.COMPONENT.BASE_TOOLTIP,rtl:n});return ny(!0,i,{scale:I5.SCALE.MAIN.COLOR,settings:{filter:e=>U3.filterNodes({nodes:e,opts:t,barKey:I5.COMPONENT.BAR,stackTotalBarKey:I5.COMPONENT.STACK_TOTAL_BAR,barAxisKey:I5.COMPONENT.BAR_AXIS,groupAxisKey:I5.COMPONENT.GROUP_AXIS,barOobMaxKey:I5.COMPONENT.BAR_OOB_MAX,barOobMinKey:I5.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"}),extract:e=>(r=e.node.childrenNodes?e.node.childrenNodes:[e.node],U3.extractData(e,t,n)),placement:"bounds",afterShow:()=>{var e;const{app:i,properties:o,customTooltipModel:a}=t;i&&(null===(e=i.isInModalSelection)||void 0===e||!e.call(i))&&a.useCustomTooltip&&a.embed&&X1.show({app:i,properties:o,selectedNodes:r,customTooltipModel:a,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}const Y3={extractData:(e,t)=>[Oy.getTitleRow({title:e.node.data.label},t)],filterNodes(e,t){const n=e.filter((e=>e.data&&e.key===t));return n.length?[n[0]]:[]}};function K3(e,t={},n){if("categorical"!==t.colorService.getMain().getSettings().type)return!1;const r=Ty({key:I5.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return ny(!0,r,{scale:I5.SCALE.MAIN.COLOR,settings:{filter:e=>Y3.filterNodes(e,I5.COMPONENT.LEGEND_COLOR_CAT),extract:e=>Y3.extractData(e,n),placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function G3(e){return"NaN"===e.qMin&&"NaN"===e.qMax}function X3({layout:e},t,n){const r=function(e,t){if(e.qHyperCube.qSize.qcx*e.qHyperCube.qSize.qcy==0)return"NoDataExist";if(e.qHyperCube.qMeasureInfo.every(G3))return"OnlyNanData";let n=!1;if(t.layoutService.meta.isContinuous&&2===e.qHyperCube.qDimensionInfo.length){const t=e.qHyperCube.qDimensionInfo[1];n=g3.getDimensionSize(t)>fy.maxNumberOfLines}return!!n&&"LimitedData"}(e,t),{fontFamily:i}=t.themeService.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:i}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:oy[e].alignment},settings:{label:i.get("Object.Disclaimer."+e),rtl:o},style:r}}(r,t,{rtl:n},{fontFamily:i})}function J3(e,{fill:t}){return{[I5.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[I5.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const Z3=1,Q3=3;function e4(e){return e.getLayoutValue("gridLine.auto")}function t4(e){return!e4(e)&&e.getLayoutValue("gridLine.spacing")===Z3}function n4(e){return!e4(e)&&e.getLayoutValue("gridLine.spacing")===Q3}const r4=e=>({enabled:e.animations.enabled,trackBy:HD.lines.trackBy,compensateForLayoutChanges:HD.lines.compensateForLayoutChanges}),i4=(e,{themeService:t,layoutService:n,dockService:r,viewModel:i})=>{if(!e4(n)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(n))return!1;const{grid:o}=t.getStyles(),a={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:h3.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!t4(n)||((e,t)=>t%2==0),stroke:o.line.major.color},minorTicks:{show:n4(n),stroke:o.line.minor.color},animations:r4(i)};return a["horizontal"===r.meta.major.orientation?"y":"x"]=I5.SCALE.MAIN.MINOR,a};function o4(e,t){const n=[i4(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n,viewModel:r})=>{const i=n.get("minorMinMax");if(i.min>0||i.max<0)return!1;const o=t.getStyles(),a={};return a["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:I5.SCALE.MAIN.MINOR,line:{stroke:o.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:I5.SCALE.MAIN.MINOR,lines:a,animations:r4(r)}})(t)),n}const a4="areaPan",s4=e=>({type:"Pan",key:"panorama",options:{event:a4,pointers:1,threshold:10,enable(t,n){return this.started===a4||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===I5.COMPONENT.BAR))}},events:{areaPanstart(t){t.preventDefault(),this.started=a4;const n=e.viewState.get("zoom");this.areaPan={min:n.min,max:n.max,size:e.chart.component(I5.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:r,max:i,size:o}=this.areaPan,a=-t.deltaX/o;e.viewState.set("zoom",{min:Math.min(r+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(i+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function l4(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:r,chart:i}=e,{rtl:o}=t,a=H0.event.onZoom({viewCache:n,viewState:r,chart:i},{threshold:100,rtl:o,targetKey:I5.COMPONENT.BAR}),s={last:0,diff:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:(t,n)=>!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===I5.COMPONENT.BAR))},events:{zoomstart(e){s.last=e.scale,e.preventDefault()},zoommove(e){const t=e.scale-s.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),s.last=e.scale}}}}function c4({chart:e},t,n){const r=e.component(I5.COMPONENT.BASE_TOOLTIP);var i;r&&r.show&&(r.emit("hide"),null!=n&&null!==(i=n.customTooltipModel)&&void 0!==i&&i.useCustomTooltip&&t&&t({},r,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));const o=e.component(I5.COMPONENT.LEGEND_CAT_TOOLTIP);o&&o.show&&o.emit("hide");const a=e.component(I5.COMPONENT.TREND_LINES_TOOLTIP);a&&a.show&&a.emit("hide")}function u4(e,t){const{viewCache:n,viewState:r,chart:i,trendLineModel:o,layoutService:a}=e,{rtl:s}=t,l=e.layoutService.meta.isContinuous?H0.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:s,threshold:50,targetKey:I5.COMPONENT.BAR}):void 0,c=M5({majorInnerScale:I5.SCALE.MAIN.MAJOR_INNER,tooltip:I5.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:I5.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:i,viewState:r,trendLineModel:o,layoutService:a,rtl:s}),u=[I5.COMPONENT.BAR,I5.COMPONENT.BAR_AXIS,I5.COMPONENT.GROUP_AXIS,I5.COMPONENT.BAR_OOB_MAX,I5.COMPONENT.BAR_OOB_MIN],d=e.customTooltipModel.utils,f=e.debouncer(d.displayTooltip,d.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel(t){let n,r=!1;if(e.actions.scroll.enabled()){const i={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(i).filter((e=>e.key===I5.COMPONENT.BAR)),n&&(e.layoutService.meta.isContinuous&&l(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter((e=>e.key===I5.COMPONENT.LEGEND_COLOR_CAT)),n&&(r=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),r&&t.preventDefault(),c4(e,f,e)},mousemove(t){if(e.actions.tooltip.enabled()){if(c(t))return;const n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),r=this.chart.component(I5.COMPONENT.BASE_TOOLTIP);if(r&&r.show)if(n.some((e=>u.indexOf(e.key)>-1))){const{customTooltipModel:n}=e;if(n.useCustomTooltip&&d.checkIfPromisesExist({customTooltipModel:n})){const i=d.getNodes(t,this.chart);f(t,r,{nodes:i,opts:e,customTooltipModel:n})}else r.emit("show",t)}else r.emit("hide");const i=this.chart.component(I5.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&(n.some((e=>e.key===I5.COMPONENT.LEGEND_COLOR_CAT))?i.emit("show",t):i.emit("hide"))}},mouseup(t){2===t.button&&c4(this,f,e)},mouseleave(){c4(this,f,e)}}}}const d4=(e,t)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...s1({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[s4(e,t.rtl),l4(e,t)]]});function f4(e,t){const{actions:n}=e;if(!n.interact.enabled())return[];const r=[d4(e,t),u4(e,t),s1({...e,componentKey:"scrollbar",rtl:t.rtl}).native];return e.layoutService.meta.isDiscrete&&r.push(e.discrete.interactions.native),r}const h4=e=>({enabled:e.animations.enabled,compensateForLayoutChanges:HD.bars.compensateForLayoutChanges});const p4=(e,t,{collectionKey:n})=>{if(!K0({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,{reducedDataModel:t,colorService:n,continuousDataModel:r,viewModel:i},{collectionKey:o}){return{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>r.getDimensionCardinality()>1,data:{collection:o},settings:{box:ny(!0,{},e.settings.box,{minWidthPx:2,fill:n.getMini().getColor(),strokeWidth:0}),major:ny(!0,{},e.settings.major,{scale:t.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:h4(i)}}(e,t,{collectionKey:n});const{mode:r,scales:i}=t.reducedDataModel;let o;return r.isGroupedByDimension&&!r.isReduced?o=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:r.isGroupedByMeasure&&(o=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2),{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>t.discrete.query.getCanScroll(),data:{collection:n},settings:{box:{...e.settings.box,fill:r.isReduced||r.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:i.major,fn:o},minor:{scale:i.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:h4(t.viewModel)}},{measureText:m4}=Yp.renderer("svg")();function g4(e,t,n){return{reducedMinor:function(e){const t=ny(!0,{},e);return delete t.data,t}(t.minor),reducedMajor:function(e,t,{majorScaleInvert:n,maxPxStep:r,align:i,getProp:o}){let a={invert:n,data:{extract:e.mode.isDimensionless?e.fields.minor.map(((e,t)=>({field:e,value:t}))):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:r,align:i};return e.mode.isStackedByDimension?a.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(a.data={source:"miniCube",hierarchy:{value:e=>e.qElemNumber}}):e.mode.isGroupedByMeasure?(a=ny(!0,{},t),a.data.extract.source="miniCube"):e.mode.isContinuous&&(a=ny(!0,{},t,{min:()=>o("continuousMin"),max:()=>o("continuousMax")})),a}(e,t.major,n)}}const y4=50,v4=100,b4=200;function x4(e,t){const n=function(e){const t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return y4;case 1:return v4;case 2:return b4;default:return 125*t}}(t);return Math.max(1,Math.round(e/n))}function w4(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function S4(e,t,n){return 0===t||0===e||t===n.length-1}function k4(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function M4(e,t,n,r,i){e.domain([t,n]),e.nice(10);const[o,a]=e.domain();let s=e.ticks(10);const l=function(e){return e.length%2==0}(s),c=function(e){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}(s),u=c?S4:w4;s=s.filter(u),l&&!c&&!r&&s.length>1&&(s=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const d=i?i.formatter(I5.FORMATTER.MINOR):void 0;return k4(d?s.map(d):s)&&(s=[s[0],s[s.length-1]]),{roundedMin:o,roundedMax:a,ticks:s}}function C4(e,t,n,r,i,o,a,s){const l=o.formatter(I5.FORMATTER.MINOR),c=s.getStyles(),u="horizontal"===a.meta.major.orientation?"height":"width",d=e=>m4({text:e,fontSize:c.axis.label.name.fontSize,fontFamily:c.axis.label.name.fontFamily})[u];let[f,h]=e.domain(),p=e.ticks(r);function m(){const e=p.map(l);return!k4(e)&&function(e){const t=i/p.length;return Math.max(...e.map(d))<=t}(e)}for(let i=r-1;i>0&&!m();i--)e.domain([t,n]),e.nice(i),[f,h]=e.domain(),p=e.ticks(i);return{roundedMin:f,roundedMax:h,ticks:p}}const E4=(e,t)=>e.value-t.value,T4=e=>({value:e,isMinor:!1}),q4=e=>({value:e,isMinor:!0});function D4(e,t,n){const r=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter((e=>(e=>Number.isNaN(t)||e>=t)(e)&&(e=>Number.isNaN(n)||e<=n)(e))).length<=r}function N4({chart:e,viewCache:t,dockService:n,layoutService:r,themeService:i}){const{explicitMin:o,explicitMax:a,hasExplicitMin:s,hasExplicitMax:l}=t.get("minorMinMax"),{min:c,max:u}=function(e){let{min:t,max:n}=e.get("minorMinMax");return t===n&&0===t&&(t-=1,n+=1),{min:t,max:n}}(t),d=UE((()=>{const d=function(e,t,n){let r;return e?r=n.meta.chart.size:({rect:r}=t.component(I5.COMPONENT.BAR)),"horizontal"===n.meta.major.orientation?r.height:r.width}(t.get("isPreRender"),e,n),f=x4(d,r),h=function(e,t,n){const r=Ux().domain([e,t]);return r.nice(n),r}(c,u,f);let p,m,g=[];"SPARK"===n.meta.chart.mode?({roundedMin:p,roundedMax:m}=function(e,t){return{roundedMin:e,roundedMax:t}}(c,u)):(({roundedMin:p,roundedMax:m,ticks:g}=C4(h,c,u,f,d,e,n,i)),D4(g,o,a)&&({roundedMin:p,roundedMax:m,ticks:g}=M4(h,c,u,s||l,e)));const y=function(e,t){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}(g,1);g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.unshift(t),n.filter((e=>e>=t))):n}(s,o,g),g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.push(t),n.filter((e=>e<=t))):n}(l,a,g);return{roundedMin:p,roundedMax:m,ticks:function(e,t){return[...e.map(T4),...t.map(q4)].sort(E4)}(g,y)}}),(()=>t.get("isPreRender")));return{values:()=>d().ticks,min:()=>s?o:d().roundedMin,max:()=>l?a:d().roundedMax}}function A4(e,{picasso:t,discrete:n,layoutService:r,dockService:i,viewModel:o,viewCache:a,reducedDataModel:s,colorService:l,themeService:c,viewState:u,chart:d},{localeInfo:f,rtl:h}){const{meta:p}=r,{fields:m}=o,g=()=>{if("custom"!==r.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,i.meta.chart.size["horizontal"===i.meta.major.orientation?"height":"width"]/4)},y=!("none"===r.getLayoutValue("measureAxis.show"))?(v=i.meta.minor.orientation,b=i.meta.minor.dock,"vertical"===v?"near"===b||"left"===b?0:1:"near"===b||"bottom"===b?1:0):.5;var v,b;const x={},w="vertical"===i.meta.minor.orientation&&h,S=l.getMain().getScales(),k=l.getMini().getScales();if(Object.assign(x,S,{reducedFill:k.reducedFill}),x[I5.SCALE.MAIN.MINOR]=function({chart:e,viewModel:{fields:t},dockService:n,viewCache:r,layoutService:i,themeService:o},{rtl:a}){const s=N4({chart:e,dockService:n,viewCache:r,layoutService:i,themeService:o}),l={invert:"vertical"===n.meta.minor.orientation||a,ticks:{values:s.values},minorTicks:{count:1},min:s.min,max:s.max};return i.meta.isStacked||(l.data={source:"qHyperCube",fields:t.minor}),l}({chart:d,viewModel:o,dockService:i,viewCache:a,layoutService:r,themeService:c},{rtl:h}),p.isGroupedByDimension)[I5.SCALE.MAIN.MAJOR_INNER,I5.SCALE.MAIN.MAJOR].forEach(((e,t)=>{x[e]={invert:w,data:{source:"qHyperCube",hierarchy:{label:e=>e.qText?e.qText:"",value:e=>e.qElemNumber,props:{...o.selectionDimensionProp(t),group:p.isGroupedByDimension?{field:m.majorGroup}:void 0}}},label:({datum:e})=>e.label,ticks:{depth:t+1},maxPxStep:g,align:y}})),o.isDimensionLocked(0)||(x[I5.SCALE.MAIN.MAJOR_INNER].data.hierarchy.props.axisSelectionDimension={field:0});else if(p.isGroupedByMeasure)x[I5.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:w,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:g,align:y};else if(p.isTime){const{innerTime:e,outerTime:n}=function(e,t){const{layoutService:n,viewModel:r,viewCache:i,picasso:o,viewState:a,localeInfo:s,themeService:l}=e,c=()=>n.getHyperCubeValue("qAxisData.qAxis",[]),u=o.formatter("q-time"),d=l.getStyles(),f=e=>m4({text:e,fontSize:d.axis.label.name.fontSize,fontFamily:d.axis.label.name.fontFamily});i.set("qTimeAxisCache",[]);const h={get:(e,t=0)=>{const n=i.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:(e,t,n=0)=>{i.get("qTimeAxisCache")[n]=[e,t]},key:({distance:e})=>{const{min:t,max:n}=a.get("zoom"),r=(n-t)/(i.get("continuousMax")-i.get("continuousMin")),o=c().map((e=>e.qName));return[e,Number.parseFloat(r).toFixed(12),...o].toString()}};return{innerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3",initialMin:a.get("zoom").min},level:"inner",anchor:"start",clamp:!0},cache:h},outerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:h}}}({picasso:t,localeInfo:f,viewState:u,viewModel:o,viewCache:a,themeService:c,layoutService:r},h);x[I5.SCALE.MAIN.MAJOR_INNER]=e,x[I5.SCALE.MAIN.MAJOR]=n}else p.isContinuous?x[I5.SCALE.MAIN.MAJOR]={type:"linear",invert:w,data:{extract:{key:"qHyperCube",field:m.majorNumeric}},ticks:{forceBounds:!0,count:u.get("zoom").min===u.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>u.get("zoom").min,max:()=>u.get("zoom").max}:x[I5.SCALE.MAIN.MAJOR]={invert:w,data:{extract:p.isDimensionless?m.minor.map(((t,n)=>({field:t,label:()=>e.qHyperCube.qMeasureInfo[n].qFallbackTitle,value:n}))):{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},type:p.isDimensionless?"band":void 0,maxPxStep:g,align:y};const{reducedMinor:M,reducedMajor:C}=g4(s,{major:x[I5.SCALE.MAIN.MAJOR],minor:x[I5.SCALE.MAIN.MINOR]},{majorScaleInvert:w,maxPxStep:g,align:y,getProp:a.get});return p.isDiscrete&&(x[I5.SCALE.MAIN.MAJOR].range=n.query.getScaleRange,p.isGroupedByDimension&&(x[I5.SCALE.MAIN.MAJOR_INNER].range=n.query.getScaleRange)),x[s.scales.major]=C,x[s.scales.minor]=M,x}function O4(e,t,n){const{layoutService:r,colorService:i}=e;return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[c3(e,t)],components:[]}}({targets:[r.meta.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?I5.COMPONENT.STACK_TOTAL_BAR:I5.COMPONENT.BAR,I5.COMPONENT.BAR_AXIS,I5.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",I5.COMPONENT.LEGEND_COLOR_CAT],components(e,t){const r={action:e.srcEvent.ctrlKey||n?"set":"toggle",contexts:["selection"],key:t[0].key};return I5.COMPONENT.BAR===t[0].key?[{...r,data:["selectionDimension"]}]:[I5.COMPONENT.BAR_AXIS,I5.COMPONENT.GROUP_AXIS].includes(t[0].key)?[{...r,data:["selectionDimension","axisSelectionDimension"]}]:[r]}},{...e,isLocked:n=>n.some((e=>e.key===I5.COMPONENT.LEGEND_COLOR_CAT))?i.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n)})}function L4(e){const t=e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1;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:[l3(n,t)],components:[r]}}({key:"lasso",componentTargetKey:I5.COMPONENT.BAR,components:[t?{key:I5.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:I5.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}]},e)}function I4(e){return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>"@"+e)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[d3(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:[{key:I5.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}],key:"discreteRangeBrush",targets:["group-axis",I5.COMPONENT.BAR_AXIS,I5.COMPONENT.BAR],fillTargets:["group-axis",I5.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function _4(e,t,n){const{selectionService:r}=e,{isUnsupportedFeature:i}=t,o=void 0===n,a=r.getIsSingleSelect(n),s=O4(e,o,a);if(o||a)return{components:[...s.components],gestures:[...s.interactions]};const l=L4(e),c=function(e,t){return e.layoutService.meta.isStacked||null!=t&&t("rangeSelections")?{components:[],interactions:[]}:f3({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",I5.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:I5.SCALE.MAIN.MINOR,onEdited(){e.actions.select.emit("end","measureRange")}},e)}(e,i),u=function(e){return e.layoutService.meta.isContinuous?f3({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",I5.COMPONENT.BAR]:["continuous-axis",I5.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?I5.SCALE.MAIN.MAJOR_INNER:I5.SCALE.MAIN.MAJOR,toLabel({datum:t,data:n,scale:r}){const i=e.layoutService.meta.isTime?r.formatter():e.chart.formatter(I5.FORMATTER.MINOR),o=e.chart&&e.chart.brushSelectionIncludeMax;return`${t!==Math.max(...n)||o?"":"<"}${i(t)}`}},e):{components:[],interactions:[]}}(e),d=I4(e);return{components:[...s.components,...l.components,...c.components,...d.components,...u.components],gestures:[...l.interactions,...s.interactions,...c.interactions,...d.interactions,...u.interactions]}}function R4({layoutService:e,viewModel:t,dockService:n}){var r;const{meta:i}=e;if(!i.isStackedByDimension||i.isContinuous)return!1;const{fields:o}=t,a=e.getLayoutValue("components",null),s=a?a.filter((e=>"bar"===e.key))[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:o.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.map((e=>e.qMaxPos)).reduce(((e,t)=>e+t),0).toFixed(13)))(e.qSubNodes)},end:{value:e=>Number(e.qMaxPos.toFixed(13))}}},{field:o.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.map((e=>e.qMinNeg)).reduce(((e,t)=>e+t),0).toFixed(13)))(e.qSubNodes)},end:{value:e=>Number(e.qMinNeg.toFixed(13))}}}]},settings:{major:{scale:I5.SCALE.MAIN.MAJOR},minor:{scale:I5.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:null!=s&&null!==(r=s.style)&&void 0!==r&&r.width&&s.style.width>0?s.style.width:.7,fill:()=>({type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]})},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:t.animations.enabled,trackBy:HD.shadowBars.trackBy,compensateForLayoutChanges:HD.bars.compensateForLayoutChanges}}}const P4={min:"Min",max:"Max"};function z4(e,t,n){const r=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?T3(e,t)||q3(e,t):n===D3?T3(e,t):q3(e,t)}(Number(r.toFixed(13)),e,t)}function F4(e,{barComponent:t,type:n,isStacked:r}){var i,o,a,s;const{viewCache:l,layoutService:c,dockService:u}=e,d=l.get("minorMinMax"),f=n===D3;if(function(e,t){return!e["hasOther"+P4[t]]}(d,n)){if(function(e,t){return!e["hasExplicit"+P4[t]]}(d,n))return!1;if(z4(d,n,f))return!1}if(function(e,t,n){const r=n?e=>e<0:e=>e>0;return e["hasExplicit"+P4[t]]&&r(e["explicit"+P4[t]])}(d,n,f))return!1;let h="end";r&&(h=f?"sumOfPositives":"sumOfNegatives");const p=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.chart.scale(I5.SCALE.MAIN.MINOR)[n]())),m=f?e=>e.datum[h].value>p():e=>e.datum[h].value<p(),g=I5.COMPONENT.BAR,y=e.layoutService.getLayoutValue("components",[]),v=y?y.filter((e=>e.key===g))[0]:null;return{type:"box-sliced-hat",key:"sliced-hat-"+n,layout:{dock:f?u.meta.minor.end:u.meta.minor.start},data:t.data,brush:t.brush,settings:{orientation:t.settings.orientation,major:t.settings.major,minor:t.settings.minor,hat:ny({},t.settings.box,{fill:c.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:m,width:S3({layoutService:e.layoutService,discrete:e.discrete,componentKey:g}),strokeWidth:null!=v&&null!==(i=v.style)&&void 0!==i&&i.strokeWidth?w3.BAR.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:w3.BAR.STROKE.WIDTH.NONE,stroke:null!==(o=null==v||null===(a=v.style)||void 0===a||null===(s=a.strokeColor)||void 0===s?void 0:s.color)&&void 0!==o?o:w3.BAR.STROKE.COLOR})}}}function j4(e,t){var n;let r;return r=e.isContinuous?1:.7,!e.isContinuous&&null!=t&&null!==(n=t.style)&&void 0!==n&&n.width&&t.style.width>0?t.style.width:r}function B4(e,{collectionKey:t},n){const{meta:r}=e.layoutService,{fields:i}=e.viewModel,o=r.isStackedByDimension&&!r.isContinuous?"qValue":"qNum",a=e=>"NaN"===e[o]?0:e[o];function s(t){const n=e.ds.field(t).raw(),r=e.ds.field(t).formatter(),i=!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType);return{field:t,reduceLabel:"none",value:a,label:e=>i?(e=>"NaN"===e[o]?"-":r(e[o]))(e):e.qText}}const l=r.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;function c(e){return{field:e,reduceLabel:"none",reduce:"first",value:l}}const u={key:t,data:{extract:i.minor.map(((t,o)=>{const a=e.colorService.getMain().getDatumProps(o),l=e.colorService.getMini().getDatumProps(o),u=a[Object.keys(a)[0]],d=null==u?void 0:u.field,f=d?{field:d,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,h={field:r.isDimensionless?t:i.major,props:{...e.viewModel.selectionDimensionProp(),axisSelectionDimension:{field:0},start:0,end:s(t),null:c(t),segment:r.isStacked?s(t):void 0,group:r.isGroupedByDimension?{field:i.majorGroup}:void 0,stack:r.isStacked?{field:i.majorStack}:void 0,measureIndex:r.isGroupedByDimension||r.isStackedByDimension?void 0:o,timeStart:r.isContinuous?{field:i.majorNumeric}:void 0,timeEnd:r.isContinuous?{field:i.majorNumeric}:void 0,fillTooltip:f,...a,...l,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${o}`},customTooltipAttrExps:0!==r.dimensionCount?n2.getNode(e.layoutService.getLayout(),r):void 0}};return r.isDimensionless&&(h.value=o),void 0!==n&&(h.source=n),my(h.props),h}))}};return r.isStacked&&(u.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),u}function H4({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:r}=e,{fields:i}=t;if(!r.isStacked)return!1;let o;return o=r.isStackedByMeasure?function(e,t){const n={field:0,props:{sumOfPositives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},null:{fields:t.minor.map((e=>({field:e}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"}}};if(e.isContinuous){const e={field:t.major,value:e=>e.qNum,reduceLabel:"none"};n.props.timeStart=e,n.props.timeEnd=e,n.value=e=>e.qNum}return n}(r,i):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:e=>Number(e.qMaxPos.toFixed(13))},sumOfNegatives:{value:e=>Number(e.qMinNeg.toFixed(13))},null:{value:e=>{const{qSubNodes:t=[]}=e;return t.every((e=>"NaN"===((e.qSubNodes||[])[0]||{}).qValue))}}}};const n={field:t.majors[0],value:e=>e.qNum,reduceLabel:"none"};return{field:t.majorStack,trackBy:e=>e.qNum,reduce:e=>e[0],props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t>0?e+t:e),0)},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t<0?e+t:e),0)},timeStart:n,timeEnd:n}}}(r,i),{key:n,data:{extract:o}}}const V4="main-collection",W4="stack-total-collection";const U4="mini-collection",$4="mini-stack-collection",Y4="mini-continuous-collection",K4="miniCube",G4=(e,t)=>{const n=(e=>{const t=[B4(e,{collectionKey:V4})];return e.layoutService.meta.isStacked&&t.push(H4(e,{collectionKey:W4})),t})(t),r=((e,t)=>{const n=[];return K0({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(B4(t,{collectionKey:Y4},K4)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:i}}=e;return{key:t,data:{extract:r.minor.map(((e,t)=>{const o={end:{field:e,reduceLabel:"none"},...i.isStackedByMeasure&&!i.isReduced?n.getMain().getDatumProps(t):{}};return i.isContinuous&&(o.timeStart={field:r.major,value:e=>e.qNum},o.timeEnd=o.timeStart),{source:"miniCube",field:r.major,props:o}})),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:$4})):n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:i}}=e;return{key:t,data:{extract:r.minor.map(((e,t)=>{const o=i.isReduced?{}:n.getMain().getDatumProps(t),a={end:{field:e},start:0,group:{field:r.majorGroup},measureIndex:t,...o},s={source:"miniCube",field:i.isDimensionless?e:r.major,props:a};return i.isDimensionless&&(s.value=t),s}))}}}(t,{collectionKey:U4}))),n})(0,t);return n.concat(r)};function X4(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:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function J4({layout:e,component:t},n,r){if(!H3(e,n))return!1;const{layoutService:i,chart:o,dockService:a,viewModel:s,themeService:l,styleService:c}=n,{meta:u}=i,d=!B3(e,n),f=l.getStyles(),h=c.label.getStyle();function p(e){const t=o.formatter(I5.FORMATTER.MINOR);return t?t(e):e}const m={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":p(e.data.sumOfPositives.value)},simplifiedPlacements:X4("outside",d,u.isContinuous),style:f.label.value},g={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":p(e.data.sumOfNegatives.value)},simplifiedPlacements:X4("opposite",d,u.isContinuous),style:f.label.value};return{key:"stack-total-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>j3(e.data.sumOfPositives.value,a.meta.minor.orientation,r),labels:[z3(ny(n,m)),z3(ny(n,g))],fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily,linkData:HD.labels.linkData}}}]},animations:{enabled:s.animations.enabled,trackBy:HD.labels.trackBy,compensateForLayoutChanges:HD.labels.compensateForLayoutChanges}}}function Z4(e,t,n){const r=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&r.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),r}function Q4({layout:e,type:t},n){const{layoutService:r,viewCache:i,themeService:o,styleService:a}=n,{meta:s}=r,{isStacked:l}=s;if(!l&&!B3(e,n)||l&&!H3(e,n))return!1;const c=i.get("minorMinMax");if(!c.hasExplicitMinMax||t===D3&&0===c.max||t===N3&&0===c.min)return!1;if(!O3(t===D3?c.implicitMax:c.implicitMin,c,t))return!1;const u=o.getStyles(),d=a.label.getStyle();let f=e=>e.data.end.label;s.isStacked&&(f=t===D3?function(e){if(O3(e.data.sumOfNegatives.value,c,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,r=n.chart.formatter(I5.FORMATTER.MINOR);return r?r(t):t}return""}:function(e){if(O3(e.data.sumOfPositives.value,c,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,r=n.chart.formatter(I5.FORMATTER.MINOR);return r?r(t):t}return""});const h={label:f,simplifiedPlacements:Z4("outside",true,s.isContinuous),styles:u},p={label:f,simplifiedPlacements:Z4("opposite",true,s.isContinuous),styles:u},m=[z3(ny(n,h)),z3(ny(n,p))],g="vertical"===n.dockService.meta.minor.orientation?"down":"right",y={component:`${I5.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:g,labels:m,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily,linkData:HD.labels.linkData}}};return{key:"bar-oob-labels-"+t,type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[y]},animations:{enabled:n.viewModel.animations.enabled,trackBy:HD.labels.trackBy,compensateForLayoutChanges:HD.labels.compensateForLayoutChanges}}}function e6(e){return"all"===e||"title"===e}function t6(e,t,n){if(!e6(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const{actions:r,properties:i}=t,o={hyperCube:e.qHyperCube,hyperCubeDef:i&&i.qHyperCubeDef,isDimension:!0,disabled:()=>{var e;return!(null!=r&&null!==(e=r.interact)&&void 0!==e&&e.enabled())},model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections,supportConditional:t.flags.isEnabled("IM_1579_HIDE_DIM_MEA")},a=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleDimensions&&(o.padding="0",o.minWidth="auto"),{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:h3[t.dockService.meta.major.orientation+"DimensionAxisTitle"].minimumLayoutMode,dock:t.dockService.meta.major.dock},settings:o,style:a}}function n6(e,t,n){if(!e6(e.measureAxis.show))return!1;const{layoutService:r,actions:i}=t,o=t.properties,a=r.getLayoutValue("qUndoExclude")?"qUndoExclude.qHyperCubeDef":"qHyperCubeDef",s={hyperCube:r.getHyperCube(),hyperCubeDef:HE(o,a),isDimension:!1,disabled:()=>!i.interact.enabled(),model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections,supportConditional:t.flags.isEnabled("IM_1579_HIDE_DIM_MEA")},l=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleMeasures&&(s.padding="0",s.minWidth="auto"),{key:"measure-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},settings:s,style:l}}function r6({environment:e,rtl:t,refLineModel:n,layoutService:r,colorService:i,dockService:o,themeService:a,viewModel:s,chart:l}){const{theme:c,localeInfo:u}=e,d={resolveUIColor:i.getMain().getPaletteColor},f=a.getStyles(),h=s.animations.enabled;return[YD({refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:I5.SCALE.MAIN.MINOR,axis:"horizontal"===o.meta.major.orientation?"y":"x",key:I5.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:h3.refLines.minimumLayoutMode}),YD({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:I5.SCALE.MAIN.MAJOR,axis:"horizontal"===o.meta.major.orientation?"x":"y",rtl:t,key:I5.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:I5.COMPONENT.BAR,minimumLayoutMode:h3.refLines.minimumLayoutMode}),...GD({refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.minor.opposite,scale:I5.SCALE.MAIN.MINOR,style:f,formatter:I5.FORMATTER.MINOR,theme:c,localeInfo:u,rtl:t,key:I5.COMPONENT.MEASURE_REF_LINE_LABEL}),...GD({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.major.opposite,scale:I5.SCALE.MAIN.MAJOR,style:f,theme:c,localeInfo:u,rtl:t,key:I5.COMPONENT.DIMENSION_REF_LINE_LABEL})]}const i6=(e,t,n)=>{var r;const{layoutService:i,dockService:o,colorService:a,chart:s,actions:l,discrete:c,continuousDataModel:u,reducedDataModel:d,viewModel:f,viewState:h,viewCache:p,themeService:m,refLineModel:g,pluginService:y,rtl:v,logicalSize:b,trendLineModel:x}=t,{localeInfo:w}=n,S=X3({layout:e},t,v);if(S&&"center"===S.layout.dock)return{components:[S]};const k=A4(e,t,{localeInfo:w,rtl:v}),M=!(null!=l&&null!==(r=l.interact)&&void 0!==r&&r.enabled()),C=a.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:h,chart:s,styleReference:"object.barChart",rtl:v,settings:{item:{shape:{size:10}}}},{actions:l,navigationDisabled:M}),E=C.components[0];if(E){const{dock:e}=E.layout;if(k.fillRange&&(["right","left"].includes(e)||v)&&(k.fillRange.invert=!0),"legend-seq"===E.type&&void 0!==f.selectionDimensionIdx&&k.fillRange&&k.fillRange.min<k.fillRange.max){const e=f3({eventName:"legendRange",key:"legendRangeBrush",targets:[E.key],fillTargets:[E.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:E.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:()=>{l.select.emit("end","legendRange")}},t);C.components.push(...e.components),C.interactions.unshift(...e.interactions)}}else k.fillRange&&v&&(k.fillRange.invert=!0);const T=((e,{componentKey:t,collectionKey:n})=>{var r,i,o,a;const{meta:s}=e.layoutService;let l,c;s.isGroupedByDimension?l=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:s.isGroupedByMeasure&&(l=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);let u=2;s.isContinuous?(c={start:"timeStart",end:"timeEnd"},u=M3(e,t)):s.isStacked&&(c="stack");const d=s.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,f=e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)},h=e.layoutService.getLayoutValue("components",null),p=h?h.filter((e=>e.key===t))[0]:null;return{key:t,type:"box",data:{collection:n},preferredSize:s.isContinuous?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:s.isContinuous||d?0:2,stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:I5.SCALE.MAIN.MAJOR,fn:l,ref:c},minor:{scale:I5.SCALE.MAIN.MINOR},orientation:e.dockService.meta.minor.orientation,box:{width:S3({layoutService:e.layoutService,discrete:e.discrete,componentKey:t}),minWidthPx:u,fill:e.colorService.getMain().getColor(),opacity:e=>f(e)?0:void 0,minHeightPx:function(e){return s.isStacked?.1:f(e)?.01:.3},strokeWidth:null!=p&&null!==(r=p.style)&&void 0!==r&&r.strokeWidth?w3.BAR.STROKE.WIDTH[p.style.strokeWidth.toUpperCase()]:w3.BAR.STROKE.WIDTH.NONE,stroke:null!==(i=null==p||null===(o=p.style)||void 0===o||null===(a=o.strokeColor)||void 0===a?void 0:a.color)&&void 0!==i?i:w3.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:e.viewModel.animations.enabled,isMainComponent:!0,trackBy:HD.bars.trackBy,compensateForLayoutChanges:HD.bars.compensateForLayoutChanges}}})(t,{componentKey:I5.COMPONENT.BAR,collectionKey:I5.COLLECTION.MAIN}),q=((e,{componentKey:t,collectionKey:n})=>{const{meta:r}=e.layoutService;if(!r.isStacked)return!1;let i=2;r.isContinuous&&(i=M3(e,t));const o=e.layoutService.getLayoutValue("components",null),a=o?o.filter((e=>e.key===t))[0]:null,s={key:t,type:"box",data:{collection:n},settings:{major:{scale:I5.SCALE.MAIN.MAJOR},minor:{scale:I5.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:j4(r,a),minWidthPx:i,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth: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}},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:.3}}}}]}};return r.isContinuous&&(s.settings.major.ref={start:"timeStart",end:"timeEnd"}),s})(t,{componentKey:I5.COMPONENT.STACK_TOTAL_BAR,collectionKey:I5.COLLECTION.STACK_TOTAL}),D=_4(t,n,f.selectionDimensionIdx),{isStacked:N}=i.meta;let A;A=d.mode.isContinuous?I5.COLLECTION.MINI_CONTINUOUS:N?I5.COLLECTION.MINI_STACK:I5.COLLECTION.MINI;const O=N?q:T,L=o4(0,t),I=[...L,F4(t,{barComponent:O,type:"max",isStacked:N}),F4(t,{barComponent:O,type:"min",isStacked:N}),I3(t,{barComponent:O,type:"max",isStacked:N}),I3(t,{barComponent:O,type:"min",isStacked:N}),R3(t,{chart:s,barComponent:O,type:"max",scales:k,collectionKey:N?I5.COLLECTION.STACK_TOTAL:I5.COLLECTION.MAIN}),R3(t,{chart:s,barComponent:O,type:"min",scales:k,collectionKey:N?I5.COLLECTION.STACK_TOTAL:I5.COLLECTION.MAIN}),...x3(e,t,v,!!L[0]),T,q,R4({layoutService:i,viewModel:f,layout:e,dockService:o}),t6(e,t,v),n6(e,t,v),...r6({environment:n,rtl:v,refLineModel:g,layoutService:i,colorService:a,dockService:o,themeService:m,viewModel:f,chart:s}),ek({viewState:h,viewCache:p,layoutService:i,dockService:o,rtl:v}),p4(T,t,{collectionKey:A}),G0({layoutService:i,dockService:o,discrete:c,continuousDataModel:u,viewState:h,viewCache:p,themeService:m,rtl:v,deviceType:n.deviceType}),...v5({majorScale:I5.SCALE.MAIN.MAJOR,minorScale:I5.SCALE.MAIN.MINOR,tooltipOverlay:I5.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{layoutService:i,trendLineModel:x,dockService:o,animationsEnabled:f.animations.enabled}),...C.components,W3({layout:e,component:I5.COMPONENT.BAR,minorScale:k.minor},t,v),J4({layout:e,component:I5.COMPONENT.STACK_TOTAL_BAR},t,v),Q4({layout:e,component:"bar-oob-max",type:"max"},t),Q4({layout:e,component:"bar-oob-min",type:"min"},t),...D.components,$3(0,{...t,coloring:a.getMain().getSettings()},v),K3(0,{...t,coloring:a.getMain().getSettings()},v),(!1!==e.showDisclaimer||!t.flags.isEnabled("SHOW_DISCLAIMER"))&&S,S5({tooltip:I5.COMPONENT.TREND_LINES_TOOLTIP,formatter:I5.FORMATTER.MINOR,majorScale:I5.SCALE.MAIN.MAJOR},t,{rtl:v})].filter(Boolean);!function(e){if(e&&0!==e.length)for(let t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(I);return{interactions:f4(t,{rtl:v,hammer:{gestures:[...C.interactions,...D.gestures].sort(((e,t)=>(t.prio||0)-(e.prio||0)))}}),scales:k,palettes:a.getMain().getPalettes(),components:y.extendComponents(I),strategy:cy(0,{logicalSize:b,minCenterRatio:0}),formatters:J3(t,k),collections:G4(0,t)}};function o6({picasso:t,chart:n,services:r,environment:i,viewState:o,viewCache:a,bootstrapped:s}){const{width:l,height:c}=e.useRect(),u=e.useModel(),d=e.useSelections(),f=e.useOptions(),[h,p]=e.useState(),[m,g]=e.useState(),[y,v]=e.useState(),[b,x]=e.useState(),w=e.useApp();function S(){if(!n.layoutComponents)return Promise.resolve();const{discrete:e,layoutService:s,viewModel:l}=r;a.set("isPreRender",!0);const c=function(e={}){const{selectionService:s,refLineModel:l,discrete:c,reducedDataModel:p,continuousDataModel:m,trendLineModel:g,pluginService:y,colorService:v,viewModel:b,dockService:x,themeService:S,customTooltipModel:k,layoutService:M,logicalSize:C,styleService:E}=r,T=s.custom.getActions(),q=t.data("q")(h.prepPicassoDataSet()),D={picasso:t,ds:q,rtl:"rtl"===(null==f?void 0:f.direction),model:u,app:w,chart:n,actions:T,localeInfo:i.localeInfo,logicalSize:C,flags:i.flags,translator:i.translator,selections:d,isLocked:s.getIsSelectionLocked,viewCache:a,viewState:o,layoutService:M,dockService:x,viewModel:b,colorService:v,selectionService:s,themeService:S,trendLineModel:g,discrete:c,continuousDataModel:m,reducedDataModel:p.model(),customTooltipModel:k,debouncer:$E,refLineModel:l,pluginService:y,styleService:E,...e};return i6(M.getLayout(),D,i)}(m);h.extractDataPages(),n.layoutComponents({settings:c,data:y}),a.set("isPreRender",!1),h.insertDataPages(),l.animations.hasSlicedHats=c.components.filter((e=>"box-sliced-hat"===e.type)).length>0;const p=[];return 1!==c.components.length&&s.meta.isDiscrete&&p.push(e.command.initialize()),Promise.all(p)}const[[k,M]=[]]=e.usePromise((()=>{var e;if(!(t&&n&&r&&i&&o&&a&&s))return Promise.resolve();const{layoutService:l,selectionService:c,refLineModel:u,discrete:d,continuous:f,reducedDataModel:h,continuousDataModel:p,trendLineModel:m,legendLayoutService:g,colorService:y,pluginService:v,viewModel:b}=r;if(null==c||null===(e=c.custom)||void 0===e||!e.getActions())return Promise.resolve();const w=()=>{x(Date.now()),b.animations.isPartialUpdating=!0};o.onChanged("scrollOffset",(()=>{g&&g.setDataPages([d.query.getCurrentDataPage()]),u&&u.update(),w()})),o.onChanged("legendScrollOffset",w),o.intercept("zoom",f.event.onZoomIntercept({viewCache:a})),o.onChanged("zoom",f.event.onZoomChange({layoutService:l,continuousDataModel:p},w)),c.setLayout(l.getLayout());const S=[];l.meta.isContinuous&&(p.update(l.getLayout()),S.push(p.initialFetch())),m.command.update(),S.push(h.fetch().then((({reducedCube:e})=>{h.update(e)}))),S.push(Promise.resolve({properties:s.properties}));return Promise.all(S).then((e=>Promise.all([v.initialize(),y.initialize(),a3({reducedDataModel:h,layoutService:l,continuousDataModel:p,trendLineModel:m})]).then((t=>[e,t.pop()]))))}),[s]);e.useEffect((()=>{var e;if(null==r||null===(e=r.colorService)||void 0===e||!e.getMain()||!M)return;const{layoutService:t,selectionService:n,reducedDataModel:o,continuousDataModel:s,trendLineModel:l,legendLayoutService:c,colorService:u,viewModel:d}=r;a.set("minorMinMax",M);const f=t.getHyperCube(),h=t.meta.isContinuous?s.getInitialCube():o.model().cube,{field:m}=u.getMain().getSettings(),y=!t.meta.isContinuous&&(o.model().mode.isReduced||t.meta.isStacked)&&c,v=y?c.getHyperCube():void 0;n.setBrushAliases({colorField:m,useLegendCube:y,legendAlias:"legendCube/"+m});const b=function({mainCube:e,miniCube:t,legendCube:n,localeInfo:r,layoutService:i,viewModel:o,trendLineModel:a}){const s=i.refs.dataPages.split(".").pop();let l=[],c=[];const u=i.meta.isContinuous?[{key:o.fields.majorNumeric,from:i.meta.isStackedByDimension?o.fields.majorStack:o.fields.major,override:{value:e=>e.qNum}}]:void 0;return{prepPicassoDataSet:()=>({key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}}),prepPicassoData(i){const o=[{type:"q",key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}},{type:"q",key:"miniCube",data:t,config:{localeInfo:r,virtualFields:u}},...i];return n&&o.push({type:"q",key:"legendCube",data:n,config:{localeInfo:r,virtualFields:u}}),a.query.hasTrendLines()&&o.push({key:"trend",data:a.query.getData()}),o},extractDataPages(){l=e[s],c=t.qDataPages,e[s]=[],t.qDataPages=[]},insertDataPages(){e[s]=l,t.qDataPages=c}}}({mainCube:f,miniCube:h,legendCube:v,localeInfo:i.localeInfo,layoutService:t,viewModel:d,trendLineModel:l}),x=k[k.length-1];g({localeInfo:i.localeInfo,...x}),p(b)}),[M]),e.useEffect((()=>{if(!r||!m||!h)return;const e=r.colorService.getMain();if(!e)return;h.prepPicassoDataSet();const t=h.prepPicassoData(e.getData());v(t)}),[m]),e.useEffect((()=>{var e;null!=r&&null!==(e=r.colorService)&&void 0!==e&&e.getMain()&&n.update&&h&&y&&S().then((()=>{const{layoutService:e,discrete:t,legendLayoutService:i}=r;if(i){1===e.getLayoutValue("scrollStartPos")&&i.setDataPages([t.query.getCurrentDataPage()])}n.update(),HD.cacheProperties({viewCache:a,layout:e.getLayout()})}))}),[y]),e.useEffect((()=>{if(!(l&&c&&h&&null!=n&&n.update&&null!=r&&r.colorService.getMain()))return;const{viewModel:e}=r;e.animations.isSizeChanging=!0;const{dockService:t,themeService:o}=r;t.update({width:l,height:c}),o.setTheme(i.theme),S().then((()=>{n.update&&n.update()}))}),[l,c]),e.useEffect((()=>{if(null==n||!n.update)return;const{viewModel:e}=r;n.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]}),e.animations.isPartialUpdating=!1}),[b])}function a6({env:t,services:n}){const r=e.useApp(),i=e.useModel(),o=e.useRenderState(),[a,s]=e.usePromise((async()=>{if(!t||!n)return Promise.resolve();const{flags:e}=t,{layoutService:a}=n,{isSnapshot:s,isStacked:l,isContinuous:c}=a.meta,u=[];return s||u.push(i.getEffectiveProperties()),Promise.all(u).then((async t=>{const n=t[0]||void 0;if(e.isEnabled("IM_1579_HIDE_DIM_MEA")&&null!=n&&n.qHyperCubeDef){const e=a.getLayout(),t=ny(!0,{},n);if((({properties:e,layout:t,isStacked:n,isContinuous:r,model:i})=>{var o,a;const s=t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})),l=t.qHyperCube.qMeasureInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})),c=ny(!0,{},e);return((e,t,n)=>{const{color:{mode:r}}=n;e.length>1&&n.color?n.color.persistent=!0:"byDimension"===r&&t.length>1?n.color.mode="byMultiple":"byExpression"===r&&0===t.length?n.color.mode="primary":0===e.length&&t.length>0&&(n.color.byMeasureDef=void 0,n.color.byDimDef=void 0,1===t.length&&(n.color.mode="primary"))})(s,l,e),s.length>1&&n&&!r&&"S"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="K"),s.length<2&&"K"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="S"),null===(o=i.colorSupport)||void 0===o||null===(a=o.colorByUpdater)||void 0===a||a.call(o,e,"qHyperCubeDef.",t),JSON.stringify(c)!==JSON.stringify(e)&&(e.hash=Math.random(),!0)})({properties:n,layout:e,isStacked:l,isContinuous:c,model:i}))return o.pending(),(e=>{var t;return!(!e||e.qHasSoftPatches||e.qExtendsId||!(((null===(t=e.qMeta)||void 0===t?void 0:t.privileges)||[]).indexOf("update")>-1))})(e)?i.setProperties(n).then((()=>{r.clearUndoBuffer()})):void await((e,t,n)=>{if(!e)return Promise.resolve();let r=ak.generate(t,n);return ny(!0,t,n),r&&r.length?(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0)):Promise.resolve()})(i,t,n);o.restore()}return{properties:n}}))}),[t,n]);if(s&&!s.isHandled)throw s;return a}var s6={exports:{}};!function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=u(d,n),d!==(i=u(t,n))&&(p&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},c(d,{name:n,newValue:e(p,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=u(d,n),d!==(i=u(t,n))&&(p&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},c(d,{name:n,newValue:e(p,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t,n){n.r(t);var r=n(0),i=n.n(r),o=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},a=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function v(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=y(u(r[0],i),p(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),h=p(0),m=p(1),g=y(d,h),v=y(f,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function b(e){return"".concat(e,"(")}function x(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var w={isFullRange:d,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(h(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=p(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=p(0),f=p(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:b,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:v,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:h,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=x({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function S(e){return(S="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)}var k=i.a.bind(null,!0),M={},C=Array.isArray;function E(e){return null!=e&&!Array.isArray(e)&&"object"===S(e)}function T(e){return void 0===e}function q(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function D(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}})),e}function N(e,t){var n=!0;if(E(e)&&E(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){N(e[r],t[r])||(n=!1)})),n);if(C(e)&&C(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!N(e[r],t[r]))return!1;return!0}return e===t}M.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?k({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);N(o,a)||q(t,i)||(T(a)?r.push({op:"add",path:s,value:o}):E(o)&&E(a)?r=r.concat(M.generate(a,o,s)):C(o)&&C(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(N(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(M.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){T(t[i])&&!q(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},M.apply=function(e,t){t.forEach((function(t){var n,r=D(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(C(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(C(o)&&C(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(E(o)&&E(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!q(n,e)&&delete n[e]})),k(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var c=D(e,t.from);C(r)?r.splice(+i,0,c.splice(+a,1)[0]):(r[i]=c[a],delete c[a])}else"remove"===t.op&&(C(r)?r.splice(+i,1):delete r[i])}))},M.clone=function(e){return k({},e)},M.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},M.updateObject=function(e,t){Object.keys(e).length?M.apply(e,M.generate(e,t)):k(e,t)};var A=M,O=function(e,t,n){if(!e)return Promise.resolve();var r=A.generate(t,n);return i()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()},L="accumulation";function I(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function _(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},P={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),f=w.getAboveComp(n,l,u,d),h=w.getRangeComp("RangeSum",f);if(w.needDimension({modifier:n,properties:r,layout:i})){var p=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(h,p,m);h=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return h},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,R)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=I(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=I(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(L))return!1;var o=I(t,e);return o&&!o.disabled}}}},z="movingAverage";function F(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function j(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},H={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:i,layout:o}));var u=a(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=w.getNumStepComp(r,c),p=w.getAboveComp(r,c,f,h);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",p);else{var m=w.getRangeComp("RangeSum",p),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(w.needDimension({modifier:r,properties:i,layout:o})){var v=w.getDimComp(u,1),b=w.getDimComp(u,0),x=w.getAggrComp(y,v,b);y=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,B)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(j(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(j(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=F(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=F(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=F(t,e);return o&&!o.disabled}}}},V="difference";function W(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===V)return n[r]}function U(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===V)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Y={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(c,1),p=w.getDimComp(c,0),m=w.getAggrComp(f,h,p);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys($).forEach((function(t){void 0===e[t]&&(e[t]=$[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(U(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(U(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(U(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=W(t,e);return o&&!o.disabled}}}},K={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},G={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},X="normalization";function J(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function Q(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:G.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:G.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:G.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,n){if(e<2){var r=Q(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=Q(t,1);t.splice(r,1)}return t}(J(e,r).selectionScope,o)}function te(e,t,n){var r=[{value:K.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:K.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:K.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Q(t,0);t.splice(r,1)}return t}(J(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:G.DISREGARD_ALL_DIMENSIONS,selectionScope:K.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function ie(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=re(t),l=ie(t,n,r),c=""===s&&""===l?"":s||l,u=oe(i,o),d=ae(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Z(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:K.DISREGARD_SELECTION,options:function(n){return te(n,t,e)}},field:{refFn:function(t){return"".concat(Z(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return J(t,e).selectionScope===K.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Z(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return J(t,e).selectionScope===K.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Z(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:G.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return(J(t,e).dimensionalScope||0)===G.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:re,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ce={initBase:function(e,t){(t||ce.isValid(e))&&(o(e,"qDef.base.qDef",a(e,"qDef.qDef")),o(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),o(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),o(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ce.isValid(e)&&(o(e,"qDef.qDef",a(e,"qDef.base.qDef")),o(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),o(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),o(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&o(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},ue=ce;function de(e){return(de="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)}var fe={accumulation:P,movingAverage:H,difference:Y,normalization:se},he=(t.default={modifiers:fe,apply:pe,applyModifiers:me,cleanUpMeasure:ge,destroy:function(e){e&&he[e.id]&&he[e.id].masterItemSubscriber&&(he[e.id].masterItemSubscriber&&he[e.id].masterItemSubscriber.unsubscribe(),delete he[e.id])},hasActiveModifiers:ye,getActiveModifier:ve,initBase:ue.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return fe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return fe[e]&&fe[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=we(e);qe({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Le({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:be},{});function pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,o=void 0!==r&&r,s=e.masterItem;he[t.id]=he[t.id]||{isFirstTime:!0};var l=he[t.id].isFirstTime;if(he[t.id].isFirstTime=!1,n&&"object"===de(n))return me({model:t,properties:n});var c=t?t.layout:void 0,u=a(c,"qSelectionInfo.qInSelections");if(o||u)return Promise.resolve(!1);var d=a(c,"qHyperCube.qMeasureInfo"),f=he[t.id].lastReloadTime;if(he[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:d,layout:c})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Te({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:d,layout:c,model:t,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return qe({modifiers:we(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:d,layout:c,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=i()(!0,{},e);ke(n);var r=Ie(n);return De({model:t}).then((function(i){return Ne({libraryIds:r,model:t}).then((function(r){return h&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Te({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===de(e)&&!e.disabled){if(n++,"object"!==de(fe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=fe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ce(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),me({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===de(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Ie(n);return _e({model:t,libraryIds:r}).then((function(){var e=i()(!0,{},n);return xe(n).forEach((function(e){return ge(e)})),Oe({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function me(e){var t=e.model,n=e.oldProperties,r=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?i()(!0,{},r):r),ke(r);var f=Ie(r);return _e({model:t,libraryIds:f,masterItem:c}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:n}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=o?void 0:Ie(n);return De({model:r,dimensionAndFieldList:s}).then((function(e){return Ne({libraryIds:l,model:r,libraryItemsProps:o}).then((function(r){t.forEach((function(t){qe({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,o=e.dimensionAndFieldList,s=0;ue.isValid(t)||ue.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===de(e)&&!e.disabled){if(s++,"object"!==de(fe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");fe[e.type].initModifier(e);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=fe[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:o}):function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList;"function"==typeof fe[n.type].updateModifier&&fe[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=fe[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:o}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||be(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&be(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),Me(t)):ge(t)}))}))}))}({measures:o,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Oe({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=we(e);return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&!fe[e.type]}))}(e)?ue.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Me(e)}function ye(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return qe({modifiers:we(e),properties:n,layout:r})}))}function ve(e){var t=we(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(fe[r.type]&&!r.disabled)return r}}function be(e){var t=ve(e);return!t||fe[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function we(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Se(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function ke(e){xe(e).forEach((function(e){return function(e){var t=ve(e);t&&(void 0!==t.outputExpression&&Se(t)!==e.qDef.qDef?delete e.qDef.base:!ue.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Me(e){var t=we(e);Array.isArray(t)&&t.forEach((function(t){"object"===de(t)&&(t.disabled||!fe[t.type]&&Se(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ce(e){return e.base||e.qDef&&e.qDef.base}function Ee(e){var t=Ce(e);return e.qLibraryId||t&&t.qLibraryId}function Te(e){var t=e.measure,n=e.properties,r=e.layout;return!Ee(t)&&qe({modifiers:we(t),properties:n,layout:r})}function qe(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==de(e)||e.disabled||!fe[e.type])&&(void 0===i[e.type]&&(i[e.type]=fe[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function De(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));r.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return i}))}function Ne(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Ae(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Oe(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ae)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),Ae)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ae)!==JSON.stringify(a(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ae);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):O(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Le(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&fe[e.type]&&fe[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ie(e){var t=xe(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=we(t);if(qe({modifiers:r,properties:e})){var o=Ee(t);o&&n.push(o),i=i||Le({modifiers:r,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function _e(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(he[t.id].masterItemSubscriber=he[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(e,n)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),o={},t.forEach((function(e){o[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){i[e]||o[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(u(e,"getMeasure"))})),Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return pe({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),he[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?r(n)+t:t}function i(e){return(i="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)}n.r(t);var o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u},f=n(1),h=n.n(f),p={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){h.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function m(e,t,n){var r,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(r=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function v(e,t){var n=y()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function b(e,t){return y()(!0,{},t,e)}function x(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var w=Math.pow(2,53)-1;function S(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E={importCommonProperties:function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=v(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=v(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=b(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=b(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=x(a.max,i.dimensions.length,w),l=x(a.min,i.dimensions.length,0);return{maxDimensions:x(o.max,s,w),minDimensions:x(o.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=y()(!0,{},n,i)).components&&(i.components=[]),i},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=S(i.qDimensions);i.qDimensions=[],a.forEach((function(e){i.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=M(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&h.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function T(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var q={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),p.addDimensions({exportFormat:i,qHyperCubeDef:l}),p.addMeasures({exportFormat:i,qHyperCubeDef:l}),p.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,p.copyProperties({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),p.updateLayoutExclude({exportFormat:i,properties:a}),r||p.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(m(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(m(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(m(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,h=e.isHCModifierSupported,p=void 0===h||h,m={qChildren:[]},g=E.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=E.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,w=b.minDimensions,S=b.maxMeasures,k=b.minMeasures,M=l.defaultDimension,C=void 0===M?E.getDefaultDimension():M,q=l.defaultMeasure,D=void 0===q?E.getDefaultMeasure():q;v.qDimensions.length=0,v.qMeasures.length=0,E.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:S,minMeasures:k})&&E.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:S,minMeasures:k,newHyperCubeDef:v}),E.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:w,newHyperCubeDef:v,defaultDimension:C}),E.addMeasures({exportFormat:t,maxMeasures:S,minMeasures:k,newHyperCubeDef:v,defaultMeasure:D}),E.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),E.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),E.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:v}),E.copyPropertyIfExist("qMaxStackedCells",y,v),E.copyPropertyIfExist("qNoOfLeftDims",y,v),E.copyPropertyOrSetDefault("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),E.copyPropertyOrSetDefault("qMode",y,v,"S"),E.copyPropertyOrSetDefault("qReductionMode",y,v,"N"),E.copyPropertyOrSetDefault("qSortbyYValue",y,v),E.copyPropertyOrSetDefault("qIndentMode",y,v),E.copyPropertyOrSetDefault("qShowTotalsAbove",y,v),E.importCommonProperties(g,t,r),m.qProperty=g;var N=o.getValue(u||{},"support.modifiers");return E.restoreMeasuresModifiers({measures:v.qMeasures,modifierTypes:N}),f&&T(m.qProperty,"storedFilters"),"S"===v.qMode&&p&&T(m.qProperty,"dynamicScript"),m}},D={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function N(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function A(e,t){return e.length!==t}var O={create:function(e,t){if(!e||!D[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(N(a,t,r,i),A(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},L={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},I={colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>0&&L.getNumMeasures(e)<=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>0},expression:function(e){return L.getNumMeasures(e)>=1}}},_={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},R={scatterplot:_,"sn-scatter-plot":_,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)<=1},expression:function(e){return L.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>=1},expression:function(e){return L.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumDimensions(e)>=1}}}};function P(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function z(e,t){var n=O.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){P(e,"qAttributeDimensions",n),P(e,"qAttributeExpressions",n)})),t.forEach((function(e){P(e,"qAttributeDimensions",n),P(e,"qAttributeExpressions",n)}))}function F(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function j(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;z(r,i);var l=r[r.length-1];if(l){var c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var h=O.create(O.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:h,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:h,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(h.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(h)):l.qAttributeExpressions.push(h)}}}function B(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(i=function(e,t){return t?e.qLibraryId:h.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return h.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var H={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function V(e,t,n,r){var i=n?"expression":t.type,o=e.color,a=o.mode,s=L.getItemLabel(t);switch(F(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||L.wrapFieldName(t.name),key:L.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&H.useMasterNumberFormat(o.formatting)}r||(o.auto=!1,o.mode=a)}function W(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=O.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return V(e,B("dimension",!!a,a||r)),!!a}function U(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&F(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=B("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,V(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&W(e,t))return;j({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}function $(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&F(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=B("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,V(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=O.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return V(e,B("measure",!!s,s||r[0])),!!s}(e,t))return;j({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}var Y={changeProperty:function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(R[t]||I).colorModeOptions||I.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},updateColorBy:function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"color.auto"),i=o.getValue(e,"".concat(t,"qDimensions"),[]),a=o.getValue(e,"".concat(t,"qMeasures"),[]),s=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?z(i,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:i})?U(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:r,colorMode:n,dimensions:i,measures:a,properties:e})?$(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),z(r,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},addColorByExpression:function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n}},K={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=q.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=O.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return O.moveByIdFromGroup(a,[],"qAttributeDimensions",c),O.moveByIdFromGroup(a,[],"qAttributeExpressions",c),O.moveByIdFromGroup(s,[],"qAttributeExpressions",u),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=q.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),h=o.getValue(d,"qHyperCubeDef.qDimensions",[]),p=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=Y.getCanColorBy(d,f),y=Y.shouldUpdateColorBy({canColorBy:g,autoColor:m,colorMode:p,dimensions:h});return g[p]?Y.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:d})&&Y.addColorByExpression(d):Y.switchToAutoColor(d),y&&Y.updateColorBy(d,"qHyperCubeDef."),Y.shouldSwitchToColorPersistent(d)&&Y.changeProperty(d,"color.persistent",!0),Y.deleteTotalMode(h),u}},G=["bar","marker","line"],X={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?T(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):T(n,"supportedAutoMinMax")||y()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),G.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}},J={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=K.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(m(s,"measureAxis.min","supportedAutoMinMax"),m(s,"measureAxis.max","supportedAutoMinMax")):(m(s,"measureAxis.min","unsupportedAutoMinMax"),m(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=K.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return X.handleAutoMinMax({initialProperties:n,properties:d}),X.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:d,measureType:a}),X.setInterColumnSortOrder(d.qHyperCubeDef),u}};function Z(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Q(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var c=Z(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Z(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},ne={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},quarantineAlternative:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})},unquarantineAlternative:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:q,colorChart:K,axisChart:J,quarantineProperty:m,unquarantineProperty:T,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:ne}}])}(s6);var l6=Wg(s6.exports);function c6(e,t){if("custom"===e.dimensionAxis.axisDisplayMode){const n=t.layout.qHyperCube.qMeasureInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2})).length,r=t.layout.qHyperCube.qDimensionInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2})).length,i=e.dimensionAxis.maxVisibleItems;i<1?e.dimensionAxis.maxVisibleItems=10:i>1e4/(r+n)&&(e.dimensionAxis.maxVisibleItems=Math.min(i,Math.floor(1e4/(r+n))))}}const u6=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],d6=(e,t)=>{var n,r,i,o,a;const s=null===(n=t.qHyperCube)||void 0===n||null===(r=n.qMeasureInfo)||void 0===r?void 0:r.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2})).length,l=null===(i=t.qHyperCube)||void 0===i||null===(o=i.qDimensionInfo)||void 0===o?void 0:o.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2})).length,c="grouped"===(null===(a=e.barGrouping)||void 0===a?void 0:a.grouping)&&l>0&&s+l>2;return by.continuous(t)?1:c?.9:.7},f6=(e,t,n)=>{const r=e+".fontFamily",i=e+".fontSize";return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:e+".color",defaultValue:()=>({color:n.getStyle("object.barChart",e,"color")})}}}}};function h6(e,t,n){const r=function(e){var t=e.theme,n=e.translator,r=e.config,i=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:void 0===r?{}:r}),o=i.id,a=i.paths,s={};a.forEach((function(e){for(var r=e.split("."),i=s,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=FD({theme:t,translator:n,id:o,path:e}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var l=function(e){for(var t=e.split("."),n=s,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return s.getDefaultValue=function(e){return l(e).getDefaultValue()},s.getOptions=function(e){return l(e).getOptions()},s}({theme:e,translator:n,config:{id:"barChart",paths:["axis.title","axis.label.name","label.value"]}});return{component:"styling-panel",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==t?void 0:t.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),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:Object.keys(u6).map((e=>u6[e])),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",show:(e,t)=>!by.continuous(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue(e,t,n){const{properties:r}=n,{barGrouping:i,qHyperCubeDef:o}=r,a=o.qMeasures.length,s=o.qDimensions.length,l="grouped"===i.grouping&&s>0&&a+s>2;return by.continuous(r)?1:l?.9:.7},schemaIgnore:!0}}}}},axisTitleSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.title",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:f6("axis.title",r,e)}}}:void 0,axisLabelSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.label",component:"panel-section",items:{axisLabelItems:{component:"items",ref:"components",key:"axis",items:f6("axis.label.name",r,e)}}}:void 0,labelSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.labelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:f6("label.value",r,e)}}}:void 0}}}function p6(e=!1,t,n,r){return e?function(e){return{classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"LayerStyleEditor.style.strokeWidth",component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:Object.keys(u6).map((e=>u6[e])),schemaIgnore:!0,defaultValue:u6[0].value},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891",index:-1},width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"items",show:(e,t)=>!by.continuous(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:(e,t,n)=>d6(n.properties,n.layout)}}}}},optionsSection:{translation:"LayerStyleEditor.label.Options",component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollbar:{ref:"scrollbar",translation:"properties.scrollbar",component:"dropdown",type:"string",options:Object.keys(W0.OPTIONS).map((e=>W0.OPTIONS[e])),schemaIgnore:!0,defaultValue:W0.DEFAULT.value},scrollAlignment:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",schemaIgnore:!0,defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},gridLines:{type:"items",items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}}}}}}}(n):h6(t,n,r)}const m6={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"bar",ref:"components",defaultValues:(e,t)=>({key:"bar",style:{width:d6(e,t.layout),strokeColor:{index:-1,color:"#205891"},strokeWidth:"none"}}),items:{bar:{components:"items",type:"items",uses:"styling.box",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",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"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},width:{show:(e,t,n)=>!by.continuous(n.layout),component:"slider",min:.01,max:1,step:.01,defaultValue:.7}}}}},g6=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2},y6=(e,t)=>e.qHyperCube[t].filter((e=>g6(e))),v6=e=>({get:(t,n,r)=>by.continuous(r.layout)?e:t(n.type),set(e,t,n){const r=ky(n.type,n);t(n.type,e,r)}}),b6=e=>{const t=ny(!0,{},e);return t.qHyperCube.qMeasureInfo=y6(e,"qMeasureInfo"),t.qHyperCube.qDimensionInfo=y6(e,"qDimensionInfo"),t&&!by.continuous(t)&&by.stacked(t)},x6=({translator:e,flags:t,anything:n})=>{var r,i,o;const a=null==n||null===(r=n.sense)||void 0===r||null===(i=r.isUnsupportedFeature)||void 0===i?void 0:i.call(r,"continuousData"),s={items:{labels:{items:{header:{show:(e,t,n)=>y6(n.layout,"qMeasureInfo").length},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:(e,t,n)=>!b6(t.layout)&&y6(n.layout,"qMeasureInfo").length},segmentLabels:{component:"checkbox",ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",defaultValue:!1,show:(e,t)=>b6(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showSegmentLabels,set(e,t,n,r,i){i.dataPoint.showSegmentLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},totalLabels:{component:"checkbox",ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",defaultValue:!0,show:(e,t)=>b6(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showTotalLabels,set(e,t,n,r,i){i.dataPoint.showTotalLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t,n)=>y6(n.layout,"qDimensionInfo").length&&y6(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.Measure.Hide",defaultValue:"all",show:(e,t,n)=>y6(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxis.show||"none"===r.measureAxis.show,set(e,t,n,r,i){i.measureAxis.show=e?"labels":"all"}}}}}}},l=null==n||null===(o=n.sense)||void 0===o?void 0:o.theme,c={uses:"settings",items:{simpleStyling:p6(!0,l,t,e),simpleLabels:s,general:{items:{showDisclaimer:null!=t&&t.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{boxStyling:null!=t&&t.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_BARCHART")?p6(!1,l,t,e):m6,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){const n=y6(t.layout,"qMeasureInfo").length,r=y6(t.layout,"qDimensionInfo").length;return r>0&&n+r>2},change(e,t){y6(t.layout,"qDimensionInfo").length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:(e,t,n)=>by.continuous(n.layout),convertFunctions:v6("stacked")},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)=>by.continuous(n.layout),convertFunctions:v6("vertical")},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(W0.OPTIONS).map((e=>W0.OPTIONS[e])),defaultValue:W0.DEFAULT.value},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)=>!by.continuous(n.layout)}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:(t,n)=>((e,t,n)=>n&&n.get(b6(t.layout)?"properties.on":"Common.Auto"))(0,n,e)},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&b6(n.layout)},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&b6(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,n,r)=>t&&t.isEnabled("BC_XAXIS_MODE")&&!by.continuous(r.layout),items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",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:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid(e,t,n){const r=y6(n.layout,"qMeasureInfo").length,i=y6(n.layout,"qDimensionInfo").length,o=e.dimensionAxis.maxVisibleItems;return o<0||o>1e4/(i+r)},globalChange:c6,defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}},continuousGroup:{items:{miniChart:null},show:!a}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};return null!=t&&t.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(c.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"}]}}}),c},w6={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){Bv(e)}}}},interColumnSorting:{reset:(e,t)=>{const{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i}=e.qHyperCubeDef,{qCardinal:o}=t.layout.qHyperCube.qDimensionInfo[0],a=i.length,s=[...Array(a).keys()];1===n.length&&r.length>=1&&o>10&&([s[0],s[1]]=[s[1],s[0]]),e.qHyperCubeDef.qInterColumnSortOrder=s}}}}}},S6={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:{uses:"dimReflines"}}},k6=({translator:e,flags:t,anything:n})=>{var r,i;return{uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,r){var i,o;if(null!=n&&null!==(i=n.sense)&&void 0!==i&&null!==(o=i.isUnsupportedFeature)&&void 0!==o&&o.call(i,"includeZeroValues"))return!1;const a=((e,t)=>{var n,r,i,o,a,s;const l=null===(n=t.layout)||void 0===n||null===(r=n.qHyperCube)||void 0===r||null===(i=r.qDimensionInfo)||void 0===i?void 0:i.findIndex((e=>g6(e)));return(null===(o=t.properties)||void 0===o||null===(a=o.qHyperCubeDef)||void 0===a||null===(s=a.qDimensions)||void 0===s?void 0:s[l])===e})(e,t),s=by.continuous(r.layout);return!(a&&s)}},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Dimensions.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0,show:()=>t.isEnabled("IM_1579_HIDE_DIM_MEA")}}},measures:{items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Measures.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0,show:()=>t.isEnabled("IM_1579_HIDE_DIM_MEA")},trendLines:null!=n&&null!==(r=n.sense)&&void 0!==r&&null!==(i=r.isUnsupportedFeature)&&void 0!==i&&i.call(r,"trendlines")?void 0:T5({translator:e,allowStackedByDimension:t&&t.isEnabled("TRENDLINES_STACKED_DIM")})}}}}};function M6({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:k6({translator:e,flags:t,anything:n}),sorting:w6,addons:S6,settings:x6({translator:e,flags:t,anything:n})}}}const C6=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2};function E6(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t,n){const r=n.qHyperCube.qMeasureInfo.length,i=n.qHyperCube.qDimensionInfo.filter((e=>C6(e))).length;return 1===r&&2===i&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},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){return t.qHyperCube.qMeasureInfo.filter((e=>C6(e))).length+t.qHyperCube.qDimensionInfo.filter((e=>C6(e))).length>2&&!by.continuous(t)&&!((null==(n=t)||null===(r=n.qHyperCube)||void 0===r||null===(i=r.qDimensionInfo)||void 0===i?void 0:i.filter((e=>C6(e))).length)>1&&(null==n||null===(o=n.qHyperCube)||void 0===o?void 0:o.isHCEnabled));var n,r,i,o},change(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},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)=>!by.continuous(t)}}},color:{uses:"color"}}}}function T6(e){const t={},n=HE(e,"components"),r=HE(e,"dimensionAxis.axisDisplayMode"),i=HE(e,"dimensionAxis.maxVisibleItems"),o=n?n.filter((e=>"bar"===e.key))[0]:void 0,a=HE(e,"tooltip");if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),i&&(t.chart_dimaxis_maxVisibleItems=i),r&&(t.chart_dimaxis_axisDisplayMode=r),a){t.chart_tooltip_custom=!a.auto;const e=HE(a,"chart.object.refId");!a.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const q6=e=>!!(e&&e.qHyperCube.qSize.qcy>0),D6={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function N6(){const e=[];return Object.keys(D6).forEach((t=>{e.push(D6[t])})),e}function A6(e){const{flags:t}=e;return{definition:M6(e),softDefinition:E6(),support:{snapshot:q6,export:q6,exportData:!0,sharing:q6,viewData:!0,effects:!0,modifiers:N6()},importProperties:(n,r,i,o)=>{const a={layout:{templateId:r.templateId}};i.mapProperties(a);const s={defaultDimension:i.getDefaultDimensionProperties(),defaultMeasure:i.getDefaultMeasureProperties()},l=l6.axisChart.importProperties({exportFormat:n,initialProperties:r,dataDefinition:y2(e),defaultPropertyValues:s,hypercubePath:o,extension:i}),c=l.qProperty;return c.qHyperCubeDef.qDimensions.length>1&&"stacked"===c.barGrouping.grouping&&(c.qHyperCubeDef.qMode="K",c.qHyperCubeDef.qAlwaysFullyExpanded=!0),t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(l6.conditionalShow.unquarantine(c),l6.conditionalShow.unquarantineAlternative(c)),l},exportProperties:(e,n,r)=>{t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(l6.conditionalShow.quarantine(e.qProperty),l6.conditionalShow.quarantineAlternative(e.qProperty));return l6.axisChart.exportProperties({propertyTree:e,hyperCubePath:n,viewDataMode:r})},migrate:{properties:e=>(e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(Bv)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:r,showMiniChartForContinuousAxis:i}=e;if(t||!1!==i)return;const{continuousAuto:o}=n;(o||!o&&r)&&(e.scrollbar=W0.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:T6}}return function(t){const n=j1();return{qae:v2(t),ext:A6(t),component(){const r=x2({env:t}),{viewState:i,viewCache:o}=w2(),a=function({picasso:t}){const n=e.useElement(),r=e.useOptions(),[i,o]=e.useState();return e.useEffect((()=>{if(!t)return()=>{};n.style.overflow="hidden";const e=t({renderer:{prio:[(null==r?void 0:r.renderer)||"canvas"]}}).chart({element:n,data:[],settings:{}});o(e);const{destroy:i}=e;return()=>{i()}}),[r.renderer]),i}({picasso:n}),s=B5({picasso:n,chart:a,environment:r,viewState:i,viewCache:o}),l=a6({env:t,services:s});o6({picasso:n,chart:a,services:s,environment:r,viewState:i,viewCache:o,bootstrapped:l}),(({services:t,chart:n,viewState:r})=>{e.onTakeSnapshot((e=>{if(!t)return;const{layoutService:i,dockService:o,colorService:a,discrete:s,continuousDataModel:l,reducedDataModel:c}=t,{width:u,height:d}=o.meta.chart.size;return e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:u,h:d}},i.meta.isSnapshot?Promise.resolve():(e.snapshotData.content.chartData={scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:xy(n,I5.COMPONENT.LEGEND_COLOR_CAT)},i.meta.isDiscrete?(s.command.setSnapshotData(e),c.setSnapshotData(e)):l.setSnapshotData(e),a.getMain().getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{})))})),e.useImperativeHandle((()=>({getViewState(){if(r&&n)return{scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:xy(n,I5.COMPONENT.LEGEND_COLOR_CAT)}}})),[r,n])})({services:s,chart:a,viewState:i})}}}}));
87
+ */var zG=RG&&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()}),PG))}};function FG(e){return e&&"[object Function]"==={}.toString.call(e)}function jG(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function BG(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function HG(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=jG(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:HG(BG(e))}function VG(e){return e&&e.referenceNode?e.referenceNode:e}var WG=RG&&!(!window.MSInputMethodContext||!document.documentMode),UG=RG&&/MSIE 10/.test(navigator.userAgent);function $G(e){return 11===e?WG:10===e?UG:WG||UG}function YG(e){if(!e)return document.documentElement;for(var t=$G(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"===jG(n,"position")?YG(n):n:e?e.ownerDocument.documentElement:document.documentElement}function KG(e){return null!==e.parentNode?KG(e.parentNode):e}function GG(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,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&YG(a.firstElementChild)!==a?YG(l):l;var c=KG(e);return c.host?GG(c.host,t):GG(e,KG(t).host)}function XG(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 i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function JG(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=XG(t,"top"),i=XG(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function ZG(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 QG(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],$G(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function eX(e){var t=e.body,n=e.documentElement,r=$G(10)&&getComputedStyle(n);return{height:QG("Height",t,n,r),width:QG("Width",t,n,r)}}var tX=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},nX=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}}(),rX=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},iX=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 oX(e){return iX({},e,{right:e.left+e.width,bottom:e.top+e.height})}function aX(e){var t={};try{if($G(10)){t=e.getBoundingClientRect();var n=XG(e,"top"),r=XG(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?eX(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,s=o.height||e.clientHeight||i.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=jG(e);l-=ZG(u,"x"),c-=ZG(u,"y"),i.width-=l,i.height-=c}return oX(i)}function sX(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=$G(10),i="HTML"===t.nodeName,o=aX(e),a=aX(t),s=HG(e),l=jG(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=oX({top:o.top-a.top-c,left:o.left-a.left-u,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!r&&i){var f=parseFloat(l.marginTop,10),h=parseFloat(l.marginLeft,10);d.top-=c-f,d.bottom-=c-f,d.left-=u-h,d.right-=u-h,d.marginTop=f,d.marginLeft=h}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=JG(d,t)),d}function lX(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=sX(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:XG(n),s=t?0:XG(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return oX(l)}function cX(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===jG(e,"position"))return!0;var n=BG(e);return!!n&&cX(n)}function uX(e){if(!e||!e.parentElement||$G())return document.documentElement;for(var t=e.parentElement;t&&"none"===jG(t,"transform");)t=t.parentElement;return t||document.documentElement}function dX(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?uX(e):GG(e,VG(t));if("viewport"===r)o=lX(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=HG(BG(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=sX(s,a,i);if("HTML"!==s.nodeName||cX(a))o=l;else{var c=eX(e.ownerDocument),u=c.height,d=c.width;o.top+=l.top-l.marginTop,o.bottom=u+l.top,o.left+=l.left-l.marginLeft,o.right=d+l.left}}var f="number"==typeof(n=n||0);return o.left+=f?n:n.left||0,o.top+=f?n:n.top||0,o.right-=f?n:n.right||0,o.bottom-=f?n:n.bottom||0,o}function fX(e){return e.width*e.height}function hX(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=dX(n,r,o,i),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 iX({key:e},s[e],{area:fX(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 pX(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?uX(t):GG(t,VG(n));return sX(n,i,r)}function mX(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 gX(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 yX(e,t,n){n=n.split("-")[0];var r=mX(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[c]:t[gX(s)],i}function vX(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function bX(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=vX(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&&FG(n)&&(t.offsets.popper=oX(t.offsets.popper),t.offsets.reference=oX(t.offsets.reference),t=n(t,e))})),t}function xX(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=pX(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=hX(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=yX(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=bX(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function wX(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function SX(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function kX(){return this.state.isDestroyed=!0,wX(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[SX("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function MX(e){var t=e.ownerDocument;return t?t.defaultView:window}function CX(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||CX(HG(o.parentNode),t,n,r),r.push(o)}function EX(e,t,n,r){n.updateBound=r,MX(e).addEventListener("resize",n.updateBound,{passive:!0});var i=HG(e);return CX(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function TX(){this.state.eventsEnabled||(this.state=EX(this.reference,this.options,this.state,this.scheduleUpdate))}function qX(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,MX(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 DX(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function NX(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&DX(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var AX=RG&&/Firefox/i.test(navigator.userAgent);function OX(e,t,n){var r=vX(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var LX=["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"],IX=LX.slice(3);function _X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=IX.indexOf(e),r=IX.slice(n+1).concat(IX.slice(0,n));return t?r.reverse():r}var RX="flip",PX="clockwise",zX="counterclockwise";function FX(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(vX(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 i=(1===r?!o:o)?"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 i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return oX(s)[t]/100*o}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*o;return o}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){DX(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var jX={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 i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:rX({},l,o[l]),end:rX({},l,o[l]+o[c]-a[c])};e.offsets.popper=iX({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=DX(+n)?[+n,0]:FX(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||YG(e.instance.popper);e.instance.reference===n&&(n=YG(n));var r=SX("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=dX(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[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])),rX({},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))),rX({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=iX({},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,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[c]),n[l]>o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!OX(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 i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),f=l?"left":"top",h=l?"bottom":"right",p=mX(r)[c];s[h]-p<a[d]&&(e.offsets.popper[d]-=a[d]-(s[h]-p)),s[d]+p>a[h]&&(e.offsets.popper[d]+=s[d]+p-a[h]),e.offsets.popper=oX(e.offsets.popper);var m=s[d]+s[c]/2-p/2,g=jG(e.instance.popper),y=parseFloat(g["margin"+u],10),v=parseFloat(g["border"+u+"Width"],10),b=m-e.offsets.popper[d]-y-v;return b=Math.max(Math.min(a[c]-p,b),0),e.arrowElement=r,e.offsets.arrow=(rX(n={},d,Math.round(b)),rX(n,f,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(wX(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=dX(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=gX(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case RX:a=[r,i];break;case PX:a=_X(r);break;case zX:a=_X(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],i=gX(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,f="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),h=d(c.left)<d(n.left),p=d(c.right)>d(n.right),m=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),y="left"===r&&h||"right"===r&&p||"top"===r&&m||"bottom"===r&&g,v=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(v&&"start"===o&&h||v&&"end"===o&&p||!v&&"start"===o&&m||!v&&"end"===o&&g),x=!!t.flipVariationsByContent&&(v&&"start"===o&&p||v&&"end"===o&&h||!v&&"start"===o&&g||!v&&"end"===o&&m),w=b||x;(f||y||w)&&(e.flipped=!0,(f||y)&&(r=a[l+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=iX({},e.offsets.popper,yX(e.instance.popper,e.offsets.reference,e.placement)),e=bX(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,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=gX(t),e.offsets.popper=oX(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!OX(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=vX(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,i=e.offsets.popper,o=vX(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=YG(e.instance.popper),l=aX(s),c={position:i.position},u=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},l=o(i.width),c=o(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),f=t?u||d||l%2==c%2?o:a:s,h=t?o:s;return{left:f(l%2==1&&c%2==1&&!d&&t?r.left-1:r.left),top:h(r.top),bottom:h(r.bottom),right:f(r.right)}}(e,window.devicePixelRatio<2||!AX),d="bottom"===n?"top":"bottom",f="right"===r?"left":"right",h=SX("transform"),p=void 0,m=void 0;if(m="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,p="right"===f?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&h)c[h]="translate3d("+p+"px, "+m+"px, 0)",c[d]=0,c[f]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,y="right"===f?-1:1;c[d]=m*g,c[f]=p*y,c.willChange=d+", "+f}var v={"x-placement":e.placement};return e.attributes=iX({},v,e.attributes),e.styles=iX({},c,e.styles),e.arrowStyles=iX({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return NX(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&&NX(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=pX(i,t,e,n.positionFixed),a=hX(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),NX(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},BX=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};tX(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=zG(this.update.bind(this)),this.options=iX({},e.Defaults,i),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(iX({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){r.options.modifiers[t]=iX({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return iX({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&FG(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return nX(e,[{key:"update",value:function(){return xX.call(this)}},{key:"destroy",value:function(){return kX.call(this)}},{key:"enableEventListeners",value:function(){return TX.call(this)}},{key:"disableEventListeners",value:function(){return qX.call(this)}}]),e}();function HX(e){return"function"==typeof e?e():e}BX.Utils=("undefined"!=typeof window?window:global).PopperUtils,BX.placements=LX,BX.Defaults=jX;var VX="undefined"!=typeof window?KN.useLayoutEffect:KN.useEffect,WX={},UX=KN.forwardRef((function(e,t){var n=e.anchorEl,r=e.children,i=e.container,o=e.disablePortal,a=void 0!==o&&o,s=e.keepMounted,l=void 0!==s&&s,c=e.modifiers,u=e.open,d=e.placement,f=void 0===d?"bottom":d,h=e.popperOptions,p=void 0===h?WX:h,m=e.popperRef,g=e.transition,y=void 0!==g&&g,v=xA(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),b=KN.useRef(null),x=mU(b,t),w=KN.useRef(null),S=mU(w,m),k=KN.useRef(S);VX((function(){k.current=S}),[S]),KN.useImperativeHandle(m,(function(){return w.current}),[]);var M=KN.useState(!0),C=M[0],E=M[1],T=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}}(f),q=KN.useState(T),D=q[0],N=q[1],A=KN.useCallback((function(){if(b.current&&n&&u){w.current&&(w.current.destroy(),k.current(null));var e=function(e){N(e.placement)};HX(n);var t=new BX(HX(n),b.current,vA({placement:T},p,{modifiers:vA({},a?{}:{preventOverflow:{boundariesElement:"window"}},{},c,{},p.modifiers),onCreate:vY(e,p.onCreate),onUpdate:vY(e,p.onUpdate)}));k.current(t)}}),[n,a,c,u,T,p]),O=KN.useCallback((function(e){pU(x,e),A()}),[x,A]),L=function(){w.current&&(w.current.destroy(),k.current(null))};if(KN.useEffect((function(){A()}),[A]),KN.useEffect((function(){return function(){L()}}),[]),KN.useEffect((function(){u||y||L()}),[u,y]),!l&&!u&&(!y||C))return null;var I={placement:D};return y&&(I.TransitionProps={in:u,onEnter:function(){E(!1)},onExited:function(){E(!0),L()}}),KN.createElement(yY,{disablePortal:a,container:i},KN.createElement("div",vA({ref:O,role:"tooltip"},v,{style:vA({position:"fixed",top:0,left:0},v.style)}),"function"==typeof r?r(I):r))})),$X=N$(KN.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"})),YX=N$(KN.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"})),KX=KN.createElement($X,null);var GX=W_((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 KN.createElement("div",{className:C_(n.root,t&&n.checked)},KX,KN.createElement(YX,{className:n.layer}))})),XX=KN.createContext(),JX=KN.createElement(GX,{checked:!0}),ZX=KN.createElement(GX,null),QX=KN.forwardRef((function(e,t){var n=e.checked,r=e.classes,i=e.color,o=void 0===i?"secondary":i,a=e.name,s=e.onChange,l=xA(e,["checked","classes","color","name","onChange"]),c=KN.useContext(XX),u=n,d=vY(s,c&&c.onChange),f=a;return c&&(void 0===u&&(u=c.value===e.value),void 0===f&&(f=c.name)),KN.createElement(J$,vA({color:o,type:"radio",icon:ZX,checkedIcon:JX,classes:{root:C_(r.root,r["color".concat(U_(o))]),checked:r.checked,disabled:r.disabled},name:f,checked:u,onChange:d,ref:t},l))}));function eJ(e,t){return"object"===SA(t)&&null!==t?e===t:String(e)===String(t)}W_((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:pA(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:pA(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})(QX),KN.forwardRef((function(e,t){var n=e.actions,r=e.children,i=e.name,o=e.value,a=e.onChange,s=xA(e,["actions","children","name","value","onChange"]),l=KN.useRef(null),c=KN.useRef(null!=o).current,u=KN.useState((function(){return c?null:e.defaultValue})),d=u[0],f=u[1];KN.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 h={name:i,onChange:function(e){c||f(e.target.value),a&&a(e,e.target.value)},value:c?o:d},p=mU(t,l);return KN.createElement(vK,vA({role:"radiogroup",ref:p},s),KN.createElement(XX.Provider,{value:h},r))})),KN.Component;var tJ=KN.forwardRef((function(e,t){var n=e.autoFocus,r=e.autoWidth,i=e.children,o=e.classes,a=e.className,s=e.defaultValue,l=e.disabled,c=e.displayEmpty,u=e.labelId,d=e.IconComponent,f=e.inputRef,h=e.MenuProps,p=void 0===h?{}:h,m=e.multiple,g=e.name,y=e.onBlur,v=e.onChange,b=e.onClose,x=e.onFocus,w=e.onOpen,S=e.open,k=e.readOnly,M=e.renderValue;e.required;var C=e.SelectDisplayProps,E=void 0===C?{}:C,T=e.tabIndex;e.type;var q=e.value,D=e.variant,N=void 0===D?"standard":D,A=xA(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"]),O=KN.useRef(null!=q).current,L=KN.useState(s),I=L[0],_=L[1],R=O?q:I,P=KN.useRef(null),z=KN.useState(null),F=z[0],j=z[1],B=KN.useRef(null!=S).current,H=KN.useState(),V=H[0],W=H[1],U=KN.useState(!1),$=U[0],Y=U[1],K=mU(t,f);KN.useImperativeHandle(K,(function(){return{focus:function(){F.focus()},node:P.current,value:R}}),[F,R]),KN.useEffect((function(){n&&F&&F.focus()}),[n,F]);var G,X,J=function(e,t){e?w&&w(t):(F.focus(),b&&b(t)),B||(W(r?null:F.clientWidth),Y(e))},Z=function(e){return function(t){var n;if(m||J(!1,t),m){n=Array.isArray(R)?iI(R):[];var r=R.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;O||_(n),v&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),v(t,e))}},Q=null!==F&&(B?S:$);delete A["aria-invalid"];var ee=[],te=!1;(sK({value:R})||c)&&(M?G=M(R):te=!0);var ne=KN.Children.map(i,(function(e){if(!KN.isValidElement(e))return null;var t;if(m){if(!Array.isArray(R))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=R.some((function(t){return eJ(t,e.props.value)})))&&te&&ee.push(e.props.children)}else(t=eJ(R,e.props.value))&&te&&(X=e.props.children);return KN.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:Z(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})}));te&&(G=m?ee.join(", "):X);var re,ie=V;!r&&B&&F&&(ie=F.clientWidth),re=void 0!==T?T:l?null:0;var oe=E.id||(g?"mui-component-select-".concat(g):void 0);return KN.createElement(KN.Fragment,null,KN.createElement("div",vA({className:C_(o.root,o.select,o.selectMenu,o[N],a,l&&o.disabled),ref:j,tabIndex:re,role:"button","aria-expanded":Q?"true":void 0,"aria-labelledby":"".concat(u||""," ").concat(oe||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!k){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),J(!0,e))}},onClick:l||k?null:function(e){J(!0,e)},onBlur:function(e){!Q&&y&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:R,name:g}}),y(e))},onFocus:x},E,{id:oe}),function(e){return null==e||"string"==typeof e&&!e.trim()}(G)?KN.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):G),KN.createElement("input",vA({value:Array.isArray(R)?R.join(","):R,name:g,ref:P,type:"hidden",autoFocus:n},A)),KN.createElement(d,{className:C_(o.icon,o["icon".concat(U_(N))],Q&&o.iconOpen)}),KN.createElement(kG,vA({id:"menu-".concat(g||""),anchorEl:F,open:Q,onClose:function(e){J(!1,e)}},p,{MenuListProps:vA({"aria-labelledby":u,role:"listbox",disableListWrap:!0},p.MenuListProps),PaperProps:vA({},p.PaperProps,{style:vA({minWidth:ie},null!=p.PaperProps?p.PaperProps.style:null)})}),ne))})),nJ=DG,rJ=KN.createElement(HK,null),iJ=KN.createElement(fK,null),oJ=KN.forwardRef((function e(t,n){var r=t.autoWidth,i=void 0!==r&&r,o=t.children,a=t.classes,s=t.displayEmpty,l=void 0!==s&&s,c=t.IconComponent,u=void 0===c?qG:c,d=t.id,f=t.input,h=t.inputProps,p=t.labelId,m=t.MenuProps,g=t.multiple,y=void 0!==g&&g,v=t.native,b=void 0!==v&&v,x=t.onClose,w=t.onOpen,S=t.open,k=t.renderValue,M=t.SelectDisplayProps,C=t.variant,E=void 0===C?"standard":C,T=t.labelWidth,q=void 0===T?0:T,D=xA(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),N=b?TG:tJ,A=tK({props:t,muiFormControl:Y$(),states:["variant"]}).variant||E,O=f||{standard:rJ,outlined:KN.createElement(_G,{labelWidth:q}),filled:iJ}[A];return KN.cloneElement(O,vA({inputComponent:N,select:!0,inputProps:vA({children:o,IconComponent:u,variant:A,type:void 0,multiple:y},b?{}:{autoWidth:i,displayEmpty:l,labelId:p,MenuProps:m,onClose:x,onOpen:w,open:S,renderValue:k,SelectDisplayProps:vA({id:d},M)},{},h,{classes:h?n_({baseClasses:a,newClasses:h.classes,Component:e}):a},f?f.props.inputProps:{}),ref:n},D))}));oJ.muiName="Select";var aJ=W_(nJ,{name:"MuiSelect"})(oJ);var sJ=W_((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:vA({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,i=e.open,o=e.value,a=e.valueLabelDisplay;return"off"===a?t:KN.cloneElement(t,{className:C_(t.props.className,(i||"on"===a)&&n.open,n.thumb)},KN.createElement("span",{className:C_(n.offset,r)},KN.createElement("span",{className:n.circle},KN.createElement("span",{className:n.label},o))))}));function lJ(e,t){return e-t}function cJ(e,t,n){return e<t?t:e>n?n:e}function uJ(e,t){return e.reduce((function(e,n,r){var i=Math.abs(t-n);return null===e||i<e.distance||i===e.distance?{distance:i,index:r}:e}),null).index}function dJ(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 fJ(e,t,n){return 100*(e-t)/(n-t)}function hJ(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 pJ(e){var t=e.values,n=e.source,r=e.newValue,i=e.index;if(t[i]===r)return n;var o=iI(t);return o[i]=r,o}function mJ(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 gJ={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,"%")}}}},yJ=[],vJ=function(e){return e},bJ=KN.forwardRef((function(e,t){var n=e["aria-label"],r=e["aria-labelledby"],i=e["aria-valuetext"],o=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,f=e.disabled,h=void 0!==f&&f,p=e.getAriaLabel,m=e.getAriaValueText,g=e.marks,y=void 0===g?yJ:g,v=e.max,b=void 0===v?100:v,x=e.min,w=void 0===x?0:x,S=e.name,k=e.onChange,M=e.onChangeCommitted,C=e.onMouseDown,E=e.orientation,T=void 0===E?"horizontal":E,q=e.step,D=void 0===q?1:q,N=e.ThumbComponent,A=void 0===N?"span":N,O=e.track,L=void 0===O?"normal":O,I=e.value,_=e.ValueLabelComponent,R=void 0===_?sJ:_,P=e.valueLabelDisplay,z=void 0===P?"off":P,F=e.valueLabelFormat,j=void 0===F?vJ:F,B=xA(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"]),H=V_(),V=KN.useRef(null!=I).current,W=KN.useRef(),U=KN.useState(-1),$=U[0],Y=U[1],K=KN.useState(-1),G=K[0],X=K[1],J=KN.useState(d),Z=J[0],Q=J[1],ee=V?I:Z,te=Array.isArray(ee),ne=KN.useRef(),re=te?iI(ee).sort(lJ):[ee];re=re.map((function(e){return cJ(e,w,b)}));var ie=!0===y&&null!==D?iI(Array(Math.floor((b-w)/D)+1)).map((function(e,t){return{value:w+D*t}})):y;ne.current={source:ee};var oe=RU(),ae=oe.isFocusVisible,se=oe.onBlurVisible,le=oe.ref,ce=KN.useState(-1),ue=ce[0],de=ce[1],fe=KN.useRef(),he=mU(le,fe),pe=mU(t,he),me=MU((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));ae(e)&&de(t),X(t)})),ge=MU((function(){-1!==ue&&(de(-1),se()),X(-1)})),ye=MU((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));X(t)})),ve=MU((function(){X(-1)})),be=MU((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),r=re[n],i=(b-w)/10,o=ie.map((function(e){return e.value})),a=o.indexOf(r);switch(e.key){case"Home":t=w;break;case"End":t=b;break;case"PageUp":D&&(t=r+i);break;case"PageDown":D&&(t=r-i);break;case"ArrowRight":case"ArrowUp":t=D?r+D:o[a+1]||o[o.length-1];break;case"ArrowLeft":case"ArrowDown":t=D?r-D:o[a-1]||o[0];break;default:return}if(e.preventDefault(),D&&(t=hJ(t,D)),t=cJ(t,w,b),te){var s=t;t=pJ({values:re,source:ee,newValue:t,index:n}).sort(lJ),mJ({sliderRef:fe,activeIndex:t.indexOf(s)})}V||Q(t),de(n),k&&k(e,t),M&&M(e,t)})),xe=KN.useRef(),we=T;"rtl"===H.direction&&"vertical"!==T&&(we+="-reverse");var Se=KN.useCallback((function(e){var t,n,r=e.finger,i=e.move,o=void 0!==i&&i,a=e.values,s=e.source,l=fe.current.getBoundingClientRect(),c=l.width,u=l.height,d=l.bottom,f=l.left;if(t=0===we.indexOf("vertical")?(d-r.y)/u:(r.x-f)/c,-1!==we.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,w,b),D)n=hJ(n,D);else{var h=ie.map((function(e){return e.value}));n=h[uJ(h,n)]}n=cJ(n,w,b);var p=0;if(te){var m=n;p=(n=pJ({values:a,source:s,newValue:n,index:p=o?xe.current:uJ(a,n)}).sort(lJ)).indexOf(m),xe.current=p}return{newValue:n,activeIndex:p}}),[b,w,we,te,D,ie]),ke=MU((function(e){var t=dJ(e,W);if(t){var n=Se({finger:t,move:!0,values:re,source:ee}),r=n.newValue,i=n.activeIndex;mJ({sliderRef:fe,activeIndex:i,setActive:Y}),V||Q(r),k&&k(e,r)}})),Me=MU((function(e){var t=dJ(e,W);if(t){var n=Se({finger:t,values:re,source:ee}).newValue;Y(-1),"touchend"===e.type&&X(-1),M&&M(e,n),W.current=void 0,document.body.removeEventListener("mousemove",ke),document.body.removeEventListener("mouseup",Me),document.body.removeEventListener("mouseenter",Ce),document.body.removeEventListener("touchmove",ke),document.body.removeEventListener("touchend",Me)}})),Ce=MU((function(e){0===e.buttons&&Me(e)})),Ee=MU((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(W.current=t.identifier);var n=dJ(e,W),r=Se({finger:n,values:re,source:ee}),i=r.newValue,o=r.activeIndex;mJ({sliderRef:fe,activeIndex:o,setActive:Y}),V||Q(i),k&&k(e,i),document.body.addEventListener("touchmove",ke),document.body.addEventListener("touchend",Me)}));KN.useEffect((function(){var e=fe.current;return e.addEventListener("touchstart",Ee),function(){e.removeEventListener("touchstart",Ee),document.body.removeEventListener("mousemove",ke),document.body.removeEventListener("mouseup",Me),document.body.removeEventListener("mouseenter",Ce),document.body.removeEventListener("touchmove",ke),document.body.removeEventListener("touchend",Me)}}),[Ce,Me,ke,Ee]);var Te=MU((function(e){C&&C(e),e.preventDefault();var t=dJ(e,W),n=Se({finger:t,values:re,source:ee}),r=n.newValue,i=n.activeIndex;mJ({sliderRef:fe,activeIndex:i,setActive:Y}),V||Q(r),k&&k(e,r),document.body.addEventListener("mousemove",ke),document.body.addEventListener("mouseenter",Ce),document.body.addEventListener("mouseup",Me)})),qe=fJ(te?re[0]:w,w,b),De=fJ(re[re.length-1],w,b)-qe,Ne=vA({},gJ[we].offset(qe),{},gJ[we].leap(De));return KN.createElement(u,vA({ref:pe,className:C_(o.root,o["color".concat(U_(l))],a,h&&o.disabled,ie.length>0&&ie.some((function(e){return e.label}))&&o.marked,!1===L&&o.trackFalse,{vertical:o.vertical}[T],{inverted:o.trackInverted}[L]),onMouseDown:Te},B),KN.createElement("span",{className:o.rail}),KN.createElement("span",{className:o.track,style:Ne}),KN.createElement("input",{value:re.join(","),name:S,type:"hidden"}),ie.map((function(e){var t,n=fJ(e.value,w,b),r=gJ[we].offset(n);if(!1===L)t=-1!==re.indexOf(e.value);else{var i=te?e.value>=re[0]&&e.value<=re[re.length-1]:e.value<=re[0];t=i&&"normal"===L||!i&&"inverted"===L}return KN.createElement(KN.Fragment,{key:e.value},KN.createElement("span",{style:r,className:C_(o.mark,t&&o.markActive)}),KN.createElement("span",{"aria-hidden":!0,style:r,className:C_(o.markLabel,t&&o.markLabelActive)},e.label))})),re.map((function(e,t){var a=fJ(e,w,b),s=gJ[we].offset(a);return KN.createElement(R,{key:t,valueLabelFormat:j,valueLabelDisplay:z,className:o.valueLabel,value:"function"==typeof j?j(e,t):j,index:t,open:G===t||$===t||"on"===z,disabled:h},KN.createElement(A,{className:C_(o.thumb,o["thumbColor".concat(U_(l))],$===t&&o.active,h&&o.disabled,ue===t&&o.focusVisible),tabIndex:h?null:0,role:"slider",style:s,"data-index":t,"aria-label":p?p(t):n,"aria-labelledby":r,"aria-orientation":T,"aria-valuemax":b,"aria-valuemin":w,"aria-valuenow":e,"aria-valuetext":m?m(e,t):i,onKeyDown:be,onFocus:me,onBlur:ge,onMouseOver:ye,onMouseLeave:ve}))})))}));W_((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?gA(e.palette.primary.main,.62):mA(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(pA(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(pA(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(pA(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(pA(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:vA({},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"})(bJ);var xJ=KN.forwardRef((function(e,t){var n=e.action,r=e.classes,i=e.className,o=e.message,a=e.role,s=void 0===a?"alert":a,l=xA(e,["action","classes","className","message","role"]);return KN.createElement(Y_,vA({component:T$,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:s,square:!0,elevation:6,className:C_(r.root,i),ref:t},l),KN.createElement("div",{className:r.message},o),n?KN.createElement("div",{className:r.action},n):null)})),wJ=W_((function(e){var t="light"===e.palette.type?.8:.98,n=hA(e.palette.background.default,t);return{root:yA({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"})(xJ),SJ=KN.forwardRef((function(e,t){var n=e.action,r=e.anchorOrigin,i=(r=void 0===r?{vertical:"bottom",horizontal:"center"}:r).vertical,o=r.horizontal,a=e.autoHideDuration,s=e.children,l=e.classes,c=e.className,u=e.ClickAwayListenerProps,d=e.ContentProps,f=e.disableWindowBlurListener,h=void 0!==f&&f,p=e.message,m=e.onClose,g=e.onEnter,y=e.onEntered,v=e.onEntering,b=e.onExit,x=e.onExited,w=e.onExiting,S=e.onMouseEnter,k=e.onMouseLeave,M=e.open,C=e.resumeHideDuration,E=e.TransitionComponent,T=void 0===E?LK:E,q=e.transitionDuration,D=void 0===q?{enter:cO.enteringScreen,exit:cO.leavingScreen}:q,N=e.TransitionProps,A=xA(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"]),O=KN.useRef(),L=KN.useState(!0),I=L[0],_=L[1],R=KN.useCallback((function(e){var t=null!=e?e:a;m&&null!=t&&(clearTimeout(O.current),O.current=setTimeout((function(){m&&null!=(null!=e?e:a)&&m(null,"timeout")}),t))}),[a,m]);KN.useEffect((function(){return M&&R(),function(){clearTimeout(O.current)}}),[M,R]);var P=function(){clearTimeout(O.current)},z=KN.useCallback((function(){if(null!=a){if(null!=C)return void R(C);R(.5*a)}}),[a,C,R]);return KN.useEffect((function(){if(!h&&M)return window.addEventListener("focus",z),window.addEventListener("blur",P),function(){window.removeEventListener("focus",z),window.removeEventListener("blur",P)}}),[h,z,M]),!M&&I?null:KN.createElement(fY,vA({onClickAway:function(e){m&&m(e,"clickaway")}},u),KN.createElement("div",vA({className:C_(l.root,l["anchorOrigin".concat(U_(i)).concat(U_(o))],c),onMouseEnter:function(e){S&&S(e),P()},onMouseLeave:function(e){k&&k(e),z()},ref:t},A),KN.createElement(T,vA({appear:!0,in:M,onEnter:vY((function(){_(!1)}),g),onEntered:y,onEntering:v,onExit:b,onExited:vY((function(){_(!0)}),x),onExiting:w,timeout:D,direction:"top"===i?"down":"up"},N),s||KN.createElement(wJ,vA({message:p,action:n},d)))))}));W_((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},i={justifyContent:"flex-start"},o={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:vA({},t,yA({},e.breakpoints.up("sm"),vA({},o,{},c))),anchorOriginBottomCenter:vA({},n,yA({},e.breakpoints.up("sm"),vA({},a,{},c))),anchorOriginTopRight:vA({},t,{},r,yA({},e.breakpoints.up("sm"),vA({left:"auto"},o,{},s))),anchorOriginBottomRight:vA({},n,{},r,yA({},e.breakpoints.up("sm"),vA({left:"auto"},a,{},s))),anchorOriginTopLeft:vA({},t,{},i,yA({},e.breakpoints.up("sm"),vA({right:"auto"},o,{},l))),anchorOriginBottomLeft:vA({},n,{},i,yA({},e.breakpoints.up("sm"),vA({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})(SJ);var kJ=KN.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=e.children,a=e.classes,s=e.className,l=e.completed,c=void 0!==l&&l,u=e.connector,d=e.disabled,f=void 0!==d&&d,h=e.index,p=e.last,m=e.orientation,g=xA(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return KN.createElement("div",vA({className:C_(a.root,a[m],s,i&&a.alternativeLabel,c&&a.completed),ref:t},g),u&&i&&0!==h&&KN.cloneElement(u,{orientation:m,alternativeLabel:i,index:h,active:r,completed:c,disabled:f}),KN.Children.map(o,(function(e){return KN.isValidElement(e)?KN.cloneElement(e,vA({active:r,alternativeLabel:i,completed:c,disabled:f,last:p,icon:h+1,orientation:m},e.props)):null})))}));W_({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(kJ);var MJ=N$(KN.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"})),CJ=N$(KN.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),EJ=KN.createElement("circle",{cx:"12",cy:"12",r:"12"}),TJ=KN.forwardRef((function(e,t){var n=e.completed,r=void 0!==n&&n,i=e.icon,o=e.active,a=void 0!==o&&o,s=e.error,l=void 0!==s&&s,c=e.classes;return"number"==typeof i||"string"==typeof i?l?KN.createElement(CJ,{className:C_(c.root,c.error),ref:t}):r?KN.createElement(MJ,{className:C_(c.root,c.completed),ref:t}):KN.createElement(D$,{className:C_(c.root,a&&c.active),ref:t},EJ,KN.createElement("text",{className:c.text,x:"12",y:"16",textAnchor:"middle"},i)):i})),qJ=W_((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"})(TJ),DJ=KN.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.completed,u=void 0!==c&&c,d=e.disabled,f=void 0!==d&&d,h=e.error,p=void 0!==h&&h,m=e.icon;e.last;var g=e.optional,y=e.orientation,v=void 0===y?"horizontal":y,b=e.StepIconComponent,x=e.StepIconProps,w=xA(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),S=b;return m&&!S&&(S=qJ),KN.createElement("span",vA({className:C_(s.root,s[v],l,f&&s.disabled,o&&s.alternativeLabel,p&&s.error),ref:t},w),m||S?KN.createElement("span",{className:C_(s.iconContainer,o&&s.alternativeLabel)},KN.createElement(S,vA({completed:u,active:r,error:p,icon:m},x))):null,KN.createElement("span",{className:s.labelContainer},KN.createElement(T$,{variant:"body2",component:"span",className:C_(s.label,o&&s.alternativeLabel,u&&s.completed,r&&s.active,p&&s.error),display:"block"},a),g))}));DJ.muiName="StepLabel";var NJ=W_((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"})(DJ),AJ=KN.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=e.children,o=e.classes,a=e.className,s=e.completed,l=e.disabled,c=e.icon;e.last;var u=e.optional,d=e.orientation,f=xA(e,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),h={active:n,alternativeLabel:r,completed:s,disabled:l,icon:c,optional:u,orientation:d},p=hK(i,["StepLabel"])?KN.cloneElement(i,h):KN.createElement(NJ,h,i);return KN.createElement(VU,vA({disabled:l,TouchRippleProps:{className:o.touchRipple},className:C_(o.root,o[d],a),ref:t},f),p)}));W_({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"})(AJ);var OJ=KN.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=void 0!==r&&r,o=e.classes,a=e.className,s=e.completed,l=e.disabled;e.index;var c=e.orientation,u=void 0===c?"horizontal":c,d=xA(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return KN.createElement("div",vA({className:C_(o.root,o[u],a,i&&o.alternativeLabel,n&&o.active,s&&o.completed,l&&o.disabled),ref:t},d),KN.createElement("span",{className:C_(o.line,"vertical"===u?o.lineVertical:o.lineHorizontal)}))})),LJ=W_((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"})(OJ),IJ=KN.forwardRef((function(e,t){var n=e.active;e.alternativeLabel;var r=e.children,i=e.classes,o=e.className;e.completed;var a=e.last;e.optional,e.orientation;var s=e.TransitionComponent,l=void 0===s?pY:s,c=e.transitionDuration,u=void 0===c?"auto":c,d=e.TransitionProps,f=xA(e,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),h=u;return"auto"!==u||l.muiSupportAuto||(h=void 0),KN.createElement("div",vA({className:C_(i.root,o,a&&i.last),ref:t},f),KN.createElement(l,vA({in:n,className:i.transition,timeout:h,unmountOnExit:!0},d),r))}));W_((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"})(IJ);var _J=KN.createElement(LJ,null),RJ=KN.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.connector,u=void 0===c?_J:c,d=e.nonLinear,f=void 0!==d&&d,h=e.orientation,p=void 0===h?"horizontal":h,m=xA(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),g=KN.isValidElement(u)?KN.cloneElement(u,{orientation:p}):null,y=KN.Children.toArray(a),v=y.map((function(e,t){var n={alternativeLabel:o,connector:u,last:t+1===y.length,orientation:p},i={index:t,active:!1,completed:!1,disabled:!1};return r===t?i.active=!0:!f&&r>t?i.completed=!0:!f&&r<t&&(i.disabled=!0),[!o&&g&&0!==t&&KN.cloneElement(g,vA({key:t},i)),KN.cloneElement(e,vA({},n,{},i,{},e.props))]}));return KN.createElement(Y_,vA({square:!0,elevation:0,className:C_(s.root,s[p],l,o&&s.alternativeLabel),ref:t},m),v)}));W_({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(RJ);var PJ=KN.forwardRef((function(e,t){var n=e.anchor,r=e.classes,i=e.className,o=e.width,a=xA(e,["anchor","classes","className","width"]);return KN.createElement("div",vA({className:C_(r.root,r["anchor".concat(U_(n))],i),ref:t,style:yA({},WY(n)?"width":"height",o)},a))})),zJ=W_((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"})(PJ),FJ=null;function jJ(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function BJ(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function HJ(e,t){return e?t.clientWidth:t.clientHeight}function VJ(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var WJ="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),UJ={enter:cO.enteringScreen,exit:cO.leavingScreen},$J="undefined"!=typeof window?KN.useLayoutEffect:KN.useEffect;KN.forwardRef((function(e,t){var n=e.anchor,r=void 0===n?"left":n,i=e.disableBackdropTransition,o=void 0!==i&&i,a=e.disableDiscovery,s=void 0!==a&&a,l=e.disableSwipeToOpen,c=void 0===l?WJ:l,u=e.hideBackdrop,d=e.hysteresis,f=void 0===d?.52:d,h=e.minFlingVelocity,p=void 0===h?450:h,m=e.ModalProps,g=(m=void 0===m?{}:m).BackdropProps,y=xA(m,["BackdropProps"]),v=e.onClose,b=e.onOpen,x=e.open,w=e.PaperProps,S=void 0===w?{}:w,k=e.SwipeAreaProps,M=e.swipeAreaWidth,C=void 0===M?20:M,E=e.transitionDuration,T=void 0===E?UJ:E,q=e.variant,D=void 0===q?"temporary":q,N=xA(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),A=V_(),O=KN.useState(!1),L=O[0],I=O[1],_=KN.useRef({isSwiping:null}),R=KN.useRef(),P=KN.useRef(),z=KN.useRef(),F=KN.useRef(!1),j=KN.useRef();$J((function(){j.current=null}),[x]);var B=KN.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,i=void 0===n?null:n,a=t.changeTransition,s=void 0===a||a,l=UY(A,r),c=-1!==["right","bottom"].indexOf(l)?1:-1,d=WY(r),f=d?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),h=z.current.style;h.webkitTransform=f,h.transform=f;var p="";if(i&&(p=A.transitions.create("all",hU({timeout:T},{mode:i}))),s&&(h.webkitTransition=p,h.transition=p),!o&&!u){var m=P.current.style;m.opacity=1-e/HJ(d,z.current),s&&(m.webkitTransition=p,m.transition=p)}}),[r,o,u,A,T]),H=MU((function(e){if(F.current)if(FJ=null,F.current=!1,I(!1),_.current.isSwiping){_.current.isSwiping=null;var t,n=UY(A,r),i=WY(r);t=i?jJ(n,e.changedTouches):BJ(n,e.changedTouches);var o=i?_.current.startX:_.current.startY,a=HJ(i,z.current),s=VJ(t,o,x,a),l=s/a;Math.abs(_.current.velocity)>p&&(j.current=1e3*Math.abs((a-s)/_.current.velocity)),x?_.current.velocity>p||l>f?v():B(0,{mode:"exit"}):_.current.velocity<-p||1-l>f?b():B(HJ(i,z.current),{mode:"enter"})}else _.current.isSwiping=null})),V=MU((function(e){if(z.current&&F.current&&(null==FJ||FJ===_.current)){var t=UY(A,r),n=WY(r),i=jJ(t,e.touches),o=BJ(t,e.touches);if(x&&z.current.contains(e.target)&&null==FJ){var a=function(e){var t=e.domTreeShapes,n=e.start,r=e.current,i=e.anchor,o={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=r>=n;"top"!==i&&"left"!==i||(t=!t);var l="left"===i||"right"===i?"x":"y",c=e[o[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,z.current),start:n?_.current.startX:_.current.startY,current:n?i:o,anchor:r});if(a)return void(FJ=a);FJ=_.current}if(null==_.current.isSwiping){var l=Math.abs(i-_.current.startX),c=Math.abs(o-_.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(_.current.isSwiping=u,!u)return void H(e);_.current.startX=i,_.current.startY=o,s||x||(n?_.current.startX-=C:_.current.startY-=C)}}if(_.current.isSwiping){var d=HJ(n,z.current),f=n?_.current.startX:_.current.startY;x&&!_.current.paperHit&&(f=Math.min(f,d));var h=VJ(n?i:o,f,x,d);if(x)if(_.current.paperHit)0===h&&(_.current.startX=i,_.current.startY=o);else{if(!(n?i<d:o<d))return;_.current.paperHit=!0,_.current.startX=i,_.current.startY=o}null===_.current.lastTranslate&&(_.current.lastTranslate=h,_.current.lastTime=performance.now()+1);var p=(h-_.current.lastTranslate)/(performance.now()-_.current.lastTime)*1e3;_.current.velocity=.4*_.current.velocity+.6*p,_.current.lastTranslate=h,_.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),B(h)}}})),W=MU((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!x||P.current.contains(e.target)||z.current.contains(e.target))){var t=UY(A,r),n=WY(r),i=jJ(t,e.touches),o=BJ(t,e.touches);if(!x){if(c||e.target!==R.current)return;if(n){if(i>C)return}else if(o>C)return}e.muiHandled=!0,FJ=null,_.current.startX=i,_.current.startY=o,I(!0),!x&&z.current&&B(HJ(n,z.current)+(s?20:-C),{changeTransition:!1}),_.current.velocity=0,_.current.lastTime=null,_.current.lastTranslate=null,_.current.paperHit=!1,F.current=!0}}));KN.useEffect((function(){if("temporary"===D)return document.body.addEventListener("touchstart",W),document.body.addEventListener("touchmove",V,{passive:!1}),document.body.addEventListener("touchend",H),function(){document.body.removeEventListener("touchstart",W),document.body.removeEventListener("touchmove",V,{passive:!1}),document.body.removeEventListener("touchend",H)}}),[D,W,V,H]),KN.useEffect((function(){return function(){FJ===_.current&&(FJ=null)}}),[]),KN.useEffect((function(){x||I(!1)}),[x]);var U=KN.useCallback((function(e){P.current=jW.findDOMNode(e)}),[]),$=KN.useCallback((function(e){z.current=jW.findDOMNode(e)}),[]);return KN.createElement(KN.Fragment,null,KN.createElement(KY,vA({open:!("temporary"!==D||!L)||x,variant:D,ModalProps:vA({BackdropProps:vA({},g,{ref:U})},y),PaperProps:vA({},S,{style:vA({pointerEvents:"temporary"!==D||x?"":"none"},S.style),ref:$}),anchor:r,transitionDuration:j.current||T,onClose:v,ref:t},N)),!c&&"temporary"===D&&KN.createElement(EU,null,KN.createElement(zJ,vA({anchor:r,ref:R,width:C},k))))}));var YJ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=void 0===i?"secondary":i,a=e.edge,s=void 0!==a&&a,l=e.size,c=void 0===l?"medium":l,u=xA(e,["classes","className","color","edge","size"]),d=KN.createElement("span",{className:n.thumb});return KN.createElement("span",{className:C_(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[s],{small:n["size".concat(U_(c))]}[c])},KN.createElement(J$,vA({type:"checkbox",icon:d,checkedIcon:d,classes:{root:C_(n.switchBase,n["color".concat(U_(o))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},u)),KN.createElement("span",{className:n.track}))}));W_((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:pA(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:pA(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"})(YJ);var KJ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.disabled,o=void 0!==i&&i,a=e.disableFocusRipple,s=void 0!==a&&a,l=e.fullWidth,c=e.icon,u=e.indicator,d=e.label,f=e.onChange,h=e.onClick,p=e.selected,m=e.textColor,g=void 0===m?"inherit":m,y=e.value,v=e.wrapped,b=void 0!==v&&v,x=xA(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return KN.createElement(VU,vA({focusRipple:!s,className:C_(n.root,n["textColor".concat(U_(g))],r,o&&n.disabled,p&&n.selected,d&&c&&n.labelIcon,l&&n.fullWidth,b&&n.wrapped),ref:t,role:"tab","aria-selected":p,disabled:o,onClick:function(e){f&&f(e,y),h&&h(e)}},x),KN.createElement("span",{className:n.wrapper},c,d),u)}));W_((function(e){var t;return{root:vA({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},yA(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),yA(t,"overflow","hidden"),yA(t,"whiteSpace","normal"),yA(t,"textAlign","center"),yA(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"})(KJ);var GJ=KN.createContext(),XJ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"table":i,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,f=xA(e,["classes","className","component","padding","size","stickyHeader"]),h=KN.useMemo((function(){return{padding:s,size:c,stickyHeader:d}}),[s,c,d]);return KN.createElement(GJ.Provider,{value:h},KN.createElement(o,vA({ref:t,className:C_(n.root,r,d&&n.stickyHeader)},f)))}));W_((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":vA({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(XJ);var JJ=KN.createContext(),ZJ={variant:"body"},QJ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tbody":i,a=xA(e,["classes","className","component"]);return KN.createElement(JJ.Provider,{value:ZJ},KN.createElement(o,vA({className:C_(n.root,r),ref:t},a)))}));W_({root:{display:"table-row-group"}},{name:"MuiTableBody"})(QJ);var eZ=KN.forwardRef((function(e,t){var n,r=e.align,i=void 0===r?"inherit":r,o=e.classes,a=e.className,s=e.component,l=e.padding,c=e.scope,u=e.size,d=e.sortDirection,f=e.variant,h=xA(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),p=KN.useContext(GJ),m=KN.useContext(JJ);n=s||(m&&"head"===m.variant?"th":"td");var g=c;!g&&m&&"head"===m.variant&&(g="col");var y=l||(p&&p.padding?p.padding:"default"),v=u||(p&&p.size?p.size:"medium"),b=f||m&&m.variant,x=null;return d&&(x="asc"===d?"ascending":"descending"),KN.createElement(n,vA({ref:t,className:C_(o.root,o[b],a,"inherit"!==i&&o["align".concat(U_(i))],"default"!==y&&o["padding".concat(U_(y))],"medium"!==v&&o["size".concat(U_(v))],{head:p&&p.stickyHeader&&o.stickyHeader}[b]),"aria-sort":x,scope:g},h))})),tZ=W_((function(e){return{root:vA({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?gA(pA(e.palette.divider,1),.88):mA(pA(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"})(eZ),nZ={variant:"footer"},rZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tfoot":i,a=xA(e,["classes","className","component"]);return KN.createElement(JJ.Provider,{value:nZ},KN.createElement(o,vA({className:C_(n.root,r),ref:t},a)))}));W_({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(rZ);var iZ={variant:"head"},oZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"thead":i,a=xA(e,["classes","className","component"]);return KN.createElement(JJ.Provider,{value:iZ},KN.createElement(o,vA({className:C_(n.root,r),ref:t},a)))}));W_({root:{display:"table-header-group"}},{name:"MuiTableHead"})(oZ);var aZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.disableGutters,s=void 0!==a&&a,l=e.variant,c=void 0===l?"regular":l,u=xA(e,["classes","className","component","disableGutters","variant"]);return KN.createElement(o,vA({className:C_(n.root,n[c],r,!s&&n.gutters),ref:t},u))})),sZ=W_((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:yA({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"})(aZ),lZ=N$(KN.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),cZ=N$(KN.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),uZ=KN.createElement(cZ,null),dZ=KN.createElement(lZ,null),fZ=KN.createElement(lZ,null),hZ=KN.createElement(cZ,null),pZ=KN.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,i=e.nextIconButtonProps,o=e.onChangePage,a=e.page,s=e.rowsPerPage,l=xA(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=V_();return KN.createElement("div",vA({ref:t},l),KN.createElement(G$,vA({onClick:function(e){o(e,a-1)},disabled:0===a,color:"inherit"},n),"rtl"===c.direction?uZ:dZ),KN.createElement(G$,vA({onClick:function(e){o(e,a+1)},disabled:a>=Math.ceil(r/s)-1,color:"inherit"},i),"rtl"===c.direction?fZ:hZ))})),mZ=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(-1===n?r:n," of ").concat(r)},gZ=[10,25,50,100],yZ=KN.forwardRef((function(e,t){var n,r=e.ActionsComponent,i=void 0===r?pZ:r,o=e.backIconButtonProps,a=e.classes,s=e.className,l=e.colSpan,c=e.component,u=void 0===c?tZ:c,d=e.count,f=e.labelDisplayedRows,h=void 0===f?mZ:f,p=e.labelRowsPerPage,m=void 0===p?"Rows per page:":p,g=e.nextIconButtonProps,y=e.onChangePage,v=e.onChangeRowsPerPage,b=e.page,x=e.rowsPerPage,w=e.rowsPerPageOptions,S=void 0===w?gZ:w,k=e.SelectProps,M=void 0===k?{}:k,C=xA(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);u!==tZ&&"td"!==u||(n=l||1e3);var E=M.native?"option":CG;return KN.createElement(u,vA({className:C_(a.root,s),colSpan:n,ref:t},C),KN.createElement(sZ,{className:a.toolbar},KN.createElement("div",{className:a.spacer}),S.length>1&&KN.createElement(T$,{color:"inherit",variant:"body2",className:a.caption},m),S.length>1&&KN.createElement(aJ,vA({classes:{select:a.select,icon:a.selectIcon},input:KN.createElement(uK,{className:C_(a.input,a.selectRoot)}),value:x,onChange:v},M),S.map((function(e){return KN.createElement(E,{className:a.menuItem,key:e,value:e.value?e.value:e},e.label?e.label:e)}))),KN.createElement(T$,{color:"inherit",variant:"body2",className:a.caption},h({from:0===d?0:b*x+1,to:Math.min(d,(b+1)*x),count:d,page:b})),KN.createElement(i,{className:a.actions,backIconButtonProps:o,count:d,nextIconButtonProps:g,onChangePage:y,page:b,rowsPerPage:x})))}));W_((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"})(yZ);var vZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tr":i,a=e.hover,s=void 0!==a&&a,l=e.selected,c=void 0!==l&&l,u=xA(e,["classes","className","component","hover","selected"]),d=KN.useContext(JJ);return KN.createElement(o,vA({ref:t,className:C_(n.root,r,d&&{head:n.head,footer:n.footer}[d.variant],s&&n.hover,c&&n.selected)},u))}));W_((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"})(vZ);var bZ=N$(KN.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),xZ=KN.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.children,o=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,f=void 0===d?bZ:d,h=xA(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return KN.createElement(VU,vA({className:C_(o.root,a,r&&o.active),component:"span",disableRipple:!0,ref:t},h),i,u&&!r?null:KN.createElement(f,{className:C_(o.icon,o["iconDirection".concat(U_(l))])}))}));W_((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"})(xZ);var wZ,SZ=!("undefined"==typeof window||!window.document||!window.document.createElement);function kZ(){if(wZ)return wZ;if(!SZ||!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),wZ="reverse",e.scrollLeft>0?wZ="default":(e.scrollLeft=1,0===e.scrollLeft&&(wZ="negative")),document.body.removeChild(e),wZ}function MZ(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=kZ();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 CZ(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var EZ={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function TZ(e){var t=e.onChange,n=xA(e,["onChange"]),r=KN.useRef(),i=KN.useRef(null),o=function(){r.current=i.current.offsetHeight-i.current.clientHeight};return KN.useEffect((function(){var e=FY((function(){var e=r.current;o(),e!==r.current&&t(r.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),KN.useEffect((function(){o(),t(r.current)}),[t]),KN.createElement("div",vA({style:EZ,ref:i},n))}var qZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=e.orientation,a=xA(e,["classes","className","color","orientation"]);return KN.createElement("span",vA({className:C_(n.root,n["color".concat(U_(i))],r,{vertical:n.vertical}[o]),ref:t},a))})),DZ=W_((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"})(qZ),NZ=KN.createElement(lZ,{fontSize:"small"}),AZ=KN.createElement(cZ,{fontSize:"small"}),OZ=KN.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.direction,o=e.orientation,a=e.visible,s=xA(e,["classes","className","direction","orientation","visible"]),l=C_(n.root,r,{vertical:n.vertical}[o]);return a?KN.createElement(VU,vA({component:"div",className:l,ref:t,role:null,tabIndex:null},s),"left"===i?NZ:AZ):KN.createElement("div",{className:l})})),LZ=W_({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(OZ),IZ=KN.forwardRef((function(e,t){var n=e.action,r=e.centered,i=void 0!==r&&r,o=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,f=e.onChange,h=e.orientation,p=void 0===h?"horizontal":h,m=e.ScrollButtonComponent,g=void 0===m?LZ:m,y=e.scrollButtons,v=void 0===y?"auto":y,b=e.TabIndicatorProps,x=void 0===b?{}:b,w=e.textColor,S=void 0===w?"inherit":w,k=e.value,M=e.variant,C=void 0===M?"standard":M,E=xA(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),T=V_(),q="scrollable"===C,D="rtl"===T.direction,N="vertical"===p,A=N?"scrollTop":"scrollLeft",O=N?"top":"left",L=N?"bottom":"right",I=N?"clientHeight":"clientWidth",_=N?"height":"width",R=KN.useState(!1),P=R[0],z=R[1],F=KN.useState({}),j=F[0],B=F[1],H=KN.useState({start:!1,end:!1}),V=H[0],W=H[1],U=KN.useState({overflow:"hidden",marginBottom:null}),$=U[0],Y=U[1],K=new Map,G=KN.useRef(null),X=KN.useRef(null),J=function(){var e,t,n=G.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:MZ(n,T.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==k){var i=X.current.children;if(i.length>0){var o=i[K.get(k)];t=o?o.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},Z=MU((function(){var e,t=J(),n=t.tabsMeta,r=t.tabMeta,i=0;if(r&&n)if(N)i=r.top-n.top+n.scrollTop;else{var o=D?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;i=r.left-n.left+o}var a=(yA(e={},O,i),yA(e,_,r?r[_]:0),e);if(isNaN(j[O])||isNaN(j[_]))B(a);else{var s=Math.abs(j[O]-a[O]),l=Math.abs(j[_]-a[_]);(s>=1||l>=1)&&B(a)}})),Q=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=r.ease,a=void 0===o?CZ:o,s=r.duration,l=void 0===s?300:s,c=null,u=t[e],d=!1,f=function(){d=!0},h=function r(o){if(d)i(new Error("Animation cancelled"));else{null===c&&(c=o);var s=Math.min(1,(o-c)/l);t[e]=a(s)*(n-u)+u,s>=1?requestAnimationFrame((function(){i(null)})):requestAnimationFrame(r)}};u===n?i(new Error("Element already at target position")):requestAnimationFrame(h)}(A,G.current,e)},ee=function(e){var t=G.current[A];N?t+=e:(t+=e*(D?-1:1),t*=D&&"reverse"===kZ()?-1:1),Q(t)},te=function(){ee(-G.current[I])},ne=function(){ee(G.current[I])},re=KN.useCallback((function(e){Y({overflow:null,marginBottom:-e})}),[]),ie=MU((function(){var e=J(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[O]<t[O]){var r=t[A]+(n[O]-t[O]);Q(r)}else if(n[L]>t[L]){var i=t[A]+(n[L]-t[L]);Q(i)}})),oe=MU((function(){if(q&&"off"!==v){var e,t,n=G.current,r=n.scrollTop,i=n.scrollHeight,o=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(N)e=r>1,t=r<i-o-1;else{var l=MZ(G.current,T.direction);e=D?l<a-s-1:l>1,t=D?l>1:l<a-s-1}e===V.start&&t===V.end||W({start:e,end:t})}}));KN.useEffect((function(){var e=FY((function(){Z(),oe()})),t=xY(G.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[Z,oe]);var ae=KN.useCallback(FY((function(){oe()})));KN.useEffect((function(){return function(){ae.clear()}}),[ae]),KN.useEffect((function(){z(!0)}),[]),KN.useEffect((function(){Z(),oe()})),KN.useEffect((function(){ie()}),[ie,j]),KN.useImperativeHandle(n,(function(){return{updateIndicator:Z,updateScrollButtons:oe}}),[Z,oe]);var se=KN.createElement(DZ,vA({className:a.indicator,orientation:p,color:d},x,{style:vA({},j,{},x.style)})),le=0,ce=KN.Children.map(o,(function(e){if(!KN.isValidElement(e))return null;var t=void 0===e.props.value?le:e.props.value;K.set(t,le);var n=t===k;return le+=1,KN.cloneElement(e,{fullWidth:"fullWidth"===C,indicator:n&&!P&&se,selected:n,onChange:f,textColor:S,value:t})})),ue=function(){var e={};e.scrollbarSizeListener=q?KN.createElement(TZ,{className:a.scrollable,onChange:re}):null;var t=V.start||V.end,n=q&&("auto"===v&&t||"desktop"===v||"on"===v);return e.scrollButtonStart=n?KN.createElement(g,{orientation:p,direction:D?"right":"left",onClick:te,visible:V.start,className:C_(a.scrollButtons,"on"!==v&&a.scrollButtonsDesktop)}):null,e.scrollButtonEnd=n?KN.createElement(g,{orientation:p,direction:D?"left":"right",onClick:ne,visible:V.end,className:C_(a.scrollButtons,"on"!==v&&a.scrollButtonsDesktop)}):null,e}();return KN.createElement(c,vA({className:C_(a.root,s,N&&a.vertical),ref:t},E),ue.scrollButtonStart,ue.scrollbarSizeListener,KN.createElement("div",{className:C_(a.scroller,q?a.scrollable:a.fixed),style:$,ref:G,onScroll:ae},KN.createElement("div",{className:C_(a.flexContainer,N&&a.flexContainerVertical,i&&!q&&a.centered),ref:X,role:"tablist"},ce),P&&se),ue.scrollButtonEnd)}));W_((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:yA({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(IZ);var _Z={standard:HK,filled:fK,outlined:_G},RZ=KN.forwardRef((function(e,t){var n=e.autoComplete,r=e.autoFocus,i=e.children,o=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.defaultValue,u=e.error,d=e.FormHelperTextProps,f=e.fullWidth,h=e.helperText,p=e.hiddenLabel,m=e.id,g=e.InputLabelProps,y=e.inputProps,v=e.InputProps,b=e.inputRef,x=e.label,w=e.multiline,S=e.name,k=e.onBlur,M=e.onChange,C=e.onFocus,E=e.placeholder,T=e.required,q=void 0!==T&&T,D=e.rows,N=e.rowsMax,A=e.select,O=void 0!==A&&A,L=e.SelectProps,I=e.type,_=e.value,R=e.variant,P=void 0===R?"standard":R,z=xA(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=KN.useState(0),j=F[0],B=F[1],H=KN.useRef(null);KN.useEffect((function(){if("outlined"===P){var e=jW.findDOMNode(H.current);B(null!=e?e.offsetWidth:0)}}),[P,q,x]);var V={};"outlined"===P&&(g&&void 0!==g.shrink&&(V.notched=g.shrink),V.labelWidth=j),O&&(L&&L.native||(V.id=void 0),V["aria-describedby"]=void 0);var W=h&&m?"".concat(m,"-helper-text"):void 0,U=x&&m?"".concat(m,"-label"):void 0,$=_Z[P],Y=KN.createElement($,vA({"aria-describedby":W,autoComplete:n,autoFocus:r,defaultValue:c,fullWidth:f,multiline:w,name:S,rows:D,rowsMax:N,type:I,value:_,id:m,inputRef:b,onBlur:k,onChange:M,onFocus:C,placeholder:E,inputProps:y},V,v));return KN.createElement(mK,vA({className:C_(o.root,a),error:u,fullWidth:f,hiddenLabel:p,ref:t,required:q,color:l,variant:P},z),x&&KN.createElement(UK,vA({htmlFor:m,ref:H,id:U},g),x),O?KN.createElement(aJ,vA({"aria-describedby":W,id:m,labelId:U,value:_,input:Y},L),i):Y,h&&KN.createElement(xK,vA({id:W},d),h))}));function PZ(e){return Math.round(1e5*e)/1e5}W_({root:{}},{name:"MuiTextField"})(RZ);var zZ=KN.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.disableFocusListener,o=void 0!==i&&i,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,f=e.enterTouchDelay,h=void 0===f?700:f,p=e.id,m=e.interactive,g=void 0!==m&&m,y=e.leaveDelay,v=void 0===y?0:y,b=e.leaveTouchDelay,x=void 0===b?1500:b,w=e.onClose,S=e.onOpen,k=e.open,M=e.placement,C=void 0===M?"bottom":M,E=e.PopperProps,T=e.title,q=e.TransitionComponent,D=void 0===q?LK:q,N=e.TransitionProps,A=xA(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),O=V_(),L=KN.useState(!1),I=L[0],_=L[1],R=KN.useState(0)[1],P=KN.useState(),z=P[0],F=P[1],j=KN.useRef(!1),B=KN.useRef(null!=k).current,H=KN.useRef(),V=KN.useRef(),W=KN.useRef(),U=KN.useRef(),$=KN.useRef();KN.useEffect((function(){H.current||(H.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),k&&R((function(e){return!e}))}),[k]),KN.useEffect((function(){return function(){clearTimeout(V.current),clearTimeout(W.current),clearTimeout(U.current),clearTimeout($.current)}}),[]);var Y=function(e){B||I||_(!0),S&&S(e)},K=function(e){var t=n.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),j.current&&"touchstart"!==e.type||(z&&z.removeAttribute("title"),clearTimeout(W.current),clearTimeout(U.current),d?(e.persist(),W.current=setTimeout((function(){Y(e)}),d)):Y(e))},G=RU(),X=G.isFocusVisible,J=G.onBlurVisible,Z=G.ref,Q=KN.useState(!1),ee=Q[0],te=Q[1],ne=function(e){B||_(!1),w&&w(e),clearTimeout(V.current),V.current=setTimeout((function(){j.current=!1}),O.transitions.duration.shortest)},re=function(e){var t=n.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),ee&&(te(!1),J())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout(W.current),clearTimeout(U.current),e.persist(),U.current=setTimeout((function(){ne(e)}),v)},ie=mU(F,t),oe=mU(Z,ie),ae=KN.useCallback((function(e){pU(oe,jW.findDOMNode(e))}),[oe]),se=mU(n.ref,ae),le=B?k:I;""===T&&(le=!1);var ce=!le&&!s,ue=vA({"aria-describedby":le?p||H.current:null,title:ce&&"string"==typeof T?T:null},A,{},n.props,{className:C_(A.className,n.props.className)});c||(ue.onTouchStart=function(e){j.current=!0;var t=n.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout(U.current),clearTimeout(V.current),clearTimeout($.current),e.persist(),$.current=setTimeout((function(){K(e)}),h)},ue.onTouchEnd=function(e){n.props.onTouchEnd&&n.props.onTouchEnd(e),clearTimeout($.current),clearTimeout(U.current),e.persist(),U.current=setTimeout((function(){ne(e)}),x)}),s||(ue.onMouseOver=K,ue.onMouseLeave=re),o||(ue.onFocus=function(e){z||F(e.currentTarget),X(e)&&(te(!0),K(e));var t=n.props;t.onFocus&&t.onFocus(e)},ue.onBlur=re);var de=g?{onMouseOver:ue.onMouseOver,onMouseLeave:ue.onMouseLeave,onFocus:ue.onFocus,onBlur:ue.onBlur}:{};return KN.createElement(KN.Fragment,null,KN.cloneElement(n,vA({ref:se},ue)),KN.createElement(UX,vA({className:C_(r.popper,g&&r.popperInteractive),placement:C,anchorEl:z,open:!!z&&le,id:ue["aria-describedby"],transition:!0},de,E),(function(e){var t=e.placement,n=e.TransitionProps;return KN.createElement(D,vA({timeout:O.transitions.duration.shorter},n,N),KN.createElement("div",{className:C_(r.tooltip,r["tooltipPlacement".concat(U_(t.split("-")[0]))],j.current&&r.touch)},T))})))}));W_((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:pA(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(PZ(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(PZ(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:yA({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:yA({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:yA({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:yA({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(zZ);var FZ={entering:{transform:"none"},entered:{transform:"none"}},jZ={enter:cO.enteringScreen,exit:cO.leavingScreen};function BZ(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function HZ({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:BZ(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return KN.createElement("i",{style:i},KN.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},KN.createElement("path",{d:e})))}KN.forwardRef((function(e,t){var n=e.children,r=e.in,i=e.onEnter,o=e.onExit,a=e.style,s=e.timeout,l=void 0===s?jZ:s,c=xA(e,["children","in","onEnter","onExit","style","timeout"]),u=V_(),d=mU(n.ref,t);return KN.createElement(KW,vA({appear:!0,in:r,onEnter:function(e,t){fU(e);var n=hU({style:a,timeout:l},{mode:"enter"});e.style.webkitTransition=u.transitions.create("transform",n),e.style.transition=u.transitions.create("transform",n),i&&i(e,t)},onExit:function(e){var t=hU({style:a,timeout:l},{mode:"exit"});e.style.webkitTransition=u.transitions.create("transform",t),e.style.transition=u.transitions.create("transform",t),o&&o(e)},timeout:l},c),(function(e,t){return KN.cloneElement(n,vA({style:vA({transform:"scale(0)",visibility:"exited"!==e||r?void 0:"hidden"},FZ[e],{},a,{},n.props.style),ref:d},t))}))}));const VZ={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"},WZ={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"},UZ="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",$Z={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"},YZ={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 KZ(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=ak.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 GZ(e,t,n,r,i,o){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=ny(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,i&&i({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),KZ(e,a,c)}))}const XZ=(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 JZ({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives:()=>XZ(o,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 i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){GZ(r,e,t,"qDimensions",a)}}}function ZZ(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:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var i}function QZ({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives:()=>XZ(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 i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){GZ(i,e,t,"qMeasures",o,a)}}}function eQ(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const tQ={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"}}},nQ=({children:e,...t})=>KN.createElement(R$,Yg({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function rQ(e){function t({title:e,selected:t,onClick:n}){const r=Ay.detectTextDirection(e);return KN.createElement(eG,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},KN.createElement(rG,{style:{minWidth:32}},KN.createElement(HZ,{d:t?UZ:""})),KN.createElement(aG,{primaryTypographyProps:{dir:r}},e))}function n({alignTo:e,changeTo:n,current:r,dir:i,dock:o,list:a,onClose:s,show:l,instruction:c}){const u=a.map((e=>KN.createElement(t,{key:e.id,title:e.title,onClick:()=>n(e.id)})));return KN.createElement(hG,Yg({anchorEl:e,open:l,onClose:s},tQ[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),KN.createElement(JK,{dense:!0,dir:i,"aria-label":c,component:"nav"},KN.createElement(t,{title:r,selected:!0,onClick:s}),u))}t.propTypes={title:GN.exports.string.isRequired,selected:GN.exports.bool,onClick:GN.exports.func.isRequired},t.defaultProps={selected:!1},n.propTypes={alignTo:GN.exports.any,changeTo:GN.exports.func.isRequired,current:GN.exports.string.isRequired,dir:GN.exports.string.isRequired,dock:GN.exports.string.isRequired,list:GN.exports.array,onClose:GN.exports.func.isRequired,show:GN.exports.bool.isRequired,instruction:GN.exports.string.isRequired},n.defaultProps={list:[],alignTo:null};class r extends KN.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=KN.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:i,isDimension:o,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,f=i||this.state.inSelection,h=e.breadcrumbs.map(((t,n)=>KN.createElement(nQ,{style:{display:"flex",alignItems:"center",color:f&&"rgba(89, 89, 89, 0.8)",pointerEvents:f?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>f?void 0:e.drillUp(d-n),title:t},KN.createElement("span",{style:u},t),KN.createElement(HZ,Yg({},YZ,{size:"small",style:{margin:"0 8px"}}))))),p=c?this.state.hasValidAlternatives:l,m=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||i||this.state.inSelection,y={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&g&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(y.background="rgba(0,0,0,0.08)");a&&(y.padding=a),s&&(y.minWidth=s);const v=Ay.detectTextDirection(e.text),b=KN.createElement(nQ,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:y,onClick:g?void 0:m,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:g?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&KN.createElement(HZ,Yg({},WZ,{size:"small",title:r.get("Tooltip.selections.locked")})),KN.createElement("span",{style:u,dir:v},e.text),t&&p&&KN.createElement(HZ,Yg({},$Z,{size:"small",style:{margin:"0 8px"}})));return KN.createElement(KN.Fragment,null,e.drilldown&&KN.createElement(HZ,Yg({},VZ,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),h,KN.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:p?"auto":"none",height:"100%"}},b),t&&p&&KN.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 i(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&hy(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:GN.exports.bool.isRequired,padding:GN.exports.string,minWidth:GN.exports.string,titleData:GN.exports.shape({breadcrumbs:GN.exports.arrayOf(GN.exports.string).isRequired,drilldown:GN.exports.bool.isRequired,index:GN.exports.number.isRequired,locked:GN.exports.bool.isRequired,text:GN.exports.string.isRequired,popoverText:GN.exports.string.isRequired,drillUp:GN.exports.func,id:GN.exports.string.isRequired}).isRequired,popover:GN.exports.shape({dir:GN.exports.string.isRequired,dock:GN.exports.string.isRequired,changeTo:GN.exports.func.isRequired,getAlternatives:GN.exports.func.isRequired}),translator:GN.exports.shape({get:GN.exports.func.isRequired}).isRequired,selections:GN.exports.shape({isActive:GN.exports.func,addListener:GN.exports.func,removeListener:GN.exports.func}),style:GN.exports.shape({fontSize:GN.exports.string,color:GN.exports.string,fontFamily:GN.exports.string}).isRequired,isDimension:GN.exports.bool.isRequired,hasAlternative:GN.exports.bool.isRequired,supportConditional:GN.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||o(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:a,hyperCubeDef:s,isDimension:l,minWidth:c,model:u,onChangeToAlternative:d,padding:f,rtl:h,selections:p,skipAttributeExpressions:m,translator:g,supportConditional:y=!1},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!h?"ltr":"rtl",x=function(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}(v,this.rect),w=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,S=w&&w[l?"qDimensions":"qMeasures"]||[],k=n||a[l?"qDimensionInfo":"qMeasureInfo"],M=l?JZ:QZ,C=l?ZZ:eQ,E=u&&u.colorSupport&&u.modifiers&&M({altList:S,app:e,dir:h?"rtl":"ltr",dock:i(v),model:u,onChange:d,skipAttributeExpressions:m,translator:g}),T=(q=this.settings.settings).isDimension&&hy(q,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings);var q;const D=k.map(((e,n)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:n,o=C(e,i,u),a=n===k.length-1;return KN.createElement(KN.Fragment,{key:e.cId},KN.createElement(r,{popover:E,titleData:o,model:u,translator:g,selections:p,disabled:t(),style:this.style,isDimension:l,padding:f,minWidth:c,hasAlternative:T,supportConditional:y}),!a&&KN.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return KN.createElement("div",{style:x,dir:b},D)}}}const iQ=hO({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 oQ=gO({productionPrefix:"q0158",disableGlobal:!0,seed:""});function aQ(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){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!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={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=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",jW.render(function(e,t){return KN.createElement(f_,{generateClassName:t},KN.createElement(j_,{theme:iQ},e))}(e,oQ),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&jW.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(jW.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function sQ(){return function(e){e.renderer("react",aQ()),e.component("data-title",rQ(e.renderer("svg")())),e.component("disclaimer",function(){class e extends KN.Component{render(){const{label:e,spanStyle:t}=this.props;return KN.createElement(KN.Fragment,null,KN.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:GN.exports.string.isRequired,spanStyle:GN.exports.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,o="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(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}(i,r,this.rect),s="center"===r?t:"* "+t,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return KN.createElement("div",{style:a,dir:o},KN.createElement(KN.Fragment,null,KN.createElement(e,{label:s,spanStyle:l})))}}}())}}var lQ={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:cQ}=lQ;function uQ({layoutService:e,largeDataService:t}){const{maxNumPoints:n=cQ}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:dQ}=lQ,fQ=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=dQ}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!uQ({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:hQ}=lQ,{MAX_NUM_POINTS:pQ,DEFAULT_NUM_POINTS:mQ,DEFAULT_NUM_LINES:gQ}=lQ,{DEFAULT_NUM_POINTS:yQ}=lQ,vQ=({layoutService:e,largeDataService:t})=>{if(!uQ({layoutService:e,largeDataService:t})){const{maxNumPoints:e=yQ}=(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:i=gQ,maxNumPoints:o=mQ,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(fQ({layoutService:e,largeDataService:t})*r[0]<=o)return r[0];const s=Math.max(1,Math.min(i,r[1])),l=o/s,c=Math.floor(r[0]<=l?l:l/4),u=2*s*(s+1);return a&&(s>gQ||o>mQ)?Math.min(c,Math.ceil(pQ/u)):c})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=hQ}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})};function bQ({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>uQ({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>vQ({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>fQ({layoutService:t,largeDataService:n}),fetch:(i,o)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:vQ({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:fQ({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)})({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function xQ(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function wQ({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,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function SQ(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,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 kQ(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=SQ(),o=SQ();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function MQ(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function CQ(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=kQ(e,t,n.qMatrix),i=MQ(n.qArea,r);return{...n,qArea:i,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 EQ=2**.5,TQ=1/EQ;function qQ(e){return e.qIsOtherCell}function DQ({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(qQ)){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(qQ)||t++})),t}(n)}const NQ={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var AQ={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],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.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 OQ(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function LQ(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=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*i,1===e.end&&(u-=d));const f={x:u+i,y:i,width:d-2*i,height:t.height-2*i},h=s(l[0]+"…").width,p=Math.max(0,f.width-c.width),m=Math.max(0,f.height-c.height),g=o*p,y=a*m;return{show:f.width>=Math.min(h,c.width),text:l,dx:g,dy:y,rect:f,style:n.label,segment:{x:u+g,width:c.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=OQ(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:OQ(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:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=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&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function IQ(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=OQ(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:OQ(i,n.minorGuideLine.strokeWidth),x2:o,y2:OQ(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function _Q(e){return e.filter((e=>e.show)).map((e=>ny({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var RQ={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=OQ(1,t.line.strokeWidth);return{show:n.line.show,x1:OQ(0,t.line.strokeWidth),y1:r,x2:OQ(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=LQ(n,this),this.state.minor=IQ(r,this)},render(){return[..._Q([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>ny({},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})))),..._Q(this.state.major.map((e=>e.guideLine))),..._Q(this.state.minor.map((e=>e.guideLine)))];var e}};function PQ(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 zQ(e){return e.qTags.indexOf("$qualified")>-1}function FQ({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];PQ(o,a)?(zQ(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function jQ({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=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(i=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function BQ({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(""+e.qText).width+16}))),r.clamp(n),i.rangeAndWidth}}}function HQ({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 VQ({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=BQ,queryFactory:s=HQ}={attributesFactory:BQ,queryFactory:HQ}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t))),c=e.map((e=>l[e])),u=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function WQ({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=VQ,mapper:a=FQ,resolver:s=jQ}={metaFactory:VQ,mapper:FQ,resolver:jQ}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:i}),f=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 i=f.resolve(t);return n.set(r,i),i}}}function UQ(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const $Q=UQ(0).getTime();function YQ(e){return(e.getTime()-$Q)/86400/1e3}var KQ=new Date,GQ=new Date;function XQ(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return XQ((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&&(i.count=function(t,r){return KQ.setTime(+t),GQ.setTime(+r),e(KQ),e(GQ),Math.floor(n(KQ,GQ))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var JQ=XQ((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));JQ.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?XQ((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):JQ:null},JQ.range;var ZQ=1e3,QQ=6e4,e0=36e5,t0=864e5,n0=6048e5,r0=XQ((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*ZQ)}),(function(e,t){return(t-e)/ZQ}),(function(e){return e.getUTCSeconds()}));function i0(e){return XQ((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())*QQ)/n0}))}r0.range,XQ((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ZQ)}),(function(e,t){e.setTime(+e+t*QQ)}),(function(e,t){return(t-e)/QQ}),(function(e){return e.getMinutes()})).range,XQ((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ZQ-e.getMinutes()*QQ)}),(function(e,t){e.setTime(+e+t*e0)}),(function(e,t){return(t-e)/e0}),(function(e){return e.getHours()})).range,XQ((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())*QQ)/t0}),(function(e){return e.getDate()-1})).range;var o0=i0(0),a0=i0(1),s0=i0(2),l0=i0(3),c0=i0(4),u0=i0(5),d0=i0(6);o0.range,a0.range,s0.range,l0.range,c0.range,u0.range,d0.range,XQ((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 f0=XQ((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()}));f0.every=function(e){return isFinite(e=Math.floor(e))&&e>0?XQ((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},f0.range;var h0=XQ((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*QQ)}),(function(e,t){return(t-e)/QQ}),(function(e){return e.getUTCMinutes()}));h0.range;var p0=XQ((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*e0)}),(function(e,t){return(t-e)/e0}),(function(e){return e.getUTCHours()}));p0.range;var m0=XQ((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/t0}),(function(e){return e.getUTCDate()-1}));function g0(e){return XQ((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)/n0}))}m0.range;var y0=g0(0),v0=g0(1),b0=g0(2),x0=g0(3),w0=g0(4),S0=g0(5),k0=g0(6);y0.range,v0.range,b0.range,x0.range,w0.range,S0.range,k0.range;var M0=XQ((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()}));M0.range;var C0=XQ((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()}));C0.every=function(e){return isFinite(e=Math.floor(e))&&e>0?XQ((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},C0.range;const E0=1,T0=2,q0=3,D0=4,N0=5,A0=6;function O0({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=i.key({distance:n});let u;i.get(c,1)?u=i.get(c,1):(u=function(e,t,n,r,i,o){function a(e){return C0.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=r0.count(e,t),l=h0.count(e,t),c=p0.count(e,t),u=m0.count(e,t),d=y0.count(e,t),f=M0.count(e,t),h=C0.count(e,t),p=n/r.second.width-1,m=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:C0.every(1),formatter:r.year.formatter,offset:e=>C0.offset(e,-1),floor:C0.floor};if(s<=p)v.type=E0,v.desc="second",v.count=s,v.interval=r0.every(1),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-1),v.floor=r0.floor;else if(s/2<=p)v.type=E0,v.desc="every other second",v.count=s/2,v.interval=r0.every(2),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-2),v.floor=r0.floor;else if(s/5<=p)v.type=E0,v.desc="every 5 second",v.count=s/5,v.interval=r0.every(5),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-5),v.floor=r0.floor;else if(s/15<=p)v.type=E0,v.desc="every 15 second",v.count=s/15,v.interval=r0.every(15),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-15),v.floor=r0.floor;else if(s/30<=p)v.type=E0,v.desc="every 30 second",v.count=s/30,v.interval=r0.every(30),v.formatter=r.second.formatter,v.offset=e=>r0.offset(e,-30),v.floor=r0.floor;else if(l<=m)v.type=T0,v.desc="minute",v.count=l,v.interval=h0.every(1),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-1),v.floor=h0.floor;else if(l/2<=m)v.type=T0,v.desc="every 2 minute",v.count=l/2,v.interval=h0.every(2),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-2),v.floor=h0.floor;else if(l/5<=m)v.type=T0,v.desc="every 5 minute",v.count=l/5,v.interval=h0.every(5),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-5),v.floor=h0.floor;else if(l/10<=m)v.type=T0,v.desc="every 10 minute",v.count=l/10,v.interval=h0.every(10),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-10),v.floor=h0.floor;else if(l/15<=m)v.type=T0,v.desc="every 15 minute",v.count=l/15,v.interval=h0.every(15),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-15),v.floor=h0.floor;else if(l/30<=m)v.type=T0,v.desc="every 30 minute",v.count=l/30,v.interval=h0.every(30),v.formatter=r.minute.formatter,v.offset=e=>h0.offset(e,-30),v.floor=h0.floor;else if(c<=m)v.type=q0,v.desc="hour",v.count=c,v.interval=p0.every(1),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-1),v.floor=p0.floor;else if(c/2<=m)v.type=q0,v.desc="every 2 hour",v.count=c/2,v.interval=p0.every(2),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-2),v.floor=p0.floor;else if(c/3<=m)v.type=q0,v.desc="every 3 hour",v.count=c/3,v.interval=p0.every(3),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-3),v.floor=p0.floor;else if(c/6<=m)v.type=q0,v.desc="every 6 hour",v.count=c/6,v.interval=p0.every(6),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-6),v.floor=p0.floor;else if(c/12<=m||i)v.type=q0,v.desc="every 12 hour",v.count=c/12,v.interval=p0.every(12),v.formatter=r.minute.formatter,v.offset=e=>p0.offset(e,-12),v.floor=p0.floor;else if(u<=g)v.type=D0,v.desc="day",v.count=u,v.interval=m0.every(1),v.formatter=r.date.formatter,v.offset=e=>m0.offset(e,-1),v.floor=m0.floor;else if(u/2<=g)v.type=D0,v.desc="every 2 day",v.count=u/2,v.interval=m0.every(2),v.formatter=r.date.formatter,v.offset=e=>m0.offset(e,-2),v.floor=m0.floor;else if(u/3<=g)v.type=D0,v.desc="every 3 day",v.count=u/3,v.interval=m0.every(3),v.formatter=r.date.formatter,v.offset=e=>m0.offset(e,-3),v.floor=m0.floor;else if(d<=g)v.type=D0,v.desc="week",v.count=d,v.interval=y0.every(1),v.formatter=r.date.formatter,v.offset=e=>y0.offset(e,-1),v.floor=m0.floor;else if(d/2<=g)v.type=D0,v.desc="every 2 week",v.count=d/2,v.interval=y0.every(2),v.formatter=r.date.formatter,v.offset=e=>y0.offset(e,-2),v.floor=m0.floor;else if(f<=g)v.type=N0,v.desc="month",v.count=f,v.interval=M0.every(1),v.formatter=r.date.formatter,v.offset=e=>M0.offset(e,-1),v.floor=m0.floor;else if(f/3<=g)v.type=N0,v.desc="quarter",v.count=f/3,v.interval=M0.every(3),v.formatter=r.date.formatter,v.offset=e=>M0.offset(e,-3),v.floor=m0.floor;else if(f/6<=g)v.type=N0,v.desc="half year",v.count=f/6,v.interval=M0.every(6),v.formatter=r.date.formatter,v.offset=e=>M0.offset(e,-6),v.floor=m0.floor;else if(h<=y)v.type=A0,v.desc="year",v.count=h,v.interval=C0.every(1),v.formatter=r.year.formatter,v.offset=e=>C0.offset(e,-1),v.floor=C0.floor;else if(h/2<=y)v.type=A0,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>C0.offset(e,-2),v.floor=C0.floor;else if(h/5<=y)v.type=A0,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>C0.offset(e,-5),v.floor=C0.floor;else if(h/10<=y)v.type=A0,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>C0.offset(e,-10),v.floor=C0.floor;else{const e=Math.floor(h/y);v.type=A0,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>C0.offset(t,-e),v.floor=C0.floor}return v}(s,l,n,t.all(),r,a),i.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 f=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 h=[];if(!o&&u.type<=q0){const n=t.getFormat("date"),r=e.ticks(m0.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(m0.offset(r[0],-1)),h=(r.length?r:[m0.floor(s)]).map(((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}}))}return{inner:f,outer:h}}const L0=86400,I0=1440,_0={};function R0(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function P0(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=function(){return Xv.apply(XS(Mw,kw,gw,pw,hw,fw,tw,Gx,Dw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([UQ(l),UQ(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let f;f="d3"===d.type?(e,i)=>O0({timeScale:u,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:UQ(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(_0[[t,n,r,r,o]])return _0[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=UQ(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,f=t/(i-r),h=f/1440,p=f/L0,m=366*f,g=3*f*30,y=a.second.width/p,v=a.minute.width/h,b=a.date.width/g,x=a.year.width/m;let w,S,k,M=0,C=0,E=null,T=null,q=null,D=null,N=null,A=null;const O={outer:[],inner:[]};for(y<1?(E=1,C=1/L0):y<2?(E=2,C=1/L0*2):y<5?(E=5,C=1/L0*5):y<10?(E=10,C=1/L0*10):y<30?(E=30,C=1/L0*30):v<1?(T=1,C=1/I0):v<2?(T=2,C=1/I0*2):v<5?(T=5,C=1/I0*5):v<10?(T=10,C=.006944444444444445):v<30?(T=30,C=.020833333333333336):v<60?(q=1,C=1/24):v<120?(q=2,C=2/24):v<360?(q=6,C=.25):v<720?(q=12,C=.5):b<1/90?(C=1,D=1):b<2/90?(C=2,D=2):b<7/90?(C=7,D=7):b<31/90?(N=1,C=31):b<1?(N=3,C=90):x<1?(A=1,C=366):x<2?(A=2,C=732):x<5?(A=5,C=1826.25):(A=10,C=3652.5),S=Math.floor((d+n%1)/C);M<i;){k=S+1,w=A?R0("year",[l+S*A,0,1],[l+k*A,0,1],a.year.formatter):N?R0("month",[l,c+S*N,1],[l,c+k*N,1],a.date.formatter):D?R0("day",[l,c,u+S*D],[l,c,u+k*D],a.date.formatter):q?R0("hour",[l,c,u,0+S*q],[l,c,u,0+k*q],a.minute.formatter):T?R0("minute",[l,c,u,0,0+S*T],[l,c,u,0,0+k*T],a.minute.formatter):R0("second",[l,c,u,0,0,0+S*E],[l,c,u,0,0,0+k*E],a.second.formatter),M=YQ(w.start),O.inner.push(w);const e=Math.floor(M);if(!(o||A||N||D)){const t={type:"day",start:UQ(e),end:UQ(e+1),formatter:a.date.formatter,qStart:e};O.outer[O.outer.length-1]&&O.outer[O.outer.length-1].qStart===t.qStart||O.outer.push(t)}S++}return O.min=r,O.max=i,_0[[t,n,r,r,o]]=O,O}(n,e,d.min,l,c,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{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)=>f(t,n)[a].map((t=>{let n;return n="start"===i?YQ(t.start):"end"===i?YQ(t.end):(YQ(t.start)+YQ(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:YQ(t.start),end:YQ(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return h}const z0=/t+/i;const F0={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 j0(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 B0="continuousPan";var H0={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=NQ,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=bQ,snapshotFetcherFactory:c=wQ,cacheFetcherFactory:u=xQ,cache:d={initial:{},merged:{}}}=s,f=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=c({layoutService:t,viewCache:i}),p=u({cache:d}),m=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",function(e,t){return Math.max(1e-6,2.3841857910156157e-7*(t-e))}(y,v)),g=t.meta.isSnapshot?h:f,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=h.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return g.fetch(y,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=MQ(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=>CQ(y,v,e))).then((e=>this.updateLayout(e))).catch(m)},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,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=MQ(e.qArea,r);return{...e,qArea:i,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}))),i=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(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=>CQ(e,t,n))).catch(m),fetchFromCache:(e,t)=>p.fetch(e,t).then((n=>CQ(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return ny({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return ny({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>DQ(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 i(e,n,i){return r[e](n,i).then((e=>(r.updateLayout(e),t(),e)))}const o=$E(((e,t)=>i("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return YE(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=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=i?1-o:o,{min:u,max:d}=t.get("zoom"),f=Math.abs(d-u),h=f-(r>0?TQ:EQ)*f,p=u+h*c,m=d-h*(1-c),g=p<a?a-p:0,y=m>s?m-s:0;t.set("zoom",{min:Math.max(p-y,a),max:Math.min(m+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:B0,pointers:1,threshold:10,enable(r,i){return this.started===B0||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=B0;const{min:i,max:o}=r.get("zoom");this[B0]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[B0],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:AQ,timeAxis:RQ},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=ny(!0,{},t[i],o)})),r}(t,F0,n),{qAxis:i}=r,o=Ux(),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,i);let c,u,d=[];const f=function(e){return Number.isNaN(+e)?NaN:o(e)};f.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=u.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=u.generate(e,n.isDayOrShorter)),d},f.invert=e=>o.invert(e),f.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),f.range=e=>Array.isArray(e)?o.range(e):o.range(),f.norm=e=>(j0(a,f),a.instance(e)),f.normInvert=e=>(j0(a,f),a.instance.invert(e)),f.copy=()=>e(t,n),f.clamp=(e=!0)=>(o.clamp(e),o.clamp()),f.min=()=>Math.min(s,l),f.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const h=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={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 i&&z0.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)})),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return o.date;const r=UQ(t[0].data.start),i=UQ(t[n-1].data.start);return m0.count(r,i)/n>=1?o.date:p0.count(r,i)/n>0?o.minute:h0.count(r,i)/n>0?o.second:o.date},t}(r);return u=P0(o.copy(),r,h),c=WQ({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:r.cache,scale:f}),f.data=()=>({fields:[{formatter:f.formatter,id:()=>"qHyperCube/"+r.field,key:()=>r.field,raw:HE(n,"fields.0.raw",(()=>({})))}]}),f.formatter=()=>h.getFormatFromTicks(d).formatter,f}}};const V0={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var W0={OPTIONS:V0,DEFAULT:V0.MINI_CHART};function U0({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<o){const e=(o-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=o}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 $0({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const Y0=e=>({miniChart:e===W0.OPTIONS.MINI_CHART.value,bar:e===W0.OPTIONS.BAR.value,none:e===W0.OPTIONS.NONE.value});function K0({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Y0(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Y0(W0.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return Y0(!n&&(r||!r&&i)?W0.OPTIONS.NONE.value:W0.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===W0.OPTIONS.MINI_CHART.value,n.bar=t.value===W0.OPTIONS.BAR.value,n.none=t.value===W0.OPTIONS.NONE.value),n}function G0({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=K0({layoutService:e,override:l});if(d.none)return!1;const{orientation:f}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===f?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:f,rtl:s,isContinuous:e.meta.isContinuous,range:()=>$0({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(h.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(h.settings.injections=()=>[U0({layoutService:e,discrete:n})]),h}function X0({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),f="horizontal"===o.meta.major.orientation,h=f?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,p=f?d.rect.computedInner.width:d.rect.computedInner.height,m=f&&a?p-h:h,g=Math.max(0,Math.min(m/p,1)),[y,v]=$0({layoutService:i,viewState:n,viewCache:r}),b=g<y,x=g>v,w=!b&&!x;return{pixel:m,relative:g,thumb:w?m-y*p:0,beforeThumb:b,afterThumb:x,onThumb:w}}}function J0({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,f]=$0({layoutService:i,viewState:n,viewCache:r});return{size:u,thumbSize:(f-d)*u}}}function Z0({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=X0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=J0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-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 Q0="data-scrollbar-handle";function e1({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Q0)||""}const t1="scrollbarResize";function n1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=X0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:t1,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[t1]=this[t1]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&e1({e:t})&&(this[t1].panningEvent=t.srcEvent),!!this[t1].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[t1]=this[t1]||{},this[t1].panningEvent&&t.component(e).emit("dragStart",this[t1].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[t1]=this[t1]||{},!this[t1].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),c=i.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=e1({e:this[t1].panningEvent});let f="start"===d?Math.min(u,o.max):o.min,h="end"===d?Math.max(u,o.min):o.max;f===h&&(f-="start"===d?c:0,h+="end"===d?c:0),r.set("zoom",{min:f,max:h}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[t1]=this[t1]||{},delete this[t1].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[t1]=this[t1]||{},delete this[t1].panningEvent,t.component(e).emit("dragEnd")}}}}const r1="scrollbarPan";function i1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=X0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=J0({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:r1,threshold:0,enable(r,i){return this[r1]=this[r1]||{},!(i&&!this[r1].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e)))}},events:{scrollbarPanstart(n){n.preventDefault();const a=c(n);if(this[r1]=this[r1]||{},this[r1].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[r1].relative=a.relative,this[r1].zoom=r.get("zoom"),this[r1].zoom.span=this[r1].zoom.max-this[r1].zoom.min,this[r1].zoom.fullSpan=o-n}else if(a.onThumb)this[r1].offset=a.thumb;else{const e=u();this[r1].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=c(n);if(this[r1]=this[r1]||{},o.meta.isContinuous){const e=a.relative-this[r1].relative,{fullSpan:t,span:n,min:o,max:s}=this[r1].zoom,l=i.get("continuousMin"),c=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[r1].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[r1]=this[r1]||{},this[r1].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[r1]=this[r1]||{},this[r1].isPanning=!1,t.component(e).emit("unlockState")}}}}function o1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[Z0({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),n1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),i1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function a1({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}function s1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...o1({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:a1({componentKey:e,chart:t,actions:n,layoutService:o})}}const l1={background:"rgba(0, 0, 0, 0.1)"},c1={top:-1,bottom:-1,width:6},u1={width:2,background:"#595959"};var d1={before:l1,after:l1,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:c1,endHandle:c1,startHandleBorder:u1,endHandleBorder:u1};const f1={background:"rgba(0, 0, 0, 0.1)"},h1={top:-1,bottom:-1,width:6},p1={width:2,background:"#595959"};var m1={before:f1,after:f1,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:h1,endHandle:h1,startHandleBorder:p1,endHandleBorder:p1};const g1={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},y1={pointerEvents:"initial"},v1={pointerEvents:"none"};const b1="ew-resize",x1="default";function w1(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function S1(){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?b1:x1}function k1(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function M1(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function C1(){const{size:e,start:t,end:n}=w1.call(this);this.renderer.render(this.elements(this.h,k1.call(this,e,t,n)))}function E1(){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?m1:d1;return{container:{...g1},before:{...g1,...n.before,...t.before},after:{...g1,...n.after,...t.after},thumb:{...g1,...n.thumb,...t.thumb},startHandle:{...g1,...y1,...n.startHandle},endHandle:{...g1,...y1,...n.endHandle},startHandleBorder:{...g1,...v1,...n.startHandleBorder},endHandleBorder:{...g1,...v1,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var T1={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(){C1.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||!M1.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=e1({e:e});t&&(this.state.hover[t]=!0),S1.call(this),C1.call(this)},leave(){this.state.locked||(this.state.hover.reset(),S1.call(this),C1.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=e1({e:e});t&&(this.state.drag[t]=!0),S1.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),S1.call(this),C1.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*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}=w1.call(this);return this.elements(e,k1.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:i}=this.settings,o=i.injections().map((t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[i.end]:t-n},f={[i.start]:r},h={left:-3},p={left:1},m={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?f:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?d:f},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?m:h},class:"scrollbar--start-handle",[Q0]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:p}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?h:m},class:"scrollbar--end-handle",[Q0]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?p:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...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:E1.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};const q1={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:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(ny({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function D1({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,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=ny({},{major:l,majorEnd:c},r.minor.items[e]);i.forEach((t=>{d[t]=r[t].items[e]}));const f=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:f}),p=(u-h)/2,m=p+d.major+h/2;return{item:d,boxCenter:m,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function N1({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=ny(!0,{},n||{},r||{}),c={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},u=i.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:ny(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.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:ny(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:i.major}});const f=i.minor||{};let h;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:ny(!0,{},{start:{scale:f.scale,ref:"start"},end:{scale:f.scale,ref:"end"},min:{scale:f.scale,ref:"min"},max:{scale:f.scale,ref:"max"},med:{scale:f.scale,ref:"med"}},f)})};for(let n=0,r=e.length;n<r;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:i[h],scaled:c});return p}const A1=["oob"];const O1={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:i,style:o,resolver:a,symbol:s}=this,l=N1({keys:A1,data:i,defaultSettings:{oob:q1.getDefaultSettings()},style:o,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:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=D1}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:f,rendWidth:h,rendHeight:p}=s({i:u,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),m=c[u].data,g=[];if(d.oob.show){g.push(q1.createOob({oob:d.oob,dockValue:a,boxCenter:f,rendWidth:h,rendHeight:p,flipXY:n,symbol:o}));const e={type:"container",data:m,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:u,settings:c,width:e,height:t,flipXY:r,resolved:l,keys:A1,symbol:s,dockValue:n})}},L1={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},I1=["hat"];function _1(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 R1({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,c=i,u=e.hat.alignment||0;o&&(a="y",s="x",l=i,c=r,u=1-u);const d=(n+e.major)*l;let f=[{[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 h=ny({},e.hat,{type:"path",d:_1(f)});f=[{[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[h,ny({},e.hat,{type:"path",d:_1(f)})]}const P1={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:i,resolver:o}=this,a=N1({keys:I1,data:r,defaultSettings:L1,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=D1}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),p=s[l].data,m=[];c.hat.show&&m.push(...R1({item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:m};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:I1})}};function z1(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map((t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:z1(i,t,n)},i}function F1(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),i.domain(s),z1(i,a,l,e.invert)}))}function j1(){const e=Yp();return e.use(Fg),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Hg(e))};e.interaction("hammer",Hg(Hammer))}($g)),e.use(sQ()),e.use(F1),e.component("box-sliced-hat",P1),e.component("box-out-of-bounds",O1),e.component("scrollbar",T1),e.component("scroll-hint",QS),e.component("reference-line-labels",Qk),e.component("axis-overlay",H0.picassoComponents.axisOverlay),e.component("time-axis",H0.picassoComponents.timeAxis),e.scale("q-time-axis",H0.picassoScales.time),e}const B1={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 H1(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const V1={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={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=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(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=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function W1(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r,i,o;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!==(i=e.session)&&void 0!==i&&null!==(o=i.config)&&void 0!==o&&o.url)){var f;if(a=e.session.options||(null===(f=e.enigmaModel)||void 0===f?void 0:f.session.sessionConfig),!a){var h;a=null===(h=e.session)||void 0===h?void 0:h.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);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await V1.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function U1(e,t,n,r){var i,o,a,s,l,c;const{app:u,flags:d}=t,f=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!f)return[];const[h]=f,p=h.size||"small",m=h.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===h.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===m&&null!==(l=h.ref)&&void 0!==l&&null!==(c=l.qStaticContentUrl)&&void 0!==c&&c.qUrl)return W1(h,p,u);if("url"===m)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&H1(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:i,imageError:s}=await V1.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await V1.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(u,d,h,p,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===m&&v&&v.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(H1(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:o,imageError:a}=await V1.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(u,n[g],p,v)}return[]}const $1={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(U1(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},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}},Y1={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await $1.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>$1.checkIfPromisesExist({customTooltipModel:e})};const K1=(e,t)=>{var n,r,i;const o=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===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:B1.CHART.CHART_PARENT_TYPE,qId:B1.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},G1=e=>{var t,n,r;const i=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:B1.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const X1={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,i,o;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=B1.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:B1.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:i,rtl:o})=>{var a,s,l;const c=i,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 X1.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=B1.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=B1.CHART.STATE,a=K1(t,o),s=await e.createSessionObject(a),l=G1(t);if(s.id!==B1.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(c.miniChartToken.alternateState&&c.miniChartToken.sessionObj&&a){var d,f,h,p;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(f=n[0].data)||void 0===f?void 0:f.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var m,g;const e=null!==(m=n[0].data.selectionOuterDimension)&&void 0!==m?m:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.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(B1.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};c.miniChartToken.vis=await i.embed.render({element:s,model:c.miniChartToken.model,options:l,id:null===(h=c.miniChartToken.model)||void 0===h?void 0:h.id,type:null===(p=c.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await X1.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(X1.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(B1.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=B1.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 J1(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function Z1(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=B1.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function Q1(e){const t=Z1();return e.filter((e=>t[e.id]))}const e2={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 i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const c=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[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(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[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:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=e2.getAttrExprData(a);o.length||n.length?Y1.handlePromises({customTooltipModel:i,nodes:e2.getDataNodes(s,o.length>0?o: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!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&X1.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Y1.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.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[B1.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[B1.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[B1.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(Q1(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[B1.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[B1.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=J1(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===Q1(i).length){var o,a;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=J1(e)||[];[...i,t].forEach((e=>{const t=Q1(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=Z1(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[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:Ay.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Ay.detectTextDirection(e.src),r=[],i={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"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function t2(e,t,n,r){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[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 i=c.qValues&&c.qValues[t]?c.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case B1.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case B1.CUSTOM.TITLE:case B1.CUSTOM.DESCRIPTION:case B1.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const n2={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>t2(t,e,r,n)}}};const r2={getCustomAttrExps(e,t,n){var r,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,n,r){const i={[B1.CUSTOM.TITLE]:!0,[B1.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=e2.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===B1.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===B1.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Oy.getMeasure(e,t))),e,o)}};function i2({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(r2.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:[]})}function o2(e){const t=B1.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function a2(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var s2={attrExpr:{migrateProperties(e){var t,n,r,i;const o=ny(!0,{},e),a=(null===(t=o.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=a2(o);return s=function(e,t){return t.concat(e.map((e=>o2(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,o),null===(i=o.tooltip)||void 0===i||delete i.data,o},getPatches(e){var t,n,r,i;const o=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qDimensions.length)-1;return function(e,t,n){let r=e.length;const i=[];return t.forEach((e=>{const t=o2(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(a2(e),o,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,i,o,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],c=(null===(i=t.tooltip)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.qHyperCube)||{},u=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((t=>{if(u){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}},l2=7005;const c2=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2},u2=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&py(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},d2=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&py(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&py(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},f2=e=>{if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))},h2=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===r.length){const r=n[0];return r.qLibraryId?t.getDimension(r.qLibraryId).then((e=>e.getLayout())).then((t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;d2(e,n)}return r})):t.getField(r.qDef.qFieldDefs[0]).then((t=>t.getCardinal().then((t=>(d2(e,t),r)))),(()=>r))}return u2(e),Promise.resolve()};function p2(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:r}}=e;t.length>1&&e.color?VE(e,"color.persistent",!0):"byDimension"===r&&n.length>1?VE(e,"color.mode","byMultiple"):"byExpression"===r&&0===n.length?VE(e,"color.mode","primary"):0===t.length&&n.length>0&&(VE(e,"color.byMeasureDef",void 0),VE(e,"color.byDimDef",void 0),1===n.length&&VE(e,"color.mode","primary"))}const m2=(e,t)=>{p2(t),Bv(e),e2.addCallbackCustomTooltip(t)},g2=e=>{p2(e)};function y2({translator:e}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,r,i){let o;const a=null!=i&&i.layout?i.layout.qHyperCube.qDimensionInfo.filter((e=>c2(e))).length:t.qHyperCubeDef.qDimensions.length;return r.isAutoChart&&n>a-1?o="Visualizations.Descriptions.Color":a>1&&0===n?"stacked"===t.barGrouping.grouping?o="Visualizations.Descriptions.Stack":(o="Visualizations.Descriptions.Group",t.qHyperCubeDef.qColumnOrder=[0,1,2]):o="Visualizations.Descriptions.Bars",e.get(o)},add:(e,t,n)=>(t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),null!=n&&n.app?h2(t,n.app).then((()=>(m2(e,t),e))):(f2(t),m2(e,t),e)),move(e,t,n){n.layout.qHyperCube.qDimensionInfo.filter((e=>c2(e))).length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),u2(t),p2(t),e2.moveCallbackCustomTooltip(t,e)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;p2(t),1===n.length&&(t.qHyperCubeDef.qMode="S"),e2.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){e2.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>null!=n&&n.app?h2(t,n.app).then((()=>(e.qSortBy.qSortByNumeric=-1,g2(t),e))):(f2(t),g2(t),e),move(e,t){u2(t),p2(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;p2(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function v2(e){return{properties:{version:"1.31.3",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!0,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[{path:"/qHyperCubeDef",...y2(e)}]}}}var b2={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function x2({env:t}){var n,r;const{flags:i}=t,o=null===(n=t.anything)||void 0===n||null===(r=n.sense)||void 0===r?void 0:r.isUnsupportedFeature,a=e.useTranslator();!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(b2).forEach((t=>{e.add(b2[t])}))}}(t.translator);const s=e.useEmbed(),l=e.useTheme(),[c,u]=e.useState(),d=e.useDeviceType(),f=e.useAppLayout(),{qLocaleInfo:h}=f;return e.useEffect((()=>{u({translator:a,theme:l,embed:s,deviceType:d,localeInfo:h,isUnsupportedFeature:o,flags:i})}),[h,o,a.language(),l.name(),d]),c}function w2(){const[t]=e.useState((()=>WE())),[n]=e.useState((()=>function(e){var t=tM({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({viewRange:[0,1],scrollOffset:void 0})));return{viewCache:t,viewState:n}}const S2="REJECTED",k2=()=>{},M2=2,C2=20,E2=200,T2=10;var q2={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)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),c=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:i,qLeft:o},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-T2<=t.qTop,i=n.qLeft+n.qWidth+T2>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+T2>=t.qTop+t.qHeight,a=n.qLeft-T2<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var D2={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),i=Math.max(t.qLeft,e.qArea.qLeft),o=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-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;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-T2<=t.qTop,i=n.qTop+n.qHeight+T2>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&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 N2={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 A2="pages";const O2="discretePan";function L2({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:O2,pointers:1,threshold:10,enable(r,i){return this.started===O2||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started=O2;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&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function I2({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter((e=>e.key===t));if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function _2({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(E2,n));return{width:e,height:Math.max(C2,Math.min(n*M2,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function R2(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject(S2),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=e=>new Promise(((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(S2),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(S2),n=null)},i}const P2={command:{update:()=>{}}};function z2({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=P2,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,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 i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&c&&c();const u=r(l);return o(i(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:_2({layoutService:r}),request:c({layoutService:r,definitionPath:o}),process:R2(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=YE(((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==S2)throw e}))}),50);return function(e,{onProcessing:t=k2,onDataPage:n=k2}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var F2={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:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var j2={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 i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function B2(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function H2(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function V2(e){return H2(e.qMatrix,(e=>e[0].qElemNumber))-1}var W2={inTotal:function({layoutService:e}){const t=B2(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=B2(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=B2(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=V2(o),c=o.qArea.qHeight*i+l,u=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const U2=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function $2(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return U2(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:U2(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return U2(e,n);return H2(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var Y2={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 i=$2(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,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:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:c}=n,u=$2(t).area(e(),l,a.qArea),d=V2(a),f=a.qArea.qHeight+d,h=c===o?(r.inView-f)*s/i:(c+(a.qArea.qTop+u)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+f/r.inView]}};function K2({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:f,LABELLESS:h}=r[n.meta.chart.mode],p="horizontal"===n.meta.major.orientation,{axisDisplayMode:m="auto",maxVisibleItems:g=10,label:y}=s,v=p?t.width:t.height,b=v/l>=f;switch(m){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);case"auto":default:return c?v/h:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"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:f}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return f>o;const h=(90-d)*(Math.PI/180);return f>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:i,renderer:o,isGrouped:a,itemSize:f,label:y})?v/d:l:v/d}}function G2({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:d,scaleRange:f}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?F2:n?r?W2:Y2:j2}({layoutService:r}),h=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,p=e=>e?h()/e:0,m=(e,t)=>-(e-t)*p(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=u({layoutService:r});return{inTotal:l,inView:K2({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,m(n,r))),o=r?Math.abs(r*i/h()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return m(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,o+e/i]}({viewSize:h(),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 o=f({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:m(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=m(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*p(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(p(r)*n)}}}}function X2({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:f,rtl:h}){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 p=G2({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:h}),m=()=>{const e=p.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=e=>{const t=Date.now(),r=m(),a=g({pixelOffset:e,items:r}),s=p.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((p.validate.offset({pixelOffset:e,items:r})||f.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),f.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item})));f.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};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 a=m();n.set("itemSize",p.getItemSize({items:a}));const c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=f.get("scrollOffset");if(void 0===n)return 1===t?p.getUpperBound({items:e}):0;if("number"==typeof n)return p.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return p.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),u=g({pixelOffset:c,items:a});f.preventSet("viewRange",p.getViewRange({pixelOffset:u.start.pixel,items:a}));const d=p.getArea({itemOffset:u.start.item,items:a});return new Promise((e=>{i(d,{onDataPage:()=>{n.set("scaleRange",p.getScaleRange({offsets:u.start,items:a})),f.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),r=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(r)}}}function J2({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:d,axisKey:f,renderer:h,areaBuffer:p,processDataPage:m=(()=>{})}={}}){const g=WE(),y=function({qMode:e}){switch(e){case"S":default:return q2;case"K":return D2;case"T":return N2}}({qMode:i.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(A2,[]),{add:t=>{const n=e.get(A2);n.length=0,n.push(t)},getCurrent:()=>e.get(A2)[0],getAll:()=>e.get(A2),contains:n=>t(e.get(A2)[0],n)}}({state:g,contains:y.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:v,composition:y});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),x=z2({dataStore:v,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:u,processDataPage:m}),w=X2({chart:e,componentKey:n,state:g,dataStore:v,pageData:x,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:f,renderer:h,areaBuffer:b,viewState:l,rtl:c}),S=function({layoutService:e,dataStore:t}){return function(n){const r=HE(n,""+e.refs.dataPages);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:v});return{interactions:function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[L2({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:I2({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:w}),query:{getCanScroll:()=>w.enabled(),getItemSize:()=>w.itemSize(),getScaleRange:()=>w.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>w.initialize(),scrollTo:e=>w.scrollToRelative(e),setSnapshotData:e=>S(e)}}}var Z2="AVERAGE",Q2="LINEAR",e5="POLYNOMIAL2",t5="POLYNOMIAL3",n5="POLYNOMIAL4",r5="EXPONENTIAL",i5="LOG",o5="POWER";function a5({dimValue:e,value:t,qTrendLine:n}){const{qType:r,qCoeff:i}=n,o={x:e,y:i[2]*t**2+i[1]*t+i[0]};switch(r){default:case e5:return o;case t5:return o.y+=i[3]*t**3,o;case n5:return o.y+=i[4]*t**4+i[3]*t**3,o}}var s5={average:function({dimValue:e,qTrendLine:t}){return{x:e,y:t.qCoeff[0]}},linear:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]*t+n.qCoeff[0]}},polynomial2:a5,polynomial3:a5,polynomial4:a5,exponential:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:Math.exp(n.qCoeff[0]+t*n.qCoeff[1])}},log:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]+n.qCoeff[0]*Math.log(t)}},power:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:10**(n.qCoeff[0]+n.qCoeff[1]*Math.log(t)*Math.LOG10E)}}};function l5(e,t){const n=s5[t.qType.toLowerCase()],r=Math.max(1,e/500);let i=1/0,o=-1/0;for(let a=0;a<e;a+=r){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});i=Math.min(e,i),o=Math.max(e,o)}return{min:i,max:o}}function c5(e){return s5[e.qType.toLowerCase()]}function u5(e,t){return e.meta.isContinuous?function(e,t){return{generate:(e,n,r)=>{const i=[],o=c5(e),{min:a,max:s}=t.get("zoom"),l=(s-a)/100;if(l>0){const t=t=>{const a=o({dimValue:t,value:t,qTrendLine:e});a.layerId=n,a.measureIndex=r,a.dimValue=t,i.push(a)};let c=a;for(let e=a;e<=s;e+=l)t(e),c=e;c!==s&&t(s)}return i},calculate:(e,t)=>c5(e)({dimValue:t,value:t,qTrendLine:e}),findMinMax(e,t){const n=this.generate(t).map((({y:e})=>e));return{min:Math.min(...n),max:Math.max(...n)}}}}(0,t):e.meta.mode.K?function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qData[0].qSubNodes,s=o.qArea.qTop,l=s5[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const o=a[e],c=l({dimValue:o.qElemNo,value:e+s+1,qTrendLine:t});c.layerId=n,c.measureIndex=r,c.dimValue=o.qText,i.push(c)}return i},findMinMax:l5}}(e):function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qMatrix,s=o.qArea.qTop,l=s5[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const o=a[e][0],c=e+s+1,u=l({dimValue:o.qElemNumber,value:c,qTrendLine:t});u.layerId=n,u.measureIndex=r,u.dimValue=o.qText,i.push(u)}return i},calculate:(e,t,n)=>(0,s5[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e}),findMinMax:l5}}(e)}var d5={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},f5={color:"#f93f17",index:9};const{isDark:h5}=jv,p5={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},m5=({layoutService:e,viewState:t,colorModel:n,chart:r,env:i,keys:{colorScale:o},isEnabled:a=(()=>!1)})=>{const{translator:s}=i,l=[p5],c=[],u=[],d=u5(e,t);e.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach(((e,t)=>{Array.isArray(e.qTrendLines)&&(c.push(...e.qTrendLines),u.push(...e.qTrendLines.map((()=>t))))}));return{query:{hasTrendLines:()=>!!c.length&&a(),getData:()=>l,getStroke:UE((e=>{const{style:t}=c[e]||{},i=n.settings();if(t.autoColor){if("measure"===i.mode){const t=u[e],n=r.scale(o)(t);return h5(n)?function(e){const t=Tv(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(n):function(e){const t=Tv(e);return t.l-=5,t.toString()}(n)}return n.resolveUIColor(f5)}return t.paletteColor?n.resolveUIColor(t.paletteColor):"none"})),getLineDash:e=>{const{style:t}=c[e]||{};return t.lineDash},getLabel:e=>(c[e]||{}).label,getType:e=>{const{qType:t}=c[e]||{};return s.get(d5.TYPES[t])},getMinMax:()=>{let t=1/0,n=-1/0;return c.forEach((r=>{const i=d.findMinMax(e.meta.size.y,r);t=Math.min(i.min,t),n=Math.max(i.max,n)})),{min:t,max:n}},getCalculatedValue:(e,t,n)=>{const r=c[e];return d.calculate(r,t,n)}},command:{update:()=>{l.length=0,c.forEach(((e,t)=>{const n=d.generate(e,t,u[t]);l.push(...n)}))}}}};var g5={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const y5=({meta:e})=>e.isContinuous?({scale:e,datum:t})=>e(t.value):e.isGroupedByMeasure?({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2:({scale:e,datum:t})=>e(t.value)+e.bandwidth()/2,v5=(e,{layoutService:t,trendLineModel:n,dockService:r,animationsEnabled:i})=>{if(!n.query.hasTrendLines())return[];return[(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:r,dockService:i,animationsEnabled:o})=>{const a=y5(r);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:g5,settings:{connect:!0,orientation:i.meta.major.orientation,coordinates:{major:{scale:e,fn:a},minor:{scale:t},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:2,stroke:({datum:e})=>n.query.getStroke(e.layer.value),strokeDasharray:({datum:e})=>n.query.getLineDash(e.layer.value)}}},animations:{enabled:o,trackBy:HD.nonUpdatingNode.trackBy,compensateForLayoutChanges:HD.lines.compensateForLayoutChanges}}})(e,{trendLineModel:n,layoutService:t,dockService:r,animationsEnabled:i}),(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:r,dockService:i})=>{const o=y5(r),a="horizontal"===i.meta.major.orientation,s={scale:e,fn:o},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:g5,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:r})]};function b5(e,t){const{getLabel:n,getType:r,getLineDash:i,getStroke:o}=t.query;return({node:t,resources:a})=>{const s={type:"icon",style:{stroke:o(t.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":i(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:r(t.data.layer.value)}],style:{"min-width":"136px"}};return{title:t.data.dimValue.label,row:[s,l,{content:a.formatter(e.formatter)(t.data.minor.value)}]}}}function x5(e,{h:t,style:n}){return e.map((e=>{const r={style:{direction:"string"==typeof e.content?Ay.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(r.colspan=e.colspan);const i=function(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map((t=>e("span",{style:t.style,direction:Ay.detectTextDirection(t.content)},t.content)))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:"16px",x2:"16px",y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},t)}(e):t.content}(t,e);return t("td",r,i)}))}function w5(e,t){return({h:n,data:r,style:i})=>{const o=r[0].title,a=r.filter((e=>e.title===o)),s=[function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:Ay.detectTextDirection(t)},t);return e("tr",{},n)}(n,o)];if(a.slice(0,2).forEach((e=>{s.push(n("tr",{},x5(e.row,{h:n,style:i})))})),r.length>2){const i=r.length-2;s.push(...function(e,t,n,r){const i=t?t.get("Object.ChartTooltip.NMore",r):`+${r} more`,o=Ay.detectTextDirection(i);return[e("tr",{},e("td",{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:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:o},colspan:3},i))]}(n,e,t,i))}return s}}function S5(e,{trendLineModel:t,translator:n},r={}){if(!t.query.hasTrendLines())return!1;const{rtl:i}=r,o=Ty({key:e.tooltip,rtl:i});return ny(!0,o,{settings:{extract:b5(e,t),content:w5(n,i),placement:"pointer",direction:r.rtl?"rtl":"ltr"}})}function k5(e,t){const n=t.element.getBoundingClientRect();return{x:(e.center?e.center.x:e.clientX)-n.left,y:(e.center?e.center.y:e.clientY)-n.top}}function M5(e,{chart:t,viewState:n,trendLineModel:r,layoutService:i,rtl:o}){const{isContinuous:a}=i.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=k5(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:i}=r.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(r,a)=>{const l=k5(r,t),c=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(c.length){const r=function(e,t,n,r){let i=(e.x-t.rect.computed.x)/t.rect.computed.width;i=r?1-i:i;const{min:o,max:a}=n.get("zoom");return o+(a-o)*i}(l,a,n,o),s=t.scale(e.majorInnerScale),u=(null!=s&&s.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(r);c.forEach((e=>{e.data.dimValue.value=r,e.data.dimValue.label=u,e.data.minor.value=i(e.data.layer.value,r).y}))}return c}}return n=>{const r=t.component(e.tooltip);if(r&&(n=>t.componentsFromPoint({x:n.center?n.center.x:n.clientX,y:n.center?n.center.y:n.clientY}).some((t=>t.key===e.tooltipOverlay)))(n)){const e=l(n,r);return e.length?(r.emit("show",n,{nodes:e}),!0):(r.emit("hide"),!1)}return!1}}const C5=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},E5=e=>{C5(e),e.qMultiDimMode="Sum",e.qXColIx=0};function T5(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:r=!1}=e;return{show:(e,t,{layout:n})=>!by.dimensionless(n)&&!by.groupedByDimension(n)&&(r||!by.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:d5.HEADER,itemTitleRef:e=>{const n=typeof e.label;return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(d5.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:d5.ADD_BUTTON,add:E5,globalChange:e=>{const t=HE(e,"qHyperCubeDef.qMeasures",[]).reduce(((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e)),[]),r=(e=>!HE(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach((e=>{e.qContinuousXAxis=r})),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:d5.TYPE,options:[{value:Z2,translation:d5.TYPES.AVERAGE},{value:Q2,translation:d5.TYPES.LINEAR},{value:e5,translation:d5.TYPES.POLYNOMIAL2},{value:t5,translation:d5.TYPES.POLYNOMIAL3},{value:n5,translation:d5.TYPES.POLYNOMIAL4},{value:r5,translation:d5.TYPES.EXPONENTIAL},{value:i5,translation:d5.TYPES.LOG},{value:o5,translation:d5.TYPES.POWER}],defaultValue:Z2},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:f5,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:d5.STYLE.DASHED,type:"boolean",defaultValue:!0,change:C5}}}}var q5={};function D5(){D5.init.call(this)}q5.isObject=function(e){return"object"==typeof e&&null!==e},q5.isNumber=function(e){return"number"==typeof e},q5.isUndefined=function(e){return void 0===e},q5.isFunction=function(e){return"function"==typeof e};var N5=D5;D5.EventEmitter=D5,D5.prototype._events=void 0,D5.prototype._maxListeners=void 0,D5.defaultMaxListeners=10,D5.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},D5.prototype.setMaxListeners=function(e){if(!q5.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},D5.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],q5.isUndefined(n))return!1;if(q5.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(q5.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},D5.prototype.addListener=function(e,t){var n;if(!q5.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,q5.isFunction(t.listener)?t.listener:t),this._events[e]?q5.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,q5.isObject(this._events[e])&&!this._events[e].warned)&&((n=q5.isUndefined(this._maxListeners)?D5.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,q5.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),q5.isFunction(console.trace)&&console.trace()));return this},D5.prototype.on=D5.prototype.addListener,D5.prototype.once=function(e,t){if(!q5.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},D5.prototype.removeListener=function(e,t){var n,r,i,o;if(!q5.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||q5.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(q5.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},D5.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],q5.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},D5.prototype.listeners=function(e){return this._events&&this._events[e]?q5.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},D5.listenerCount=function(e,t){return e._events&&e._events[t]?q5.isFunction(e._events[t])?1:e._events[t].length:0};const A5={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"}}]};function O5(){const[t]=e.useState({}),[n]=e.useState({}),r=function(){var t,n,r,i;const o=e.useLayout(),a=e.useTranslator(),s=!(null==o||null===(t=o.qSelectionInfo)||void 0===t||!t.qInSelections),l=!(null==o||null===(n=o.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r||null===(i=r[0])||void 0===i||!i.qIsOneAndOnlyOne),[c,u]=e.useState(!1),[d,f]=e.useState(!1),[h,p]=e.useState({key:"lasso",enabled:()=>!1,active:()=>!1,action:()=>!1}),m=e=>{f("boolean"==typeof e?e:!d)};return e.useAction((()=>(p({key:"lasso",action:m,enabled:()=>c,active:()=>d}),{key:"lasso",label:a.get(d?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:A5,hidden:!c||!s||l,active:d,action:m})),[s,l,d,c,a.language()]),{get:()=>h,setAllows:e=>{u(!!e)}}}(),[i,o]=e.useState();return e.useEffect((()=>{const e={};e.scroll={key:"scroll",isActive:!0,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled(){const{layoutService:e,discrete:r}=t;return n.allowScroll&&((null==e?void 0:e.meta.isContinuous)||(null==r?void 0:r.query.getCanScroll()))}},e.interact={key:"interact",isEnabled:!0,enabled:()=>n.allowInteract},e.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action(e){this.isActive=!!e},active(){return this.isActive},enabled:()=>n.allowTooltip},e.select={key:"select",isActive:!1,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled:()=>n.allowSelect},e.lasso=r.get(),Object.keys(e).forEach((t=>{return n=e[t],Object.keys(N5.prototype).forEach((e=>{n[e]=N5.prototype[e]})),N5.init(n),n;var n})),o(e)}),[]),e.useEffect((()=>{i&&r&&(i.lasso={...i.lasso,...r.get()})}),[r]),{get:()=>i,setAllows:e=>{Object.assign(n,e),r.setAllows(null==e?void 0:e.allowSelect)},setContext:e=>{Object.assign(t,e)},destroy:()=>{Object.keys(i).forEach((e=>i[e].removeAllListeners()))}}}var L5={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}},I5={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",MAJOR_NUM:"majorNum",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",GHOST_BAR_OOB:"ghost-bar",STACK:"stack",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"},STYLING:{AXIS:"axis"}};function _5({layout:e}){const t=fy.canBeContinuous(e),n=by.continuous(e),r=by.dimensionless(e);return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:fy.isTime(n,e),isDimensionless:r,isSimple:by.simple(e),isGrouped:by.grouped(e),isGroupedByMeasure:by.groupedByMeasure(e),isGroupedByDimension:by.groupedByDimension(e),isStacked:by.stacked(e),isStackedByDimension:by.stackedByDimension(e),isStackedByMeasure:by.stackedByMeasure(e),isSnapshot:by.snapshot(e)}}const R5={extractDimsAndNode(e){const t=[];let n;return e.forEach((e=>{if(e.key===I5.COMPONENT.BAR){n=e;const r=HE(e,"data.selectionDimension",!1);r&&(t.push(r.label),r.label!==e.data.label&&t.push(e.data.label))}})),{nodeDims:t,node:n}}};function P5(e,t,n="/qHyperCubeDef"){return{fetch(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(wy).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.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:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize")}}}))}(e,t,this.settings())},settings(){const e=t.getHyperCubeValue("qDimensionInfo"),r=t.meta.isStacked&&e.length>1?1:0,i=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:r,qWidth:e.length+i.length+r,qHeight:Math.min(2e3,1e4/(i.length+1))},zoomLevel:-1,filter:"D1"}}}}function z5({enigma:e,layoutService:t,viewModel:n,definitionPath:r,reducedHyperCubePath:i},o={}){const a=P5(e,t,r),s=function(e,t="reducedHyperCube"){return{fetch:()=>Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}(t,i),l=function(e){return{fetch:()=>{const t=e.getHyperCube(),n={...t,qDataPages:t.qDataPages.slice()};return Promise.resolve({reducedCube:n})}}}(t),c=function({layoutService:e}){const{isSnapshot:t,isStackedByDimension:n}=e.meta,r=e=>{e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return r.should=e=>t&&n&&1===e.qDimensionInfo.length,r}({layoutService:t}),u={mode:{isReduced:!1}};return{fetch(){if(t.meta.isSnapshot)return s.fetch();if(t.meta.isContinuous)return l.fetch();if(!t.meta.isStacked){if(t.getHyperCubeValue("qSize.qcy",NaN)===t.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN))return l.fetch()}return a.fetch()},model:()=>u,update(e){var r;c.should(e)&&c(e),u.mode=ny(u.mode,t.meta),u.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,u.mode.isStackedByDimension=u.mode.isStacked&&(2===(r=e).qDimensionInfo.length&&2===r.qMeasureInfo.length),u.mode.isStackedByMeasure=u.mode.isStacked&&function(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}(e),u.fields={major:u.mode.isStackedByDimension?"qDimensionInfo/"+(e.qDimensionInfo.length-1):n.fields.major,majorGroup:n.fields.majorGroup,minor:u.mode.isStackedByDimension?e.qMeasureInfo.map(((e,t)=>"qMeasureInfo/"+t)):n.fields.minor},u.scales={major:I5.SCALE.REDUCED.MAJOR,minor:I5.SCALE.REDUCED.MINOR},u.cube=e,o.qDataPages=e.qDataPages},fetchMinMaxData(){if(o.qDataPages)return Promise.resolve(o.qDataPages);let n=a.settings();const r="K"===t.getHyperCubeValue("qMode")?1:n.rect.qHeight;return n=ny(!0,{},n,{rect:{qHeight:r}}),e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).then((e=>e))},setSnapshotData(e){e.reducedHyperCube=u.cube}}}function F5({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:r,selectionInfo:i}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==i.event&&r({componentName:"continuousRangeBrush",brushName:!1})}function j5({layout:e,defaultAuto:t}){return e.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:e.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:t(e)}function B5({picasso:t,chart:n,environment:r,viewState:i,viewCache:o}){const a=e.useStaleLayout(),s=e.useModel(),l=e.useApp(),c=e.usePlugins(),u=e.useSelections(),d=e.useOptions(),[f,h]=e.useState(),[p,m]=e.useState(),[g,y]=e.useState(),v=e.useConstraints(),b=O5();return e.useEffect((()=>{if(!n)return()=>{};const e=b.get(),t=function({chart:e,actions:t,selections:n}){const r=e.scale(I5.SCALE.MAIN.MAJOR);return kD({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:r,selectionActions:{clear:F5},custom:{getActions:()=>t},setBrushAliases({defaultFunc:e,brush:t}){e(),t.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),t.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}})}({chart:n,actions:e,selections:u});return m(e),y(t),()=>{t.destroy(),b.destroy()}}),[n]),e.useEffect((()=>{if(!v)return;const e={allowScroll:!v.active,allowInteract:!v.active,allowTooltip:!v.passive,allowSelect:!v.select&&!v.active};b.setAllows(e)}),[v]),e.useEffect((()=>{if(!g||!r)return;const{theme:e,translator:u,localeInfo:f,flags:m,embed:y}=r,{direction:v="ltr"}=d,x=ZE({source:a,metaAdditionsFn:_5,experimental:{filter:m.isEnabled("IM_1579_HIDE_DIM_MEA")}});g.setFilteredFields(x.meta.filteredFields);const w=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(x.getLayout())?ZE({source:x.getLayout()}):void 0,S=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:a,options:d}),k=function({layoutService:e,viewCache:t,flags:n,options:r}){const i={};return i.fields=function(e){const{meta:t}=e,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/"+(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map(((e,t)=>"qDimensionInfo/"+t)),minor:e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>"qMeasureInfo/"+t))};return n.majorNumeric=(t.isStackedByDimension?n.majorStack:n.major)+":numeric",n}(e),i.selectionDimensionIdx=(e=>{const t=e.qDimensionInfo.length;for(let n=0;n<t;n++){const r=e.qDimensionInfo[n];if(!(r.qLocked||r.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}})(e.getHyperCube()),i.isDimensionLocked=t=>e.getHyperCube().qDimensionInfo[t].qLocked,i.selectionDimensionProp=e=>void 0===i.selectionDimensionIdx||void 0!==e&&i.selectionDimensionIdx!==e?{}:{selectionDimension:{field:i.selectionDimensionIdx}},i.animations={enabled:()=>!1!==r.chartAnimations&&!!n.isEnabled("IM_1355_ANIMATIONS_BAR")&&!(i.animations.isPartialUpdating||i.animations.isSizeChanging||i.animations.hasSlicedHats)&&!HD.propertiesHaveChanged({viewCache:t,layout:e.getLayout()}),isPartialUpdating:!1,isSizeChanging:!1,hasSlicedHats:!1},i}({layoutService:x,viewCache:o,flags:m,options:d}),M=BE({chart:n,layoutService:x,config:{logicalSize:S,rtl:"rtl"===v},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),C=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:ND(a),styles:void 0};return d.styles=OD({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=OD({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:e,config:{id:"barChart",transform:[["label.value.fontSize",e=>parseInt(e,10)]]}}),E=function({layoutService:e,themeService:t,flags:n}){const r=t.getStyles(),i=t=>n.isEnabled("CLIENT_IM_747")?(e.getLayoutValue("components",[])||[]).find((e=>e.key===t)):void 0;return{axis:{title:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,h,p;return{fontFamily:null!==(e=null===(t=i("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(o=n.title)||void 0===o?void 0:o.fontFamily)&&void 0!==e?e:r.axis.title.fontFamily,fontSize:null!==(a=null===(s=i("axis"))||void 0===s||null===(l=s.axis)||void 0===l||null===(c=l.title)||void 0===c?void 0:c.fontSize)&&void 0!==a?a:r.axis.title.fontSize,color:null!==(u=null===(d=i("axis"))||void 0===d||null===(f=d.axis)||void 0===f||null===(h=f.title)||void 0===h||null===(p=h.color)||void 0===p?void 0:p.color)&&void 0!==u?u:r.axis.title.color}}},label:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,h,p,m,g,y;return{fill:null!==(e=null===(t=i("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(o=n.label)||void 0===o||null===(a=o.name)||void 0===a||null===(s=a.color)||void 0===s?void 0:s.color)&&void 0!==e?e:r.axis.label.name.color,fontSize:null!==(l=null===(c=i("axis"))||void 0===c||null===(u=c.axis)||void 0===u||null===(d=u.label)||void 0===d||null===(f=d.name)||void 0===f?void 0:f.fontSize)&&void 0!==l?l:r.axis.label.name.fontSize,fontFamily:null!==(h=null===(p=i("axis"))||void 0===p||null===(m=p.axis)||void 0===m||null===(g=m.label)||void 0===g||null===(y=g.name)||void 0===y?void 0:y.fontFamily)&&void 0!==h?h:r.axis.label.name.fontFamily}}}},label:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,h,p;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(n=t.label)||void 0===n||null===(o=n.value)||void 0===o||null===(a=o.color)||void 0===a?void 0:a.color)&&void 0!==e?e:r.label.value.color,fontSize:null!==(s=null===(l=i("label"))||void 0===l||null===(c=l.label)||void 0===c||null===(u=c.value)||void 0===u?void 0:u.fontSize)&&void 0!==s?s:r.label.value.fontSize,fontFamily:null!==(d=null===(f=i("label"))||void 0===f||null===(h=f.label)||void 0===h||null===(p=h.value)||void 0===p?void 0:p.fontFamily)&&void 0!==d?d:r.label.value.fontFamily}}}}}({layoutService:x,themeService:C,flags:m}),T=H0.model({model:s,layoutService:x,viewCache:o,viewState:i}),q=z5({enigma:s,layoutService:x,viewModel:k});!function({layoutService:e,viewState:t,viewStateOptions:n={}}){const r=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):n;t.preventSet("scrollOffset",r.scrollOffset),t.preventSet("legendScrollOffset",r.legendScrollOffset||0),r.zoom&&t.preventSet("zoom",r.zoom)}({layoutService:x,viewState:i,viewStateOptions:null==d?void 0:d.viewState});const D=function({app:e,model:t,translator:n,picasso:r,localeInfo:i,theme:o,continuousDataModel:a,layoutService:s,legendLayoutService:l,reducedDataModel:c}){const{isContinuous:u,isStacked:d}=s.meta,f={main:void 0,mini:{getScales:()=>({}),getColor:()=>e=>e,getDatumProps:()=>({}),getAuxiliarySettings:()=>{}}};return{initialize:()=>{const h=[],{isReduced:p}=c.model().mode,m=u||p||d,g=!u&&(p||d)&&l?l.getHyperCube():void 0,y=g?"legendCube":void 0;return f.main=AE({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:j5,key:I5.SCALE.MAIN.COLOR},createConfig:()=>({hc:m?g||s.getHyperCube():c.model().cube,source:m?y:"miniCube",theme:o})}),h.push(f.main.initialize()),u&&(f.mini=AE({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:j5,key:I5.SCALE.REDUCED.COLOR},createConfig:()=>({layout:a.getInitialLayout(),hc:a.getInitialCube(),source:"miniCube",theme:o})}),h.push(f.mini.initialize())),Promise.all(h)},getMain:()=>f.main,getMini:()=>f.mini}}({picasso:t,model:s,app:l,translator:u,localeInfo:f,theme:e,continuousDataModel:T,layoutService:x,legendLayoutService:w,reducedDataModel:q}),N=m5({layoutService:x,viewState:i,colorModel:{settings:()=>D.getMain().getSettings(),resolveUIColor:e=>D.getMain().getPaletteColor(e)},chart:n,env:r,keys:{colorScale:I5.SCALE.MAIN.COLOR},isEnabled:()=>!x.meta.isGroupedByDimension&&(!x.meta.isStackedByDimension||m.isEnabled("TRENDLINES_STACKED_DIM"))&&!x.meta.isDimensionless});s2.attrExpr.updateProperties(s,a);const A=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:e2,miniChartToken:{},embed:s}}({layout:a,app:l,model:s,picasso:t,chart:n,translator:u,localeInfo:f,embed:y,extractDimsAndNode:R5.extractDimsAndNode});let O;x.meta.isDiscrete&&(O=J2({chart:n,actions:p,componentKey:I5.COMPONENT.BAR,enigmaModel:s,layoutService:x,dockService:M,trendLineModel:N,itemWidths:L5,viewState:i,rtl:"rtl"===v,options:{axisKey:I5.COMPONENT.BAR_AXIS,renderer:t.renderer("svg")()}}));const L=XD({layoutService:x,discreteModel:O}),I=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:I5.SCALE.MAIN.MINOR,MAJOR:I5.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:I5.COMPONENT.BAR,BAR_AXIS:I5.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:I5.COLLECTION.MAIN}}}}(x),_=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return oM(nM().mark((function e(){var r,a,s,l;return nM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=oM(nM().mark((function e(n){var r;return nM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(tM({},i));case 4:if("object"===rM(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(tM({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,cM(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=lM(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=xM(!0,{},n.brush);xM(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===rM(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=QE({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=QE({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:t,plugins:c||[],pluginArgs:I});b.setContext({discrete:O,layoutService:x}),h({discrete:O,continuous:H0,legendLayoutService:w,layoutService:x,viewModel:k,dockService:M,themeService:C,styleService:E,continuousDataModel:T,reducedDataModel:q,colorService:D,trendLineModel:N,refLineModel:L,pluginService:_,customTooltipModel:A,selectionService:g,logicalSize:S})}),[g,d,r,a]),f}function H5(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function V5(e){return e.some(H5)}function W5(e,t){let n=NaN,r=NaN;return e.forEach((e=>{V5(e)||e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),r=Number.isNaN(r)?e.qNum:Math.max(e.qNum,r))}))})),{min:n,max:r}}function U5(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const r=e.getLayoutValue("measureAxis.minMax");"min"!==r&&"minMax"!==r||(t=+e.getLayoutValue("measureAxis.min")),"max"!==r&&"minMax"!==r||(n=+e.getLayoutValue("measureAxis.max"))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function $5(e,t){let n=NaN,r=NaN;return e.forEach((e=>{if(!V5(e)){let i=0,o=0;e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?o+=e.qNum:i+=e.qNum)})),n=Number.isNaN(n)?i:Math.min(i,n),r=Number.isNaN(r)?o:Math.max(o,r)}})),{min:n,max:r}}function Y5(e,t){const n={};e.forEach((e=>{if(!V5(e)){const r=e[0].qElemNumber;n[r]=n[r]?n[r]:{min:0,max:0,cId:r},e.slice(t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[r].max+=e.qNum:n[r].min+=e.qNum)}))}}));let r=NaN,i=NaN;return Object.keys(n).forEach((e=>{r=Number.isNaN(r)?n[e].min:Math.min(n[e].min,r),i=Number.isNaN(i)?n[e].max:Math.max(n[e].max,i)})),{min:r,max:i}}function K5(e){return"number"==typeof e&&!Number.isNaN(e)}function G5(e){const t=e.getHyperCubeValue("qMeasureInfo");return{min:Math.min(...t.filter((e=>K5(e.qMin))).map((e=>e.qMin))),max:Math.max(...t.filter((e=>K5(e.qMax))).map((e=>e.qMax)))}}function X5(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function J5(e){return!Number.isNaN(+e.qNum)}function Z5(e){return e.qNum}function Q5(e){return!Number.isNaN(+e.qNum)}function e3(e){return e.qNum}function t3(e,t){return e.push(...t),e}const{getValueWithOffset:n3,isNumber:r3}=mk;function i3(e,t){return Math.abs(e/t)<5||0===t}function o3({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:r=$5,stackedByDimensionExtractor:i=Y5,straightExtractor:o=W5,measureInfoExtractor:a=G5,explicitExtractor:s=U5}=n,{meta:l}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:r,count:i}){let o,a;if(Array.isArray(n)?({min:o,max:a}=this.extractFromStacked(n)):({min:o,max:a}=this.extractFromStraight(e,i)),t.query.hasTrendLines()){const{min:e,max:n}=t.query.getMinMax();o=Number.isFinite(e)?Math.min(o,e):o,a=Number.isFinite(n)?Math.max(a,n):a}const{min:s,max:l}=this.extractOthers(r),c=this.extractExplicit(),u=[0,o,a].filter((e=>r3(e)));let d=Math.min(...u),f=Math.max(...u);d=i3(s,d)?Math.min(d,s):d,f=i3(l,f)?Math.max(f,l):f;const h=[c.explicitMin,c.explicitMax,d,f].filter((e=>r3(e)));return o=Number.isNaN(c.explicitMin)?Math.min(...h):c.explicitMin,a=Number.isNaN(c.explicitMax)?Math.max(...h):c.explicitMax,o===a&&(Number.isNaN(c.explicitMin)?o=n3(o,-.2):Number.isNaN(c.explicitMax)&&(a=n3(a,.2))),{min:o,max:a,implicitMin:d,implicitMax:f,otherMin:s,otherMax:l,hasOtherMin:s<o,hasOtherMax:l>a,...c}},extractExplicit(){const{min:t,max:n,isExplicitMin:r,isExplicitMax:i}=s(e);return{hasExplicitMinMax:r||i,hasExplicitMin:r,hasExplicitMax:i,explicitMin:t,explicitMax:n}},extractFromStacked:e=>function(e){return e.length?{min:Math.min(...e[0].qSubNodes.map((e=>e.qMinNeg))),max:Math.max(...e[0].qSubNodes.map((e=>e.qMaxPos)))}:{min:0,max:0}}(e.length?e[0].qData:[]),extractFromStraight(t,n){const s=t.length?t[0].qMatrix:[];return l.isStackedByMeasure?r(s,n):l.isStackedByDimension?i(s,n):e.getHyperCubeValue("qHasOtherValues")?o(s,n):a(e)},extractOthers:e=>l.isStackedByDimension?function(e){const t=X5(HE(e,"0.qData.0.qSubNodes",[]),H5,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):l.isGroupedByDimension?function(e){const t=HE(e,"0.qMatrix",[]).filter(V5).reduce(t3,[]).filter(Q5).map(e3);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=X5(HE(e,"0.qMatrix",[]),V5,[]).filter(J5).map(Z5);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function a3(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:r,getHyperCubeValue:i}=t,o=e=>!e.length&&r.mode.K,a=e=>{const t=i("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=i("qMeasureInfo").length,s=i("qDimensionInfo").length,l=i("qHasOtherValues");if(!r.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(r.isContinuous){const e=r.isStackedByDimension?s:t;return n.fetchMinMaxData().then((t=>({qDataPages:t,count:e})))}const c=r.isStackedByDimension?1:t;return e.fetchMinMaxData().then((e=>{if(o(e))return a(l);let t=[];return l&&(t=r.mode.K?i("qStackedDataPages",[]):i("qDataPages",[])),{qDataPages:e,count:c,others:t}}))}}}(e),n=o3(e);return t.resolve().then((e=>n.extract(e)))}const s3="lasso",l3=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:s3,enable(e,n){if(this.started===s3||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.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!==s3&&(i.actions.select.emit("start",s3),this.chart.component(e).emit("lassoStart",t),this.started=s3)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",s3),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const c3=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.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:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),f=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&f&&f.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.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,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(f&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,f,{nodes:n,opts:o,customTooltipModel:e})}else f.emit("show",t,{nodes:d})}else h&&f.emit("hide")}}}};const u3=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({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&&(!!i.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 d3=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:"event:"+t,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.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+"-"))}(i,t)?(this.started=e,!0):a.length>0}},events:{[e+"start"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.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 o.updateOnMove&&o.updateOnMove(this.chart)},[e+"end"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(a+"End",n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function f3(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:f}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>"@"+e)).join(",")},on:f?{bubbleEnd(){f()}}:{},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:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=d3(e,t,"range");return{interactions:[e.onEdited?u3(e,t):null,r].filter(Boolean),components:[n]}}const h3={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}},p3="inner-time-axis",m3="outer-time-axis";const g3={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:r}=n[t];return r},getDimensionSize(e){var t;const n=null==e||null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal,{qLocked:r=0,qOption:i=0,qSelected:o=0}=(null==e?void 0:e.qStateCounts)||{};return[void 0,0].includes(n)?r+i+o:n}},y3={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const r=t?0:e.qDimensionInfo.length-1;n=g3.getMaxGlyphCount(e,r)}else e.qMeasureInfo.forEach((e=>{n=Math.max(n,e.qFallbackTitle.length)}));return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?HE(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=y3.getAxisData(e,t),r=!e.qDimensionInfo.length,i=r||t?void 0:e.qDimensionInfo.length-1,o=y3.getMajorAxisMaxGlyphCount(e,t),a=r?"qFallbackTitle":"qText";return My.getAdjustedMaxGlyphCount(o,n,i,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=y3.getAxisData(e),n=g3.getMaxGlyphCount(e,0);return My.getAdjustedMaxGlyphCount(n,t,0)}};var v3=3,b3=13;function x3(e,t,n,r){const{meta:i}=t.layoutService,o=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);i.isContinuous?o.push(...function(e,t,n,r){const{meta:i}=t.layoutService,{axis:o,grid:a}=t.themeService.getStyles(),s=t.styleService.axis.label.getStyle(),{auto:l,spacing:c}=t.layoutService.getLayoutValue("gridLine",{}),u=[],d="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,f=h3[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode,h={type:"grid-line",x:{},layout:{minimumLayoutMode:h3.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color},animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.lines.trackBy,compensateForLayoutChanges:HD.lines.compensateForLayoutChanges}},p=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(i.isTime){if(d){const e=n?"end":"start",r=n?1:0,i="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},majorGuideLine:{stroke:o.line.major.color},minorGuideLine:{stroke:o.line.minor.color}},d={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},preferredSize:()=>({size:2*parseFloat(s.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:i,justify:r},guideLine:{major:{justify:r},minor:{align:i}}},style:a,animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.axes.trackBy({isTime:!0}),compensateForLayoutChanges:HD.axes.compensateForLayoutChanges({isTime:!0})}};u.push(ny(!0,{},d,{key:p3,scale:I5.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!l&&0===c}},style:ny(!0,{},a,{line:{stroke:o.line.major.color},majorGuideLine:{stroke:o.line.minor.color},minorGuideLine:{stroke:o.line.major.color}})})),u.push(ny(!0,{},d,{key:m3,scale:I5.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),u.push({type:"axis-overlay",key:"outer-axis-overlay",scale:I5.SCALE.MAIN.MAJOR,layout:{dock:"@outer-time-axis",minimumLayoutMode:f}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:I5.SCALE.MAIN.MAJOR_INNER,layout:{dock:"@inner-time-axis",minimumLayoutMode:f}}),u.push(p)}return u.push(ny(!0,{},h,{key:"inner-time-grid",x:{scale:I5.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),u.push(ny(!0,{},h,{key:"outer-time-grid",x:{scale:I5.SCALE.MAIN.MAJOR}})),u}if(i.isContinuous){const e="continuous-axis";d&&(u.push({type:"axis",key:e,scale:I5.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},settings:{labels:{align:0,offset:4,fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},ticks:{show:!0,stroke:o.line.major.color},line:{show:!r},minorTicks:{show:!1}},animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:HD.axes.compensateForLayoutChanges({isContinuous:!0})}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:I5.SCALE.MAIN.MAJOR,layout:{dock:"@"+e,minimumLayoutMode:f}}),u.push(p)),u.push(ny(!0,{},h,{key:"continuous-grid",x:{scale:I5.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return u}(e,t,n,r)):o.push(...function(e,t,n,r){if("none"===e.dimensionAxis.show)return[];const{meta:i}=t.layoutService,o=t.themeService.getStyles(),a=[],s=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),l=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),c="horizontal"===t.dockService.meta.major.orientation,u=c?e.dimensionAxis.label:"auto",d="horizontal"===u?void 0:t.dockService.meta.minor.size/4,f=t.styleService.axis.label.getStyle(),h={type:"axis",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:h3[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:u,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,...f},line:{show:!r,stroke:o.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:HD.axes.compensateForLayoutChanges({isHorizontal:c})}};l&&a.push(ny(!0,{},h,{key:"group-axis",scale:I5.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":h.settings.labels.mode,maxGlyphCount:y3.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(c||!s)&&h.settings.line.show}}}));const p=y3.getBarAxisMaxGlyphCount(e.qHyperCube,i.isStackedByDimension);return s&&a.push(ny(!0,{},h,{key:I5.COMPONENT.BAR_AXIS,scale:I5.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:p,maxLengthPx:d,tiltThreshold:p>v3&&p<b3?1:void 0},line:{show:!(c&&l)&&h.settings.line.show}}})),c||2!==a.length?a:[a[1],a[0]]}(e,t,n,r));const l=t.themeService.getStyles(),c=t.styleService.axis.label.getStyle();return a&&o.push({type:"axis",key:"y-axis",formatter:I5.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:h3.measureAxis.minimumLayoutMode},scale:I5.SCALE.MAIN.MINOR,settings:{labels:{show:s,...c},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}},animations:{enabled:t.viewModel.animations.enabled,trackBy:HD.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:HD.axes.compensateForLayoutChanges({isMeasure:!0,dock:t.dockService.meta.minor.dock})}}),o}var w3={BAR:{WIDTH:.7,STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function S3({layoutService:e,discrete:t,componentKey:n}){var r;const{isContinuous:i,isGrouped:o}=e.meta;if(i)return 1;const a=(e.getLayoutValue("components",[])||[]).filter((e=>e.key===n))[0];if(null!=a&&null!==(r=a.style)&&void 0!==r&&r.width){const{style:e}=a;return e.strokeWidth&&"none"!==e.strokeWidth?function(){const n=w3.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),r=e.width+n;return r>1?e.width-(r-1):e.width}:e.width}return o?.9:.7}const k3={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function M3(e,t,n={}){return({data:r})=>{const i=e.chart.component(t).rect;if(!r.items.length||!i)return 2;const{min:o,max:a}=e.viewState.get("zoom");if(n[[o,a]])return n[[o,a]];const s=k3[ly.getLayoutMode(i.width,Number.MAX_VALUE)];n={};const l=Math.abs(a-o),c=Math.abs(e.viewCache.get("continuousMax")-e.viewCache.get("continuousMin"));if(0===c)return s;const u=function(e,t,n){return e*(1-n)+t*n}(2,s,1-Math.min(l/c/.2,1));return n[[o,a]]=Math.max(2,Math.min(s,u)),n[[o,a]]}}function C3(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r<=0}function E3(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r>=0}function T3(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r>0}function q3(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r<0}const D3="max",N3="min",A3={min:"Min",max:"Max"};function O3(e,t,n){return void 0===n?C3(e,t)||E3(e,t):n===D3?C3(e,t):E3(e,t)}function L3({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e["hasExplicit"+A3[t]]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===D3?e.implicitMax:e.implicitMin;return!O3(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function I3(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,dockService:o,themeService:a}=e,s=i.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===D3?s.implicitMax:s.implicitMin;if(!O3(Number(l.toFixed(13)),s,n))return!1;const{orientation:c}=t.settings,u=n===D3?o.meta.minor.end:o.meta.minor.start;let d="end";r&&(d=n===D3?"sumOfPositives":"sumOfNegatives");const f=a.getStyles();return{type:"box-out-of-bounds",key:"bar-oob-"+n,layout:{dock:u},data:t.data,brush:t.brush,settings:{orientation:c,major:t.settings.major,minor:t.settings.minor,dockValue:Sy.getDockValue(u),oob:ny({},t.settings.box,{fill:f.outOfRange.color,alignment:1,opacity:1,show:function(e){var t;return!0!==(null===(t=e.datum.null)||void 0===t?void 0:t.value)&&((!r||0!==e.datum[d].value)&&O3(e.datum[d].value,s,n))}})},animations:{enabled:e.viewModel.animations.enabled,compensateForLayoutChanges:HD.barOobs.compensateForLayoutChanges}}}function _3(e){return Math.min(Math.max(0,e),1)}const R3=(e,{chart:t,type:n,componentKey:r,collectionKey:i})=>{const{layoutService:o,dockService:a,viewCache:s}=e,{isStacked:l}=o.meta,c=s.get("minorMinMax"),{meta:u}=e.layoutService;if(!L3({minorMinMax:c,type:n}))return!1;let d;u.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:u.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);return{type:"box",key:`${I5.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:i},settings:{orientation:a.meta.minor.orientation,major:{scale:I5.SCALE.MAIN.MAJOR,fn:d},minor:{scale:I5.SCALE.MAIN.MINOR,start(e){var n,r;return _3(t.scale(I5.SCALE.MAIN.MINOR)((null==e||null===(n=e.datum)||void 0===n||null===(r=n.start)||void 0===r?void 0:r.value)||0))},end(e){const r=t.scale(I5.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r[n]();return _3(r(o))}},box:{width:S3({layoutService:e.layoutService,discrete:e.discrete,componentKey:r}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const r=t.scale(I5.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r.max();return"max"===n?o>r.max():o<r.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function P3(e,t){const{style:n,styleService:r,dockService:i}=t,o=r.label.getStyle(),a=o.fill!==n.color||e.onBackground?o.fill:function(e){return function(t){return jv.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}(n),s="horizontal"===i.meta.major.orientation,l=e.padding||{left:s?0:4,right:s?0:4,top:s?4:0,bottom:s?4:0};return{position:e.position,justify:e.justify,fill:a,overflow:e.overflow,background:e.background,padding:l}}function z3(e){return{placements:e.simplifiedPlacements.map((t=>P3(t,e))),label:e.label}}function F3(e,t){if(t){if(function(e,t){return C3(e,t)}(e,t))return-1;if(function(e,t){return E3(e,t)}(e,t))return 1}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)}function j3(e,t,n,r){const i=F3(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}function B3(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!r||!i&&!!n.showSegmentLabels}function H3(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!!r&&(!!i||!1!==n.showTotalLabels)}function V3(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}function W3({layout:e,component:t,minorScale:n},r,i){if(!B3(e,r))return!1;const{viewModel:o,ds:a,viewCache:s,layoutService:l,dockService:c,themeService:u}=r,{meta:d}=l,f=s.get("minorMinMax"),h=u.getStyles(),p=r.styleService.label.getStyle();let m;!d.isStacked&&(m=d.isStacked?1:0);const g=0===m?1:0,y=d.isStacked?.5:1,v=o.fields.minor[0],b=void 0===v?void 0:a.field(v).formatter();let x,w=-1;x=d.isStacked?d.isStackedByMeasure||!b?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>w?b(e.data.segment.value):""}:function(e){return e.data.end.label};const S={label:x,simplifiedPlacements:V3(m,g,y,d.isContinuous),style:h.label.value},k=[z3(ny(r,S))],M={key:"bar-labels",type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>j3(e.data.end.value,c.meta.minor.orientation,i,f),labels:k,fontSize:parseInt(p.fontSize,10),fontFamily:p.fontFamily,linkData:HD.labels.linkData}}}]},animations:{enabled:r.viewModel.animations.enabled,trackBy:HD.labels.trackBy,compensateForLayoutChanges:HD.labels.compensateForLayoutChanges}};return d.isStackedByDimension&&b&&(M.beforeRender=()=>{w=function(e,t,n){const r="vertical"===t.dockService.meta.minor.orientation?"height":"width",i=t.chart.component(e),o=i&&i.rect?i.rect[r]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/o}(t,r,n)}),M}const U3={isSameMeasureAndColorRow:(e,t,n)=>t&&e&&t[0].content[0]===e[0].content[0]&&t[0].content[1]===e[0].content[1]&&t[1].content[n?0:1]===e[1].content[0],getTitle(e,t){const n=e.data;let r;return t.isStackedByDimension?r=n.stack?n.stack.label:void 0:t.isGroupedByDimension&&(r=n.group?n.group.label:void 0),void 0!==r?`${n.label}, ${r}`:n.label},getMeasure(e,t,n,r,i){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;const o=t.data,a=n.isStacked?r.viewModel.fields.minor[n.isStackedByDimension?0:o.measureIndex.value]:void 0,s=n.isStacked?{source:{key:o.source.key,field:a},label:!0===(null===(l=o.null)||void 0===l?void 0:l.value)?"":n.isStackedByDimension&&i?i(o.segment.value):o.segment.label}:o.end;var l;return Oy.getMeasure(e,s)},getMeasures(e,t,n,r,i){const o=e.resources.dataset;return t.map((e=>U3.getMeasure(o,e,n,r,i))).filter(Boolean)},getCustomTooltipAttrExps(e,t,n){const r=e.resources.dataset;return i2({nodes:t,layout:n.layoutService.getLayout(),dataset:r})},extractBarTooltipData(e,t,n,r,i){const o={title:U3.getTitle(t,n),color:Oy.getColor(e,t,r),measures:U3.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,r,i)};if(U3.useCustomTooltip(r)){var a,s,l,c;const n=U3.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],r);o.customMeasures=n.customTooltipAttrExpsArr,o.customTitle=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===B1.CUSTOM.TITLE)),o.customDescription=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===B1.CUSTOM.DESCRIPTION));let i=[];(t.childrenNodes?t.childrenNodes:[t]).forEach((e=>{var t;(null===(t=e.data.customTooltipImages)||void 0===t?void 0:t.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(i=e.data.customTooltipImages)})),i.length>0&&(o.customImages=i);const p=r.layoutService.getLayout();var u,d,f,h;if(null!==(a=p.tooltip)&&void 0!==a&&null!==(s=a.chart)&&void 0!==s&&null!==(l=s.object)&&void 0!==l&&l.refId&&r.app&&r.customTooltipModel.embed&&"function"==typeof(null===(c=r.customTooltipModel.model)||void 0===c?void 0:c.getEffectiveProperties))if(null!==(u=(d=r.app).isInModalSelection)&&void 0!==u&&u.call(d)){if((null==p||null===(f=p.qHyperCube)||void 0===f||null===(h=f.qDimensionInfo)||void 0===h?void 0:h.length)>0){X1.destroyVisualization({customTooltipModel:r.customTooltipModel});const e=r.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");o.customLimitation=e}}else{const t=X1.createContainer({ctx:e,layout:p});o.customChart=t}}return o},getTotalStackTitle:(e,t)=>e>0?t?t.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives":e<0?t?t.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives":"",extractStackTotalBarTooltipData:(e,t,n)=>({title:e.data.label,measures:[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter((e=>0!==e)).map((e=>({label:""+U3.getTotalStackTitle(e,t),value:n?n(e):e})))}),extractTooltipData(e,t){const n=t.chart.formatter(I5.FORMATTER.MINOR),{meta:r}=t.layoutService,i=e.node.childrenNodes?e.node.childrenNodes:[e.node],o=Math.max(0,i.length-6);i.length=Math.min(i.length,6);const{stackTotalBarNodes:a}=e.node,s=a&&a.length?a.map((e=>U3.extractStackTotalBarTooltipData(e,t.translator,n))):[];return{barTooltipData:i.map((i=>U3.extractBarTooltipData(e,i,r,t,n))),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:o}},extractBarNodeData(e,t,n,r,i,o,a){let s=!i&&Oy.getTitleRow(t,r);const l=Oy.hideColorRow(t,n),c=!o&&!l&&Oy.getColorRow(e,t,r),u=t.measures.map((i=>!a&&Oy.getMeasureRow(i,e,t,r,l&&i.field===n.coloring.field))).filter((e=>!U3.isSameMeasureAndColorRow(e,c,r)));if(U3.useCustomTooltip(n)){const n=i?[]:t.customMeasures.map((n=>Oy.getMeasureRow(n,e,t,r,!1))),o=!(!t.customTitle[0]||i)&&Oy.getTitleRow(t.customTitle[0],r),a=!(!t.customDescription[0]||i)&&Oy.getDescriptionRow(t.customDescription[0],r);s=!U3.shouldIgnoreTitleRowForCtt(o,a,u,n)&&s;const l=[o,a,s,c,...u,...n];if(t.customChart&&l.push(t.customChart),t.customLimitation&&l.push(e2.getFooterRow(t.customLimitation,r)),t.customImages){const n=t.customImages.map((t=>e2.getImageRow(t,e)));l.push(...n)}return l.filter(Boolean)}return[s,c,...u].filter(Boolean)},extractStackTotalBarNodeData:(e,t,n)=>[!!t.measures.length&&Oy.getTitleRow(t,n),...t.measures.map((r=>Oy.getMeasureRow(r,e,t,n,!1)))].filter(Boolean),useCustomTooltip:e=>HE(e,"customTooltipModel.useCustomTooltip",!1),shouldIgnoreTitleRow:(e,t)=>e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension,shouldIgnoreTitleRowForCtt:(e,t,n,r)=>!1===n[0]&&0===r.length&&(e.length>0||t.length>0),shouldIgnoreColorRow:(e,t)=>t>0&&(e.isGroupedByMeasure||e.isStackedByMeasure),shouldIgnoreMeasureRow:(e,t,n)=>e&&t.measures.some((e=>e.field===n.coloring.field)),shouldIgnoreDefaultRows:(e,t)=>U3.useCustomTooltip(t)&&HE(e,"tooltip.hideBasic",0),extractBarsData(e,t,n,r){const{meta:i}=t.layoutService,o=t.layoutService.getLayout(),a=r.length;let s,l,c=[];const u=U3.shouldIgnoreDefaultRows(o,t);for(s=0;s<a;s++){l=r[s];const o=U3.shouldIgnoreTitleRow(i,s),d=u||U3.shouldIgnoreColorRow(i,s),f=u||U3.shouldIgnoreMeasureRow(d,l,t);if(c=c.concat(U3.extractBarNodeData(e,l,t,n,o,d,f)),c.length>=6||l.customImages||l.customChart||l.customLimitation)return{barsData:c,numInvisibleNodesPhase2:a-(s+1)}}return{barsData:c,numInvisibleNodesPhase2:0}},extractStackTotalBarsData(e,t,n){let r=[];return n.some((e=>e.measures.length))&&n.forEach((n=>{r=r.concat(U3.extractStackTotalBarNodeData(e,n,t))})),r},extractData(e,t,n){const{barTooltipData:r,numInvisibleNodesPhase1:i,stackTotalBarTooltipData:o}=U3.extractTooltipData(e,t),a=U3.extractStackTotalBarsData(e,n,o);a.length&&a.push(Oy.getSeparatorRow());const{barsData:s,numInvisibleNodesPhase2:l}=U3.extractBarsData(e,t,n,r),c=a.concat(s),u=i+l;return u&&c.push(Oy.getNMoreRow(u,t.translator,n)),c},calculateBoundsFromBars(e){const t=e.filter((e=>{const t=e.bounds;return t.width>0&&t.height>0})),n=t.length?t:e;return JD.combineBounds(n.map((e=>e.bounds)))},calculateBoundsFromScale({opts:e,barKey:t,scale:n,majorScale:r,data:i,groupProp:o}){const a=e.chart.component(t).rect,{orientation:s}=e.dockService.meta.major,l="horizontal"===s?"width":"height",c=e.chart.scale(n).pxScale(a[l]);let u,d,f;if(e.layoutService.meta.isGroupedByMeasure){const t=e.viewModel.fields.minor.length;u=i.value,d=n===r&&void 0!==u?(c([u,0])+c([u,t-1]))/2:0,f=n===r&&void 0!==u?c.bandwidth([u,0]):0}else{const{value:e}=i;u=i[o]?i[o].value:void 0,d=c(n===r&&void 0!==u?[u,e]:e),f=n===r&&void 0!==u?c.bandwidth([u,e]):c.bandwidth(e)}const h=(d+f/2)*a[l],p={width:0,height:0};return"horizontal"===s?(p.x=h,p.y=a.height):(p.y=h,p.x=0),p},calculateTotalBounds({opts:e,labels:t,bars:n,barKey:r,barAxisKey:i,majorScale:o,majorInnerScale:a,groupProp:s}){const l=n.filter((e=>e.children&&e.children.length));let c;return c=l.length?U3.calculateBoundsFromBars(l):U3.calculateBoundsFromScale({opts:e,barKey:r,scale:t[0].key===i?o:a,majorScale:o,data:t[0].data,groupProp:s}),c},filterNodesOnKeys:(e,t)=>e.filter((e=>e.data&&t.indexOf(e.key)>-1)),isBarMatchingLabel:(e,t)=>t.data.value===e.data.value,isBarMatchingLabelOnProp:(e,t,n)=>t.data.value===(e.data[n]?e.data[n].value:e.data.value),findBarsMatchingLabels:(e,t,n,r)=>e.filter((e=>t.some((t=>n(e,t,r))))),findBarsFromGroupLabelsInGroupedByDim(e,t,n){const r=U3.isBarMatchingLabelOnProp;return U3.findBarsMatchingLabels(e,t,r,n)},findBarsFromBarLabelsInGroupedByDim:(e,t,n)=>e.filter((e=>t.some((t=>t.data.group&&t.data.group.value===e.data[n].value&&t.data.value===e.data.value)))),findBarsFromLabelsInSingleDim(e,t){const n=U3.isBarMatchingLabel;return U3.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim(e,t,n,r){const i=t.filter((e=>e.key===n)),o=t.filter((e=>e.key!==n)),a=U3.findBarsFromBarLabelsInGroupedByDim(e,i,r),s=U3.findBarsFromGroupLabelsInGroupedByDim(e,o,r);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim(e,t){const n=U3.isBarMatchingLabel;return U3.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure(e,t){const n=U3.isBarMatchingLabel;return U3.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim(e,t,n){const r=U3.isBarMatchingLabelOnProp;return U3.findBarsMatchingLabels(e,t,r,n)},findBarsFromLabelsInStackedByMeasure:(e,t)=>U3.findBarsFromLabelsInSingleDim(e,t),findBarsFromLabels({labels:e,opts:t,filterKeys:n,barAxisKey:r,groupProp:i,stackProp:o}){const{meta:a}=t.layoutService,s=U3.filterNodesOnKeys(t.chart.findShapes("container"),n);return a.isStackedByDimension?U3.findBarsFromLabelsInStackedByDim(s,e,o):a.isStackedByMeasure?U3.findBarsFromLabelsInStackedByMeasure(s,e):a.isGroupedByDimension?U3.findBarsFromLabelsInGroupedByDim(s,e,r,i):U3.findBarsFromLabelsInSingleDim(s,e)},findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:n}){const{meta:r}=t.layoutService;if(r.isStacked){const i=U3.filterNodesOnKeys(t.chart.findShapes("container"),[n]);return r.isStackedByDimension?U3.findStackTotalBarsFromLabelsInStackedByDim(i,e):U3.findStackTotalBarsFromLabelsInStackedByMeasure(i,e)}return[]},isSingleBarMode:(e,t)=>(e.isSimple||1===t.length)&&t[0].children&&t[0].children.length,filterNodesOnLabels({labels:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l,majorScale:c,majorInnerScale:u,filterFn:d}){const{meta:f}=t.layoutService;if(e.length){let h=U3.findBarsFromLabels({labels:e,opts:t,filterKeys:[n],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});if(d&&(h=h.filter(d)),U3.isSingleBarMode(f,h))return[h[0]];if(h.length){let f=U3.findBarsFromLabels({labels:e,opts:t,filterKeys:[n,o,a],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});d&&(f=f.filter(d));const p=U3.calculateTotalBounds({opts:t,labels:e,bars:f,barKey:n,barAxisKey:i,groupProp:s,majorScale:c,majorInnerScale:u}),m=U3.findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:r});return[{key:n,bounds:p,childrenNodes:h,data:h.map((e=>e.data)),stackTotalBarNodes:m}]}return[]}return[]},filterNodesForOob:(e,t,n)=>e.key===t&&0===e.children.length||e.key===n,filterNodes({nodes:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,groupAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d}){let f=U3.filterNodesOnKeys(e,[i,o]),h=f&&f.length?[f[0]]:[];const p=U3.filterNodesOnLabels({labels:h,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d});if(p&&p.length)return p;const{meta:m}=t.layoutService;if(m.isStackedByMeasure){f=U3.filterNodesOnKeys(e,[a,s]),h=f&&f.length?[f[0]]:[];const o=e=>U3.filterNodesForOob(e,n,a),p=U3.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:o});if(p&&p.length)return p[0].stackTotalBarNodes=void 0,p}if(m.isStackedByDimension){f=U3.filterNodesOnKeys(e,[a,s]),h=f&&f.length?[f[0]]:[];const o=e=>U3.filterNodesForOob(e,n,a),p=U3.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:o});if(p&&p.length)return p[0].stackTotalBarNodes=void 0,p}const g=U3.filterNodesOnKeys(e,[n,a,s]);return g.length?[g[0]]:[]}};function $3(e,t={},n){let r=[];const i=Ty({key:I5.COMPONENT.BASE_TOOLTIP,rtl:n});return ny(!0,i,{scale:I5.SCALE.MAIN.COLOR,settings:{filter:e=>U3.filterNodes({nodes:e,opts:t,barKey:I5.COMPONENT.BAR,stackTotalBarKey:I5.COMPONENT.STACK_TOTAL_BAR,barAxisKey:I5.COMPONENT.BAR_AXIS,groupAxisKey:I5.COMPONENT.GROUP_AXIS,barOobMaxKey:I5.COMPONENT.BAR_OOB_MAX,barOobMinKey:I5.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"}),extract:e=>(r=e.node.childrenNodes?e.node.childrenNodes:[e.node],U3.extractData(e,t,n)),placement:"bounds",afterShow:()=>{var e;const{app:i,properties:o,customTooltipModel:a}=t;i&&(null===(e=i.isInModalSelection)||void 0===e||!e.call(i))&&a.useCustomTooltip&&a.embed&&X1.show({app:i,properties:o,selectedNodes:r,customTooltipModel:a,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}const Y3={extractData:(e,t)=>[Oy.getTitleRow({title:e.node.data.label},t)],filterNodes(e,t){const n=e.filter((e=>e.data&&e.key===t));return n.length?[n[0]]:[]}};function K3(e,t={},n){if("categorical"!==t.colorService.getMain().getSettings().type)return!1;const r=Ty({key:I5.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return ny(!0,r,{scale:I5.SCALE.MAIN.COLOR,settings:{filter:e=>Y3.filterNodes(e,I5.COMPONENT.LEGEND_COLOR_CAT),extract:e=>Y3.extractData(e,n),placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function G3(e){return"NaN"===e.qMin&&"NaN"===e.qMax}function X3({layout:e},t,n){const r=function(e,t){if(e.qHyperCube.qSize.qcx*e.qHyperCube.qSize.qcy==0)return"NoDataExist";if(e.qHyperCube.qMeasureInfo.every(G3))return"OnlyNanData";let n=!1;if(t.layoutService.meta.isContinuous&&2===e.qHyperCube.qDimensionInfo.length){const t=e.qHyperCube.qDimensionInfo[1];n=g3.getDimensionSize(t)>fy.maxNumberOfLines}return!!n&&"LimitedData"}(e,t),{fontFamily:i}=t.themeService.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:i}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:oy[e].alignment},settings:{label:i.get("Object.Disclaimer."+e),rtl:o},style:r}}(r,t,{rtl:n},{fontFamily:i})}function J3(e,{fill:t}){return{[I5.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[I5.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const Z3=1,Q3=3;function e4(e){return e.getLayoutValue("gridLine.auto")}function t4(e){return!e4(e)&&e.getLayoutValue("gridLine.spacing")===Z3}function n4(e){return!e4(e)&&e.getLayoutValue("gridLine.spacing")===Q3}const r4=e=>({enabled:e.animations.enabled,trackBy:HD.lines.trackBy,compensateForLayoutChanges:HD.lines.compensateForLayoutChanges}),i4=(e,{themeService:t,layoutService:n,dockService:r,viewModel:i})=>{if(!e4(n)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(n))return!1;const{grid:o}=t.getStyles(),a={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:h3.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!t4(n)||((e,t)=>t%2==0),stroke:o.line.major.color},minorTicks:{show:n4(n),stroke:o.line.minor.color},animations:r4(i)};return a["horizontal"===r.meta.major.orientation?"y":"x"]=I5.SCALE.MAIN.MINOR,a};function o4(e,t){const n=[i4(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n,viewModel:r})=>{const i=n.get("minorMinMax");if(i.min>0||i.max<0)return!1;const o=t.getStyles(),a={};return a["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:I5.SCALE.MAIN.MINOR,line:{stroke:o.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:I5.SCALE.MAIN.MINOR,lines:a,animations:r4(r)}})(t)),n}const a4="areaPan",s4=e=>({type:"Pan",key:"panorama",options:{event:a4,pointers:1,threshold:10,enable(t,n){return this.started===a4||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===I5.COMPONENT.BAR))}},events:{areaPanstart(t){t.preventDefault(),this.started=a4;const n=e.viewState.get("zoom");this.areaPan={min:n.min,max:n.max,size:e.chart.component(I5.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:r,max:i,size:o}=this.areaPan,a=-t.deltaX/o;e.viewState.set("zoom",{min:Math.min(r+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(i+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function l4(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:r,chart:i}=e,{rtl:o}=t,a=H0.event.onZoom({viewCache:n,viewState:r,chart:i},{threshold:100,rtl:o,targetKey:I5.COMPONENT.BAR}),s={last:0,diff:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:(t,n)=>!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===I5.COMPONENT.BAR))},events:{zoomstart(e){s.last=e.scale,e.preventDefault()},zoommove(e){const t=e.scale-s.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),s.last=e.scale}}}}function c4({chart:e},t,n){const r=e.component(I5.COMPONENT.BASE_TOOLTIP);var i;r&&r.show&&(r.emit("hide"),null!=n&&null!==(i=n.customTooltipModel)&&void 0!==i&&i.useCustomTooltip&&t&&t({},r,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));const o=e.component(I5.COMPONENT.LEGEND_CAT_TOOLTIP);o&&o.show&&o.emit("hide");const a=e.component(I5.COMPONENT.TREND_LINES_TOOLTIP);a&&a.show&&a.emit("hide")}function u4(e,t){const{viewCache:n,viewState:r,chart:i,trendLineModel:o,layoutService:a}=e,{rtl:s}=t,l=e.layoutService.meta.isContinuous?H0.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:s,threshold:50,targetKey:I5.COMPONENT.BAR}):void 0,c=M5({majorInnerScale:I5.SCALE.MAIN.MAJOR_INNER,tooltip:I5.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:I5.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:i,viewState:r,trendLineModel:o,layoutService:a,rtl:s}),u=[I5.COMPONENT.BAR,I5.COMPONENT.BAR_AXIS,I5.COMPONENT.GROUP_AXIS,I5.COMPONENT.BAR_OOB_MAX,I5.COMPONENT.BAR_OOB_MIN],d=e.customTooltipModel.utils,f=e.debouncer(d.displayTooltip,d.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel(t){let n,r=!1;if(e.actions.scroll.enabled()){const i={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(i).filter((e=>e.key===I5.COMPONENT.BAR)),n&&(e.layoutService.meta.isContinuous&&l(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter((e=>e.key===I5.COMPONENT.LEGEND_COLOR_CAT)),n&&(r=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),r&&t.preventDefault(),c4(e,f,e)},mousemove(t){if(e.actions.tooltip.enabled()){if(c(t))return;const n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),r=this.chart.component(I5.COMPONENT.BASE_TOOLTIP);if(r&&r.show)if(n.some((e=>u.indexOf(e.key)>-1))){const{customTooltipModel:n}=e;if(n.useCustomTooltip&&d.checkIfPromisesExist({customTooltipModel:n})){const i=d.getNodes(t,this.chart);f(t,r,{nodes:i,opts:e,customTooltipModel:n})}else r.emit("show",t)}else r.emit("hide");const i=this.chart.component(I5.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&(n.some((e=>e.key===I5.COMPONENT.LEGEND_COLOR_CAT))?i.emit("show",t):i.emit("hide"))}},mouseup(t){2===t.button&&c4(this,f,e)},mouseleave(){c4(this,f,e)}}}}const d4=(e,t)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...s1({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[s4(e,t.rtl),l4(e,t)]]});function f4(e,t){const{actions:n}=e;if(!n.interact.enabled())return[];const r=[d4(e,t),u4(e,t),s1({...e,componentKey:"scrollbar",rtl:t.rtl}).native];return e.layoutService.meta.isDiscrete&&r.push(e.discrete.interactions.native),r}const h4=e=>({enabled:e.animations.enabled,compensateForLayoutChanges:HD.bars.compensateForLayoutChanges});const p4=(e,t,{collectionKey:n})=>{if(!K0({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,{reducedDataModel:t,colorService:n,continuousDataModel:r,viewModel:i},{collectionKey:o}){return{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>r.getDimensionCardinality()>1,data:{collection:o},settings:{box:ny(!0,{},e.settings.box,{minWidthPx:2,fill:n.getMini().getColor(),strokeWidth:0}),major:ny(!0,{},e.settings.major,{scale:t.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:h4(i)}}(e,t,{collectionKey:n});const{mode:r,scales:i}=t.reducedDataModel;let o;return r.isGroupedByDimension&&!r.isReduced?o=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:r.isGroupedByMeasure&&(o=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2),{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>t.discrete.query.getCanScroll(),data:{collection:n},settings:{box:{...e.settings.box,fill:r.isReduced||r.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:i.major,fn:o},minor:{scale:i.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:h4(t.viewModel)}},{measureText:m4}=Yp.renderer("svg")();function g4(e,t,n){return{reducedMinor:function(e){const t=ny(!0,{},e);return delete t.data,t}(t.minor),reducedMajor:function(e,t,{majorScaleInvert:n,maxPxStep:r,align:i,getProp:o}){let a={invert:n,data:{extract:e.mode.isDimensionless?e.fields.minor.map(((e,t)=>({field:e,value:t}))):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:r,align:i};return e.mode.isStackedByDimension?a.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(a.data={source:"miniCube",hierarchy:{value:e=>e.qElemNumber}}):e.mode.isGroupedByMeasure?(a=ny(!0,{},t),a.data.extract.source="miniCube"):e.mode.isContinuous&&(a=ny(!0,{},t,{min:()=>o("continuousMin"),max:()=>o("continuousMax")})),a}(e,t.major,n)}}const y4=50,v4=100,b4=200;function x4(e,t){const n=function(e){const t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return y4;case 1:return v4;case 2:return b4;default:return 125*t}}(t);return Math.max(1,Math.round(e/n))}function w4(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function S4(e,t,n){return 0===t||0===e||t===n.length-1}function k4(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function M4(e,t,n,r,i){e.domain([t,n]),e.nice(10);const[o,a]=e.domain();let s=e.ticks(10);const l=function(e){return e.length%2==0}(s),c=function(e){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}(s),u=c?S4:w4;s=s.filter(u),l&&!c&&!r&&s.length>1&&(s=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const d=i?i.formatter(I5.FORMATTER.MINOR):void 0;return k4(d?s.map(d):s)&&(s=[s[0],s[s.length-1]]),{roundedMin:o,roundedMax:a,ticks:s}}function C4(e,t,n,r,i,o,a,s){const l=o.formatter(I5.FORMATTER.MINOR),c=s.getStyles(),u="horizontal"===a.meta.major.orientation?"height":"width",d=e=>m4({text:e,fontSize:c.axis.label.name.fontSize,fontFamily:c.axis.label.name.fontFamily})[u];let[f,h]=e.domain(),p=e.ticks(r);function m(){const e=p.map(l);return!k4(e)&&function(e){const t=i/p.length;return Math.max(...e.map(d))<=t}(e)}for(let i=r-1;i>0&&!m();i--)e.domain([t,n]),e.nice(i),[f,h]=e.domain(),p=e.ticks(i);return{roundedMin:f,roundedMax:h,ticks:p}}const E4=(e,t)=>e.value-t.value,T4=e=>({value:e,isMinor:!1}),q4=e=>({value:e,isMinor:!0});function D4(e,t,n){const r=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter((e=>(e=>Number.isNaN(t)||e>=t)(e)&&(e=>Number.isNaN(n)||e<=n)(e))).length<=r}function N4({chart:e,viewCache:t,dockService:n,layoutService:r,themeService:i}){const{explicitMin:o,explicitMax:a,hasExplicitMin:s,hasExplicitMax:l}=t.get("minorMinMax"),{min:c,max:u}=function(e){let{min:t,max:n}=e.get("minorMinMax");return t===n&&0===t&&(t-=1,n+=1),{min:t,max:n}}(t),d=UE((()=>{const d=function(e,t,n){let r;return e?r=n.meta.chart.size:({rect:r}=t.component(I5.COMPONENT.BAR)),"horizontal"===n.meta.major.orientation?r.height:r.width}(t.get("isPreRender"),e,n),f=x4(d,r),h=function(e,t,n){const r=Ux().domain([e,t]);return r.nice(n),r}(c,u,f);let p,m,g=[];"SPARK"===n.meta.chart.mode?({roundedMin:p,roundedMax:m}=function(e,t){return{roundedMin:e,roundedMax:t}}(c,u)):(({roundedMin:p,roundedMax:m,ticks:g}=C4(h,c,u,f,d,e,n,i)),D4(g,o,a)&&({roundedMin:p,roundedMax:m,ticks:g}=M4(h,c,u,s||l,e)));const y=function(e,t){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}(g,1);g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.unshift(t),n.filter((e=>e>=t))):n}(s,o,g),g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.push(t),n.filter((e=>e<=t))):n}(l,a,g);return{roundedMin:p,roundedMax:m,ticks:function(e,t){return[...e.map(T4),...t.map(q4)].sort(E4)}(g,y)}}),(()=>t.get("isPreRender")));return{values:()=>d().ticks,min:()=>s?o:d().roundedMin,max:()=>l?a:d().roundedMax}}function A4(e,{picasso:t,discrete:n,layoutService:r,dockService:i,viewModel:o,viewCache:a,reducedDataModel:s,colorService:l,themeService:c,viewState:u,chart:d},{localeInfo:f,rtl:h}){const{meta:p}=r,{fields:m}=o,g=()=>{if("custom"!==r.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,i.meta.chart.size["horizontal"===i.meta.major.orientation?"height":"width"]/4)},y=!("none"===r.getLayoutValue("measureAxis.show"))?(v=i.meta.minor.orientation,b=i.meta.minor.dock,"vertical"===v?"near"===b||"left"===b?0:1:"near"===b||"bottom"===b?1:0):.5;var v,b;const x={},w="vertical"===i.meta.minor.orientation&&h,S=l.getMain().getScales(),k=l.getMini().getScales();if(Object.assign(x,S,{reducedFill:k.reducedFill}),x[I5.SCALE.MAIN.MINOR]=function({chart:e,viewModel:{fields:t},dockService:n,viewCache:r,layoutService:i,themeService:o},{rtl:a}){const s=N4({chart:e,dockService:n,viewCache:r,layoutService:i,themeService:o}),l={invert:"vertical"===n.meta.minor.orientation||a,ticks:{values:s.values},minorTicks:{count:1},min:s.min,max:s.max};return i.meta.isStacked||(l.data={source:"qHyperCube",fields:t.minor}),l}({chart:d,viewModel:o,dockService:i,viewCache:a,layoutService:r,themeService:c},{rtl:h}),p.isGroupedByDimension)[I5.SCALE.MAIN.MAJOR_INNER,I5.SCALE.MAIN.MAJOR].forEach(((e,t)=>{x[e]={invert:w,data:{source:"qHyperCube",hierarchy:{label:e=>e.qText?e.qText:"",value:e=>e.qElemNumber,props:{...o.selectionDimensionProp(t),group:p.isGroupedByDimension?{field:m.majorGroup}:void 0}}},label:({datum:e})=>e.label,ticks:{depth:t+1},maxPxStep:g,align:y}})),o.isDimensionLocked(0)||(x[I5.SCALE.MAIN.MAJOR_INNER].data.hierarchy.props.axisSelectionDimension={field:0});else if(p.isGroupedByMeasure)x[I5.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:w,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:g,align:y};else if(p.isTime){const{innerTime:e,outerTime:n}=function(e,t){const{layoutService:n,viewModel:r,viewCache:i,picasso:o,viewState:a,localeInfo:s,themeService:l}=e,c=()=>n.getHyperCubeValue("qAxisData.qAxis",[]),u=o.formatter("q-time"),d=l.getStyles(),f=e=>m4({text:e,fontSize:d.axis.label.name.fontSize,fontFamily:d.axis.label.name.fontFamily});i.set("qTimeAxisCache",[]);const h={get:(e,t=0)=>{const n=i.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:(e,t,n=0)=>{i.get("qTimeAxisCache")[n]=[e,t]},key:({distance:e})=>{const{min:t,max:n}=a.get("zoom"),r=(n-t)/(i.get("continuousMax")-i.get("continuousMin")),o=c().map((e=>e.qName));return[e,Number.parseFloat(r).toFixed(12),...o].toString()}};return{innerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3",initialMin:a.get("zoom").min},level:"inner",anchor:"start",clamp:!0},cache:h},outerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:h}}}({picasso:t,localeInfo:f,viewState:u,viewModel:o,viewCache:a,themeService:c,layoutService:r},h);x[I5.SCALE.MAIN.MAJOR_INNER]=e,x[I5.SCALE.MAIN.MAJOR]=n}else p.isContinuous?x[I5.SCALE.MAIN.MAJOR]={type:"linear",invert:w,data:{extract:{key:"qHyperCube",field:m.majorNumeric}},ticks:{forceBounds:!0,count:u.get("zoom").min===u.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>u.get("zoom").min,max:()=>u.get("zoom").max}:x[I5.SCALE.MAIN.MAJOR]={invert:w,data:{extract:p.isDimensionless?m.minor.map(((t,n)=>({field:t,label:()=>e.qHyperCube.qMeasureInfo[n].qFallbackTitle,value:n}))):{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},type:p.isDimensionless?"band":void 0,maxPxStep:g,align:y};const{reducedMinor:M,reducedMajor:C}=g4(s,{major:x[I5.SCALE.MAIN.MAJOR],minor:x[I5.SCALE.MAIN.MINOR]},{majorScaleInvert:w,maxPxStep:g,align:y,getProp:a.get});return p.isDiscrete&&(x[I5.SCALE.MAIN.MAJOR].range=n.query.getScaleRange,p.isGroupedByDimension&&(x[I5.SCALE.MAIN.MAJOR_INNER].range=n.query.getScaleRange)),x[s.scales.major]=C,x[s.scales.minor]=M,x}function O4(e,t,n){const{layoutService:r,colorService:i}=e;return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[c3(e,t)],components:[]}}({targets:[r.meta.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?I5.COMPONENT.STACK_TOTAL_BAR:I5.COMPONENT.BAR,I5.COMPONENT.BAR_AXIS,I5.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",I5.COMPONENT.LEGEND_COLOR_CAT],components(e,t){const r={action:e.srcEvent.ctrlKey||n?"set":"toggle",contexts:["selection"],key:t[0].key};return I5.COMPONENT.BAR===t[0].key?[{...r,data:["selectionDimension"]}]:[I5.COMPONENT.BAR_AXIS,I5.COMPONENT.GROUP_AXIS].includes(t[0].key)?[{...r,data:["selectionDimension","axisSelectionDimension"]}]:[r]}},{...e,isLocked:n=>n.some((e=>e.key===I5.COMPONENT.LEGEND_COLOR_CAT))?i.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n)})}function L4(e){const t=e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1;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:[l3(n,t)],components:[r]}}({key:"lasso",componentTargetKey:I5.COMPONENT.BAR,components:[t?{key:I5.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:I5.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}]},e)}function I4(e){return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>"@"+e)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[d3(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:[{key:I5.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}],key:"discreteRangeBrush",targets:["group-axis",I5.COMPONENT.BAR_AXIS,I5.COMPONENT.BAR],fillTargets:["group-axis",I5.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function _4(e,t,n){const{selectionService:r}=e,{isUnsupportedFeature:i}=t,o=void 0===n,a=r.getIsSingleSelect(n),s=O4(e,o,a);if(o||a)return{components:[...s.components],gestures:[...s.interactions]};const l=L4(e),c=function(e,t){return e.layoutService.meta.isStacked||null!=t&&t("rangeSelections")?{components:[],interactions:[]}:f3({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",I5.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:I5.SCALE.MAIN.MINOR,onEdited(){e.actions.select.emit("end","measureRange")}},e)}(e,i),u=function(e){return e.layoutService.meta.isContinuous?f3({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",I5.COMPONENT.BAR]:["continuous-axis",I5.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?I5.SCALE.MAIN.MAJOR_INNER:I5.SCALE.MAIN.MAJOR,toLabel({datum:t,data:n,scale:r}){const i=e.layoutService.meta.isTime?r.formatter():e.chart.formatter(I5.FORMATTER.MINOR),o=e.chart&&e.chart.brushSelectionIncludeMax;return`${t!==Math.max(...n)||o?"":"<"}${i(t)}`}},e):{components:[],interactions:[]}}(e),d=I4(e);return{components:[...s.components,...l.components,...c.components,...d.components,...u.components],gestures:[...l.interactions,...s.interactions,...c.interactions,...d.interactions,...u.interactions]}}function R4({layoutService:e,viewModel:t,dockService:n}){var r;const{meta:i}=e;if(!i.isStackedByDimension||i.isContinuous)return!1;const{fields:o}=t,a=e.getLayoutValue("components",null),s=a?a.filter((e=>"bar"===e.key))[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:o.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.map((e=>e.qMaxPos)).reduce(((e,t)=>e+t),0).toFixed(13)))(e.qSubNodes)},end:{value:e=>Number(e.qMaxPos.toFixed(13))}}},{field:o.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.map((e=>e.qMinNeg)).reduce(((e,t)=>e+t),0).toFixed(13)))(e.qSubNodes)},end:{value:e=>Number(e.qMinNeg.toFixed(13))}}}]},settings:{major:{scale:I5.SCALE.MAIN.MAJOR},minor:{scale:I5.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:null!=s&&null!==(r=s.style)&&void 0!==r&&r.width&&s.style.width>0?s.style.width:.7,fill:()=>({type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]})},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:t.animations.enabled,trackBy:HD.shadowBars.trackBy,compensateForLayoutChanges:HD.bars.compensateForLayoutChanges}}}const P4={min:"Min",max:"Max"};function z4(e,t,n){const r=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?T3(e,t)||q3(e,t):n===D3?T3(e,t):q3(e,t)}(Number(r.toFixed(13)),e,t)}function F4(e,{barComponent:t,type:n,isStacked:r}){var i,o,a,s;const{viewCache:l,layoutService:c,dockService:u}=e,d=l.get("minorMinMax"),f=n===D3;if(function(e,t){return!e["hasOther"+P4[t]]}(d,n)){if(function(e,t){return!e["hasExplicit"+P4[t]]}(d,n))return!1;if(z4(d,n,f))return!1}if(function(e,t,n){const r=n?e=>e<0:e=>e>0;return e["hasExplicit"+P4[t]]&&r(e["explicit"+P4[t]])}(d,n,f))return!1;let h="end";r&&(h=f?"sumOfPositives":"sumOfNegatives");const p=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.chart.scale(I5.SCALE.MAIN.MINOR)[n]())),m=f?e=>e.datum[h].value>p():e=>e.datum[h].value<p(),g=I5.COMPONENT.BAR,y=e.layoutService.getLayoutValue("components",[]),v=y?y.filter((e=>e.key===g))[0]:null;return{type:"box-sliced-hat",key:"sliced-hat-"+n,layout:{dock:f?u.meta.minor.end:u.meta.minor.start},data:t.data,brush:t.brush,settings:{orientation:t.settings.orientation,major:t.settings.major,minor:t.settings.minor,hat:ny({},t.settings.box,{fill:c.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:m,width:S3({layoutService:e.layoutService,discrete:e.discrete,componentKey:g}),strokeWidth:null!=v&&null!==(i=v.style)&&void 0!==i&&i.strokeWidth?w3.BAR.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:w3.BAR.STROKE.WIDTH.NONE,stroke:null!==(o=null==v||null===(a=v.style)||void 0===a||null===(s=a.strokeColor)||void 0===s?void 0:s.color)&&void 0!==o?o:w3.BAR.STROKE.COLOR})}}}function j4(e,t){var n;let r;return r=e.isContinuous?1:.7,!e.isContinuous&&null!=t&&null!==(n=t.style)&&void 0!==n&&n.width&&t.style.width>0?t.style.width:r}function B4(e,{collectionKey:t},n){const{meta:r}=e.layoutService,{fields:i}=e.viewModel,o=r.isStackedByDimension&&!r.isContinuous?"qValue":"qNum",a=e=>"NaN"===e[o]?0:e[o];function s(t){const n=e.ds.field(t).raw(),r=e.ds.field(t).formatter(),i=!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType);return{field:t,reduceLabel:"none",value:a,label:e=>i?(e=>"NaN"===e[o]?"-":r(e[o]))(e):e.qText}}const l=r.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;function c(e){return{field:e,reduceLabel:"none",reduce:"first",value:l}}const u={key:t,data:{extract:i.minor.map(((t,o)=>{const a=e.colorService.getMain().getDatumProps(o),l=e.colorService.getMini().getDatumProps(o),u=a[Object.keys(a)[0]],d=null==u?void 0:u.field,f=d?{field:d,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,h={field:r.isDimensionless?t:i.major,props:{...e.viewModel.selectionDimensionProp(),axisSelectionDimension:{field:0},start:0,end:s(t),null:c(t),segment:r.isStacked?s(t):void 0,group:r.isGroupedByDimension?{field:i.majorGroup}:void 0,stack:r.isStacked?{field:i.majorStack}:void 0,measureIndex:r.isGroupedByDimension||r.isStackedByDimension?void 0:o,timeStart:r.isContinuous?{field:i.majorNumeric}:void 0,timeEnd:r.isContinuous?{field:i.majorNumeric}:void 0,fillTooltip:f,...a,...l,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${o}`},customTooltipAttrExps:0!==r.dimensionCount?n2.getNode(e.layoutService.getLayout(),r):void 0}};return r.isDimensionless&&(h.value=o),void 0!==n&&(h.source=n),my(h.props),h}))}};return r.isStacked&&(u.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),u}function H4({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:r}=e,{fields:i}=t;if(!r.isStacked)return!1;let o;return o=r.isStackedByMeasure?function(e,t){const n={field:0,props:{sumOfPositives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},null:{fields:t.minor.map((e=>({field:e}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"}}};if(e.isContinuous){const e={field:t.major,value:e=>e.qNum,reduceLabel:"none"};n.props.timeStart=e,n.props.timeEnd=e,n.value=e=>e.qNum}return n}(r,i):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:e=>Number(e.qMaxPos.toFixed(13))},sumOfNegatives:{value:e=>Number(e.qMinNeg.toFixed(13))},null:{value:e=>{const{qSubNodes:t=[]}=e;return t.every((e=>"NaN"===((e.qSubNodes||[])[0]||{}).qValue))}}}};const n={field:t.majors[0],value:e=>e.qNum,reduceLabel:"none"};return{field:t.majorStack,trackBy:e=>e.qNum,reduce:e=>e[0],props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t>0?e+t:e),0)},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t<0?e+t:e),0)},timeStart:n,timeEnd:n}}}(r,i),{key:n,data:{extract:o}}}const V4="main-collection",W4="stack-total-collection";const U4="mini-collection",$4="mini-stack-collection",Y4="mini-continuous-collection",K4="miniCube",G4=(e,t)=>{const n=(e=>{const t=[B4(e,{collectionKey:V4})];return e.layoutService.meta.isStacked&&t.push(H4(e,{collectionKey:W4})),t})(t),r=((e,t)=>{const n=[];return K0({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(B4(t,{collectionKey:Y4},K4)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:i}}=e;return{key:t,data:{extract:r.minor.map(((e,t)=>{const o={end:{field:e,reduceLabel:"none"},...i.isStackedByMeasure&&!i.isReduced?n.getMain().getDatumProps(t):{}};return i.isContinuous&&(o.timeStart={field:r.major,value:e=>e.qNum},o.timeEnd=o.timeStart),{source:"miniCube",field:r.major,props:o}})),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:$4})):n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:i}}=e;return{key:t,data:{extract:r.minor.map(((e,t)=>{const o=i.isReduced?{}:n.getMain().getDatumProps(t),a={end:{field:e},start:0,group:{field:r.majorGroup},measureIndex:t,...o},s={source:"miniCube",field:i.isDimensionless?e:r.major,props:a};return i.isDimensionless&&(s.value=t),s}))}}}(t,{collectionKey:U4}))),n})(0,t);return n.concat(r)};function X4(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:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function J4({layout:e,component:t},n,r){if(!H3(e,n))return!1;const{layoutService:i,chart:o,dockService:a,viewModel:s,themeService:l,styleService:c}=n,{meta:u}=i,d=!B3(e,n),f=l.getStyles(),h=c.label.getStyle();function p(e){const t=o.formatter(I5.FORMATTER.MINOR);return t?t(e):e}const m={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":p(e.data.sumOfPositives.value)},simplifiedPlacements:X4("outside",d,u.isContinuous),style:f.label.value},g={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":p(e.data.sumOfNegatives.value)},simplifiedPlacements:X4("opposite",d,u.isContinuous),style:f.label.value};return{key:"stack-total-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>j3(e.data.sumOfPositives.value,a.meta.minor.orientation,r),labels:[z3(ny(n,m)),z3(ny(n,g))],fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily,linkData:HD.labels.linkData}}}]},animations:{enabled:s.animations.enabled,trackBy:HD.labels.trackBy,compensateForLayoutChanges:HD.labels.compensateForLayoutChanges}}}function Z4(e,t,n){const r=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&r.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),r}function Q4({layout:e,type:t},n){const{layoutService:r,viewCache:i,themeService:o,styleService:a}=n,{meta:s}=r,{isStacked:l}=s;if(!l&&!B3(e,n)||l&&!H3(e,n))return!1;const c=i.get("minorMinMax");if(!c.hasExplicitMinMax||t===D3&&0===c.max||t===N3&&0===c.min)return!1;if(!O3(t===D3?c.implicitMax:c.implicitMin,c,t))return!1;const u=o.getStyles(),d=a.label.getStyle();let f=e=>e.data.end.label;s.isStacked&&(f=t===D3?function(e){if(O3(e.data.sumOfNegatives.value,c,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,r=n.chart.formatter(I5.FORMATTER.MINOR);return r?r(t):t}return""}:function(e){if(O3(e.data.sumOfPositives.value,c,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,r=n.chart.formatter(I5.FORMATTER.MINOR);return r?r(t):t}return""});const h={label:f,simplifiedPlacements:Z4("outside",true,s.isContinuous),styles:u},p={label:f,simplifiedPlacements:Z4("opposite",true,s.isContinuous),styles:u},m=[z3(ny(n,h)),z3(ny(n,p))],g="vertical"===n.dockService.meta.minor.orientation?"down":"right",y={component:`${I5.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:g,labels:m,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily,linkData:HD.labels.linkData}}};return{key:"bar-oob-labels-"+t,type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[y]},animations:{enabled:n.viewModel.animations.enabled,trackBy:HD.labels.trackBy,compensateForLayoutChanges:HD.labels.compensateForLayoutChanges}}}function e6(e){return"all"===e||"title"===e}function t6(e,t,n){if(!e6(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const{actions:r,properties:i}=t,o={hyperCube:e.qHyperCube,hyperCubeDef:i&&i.qHyperCubeDef,isDimension:!0,disabled:()=>{var e;return!(null!=r&&null!==(e=r.interact)&&void 0!==e&&e.enabled())},model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections,supportConditional:t.flags.isEnabled("IM_1579_HIDE_DIM_MEA")},a=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleDimensions&&(o.padding="0",o.minWidth="auto"),{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:h3[t.dockService.meta.major.orientation+"DimensionAxisTitle"].minimumLayoutMode,dock:t.dockService.meta.major.dock},settings:o,style:a}}function n6(e,t,n){if(!e6(e.measureAxis.show))return!1;const{layoutService:r,actions:i}=t,o=t.properties,a=r.getLayoutValue("qUndoExclude")?"qUndoExclude.qHyperCubeDef":"qHyperCubeDef",s={hyperCube:r.getHyperCube(),hyperCubeDef:HE(o,a),isDimension:!1,disabled:()=>!i.interact.enabled(),model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections,supportConditional:t.flags.isEnabled("IM_1579_HIDE_DIM_MEA")},l=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleMeasures&&(s.padding="0",s.minWidth="auto"),{key:"measure-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},settings:s,style:l}}function r6({environment:e,rtl:t,refLineModel:n,layoutService:r,colorService:i,dockService:o,themeService:a,viewModel:s,chart:l}){const{theme:c,localeInfo:u}=e,d={resolveUIColor:i.getMain().getPaletteColor},f=a.getStyles(),h=s.animations.enabled;return[YD({refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:I5.SCALE.MAIN.MINOR,axis:"horizontal"===o.meta.major.orientation?"y":"x",key:I5.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:h3.refLines.minimumLayoutMode}),YD({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:I5.SCALE.MAIN.MAJOR,axis:"horizontal"===o.meta.major.orientation?"x":"y",rtl:t,key:I5.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:I5.COMPONENT.BAR,minimumLayoutMode:h3.refLines.minimumLayoutMode}),...GD({refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.minor.opposite,scale:I5.SCALE.MAIN.MINOR,style:f,formatter:I5.FORMATTER.MINOR,theme:c,localeInfo:u,rtl:t,key:I5.COMPONENT.MEASURE_REF_LINE_LABEL}),...GD({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.major.opposite,scale:I5.SCALE.MAIN.MAJOR,style:f,theme:c,localeInfo:u,rtl:t,key:I5.COMPONENT.DIMENSION_REF_LINE_LABEL})]}const i6=(e,t,n)=>{var r;const{layoutService:i,dockService:o,colorService:a,chart:s,actions:l,discrete:c,continuousDataModel:u,reducedDataModel:d,viewModel:f,viewState:h,viewCache:p,themeService:m,refLineModel:g,pluginService:y,rtl:v,logicalSize:b,trendLineModel:x}=t,{localeInfo:w}=n,S=X3({layout:e},t,v);if(S&&"center"===S.layout.dock)return{components:[S]};const k=A4(e,t,{localeInfo:w,rtl:v}),M=!(null!=l&&null!==(r=l.interact)&&void 0!==r&&r.enabled()),C=a.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:h,chart:s,styleReference:"object.barChart",rtl:v,settings:{item:{shape:{size:10}}}},{actions:l,navigationDisabled:M}),E=C.components[0];if(E){const{dock:e}=E.layout;if(k.fillRange&&(["right","left"].includes(e)||v)&&(k.fillRange.invert=!0),"legend-seq"===E.type&&void 0!==f.selectionDimensionIdx&&k.fillRange&&k.fillRange.min<k.fillRange.max){const e=f3({eventName:"legendRange",key:"legendRangeBrush",targets:[E.key],fillTargets:[E.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:E.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:()=>{l.select.emit("end","legendRange")}},t);C.components.push(...e.components),C.interactions.unshift(...e.interactions)}}else k.fillRange&&v&&(k.fillRange.invert=!0);const T=((e,{componentKey:t,collectionKey:n})=>{var r,i,o,a;const{meta:s}=e.layoutService;let l,c;s.isGroupedByDimension?l=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:s.isGroupedByMeasure&&(l=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);let u=2;s.isContinuous?(c={start:"timeStart",end:"timeEnd"},u=M3(e,t)):s.isStacked&&(c="stack");const d=s.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,f=e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)},h=e.layoutService.getLayoutValue("components",null),p=h?h.filter((e=>e.key===t))[0]:null;return{key:t,type:"box",data:{collection:n},preferredSize:s.isContinuous?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:s.isContinuous||d?0:2,stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:I5.SCALE.MAIN.MAJOR,fn:l,ref:c},minor:{scale:I5.SCALE.MAIN.MINOR},orientation:e.dockService.meta.minor.orientation,box:{width:S3({layoutService:e.layoutService,discrete:e.discrete,componentKey:t}),minWidthPx:u,fill:e.colorService.getMain().getColor(),opacity:e=>f(e)?0:void 0,minHeightPx:function(e){return s.isStacked?.1:f(e)?.01:.3},strokeWidth:null!=p&&null!==(r=p.style)&&void 0!==r&&r.strokeWidth?w3.BAR.STROKE.WIDTH[p.style.strokeWidth.toUpperCase()]:w3.BAR.STROKE.WIDTH.NONE,stroke:null!==(i=null==p||null===(o=p.style)||void 0===o||null===(a=o.strokeColor)||void 0===a?void 0:a.color)&&void 0!==i?i:w3.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:e.viewModel.animations.enabled,isMainComponent:!0,trackBy:HD.bars.trackBy,compensateForLayoutChanges:HD.bars.compensateForLayoutChanges}}})(t,{componentKey:I5.COMPONENT.BAR,collectionKey:I5.COLLECTION.MAIN}),q=((e,{componentKey:t,collectionKey:n})=>{const{meta:r}=e.layoutService;if(!r.isStacked)return!1;let i=2;r.isContinuous&&(i=M3(e,t));const o=e.layoutService.getLayoutValue("components",null),a=o?o.filter((e=>e.key===t))[0]:null,s={key:t,type:"box",data:{collection:n},settings:{major:{scale:I5.SCALE.MAIN.MAJOR},minor:{scale:I5.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:j4(r,a),minWidthPx:i,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth: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}},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:.3}}}}]}};return r.isContinuous&&(s.settings.major.ref={start:"timeStart",end:"timeEnd"}),s})(t,{componentKey:I5.COMPONENT.STACK_TOTAL_BAR,collectionKey:I5.COLLECTION.STACK_TOTAL}),D=_4(t,n,f.selectionDimensionIdx),{isStacked:N}=i.meta;let A;A=d.mode.isContinuous?I5.COLLECTION.MINI_CONTINUOUS:N?I5.COLLECTION.MINI_STACK:I5.COLLECTION.MINI;const O=N?q:T,L=o4(0,t),I=[...L,F4(t,{barComponent:O,type:"max",isStacked:N}),F4(t,{barComponent:O,type:"min",isStacked:N}),I3(t,{barComponent:O,type:"max",isStacked:N}),I3(t,{barComponent:O,type:"min",isStacked:N}),R3(t,{chart:s,barComponent:O,type:"max",scales:k,collectionKey:N?I5.COLLECTION.STACK_TOTAL:I5.COLLECTION.MAIN}),R3(t,{chart:s,barComponent:O,type:"min",scales:k,collectionKey:N?I5.COLLECTION.STACK_TOTAL:I5.COLLECTION.MAIN}),...x3(e,t,v,!!L[0]),T,q,R4({layoutService:i,viewModel:f,layout:e,dockService:o}),t6(e,t,v),n6(e,t,v),...r6({environment:n,rtl:v,refLineModel:g,layoutService:i,colorService:a,dockService:o,themeService:m,viewModel:f,chart:s}),ek({viewState:h,viewCache:p,layoutService:i,dockService:o,rtl:v}),p4(T,t,{collectionKey:A}),G0({layoutService:i,dockService:o,discrete:c,continuousDataModel:u,viewState:h,viewCache:p,themeService:m,rtl:v,deviceType:n.deviceType}),...v5({majorScale:I5.SCALE.MAIN.MAJOR,minorScale:I5.SCALE.MAIN.MINOR,tooltipOverlay:I5.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{layoutService:i,trendLineModel:x,dockService:o,animationsEnabled:f.animations.enabled}),...C.components,W3({layout:e,component:I5.COMPONENT.BAR,minorScale:k.minor},t,v),J4({layout:e,component:I5.COMPONENT.STACK_TOTAL_BAR},t,v),Q4({layout:e,component:"bar-oob-max",type:"max"},t),Q4({layout:e,component:"bar-oob-min",type:"min"},t),...D.components,$3(0,{...t,coloring:a.getMain().getSettings()},v),K3(0,{...t,coloring:a.getMain().getSettings()},v),(!1!==e.showDisclaimer||!t.flags.isEnabled("SHOW_DISCLAIMER"))&&S,S5({tooltip:I5.COMPONENT.TREND_LINES_TOOLTIP,formatter:I5.FORMATTER.MINOR,majorScale:I5.SCALE.MAIN.MAJOR},t,{rtl:v})].filter(Boolean);!function(e){if(e&&0!==e.length)for(let t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(I);return{interactions:f4(t,{rtl:v,hammer:{gestures:[...C.interactions,...D.gestures].sort(((e,t)=>(t.prio||0)-(e.prio||0)))}}),scales:k,palettes:a.getMain().getPalettes(),components:y.extendComponents(I),strategy:cy(0,{logicalSize:b,minCenterRatio:0}),formatters:J3(t,k),collections:G4(0,t)}};function o6({picasso:t,chart:n,services:r,environment:i,viewState:o,viewCache:a,bootstrapped:s}){const{width:l,height:c}=e.useRect(),u=e.useModel(),d=e.useSelections(),f=e.useOptions(),[h,p]=e.useState(),[m,g]=e.useState(),[y,v]=e.useState(),[b,x]=e.useState(),w=e.useApp();function S(){if(!n.layoutComponents)return Promise.resolve();const{discrete:e,layoutService:s,viewModel:l}=r;a.set("isPreRender",!0);const c=function(e={}){const{selectionService:s,refLineModel:l,discrete:c,reducedDataModel:p,continuousDataModel:m,trendLineModel:g,pluginService:y,colorService:v,viewModel:b,dockService:x,themeService:S,customTooltipModel:k,layoutService:M,logicalSize:C,styleService:E}=r,T=s.custom.getActions(),q=t.data("q")(h.prepPicassoDataSet()),D={picasso:t,ds:q,rtl:"rtl"===(null==f?void 0:f.direction),model:u,app:w,chart:n,actions:T,localeInfo:i.localeInfo,logicalSize:C,flags:i.flags,translator:i.translator,selections:d,isLocked:s.getIsSelectionLocked,viewCache:a,viewState:o,layoutService:M,dockService:x,viewModel:b,colorService:v,selectionService:s,themeService:S,trendLineModel:g,discrete:c,continuousDataModel:m,reducedDataModel:p.model(),customTooltipModel:k,debouncer:$E,refLineModel:l,pluginService:y,styleService:E,...e};return i6(M.getLayout(),D,i)}(m);h.extractDataPages(),n.layoutComponents({settings:c,data:y}),a.set("isPreRender",!1),h.insertDataPages(),l.animations.hasSlicedHats=c.components.filter((e=>"box-sliced-hat"===e.type)).length>0;const p=[];return 1!==c.components.length&&s.meta.isDiscrete&&p.push(e.command.initialize()),Promise.all(p)}const[[k,M]=[]]=e.usePromise((()=>{var e;if(!(t&&n&&r&&i&&o&&a&&s))return Promise.resolve();const{layoutService:l,selectionService:c,refLineModel:u,discrete:d,continuous:f,reducedDataModel:h,continuousDataModel:p,trendLineModel:m,legendLayoutService:g,colorService:y,pluginService:v,viewModel:b}=r;if(null==c||null===(e=c.custom)||void 0===e||!e.getActions())return Promise.resolve();const w=()=>{x(Date.now()),b.animations.isPartialUpdating=!0};o.onChanged("scrollOffset",(()=>{g&&g.setDataPages([d.query.getCurrentDataPage()]),u&&u.update(),w()})),o.onChanged("legendScrollOffset",w),o.intercept("zoom",f.event.onZoomIntercept({viewCache:a})),o.onChanged("zoom",f.event.onZoomChange({layoutService:l,continuousDataModel:p},w)),c.setLayout(l.getLayout());const S=[];l.meta.isContinuous&&(p.update(l.getLayout()),S.push(p.initialFetch())),m.command.update(),S.push(h.fetch().then((({reducedCube:e})=>{h.update(e)}))),S.push(Promise.resolve({properties:s.properties}));return Promise.all(S).then((e=>Promise.all([v.initialize(),y.initialize(),a3({reducedDataModel:h,layoutService:l,continuousDataModel:p,trendLineModel:m})]).then((t=>[e,t.pop()]))))}),[s]);e.useEffect((()=>{var e;if(null==r||null===(e=r.colorService)||void 0===e||!e.getMain()||!M)return;const{layoutService:t,selectionService:n,reducedDataModel:o,continuousDataModel:s,trendLineModel:l,legendLayoutService:c,colorService:u,viewModel:d}=r;a.set("minorMinMax",M);const f=t.getHyperCube(),h=t.meta.isContinuous?s.getInitialCube():o.model().cube,{field:m}=u.getMain().getSettings(),y=!t.meta.isContinuous&&(o.model().mode.isReduced||t.meta.isStacked)&&c,v=y?c.getHyperCube():void 0;n.setBrushAliases({colorField:m,useLegendCube:y,legendAlias:"legendCube/"+m});const b=function({mainCube:e,miniCube:t,legendCube:n,localeInfo:r,layoutService:i,viewModel:o,trendLineModel:a}){const s=i.refs.dataPages.split(".").pop();let l=[],c=[];const u=i.meta.isContinuous?[{key:o.fields.majorNumeric,from:i.meta.isStackedByDimension?o.fields.majorStack:o.fields.major,override:{value:e=>e.qNum}}]:void 0;return{prepPicassoDataSet:()=>({key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}}),prepPicassoData(i){const o=[{type:"q",key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}},{type:"q",key:"miniCube",data:t,config:{localeInfo:r,virtualFields:u}},...i];return n&&o.push({type:"q",key:"legendCube",data:n,config:{localeInfo:r,virtualFields:u}}),a.query.hasTrendLines()&&o.push({key:"trend",data:a.query.getData()}),o},extractDataPages(){l=e[s],c=t.qDataPages,e[s]=[],t.qDataPages=[]},insertDataPages(){e[s]=l,t.qDataPages=c}}}({mainCube:f,miniCube:h,legendCube:v,localeInfo:i.localeInfo,layoutService:t,viewModel:d,trendLineModel:l}),x=k[k.length-1];g({localeInfo:i.localeInfo,...x}),p(b)}),[M]),e.useEffect((()=>{if(!r||!m||!h)return;const e=r.colorService.getMain();if(!e)return;h.prepPicassoDataSet();const t=h.prepPicassoData(e.getData());v(t)}),[m]),e.useEffect((()=>{var e;null!=r&&null!==(e=r.colorService)&&void 0!==e&&e.getMain()&&n.update&&h&&y&&S().then((()=>{const{layoutService:e,discrete:t,legendLayoutService:i}=r;if(i){1===e.getLayoutValue("scrollStartPos")&&i.setDataPages([t.query.getCurrentDataPage()])}n.update(),HD.cacheProperties({viewCache:a,layout:e.getLayout()})}))}),[y]),e.useEffect((()=>{if(!(l&&c&&h&&null!=n&&n.update&&null!=r&&r.colorService.getMain()))return;const{viewModel:e}=r;e.animations.isSizeChanging=!0;const{dockService:t,themeService:o}=r;t.update({width:l,height:c}),o.setTheme(i.theme),S().then((()=>{n.update&&n.update()}))}),[l,c]),e.useEffect((()=>{if(null==n||!n.update)return;const{viewModel:e}=r;n.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]}),e.animations.isPartialUpdating=!1}),[b])}function a6({env:t,services:n}){const r=e.useApp(),i=e.useModel(),o=e.useRenderState(),[a,s]=e.usePromise((async()=>{if(!t||!n)return Promise.resolve();const{flags:e}=t,{layoutService:a}=n,{isSnapshot:s,isStacked:l,isContinuous:c}=a.meta,u=[];return s||u.push(i.getEffectiveProperties()),Promise.all(u).then((async t=>{const n=t[0]||void 0;if(e.isEnabled("IM_1579_HIDE_DIM_MEA")&&null!=n&&n.qHyperCubeDef){const e=a.getLayout(),t=ny(!0,{},n);if((({properties:e,layout:t,isStacked:n,isContinuous:r,model:i})=>{var o,a;const s=t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})),l=t.qHyperCube.qMeasureInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})),c=ny(!0,{},e);return((e,t,n)=>{const{color:{mode:r}}=n;e.length>1&&n.color?n.color.persistent=!0:"byDimension"===r&&t.length>1?n.color.mode="byMultiple":"byExpression"===r&&0===t.length?n.color.mode="primary":0===e.length&&t.length>0&&(n.color.byMeasureDef=void 0,n.color.byDimDef=void 0,1===t.length&&(n.color.mode="primary"))})(s,l,e),s.length>1&&n&&!r&&"S"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="K"),s.length<2&&"K"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="S"),null===(o=i.colorSupport)||void 0===o||null===(a=o.colorByUpdater)||void 0===a||a.call(o,e,"qHyperCubeDef.",t),JSON.stringify(c)!==JSON.stringify(e)&&(e.hash=Math.random(),!0)})({properties:n,layout:e,isStacked:l,isContinuous:c,model:i}))return o.pending(),(e=>{var t;return!(!e||e.qHasSoftPatches||e.qExtendsId||!(((null===(t=e.qMeta)||void 0===t?void 0:t.privileges)||[]).indexOf("update")>-1))})(e)?i.setProperties(n).then((()=>{r.clearUndoBuffer()})):void await((e,t,n)=>{if(!e)return Promise.resolve();let r=ak.generate(t,n);return ny(!0,t,n),r&&r.length?(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0)):Promise.resolve()})(i,t,n);o.restore()}return{properties:n}}))}),[t,n]);if(s&&!s.isHandled)throw s;return a}var s6={exports:{}};!function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=u(d,n),d!==(i=u(t,n))&&(p&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},c(d,{name:n,newValue:e(p,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=u(d,n),d!==(i=u(t,n))&&(p&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},c(d,{name:n,newValue:e(p,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t,n){n.r(t);var r=n(0),i=n.n(r),o=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},a=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function v(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=y(u(r[0],i),p(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),h=p(0),m=p(1),g=y(d,h),v=y(f,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function b(e){return"".concat(e,"(")}function x(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var w={isFullRange:d,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(h(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=p(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=p(0),f=p(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:b,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:v,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:h,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=x({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function S(e){return(S="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)}var k=i.a.bind(null,!0),M={},C=Array.isArray;function E(e){return null!=e&&!Array.isArray(e)&&"object"===S(e)}function T(e){return void 0===e}function q(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function D(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}})),e}function N(e,t){var n=!0;if(E(e)&&E(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){N(e[r],t[r])||(n=!1)})),n);if(C(e)&&C(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!N(e[r],t[r]))return!1;return!0}return e===t}M.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?k({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);N(o,a)||q(t,i)||(T(a)?r.push({op:"add",path:s,value:o}):E(o)&&E(a)?r=r.concat(M.generate(a,o,s)):C(o)&&C(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(N(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(M.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){T(t[i])&&!q(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},M.apply=function(e,t){t.forEach((function(t){var n,r=D(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(C(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(C(o)&&C(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(E(o)&&E(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!q(n,e)&&delete n[e]})),k(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var c=D(e,t.from);C(r)?r.splice(+i,0,c.splice(+a,1)[0]):(r[i]=c[a],delete c[a])}else"remove"===t.op&&(C(r)?r.splice(+i,1):delete r[i])}))},M.clone=function(e){return k({},e)},M.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},M.updateObject=function(e,t){Object.keys(e).length?M.apply(e,M.generate(e,t)):k(e,t)};var A=M,O=function(e,t,n){if(!e)return Promise.resolve();var r=A.generate(t,n);return i()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()},L="accumulation";function I(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function _(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},P={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),f=w.getAboveComp(n,l,u,d),h=w.getRangeComp("RangeSum",f);if(w.needDimension({modifier:n,properties:r,layout:i})){var p=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(h,p,m);h=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return h},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,R)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=I(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=I(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(L))return!1;var o=I(t,e);return o&&!o.disabled}}}},z="movingAverage";function F(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function j(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},H={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:i,layout:o}));var u=a(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=w.getNumStepComp(r,c),p=w.getAboveComp(r,c,f,h);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",p);else{var m=w.getRangeComp("RangeSum",p),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(w.needDimension({modifier:r,properties:i,layout:o})){var v=w.getDimComp(u,1),b=w.getDimComp(u,0),x=w.getAggrComp(y,v,b);y=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,B)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(j(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(j(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=F(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=F(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=F(t,e);return o&&!o.disabled}}}},V="difference";function W(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===V)return n[r]}function U(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===V)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Y={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(c,1),p=w.getDimComp(c,0),m=w.getAggrComp(f,h,p);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys($).forEach((function(t){void 0===e[t]&&(e[t]=$[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(U(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(U(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(U(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=W(t,e);return o&&!o.disabled}}}},K={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},G={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},X="normalization";function J(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function Q(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:G.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:G.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:G.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,n){if(e<2){var r=Q(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=Q(t,1);t.splice(r,1)}return t}(J(e,r).selectionScope,o)}function te(e,t,n){var r=[{value:K.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:K.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:K.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Q(t,0);t.splice(r,1)}return t}(J(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:G.DISREGARD_ALL_DIMENSIONS,selectionScope:K.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function ie(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=re(t),l=ie(t,n,r),c=""===s&&""===l?"":s||l,u=oe(i,o),d=ae(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Z(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:K.DISREGARD_SELECTION,options:function(n){return te(n,t,e)}},field:{refFn:function(t){return"".concat(Z(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return J(t,e).selectionScope===K.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Z(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return J(t,e).selectionScope===K.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Z(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:G.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return(J(t,e).dimensionalScope||0)===G.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:re,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ce={initBase:function(e,t){(t||ce.isValid(e))&&(o(e,"qDef.base.qDef",a(e,"qDef.qDef")),o(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),o(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),o(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ce.isValid(e)&&(o(e,"qDef.qDef",a(e,"qDef.base.qDef")),o(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),o(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),o(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&o(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},ue=ce;function de(e){return(de="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)}var fe={accumulation:P,movingAverage:H,difference:Y,normalization:se},he=(t.default={modifiers:fe,apply:pe,applyModifiers:me,cleanUpMeasure:ge,destroy:function(e){e&&he[e.id]&&he[e.id].masterItemSubscriber&&(he[e.id].masterItemSubscriber&&he[e.id].masterItemSubscriber.unsubscribe(),delete he[e.id])},hasActiveModifiers:ye,getActiveModifier:ve,initBase:ue.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return fe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return fe[e]&&fe[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=we(e);qe({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Le({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:be},{});function pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,o=void 0!==r&&r,s=e.masterItem;he[t.id]=he[t.id]||{isFirstTime:!0};var l=he[t.id].isFirstTime;if(he[t.id].isFirstTime=!1,n&&"object"===de(n))return me({model:t,properties:n});var c=t?t.layout:void 0,u=a(c,"qSelectionInfo.qInSelections");if(o||u)return Promise.resolve(!1);var d=a(c,"qHyperCube.qMeasureInfo"),f=he[t.id].lastReloadTime;if(he[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:d,layout:c})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Te({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:d,layout:c,model:t,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return qe({modifiers:we(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:d,layout:c,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=i()(!0,{},e);ke(n);var r=Ie(n);return De({model:t}).then((function(i){return Ne({libraryIds:r,model:t}).then((function(r){return h&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Te({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===de(e)&&!e.disabled){if(n++,"object"!==de(fe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=fe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ce(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),me({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===de(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Ie(n);return _e({model:t,libraryIds:r}).then((function(){var e=i()(!0,{},n);return xe(n).forEach((function(e){return ge(e)})),Oe({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function me(e){var t=e.model,n=e.oldProperties,r=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?i()(!0,{},r):r),ke(r);var f=Ie(r);return _e({model:t,libraryIds:f,masterItem:c}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:n}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=o?void 0:Ie(n);return De({model:r,dimensionAndFieldList:s}).then((function(e){return Ne({libraryIds:l,model:r,libraryItemsProps:o}).then((function(r){t.forEach((function(t){qe({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,o=e.dimensionAndFieldList,s=0;ue.isValid(t)||ue.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===de(e)&&!e.disabled){if(s++,"object"!==de(fe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");fe[e.type].initModifier(e);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=fe[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:o}):function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList;"function"==typeof fe[n.type].updateModifier&&fe[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=fe[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:o}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||be(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&be(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),Me(t)):ge(t)}))}))}))}({measures:o,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Oe({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=we(e);return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&!fe[e.type]}))}(e)?ue.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Me(e)}function ye(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return qe({modifiers:we(e),properties:n,layout:r})}))}function ve(e){var t=we(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(fe[r.type]&&!r.disabled)return r}}function be(e){var t=ve(e);return!t||fe[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function we(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Se(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function ke(e){xe(e).forEach((function(e){return function(e){var t=ve(e);t&&(void 0!==t.outputExpression&&Se(t)!==e.qDef.qDef?delete e.qDef.base:!ue.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Me(e){var t=we(e);Array.isArray(t)&&t.forEach((function(t){"object"===de(t)&&(t.disabled||!fe[t.type]&&Se(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ce(e){return e.base||e.qDef&&e.qDef.base}function Ee(e){var t=Ce(e);return e.qLibraryId||t&&t.qLibraryId}function Te(e){var t=e.measure,n=e.properties,r=e.layout;return!Ee(t)&&qe({modifiers:we(t),properties:n,layout:r})}function qe(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==de(e)||e.disabled||!fe[e.type])&&(void 0===i[e.type]&&(i[e.type]=fe[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function De(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));r.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return i}))}function Ne(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Ae(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Oe(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ae)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),Ae)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ae)!==JSON.stringify(a(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ae);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):O(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Le(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&fe[e.type]&&fe[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ie(e){var t=xe(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=we(t);if(qe({modifiers:r,properties:e})){var o=Ee(t);o&&n.push(o),i=i||Le({modifiers:r,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function _e(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(he[t.id].masterItemSubscriber=he[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(e,n)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),o={},t.forEach((function(e){o[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){i[e]||o[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(u(e,"getMeasure"))})),Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return pe({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),he[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?r(n)+t:t}function i(e){return(i="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)}n.r(t);var o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u},f=n(1),h=n.n(f),p={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){h.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function m(e,t,n){var r,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(r=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function v(e,t){var n=y()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function b(e,t){return y()(!0,{},t,e)}function x(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var w=Math.pow(2,53)-1;function S(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E={importCommonProperties:function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=v(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=v(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=b(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=b(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=x(a.max,i.dimensions.length,w),l=x(a.min,i.dimensions.length,0);return{maxDimensions:x(o.max,s,w),minDimensions:x(o.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=y()(!0,{},n,i)).components&&(i.components=[]),i},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=S(i.qDimensions);i.qDimensions=[],a.forEach((function(e){i.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=M(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&h.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function T(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var q={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),p.addDimensions({exportFormat:i,qHyperCubeDef:l}),p.addMeasures({exportFormat:i,qHyperCubeDef:l}),p.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,p.copyProperties({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),p.updateLayoutExclude({exportFormat:i,properties:a}),r||p.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(m(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(m(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(m(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,h=e.isHCModifierSupported,p=void 0===h||h,m={qChildren:[]},g=E.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=E.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,w=b.minDimensions,S=b.maxMeasures,k=b.minMeasures,M=l.defaultDimension,C=void 0===M?E.getDefaultDimension():M,q=l.defaultMeasure,D=void 0===q?E.getDefaultMeasure():q;v.qDimensions.length=0,v.qMeasures.length=0,E.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:S,minMeasures:k})&&E.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:S,minMeasures:k,newHyperCubeDef:v}),E.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:w,newHyperCubeDef:v,defaultDimension:C}),E.addMeasures({exportFormat:t,maxMeasures:S,minMeasures:k,newHyperCubeDef:v,defaultMeasure:D}),E.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),E.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),E.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:v}),E.copyPropertyIfExist("qMaxStackedCells",y,v),E.copyPropertyIfExist("qNoOfLeftDims",y,v),E.copyPropertyOrSetDefault("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),E.copyPropertyOrSetDefault("qMode",y,v,"S"),E.copyPropertyOrSetDefault("qReductionMode",y,v,"N"),E.copyPropertyOrSetDefault("qSortbyYValue",y,v),E.copyPropertyOrSetDefault("qIndentMode",y,v),E.copyPropertyOrSetDefault("qShowTotalsAbove",y,v),E.importCommonProperties(g,t,r),m.qProperty=g;var N=o.getValue(u||{},"support.modifiers");return E.restoreMeasuresModifiers({measures:v.qMeasures,modifierTypes:N}),f&&T(m.qProperty,"storedFilters"),"S"===v.qMode&&p&&T(m.qProperty,"dynamicScript"),m}},D={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function N(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function A(e,t){return e.length!==t}var O={create:function(e,t){if(!e||!D[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(N(a,t,r,i),A(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},L={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},I={colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>0&&L.getNumMeasures(e)<=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>0},expression:function(e){return L.getNumMeasures(e)>=1}}},_={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},R={scatterplot:_,"sn-scatter-plot":_,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)<=1},expression:function(e){return L.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>=1},expression:function(e){return L.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumDimensions(e)>=1}}}};function P(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function z(e,t){var n=O.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){P(e,"qAttributeDimensions",n),P(e,"qAttributeExpressions",n)})),t.forEach((function(e){P(e,"qAttributeDimensions",n),P(e,"qAttributeExpressions",n)}))}function F(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function j(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;z(r,i);var l=r[r.length-1];if(l){var c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var h=O.create(O.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:h,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:h,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(h.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(h)):l.qAttributeExpressions.push(h)}}}function B(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(i=function(e,t){return t?e.qLibraryId:h.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return h.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var H={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function V(e,t,n,r){var i=n?"expression":t.type,o=e.color,a=o.mode,s=L.getItemLabel(t);switch(F(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||L.wrapFieldName(t.name),key:L.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&H.useMasterNumberFormat(o.formatting)}r||(o.auto=!1,o.mode=a)}function W(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=O.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return V(e,B("dimension",!!a,a||r)),!!a}function U(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&F(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=B("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,V(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&W(e,t))return;j({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}function $(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&F(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=B("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,V(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=O.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return V(e,B("measure",!!s,s||r[0])),!!s}(e,t))return;j({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}var Y={changeProperty:function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(R[t]||I).colorModeOptions||I.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},updateColorBy:function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"color.auto"),i=o.getValue(e,"".concat(t,"qDimensions"),[]),a=o.getValue(e,"".concat(t,"qMeasures"),[]),s=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?z(i,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:i})?U(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:r,colorMode:n,dimensions:i,measures:a,properties:e})?$(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),z(r,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},addColorByExpression:function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n}},K={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=q.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=O.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return O.moveByIdFromGroup(a,[],"qAttributeDimensions",c),O.moveByIdFromGroup(a,[],"qAttributeExpressions",c),O.moveByIdFromGroup(s,[],"qAttributeExpressions",u),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=q.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),h=o.getValue(d,"qHyperCubeDef.qDimensions",[]),p=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=Y.getCanColorBy(d,f),y=Y.shouldUpdateColorBy({canColorBy:g,autoColor:m,colorMode:p,dimensions:h});return g[p]?Y.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:d})&&Y.addColorByExpression(d):Y.switchToAutoColor(d),y&&Y.updateColorBy(d,"qHyperCubeDef."),Y.shouldSwitchToColorPersistent(d)&&Y.changeProperty(d,"color.persistent",!0),Y.deleteTotalMode(h),u}},G=["bar","marker","line"],X={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?T(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):T(n,"supportedAutoMinMax")||y()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),G.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}},J={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=K.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(m(s,"measureAxis.min","supportedAutoMinMax"),m(s,"measureAxis.max","supportedAutoMinMax")):(m(s,"measureAxis.min","unsupportedAutoMinMax"),m(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=K.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return X.handleAutoMinMax({initialProperties:n,properties:d}),X.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:d,measureType:a}),X.setInterColumnSortOrder(d.qHyperCubeDef),u}};function Z(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Q(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var c=Z(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Z(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},ne={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},quarantineAlternative:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})},unquarantineAlternative:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:q,colorChart:K,axisChart:J,quarantineProperty:m,unquarantineProperty:T,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:ne}}])}(s6);var l6=Wg(s6.exports);function c6(e,t){if("custom"===e.dimensionAxis.axisDisplayMode){const n=t.layout.qHyperCube.qMeasureInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2})).length,r=t.layout.qHyperCube.qDimensionInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2})).length,i=e.dimensionAxis.maxVisibleItems;i<1?e.dimensionAxis.maxVisibleItems=10:i>1e4/(r+n)&&(e.dimensionAxis.maxVisibleItems=Math.min(i,Math.floor(1e4/(r+n))))}}const u6=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],d6=(e,t)=>{var n,r,i,o,a;const s=null===(n=t.qHyperCube)||void 0===n||null===(r=n.qMeasureInfo)||void 0===r?void 0:r.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2})).length,l=null===(i=t.qHyperCube)||void 0===i||null===(o=i.qDimensionInfo)||void 0===o?void 0:o.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2})).length,c="grouped"===(null===(a=e.barGrouping)||void 0===a?void 0:a.grouping)&&l>0&&s+l>2;return by.continuous(t)?1:c?.9:.7},f6=(e,t,n)=>{const r=e+".fontFamily",i=e+".fontSize";return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:e+".color",defaultValue:()=>({color:n.getStyle("object.barChart",e,"color")})}}}}};function h6(e,t,n){const r=function(e){var t=e.theme,n=e.translator,r=e.config,i=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:void 0===r?{}:r}),o=i.id,a=i.paths,s={};a.forEach((function(e){for(var r=e.split("."),i=s,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=FD({theme:t,translator:n,id:o,path:e}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var l=function(e){for(var t=e.split("."),n=s,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return s.getDefaultValue=function(e){return l(e).getDefaultValue()},s.getOptions=function(e){return l(e).getOptions()},s}({theme:e,translator:n,config:{id:"barChart",paths:["axis.title","axis.label.name","label.value"]}});return{component:"styling-panel",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==t?void 0:t.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),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:Object.keys(u6).map((e=>u6[e])),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",show:(e,t)=>!by.continuous(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue(e,t,n){const{properties:r}=n,{barGrouping:i,qHyperCubeDef:o}=r,a=o.qMeasures.length,s=o.qDimensions.length,l="grouped"===i.grouping&&s>0&&a+s>2;return by.continuous(r)?1:l?.9:.7},schemaIgnore:!0}}}}},axisTitleSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.title",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:f6("axis.title",r,e)}}}:void 0,axisLabelSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.label",component:"panel-section",items:{axisLabelItems:{component:"items",ref:"components",key:"axis",items:f6("axis.label.name",r,e)}}}:void 0,labelSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.labelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:f6("label.value",r,e)}}}:void 0}}}function p6(e=!1,t,n,r){return e?function(e){return{classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"LayerStyleEditor.style.strokeWidth",component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:Object.keys(u6).map((e=>u6[e])),schemaIgnore:!0,defaultValue:u6[0].value},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891",index:-1},width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"items",show:(e,t)=>!by.continuous(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:(e,t,n)=>d6(n.properties,n.layout)}}}}},optionsSection:{translation:"LayerStyleEditor.label.Options",component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollbar:{ref:"scrollbar",translation:"properties.scrollbar",component:"dropdown",type:"string",options:Object.keys(W0.OPTIONS).map((e=>W0.OPTIONS[e])),schemaIgnore:!0,defaultValue:W0.DEFAULT.value},scrollAlignment:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",schemaIgnore:!0,defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},gridLines:{type:"items",items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}}}}}}}(n):h6(t,n,r)}const m6={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"bar",ref:"components",defaultValues:(e,t)=>({key:"bar",style:{width:d6(e,t.layout),strokeColor:{index:-1,color:"#205891"},strokeWidth:"none"}}),items:{bar:{components:"items",type:"items",uses:"styling.box",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",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"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},width:{show:(e,t,n)=>!by.continuous(n.layout),component:"slider",min:.01,max:1,step:.01,defaultValue:.7}}}}},g6=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2},y6=(e,t)=>e.qHyperCube[t].filter((e=>g6(e))),v6=e=>({get:(t,n,r)=>by.continuous(r.layout)?e:t(n.type),set(e,t,n){const r=ky(n.type,n);t(n.type,e,r)}}),b6=e=>{const t=ny(!0,{},e);return t.qHyperCube.qMeasureInfo=y6(e,"qMeasureInfo"),t.qHyperCube.qDimensionInfo=y6(e,"qDimensionInfo"),t&&!by.continuous(t)&&by.stacked(t)},x6=({translator:e,flags:t,anything:n})=>{var r,i,o;const a=null==n||null===(r=n.sense)||void 0===r||null===(i=r.isUnsupportedFeature)||void 0===i?void 0:i.call(r,"continuousData"),s={items:{labels:{items:{header:{show:(e,t,n)=>y6(n.layout,"qMeasureInfo").length},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:(e,t,n)=>!b6(t.layout)&&y6(n.layout,"qMeasureInfo").length},segmentLabels:{component:"checkbox",ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",defaultValue:!1,show:(e,t)=>b6(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showSegmentLabels,set(e,t,n,r,i){i.dataPoint.showSegmentLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},totalLabels:{component:"checkbox",ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",defaultValue:!0,show:(e,t)=>b6(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showTotalLabels,set(e,t,n,r,i){i.dataPoint.showTotalLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t,n)=>y6(n.layout,"qDimensionInfo").length&&y6(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.Measure.Hide",defaultValue:"all",show:(e,t,n)=>y6(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxis.show||"none"===r.measureAxis.show,set(e,t,n,r,i){i.measureAxis.show=e?"labels":"all"}}}}}}},l=null==n||null===(o=n.sense)||void 0===o?void 0:o.theme,c={uses:"settings",items:{simpleStyling:p6(!0,l,t,e),simpleLabels:s,general:{items:{showDisclaimer:null!=t&&t.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{boxStyling:null!=t&&t.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_BARCHART")?p6(!1,l,t,e):m6,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){const n=y6(t.layout,"qMeasureInfo").length,r=y6(t.layout,"qDimensionInfo").length;return r>0&&n+r>2},change(e,t){y6(t.layout,"qDimensionInfo").length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:(e,t,n)=>by.continuous(n.layout),convertFunctions:v6("stacked")},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)=>by.continuous(n.layout),convertFunctions:v6("vertical")},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(W0.OPTIONS).map((e=>W0.OPTIONS[e])),defaultValue:W0.DEFAULT.value},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)=>!by.continuous(n.layout)}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:(t,n)=>((e,t,n)=>n&&n.get(b6(t.layout)?"properties.on":"Common.Auto"))(0,n,e)},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&b6(n.layout)},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&b6(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,n,r)=>t&&t.isEnabled("BC_XAXIS_MODE")&&!by.continuous(r.layout),items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",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:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid(e,t,n){const r=y6(n.layout,"qMeasureInfo").length,i=y6(n.layout,"qDimensionInfo").length,o=e.dimensionAxis.maxVisibleItems;return o<0||o>1e4/(i+r)},globalChange:c6,defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}},continuousGroup:{items:{miniChart:null},show:!a}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};return null!=t&&t.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(c.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"}]}}}),c},w6={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){Bv(e)}}}},interColumnSorting:{reset:(e,t)=>{const{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i}=e.qHyperCubeDef,{qCardinal:o}=t.layout.qHyperCube.qDimensionInfo[0],a=i.length,s=[...Array(a).keys()];1===n.length&&r.length>=1&&o>10&&([s[0],s[1]]=[s[1],s[0]]),e.qHyperCubeDef.qInterColumnSortOrder=s}}}}}},S6={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:{uses:"dimReflines"}}},k6=({translator:e,flags:t,anything:n})=>{var r,i;return{uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,r){var i,o;if(null!=n&&null!==(i=n.sense)&&void 0!==i&&null!==(o=i.isUnsupportedFeature)&&void 0!==o&&o.call(i,"includeZeroValues"))return!1;const a=((e,t)=>{var n,r,i,o,a,s;const l=null===(n=t.layout)||void 0===n||null===(r=n.qHyperCube)||void 0===r||null===(i=r.qDimensionInfo)||void 0===i?void 0:i.findIndex((e=>g6(e)));return(null===(o=t.properties)||void 0===o||null===(a=o.qHyperCubeDef)||void 0===a||null===(s=a.qDimensions)||void 0===s?void 0:s[l])===e})(e,t),s=by.continuous(r.layout);return!(a&&s)}},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Dimensions.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0,show:()=>t.isEnabled("IM_1579_HIDE_DIM_MEA")}}},measures:{items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Measures.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0,show:()=>t.isEnabled("IM_1579_HIDE_DIM_MEA")},trendLines:null!=n&&null!==(r=n.sense)&&void 0!==r&&null!==(i=r.isUnsupportedFeature)&&void 0!==i&&i.call(r,"trendlines")?void 0:T5({translator:e,allowStackedByDimension:t&&t.isEnabled("TRENDLINES_STACKED_DIM")})}}}}};function M6({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:k6({translator:e,flags:t,anything:n}),sorting:w6,addons:S6,settings:x6({translator:e,flags:t,anything:n})}}}const C6=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==l2};function E6(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t,n){const r=n.qHyperCube.qMeasureInfo.length,i=n.qHyperCube.qDimensionInfo.filter((e=>C6(e))).length;return 1===r&&2===i&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},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){return t.qHyperCube.qMeasureInfo.filter((e=>C6(e))).length+t.qHyperCube.qDimensionInfo.filter((e=>C6(e))).length>2&&!by.continuous(t)&&!((null==(n=t)||null===(r=n.qHyperCube)||void 0===r||null===(i=r.qDimensionInfo)||void 0===i?void 0:i.filter((e=>C6(e))).length)>1&&(null==n||null===(o=n.qHyperCube)||void 0===o?void 0:o.isHCEnabled));var n,r,i,o},change(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},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)=>!by.continuous(t)}}},color:{uses:"color"}}}}function T6(e){const t={},n=HE(e,"components"),r=HE(e,"dimensionAxis.axisDisplayMode"),i=HE(e,"dimensionAxis.maxVisibleItems"),o=n?n.filter((e=>"bar"===e.key))[0]:void 0,a=HE(e,"tooltip");if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),i&&(t.chart_dimaxis_maxVisibleItems=i),r&&(t.chart_dimaxis_axisDisplayMode=r),a){t.chart_tooltip_custom=!a.auto;const e=HE(a,"chart.object.refId");!a.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const q6=e=>!!(e&&e.qHyperCube.qSize.qcy>0),D6={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function N6(){const e=[];return Object.keys(D6).forEach((t=>{e.push(D6[t])})),e}function A6(e){const{flags:t}=e;return{definition:M6(e),softDefinition:E6(),support:{snapshot:q6,export:q6,exportData:!0,sharing:q6,viewData:!0,effects:!0,modifiers:N6()},importProperties:(n,r,i,o)=>{const a={layout:{templateId:r.templateId}};i.mapProperties(a);const s={defaultDimension:i.getDefaultDimensionProperties(),defaultMeasure:i.getDefaultMeasureProperties()},l=l6.axisChart.importProperties({exportFormat:n,initialProperties:r,dataDefinition:y2(e),defaultPropertyValues:s,hypercubePath:o,extension:i}),c=l.qProperty;return c.qHyperCubeDef.qDimensions.length>1&&"stacked"===c.barGrouping.grouping&&(c.qHyperCubeDef.qMode="K",c.qHyperCubeDef.qAlwaysFullyExpanded=!0),t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(l6.conditionalShow.unquarantine(c),l6.conditionalShow.unquarantineAlternative(c)),l},exportProperties:(e,n,r)=>{t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(l6.conditionalShow.quarantine(e.qProperty),l6.conditionalShow.quarantineAlternative(e.qProperty));return l6.axisChart.exportProperties({propertyTree:e,hyperCubePath:n,viewDataMode:r})},migrate:{properties:e=>(e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(Bv)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:r,showMiniChartForContinuousAxis:i}=e;if(t||!1!==i)return;const{continuousAuto:o}=n;(o||!o&&r)&&(e.scrollbar=W0.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:T6}}return function(t){const n=j1();return{qae:v2(t),ext:A6(t),component(){const r=x2({env:t}),{viewState:i,viewCache:o}=w2(),a=function({picasso:t}){const n=e.useElement(),r=e.useOptions(),[i,o]=e.useState();return e.useEffect((()=>{if(!t)return()=>{};n.style.overflow="hidden";const e=t({renderer:{prio:[(null==r?void 0:r.renderer)||"canvas"]}}).chart({element:n,data:[],settings:{}});o(e);const{destroy:i}=e;return()=>{i()}}),[r.renderer]),i}({picasso:n}),s=B5({picasso:n,chart:a,environment:r,viewState:i,viewCache:o}),l=a6({env:t,services:s});o6({picasso:n,chart:a,services:s,environment:r,viewState:i,viewCache:o,bootstrapped:l}),(({services:t,chart:n,viewState:r})=>{e.onTakeSnapshot((e=>{if(!t)return;const{layoutService:i,dockService:o,colorService:a,discrete:s,continuousDataModel:l,reducedDataModel:c}=t,{width:u,height:d}=o.meta.chart.size;return e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:u,h:d}},i.meta.isSnapshot?Promise.resolve():(e.snapshotData.content.chartData={scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:xy(n,I5.COMPONENT.LEGEND_COLOR_CAT)},i.meta.isDiscrete?(s.command.setSnapshotData(e),c.setSnapshotData(e)):l.setSnapshotData(e),a.getMain().getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{})))})),e.useImperativeHandle((()=>({getViewState(){if(r&&n)return{scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:xy(n,I5.COMPONENT.LEGEND_COLOR_CAT)}}})),[r,n])})({services:s,chart:a,viewState:i})}}}}));