@nebula.js/sn-combo-chart 1.8.7 → 1.8.11

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.
package/core/esm/index.js CHANGED
@@ -1,974 +1,974 @@
1
1
  /*
2
- * @nebula.js/sn-combo-chart v1.8.7
2
+ * @nebula.js/sn-combo-chart v1.8.11
3
3
  * Copyright (c) 2021 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- import{useElement as e,useState as t,useEffect as n,useRect as r,usePromise as i,useStaleLayout as o,useModel as a,useApp as s,useAppLayout as u,usePlugins as l,useOptions as c,useTranslator as f,useEmbed as d,useTheme as m,useDeviceType as p,useConstraints as h,useLayout as v,useAction as y,useSelections as g,onTakeSnapshot as b,useImperativeHandle as x}from"@nebula.js/stardust";import M from"hammerjs";import S from"picasso.js";import E from"picasso-plugin-q";import C from"picasso-plugin-hammer";import q from"react";import{Button as O,Popover as A,List as D,ListItem as N,ListItemIcon as I,ListItemText as T}from"@material-ui/core";import w from"react-dom";import{createGenerateClassName as L,StylesProvider as k,ThemeProvider as R}from"@material-ui/styles";function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){Y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function H(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){_(o,r,i,a,s,"next",e)}function s(e){_(o,r,i,a,s,"throw",e)}a(void 0)}))}}function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(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)}}function z(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),e}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(){return(U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function W(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}function X(e){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?$(e):t}function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=X(e);if(t){var i=X(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return J(this,n)}}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||te(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e){return function(e){if(Array.isArray(e))return ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||te(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 te(e,t){if(e){if("string"==typeof e)return ne(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)?ne(e,t):void 0}}function ne(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 re(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=te(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oe=Object.prototype.hasOwnProperty,ae=Object.prototype.toString,se=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,le=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===ae.call(e)},ce=function(e){if(!e||"[object Object]"!==ae.call(e))return!1;var t,n=oe.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&oe.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||oe.call(e,t)},fe=function(e,t){se&&"__proto__"===t.name?se(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},de=function(e,t){if("__proto__"===t){if(!oe.call(e,t))return;if(ue)return ue(e,t).value}return e[t]},me=function e(){var t,n,r,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),(null==s||"object"!==F(s)&&"function"!=typeof s)&&(s={});u<l;++u)if(null!=(t=arguments[u]))for(n in t)r=de(s,n),s!==(i=de(t,n))&&(c&&i&&(ce(i)||(o=le(i)))?(o?(o=!1,a=r&&le(r)?r:[]):a=r&&ce(r)?r:{},fe(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&fe(s,{name:n,newValue:i}));return s},pe="center",he="bottom",ve={NoDataExist:{label:"NoDataExist",alignment:pe,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:pe,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:pe,default:!1},LimitedData:{label:"LimitedData",alignment:he,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:he,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:he,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:he,default:!1}};var ye=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],ge={};ye.forEach((function(e){var t=Q(e,2),n=t[0],r=t[1],i=r.width,o=r.height;ge[n]={width:i,height:o}}));var be=function(){return ge};var xe=["$date","$timestamp","$time"],Me=["D","TS","T"],Se={hasTimeTag:function(e){return!!(e&&e.qTags&&e.qTags.some((function(e){return xe.some((function(t){return t===e}))})))},hasUnknownFormat:function(e){return!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType)},hasTimeFormat:function(e){return!!(e&&e.qNumFormat&&Me.some((function(t){return t===e.qNumFormat.qType})))},isTimeDimension:function(e,t){return!!(e&&t&&(Se.hasTimeTag(t)&&Se.hasUnknownFormat(t)||Se.hasTimeFormat(t)))},isTime:function(e,t){return!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&Se.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0]))},canBeContinuousDimension:function(e){if(!e)return!1;var t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((function(e){return"$numeric"===e})))},canBeContinuous:function(e){return!(!(e&&e.qHyperCube&&e.qHyperCube.qDimensionInfo)||e.qHyperCube.qDimensionInfo.length<1)&&Se.canBeContinuousDimension(e.qHyperCube.qDimensionInfo[0])},maxNumberOfLines:12},Ee=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},Ce=function(e){return Ee(e,"qHyperCube.qDimensionInfo",[])},qe=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!Se.canBeContinuous(e)&&(Ee(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis)},Oe=function(e){return!Ce(e).length},Ae=function(e){return!!Ee(e,"snapshotData")};function De(e,t){var n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}var Ne=function(e){throw e.isHandled=!0,e};var Ie={getDockValue:function(e){return"near"===e||"left"===e||"top"===e?0:1},getOppositeDock:function(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":return"far";case"far":return"near";default:return"far"}},getHorizontalDock:function(e){return"near"===e||"left"===e?"left":"right"},getVerticalDock:function(e){return"near"===e||"bottom"===e?"bottom":"top"},getDock:function(e,t,n){return"vertical"===e||"y"===e?Ie.getVerticalDock(t):n?Ie.getOppositeDock(Ie.getHorizontalDock(t)):Ie.getHorizontalDock(t)},getInvertedOrientation:function(e){return"vertical"===e?"horizontal":"vertical"},getMinorScaleAxis:function(e){return"vertical"===e?"y":"x"},getMajorScaleAxis:function(e){return"vertical"===e?"x":"y"},getAlignment:function(e,t){switch(e){case"vertical":return"near"===t||"bottom"===t?1:0;default:return"near"===t||"left"===t?0:1}},getMeasureScaleInvert:function(e,t){return"vertical"===e||t},getDimensionScaleInvert:function(e,t){return"horizontal"===e&&t},getSize:function(e,t){var n=t.width,r=t.height;return"vertical"===e?n:r}},Te={stringWidthOverMWidth:function(e){return(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11},getCharacterRatios:function(e){if(!e)return{latin:0,cjk:0};var t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g),i=(t=t?t.length:0)+(n=n?n.length:0)+(r=r?r.length:0);return{latin:e.length-i,cjk:i}},getTotalCharacterRatios:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"qText";if(!e)return{latinRatio:1,cjkRatio:0};var r,i={latin:0,cjk:0};void 0===t?e.forEach((function(e){r=Te.getCharacterRatios(e[n]),i.latin+=r.latin,i.cjk+=r.cjk})):e.forEach((function(e){r=Te.getCharacterRatios(e[t][n]),i.latin+=r.latin,i.cjk+=r.cjk}));var o=Math.max(1,i.latin+i.cjk);return i.latinRatio=i.latin/o,i.cjkRatio=i.cjk/o,i},getAdjustedMaxGlyphCount:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"qText",i=Te.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e,s=Math.ceil(Te.stringWidthOverMWidth(o)+1.0909090909090908*a);return s}};function we(){if(!document.querySelector("#la-vie-tooltip")){var e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function Le(e){var t=e.key;return{show:!0,key:void 0===t?"tooltip":t,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){we()},beforeUpdate:function(){we()},destroyed:function(){var e;(e=document.querySelector("#la-vie-tooltip"))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector("#la-vie-tooltip")},content:function(e){var t=e.h,n=e.data,r=e.style;return n[0].map((function(e){return t("tr",{},function(e,t){var n=t.h,r=t.style;return e.map((function(e){var t={style:j(j({},r.cell||{}),e.style||{}),class:e.class};return e.colspan&&(t.colspan=e.colspan),n("td",t,e.content)}))}(e,{h:t,style:r}))}))},direction:e.rtl?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var ke=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Re=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Pe=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),je={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:function(e){return ke.test(e)},isRtlChar:function(e){return Re.test(e)||Pe.test(e)},detectTextDirection:function(e){var t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],je.isLtrChar(n))return"ltr";if(je.isRtlChar(n))return"rtl"}return"ltr"}},Fe={getColorSymbol:function(e,t){return e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}})},getNodeFillColor:function(e){return e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0},getColor:function(e,t,n){var r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label="".concat(n.coloring.label)),"color"!==n.coloring.type&&r.fillTooltip){var s=i("fill"),u="measure"===n.coloring.fieldType;if(a.value=u&&s?s(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){var l=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label="".concat(l)}}return a.fill=void 0===r._fillColor?Fe.getNodeFillColor(t):r._fillColor,a},getMeasure:function(e,t){var n=e(t.source.key).field(t.source.field).title();return{label:"".concat(n),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}},hideColorRow:function(e,t){return void 0===e.color.value||e.measures.some((function(e){return e.field===t.coloring.field}))},getTitleRow:function(e,t){var n=je.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow:function(e,t){var n=je.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow:function(e,t,n){var r=t?t.get("Object.ChartTooltip.NMore",e):"+".concat(e," more");return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:je.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:function(){return[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}]},getColorRow:function(e,t,n){var r=je.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=je.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Fe.getColorSymbol(e,t)]:[Fe.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=je.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=je.detectTextDirection(e.value);return[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:i?r?[e.value,Fe.getColorSymbol(t,n)]:[Fe.getColorSymbol(t,n),e.value]:[e.value],style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function _e(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function He(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ve(){}var Be="\\s*([+-]?\\d+)\\s*",ze="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ye="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ue=/^#([0-9a-f]{3,8})$/,We=new RegExp("^rgb\\("+[Be,Be,Be]+"\\)$"),Xe=new RegExp("^rgb\\("+[Ye,Ye,Ye]+"\\)$"),Ge=new RegExp("^rgba\\("+[Be,Be,Be,ze]+"\\)$"),Ke=new RegExp("^rgba\\("+[Ye,Ye,Ye,ze]+"\\)$"),$e=new RegExp("^hsl\\("+[ze,Ye,Ye]+"\\)$"),Je=new RegExp("^hsla\\("+[ze,Ye,Ye,ze]+"\\)$"),Ze={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Qe(){return this.rgb().formatHex()}function et(){return this.rgb().formatRgb()}function tt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ue.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?nt(t):3===n?new at(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?rt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?rt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=We.exec(e))?new at(t[1],t[2],t[3],1):(t=Xe.exec(e))?new at(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ge.exec(e))?rt(t[1],t[2],t[3],t[4]):(t=Ke.exec(e))?rt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=$e.exec(e))?ct(t[1],t[2]/100,t[3]/100,1):(t=Je.exec(e))?ct(t[1],t[2]/100,t[3]/100,t[4]):Ze.hasOwnProperty(e)?nt(Ze[e]):"transparent"===e?new at(NaN,NaN,NaN,0):null}function nt(e){return new at(e>>16&255,e>>8&255,255&e,1)}function rt(e,t,n,r){return r<=0&&(e=t=n=NaN),new at(e,t,n,r)}function it(e){return e instanceof Ve||(e=tt(e)),e?new at((e=e.rgb()).r,e.g,e.b,e.opacity):new at}function ot(e,t,n,r){return 1===arguments.length?it(e):new at(e,t,n,null==r?1:r)}function at(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function st(){return"#"+lt(this.r)+lt(this.g)+lt(this.b)}function ut(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function lt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ct(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new dt(e,t,n,r)}function ft(e){if(e instanceof dt)return new dt(e.h,e.s,e.l,e.opacity);if(e instanceof Ve||(e=tt(e)),!e)return new dt;if(e instanceof dt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new dt(a,s,u,e.opacity)}function dt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function mt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}_e(Ve,tt,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Qe,formatHex:Qe,formatHsl:function(){return ft(this).formatHsl()},formatRgb:et,toString:et}),_e(at,ot,He(Ve,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new at(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new at(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:st,formatHex:st,formatRgb:ut,toString:ut})),_e(dt,(function(e,t,n,r){return 1===arguments.length?ft(e):new dt(e,t,n,null==r?1:r)}),He(Ve,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new dt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new dt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new at(mt(e>=240?e-240:e+120,i,r),mt(e,i,r),mt(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var pt=Math.PI/180,ht=180/Math.PI,vt=4/29,yt=6/29,gt=3*yt*yt;function bt(e){if(e instanceof xt)return new xt(e.l,e.a,e.b,e.opacity);if(e instanceof At)return Dt(e);e instanceof at||(e=it(e));var t,n,r=Ct(e.r),i=Ct(e.g),o=Ct(e.b),a=Mt((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Mt((.4360747*r+.3850649*i+.1430804*o)/.96422),n=Mt((.0139322*r+.0971045*i+.7141733*o)/.82521)),new xt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function xt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Mt(e){return e>.008856451679035631?Math.pow(e,1/3):e/gt+vt}function St(e){return e>yt?e*e*e:gt*(e-vt)}function Et(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ct(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function qt(e){if(e instanceof At)return new At(e.h,e.c,e.l,e.opacity);if(e instanceof xt||(e=bt(e)),0===e.a&&0===e.b)return new At(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ht;return new At(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ot(e,t,n,r){return 1===arguments.length?qt(e):new At(e,t,n,null==r?1:r)}function At(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Dt(e){if(isNaN(e.h))return new xt(e.l,0,0,e.opacity);var t=e.h*pt;return new xt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}_e(xt,(function(e,t,n,r){return 1===arguments.length?bt(e):new xt(e,t,n,null==r?1:r)}),He(Ve,{brighter:function(e){return new xt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new xt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new at(Et(3.1338561*(t=.96422*St(t))-1.6168667*(e=1*St(e))-.4906146*(n=.82521*St(n))),Et(-.9787684*t+1.9161415*e+.033454*n),Et(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),_e(At,Ot,He(Ve,{brighter:function(e){return new At(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new At(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Dt(this).rgb()}}));var Nt={isDark:function(e){return Ot(e).l<70}};function It(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Tt(e){return 1===e.length&&(e=function(e){return function(t,n){return It(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var wt=Tt(It).right,Lt=Math.sqrt(50),kt=Math.sqrt(10),Rt=Math.sqrt(2);function Pt(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Lt?10:o>=kt?5:o>=Rt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Lt?10:o>=kt?5:o>=Rt?2:1)}function jt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Lt?i*=10:o>=kt?i*=5:o>=Rt&&(i*=2),t<e?-i:i}function Ft(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function _t(){}function Ht(e,t){var n=new _t;if(e instanceof _t)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Vt(){}_t.prototype=Ht.prototype={constructor:_t,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var Bt=Ht.prototype;Vt.prototype={constructor:Vt,has:Bt.has,add:function(e){return this["$"+(e+="")]=e,this},remove:Bt.remove,clear:Bt.clear,values:Bt.keys,size:Bt.size,empty:Bt.empty,each:Bt.each};var zt=Array.prototype,Yt=zt.map,Ut=zt.slice;function Wt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Gt(){}var Kt=1/.7,$t="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qt=/^#([0-9a-f]{3})$/,en=/^#([0-9a-f]{6})$/,tn=new RegExp("^rgb\\("+[$t,$t,$t]+"\\)$"),nn=new RegExp("^rgb\\("+[Zt,Zt,Zt]+"\\)$"),rn=new RegExp("^rgba\\("+[$t,$t,$t,Jt]+"\\)$"),on=new RegExp("^rgba\\("+[Zt,Zt,Zt,Jt]+"\\)$"),an=new RegExp("^hsl\\("+[Jt,Zt,Zt]+"\\)$"),sn=new RegExp("^hsla\\("+[Jt,Zt,Zt,Jt]+"\\)$"),un={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ln(e){var t;return e=(e+"").trim().toLowerCase(),(t=Qt.exec(e))?new pn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=en.exec(e))?cn(parseInt(t[1],16)):(t=tn.exec(e))?new pn(t[1],t[2],t[3],1):(t=nn.exec(e))?new pn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=rn.exec(e))?fn(t[1],t[2],t[3],t[4]):(t=on.exec(e))?fn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=an.exec(e))?vn(t[1],t[2]/100,t[3]/100,1):(t=sn.exec(e))?vn(t[1],t[2]/100,t[3]/100,t[4]):un.hasOwnProperty(e)?cn(un[e]):"transparent"===e?new pn(NaN,NaN,NaN,0):null}function cn(e){return new pn(e>>16&255,e>>8&255,255&e,1)}function fn(e,t,n,r){return r<=0&&(e=t=n=NaN),new pn(e,t,n,r)}function dn(e){return e instanceof Gt||(e=ln(e)),e?new pn((e=e.rgb()).r,e.g,e.b,e.opacity):new pn}function mn(e,t,n,r){return 1===arguments.length?dn(e):new pn(e,t,n,null==r?1:r)}function pn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function hn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function vn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gn(e,t,n,r)}function yn(e){if(e instanceof gn)return new gn(e.h,e.s,e.l,e.opacity);if(e instanceof Gt||(e=ln(e)),!e)return new gn;if(e instanceof gn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new gn(a,s,u,e.opacity)}function gn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function bn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Wt(Gt,ln,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Wt(pn,mn,Xt(Gt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new pn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new pn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+hn(this.r)+hn(this.g)+hn(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),Wt(gn,(function(e,t,n,r){return 1===arguments.length?yn(e):new gn(e,t,n,null==r?1:r)}),Xt(Gt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new gn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new gn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new pn(bn(e>=240?e-240:e+120,i,r),bn(e,i,r),bn(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var xn=Math.PI/180,Mn=180/Math.PI,Sn=4/29,En=6/29,Cn=3*En*En;function qn(e){if(e instanceof On)return new On(e.l,e.a,e.b,e.opacity);if(e instanceof wn){if(isNaN(e.h))return new On(e.l,0,0,e.opacity);var t=e.h*xn;return new On(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof pn||(e=dn(e));var n,r,i=In(e.r),o=In(e.g),a=In(e.b),s=An((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?n=r=s:(n=An((.4360747*i+.3850649*o+.1430804*a)/.96422),r=An((.0139322*i+.0971045*o+.7141733*a)/.82521)),new On(116*s-16,500*(n-s),200*(s-r),e.opacity)}function On(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function An(e){return e>.008856451679035631?Math.pow(e,1/3):e/Cn+Sn}function Dn(e){return e>En?e*e*e:Cn*(e-Sn)}function Nn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function In(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Tn(e){if(e instanceof wn)return new wn(e.h,e.c,e.l,e.opacity);if(e instanceof On||(e=qn(e)),0===e.a&&0===e.b)return new wn(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Mn;return new wn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function wn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Wt(On,(function(e,t,n,r){return 1===arguments.length?qn(e):new On(e,t,n,null==r?1:r)}),Xt(Gt,{brighter:function(e){return new On(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new On(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new pn(Nn(3.1338561*(t=.96422*Dn(t))-1.6168667*(e=1*Dn(e))-.4906146*(n=.82521*Dn(n))),Nn(-.9787684*t+1.9161415*e+.033454*n),Nn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Wt(wn,(function(e,t,n,r){return 1===arguments.length?Tn(e):new wn(e,t,n,null==r?1:r)}),Xt(Gt,{brighter:function(e){return new wn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new wn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return qn(this).rgb()}}));var Ln=-.29227,kn=-.90649,Rn=1.97294,Pn=Rn*kn,jn=1.78277*Rn,Fn=-.6557636667999999;function _n(e){if(e instanceof Hn)return new Hn(e.h,e.s,e.l,e.opacity);e instanceof pn||(e=dn(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Fn*r+Pn*t-jn*n)/(Fn+Pn-jn),o=r-i,a=(Rn*(n-i)-Ln*o)/kn,s=Math.sqrt(a*a+o*o)/(Rn*i*(1-i)),u=s?Math.atan2(a,o)*Mn-120:NaN;return new Hn(u<0?u+360:u,s,i,e.opacity)}function Hn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Vn(e){return function(){return e}}function Bn(e){return 1==(e=+e)?zn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Vn(isNaN(t)?n:t)}}function zn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Vn(isNaN(e)?t:e)}Wt(Hn,(function(e,t,n,r){return 1===arguments.length?_n(e):new Hn(e,t,n,null==r?1:r)}),Xt(Gt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new Hn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Hn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*xn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new pn(255*(t+n*(-.14861*r+1.78277*i)),255*(t+n*(Ln*r+kn*i)),255*(t+n*(Rn*r)),this.opacity)}}));var Yn=function e(t){var n=Bn(t);function r(e,t){var r=n((e=mn(e)).r,(t=mn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=zn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Un(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Zn(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Wn(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function Xn(e,t){return t-=e=+e,function(n){return e+t*n}}function Gn(e,t){var n,r={},i={};for(n in null!==e&&"object"===F(e)||(e={}),null!==t&&"object"===F(t)||(t={}),t)n in e?r[n]=Zn(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var Kn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$n=new RegExp(Kn.source,"g");function Jn(e,t){var n,r,i,o=Kn.lastIndex=$n.lastIndex=0,a=-1,s=[],u=[];for(e+="",t+="";(n=Kn.exec(e))&&(r=$n.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Xn(n,r)})),o=$n.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var n,r=0;r<t;++r)s[(n=u[r]).i]=n.x(e);return s.join("")})}function Zn(e,t){var n,r=F(t);return null==t||"boolean"===r?Vn(t):("number"===r?Xn:"string"===r?(n=ln(t))?(t=n,Yn):Jn:t instanceof ln?Yn:t instanceof Date?Wn:Array.isArray(t)?Un:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Gn:Xn)(e,t)}function Qn(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function er(e){return+e}var tr=[0,1];function nr(e){return e}function rr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function ir(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function or(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=rr(i,r),o=n(a,o)):(r=rr(r,i),o=n(o,a)),function(e){return o(r(e))}}function ar(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=rr(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=wt(e,t,1,r)-1;return o[n](i[n](t))}}function sr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ur(e,t){return function(){var e,t,n,r,i,o,a=tr,s=tr,u=Zn,l=nr;function c(){return r=Math.min(a.length,s.length)>2?ar:or,i=o=null,f}function f(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,u)))(e(l(t)))}return f.invert=function(n){return l(t((o||(o=r(s,a.map(e),Xn)))(n)))},f.domain=function(e){return arguments.length?(a=Yt.call(e,er),l===nr||(l=ir(a)),c()):a.slice()},f.range=function(e){return arguments.length?(s=Ut.call(e),c()):s.slice()},f.rangeRound=function(e){return s=Ut.call(e),u=Qn,c()},f.clamp=function(e){return arguments.length?(l=e?ir(a):nr,f):l!==nr},f.interpolate=function(e){return arguments.length?(u=e,c()):u},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function lr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function cr(e){return(e=lr(Math.abs(e)))?e[1]:NaN}var fr,dr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mr(e){return new pr(e)}function pr(e){if(!(t=dr.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function hr(e,t){var n=lr(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}mr.prototype=pr.prototype,pr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var vr={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return hr(100*e,t)},r:hr,s:function(e,t){var n=lr(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(fr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+lr(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function yr(e){return e}var gr,br,xr,Mr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Sr(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var i=e.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}):yr,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):yr,s=e.percent||"%";function u(e){var t=(e=mr(e)).fill,n=e.align,u=e.sign,l=e.symbol,c=e.zero,f=e.width,d=e.comma,m=e.precision,p=e.trim,h=e.type;"n"===h?(d=!0,h="g"):vr[h]||(null==m&&(m=12),p=!0,h="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var v="$"===l?i[0]:"#"===l&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===l?i[1]:/[%p]/.test(h)?s:"",g=vr[h],b=/[defgprs%]/.test(h);function x(e){var i,s,l,x=v,M=y;if("c"===h)M=g(e)+M,e="";else{var S=(e=+e)<0;if(e=g(Math.abs(e),m),p&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&(S=!1),x=(S?"("===u?u:"-":"-"===u||"("===u?"":u)+x,M=("s"===h?Mr[8+fr/3]:"")+M+(S&&"("===u?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(l=e.charCodeAt(i))||l>57){M=(46===l?o+e.slice(i+1):e.slice(i))+M,e=e.slice(0,i);break}}d&&!c&&(e=r(e,1/0));var E=x.length+e.length+M.length,C=E<f?new Array(f-E+1).join(t):"";switch(d&&c&&(e=r(C+e,C.length?f-M.length:1/0),C=""),n){case"<":e=x+e+M+C;break;case"=":e=x+C+e+M;break;case"^":e=C.slice(0,E=C.length>>1)+x+e+M+C.slice(E);break;default:e=C+x+e+M}return a(e)}return m=null==m?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),x.toString=function(){return e+""},x}return{format:u,formatPrefix:function(e,t){var n=u(((e=mr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(cr(t)/3))),i=Math.pow(10,-r),o=Mr[8+r/3];return function(e){return n(i*e)+o}}}}function Er(e,t,n,r){var i,o=jt(e,t,n);switch((r=mr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(cr(t)/3)))-cr(Math.abs(e)))}(o,a))||(r.precision=i),xr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,cr(t)-cr(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-cr(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return br(r)}function Cr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=Pt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Er(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=Pt(s,u,n))>0?r=Pt(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Pt(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,t(i)),e},e}function qr(){var e=ur(nr,nr);return e.copy=function(){return sr(e,qr())},Ft.apply(e,arguments),Cr(e)}gr=Sr({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),br=gr.format,xr=gr.formatPrefix;var Or=new Date,Ar=new Date;function Dr(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,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 Dr((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 Or.setTime(+t),Ar.setTime(+r),e(Or),e(Ar),Math.floor(n(Or,Ar))},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 Nr=Dr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Nr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Dr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Nr:null};var Ir=Dr((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}));Dr((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),Dr((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var Tr=Dr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function wr(e){return Dr((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-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var Lr=wr(0),kr=wr(1);wr(2),wr(3);var Rr=wr(4);wr(5),wr(6),Dr((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()}));var Pr=Dr((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()}));Pr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Dr((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};var jr=Dr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),Fr=Dr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),_r=Dr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Hr(e){return Dr((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)/6048e5}))}var Vr=Hr(0),Br=Hr(1);Hr(2),Hr(3);var zr=Hr(4);Hr(5),Hr(6);var Yr=Dr((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()})),Ur=Dr((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function Wr(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Xr(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Gr(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Ur.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Dr((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};var Kr,$r,Jr,Zr={"-":"",_:" ",0:"0"},Qr=/^\s*\d+/,ei=/^%/,ti=/[\\^$*+?|[\]().{}]/g;function ni(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function ri(e){return e.replace(ti,"\\$&")}function ii(e){return new RegExp("^(?:"+e.map(ri).join("|")+")","i")}function oi(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function ai(e,t,n){var r=Qr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function si(e,t,n){var r=Qr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ui(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function li(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ci(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function fi(e,t,n){var r=Qr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function di(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mi(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function pi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function hi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function vi(e,t,n){var r=Qr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function yi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function gi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function bi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function xi(e,t,n){var r=Qr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Mi(e,t,n){var r=Qr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Si(e,t,n){var r=ei.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ei(e,t,n){var r=Qr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ci(e,t,n){var r=Qr.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function qi(e,t){return ni(e.getDate(),t,2)}function Oi(e,t){return ni(e.getHours(),t,2)}function Ai(e,t){return ni(e.getHours()%12||12,t,2)}function Di(e,t){return ni(1+Tr.count(Pr(e),e),t,3)}function Ni(e,t){return ni(e.getMilliseconds(),t,3)}function Ii(e,t){return Ni(e,t)+"000"}function Ti(e,t){return ni(e.getMonth()+1,t,2)}function wi(e,t){return ni(e.getMinutes(),t,2)}function Li(e,t){return ni(e.getSeconds(),t,2)}function ki(e){var t=e.getDay();return 0===t?7:t}function Ri(e,t){return ni(Lr.count(Pr(e),e),t,2)}function Pi(e,t){var n=e.getDay();return e=n>=4||0===n?Rr(e):Rr.ceil(e),ni(Rr.count(Pr(e),e)+(4===Pr(e).getDay()),t,2)}function ji(e){return e.getDay()}function Fi(e,t){return ni(kr.count(Pr(e),e),t,2)}function _i(e,t){return ni(e.getFullYear()%100,t,2)}function Hi(e,t){return ni(e.getFullYear()%1e4,t,4)}function Vi(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ni(t/60|0,"0",2)+ni(t%60,"0",2)}function Bi(e,t){return ni(e.getUTCDate(),t,2)}function zi(e,t){return ni(e.getUTCHours(),t,2)}function Yi(e,t){return ni(e.getUTCHours()%12||12,t,2)}function Ui(e,t){return ni(1+_r.count(Ur(e),e),t,3)}function Wi(e,t){return ni(e.getUTCMilliseconds(),t,3)}function Xi(e,t){return Wi(e,t)+"000"}function Gi(e,t){return ni(e.getUTCMonth()+1,t,2)}function Ki(e,t){return ni(e.getUTCMinutes(),t,2)}function $i(e,t){return ni(e.getUTCSeconds(),t,2)}function Ji(e){var t=e.getUTCDay();return 0===t?7:t}function Zi(e,t){return ni(Vr.count(Ur(e),e),t,2)}function Qi(e,t){var n=e.getUTCDay();return e=n>=4||0===n?zr(e):zr.ceil(e),ni(zr.count(Ur(e),e)+(4===Ur(e).getUTCDay()),t,2)}function eo(e){return e.getUTCDay()}function to(e,t){return ni(Br.count(Ur(e),e),t,2)}function no(e,t){return ni(e.getUTCFullYear()%100,t,2)}function ro(e,t){return ni(e.getUTCFullYear()%1e4,t,4)}function io(){return"+0000"}function oo(){return"%"}function ao(e){return+e}function so(e){return Math.floor(+e/1e3)}!function(e){Kr=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=ii(i),c=oi(i),f=ii(o),d=oi(o),m=ii(a),p=oi(a),h=ii(s),v=oi(s),y=ii(u),g=oi(u),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:qi,e:qi,f:Ii,H:Oi,I:Ai,j:Di,L:Ni,m:Ti,M:wi,p:function(e){return i[+(e.getHours()>=12)]},Q:ao,s:so,S:Li,u:ki,U:Ri,V:Pi,w:ji,W:Fi,x:null,X:null,y:_i,Y:Hi,Z:Vi,"%":oo},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return u[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Bi,e:Bi,f:Xi,H:zi,I:Yi,j:Ui,L:Wi,m:Gi,M:Ki,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:ao,s:so,S:$i,u:Ji,U:Zi,V:Qi,w:eo,W:to,x:null,X:null,y:no,Y:ro,Z:io,"%":oo},M={a:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:hi,e:hi,f:Mi,H:yi,I:yi,j:vi,L:xi,m:pi,M:gi,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:Ei,s:Ci,S:bi,u:si,U:ui,V:li,w:ai,W:ci,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:di,Y:fi,Z:mi,"%":Si};function S(e,t){return function(n){var r,i,o,a=[],s=-1,u=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=Zr[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(e.slice(u,s)),a.join("")}}function E(e,t){return function(n){var r,i,o=Gr(1900);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Xr(Gr(o.y))).getUTCDay(),r=i>4||0===i?Br.ceil(r):Br(r),r=_r.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(Gr(o.y))).getDay(),r=i>4||0===i?kr.ceil(r):kr(r),r=Tr.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Xr(Gr(o.y)).getUTCDay():t(Gr(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Xr(o)):t(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=M[i in Zr?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",Wr);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e,Xr);return t.toString=function(){return e},t}}}(e),$r=Kr.utcFormat,Jr=Kr.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||$r("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||Jr("%Y-%m-%dT%H:%M:%S.%LZ");function uo(e){return new Date(e)}function lo(e){return e instanceof Date?+e:+new Date(+e)}function co(e,t,n,r,i,o,a,s,u){var l=ur(nr,nr),c=l.invert,f=l.domain,d=u(".%L"),m=u(":%S"),p=u("%I:%M"),h=u("%I %p"),v=u("%a %d"),y=u("%b %d"),g=u("%B"),b=u("%Y"),x=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function M(s){return(a(s)<s?d:o(s)<s?m:i(s)<s?p:r(s)<s?h:t(s)<s?n(s)<s?v:y:e(s)<s?g:b)(s)}function S(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=Tt((function(e){return e[2]})).right(x,o);a===x.length?(i=jt(n/31536e6,r/31536e6,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(jt(n,r,t),1),t=s)}return null==i?t:t.every(i)}return l.invert=function(e){return new Date(c(e))},l.domain=function(e){return arguments.length?f(Yt.call(e,lo)):f().map(uo)},l.ticks=function(e,t){var n,r=f(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=S(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(e,t){return null==t?M:u(t)},l.nice=function(e,t){var n=f();return(e=S(e,n[0],n[n.length-1],t))?f(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):l},l.copy=function(){return sr(l,co(e,t,n,r,i,o,a,s,u))},l}var fo,mo={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},po=function(e){return"".concat(e," 12px -12px inset rgba(0, 0, 0, ").concat(.0625,")")},ho={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:function(){return[0,1]}}},renderer:"dom",render:function(e){var t=this.settings.settings,n=t.range,r=t.orientation,i=t.rtl,o=Q(n(),2),a=o[0],s=o[1],u=Math.abs(a)<1e-15,l=Math.abs(s-1)<1e-15,c=function(e){var t,n,r,i=mo[e];return{base:(t={position:"absolute"},Y(t,i.major,12),Y(t,i.minor,"100%"),t),towardsStart:(n={},Y(n,i.start,0),Y(n,i.end,"auto"),Y(n,"boxShadow",po(i.shadow.startOffset)),n),towardsEnd:(r={},Y(r,i.start,"auto"),Y(r,i.end,0),Y(r,"boxShadow",po(i.shadow.endOffset)),r)}}(r),f="horizontal"===r&&i,d=[];return u||d.push(e("div",{style:j(j({},c.base),f?c.towardsEnd:c.towardsStart),class:"scroll-hint--towards-start"})),l||d.push(e("div",{style:j(j({},c.base),f?c.towardsStart:c.towardsEnd),class:"scroll-hint--towards-end"})),d}};function vo(e){var t=e.viewState,n=e.viewCache,r=e.layoutService,i=e.dockService,o=e.rtl;return!r.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:i.meta.major.orientation,rtl:o,range:function(){return function(e){var t=e.layoutService,n=e.viewState,r=e.viewCache;return t.meta.isContinuous?function(e,t){var n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(n,r):function(e){return e.get("viewRange")}(n)}({layoutService:r,viewState:t,viewCache:n})}}}}function yo(){fo=fo||document.createElement("canvas").getContext("2d")}var go={measureTextWidth:function(e){return yo(),fo.measureText(e).width},lineWrap:function(e,t,n,r){var i,o;yo();var a,s,u=e?e.split(/\n+|\r+|\r\n/):[],l=[],c=e?e.split(/\s+/):[],f=u[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&u.length>=r)return u.slice(0,r);for(n&&(fo.font=n),o=0;o<u.length;o++){for(f=Q(c=(u[o]||"").split(/\s+/),1)[0],s="",i=1;i<c.length;i++)if(a="".concat(f," ").concat(c[i]),go.measureTextWidth(a)>t&&("number"!=typeof r||r>l.length)?(l.push(f),f=c[i]):f=a,"number"==typeof r&&l.length>=r){s=c.slice(i+1).join(" ");break}"number"!=typeof r||l.length<r?l.push(f):l[Math.max(0,l.length-1)]="".concat(l[Math.max(0,l.length-1)]||""," ").concat(f," ").concat(s)}return l},wordWrap:function(e,t,n,r,i){if(yo(),!e||!e.length)return[];n&&(fo.font=n);var o,a,s,u,l=[],c=e.slice();if(c.filter((function(e){return!!e})),"number"!=typeof t||t<0)return e.slice();for(u=0;u<c.length;u++)a=null,(s=c[u])&&(s.length<=1||go.measureTextWidth(s)<=t?l.push(s):(o=go.splitWord(s,t,void 0,r-l.length)).length<=1?l.push(o[0]):(a=o.pop(),l=l.concat(o),c[u+1]?go.measureTextWidth("".concat(a," ").concat(c[u+1]))>t&&l.length+c.length-u<=r?c.splice(u+1,0,a):c[u+1]="".concat(a," ").concat(c[u+1]):c.push(a)));return l.forEach((function(e,t,n){n[t]=e?e.trim():e})),l.length>r?(l=l.splice(0,r))[l.length-1]=go.truncate(l[l.length-1],t,n,i).text:(s=l[l.length-1])&&s.length>1&&go.measureTextWidth(s)>t&&(l[l.length-1]=go.truncate(s,t,n,i).text),l},truncate:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";yo();var i,o,a,s=e,u=go.measureTextWidth("i"),l=Math.ceil(t/u);if(n&&(fo.font=n),e&&t){if(go.measureTextWidth(s)>t){for(i=Math.min(l,s.length);i>0;i--)if(o=s.substring(0,i-1).trim()+r,go.measureTextWidth(o)<=t){a=s.substring(i-1),s=o;break}i||(a=s,s="…")}}else a=void 0;return{text:s,rest:a}},isNumber:function(e){return"number"==typeof e&&Number.isFinite(e)},explodeWord:function(e,t,n,r){var i;yo();var o=e,a="",s=[];if(go.isNumber(n)&&n<=1)return[e];var u=Math.ceil(t/r);for(i=Math.min(e.length,u);i>0&&(o=e.substring(0,i)," "===e.substring(i-1,i)?o=e.substring(0,i-1):o+="-",a=e.substring(i),!(go.measureTextWidth(o)<=t));i--);return(!i&&!o||go.measureTextWidth(o)>t)&&(o=e.substring(0,1),a=e.substring(1)),s.push(o),a?(go.measureTextWidth(a)>t?(a=go.explodeWord(a,t,n-1,r),s=s.concat(a)):s.push(a),s.filter((function(e){return""!==e.trim()}))):s},splitWord:function(e,t,n,r){return yo(),e&&t?(n&&(fo.font=n),go.explodeWord(e,t,r,Math.max(1,go.measureTextWidth("i")))):[]},wrapText:function(e,t,n,r,i){var o;return Number.isNaN(t)?[e]:(o=r>1?go.lineWrap(e,t,n,r):[e],o=go.wordWrap(o,t,n,r,i))},getFontHeight:function(e){return yo(),e&&(fo.font=e),1.5*go.measureTextWidth("m")},tokenize:function(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;yo(),t&&(fo.font=t);var s=go.getFontHeight(),u=a*s,l=[],c=0,f=[];if(o<s)return[];var d=o?Math.max(1,Math.floor(o/u)):r||1;return Array.isArray(r)?(r.forEach((function(e){c+=Number.isNaN(e)||e<=0?0:e})),r.forEach((function(e){l.push(Number.isNaN(e)||e<=0?d-c:e)}))):l=[Number.isNaN(r)||r<=0?d:Math.min(d,r)],Array.isArray(e)?e.forEach((function(e,n){f.length<d&&(f=f.concat(go.wrapText(e,i,t,l[n])))})):f=go.wrapText(e,i,t,l[0],n),f}},bo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n=void 0===t?10:t,r=e.fill,i=void 0===r?"#999":r,o=e.alignment;return{show:!0,type:"n-polygon",fill:i,stroke:"#000",strokeWidth:0,size:n,sides:3,startAngle:-90,alignment:o}},xo=function(e){var t,n=e.oob,r=e.dockValue,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,s="x",u="y",l=o,c=a,f=r<.5?90:-90;return e.flipXY&&(s="y",u="x",l=a,c=o,f=r<.5?180:0),(0,e.symbol)(me({},n,(Y(t={},s,i*l),Y(t,u,Math.max(n.size/2,Math.min(r*c,c-n.size/2))),Y(t,"startAngle",f),t)))},Mo=me.bind(null,!0),So={},Eo=Array.isArray;function Co(e){return null!=e&&!Array.isArray(e)&&"object"===F(e)}function qo(e){return void 0===e}function Oo(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Ao(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=isNaN(n)?{}:[];e[n||t]=qo(e[n||t])?o:e[t],e=e[n||t]}})),e}function Do(e,t){var n=!0;if(Co(e)&&Co(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){Do(e[r],t[r])||(n=!1)})),n);if(Eo(e)&&Eo(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!Do(e[r],t[r]))return!1;return!0}return e===t}So.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?Mo({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);Do(o,a)||Oo(t,i)||(qo(a)?r.push({op:"add",path:s,value:o}):Co(o)&&Co(a)?r=r.concat(So.generate(a,o,s)):Eo(o)&&Eo(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&qo(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(Do(t,i))return r;if(!qo(t[0])&&qo(t[0].qInfo)||0===t.length)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(So.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(r.push({op:"move",path:"".concat(n,"/").concat(u),from:"".concat(n,"/").concat(o)}),i.splice(u,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){qo(t[i])&&!Oo(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},So.apply=function(e,t){t.forEach((function(t){var n,r=Ao(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&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(Eo(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(Eo(o)&&Eo(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,ee(u))}else if(Co(o)&&Co(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!Oo(n,e)&&delete n[e]})),Mo(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 l=Ao(e,t.from);Eo(r)?r.splice(+i,0,l.splice(+a,1)[0]):(r[i]=l[a],delete l[a])}else"remove"===t.op&&(Eo(r)?r.splice(+i,1):delete r[i])}))},So.clone=function(e){return Mo({},e)},So.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},So.updateObject=function(e,t){Object.keys(e).length?So.apply(e,So.generate(e,t)):Mo(e,t)};var No=[[2,4,6],[2,4],[3]],Io=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function To(e,t,n){var r,i=e?e.length:0,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(r=1;r<i;r++)o=Math.min(o,e[r]/e[r-1]);void 0!==n&&(o=Math.min(o,n/e[i-1])),e.splice(0,0,o)}function wo(e,t,n){var r,i=e?e.length:0;for(r=0;r<i;r++)To(e[r],t,n)}!function(){var e,t;for(wo(No,1,10),e=0;e<Io.length;e++)if(Io[e])for(t=0;t<Io[e].length;t++)Array.isArray(Io[e][t])&&wo(Io[e][t])}();var Lo={isInside:function(e,t,n,r){if(!r)return!0;var i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:function(e,t){return Math.abs(e.center-t.center)},getGap:function(e,t){var n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax:function(e,t){var n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin:function(e,t){var n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax:function(e,t,n){var r=Lo.findSegmentPositionMeetMin(e,t);return Lo.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin:function(e,t,n){var r=Lo.findSegmentPositionMeetMax(e,n);return Lo.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin:function(e,t,n){for(var r,i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=e.length-1,s=t,u=0;u<a;u++)r=e[u],i=e[u+1],r.position=Lo.findSegmentPositionMeetMaxThenMin(r,s,(r.center+i.center-o)/2),s=r.position+r.radius+o/2;i.position=Lo.findSegmentPositionMeetMaxThenMin(i,s,n)},adjustPositionFromMax:function(e,t,n){var r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=e.length-1,u=Math.max(0,e[s].position+e[s].radius-n);if(0!==u){var l,c=0;for(r=s;r>0&&(i=e[r],o=e[r-1],l=Math.max(0,Lo.getGap(o,i)-a),c+=l-=Math.max(0,c+l-u),i.move=l,!(c>=u));r--);for(c<u&&(l=Math.max(0,o.position-o.radius-t),c+=l-=Math.max(0,c+l-u),o.move=l),c=0,r=0;r<=s;r++)c+=(i=e[r]).move||0,i.move=c,i.position-=c}},layout:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=e.length-1;if(!(i<0))if(0!==i)Lo.layoutPositionFromMin(e,t,n,r),Lo.adjustPositionFromMax(e,t,n,r);else{var o=e[0];o.position=Lo.findSegmentPositionMeetMaxThenMin(o,t,n)}}},ko=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},Ro=function(e){return!1!==e.show&&0!==e.show&&"0"!==e.show},Po=function(e){return e.filter(Ro)},jo=function(e,t){return Po(Ee(e,t,[]))},Fo=function(e){return Ro(e)&&(!1!==e.showValue||!1!==e.showLabel)},_o=function(e){return e.filter(Fo)},Ho=function(e,t){return _o(Ee(e,t,[]))},Vo=function(e){var t=e.refLineLayout;return e.layoutService.meta.canBeContinuous?t.refLineExpr.value:t.refLineExpr.stringValue},Bo=function(e,t,n){var r=t.dimensionRefLineInfo;if(r[e])return r[e][n]},zo=function(e){var t=e.label,n=(e.dataPages||{}).qArea,r=void 0===n?{}:n,i=r.qTop,o=r.qHeight;return void 0!==i&&void 0!==o&&void 0!==t.valueInfo&&t.valueInfo.maxOrder<i},Yo=function(e){var t=e.label,n=(e.dataPages||{}).qArea,r=void 0===n?{}:n,i=r.qTop,o=r.qHeight;return void 0!==i&&void 0!==o&&void 0!==t.valueInfo&&t.valueInfo.minOrder>=i+o},Uo=function(e){var t=e.value,n=e.qMin;return"NaN"!==n&&t<n},Wo=function(e){var t=e.value,n=e.qMax;return"NaN"!==n&&t>n},Xo=jo,Go=function(e){return jo(e,"refLine.refLines")},Ko=function(e,t){return t?[]:jo(e,"refLine.dimRefLines")},$o=Ho,Jo=function(e){return Ho(e,"refLine.refLines")},Zo=function(e,t){return t?[]:Ho(e,"refLine.dimRefLines")},Qo=function(e){var t=e.scale,n=e.size,r=e.value,i=e.valueInfo,o=e.align,a=e.invert,s=void 0!==a&&a,u=e.layoutService;if(!e.isContinuous){var l,c=t.pxScale(n);if(u.meta.isGroupedByMeasure)return l=ko(c,o,s,u.meta.measureCount),c([r,0])+l;if(u.meta.isGroupedByDimension){if(!i)return NaN;var f,d=i.innerValues,m=i.numInnerValues,p=i.minOrder;return l=ko(c,o,s,m),d&&d.length&&(f=function(e){for(var t=e.pxScale,n=e.value,r=e.innerValues,i=e.invert,o=e.minOrder,a=function(e){var t=e.pxScale,n=e.invert;return t.bandwidth()*(n?-1:1)}({pxScale:t,invert:i}),s=0;s<r.length;s++){var u=r[s],l=u.id,c=u.order,f=t([n,l]);if(void 0!==f)return f-a*(c-o)}}({pxScale:c,value:r,innerValues:d,invert:s,minOrder:p})),(void 0===f?c(r):f)+l}return l=ko(c,o,s),c(r)+l}return t(r)},ea=function(e){var t=e.layout,n=e.canBeContinuous,r=e.discreteModel,i=e.layoutService.meta.isGroupedByDimension,o={},a=Ee(t,"qHyperCube"),s="K"===a.qMode,u=r?r.query.getCurrentDataPage():Ee(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]),l=Ee(u,s?"qData.0.qSubNodes":"qMatrix",[]),c=function(e,t){return e?t?"qValue":"qNum":"qText"}(n,s),f=function(e){return e.qArea.qTop}(u);return s?function(){for(var e=0;e<l.length;e++){var t=l[e],n=e+f,r=t[c];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}}():i?function(){for(var e,t=0;t<l.length;t++){var n=l[t][0],r=l[t][1],i=t+f,a=n[c];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}}():function(){for(var e=0;e<l.length;e++){var t=l[e][0],n=e+f,r=t[c];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}}(),o},ta=Vo,na=zo,ra=Yo,ia=Uo,oa=Wo,aa=function(e){var t=e.value,n=e.qMin,r=e.qMax;return Uo({value:t,qMin:n})||Wo({value:t,qMax:r})},sa=function(e){var t=e.label,n=e.dataPages;return t.valueInfo.isMinOrderOk&&Yo({label:t,dataPages:n})||t.valueInfo.isMaxOrderOk&&zo({label:t,dataPages:n})},ua=function(e){var t=e.orientation,n=e.rtl,r=e.isContinuous;return"horizontal"===t?n:r};function la(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:70,r=0;r<e.length;r++){var i=e[r];i.lines=go.tokenize(i.title,t,"".concat("…"," ").concat(i.valueString),3,n),i.maxNumLines=i.lines.length}}function ca(e){var t=e.title,n=e.font,r=e.ellipsis,i=e.maxNumLines,o=void 0===i?5:i,a=e.maxWidth,s=void 0===a?200:a,u=go.tokenize(t,n,r,o,s),l=u.length,c="";if(l){c=Q(u,1)[0];for(var f=1;f<l;f++)c="".concat(c,"\n").concat(u[f])}return c}function fa(e){var t=e.oobs,n=e.font,r=e.ellipsis,i=e.maxNumLines,o=void 0===i?5:i,a=e.maxWidth,s=void 0===a?200:a,u=t.map((function(e){return ca({title:e.title,font:n,ellipsis:"".concat(r," ").concat(e.valueString),maxNumLines:o,maxWidth:s})})),l=u.length,c="";if(l){c=Q(u,1)[0];for(var f=1;f<l;f++)c="".concat(c,"\n\n").concat(u[f])}return c}function da(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";e.sort((function(e,n){return e[t]-n[t]}))}function ma(e){var t=e.inputValue,n=e.inputValueLabel,r=e.localeInfo;if(void 0===t||void 0===n||t.toString()===n)return!1;if(!r)return!0;var i="+-".concat(r.qDecimalSep||"").concat(r.qThousandSep||"").replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return n.replace(new RegExp("[0-9e".concat(i,"]"),"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;var t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(n)}var pa=function(e){var t=e.label,n=e.dataPages,r=e.qMin,i=e.qMax;if(void 0!==r&&void 0!==i){var o=t.inputValue;if(oa({value:o,qMax:i}))return 1;if(ia({value:o,qMin:r}))return-1}return ra({label:t,dataPages:n})?1:na({label:t,dataPages:n})?-1:0},ha={hasEngineFormat:ma,calculateLabelPositions:function(e){var t,n,r=e.labels,i=e.scale,o=e.size,a=e.layoutService,s=e.orientation,u=e.rtl,l=e.isContinuous,c=e.isDimension,f=ua({orientation:s,rtl:u,isContinuous:l}),d="S"===a.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",m=a.getHyperCubeValue(d),p=a.meta.canBeContinuous;if(c&&p){var h=a.getLayoutValue("qHyperCube.qDimensionInfo.0");t=h.qMin,n=h.qMax}for(var v=0;v<r.length;v++){var y=r[v],g=y.value,b=y.align,x=y.valueInfo,M=pa({label:y,dataPages:m,qMin:t,qMax:n});y.scaledValue=1===M?f?-.1:1.1:-1===M?f?1.1:-.1:Qo({scale:i,size:o,value:g,valueInfo:x,align:b,invert:f,layoutService:a,isContinuous:l}),y.center=y.scaledValue*o}},getTitle:function(e){return!1!==e.showValue?!1!==e.showLabel?"".concat(e.text," ").concat(e.valueString):e.valueString:!1!==e.showLabel?e.text:""},addLabelTitles:function(e){var t,n=e.labels,r=e.formatter,i=e.isContinuous,o=e.canBeContinuous,a=e.localeInfo;if(i)for(var s=0;s<n.length;s++){var u=n[s],l=u.value,c=u.inputValue,f=u.inputValueLabel;t=ma({inputValue:c,inputValueLabel:f,localeInfo:a})?f:r?r(l):l,u.valueString="".concat(je.lrm,"(").concat(t,")").concat(je.lrm),u.title=ha.getTitle(u)}else if(o)for(var d=0;d<n.length;d++){var m=n[d],p=m.valueText,h=m.inputValue,v=m.inputValueLabel;t=ma({inputValue:h,inputValueLabel:v,localeInfo:a})?v:p,m.valueString="".concat(je.lrm,"(").concat(t,")").concat(je.lrm),m.title=ha.getTitle(m)}else for(var y=0;y<n.length;y++){var g=n[y];t=g.valueText,g.valueString="".concat(je.lrm,"(").concat(t,")").concat(je.lrm),g.title=ha.getTitle(g)}},measureLabelsWidth:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:function(e,t){return Math.max.apply(Math,ee(e.lines.map((function(e){return t(e).width}))))},getMaxTextWidth:function(e){var t=e.map((function(e){return e.totalWidth}));return Math.max.apply(Math,ee(t))},addLabelsNeighborInfo:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=e.length-1;if(!(i<0)){var o,a,s=Q(e,1);if((o=s[0]).cMin=t,0!==i){for(var u=0;u<i;u++)o=e[u],a=e[u+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n}},getTotalNumLines:function(e){var t=0;return e.forEach((function(e){t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines:function(e,t,n){for(var r=t-1,i=e.filter((function(e){return e.maxNumLines===t})),o=Math.min(n,i.length),a=i.length-1;a>=i.length-o;a--)i[a].maxNumLines=r},reduceTotalMaxNumLines:function(e,t,n){var r=Math.floor(n/t),i=3;do{var o=ha.getTotalNumLines(e)-r;if(o<=0)return;ha.reduceLabelsHavingMaxNumLines(e,i,o),i--}while(i>1)},reduceMaxNumLines:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;r<e.length;r++){var i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,r=arguments.length>3?arguments[3]:void 0,i=0;i<e.length;i++){var o=e[i];o.width=Math.min(t,ha.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments:function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=r.center,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo:function(e){var t=e.labels,n=e.scale,r=e.majorSize,i=e.lowerLimit,o=e.upperLimit,a=e.gap,s=e.font,u=e.maxLabelWidth,l=e.lineHeight,c=e.majorDimension,f=e.orientation,d=e.measureText,m=e.rtl,p=e.layoutService,h=e.isContinuous,v=e.isDimension,y=t.map((function(e){return e})),g=r;ha.calculateLabelPositions({labels:t,scale:n,size:g,layoutService:p,orientation:f,rtl:m,isContinuous:h,isDimension:v}),da(t,"center"),ha.addLabelsNeighborInfo(t,i,o,a),la(t,s,u),ha.reduceTotalMaxNumLines(y,l,o-(y.length-1)*a),"vertical"===f&&(ha.reduceMaxNumLines(t,l,.05*a),function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:70,r=0;r<e.length;r++){var i=e[r];i.lines.length>i.maxNumLines&&(i.lines=go.tokenize(i.title,t,"".concat("…"," ").concat(i.valueString),i.maxNumLines,n))}}(t,s,u)),ha.addLabelsSize(t,u,l,d),ha.addLabelSegments(t,c)},createLabels:function(e){var t=e.labels,n=e.style,r=e.maxLabelWidth,i=e.areaProps,o=e.area,a=e.lineHeight,s=void 0===a?15:a,u=e.font,l=i.majorAxis,c=i.minorAxis,f=o.minorCenter,d=n.fontSize,m=n.fontFamily,p=n.background,h=[];return t.forEach((function(e){var t=e.lines,n=t.length,i=t.map((function(t,i){var o={type:"text",text:t,title:ca({title:e.title,font:u,ellipsis:"".concat("…"," ").concat(e.valueString)}),dx:0,dy:0,maxWidth:r,width:r,fontSize:d,fontFamily:m,fill:e.fill,baseline:"central",anchor:"middle"};return o[c]=f,o[l]=e.segment.position,o.y+=(i-(n-1)/2)*s,o}));e.background&&h.push(function(e){var t=e.minorCenter,n=e.majorAxis,r=e.minorAxis,i=e.label,o=e.lineHeight,a=e.background,s=i.lines,u=a.borderRadius,l=void 0===u?3:u,c=a.padding,f=void 0===c?{}:c,d=f.top,m=void 0===d?2:d,p=f.bottom,h=void 0===p?2:p,v=f.left,y=void 0===v?2:v,g=f.right,b=void 0===g?2:g,x=s.length,M={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(y+b),height:i.height+(m+h)};return M[r]=t,M[n]=i.segment.position,M.x-=i.width/2+y,M.y-=x*o/2+m,M}({minorCenter:f,majorAxis:l,minorAxis:c,label:e,lineHeight:s,background:p})),h=h.concat(i)})),h}};function va(e,t,n){var r,i=F(t);if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){var o=n.data()&&n.data().fields;r=o&&o[0]?o[0].formatter():null}return r}function ya(e,t,n){return"top"===e||"bottom"===e?function(e,t){var n=t.font,r=t.lineHeight,i=t.top,o=t.bottom,a=t.maxLabelWidth,s=1;return ha.getMaxTextWidth(e)>a&&(la(e,n,a),s=Math.max.apply(Math,ee(e.map((function(e){return e.lines.length}))))),s*r+i+o}(t,n):function(e,t){var n=t.left,r=t.right,i=t.maxLabelWidth;return Math.min(i,ha.getMaxTextWidth(e))+n+r}(t,n)}function ga(e,t){return t?e.domain():[0,1]}function ba(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"value",i=e.filter((function(e){return e[r]>=t}));i=i.filter((function(e){return e[r]<=n}));var o=e.filter((function(e){return e[r]<t})),a=e.filter((function(e){return e[r]>n})),s=o.length,u=a.length;return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:s,numMaxOobs:u}}function xa(e){for(var t,n=0,r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function Ma(e,t){return e>9?t[1]:t[0]}function Sa(e){var t=e.alignment,n=e.dockValue,r=e.oobs,i=e.style,o=e.rect,a=e.symbol,s=e.position,u=e.areaProps,l=e.radius,c=e.font,f=r?r.length:0;if(f<1)return[];var d=u.flipXY,m=u.majorAxis,p=u.minorAxis,h=o[u.minorDimension],v=xo({oob:bo({size:i.size,fill:i.fill,alignment:t}),dockValue:n,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:a}),y="c".concat(m),g="c".concat(p),b={type:"circle",r:l,stroke:"transparent",fill:i.text.background.fill,strokeWidth:0};b[g]=h/2,b[y]=s;var x={type:"text",text:f>9?"9+":f,title:fa({oobs:r,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:h,width:h,fontSize:i.text.fontSize,fontFamily:i.text.fontFamily,fill:i.text.fill,baseline:"central",anchor:"middle"};return x[p]=h/2,x[m]=s,[v,b,x]}function Ea(e){var t="normal ".concat(e.fontSize," '").concat(e.fontFamily,"'");return{font:t,lineHeight:go.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}var Ca=function(e){return e.map((function(e){return j(j({},e),{},{value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})}))},qa={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize:function(){var e=this,t=this.scale,n=this.settings,r=n.style,i=n.layoutService,o=n.isContinuous,a=n.localeInfo,s=!!o||i.meta.canBeContinuous,u=Ca(this.settings.labels),l=va(this.chart,this.settings.formatter,t);ha.addLabelTitles({labels:u,formatter:l,isContinuous:o,canBeContinuous:s,localeInfo:a});var c,f=function(e){var t=e.labels,n=e.scale,r=e.isContinuous,i=e.canBeContinuous,o=e.layoutService;if(r){var a=Q(ga(n,r),2);return ba(t,a[0],a[1])}if(i){var s=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),u=s.qMin,l=s.qMax;if("NaN"!==u&&"NaN"!==l)return ba(t,u,l,"inputValue")}return{filteredLabels:t}}({labels:u,scale:t,isContinuous:o,canBeContinuous:s,layoutService:i}),d=f.numMaxOobs,m=f.numMinOobs,p=f.filteredLabels;if(this.measureText=function(t){return e.renderer.measureText({text:t,fontSize:r.label.fontSize,fontFamily:r.label.fontFamily})},p&&p.length){var h=Ea(r.label),v=this.settings.layout.dock;return ha.measureLabelsWidth(p,this.measureText),c=ya(v,p,h),c}var y=xa(this.measureText),g=d?Ma(d,y):0,b=m?Ma(m,y):0;return c=Math.max(g,b),c},render:function(){var e=this.scale;if(e.domain().length){var t=this.symbol,n=this.settings,r=n.style,i=n.layoutService,o=n.theme,a=n.isContinuous,s=n.isDimension,u=n.localeInfo,l=!!a||i.meta.canBeContinuous,c=Ca(this.settings.labels),f=this.settings.layout,d=f.dock,m=f.rtl,p=r.label.padding,h=function(e){return"left"===e||"right"===e?function(e){return{dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}}(e):function(e){return{dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}}(e)}(d),v=function(e,t,n){var r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,h,p),y=h.orientation,g=h.majorDimension,b=v.majorSize,x=Ea(r.label),M=x.font,S=x.lineHeight,E=x.gap,C=x.maxLabelWidth,q=va(this.chart,this.settings.formatter,e),O=b;ha.addLabelTitles({labels:c,formatter:q,isContinuous:a,canBeContinuous:l,localeInfo:u}),ha.calculateLabelPositions({labels:c,scale:e,size:O,layoutService:i,orientation:y,rtl:m,isContinuous:a,isDimension:s});var A=Q(ga(e,a),2),D=function(e){var t=e.labels,n=e.minValue,r=e.maxValue,i=e.orientation,o=e.rtl,a=e.isContinuous,s=e.style,u=e.padding,l=e.measureText,c=e.prop,f=void 0===c?"value":c,d=ba(t,n,r,f),m=d.maxOobs,p=d.minOobs,h=d.filteredLabels,v="scaledValue"!==f&&ua({orientation:i,rtl:o,isContinuous:a}),y=function(e,t,n){return n?t:e}(p,m,v),g=function(e,t,n){return n?e:t}(p,m,v),b=y.length,x=g.length,M=xa(l),S=Ma(b,M),E=Ma(x,M);return{filteredLabels:h,lowerOobs:y,upperOobs:g,lowerCircleSize:S,upperCircleSize:E,lowerOobSpace:function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(b,s.oob.size,S,i,u),upperOobSpace:function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(x,s.oob.size,E,i,u)}}({labels:c,minValue:A[0],maxValue:A[1],orientation:y,rtl:m,isContinuous:a,style:r,padding:p,measureText:this.measureText,prop:a?"value":"scaledValue"}),N=D.filteredLabels,I=D.lowerOobs,T=D.upperOobs,w=D.lowerCircleSize,L=D.upperCircleSize,k=D.lowerOobSpace,R=D.upperOobSpace,P=k,j=b-R;da(I),da(T);var F=Sa({alignment:0,dockValue:0,oobs:I,style:r.oob,rect:this.rect,symbol:t,position:r.oob.size+w/2,areaProps:h,radius:w/2,font:M}),_=Sa({alignment:1,dockValue:1,oobs:T,style:r.oob,rect:this.rect,symbol:t,position:b-(r.oob.size+L/2),areaProps:h,radius:L/2,font:M});ha.addLabelsInfo({labels:N,scale:e,majorSize:b,lowerLimit:P,upperLimit:j,font:M,lineHeight:S,gap:E,maxLabelWidth:C,majorDimension:g,orientation:y,measureText:this.measureText,rtl:m,layoutService:i,isContinuous:a,isDimension:s}),Lo.layout(N.map((function(e){return e.segment})),P,j,r.label.gap);var H=N.filter((function(e){return Lo.isInside(e.segment,P,j,a)}));return ha.createLabels({labels:H,style:r.label,maxLabelWidth:C,areaProps:h,area:v,lineHeight:S,font:M,theme:o}).concat([].concat(ee(F),ee(_)))}}},Oa=ta,Aa=Bo,Da={resolveValue:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=Vo({refLineLayout:t,layoutService:r});return Bo(i,n,"id")},resolveInnerValues:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService;if(r.meta.isGroupedByDimension){var i=Oa({refLineLayout:t,layoutService:r});return Aa(i,n,"innerValues")}},resolveNumInnerValues:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService;if(r.meta.mode.K)return 0;var i=Oa({refLineLayout:t,layoutService:r});return Aa(i,n,"numInnerValues")||0},resolveValueText:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=n.dimensionValuesInfo,o=r.meta.canBeContinuous,a=Oa({refLineLayout:t,layoutService:r});return i[a]&&o?i[a].qText:a},resolveValueInfo:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=Oa({refLineLayout:t,layoutService:r});return n.dimensionRefLineInfo[i]}};function Na(e){var t=e.isDimension,n=e.refLineModel,r=void 0===n?{}:n,i=e.layoutService,o=e.colorModel,a=e.dockService,s=e.chart,u=e.scale,l=e.axis,c=e.rtl,f=e.key,d=e.mainComponentKey,m=e.path,p=e.minimumLayoutMode,h=t?r.dimensionRefLines:m?r.query.getRefLines(m):r.measureRefLines;if(!h.length)return!1;var v={key:f,type:"ref-line",layout:{minimumLayoutMode:p},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:function(){return{size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}}},y=!(!t||"horizontal"!==a.meta.major.orientation||!c),g=!t||i.meta.isContinuous;return h.forEach((function(e){v.lines[l].push(function(e){var t,n,r=e.isDimension,i=e.refLineLayout,o=e.refLineModel,a=e.layoutService,s=e.colorModel,u=e.dockService,l=e.chart,c=e.scale,f=e.axis,d=e.invert,m=e.component,p=e.isContinuous,h={dir:f,line:{strokeWidth:(null==i||null===(t=i.style)||void 0===t?void 0:t.lineThickness)||2,strokeDasharray:null==i||null===(n=i.style)||void 0===n?void 0:n.lineType,stroke:s.resolveUIColor(i.paletteColor||{index:i.color})}};return!r||a.meta.isContinuous?(h.scale=c,h.value=i.refLineExpr.value):h.value=function(){var e,t=Qo({scale:l.scale(c),value:Da.resolveValue({refLineLayout:i,refLineModel:o,layoutService:a}),valueInfo:Da.resolveValueInfo({refLineLayout:i,refLineModel:o,layoutService:a}),size:null===(e=l.component(m))||void 0===e?void 0:e.rect["horizontal"===u.meta.major.orientation?"width":"height"],align:i.align,invert:d,layoutService:a,isContinuous:p});return Number.isNaN(t)?void 0:t},h}({isDimension:t,refLineLayout:e,refLineModel:r,layoutService:i,colorModel:o,dockService:a,chart:s,scale:u,axis:l,invert:y,component:d,isContinuous:g}))})),v}var Ia={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function Ta(e){var t=e.isDimension,n=e.refLineModel,r=void 0===n?{}:n,i=e.layoutService,o=e.colorModel,a=e.dock,s=e.scale,u=e.style,l=e.formatter,c=e.theme,f=e.localeInfo,d=e.rtl,m=e.key,p=e.path,h=t?r.dimensionRefLineLabels:p?r.query.getRefLineLabels(p):r.measureRefLineLabels;if(!h.length)return[];var v=[],y=!t||i.meta.isContinuous,g=h.map((function(e){return function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=e.colorModel,o=e.scale,a=e.theme,s=e.isContinuous,u=i.resolveUIColor(t.paletteColor||{index:t.color}),l={align:t.align,text:t.label,fill:t.coloredBackground?a.getContrastingColorTo(u):u,showValue:!1!==t.showValue,showLabel:!1!==t.showLabel,inputValue:t.refLineExpr.value,inputValueLabel:t.refLineExpr.label};return t.coloredBackground&&(l.background={fill:u}),s?(l.scale=o,l.value=t.refLineExpr.value):(l.value=function(){return Da.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r})},l.valueText=function(){return Da.resolveValueText({refLineLayout:t,refLineModel:n,layoutService:r})},l.valueInfo=function(){return Da.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r})}),l}({refLineLayout:e,refLineModel:r,layoutService:i,colorModel:o,scale:s,theme:c,isContinuous:y})}));return v.push(function(e){var t=e.isDimension,n=e.layoutService,r=e.style,i=e.labels,o=e.scale,a=e.formatter,s=e.dock,u=e.key,l=e.rtl;return{key:u,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:n,layout:{dock:s,rtl:l},theme:e.theme,isContinuous:e.isContinuous,isDimension:t,localeInfo:e.localeInfo,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:l?2:4,right:l?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}}}}({isDimension:t,rtl:d,style:me(!0,Ia,u),dock:a,key:m,labels:g,scale:s,formatter:l,layoutService:i,theme:c,isContinuous:y,localeInfo:f})),v}function wa(e){var t=e.layoutService,n=e.discreteModel,r=t.meta,i=r.isContinuous,o=r.canBeContinuous,a=r.isGroupedByDimension,s=t.getLayout(),u="K"===s.qHyperCube.qMode,l=Oe(s),c=Go(s),f=Ko(s,l),d=Jo(s),m=Zo(s,l),p={},h={},v=function(){return!(!f||!f.length)&&!f.every((function(e){var n=ta({refLineLayout:e,layoutService:t});return function(e){if(o){var n=t.getLayoutValue("qHyperCube.qDimensionInfo.0"),r=n.qMin,i=n.qMax;return aa({value:e,qMin:r,qMax:i})}return!1}(n)||function(e){if(!h[e])return!1;if(!i&&a){var n={valueInfo:h[e]},r="S"===t.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",o=t.getHyperCubeValue(r);return sa({label:n,dataPages:o})}return!0}(n)}))},y={isKMode:u,canBeContinuous:o,measureRefLines:c,dimensionRefLines:f,measureRefLineLabels:d,dimensionRefLineLabels:m,dimensionRefLineInfo:h,dimensionValuesInfo:p,query:{getRefLines:function(e){return Xo(s,e)},getRefLineLabels:function(e){return $o(s,e)}},update:function(){h=y.dimensionRefLineInfo,v()&&(p=ea({layout:s,canBeContinuous:o,discreteModel:n,layoutService:t}),y.dimensionValuesInfo=p,f.forEach((function(e){var n=ta({refLineLayout:e,layoutService:t});p[n]&&(h[n]?(h[n].innerValues=p[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,p[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,p[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||p[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||p[n].isMaxOrderOk):h[n]={id:p[n].id,qText:p[n].qText,innerValues:p[n].innerValues,minOrder:p[n].minOrder,maxOrder:p[n].maxOrder,isMinOrderOk:p[n].isMinOrderOk,isMaxOrderOk:p[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)})))}};return y.update(),y}var La=function(e){var t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,i=-Number.MAX_VALUE;return e.forEach((function(e){e&&(t=Math.min(t,e.x,e.x+e.width),n=Math.max(n,e.x,e.x+e.width),r=Math.min(r,e.y,e.y+e.height),i=Math.max(i,e.y,e.y+e.height))})),{x:t,y:r,width:n-t,height:i-r}},ka={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},Ra={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}},Pa={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 ja(e){var t=e.split("/");return"qmem:"===t[0]&&""===t[1]}function Fa(e){var t,n,r,i,o;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(n=(void 0!==(t=e.session.options||e.enigmaModel.session.sessionConfig).secure?t.secure:t.isSecure)?"https://":"http://",r=t.host||"localhost",i=t.port?":".concat(t.port):"","/"!==(o=t.prefix?t.prefix:"/")[o.length-1]&&(o="".concat(o,"/")),n+r+i+o):""}function _a(e,t){var n=e.replace(t,"").replace(/^\.\.\//i,"/");return"/"!==n[0]?"/".concat(n):n}function Ha(e,t){return t+("/"===e[0]?e.substr(1):e)}var Va=function(e,t){var n;function r(){n&&(clearTimeout(n),n=null)}function i(e){var t=e;t.onload=null,t.onerror=null,r()}var o={small:50,medium:200,large:340,original:340};return new Promise((function(a){var s=new Image;s.referrerPolicy="no-referrer",s.onload=function(){var e,n=s.height,u=s.width,l=o[t]*(n>u?1:n/u),c=o[t]*(u>n?1:u/n);!n||!u||0===n&&0===u?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(l,n),width:Math.min(c,u)},r()):(e={height:l,width:c},r()),a(e)},s.onerror=function(){i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((function(){i(s),a({height:20,width:20,imageError:!0})}),3e3)}))};function Ba(e,t,n){return za.apply(this,arguments)}function za(){return(za=H(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.ref.qStaticContentUrl.qUrl,(o=Fa(r))&&(_a(i,o),i=Ha(i=(i=i.replace(/"/g,'\\"')).replace(/'/g,"\\'"),o)),e.next=5,Va(i,n);case 5:return a=e.sent,s=a.height,u=a.width,l=a.imageError,e.abrupt("return",{src:i,size:n,height:s,width:u,imageError:l});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ya(e,t,n,r,i){return Ua.apply(this,arguments)}function Ua(){return(Ua=H(regeneratorRuntime.mark((function e(t,n,r,i,o){var a,s,u,l,c,f,d,m,p,h,v,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r.ref,o&&o.label&&(s=o.label),!(n.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=t&&t.getImage&&ja(s))){e.next=21;break}return e.prev=3,e.next=6,t.getImage(s);case 6:return u=e.sent,l="data:image/png;base64, ".concat(u),e.next=10,Va(l,i);case 10:c=e.sent,f=c.height,d=c.width,m=c.imageError,a={src:l,size:i,height:f,width:d,imageError:m},e.next=19;break;case 17:e.prev=17,e.t0=e.catch(3);case 19:e.next=28;break;case 21:return e.next=23,Va(s,i);case 23:p=e.sent,h=p.height,v=p.width,y=p.imageError,a={src:s,size:i,height:h,width:v,imageError:y};case 28:return e.abrupt("return",a);case 29:case"end":return e.stop()}}),e,null,[[3,17]])})))).apply(this,arguments)}function Wa(e,t,n,r){return Xa.apply(this,arguments)}function Xa(){return(Xa=H(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,s,u,l,c,f,d,m,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=i.label,s=n.qFallbackTitle,!ja(u="qmem://".concat(s,"/").concat(a))){e.next=21;break}return e.prev=4,e.next=7,t.getImage(u);case 7:if(!(l=e.sent)){e.next=17;break}return c="data:image/png;base64, ".concat(l),e.next=12,Va(c,r);case 12:f=e.sent,d=f.height,m=f.width,p=f.imageError,o={src:c,size:r,height:d,width:m,imageError:p};case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(4);case 21:return e.abrupt("return",o);case 22:case"end":return e.stop()}}),e,null,[[4,19]])})))).apply(this,arguments)}function Ga(e,t,n,r){return Ka.apply(this,arguments)}function Ka(){return(Ka=H(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,s,u,l,c,f,d,m,p,h,v,y,g,b,x,M,S;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=n.app,d=n.flags,m=null===(o=t.layout)||void 0===o||null===(a=o.tooltip)||void 0===a?void 0:a.imageComponents){e.next=4;break}return e.abrupt("return",[]);case 4:p=Q(m,1),h=p[0],v=h.size||"small",y=h.type||"media",g=-1,b=0;case 9:if(!(b<r.length)){e.next=16;break}if(r[b].cId!==h.cId){e.next=13;break}return g=b,e.abrupt("break",16);case 13:b++,e.next=9;break;case 16:if(x=(null===(s=i.data)||void 0===s||null===(u=s.customTooltipAttrExps)||void 0===u?void 0:u.value)||[],-1!==g&&x[g]&&(M=x[g]),"media"!==y||null===(l=h.ref)||void 0===l||null===(c=l.qStaticContentUrl)||void 0===c||!c.qUrl){e.next=20;break}return e.abrupt("return",Ba(h,v,f));case 20:if("url"!==y){e.next=22;break}return e.abrupt("return",Ya(f,d,h,v,M));case 22:if(!(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===y&&M&&M.label)){e.next=25;break}return S=r[g],e.abrupt("return",Wa(f,S,v,M));case 25:return e.abrupt("return",[]);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var $a=function(e){return H(regeneratorRuntime.mark((function t(){var n,r,i,o,a,s,u,l,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=e.customTooltipModel,r=e.nodes,i=e.attrExps,o=e.opts,a=r,s=[],u=0;u<a.length;u++)s.push(Ga(n,o,i,a[u]));return t.next=6,Promise.all(s);case 6:for(l=t.sent,c=0;c<a.length;c++)a[c].data.customTooltipImages=[l[c]];return t.abrupt("return",a);case 9:case"end":return t.stop()}}),t)})))()},Ja=function(e){var t,n,r=null===(t=e.customTooltipModel.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0},Za=function(e){return H(regeneratorRuntime.mark((function t(){var n,r,i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.customTooltipModel,r=e.nodes,i=e.attrExps,o=e.opts,a=r,t.next=4,$a({customTooltipModel:n,nodes:r,attrExps:i,opts:o});case 4:return a=t.sent,t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})))()},Qa=function(e){var t=e.customTooltipModel;return Ja({customTooltipModel:t})};var es=function(e,t){var n,r,i,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,u=t;return{qInfo:{qType:Pa.CHART.CHART_PARENT_TYPE,qId:Pa.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:u}},ts=function(e){var t,n,r,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:Pa.CHART.CHART_CHILD_TYPE},qExtendsId:i}};function ns(e){return rs.apply(this,arguments)}function rs(){return(rs=H(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,u,l,c,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,i=t.properties,o=t.customTooltipModel,null===(n=(a=o).miniChartToken.sessionObj)||void 0===n||!n.id){e.next=5;break}return e.next=5,r.destroySessionObject(a.miniChartToken.sessionObj.id);case 5:return s=Pa.CHART.STATE,u=es(i,s),e.next=9,r.createSessionObject(u);case 9:if(l=e.sent,c=ts(i),l.id===Pa.CHART.CHART_OBJECT_ID){e.next=14;break}return r.destroySessionObject(l.id),e.abrupt("return",void 0);case 14:return a.miniChartToken.sessionObj=l,e.next=17,l.createChild(c);case 17:if(f=e.sent,a.miniChartToken.sessionObj&&a.miniChartToken.sessionObj.id===l.id){e.next=21;break}return r.destroySessionObject(l.id),e.abrupt("return",void 0);case 21:return a.miniChartToken.model=f,e.abrupt("return",f);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function is(e){return os.apply(this,arguments)}function os(){return(os=H(regeneratorRuntime.mark((function e(t){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.app,r=t.customTooltipModel,i=r,o=Pa.CHART.STATE,e.next=5,n.removeSessionAlternateState(o);case 5:i.miniChartToken.alternateState=void 0;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function as(e){return ss.apply(this,arguments)}function ss(){return(ss=H(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.properties,i=t.customTooltipModel,o=i,a=Pa.CHART.STATE,s=r.qStateName,o.miniChartToken.alternateState){e.next=9;break}return o.miniChartToken.alternateState=a,e.next=8,n.addSessionAlternateState(a,s);case 8:o.miniChartToken.alternateState=a;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var us,ls,cs={createContainer:function(e){var t,n,r=e.ctx,i=e.layout;if(!((null===(t=i.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,r,i,o,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=Pa.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:Pa.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(r,i)},show:(ls=H(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,s,u,l,c,f,d,m,p,h,v,y,g,b,x,M,S,E,C,q,O,A,D;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.app,a=t.properties,s=t.selectedNodes,u=t.dimIndex,l=t.customTooltipModel,c=t.rtl,f=l,d=null==a||null===(n=a.tooltip)||void 0===n||null===(r=n.chart)||void 0===r||null===(i=r.object)||void 0===i?void 0:i.refId,null!=f&&f.embed&&o.removeSessionAlternateState&&o.addSessionAlternateState&&d&&!(a.qHyperCubeDef.qDimensions.length<=0)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,cs.hide({app:o,customTooltipModel:l});case 7:return e.prev=7,e.next=10,as({app:o,properties:a,customTooltipModel:l});case 10:return e.next=12,ns({app:o,properties:a,customTooltipModel:l});case 12:if(m=e.sent,!(f.miniChartToken.alternateState&&f.miniChartToken.sessionObj&&m)){e.next=24;break}return g=s.length>0&&void 0!==(null===(p=s[0].data)||void 0===p?void 0:p.value)?[null===(h=s[0].data)||void 0===h?void 0:h.value]:[],b=void 0!==u?u:a.qHyperCubeDef.qDimensions.length-1,2===a.qHyperCubeDef.qDimensions.length&&void 0===u&&s.length>0&&null!=(S=null!==(x=s[0].data.selectionOuterDimension)&&void 0!==x?x:s[0].data.selectionDimension)&&null!==(M=S.source)&&void 0!==M&&M.field&&(C=null==S||null===(E=S.source)||void 0===E?void 0:E.field.split("/"),q=C[C.length-1],(O=void 0!==S.value?[S.value]:[]).length>0&&void 0!==q&&f.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(q),O,!1)),g.length>0&&f.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",b,g,!1),A=document.getElementById(Pa.CHART.CONTAINER_ID),D={direction:c?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1},e.next=23,l.embed.render({element:A,model:f.miniChartToken.model,options:D,id:null===(v=f.miniChartToken.model)||void 0===v?void 0:v.id,type:null===(y=f.miniChartToken.model)||void 0===y?void 0:y.genericType});case 23:f.miniChartToken.vis=e.sent;case 24:e.next=30;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,cs.hide({app:o,customTooltipModel:l});case 30:case"end":return e.stop()}}),e,null,[[7,26]])}))),function(e){return ls.apply(this,arguments)}),hide:(us=H(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.customTooltipModel,null!=(i=r)&&i.embed){e.next=4;break}return e.abrupt("return");case 4:return cs.destroyVisualization({customTooltipModel:r}),e.next=7,n.destroySessionObject(Pa.CHART.CHART_OBJECT_ID);case 7:return i.miniChartToken.sessionObj=void 0,e.next=10,is({app:n,customTooltipModel:r});case 10:case"end":return e.stop()}}),e)}))),function(e){return us.apply(this,arguments)}),destroyVisualization:function(e){var t,n,r=e.customTooltipModel;"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 fs(e,t){var n=t,r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[Pa.CUSTOM.QUARANTINE]=[],e.forEach((function(e){r.quarantine[Pa.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}function ds(e){var t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function ms(){var e=Pa.CUSTOM,t=e.EXPRESSION,n=e.TITLE,r=e.DESCRIPTION,i=e.IMAGES,o={};return o[t]=!0,o[n]=!0,o[r]=!0,o[i]=!0,o}function ps(e){var t=ms();return e.filter((function(e){return t[e.id]}))}var hs={getNodes:function(e,t){var n=function(e,t){var n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);var 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:function(e,t){var n,r=[],i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((function(t){var o,a,s,u,l=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!l||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(u=t.data)&&void 0!==u&&u.customTooltipAttrExps&&!t.data.customTooltipImages){var c=t;c.data.customTooltipImages=[],r.push(c)}}else{n||(n=[],Object.keys(i).forEach((function(t){n=n.concat(e.findShapes(t).filter((function(e){return e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]})))})));var f=n.filter((function(e){var t,n,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===l.value&&r.label===l.label}));f.length>0&&(r=r.concat(f[0]))}})),r},displayTooltip:function(e,t,n){var r=n.nodes,i=n.opts,o=void 0===i?{}:i,a=n.customTooltipModel,s=n.extractedNodes,u=void 0===s?[]:s,l=n.hide;if(a&&!l){var c=a.layout,f=a.chart,d=hs.getAttrExprData(c).attrExps;u.length||r.length?Za({customTooltipModel:a,nodes:hs.getDataNodes(f,u.length>0?u:r),attrExps:d,opts:o}).then((function(){t.emit("show",e,r.length?{nodes:r}:void 0)})):t.emit("show",e,r.length?{nodes:r}:void 0)}else{var m,p;null!==(m=o.flags)&&void 0!==m&&m.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=a&&null!==(p=a.miniChartToken)&&void 0!==p&&p.alternateState&&cs.hide({app:o.app,customTooltipModel:a}),t.emit("hide")}},checkIfPromisesExist:function(e){var t=e.customTooltipModel;return Qa({customTooltipModel:t})},getAttrExps:function(e,t){var n,r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData:function(e){var t,n=[],r="",i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s,u=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[u])||void 0===s?void 0:s.qAttrExprInfo)||[],r="qDimensionInfo/".concat(u,"/qAttrExprInfo")}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[Pa.CUSTOM.QUARANTINE];if(!i){var o=r.qAttributeExpressions||[],a=ps(o);fs(a,e)}},unquarantineCustomTooltipAttrs:function(e){var t,n,r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[Pa.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[Pa.CUSTOM.QUARANTINE]},setAttrsFromQuarantine:function(e,t){var n=ds(e);if(n){var r=void 0!==t?t:n.length-1;if(n[r]){var i=this.getAttrExps(e,n[r]);if(0===ps(i).length){var o,a,s=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],u=[].concat(ee(i),ee(s)),l=e;l.qHyperCubeDef?l.qHyperCubeDef.qDimensions[r].qAttributeExpressions=u:l.qHyperCube.qDimensionInfo[r].qAttrExprInfo=u}}}},moveCustomTooltipAttrs:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=[],i=ds(e)||[],o=[].concat(ee(i),[t]);o.forEach((function(e){var t=ps(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));var a=ms(),s=i.map((function(e){var t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((function(e){return!a[e.id]})),t})),u=void 0!==n?n:s.length-1;s.length>0&&(s[u].qAttributeExpressions=s[u].qAttributeExpressions.concat(r));var l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=s:l.qHyperCube.qDimensionInfo=s},addCallbackCustomTooltip:function(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip:function(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip:function(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip:function(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:function(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:function(e,t){return[{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:je.detectTextDirection(e)},colspan:2},{}]},getImageRow:function(e,t){var n=je.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"}}));var o=e.imageError?"".concat(e.src,"?").concat(Math.random()):e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:o,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('".concat(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 vs(e,t,n,r){var i,o,a,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)||[],u=[],l=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return l?(s.forEach((function(e,t){var i=l.qValues&&l.qValues[t]?l.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){var n;switch(e.id){case Pa.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Pa.CUSTOM.TITLE:case Pa.CUSTOM.DESCRIPTION:case Pa.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);u.push({source:{key:"qHyperCube",field:"".concat(n,"/").concat(r,"/qAttrExprInfo/").concat(t)},label:o,value:"value"})})),u):u}var ys=function(e,t){var n=t.dimensionCount;if(n&&!(n<1)){var r=n-1,i="qDimensionInfo";return{field:"".concat(i,"/").concat(r),value:function(t){return vs(t,e,i,r)}}}};var gs=function(e,t,n){var r,i,o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];return Number.isNaN(a)?o:function(e,t,n,r){var i,o=(Y(i={},Pa.CUSTOM.TITLE,!0),Y(i,Pa.CUSTOM.DESCRIPTION,!0),i),a=hs.getAttrExprData(e),s=a.attrExps,u=a.fieldPath;return 0===t.length||0===s.length||""===u||s.forEach((function(e,i){var a=t[i];if(e.id===Pa.CUSTOM.EXPRESSION&&a){var s=e.qFallbackTitle,l="NaN"===a.value||e.isCustomFormatted?a.value:n("qHyperCube").field("".concat(u,"/").concat(i)).formatter()(a.value);r.customTooltipAttrExpsArr.push({label:s,value:l})}else if(o[e.id]&&a){var c="-"!==a.value&&"NaN"!==a.value?a.value:a.label;c&&"undefined"!==c&&r.customTooltipInfoAttrExpsArr.push(j(j({},e.id===Pa.CUSTOM.TITLE&&{title:c}),{},{value:c,id:e.id}))}})),r}(n,a.map((function(t){return Fe.getMeasure(e,t)})),e,o)};function bs(e){return function(e,t,n){var r=[];return e.forEach((function(e){r.push(gs(n,e,t))})),r}(e.nodes,e.layout,e.dataset).reduce((function(e,t){return{customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function xs(e){var t=e.key,n=e.source,r=e.layoutService,i=e.fieldModel,o=e.colorService,a=e.series;if(r.meta.isBarSeriesStacked){var s=i.main,u=s.major,l=s.majorNumeric,c=a.filter((function(e){return e.type===Ra.TYPE.BAR})),f=r.meta.isContinuous?l:u,d=function(e){return"NaN"!==e.qNum?e.qNum:0};return[{key:t,data:{extract:c.map((function(e){var t=e.ref,i=e.typeIndex,a=e.refIndex;return{source:n,field:u,value:r.meta.isContinuous?function(e){return e.qNum}:void 0,props:j(j({major:{field:f},selectionDimension:{field:u},segment:{field:t,value:d,reduceLabel:"none"},end:{field:t,value:d,reduceLabel:"none"},null:{fields:c.map((function(e){return{field:e.ref}})),value:function(e){return Array.isArray(e)&&e.every((function(e){return"NaN"===e}))},reduceLabel:"none"},typeIndex:i},o.getDatumProps(a)),{},{customTooltipAttrExps:ys(r.getLayout(),r.meta),sumOfPositives:{fields:c.map((function(e){return{field:e.ref}})),value:function(e){return e.reduce((function(e,t){return t>0?e+t:e}),0)},reduceLabel:"none"},sumOfNegatives:{fields:c.map((function(e){return{field:e.ref}})),value:function(e){return e.reduce((function(e,t){return t<0?e+t:e}),0)},reduceLabel:"none"}})}})),stack:{stackKey:function(e){return e.value},value:function(e){return e.end.value},offset:"diverging"}}}]}return[]}function Ms(e){var t=e.key,n=e.series,r=e.source,i=e.fieldModel,o=e.colorService,a=e.layoutService,s=e.forceCreate,u=void 0!==s&&s;if(n.length||u){var l=i.main,c=l.major,f=l.majorNumeric,d=function(e){return"NaN"!==e.qNum?e.qNum:0},m=a.meta.isContinuous?f:c;return[{key:t,data:{extract:n.map((function(e,t){var n=e.ref,i=e.refIndex,s=e.typeIndex,u=e.options;return{source:r,field:c,value:a.meta.isContinuous?function(e){return e.qNum}:void 0,props:j({major:{field:m},selectionDimension:{field:c},end:{field:n,value:u.showAsZeros?d:void 0,reduceLabel:"none"},start:0,line:t,typeIndex:s,null:{field:n,value:function(e){return"NaN"===e.qNum},reduceLabel:"none"},customTooltipAttrExps:ys(a.getLayout(),a.meta)},o.getDatumProps(i))}}))}}]}return[]}function Ss(e){var t=e.key,n=e.layoutService,r=e.fieldModel,i=e.series,o=n.meta;if(o.isBarSeriesStacked){var a=r.main,s=a.major,u=a.majorNumeric,l=i.filter((function(e){return e.type===Ra.TYPE.BAR})),c=o.isContinuous?{field:u,value:function(e){return e.qNum},reduceLabel:"none"}:[];return[{key:t,data:{extract:{field:0,props:{major:{field:o.isContinuous?u:s},null:{fields:l.map((function(e){return{field:e.ref}})),value:function(e){return Array.isArray(e)&&e.every((function(e){return"NaN"===e}))},reduceLabel:"none"},sumOfPositives:{fields:l.map((function(e){return{field:e.ref}})),value:function(e){return e.reduce((function(e,t){return t>0?e+t:e}),0)},reduceLabel:"none"},sumOfNegatives:{fields:l.map((function(e){return{field:e.ref}})),value:function(e){return e.reduce((function(e,t){return t<0?e+t:e}),0)},reduceLabel:"none"},timeStart:c,timeEnd:c},value:o.isContinuous?function(e){return e.qNum}:void 0}}}]}return[]}var Es={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}},Cs={OPTIONS:Es,DEFAULT:Es.MINI_CHART};function qs(e){var t=e.layoutService,n=e.discrete;return function(e){var r=e.h,i=e.rect,o=e.orientation,a=e.minThumbSize,s=n.query.getCurrentDataPage(),u=t.meta.size.y,l="horizontal"===o,c=i[l?"width":"height"],f=s.qArea.qTop/u*c,d=s.qArea.qHeight/u*c;if(d<a){var m=(a-d)/2;f=f-m+(Math.max(0,0-(f-m))-Math.max(0,f+d+m-c)),d=a}return r("div",{style:j({position:"absolute",right:0,bottom:0,background:"red",opacity:.2},l?{top:0,left:f,width:d}:{top:f,left:0,height:d})})}}function Os(e){var t=e.layoutService,n=e.viewState,r=e.viewCache;return t.meta.isContinuous?function(e,t){var n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(n,r):function(e){return e.get("viewRange")}(n)}var As=function(e){return{miniChart:e===Cs.OPTIONS.MINI_CHART.value,bar:e===Cs.OPTIONS.BAR.value,none:e===Cs.OPTIONS.NONE.value}};function Ds(e){var t=e.layoutService,n=e.override,r=void 0===n?void 0:n,i=function(e){var t=e.layoutService,n=t.getLayoutValue("scrollbar");if(n)return As(n);var r=t.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===r)return As(Cs.DEFAULT.value);var i=t.getLayoutValue("dimensionAxis.continuousAuto"),o=t.getLayoutValue("preferContinuousAxis");return As(!r&&(i||!i&&o)?Cs.OPTIONS.NONE.value:Cs.OPTIONS.MINI_CHART.value)}({layoutService:t});return r&&r.predicate({layoutService:t,scrollbar:i})&&(i.miniChart=r.value===Cs.OPTIONS.MINI_CHART.value,i.bar=r.value===Cs.OPTIONS.BAR.value,i.none=r.value===Cs.OPTIONS.NONE.value),i}function Ns(e){var t=e.componentKey,n=e.chart,r=e.viewState,i=e.viewCache,o=e.layoutService,a=e.dockService,s=e.rtl;return function(e){var u=e.center,l=u.x,c=u.y,f=n.element.getBoundingClientRect(),d=n.component(t),m="horizontal"===a.meta.major.orientation,p=m?l-f.left-d.rect.computedInner.x:c-f.top-d.rect.computedInner.y,h=m?d.rect.computedInner.width:d.rect.computedInner.height,v=m&&s?h-p:p,y=Math.max(0,Math.min(v/h,1)),g=Q(Os({layoutService:o,viewState:r,viewCache:i}),2),b=g[0],x=y<b,M=y>g[1],S=!x&&!M;return{pixel:v,relative:y,thumb:S?v-b*h:0,beforeThumb:x,afterThumb:M,onThumb:S}}}function Is(e){var t=e.componentKey,n=e.chart,r=e.viewState,i=e.viewCache,o=e.layoutService,a=e.dockService;return function(){var e=n.component(t),s=a.meta.major.orientation,u=e.rect.computedInner,l=u.width,c=u.height,f="horizontal"===s?l:c,d=Q(Os({layoutService:o,viewState:r,viewCache:i}),2),m=d[0];return{size:f,thumbSize:(d[1]-m)*f}}}function Ts(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.viewState,o=e.viewCache,a=e.layoutService,s=e.dockService,u=e.discrete,l=e.rtl,c=Ns({componentKey:t,chart:n,viewState:i,viewCache:o,layoutService:a,dockService:s,rtl:l}),f=Is({componentKey:t,chart:n,viewState:i,viewCache:o,layoutService:a,dockService:s});return{type:"Tap",options:{event:"scrollbarTap",enable:function(e,i){return!i||!!r.scroll.enabled()&&n.componentsFromPoint({x:i.center.x,y:i.center.y}).some((function(e){return e.key===t}))}},events:{scrollbarTap:function(e){e.preventDefault();var r=c(e);if(a.meta.isContinuous){var s=i.get("zoom"),l=s.max-s.min,d=o.get("continuousMin"),m=o.get("continuousMax"),p=d+(m-d)*r.relative;i.set("zoom",{min:Math.min(p-l/2,m-l),max:Math.max(p+l/2,d+l)})}else{var h=f(),v=r.pixel-h.thumbSize/2,y=Math.max(0,v/h.size);u.command.scrollTo(y)}n.component(t).emit("render")}}}}function ws(e){var t=e.e;return(t.srcEvent||t).srcElement.getAttribute("data-scrollbar-handle")||""}var Ls="scrollbarResize";function ks(e){var t,n=e.componentKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache,s=e.layoutService,u=e.dockService,l=e.rtl,c=Ns({componentKey:n,chart:r,viewState:o,viewCache:a,layoutService:s,dockService:u,rtl:l});return{type:"Pan",key:"event:".concat(Ls),options:{event:Ls,threshold:0,enable:function(e,t){return!(!s.meta.isContinuous||!i.scroll.enabled())&&(!t||(this[Ls]=this[Ls]||{},function(e){var t=Q(e.changedPointers,1)[0];return t&&("pointerdown"===t.type||"mousedown"===t.type)}(t)&&ws({e:t})&&(this[Ls].panningEvent=t.srcEvent),!!this[Ls].panningEvent))}},events:(t={},Y(t,"".concat(Ls,"start"),(function(e){e.preventDefault(),this[Ls]=this[Ls]||{},this[Ls].panningEvent&&r.component(n).emit("dragStart",this[Ls].panningEvent)})),Y(t,"".concat(Ls,"move"),(function(e){if(e.preventDefault(),this[Ls]=this[Ls]||{},this[Ls].panningEvent){var t=o.get("zoom"),i=a.get("continuousMin"),s=a.get("continuousMax"),u=a.get("minimiumZoomSpan"),l=(s-i)*c(e).relative+i,f=ws({e:this[Ls].panningEvent}),d="start"===f?Math.min(l,t.max):t.min,m="end"===f?Math.max(l,t.min):t.max;d===m&&(d-="start"===f?u:0,m+="end"===f?u:0),o.set("zoom",{min:d,max:m}),r.component(n).emit("render")}})),Y(t,"".concat(Ls,"end"),(function(e){e.preventDefault(),this[Ls]=this[Ls]||{},delete this[Ls].panningEvent,r.component(n).emit("dragEnd")})),Y(t,"".concat(Ls,"cancel"),(function(e){e.preventDefault(),this[Ls]=this[Ls]||{},delete this[Ls].panningEvent,r.component(n).emit("dragEnd")})),t)}}var Rs="scrollbarPan";function Ps(e){var t,n=e.componentKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache,s=e.layoutService,u=e.dockService,l=e.discrete,c=e.rtl,f=Ns({componentKey:n,chart:r,viewState:o,viewCache:a,layoutService:s,dockService:u,rtl:c}),d=Is({componentKey:n,chart:r,viewState:o,viewCache:a,layoutService:s,dockService:u});return{type:"Pan",key:"event:".concat(Rs),options:{event:Rs,threshold:0,enable:function(e,t){return this[Rs]=this[Rs]||{},!(t&&!this[Rs].isPanning)||!!i.scroll.enabled()&&((!t||t.target===r.element)&&r.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===n})))}},events:(t={},Y(t,"".concat(Rs,"start"),(function(e){e.preventDefault();var t=f(e);if(this[Rs]=this[Rs]||{},this[Rs].isPanning=!0,r.component(n).emit("lockState"),s.meta.isContinuous){var i=o.get("zoom"),u=i.max-i.min,l=a.get("continuousMin"),c=a.get("continuousMax"),m=l+(c-l)*t.relative;m<i.min?o.set("zoom",{min:Math.min(m,c-u),max:Math.max(m+u,l+u)}):m>i.max&&o.set("zoom",{min:Math.min(m-u,c-u),max:Math.max(m,l+u)}),this[Rs].relative=t.relative,this[Rs].zoom=o.get("zoom"),this[Rs].zoom.span=this[Rs].zoom.max-this[Rs].zoom.min,this[Rs].zoom.fullSpan=c-l}else if(t.onThumb)this[Rs].offset=t.thumb;else{var p=d();this[Rs].offset=t.beforeThumb?0:p.thumbSize}})),Y(t,"".concat(Rs,"move"),(function(e){e.preventDefault();var t=f(e);if(this[Rs]=this[Rs]||{},s.meta.isContinuous){var i=t.relative-this[Rs].relative,u=this[Rs].zoom,c=u.fullSpan,m=u.span,p=u.min,h=u.max,v=a.get("continuousMin"),y=a.get("continuousMax");o.set("zoom",{min:Math.min(p+i*c,y-m),max:Math.max(h+i*c,v+m)})}else{var g=t.pixel-(this[Rs].offset||0),b=d(),x=Math.max(0,g/b.size);l.command.scrollTo(x)}r.component(n).emit("render")})),Y(t,"".concat(Rs,"end"),(function(e){e.preventDefault(),this[Rs]=this[Rs]||{},this[Rs].isPanning=!1,r.component(n).emit("unlockState")})),Y(t,"".concat(Rs,"cancel"),(function(e){e.preventDefault(),this[Rs]=this[Rs]||{},this[Rs].isPanning=!1,r.component(n).emit("unlockState")})),t)}}function js(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.viewState,o=e.viewCache,a=e.layoutService,s=e.dockService,u=e.discrete,l=e.rtl;return[Ts({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:s,discrete:u,rtl:l}),ks({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:s,rtl:l}),Ps({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:s,discrete:u,rtl:l})]}function Fs(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.layoutService,o=function(e,o){if(i.meta.isContinuous){var a=n.component(t);a&&a.emit&&r.scroll.enabled()&&a.emit(e,o)}};return{type:"native",events:{mousemove:function(e){return o("hover",e)},mouseleave:function(){return o("leave")}}}}var _s={background:"rgba(0, 0, 0, 0.1)"},Hs={top:-1,bottom:-1,width:6},Vs={width:2,background:"#595959"},Bs={before:_s,after:_s,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Hs,endHandle:Hs,startHandleBorder:Vs,endHandleBorder:Vs},zs={background:"rgba(0, 0, 0, 0.1)"},Ys={top:-1,bottom:-1,width:6},Us={width:2,background:"#595959"},Ws={before:zs,after:zs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Ys,endHandle:Ys,startHandleBorder:Us,endHandleBorder:Us},Xs={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Gs={pointerEvents:"initial"},Ks={pointerEvents:"none"};var $s="ew-resize",Js="default";function Zs(){var e=this.rect,t=this.settings.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 Qs(){var e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?$s:Js}function eu(e,t,n){var r=this.settings.settings.size.thumb.min;if(n-t<r){var 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 tu(e){var t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function nu(){var e=Zs.call(this),t=e.size,n=e.start,r=e.end;this.renderer.render(this.elements(this.h,eu.call(this,t,n,r)))}function ru(){var e=this.state,t=this.settings,n=this.style,r=t.settings.style;return e.style[r]||(e.style[r]=function(e){var t=e.id,n=e.style,r="slim"===t?Ws:Bs;return{container:j({},Xs),before:j(j(j({},Xs),r.before),n.before),after:j(j(j({},Xs),r.after),n.after),thumb:j(j(j({},Xs),r.thumb),n.thumb),startHandle:j(j(j({},Xs),Gs),r.startHandle),endHandle:j(j(j({},Xs),Gs),r.endHandle),startHandleBorder:j(j(j({},Xs),Ks),r.startHandleBorder),endHandleBorder:j(j(j({},Xs),Ks),r.endHandleBorder)}}({id:t.settings.style,style:n[r]})),e.style[r]}var iu={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:function(){return[0,1]},injections:function(){return[]}},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render:function(){nu.call(this)},lockState:function(){this.state.locked=!0},unlockState:function(){this.state.locked=!1},hover:function(e){if(!(this.state.locked||this.state.drag.start||this.state.drag.end||!tu.call(this,e)&&this.state.hover.isPristine())){this.state.hover.reset();var t=ws({e:e});t&&(this.state.hover[t]=!0),Qs.call(this),nu.call(this)}},leave:function(){this.state.locked||(this.state.hover.reset(),Qs.call(this),nu.call(this))},dragStart:function(e){if(!this.state.locked){this.state.drag.reset();var t=ws({e:e});t&&(this.state.drag[t]=!0),Qs.call(this)}},dragEnd:function(){this.state.locked||(this.state.drag.reset(),Qs.call(this),nu.call(this))}},preferredSize:function(e){var t=e.outer,n=this.settings.settings.size.area,r=n.min,i=n.max,o=n.ratio,a="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(r,Math.min(i,t[a]*o))},created:function(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset:function(){this.start=!1,this.end=!1},isPristine:function(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset:function(){this.start=!1,this.end=!1}}}},render:function(e){this.h=e;var t=Zs.call(this),n=t.size,r=t.start,i=t.end;return this.elements(e,eu.call(this,n,r,i))},properties:function(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements:function(e,t){var n=this,r=t.size,i=t.start,o=t.end,a=this.settings.settings,s=a.injections().map((function(t){return t({h:e,rect:n.rect,orientation:a.orientation,minThumbSize:a.size.thumb.min})}));return function(e){var t,n=e.h,r=e.size,i=e.start,o=e.end,a=e.properties,s=e.startHandleActive,u=e.endHandleActive,l=e.style,c=e.continuous,f=e.invert,d=e.injections,m={before:Y({},a.end,r-i),after:Y({},a.start,o),startHandle:{left:-3},startHandleBorder:{left:1},endHandle:{right:-3,left:"auto"},endHandleBorder:{left:3}},p=n("div",{style:j(j({},l.before),f?m.after:m.before),class:"scrollbar--before"}),h=n("div",{style:j(j({},l.after),f?m.before:m.after),class:"scrollbar--after"}),v=[];if(c){var y=n("div",Y({style:j(j({},l.startHandle),f?m.endHandle:m.startHandle),class:"scrollbar--start-handle"},"data-scrollbar-handle","start"),s?n("div",{style:j(j({},l.startHandleBorder),f?m.endHandleBorder:m.startHandleBorder)}):void 0);v.push(y);var g=n("div",Y({style:j(j({},l.endHandle),f?m.startHandle:m.endHandle),class:"scrollbar--end-handle"},"data-scrollbar-handle","end"),u?n("div",{style:j(j({},l.endHandleBorder),f?m.startHandleBorder:m.endHandleBorder)}):void 0);v.push(g)}var b=n("div",{style:j(j({},l.thumb),{},(t={},Y(t,a.start,i),Y(t,a.end,r-o),t)),class:"scrollbar--thumb"},v);return n("div",{style:j({},l.container)},[p,b,h].concat(ee(d)))}({h:e,size:r,start:i,end:o,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:ru.call(this),continuous:a.isContinuous,invert:"horizontal"===a.orientation&&a.rtl,injections:s})}};function ou(e){var t=e.layoutService;return t.meta.isContinuous&&Ds({layoutService:t}).miniChart}function au(e){var t=e.models,n=t.layoutService,r=t.fieldModel,i=t.seriesModel,o=t.colorService,a=i.meta,s=a.primarySeries,u=a.secondarySeries,l=i.query.series(Ra.TYPE.LINE),c=[].concat(ee(Ms({forceCreate:!0,key:ka.COLLECTION.PRIMARY,series:s,fieldModel:r,colorService:o,layoutService:n})),ee(Ms({key:ka.COLLECTION.SECONDARY,series:u,fieldModel:r,colorService:o,layoutService:n})),ee(Ms({key:ka.COLLECTION.LINE,series:l,fieldModel:r,colorService:o,layoutService:n})),ee(xs({key:ka.COLLECTION.STACKED_PRIMARY,layoutService:n,fieldModel:r,colorService:o,series:s})),ee(xs({key:ka.COLLECTION.STACKED_SECONDARY,layoutService:n,fieldModel:r,colorService:o,series:u})),ee(Ss({key:ka.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:n,fieldModel:r,series:s})),ee(Ss({key:ka.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:n,fieldModel:r,series:u})));return ou(t)&&(c.push.apply(c,ee(Ms({key:ka.COLLECTION.REDUCED,source:ka.DATA.REDUCED,series:i.query.all(),fieldModel:r,colorService:o,layoutService:n}))),c.push.apply(c,ee(Ms({key:ka.COLLECTION.REDUCED_PRIMARY,source:ka.DATA.REDUCED,series:s,fieldModel:r,colorService:o,layoutService:n}))),c.push.apply(c,ee(Ms({key:ka.COLLECTION.REDUCED_SECONDARY,source:ka.DATA.REDUCED,series:u,fieldModel:r,colorService:o,layoutService:n}))),c.push.apply(c,ee(xs({key:ka.COLLECTION.REDUCED_STACKED_PRIMARY,source:ka.DATA.REDUCED,layoutService:n,fieldModel:r,series:i.meta.primarySeries.filter((function(e){return e.type===Ra.TYPE.BAR})),colorService:o}))),c.push.apply(c,ee(xs({key:ka.COLLECTION.REDUCED_STACKED_SECONDARY,source:ka.DATA.REDUCED,layoutService:n,fieldModel:r,series:i.meta.secondarySeries.filter((function(e){return e.type===Ra.TYPE.BAR})),colorService:o})))),c}var su=function(e){var t=e.layoutService,n=e.dockService;return"custom"!==t.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,n.meta.chart.size["horizontal"===n.meta.major.orientation?"height":"width"]/4):void 0};function uu(e){var t=e.models,n=t.dockService,r=t.seriesModel;if(1!==r.meta.measureAxes.length)return.5;var i=r.meta.measureAxes[0].isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock;return"horizontal"===n.meta.minor.orientation?"near"===i||"bottom"===i?1:0:"near"===i||"left"===i?0:1}var lu=function(e){var t=e.models,n=e.environment,r=t.fieldModel,i=t.discreteModel,o=t.layoutService,a=t.dockService,s=a.meta.major.orientation;return{type:"group-by-measure",data:{extract:{field:r.main.major}},measureCount:o.meta.groupSize,maxPxStep:su({layoutService:o,dockService:a}),invert:"horizontal"===s&&"rtl"===n.options.direction,range:i.query.getScaleRange,align:uu({models:t})}};function cu(e){var t=e.viewState,n=e.viewCache,r=e.layoutService;return n.set("qTimeAxisCache",[]),{get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n.get("qTimeAxisCache");return r[t]&&r[t][0]===e?r[t][1]:void 0},set:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=n.get("qTimeAxisCache");i[r]=[e,t]},key:function(e){var i=e.distance,o=t.get("zoom"),a=o.min,s=(o.max-a)/(n.get("continuousMax")-n.get("continuousMin")),u=r.getHyperCubeValue("qAxisData.qAxis",[]).map((function(e){return e.qName}));return[i,s.toString().length>12?s.toPrecision(12):s].concat(ee(u)).toString()}}}function fu(e){var t=e.picasso,n=e.models,r=e.viewState,i=e.viewCache,o=e.environment,a=n.layoutService.meta,s=a.isTime?j({},function(e){var t,n=e.picasso,r=e.viewState,i=e.viewCache,o=e.models,a=e.environment,s=o.layoutService,u=o.fieldModel,l=o.appLayoutModel,c=o.themeService,f=n.renderer("svg")().measureText,d=u.main.majorNumeric,m=c.getStyles(),p={type:"time",data:{field:d},qAxis:function(){return s.getHyperCubeValue("qAxisData.qAxis",[])},field:d,min:function(){return r.get("zoom").min},max:function(){return r.get("zoom").max},invert:"rtl"===a.options.direction,formatter:{fn:n.formatter("q-time"),localeInfo:l.qLocaleInfo,qNumFormat:s.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:function(e){return f({text:e,fontFamily:m.axis.label.name.fontFamily,fontSize:m.axis.label.name.fontSize})}},ticks:{generator:{type:"d3"},anchor:"start",clamp:!0},cache:cu({viewState:r,viewCache:i,layoutService:s})};return Y(t={},ka.SCALE.MAJOR,me(!0,{},p,{ticks:{level:"outer"}})),Y(t,ka.SCALE.MAJOR_INNER,me(!0,{},p,{ticks:{level:"inner"}})),t}({picasso:t,viewState:r,viewCache:i,models:n,environment:o})):a.isContinuous?Y({},ka.SCALE.MAJOR,function(e){var t=e.viewState,n=e.models,r=e.environment,i=n.fieldModel;return{type:"linear",invert:"horizontal"===n.dockService.meta.major.orientation&&"rtl"===r.options.direction,data:{extract:{field:i.main.majorNumeric}},ticks:{forceBounds:!0,count:t.get("zoom").min===t.get("zoom").max?1:void 0},minorTicks:{count:1},min:function(){return t.get("zoom").min},max:function(){return t.get("zoom").max}}}({models:n,viewState:r,environment:o})):a.isBarSeriesGrouped?Y({},ka.SCALE.MAJOR,lu({models:n,environment:o})):Y({},ka.SCALE.MAJOR,a.isBarSeriesStackedInBothAxis?lu({models:n,environment:o}):function(e){var t=e.models,n=e.environment,r=t.fieldModel,i=t.discreteModel,o=t.layoutService,a=t.dockService,s=a.meta.major.orientation;return{data:{extract:{field:r.main.major,props:{selectionDimension:{field:r.main.major}}}},maxPxStep:su({layoutService:o,dockService:a}),invert:"horizontal"===s&&"rtl"===n.options.direction,range:i.query.getScaleRange,align:uu({models:t})}}({models:n,environment:o}));return ou(n)?j(j({},s),{},Y({},ka.SCALE.REDUCED,function(e){var t=e.viewCache,n=e.mainMajor;return me(!0,{},n,{min:function(){return t.get("continuousMin")},max:function(){return t.get("continuousMax")}})}({viewCache:i,mainMajor:s[ka.SCALE.MAJOR]}))):s}function du(e){var t=e.fields,n=e.tickModel,r=e.dockService,i="rtl"===e.environment.options.direction;return{data:{source:"qHyperCube",fields:t},invert:"vertical"===r.meta.minor.orientation||i,ticks:{values:n.query.getValues},min:n.query.getMin,max:n.query.getMax}}function mu(e){var t=e.layoutService,n=e.tickModel,r=e.dockService,i=e.environment;if(ou({layoutService:t})){var o="rtl"===i.options.direction;return{type:"linear",invert:"vertical"===r.meta.minor.orientation||o,min:n.query.getMin,max:n.query.getMax}}}function pu(e){var t,n=e.picasso,r=e.models,i=e.viewState,o=e.viewCache,a=e.environment,s=r.layoutService,u=r.fieldModel,l=r.primaryTickModel,c=r.secondaryTickModel,f=r.colorService,d=r.dockService;return j(j({},fu({picasso:n,models:r,viewState:i,viewCache:o,environment:a})),{},(Y(t={},ka.SCALE.MINOR.PRIMARY,du({fields:u.main.minorsPrimary,tickModel:l,dockService:d,environment:a})),Y(t,ka.SCALE.MINOR.SECONDARY,du({fields:u.main.minorsSecondary,tickModel:c,dockService:d,environment:a})),Y(t,ka.SCALE.MINOR.REDUCED_PRIMARY,mu({layoutService:s,tickModel:l,dockService:d,environment:a})),Y(t,ka.SCALE.MINOR.REDUCED_SECONDARY,mu({layoutService:s,tickModel:c,dockService:d,environment:a})),t),f.custom.wrappedScales())}var hu={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"},vu=["all","labels"];var yu=.5,gu=3,bu=13;function xu(e){var t=e.models,n=e.environment,r=t.layoutService,i=t.dockService,o=t.themeService,a="rtl"===n.options.direction,s=r.getLayoutValue("dimensionAxis"),u=o.getStyles(),l=function(e){var t=e.layoutService,n=t.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),r=Q(t.getDataPages(),1)[0],i=r?r.qMatrix:[];return Te.getAdjustedMaxGlyphCount(n,i,0,"qText")}({layoutService:r}),c=i.meta.major.orientation;return{type:"axis",key:ka.COMPONENT.AXIS.MAJOR,scale:ka.SCALE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:hu.AXIS.MAJOR[c.toUpperCase()]},settings:{labels:{mode:s.label,tiltAngle:a?-40:40,maxEdgeBleed:50,maxLengthPx:i.meta.minor.size/4,maxGlyphCount:l,tiltThreshold:l>gu&&l<bu?1:void 0,fontFamily:u.axis.label.name.fontFamily,fontSize:u.axis.label.name.fontSize,fill:u.axis.label.name.color}},brush:{consume:[{context:"selection",style:{inactive:{opacity:yu}}}]}}}function Mu(e){var t=e.models,n=t.dockService,r=t.themeService,i=n.meta.major.orientation,o=r.getStyles();return{type:"axis",key:ka.COMPONENT.AXIS.MAJOR,scale:ka.SCALE.MAJOR,layout:{dock:n.meta.major.dock,minimumLayoutMode:hu.AXIS.MAJOR[i.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:o.axis.label.name.fontFamily,fontSize:o.axis.label.name.fontSize,fill:o.axis.label.name.color}}}}function Su(e){var t=e.models,n=e.environment,r=t.layoutService,i=r.getLayoutValue("dimensionAxis");if(!i)return[];var o=i.show;return"none"===o||"title"===o?[]:r.meta.isTime?function(e){var t=e.models,n=e.environment,r=t.dockService,i=t.themeService,o="rtl"===n.options.direction,a=r.meta.major.orientation,s="bottom"===r.meta.major.dock?0:1,u=i.getStyles(),l=o?1:0,c={type:"time-axis",renderer:"svg",layout:{dock:r.meta.major.dock,minimumLayoutMode:hu.AXIS.MAJOR[a]},preferredSize:function(){return{size:2*parseFloat(u.axis.label.name.fontSize),edgeBleed:{left:1,right:1}}},settings:{anchor:o?"end":"start",label:{align:s,justify:l},guideLine:{major:{justify:l},minor:{align:s}},line:{show:!1}},style:{label:{fontFamily:u.axis.label.name.fontFamily,fontSize:u.axis.label.name.fontSize,fill:u.axis.label.name.color},majorGuideLine:{stroke:u.axis.line.major.color},minorGuideLine:{stroke:u.axis.line.minor.color}}};return[me(!0,{},c,{key:ka.COMPONENT.AXIS.TIME_INNER,scale:ka.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:u.axis.line.minor.color},minorGuideLine:{stroke:u.axis.line.major.color}}}),me(!0,{},c,{key:ka.COMPONENT.AXIS.TIME_OUTER,scale:ka.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:t,environment:n}):r.meta.isContinuous?[Mu({models:t})]:[xu({models:t,environment:n})]}var Eu=function(e){var t=e.layoutService,n=e.axis;return t.meta.isBarSeriesGrouped?function(e){var t=e.scale,n=e.datum;return t([n.value,n.typeIndex.value])+t.bandwidth()/2}:t.meta.isBarSeriesStackedInBothAxis?function(e){var t=e.scale;return t([e.datum.value,n])+t.bandwidth()/2}:null},Cu=function(e){var t=e.layoutService,n=e.seriesModel,r=e.rtl,i=e.orientation;return t.meta.isContinuous?null:t.meta.isBarSeriesGrouped?function(e){var t=e.scale;return t([e.datum.value,r&&"horizontal"===i?n.meta.barSeriesCount-1:0])+t.bandwidth()*n.meta.barSeriesCount/2}:t.meta.isBarSeriesStackedInBothAxis?function(e){var t=e.scale;return t([e.datum.value,r&&"horizontal"===i?1:0])+t.bandwidth()}:null};function qu(e){var t=e.layoutService,n=e.active,r=void 0===n?{}:n,i=e.inactive,o=void 0===i?{}:i;return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:j({strokeWidth:t.meta.isContinuous?0:2,stroke:"#000",opacity:function(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}},r),inactive:j({opacity:function(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:yu}},o)}}]}}var Ou="max",Au="min";function Du(e,t){return function(e,t){var n=t.meta.hasExplicitMax,r=t.explicit.max;return!!n&&e>r}(e,t)||function(e,t){var n=t.meta.hasExplicitMin,r=t.explicit.min;return!!n&&e<r}(e,t)}var Nu=function(e,t){return"".concat(e,"-").concat(t.id)},Iu=4,Tu=12,wu=4;function Lu(e){var t=e.chart,n=e.layoutService,r=e.dockService,i=e.markerKey,o=e.markerType;if(n.meta.isContinuous)return function(){return"".concat(wu,"px")};var a={size:void 0},s="horizontal"===r.meta.major.orientation?"width":"height";return function(e){if(!a.size){var n=t.component(i),r=e.resources.scale(ka.SCALE.MAJOR),u=n.rect[s]*r.bandwidth()*.25,l=Math.max(Iu,Math.min(Tu,u));a.size="".concat("bar"===o?2*l:l,"px")}return a.size}}var ku=Nt.isDark;var Ru=function(e){var t,n=e.chart,r=e.models,i=e.series,o=e.environment,a=r.layoutService,s=r.seriesModel,u=r.colorService,l=r.dockService,c=r.primaryExtremumModel,f=r.secondaryExtremumModel,d=u.getColor(),m=i.options,p=m.fill,h=m.marker,v=a.meta.isContinuous,y="rtl"===o.options.direction,g=l.meta.major.orientation,b="horizontal"===g,x=(i.isPrimary?c:f).query.getExtrema(),M=function(e){return Du(e.end.value,x)},S=Nu(ka.COMPONENT.MARKER,i);return{type:"point",key:S,data:{filter:function(e){return i.ref===e.end.source.field},collection:i.collection},settings:(t={},Y(t,b?"x":"y",{scale:ka.SCALE.MAJOR,fn:Cu({layoutService:a,seriesModel:s,rtl:y,orientation:g}),ref:v?"major":void 0}),Y(t,b?"y":"x",{scale:i.scale,ref:"end",fn:function(e){var t,n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}}),Y(t,"fill",p?d:"none"),Y(t,"opacity",(function(e){var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||M(e.datum)?0:1})),Y(t,"stroke",(function(e){var t=d(e);return p?ku(t)?function(e){return ot(e).brighter(.5).toString()}(t):function(e){return ot(e).darker().toString()}(t):t})),Y(t,"size",Lu({chart:n,layoutService:a,dockService:l,markerKey:S,markerType:h})),Y(t,"shape",(function(){return function(e){var t,n=e.marker,r=e.horizontal,i=e.rtl;return"triangle"!==n||r||(t=i?"left":"right"),"bar"===n&&(t=r?"horizontal":"vertical"),t?{type:n,direction:t}:{type:n}}({marker:h,horizontal:b,rtl:y})})),t),brush:qu({layoutService:a,active:{opacity:function(e){var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||M(e.data)?0:1}},inactive:{opacity:function(e){var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||M(e.data)?0:yu}}})}};function Pu(e){var t=e.property,n=void 0===t?"end":t,r=e.isHorizontal,i=e.isColor,o=e.fallback,a=e.rtl;return function(e){for(var t=e.datum,s=e.resources.scale,u=s(ka.SCALE.MAJOR),l=s(ka.SCALE.COLOR),c=r&&a?ee(t.points).reverse():t.points,f=c.reduce((function(e,t,r){var i="NaN"===t[n].value||Number.isNaN(t[n].value),o=c[r+1],a=o&&"NaN"!==o[n].value&&!Number.isNaN(o[n].value);return i?e.length&&a&&e.push(t):e.push(t),e}),[]),d="group-by-measure"===u.type?function(e){return u([e.major.value,e.typeIndex.value])}:function(e){return u(e.major.value)},m=f.map(d),p=Math.min.apply(Math,ee(m)),h=Math.max.apply(Math,ee(m))-p,v=0===h?1:h,y=m.map((function(e,t){return 0===t?0:t===m.length-1?1:(e-p)/v})),g=[],b=0;b<f.length;b++){var x=f[b],M=x.color&&x.color.value,S=i?M||o:l(M)||o,E=0===b,C=b===f.length-1,q=y[b];if("NaN"===x[n].value||Number.isNaN(x[n].value))g[b-1].virtual||g.push({virtual:!0});else{var O=f[b-1];O&&"NaN"!==O[n].value&&!Number.isNaN(O[n].value)?g.push({color:S,offset:E?0:Math.max(0,parseFloat((q-(q-y[b-1])/2).toFixed(5)))}):g.push({color:S,offset:q});var A=f[b+1];A&&"NaN"!==A[n].value&&!Number.isNaN(A[n].value)?g.push({color:S,offset:C?1:Math.max(0,parseFloat((q+(y[b+1]-q)/2).toFixed(5)))}):g.push({color:S,offset:q})}}var D=g.reduce((function(e,t,n){if(t.virtual){var r=g[n-1],i=g[n+1],o=r.offset+(i.offset-r.offset)/2;e.push({color:r.color,offset:o},{color:i.color,offset:o})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:r?1:0,y1:0,y2:r?0:1,stops:D}}}function ju(e){var t=e.environment,n=e.models,r=e.measureIndex,i=n.layoutService,o=n.colorService,a=n.dockService,s="rtl"===t.options.direction,u=i.meta.hasMultipleMeasures,l=o.getSettingsForMeasure(r),c=l.mode,f=l.type,d=l.nil,m="horizontal"===a.meta.major.orientation;if(!c||"constant"===f)return o.getColor();if("measure"===c&&"categorical"===f)return o.getColor();var p=i.getHyperCubeValue("qMeasureInfo.".concat(r,".color"));if(null!=p&&p.on)return"byExpression"===p.mode?Pu({isHorizontal:m,isColor:!0,fallback:d,rtl:s}):o.getColor();var h=i.getLayoutValue("color",{}),v=!h.auto&&"byExpression"===h.mode,y=!!h.colorExpression;if(v&&!y)return d;var g=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return u||!g?Pu({isHorizontal:m,isColor:"color"===f,fallback:d,rtl:s}):"continuous"===f?function(e){var t=e.isHorizontal,n=e.rtl;return function(e){var r=e.datum.points,i=(0,e.resources.scale)(ka.SCALE.COLOR),o=r.map((function(e){return e.end.value})).filter((function(e){return"NaN"!==e&&!Number.isNaN(e)})),a=Math.min.apply(Math,ee(o)),s=Math.max.apply(Math,ee(o)),u=s-a,l=0===u?1:u,c=i.domain().map((function(e){return{color:i(Math.min(s,Math.max(a,e))),offset:Math.min(1,Math.max(0,(e-a)/l))}}));return{type:"gradient",x1:!t&&n?1:0,x2:t||n?0:1,y1:t?1:0,y2:0,stops:c}}}({isHorizontal:m,rtl:s}):function(e){var t=e.isHorizontal,n=e.isArea,r=e.fallback,i=e.rtl;return function(e){for(var o=e.datum.points,a=(0,e.resources.scale)(ka.SCALE.COLOR),s=o.map((function(e){return e.end.value})).filter((function(e){return"NaN"!==e&&!Number.isNaN(e)})),u=Math.min.apply(Math,ee(s)),l=Math.max.apply(Math,ee(s)),c=n?Math.min(0,u):u,f=(n?Math.max(0,l):l)-c,d=0===f?1:f,m=a.domain(),p=[],h=0;h<m.length-1;h++){var v=m[h],y=a(v)||r;p.push({color:y,offset:Math.min(1,Math.max(0,(v-c)/d))});var g=m[h+1];p.push({color:y,offset:Math.min(1,Math.max(0,(g-c)/d))})}return{type:"gradient",x1:!t&&i?1:0,x2:t||i?0:1,y1:t?1:0,y2:0,stops:p}}}({isHorizontal:m,fallback:d,rtl:s})}var Fu=function(e){var t=e.models,n=e.environment,r=e.series,i=t.layoutService,o=t.seriesModel,a=t.dockService,s=t.styleModel,u="rtl"===n.options.direction,l=a.meta.major.orientation,c=Cu({layoutService:i,seriesModel:o,rtl:u,orientation:l});return{key:Nu(ka.COMPONENT.LINE,r),type:"line",data:{filter:function(e){return r.ref===e.end.source.field},collection:r.collection},settings:{coordinates:{major:{scale:ka.SCALE.MAJOR,fn:c},minor:{scale:r.scale,ref:"end"}},layers:{curve:s.query.line.getCurveFn(),line:{stroke:ju({models:t,environment:n,measureIndex:r.refIndex}),strokeWidth:s.query.line.getStrokeWidthFn(),strokeDasharray:s.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:r.options.showAsConnections,orientation:a.meta.major.orientation},brush:qu({layoutService:i,active:{stroke:void 0,strokeWidth:void 0,opacity:yu},inactive:{opacity:yu}})}},_u={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function Hu(e){var t=e.series,n=e.layoutService,r=t.options.showAsConnections,i=function(e){var t=e.layoutService.meta.isDiscrete;return function(e){var n=e.item;if(n.dummy)return t;var r=n.end.value;return"NaN"===r||Number.isNaN(r)}}({layoutService:n}),o=r?function(e,t){return 0!==e&&t.slice(0,e).reverse().some((function(e){return!i({item:e})}))}:function(e,t){return 0!==e&&!i({item:t[e-1]})},a=r?function(e,t){return e!==t.length-1&&t.slice(e+1,t.length).some((function(e){return!i({item:e})}))}:function(e,t){return e!==t.length-1&&!i({item:t[e+1]})};return function(e){var t=e.index,n=e.items;return{before:o(t,n),after:a(t,n)}}}var Vu=3,Bu=20;function zu(e){var t,n=e.models,r=e.series,i=e.environment,o=n.layoutService,a=n.colorService,s=n.seriesModel,u=n.dockService,l=n.styleModel,c=n.primaryExtremumModel,f=n.secondaryExtremumModel,d=n.selectionService,m=o.getLayoutValue("dataPoint.show",!1),p=u.meta.major.orientation,h="horizontal"===p,v="SPARK"===u.meta.chart.mode,y=a.getColor(),g=_u.POINT,b=function(e){var t=e.layoutService,n=e.series,r={key:void 0,map:void 0},i=Hu({series:n,layoutService:t});return function(e){var t=e.item,n=e.items;r.key!==n&&(r.key=n,r.map=function(e){return e.items.reduce((function(e,t){var n=t.line.value;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push("".concat(t.major.value,"-").concat(t.line.value)),e}),{})}({items:n}));var o=t.line.value,a=r.map[o],s="".concat(t.major.value,"-").concat(o),u=a.keys.indexOf(s),l=i({index:u,items:a.items}),c=l.before,f=l.after;return!c&&!f}}({series:r,layoutService:o}),x="rtl"===i.options.direction,M=(r.isPrimary?c:f).query.getExtrema(),S=o.meta.isContinuous,E=function(e){return Du(e.end.value,M)};return{type:"point",key:Nu(ka.COMPONENT.POINT,r),data:{filter:function(e){return r.ref===e.end.source.field},collection:r.collection},preferredSize:function(){return{edgeBleed:{top:h?g.SIZE.DEFAULT/2:0}}},settings:(t={},Y(t,h?"y":"x",{scale:r.scale,ref:"end",fn:function(e){var t,n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}}),Y(t,h?"x":"y",{scale:ka.SCALE.MAJOR,fn:Cu({layoutService:o,seriesModel:s,rtl:x,orientation:p}),ref:"major"}),Y(t,"sizeLimits",{minPx:Vu,maxPx:Bu}),Y(t,"size",(function(e){var t=e.datum.line.value,n=l.query.point.getSize(t);return"".concat(n,"px")})),Y(t,"fill",y),Y(t,"opacity",(function(e){var t,n=e.datum,r=e.data;return null!==(t=n.null)&&void 0!==t&&t.value||E(n)?0:v?b({item:n,items:r.items})?1:0:m||b({item:n,items:r.items})?1:0})),t),brush:qu({layoutService:o,active:{r:function(e){return e.r+_u.POINT.SIZE.ACTIVE/2},strokeWidth:1.5,stroke:"#FFFFFF",opacity:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data))return 0;if(!S||m)return 1;var n=(null==d?void 0:d.getSelectionInfo())||{},r=n.event,i=void 0===r?void 0:r,o=n.components,a=void 0===o?[]:o;return"continuousRange"===i?0:"tap"!==i?1:[ka.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ka.COMPONENT.AXIS_OVERLAY.TIME_INNER,ka.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((function(e){return a.indexOf(e)>=0}))?0:1}},inactive:{opacity:function(e){return 1===e.opacity?.5:0}}})}}var Yu=function(e,t){var n,r=t.dataset;if(null!==(n=e.null)&&void 0!==n&&n.value)return"-";var i=e.end,o=i.value,a=i.label,s=i.source,u=r(s.key).field(s.field);return u.raw().isCustomFormatted?a:u.formatter()(o)};function Uu(e){var t=e.chart,n=e.models,r=e.environment,i=e.series,o=e.lineSeries,a=n.layoutService,s=n.dockService,u=n.themeService,l=n.primaryExtremumModel,c=n.secondaryExtremumModel,f=i.id,d="rtl"===r.options.direction,m=a.getLayoutValue("dataPoint");if(!m)return!1;if(!m.show||!m.showLineLabels)return!1;var p=(i.isPrimary?l:c).query.getExtrema(),h=u.getStyles();return{type:"point-label",key:"".concat(ka.COMPONENT.POINT_LABEL,"-").concat(f),layout:{displayOrder:2,minimumLayoutMode:hu.VALUE_LABEL},settings:{orientation:s.meta.major.orientation,rtl:d,itemSize:function(){},connect:i.options.showAsConnections,label:function(e){return Yu(e,t)},pointValue:function(e){return e.end.value},majorValue:function(e){return e.value},target:{labelSpace:ka.COMPONENT.LABEL_SPACE,point:"".concat(ka.COMPONENT.POINT,"-").concat(f),allPoints:o.map((function(e){return"".concat(ka.COMPONENT.POINT,"-").concat(e.id)}))},lineIndex:"typeIndex",showLabel:function(e){return!Du(e.data.end.value,p)}},style:{fontFamily:h.label.value.fontFamily,fontSize:h.label.value.fontSize,fill:h.label.value.color}}}var Wu=function(e){var t=e.chart,n=e.dock,r=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou)),i=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.PRIMARY)),o=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.SECONDARY));return r?n="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou):i?n="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.PRIMARY):o&&(n="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.SECONDARY)),n},Xu=function(e){var t=e.dockPosition,n=e.orientation,r=e.rtl,i=1;return t!=="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou)&&t!=="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.PRIMARY)&&t!=="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.SECONDARY)||!("horizontal"===n||"vertical"===n&&r)||(i=4),t!=="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Au)&&t!=="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Au,"-").concat(Ra.AXIS.PRIMARY)&&t!=="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Au,"-").concat(Ra.AXIS.SECONDARY)||"vertical"!==n||r||(i=4),i};function Gu(e){var t=e.chart,n=e.models,r=e.environment,i=e.lineSeries,o=n.layoutService,a=n.dockService,s=n.primaryExtremumModel,u=n.secondaryExtremumModel,l=o.getLayoutValue("dataPoint",{}),c="rtl"===r.options.direction;if(!i.length)return!1;if(!l.show||!l.showLineLabels)return!1;var f="horizontal"===a.meta.major.orientation;if("none"!==o.getLayoutValue("dimensionAxis",{}).show){var d=a.meta.major.dock;if(f&&"top"===d)return!1;if(!f&&d===(c?"left":"right"))return!1}var m=c?"left":"right";return{type:"label-space",key:ka.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:hu.LABEL_SPACE,dock:Wu({chart:t,dock:f?"top":m})},settings:{size:10},show:function(){var e=t.component("".concat(ka.COMPONENT.LINE,"-").concat(i[0].id));if(!e||!e.rect)return!1;var n=(f?17:34)/e.rect[f?"height":"width"],r=s.query.getExtrema(),o=t.scale(ka.SCALE.MINOR.PRIMARY)(r.implicit.line.max),a=f||c?o:1-o,l=i.filter((function(e){return e.isPrimary})).length>0,d=u.query.getExtrema(),m=t.scale(ka.SCALE.MINOR.SECONDARY)(d.implicit.line.max),p=f||c?m:1-m,h=i.filter((function(e){return!e.isPrimary})).length>0;return l&&a<n||h&&p<n}}}var Ku={min:"Min",max:"Max"};function $u(e,t,n){var r=n.meta.hasExplicitMax,i=n.explicit.max;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}function Ju(e,t,n){var r=n.meta.hasExplicitMin,i=n.explicit.min;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}function Zu(e,t,n){return $u(e,t,n)||Ju(e,t,n)}function Qu(e,t){var n=t.meta.hasExplicitMax,r=t.explicit.max;return!!n&&e>r&&r<=0}function el(e,t){var n=t.meta.hasExplicitMin,r=t.explicit.min;return!!n&&e<r&&r>=0}function tl(e,t){return Qu(e,t)||el(e,t)}function nl(e){var t=e.extrema,n=e.type;return!(function(e){var t=e.extrema,n=e.type;return!t.meta["hasExplicit".concat(Ku[n])]}({extrema:t,type:n})||function(e){var t=e.extrema,n=e.type,r=n===Ou?t.implicit.bar.max:t.implicit.bar.min,i=Number(r.toFixed(13));return n===Ou?!Qu(i,t):!el(i,t)}({extrema:t,type:n}))}var rl=Object.freeze({__proto__:null,isSegmentMaxOutOfBounds:$u,isSegmentMinOutOfBounds:Ju,isSegmentOutOfBounds:Zu,isMaxOutOfBounds:Qu,isMinOutOfBounds:el,isOutOfBounds:tl,shouldShowOob:nl}),il={min:"Min",max:"Max"},ol=function(e){var t=e.chart,n=e.models,r=e.markerSeries,i=e.lineSeries,o=e.barSeries,a=e.environment,s=e.type,u=n.dockService,l=n.primaryExtremumModel,c=n.secondaryExtremumModel,f=n.primaryTickModel,d=n.secondaryTickModel,m=n.layoutService,p=n.seriesModel,h=n.themeService,v=n.fieldModel,y="rtl"===a.options.direction,g=u.meta.major,b=g.dock,x=g.opposite,M=g.orientation,S=l.query.getExtrema(),E=c.query.getExtrema(),C=s===Ou,q=m.meta.isBarSeriesGrouped,O=function(e){var t=e.chart,n=e.type,r=e.opposite,i=e.dock,o=n===Ou?r:i,a=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n)),s=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY)),u=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.SECONDARY)),l=t.component(ka.COMPONENT.LABEL_SPACE),c=t.component("".concat(ka.COMPONENT.BAR_OOB,"-").concat(n)),f=t.component("".concat(ka.COMPONENT.BAR_OOB,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY)),d=t.component("".concat(ka.COMPONENT.BAR_OOB,"-").concat(n,"-").concat(Ra.AXIS.SECONDARY));return a?o="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n):s?o="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY):u?o="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.SECONDARY):c||f||d?l&&n===Ou?o="@".concat(ka.COMPONENT.LABEL_SPACE):c?o="@".concat(ka.COMPONENT.BAR_OOB,"-").concat(n):f?o="@".concat(ka.COMPONENT.BAR_OOB,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY):d&&(o="@".concat(ka.COMPONENT.BAR_OOB,"-").concat(n,"-").concat(Ra.AXIS.SECONDARY)):l&&n===Ou&&(o="@".concat(ka.COMPONENT.LABEL_SPACE)),o}({chart:t,type:s,opposite:x,dock:b}),A=Cu({layoutService:m,seriesModel:p,rtl:y,orientation:M}),D=i.concat(r);if(!D.length)return!1;var N=C?S.implicit.bar.max:S.implicit.bar.min,I=Number(N.toFixed(13));if(!q&&o.length&&rl["is".concat(il[s],"OutOfBounds")](I,S))return!1;if(!S.meta.hasExplicit&&!E.meta.hasExplicit)return!1;var T=C?"max":"min",w=Math[T](Number(S.implicit.line[T].toFixed(13)),Number(S.implicit.marker[T].toFixed(13))),L=Math[T](Number(E.implicit.line[T].toFixed(13)),Number(E.implicit.marker[T].toFixed(13))),k=D.filter((function(e){return e.isPrimary})),R=D.filter((function(e){return!e.isPrimary})),P=k.length>0,j=R.length>0,F=v.main,_=F.major,H=F.majorNumeric,V=function(e){return"NaN"!==e.qNum?e.qNum:0},B=m.meta.isContinuous?H:_;return{type:"data-out-of-bounds-marker",key:"".concat(ka.COMPONENT.DATA_OOB_MARKER,"-").concat(s),layout:{dock:O,minimumLayoutMode:hu.OUT_OF_BOUNDS_MARKER},data:{extract:D.map((function(e){var t=e.ref,n=e.typeIndex,r=e.options;return{field:_,value:m.meta.isContinuous?function(e){return e.qNum}:void 0,props:{major:{field:B},end:{field:t,value:r.showAsZeros?V:void 0},typeIndex:n,null:{field:t,value:function(e){return"NaN"===e.qNum}}}}}))},settings:{type:s,primaryExtremum:C?function(){return f.query.getMax()}:function(){return f.query.getMin()},secondaryExtremum:C?function(){return d.query.getMax()}:function(){return d.query.getMin()},primarySeries:k,secondarySeries:R,orientation:M,rtl:y,major:{scale:ka.SCALE.MAJOR,fn:A},markerOffset:Xu({dockPosition:O,orientation:M,rtl:y})},brush:qu({layoutService:m}),show:function(){if(C){if(P&&w>f.query.getMax())return!0;if(j&&L>d.query.getMax())return!0}if(!C){if(P&&w<f.query.getMin())return!0;if(j&&L<d.query.getMin())return!0}return!1},style:{fill:h.getStyles().outOfRange.color}}};function al(e){return(al="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}function sl(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function ul(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){sl(o,r,i,a,s,"next",e)}function s(e){sl(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ll(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cl(Object(n),!0).forEach((function(t){ll(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dl(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ml(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||hl(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pl(e){return function(e){if(Array.isArray(e))return vl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||hl(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 hl(e,t){if(e){if("string"==typeof e)return vl(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)?vl(e,t):void 0}}function vl(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 yl=Object.prototype.hasOwnProperty,gl=Object.prototype.toString,bl=Object.defineProperty,xl=Object.getOwnPropertyDescriptor,Ml=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===gl.call(e)},Sl=function(e){if(!e||"[object Object]"!==gl.call(e))return!1;var t,n=yl.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&yl.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||yl.call(e,t)},El=function(e,t){bl&&"__proto__"===t.name?bl(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Cl=function(e,t){if("__proto__"===t){if(!yl.call(e,t))return;if(xl)return xl(e,t).value}return e[t]},ql=function e(){var t,n,r,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),(null==s||"object"!=F(s)&&"function"!=typeof s)&&(s={});u<l;++u)if(null!=(t=arguments[u]))for(n in t)r=Cl(s,n),s!==(i=Cl(t,n))&&(c&&i&&(Sl(i)||(o=Ml(i)))?(o?(o=!1,a=r&&Ml(r)?r:[]):a=r&&Sl(r)?r:{},El(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&El(s,{name:n,newValue:i}));return s};function Ol(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",t);return r.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function Al(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",t);return r.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function Dl(e,t,n,r,i){var o,a=i.byRow,s=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(o=e.hc.qDataPages[0])||void 0===o?void 0:o.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var u=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,u)}return{}}function Nl(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Il(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function Tl(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function wl(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ll(){}var kl=1/.7,Rl="\\s*([+-]?\\d+)\\s*",Pl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",jl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fl=/^#([0-9a-f]{3,8})$/,_l=new RegExp("^rgb\\("+[Rl,Rl,Rl]+"\\)$"),Hl=new RegExp("^rgb\\("+[jl,jl,jl]+"\\)$"),Vl=new RegExp("^rgba\\("+[Rl,Rl,Rl,Pl]+"\\)$"),Bl=new RegExp("^rgba\\("+[jl,jl,jl,Pl]+"\\)$"),zl=new RegExp("^hsl\\("+[Pl,jl,jl]+"\\)$"),Yl=new RegExp("^hsla\\("+[Pl,jl,jl,Pl]+"\\)$"),Ul={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Wl(){return this.rgb().formatHex()}function Xl(){return this.rgb().formatRgb()}function Gl(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Fl.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Kl(t):3===n?new Ql(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?$l(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?$l(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=_l.exec(e))?new Ql(t[1],t[2],t[3],1):(t=Hl.exec(e))?new Ql(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Vl.exec(e))?$l(t[1],t[2],t[3],t[4]):(t=Bl.exec(e))?$l(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zl.exec(e))?rc(t[1],t[2]/100,t[3]/100,1):(t=Yl.exec(e))?rc(t[1],t[2]/100,t[3]/100,t[4]):Ul.hasOwnProperty(e)?Kl(Ul[e]):"transparent"===e?new Ql(NaN,NaN,NaN,0):null}function Kl(e){return new Ql(e>>16&255,e>>8&255,255&e,1)}function $l(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ql(e,t,n,r)}function Jl(e){return e instanceof Ll||(e=Gl(e)),e?new Ql((e=e.rgb()).r,e.g,e.b,e.opacity):new Ql}function Zl(e,t,n,r){return 1===arguments.length?Jl(e):new Ql(e,t,n,null==r?1:r)}function Ql(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ec(){return"#"+nc(this.r)+nc(this.g)+nc(this.b)}function tc(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function nc(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function rc(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new oc(e,t,n,r)}function ic(e){if(e instanceof oc)return new oc(e.h,e.s,e.l,e.opacity);if(e instanceof Ll||(e=Gl(e)),!e)return new oc;if(e instanceof oc)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new oc(a,s,u,e.opacity)}function oc(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ac(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function sc(e){return function(){return e}}function uc(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):sc(isNaN(e)?t:e)}Tl(Ll,Gl,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Wl,formatHex:Wl,formatHsl:function(){return ic(this).formatHsl()},formatRgb:Xl,toString:Xl}),Tl(Ql,Zl,wl(Ll,{brighter:function(e){return e=null==e?kl:Math.pow(kl,e),new Ql(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ql(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ec,formatHex:ec,formatRgb:tc,toString:tc})),Tl(oc,(function(e,t,n,r){return 1===arguments.length?ic(e):new oc(e,t,n,null==r?1:r)}),wl(Ll,{brighter:function(e){return e=null==e?kl:Math.pow(kl,e),new oc(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new oc(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ql(ac(e>=240?e-240:e+120,i,r),ac(e,i,r),ac(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var lc=function e(t){var n=function(e){return 1==(e=+e)?uc:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):sc(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Zl(e)).r,(t=Zl(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=uc(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),cc=/^class(-pyramid)?/,fc=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,s=o,u=t.limits,l={},c="percent"===t.limitType?u.map((function(e){return i+(o-i)*e})):u,f=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(pl(c))),o=Math.max.apply(Math,[o].concat(pl(c))),l.min=i,l.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))l.type="categorical",Object.assign(l,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){o.push(i[s]);break}}for(var u=0;u<r.length;u++)t<r[u]&&r[u]<n&&(a.push(r[u]),o.push(i[u]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var l=0;l<r.length;l++)if(r[l]>n){o.push(i[l]),o.push(i[l]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:f,limits:"percent"===t.limitType?c:u}));else if(t.breakTypes){var d=t.breakTypes;l.type="continuous",l.domain=[i],l.range=[f[0]];for(var m=0;m<c.length;m+=1)if(d[m]){var p=f[m],h=f[m+1],v=lc(p,h)(.5);l.range.push(v),l.domain.push(c[m]),m<c.length-1&&d[m+1]&&(l.range.push(f[m+1]),l.domain.push((c[m]+c[m+1])/2))}else l.range.push(f[m]),l.range.push(f[m+1]),l.domain.push(c[m]),l.domain.push(c[m]+Math.min(1e-6,(o-i)/1e6));l.range.push(f[f.length-1]),l.domain.push(o)}else l.domain=c,l.range=f;return l};function dc(e,t,n,r,i){var o,a,s,u=0,l=[],c=(e-t)/(r+1);if(0===c)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/c):n[o]<t?0:Math.floor(a/c),Number.isNaN(s)||(l[s]?l[s]+=1:l[s]=1);for(o=0;o<l.length;o+=1)l[o]&&(u+=1);return u<=r||u>=i?Math.max(u,r):dc(e,t,n,r+1,i)}var mc=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,u=r.f,l={mode:"field",fieldType:"measure",field:u?u.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],f=!0;if(u){if(Number.isNaN(+u.min())||Number.isNaN(+u.max()))return{invalid:!0};(f=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:u.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,pl(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(l.min=n.input.measureMin,l.max=n.input.measureMax,l.max<l.min)return{invalid:!0}}else if(u&&!f)l.min=u.min(),l.max=u.max();else if(u){if(!c.length)return{invalid:!0};l.min=Math.min.apply(Math,pl(c)),l.max=Math.max.apply(Math,pl(c))}if(n.input.measureScheme&&(l.palettes={quant:n.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];l.type=d&&cc.test(d.type)?"categorical":"continuous","categorical"===l.type&&(o=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,pl(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===l.type){for(var m=f?dc(l.max,l.min,c,1,o):o,p=(l.max-l.min)/m,h=[],v=0;v<m+1;v+=1)h.push(l.min+p*v);l.domain=h,l.range=function(e){for(var t=e.resources.theme.palette("quant",m),n=Math.max(1,Math.floor(t.length/m)),r=[],i=0;i<m;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return l};function pc(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function hc(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function vc(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(o);-1===s?(n.push(o),r.push(a.primary)):r[s]=a.primary,e[o]=null}else if(a){i.push(o);var u=n.indexOf(o);-1!==u&&(n.splice(u,1),r.splice(u,1))}}return{domain:n,range:r,exclude:i}}function yc(e,t,n,r){var i=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?pc:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},u=a(n,s),l=mc(0,{theme:r,hc:i},n,{f:u});if(l.invalid)return l;("expression"===s.type||s.activeMeasureIndex<0)&&(l.label=s.label,u&&"color.altLabel"===u.raw().labelExpRef&&(l.label=n.input.altLabel)),!l.label&&u&&(l.label=u.title());var c=s.activeMeasureIndex>=0?u:null;if(!c&&u&&void 0!==u.raw().matchMeasure&&u.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[u.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var f=c.raw().coloring;f&&f.gradient&&ql(l,fc(e,f.gradient,l,c))}else l.auxiliary=s;return l}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?Nl:i,a=r.getCByField,s=void 0===a?Il:a,u=r.getPersistence,l=void 0===u?Dl:u,c=o(t,n),f=s(n,c),d=f?f.raw():{},m=n&&n.pic?n.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!m.qHasOtherValues)return{invalid:!0};var p={mode:"field",fieldType:"dimension",type:"categorical",field:f?f.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(p.label=c.label,"color.altLabel"===d.labelExpRef&&(p.label=n.input.altLabel)),!p.label&&f&&(p.label=f.title()),n.input.dimensionScheme&&(p.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(p.auxiliary=c),ql(p,l(t,n,c,f,{byRow:Al,byElemNo:Ol})),p}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var u=mc(0,{hc:i,theme:o},n,{f:s});return u.invalid||(u.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),u}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var u=[],l=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){u.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?l.push(r.primary):l.push(i)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,f=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&f&&(c={categorical:f.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:u.length?{domain:u,range:l}:void 0}}if("dimension"===s){var d=[],m=[];return i.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?m.push(r.primary):m.push(i)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:m}:void 0}}var p=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(p=e.resolveUIColor(n.input.paletteColor));else{var h=n.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(p=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:p}}(e,n,t,r)}return{}}(e,t,n,r);return t.input.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),fl(fl({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),o=i;return fl(fl({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})})),function(e,t){var n,r,i,o=t.translator;if(hc(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=vc(e.measureOverrides,e.explicit),hc(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=vc(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function gc(e){var t=fl({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(ql(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=ql(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(n.input=ql(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=e.auxiliary||{},o=i.key;if("measure"===e.fieldType)return r.getMeasure(o,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),o?r.getDimensionColorMap(o,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return fc(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],u=r[1]?r[1].colorMap:null;if(s){var l=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=l}return u?function(e,t,n,r){var i=r.external,o=r.field,a=fl({},e);ql(a,Ol(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,ql(a,Ol(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),ql(a,Ol(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var u=i.items[s],l=(u.text||u).label;r[l]&&-1===a.indexOf(u.value)&&(a.push(u.value),o.push(t.resolveUIColor(r[l])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,u,i,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=fl(fl({},e),r.getDataColorSpecials())),n.settings=ql(e,yc(this,n,t,e))}return n.settings}};return i}var bc=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},xc=function(e){throw e.isHandled=!0,e},Mc=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},Sc=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},Ec=function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(xc):Promise.reject()};function Cc(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}function qc(e){return function(t){return"object"===al(t.datum[e])?t.datum[e].value:void 0}}function Oc(e){return"object"===al(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Ac(e){return-3===e.datum.value}var Dc=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},Nc=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Ic(e,t){var n=e.styleReference,r=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,s=t.theme,u=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Dc(o,r,i)},show:"function"==typeof o.show?function(){return Nc(o,u,a)}:Nc(o,u,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==o.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function Tc(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Ic(e,t);if(!r.show)return!1;var i=e.key,o=e.styleReference,a=e.viewState,s=e.rtl,u=e.settings,l=e.style,c=t.scaleKey,f=t.theme,d=t.scales,m={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"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",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"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"},p="".concat(c,"Legend");return ql(!0,r,{type:"legend-cat",key:"".concat(i,"-cat"),scale:p in d?p:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:f?f.getStyle(o,"legend.label","color"):void 0,fontSize:f?f.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:f?f.getStyle(o,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:m[n]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:u,style:l})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,i=e.rtl,o=e.settings,a=e.style,s=t.scaleKey,u=t.theme,l=Ic(e,t);return!!l.show&&ql(!0,l,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:u?u.getStyle(r,"legend.label","color"):void 0,fontSize:u?u.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:u?u.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!i||"top"!==l.layout.dock&&"bottom"!==l.layout.dock?void 0:"right",padding:parseFloat(l.settings.title.fontSize)||16}}},{settings:o,style:a})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,i=t.requireFailure,o=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var i;return this.started===n||!t||!(null!=a&&null!==(i=a.interact)&&void 0!==i&&i.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},ll(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),ll(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),ll(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:i,components:r}}var wc=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function Lc(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=gc(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return Mc(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return Sc(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,i=t.app;return Ec(e,{layout:n,model:r,app:i})}));return n.getSnapshotData=bc,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=fl({},i),r={},!n.key)throw new Error("Missing key");t.set(fl(fl({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=fl(fl({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,u=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(u){var l=u.colors[0]?u.colors:[[]].concat(pl(u.colors.slice(1)));l=Array.isArray(l[0])?l.map((function(e){return e.slice().reverse()})):l.slice().reverse(),i.push({key:"quant",colors:l})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},u=i;if(n){var l={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(pl((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(pl((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,f=Cc({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var d=0,m={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return m[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return m[e.qElemNumber]}}}}}}var p={data:f,range:n.range,domain:n.domain,explicit:l,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[u]=p,c&&(s["".concat(u,"Legend")]=fl(fl({},p),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||p.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var h={data:{field:n.field},min:n.min,max:n.max};s[u]=ql({},h,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[u].type&&(s["".concat(u,"Range")]=ql({},h,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var v={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};s[u]=v}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};s[u]=y}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=qc(r),o=qc("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,u=e.nil,l=e.others,c=e.primary,f=e.type;return a?function(e){return Ac(e)||o(e)?l:u}:n[t]?function(e){return Ac(e)?l:Oc(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?u:o(e)?l:e.resources.scale(t)(i(e))||l}:"constant"===s?function(e){return Ac(e)||o(e)?l:Oc(e)?u:c}:"color"===f?function(e){return Ac(e)||o(e)?l:Oc(e)?u:i(e)||l}:null},s=a(t,r);if(t.measureOverrides){var u=qc("".concat(r,"MeasureIdx")),l=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=u(e);return l[t]?l[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,l=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?wc(e.qNum):e.qText&&Gl(e.qText)?e.qText:c})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=u);var f=ll({},l,n);return r.qDimensionInfo.length>1&&(f["".concat(l,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(f["".concat(l,"MeasureIdx")]=u),f}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,s=e.rtl,u=e.styleReference,l=void 0===u?"object.legend":u,c=e.settings,f=void 0===c?{}:c,d=e.style,m=void 0===d?{}:d,p=arguments.length>1?arguments[1]:void 0;return Tc({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:l,settings:f,style:m},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},p)}};return o}var kc=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Rc(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(kc),o=r.some(kc),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function Pc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=fl(fl(fl({},e),t),{},{colorProps:fl(fl({},e.colorProps),t.colorProps||{})});return n}var jc=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Fc(e){var t,n=e.qHyperCube.qDimensionInfo.some(jc),r=e.qHyperCube.qMeasureInfo.some(jc),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var _c=function(){};function Hc(e){var t=e.chart,n=e.logicalSize;if(n)return n;var r=t?t.element.getBoundingClientRect():{};return{width:r.width,height:r.height}}var Vc=[{key:"FULL",size:{width:550,height:450}},{key:"MEDIUM",size:{width:400,height:220}},{key:"SMALL",size:{width:300,height:150}},{key:"XSMALL",size:{width:150,height:75}}];function Bc(e){var t=e.width,n=e.height,r=Vc.filter((function(e){return t>=e.size.width&&n>=e.size.height})).shift();return r?r.key:"SPARK"}var zc={left:"right",right:"left",top:"bottom",bottom:"top",near:"far",far:"near"};function Yc(e){var t=e.orientation,n=e.dock,r=e.btt,i=e.rtl,o="horizontal"===t?function(e){return"bottom"===e||"near"===e?"bottom":"top"}(n):function(e,t){var n="left"===e||"near"===e?"left":"right";return t?zc[n]:n}(n,i),a=function(e,t,n){return"vertical"===e?t?"bottom":"top":n?"right":"left"}(t,r,i);return{current:o,opposite:zc[o],start:a,end:zc[a]}}function Uc(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=i.logicalSize,a=void 0!==o&&o,s=i.rtl,u=void 0!==s&&s,l={chart:{size:void 0,mode:void 0},x:{dock:void 0,opposite:void 0,size:void 0},y:{dock:void 0,opposite:void 0,size:void 0}},c={type:"x-y",meta:l,update:function(e){l.chart.size={width:e.width,height:e.height},l.chart.mode=Bc(e);var t=Yc({orientation:"horizontal",dock:n.getLayoutValue("xAxis.dock"),btt:!1,rtl:u}),r=t.current,i=t.opposite;l.x.dock=r,l.x.opposite=i,l.x.size=e.width;var o=Yc({orientation:"vertical",dock:n.getLayoutValue("yAxis.dock"),btt:!0,rtl:u}),a=o.current,s=o.opposite;l.y.dock=a,l.y.opposite=s,l.y.size=e.height}};return c.update(Hc({chart:t,logicalSize:a})),c}var Wc="vertical",Xc="horizontal";function Gc(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o,s=i.logicalSize,u=void 0!==s&&s,l=i.rtl,c=void 0!==l&&l,f=a.fallback===Wc?Wc:Xc,d=!!a.invert,m=a.measureAxes||[{ref:"measureAxis",name:"minor"}],p={chart:{orientation:void 0,size:void 0,mode:void 0},major:{orientation:void 0,dock:void 0,opposite:void 0,size:void 0}},h={type:"major-minor",meta:p,update:function(e){p.chart.orientation=n.getLayoutValue("orientation",f),p.chart.size={width:e.width,height:e.height},p.chart.mode=Bc(e),p.major.orientation=function(e){var t=e.chartOrientation,n=e.invert;return e.layoutService.meta.isContinuous?Xc:n?t===Wc?Xc:Wc:t}({layoutService:n,chartOrientation:p.chart.orientation,invert:d});var t=Yc({orientation:p.major.orientation,dock:n.getLayoutValue("dimensionAxis.dock"),btt:!1,rtl:c}),r=t.current,i=t.opposite;p.major.dock=r,p.major.opposite=i,p.major.size=p.major.orientation===Wc?e.height:e.width,m.forEach((function(t){var r={};r.orientation=p.major.orientation===Wc?Xc:Wc;var i=Yc({orientation:r.orientation,dock:n.getLayoutValue("".concat(t.ref,".dock")),btt:!0,rtl:c}),o=i.current,a=i.opposite,s=i.start,u=i.end;r.dock=o,r.opposite=a,r.start=s,r.end=u,r.size=r.orientation===Wc?e.height:e.width,p[t.name]=r}))}};return h.update(Hc({chart:t,logicalSize:u})),h}function Kc(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o;return("x-y"===a.type?Uc:Gc)({chart:t,layoutService:n,config:i,typeConfig:a})}function $c(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}function Jc(e,t,n){if(void 0!==e&&void 0!==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]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}function Zc(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function Qc(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){return e.apply(r,o)};clearTimeout(t),t=setTimeout(s,n)}}function ef(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];n=s;var l=Date.now()-o,c=function(){o=Date.now(),r=0,e.apply(t,n)};r||(l>=i?c():r=setTimeout(c,i-l))}}function tf(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[]).map((function(e){var t,n=null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal;if(n)return n;var r=e.qStateCounts||{},i=r.qLocked,o=void 0===i?0:i,a=r.qOption,s=void 0===a?0:a,u=r.qSelected;return o+s+(void 0===u?0:u)}))}function nf(e){switch(e.qHyperCube.qMode){case"S":return function(e){var t=e.qHyperCube.qSize;return{refs:{dataPages:"qHyperCube.qDataPages"},size:{x:t.qcx,y:t.qcy,dimensions:tf(e)}}}(e);case"K":return function(e){var t=tf(e);return{refs:{dataPages:"qHyperCube.qStackedDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);case"T":return function(e){var t=tf(e);return{refs:{dataPages:"qHyperCube.qTreeDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);default:throw new Error("Mode not supported")}}function rf(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n})),n>-1?t[n]=e:t.push(e)})),t):n}function of(e){return(of="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}function af(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sf(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)}}function uf(e,t,n){return t&&sf(e.prototype,t),n&&sf(e,n),e}function lf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ff(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cf(Object(n),!0).forEach((function(t){lf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function df(e,t){return(df=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mf(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function pf(e,t,n){return(pf=mf()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&df(i,n.prototype),i}).apply(null,arguments)}function hf(e){return function(e){if(Array.isArray(e))return yf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||vf(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 vf(e,t){if(e){if("string"==typeof e)return yf(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)?yf(e,t):void 0}}function yf(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 gf=Object.prototype.hasOwnProperty,bf=Object.prototype.toString,xf=Object.defineProperty,Mf=Object.getOwnPropertyDescriptor,Sf=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===bf.call(e)},Ef=function(e){if(!e||"[object Object]"!==bf.call(e))return!1;var t,n=gf.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&gf.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||gf.call(e,t)},Cf=function(e,t){xf&&"__proto__"===t.name?xf(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},qf=function(e,t){if("__proto__"===t){if(!gf.call(e,t))return;if(Mf)return Mf(e,t).value}return e[t]},Of=function e(){var t,n,r,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),(null==s||"object"!=F(s)&&"function"!=typeof s)&&(s={});u<l;++u)if(null!=(t=arguments[u]))for(n in t)r=qf(s,n),s!==(i=qf(t,n))&&(c&&i&&(Ef(i)||(o=Sf(i)))?(o?(o=!1,a=r&&Sf(r)?r:[]):a=r&&Ef(r)?r:{},Cf(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&Cf(s,{name:n,newValue:i}));return s};function Af(e,t,n){if(!e)return-1;var r=n.cache,i=e.origin?e.origin():null;i&&(e=i);var o=r.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var u=0;u<r.wrappedFields.length;u++)if(s=r.wrappedFields[u].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[u].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=u;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function Df(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Nf(e){var t=e.cache,n=e.f,r=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,u=e.sourceKey,l=e.target,c=e.targetProp,f=r;if(i.field&&i.field!==n){var d=Af(i.field,o,{cache:t});if(-1===d)return;f=Of({qRow:a},d(s))}l[c]=Df(i,f,{key:u})}function If(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var s=t.raw(),u=t.key(),l="object"===of(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,d=c.main,m=Object.keys(f),p=!!i[a].trackBy,h=of(i[a].trackBy),v={},y=[],g=[],b=0;b<s.qDataPages.length;b++){var x=Af(l,s.qDataPages[b],{cache:n});if(-1!==x)for(var M=0;M<s.qDataPages[b].qMatrix.length;M++){var S=s.qDataPages[b].qArea.qTop+M,E=Of({qRow:S},x(s.qDataPages[b].qMatrix[M])),C=Df(d,E,{key:u});if(!d.filter||d.filter(E)){for(var q=0;q<m.length;q++){var O=f[m[q]],A=O.fields||[O];O.fields&&(C[m[q]]=[]);for(var D=0;D<A.length;D++)Nf({cache:n,f:l,mainCell:E,p:A[D],prop:m[q],props:f,page:s.qDataPages[b],rowIdx:S,row:s.qDataPages[b].qMatrix[M],sourceKey:u,target:O.fields?C[m[q]]:C,targetProp:O.fields?D:m[q]});if(O.fields){var N=C[m[q]].map((function(e){return e.value})),I=C[m[q]].map((function(e){return e.label}));C[m[q]]={value:"function"==typeof O.value?O.value(N):void 0!==O.value?O.value:N,label:"function"==typeof O.label?O.label(I):void 0!==O.label?String(O.label):String(C[m[q]].value)}}}p&&r.track({cfg:i[a],itemData:E,obj:C,target:y,tracker:v,trackType:h}),g.push(C)}}}p?o.push.apply(o,hf(r.collect(y,{main:d,propsArr:m,props:f}))):o.push.apply(o,g)}return o}function Tf(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function wf(e,t){var n,r,i,o,a,s=new Pf(e),u=+e.value&&(s.value=e.value),l=[s];for(null==t&&(t=Lf);n=l.pop();)if(u&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Pf(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Rf)}function Lf(e){return e.children}function kf(e){e.data=e.data.data}function Rf(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Pf(e){this.data=e,this.depth=this.height=0,this.parent=null}function jf(e){if("function"!=typeof e)throw new Error;return e}Pf.prototype=wf.prototype={constructor:Pf,count:function(){return this.eachAfter(Tf)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return wf(this).eachBefore(kf)}};var Ff={depth:-1},_f={};function Hf(e){return e.id}function Vf(e){return e.parentId}function Bf(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),i=t,o=0;o<r.length;o++){if("*"===r[o]&&Array.isArray(i)){var a=[];n=r.slice(o+1).join("/");for(var s=0;s<i.length;s++){var u=Bf(n,i[s]);Array.isArray(u)?a.push.apply(a,hf(u)):a.push(u)}return a}if(!r[o]&&Array.isArray(i)){var l=new Array(i.length);n=r.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=Bf(n,i[c]);return l}r[o]in i&&(i=i[r[o]])}return i}function zf(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var i=n>=0?[e[n]]:e;r.push.apply(r,hf(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,hf(zf(e[o].children,t-1,n)));return r}function Yf(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),i=hf(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(i,";"))}if(t>e){var o=Math.max(0,Math.min(100,t-e));return function(e){return zf(e.children,o-1,n)}}return!1}function Uf(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var i=0;i<r.length;i++)if(e(r[i]))return r[i];return!1}if("string"==typeof e){for(var o=0;o<r.length;o++)if(r[o].key()===e||r[o].title()===e)return r[o]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var Wf=/^qDimensionInfo(?:\/(\d+))?/,Xf=/^\/?qMeasureInfo\/(\d+)/,Gf=/\/qAttrExprInfo\/(\d+)/,Kf=/\/qAttrDimInfo\/(\d+)/;function $f(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function Jf(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,u=-1,l=-1,c=r,f=n.qEffectiveInterColumnSortOrder,d=$f(n);return Wf.test(c)&&(i=!0,o=+Wf.exec(c)[1],c=r.replace(Wf,"")),Xf.test(c)&&("K"===n.qMode?u=+Xf.exec(c)[1]:f&&-1!==f.indexOf(-1)?(u=+Xf.exec(c)[1],l=0):l=+Xf.exec(c)[1],c=c.replace(Xf,"")),c&&(Kf.exec(c)?s=+Kf.exec(c)[1]:Gf.exec(c)&&(a=+Gf.exec(c)[1])),{fieldDepth:(i?"S"===n.qMode?d[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:u,measureIdx:l,attrDimIdx:s,attrIdx:a}}function Zf(e,t){var n,r,i=Yf(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function Qf(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function ed(e){for(var t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var u=n[t[s]],l=u.fields||[u],c=void 0,f=void 0;u.fields&&(c=[],f=[]);for(var d=function(e){var n=l[e],d=void 0,m=void 0,p=void 0,h=void 0,v=void 0,y=void 0;if("primitive"===n.type?(p=n.value,y=String(n.value)):("function"==typeof n.value&&(d=function(e){return n.value(e,r)}),"function"==typeof n.label&&(m=function(e){return n.label(e,r)}),n.accessor?(h=n.accessor(r),Array.isArray(h)?(v=h.map(n.valueAccessor),n.attrAccessor&&(v=v.map(n.attrAccessor)),d&&(p=v.map(d),d=null),m&&(y=v.map(m),m=null),p=n.reduce?n.reduce(p):p,y=n.reduceLabel?n.reduceLabel(y,p):String(p)):y=p=n.attrAccessor?n.attrAccessor(n.valueAccessor(h)):n.valueAccessor(h)):(p=i,y=i)),u.fields){var g=d?d(p):p;c.push(g),f.push(m&&null!=y?m(y):null!=y?y:String(g))}else{var b=d?d(p):p;o[t[s]]={value:b,label:m?m(y):null!=y?y:String(b)},n.field&&(o[t[s]].source={field:n.field.key(),key:a})}},m=0;m<l.length;m++)d(m);c&&(o[t[s]]={value:"function"==typeof u.value?u.value(c,r):c,label:"function"==typeof u.label?u.label(f,r):f})}}var td=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Bf(r,e);return o&&o[0]?(t.tree=wf(o[0],n.children||function(e){return e[i]}),t.tree):null};function nd(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var u=t[s],l="__root",c=!1,f=0;f<i.length;f++){var d=u[i[f]],m="".concat(l,"__").concat(d.qText);a[m]||(a[m]=ff({__id:m,__parent:l,qValues:[]},d),c=!0),l=m}if(c)for(var p=0;p<o.length;p++){var h=u[o[p]];a[l].qValues.push(h)}}var v=Object.keys(a).map((function(e){return a[e]}));return function(){var e=Hf,t=Vf;function n(n){var r,i,o,a,s,u,l,c=n.length,f=new Array(c),d={};for(i=0;i<c;++i)r=n[i],s=f[i]=new Pf(r),null!=(u=e(r,i,n))&&(u+="")&&(d[l="$"+(s.id=u)]=l in d?_f:s);for(i=0;i<c;++i)if(s=f[i],null!=(u=t(n[i],i,n))&&(u+="")){if(!(a=d["$"+u]))throw new Error("missing: "+u);if(a===_f)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=Ff,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Rf),o.parent=null,c>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=jf(t),n):e},n.parentId=function(e){return arguments.length?(t=jf(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(v)}var rd=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var u=n[t[s]],l=u.fields?u.fields:[u],c=0;c<l.length;c++){var f=l[c];if(f.field!==a){var d=Zf(o,Jf(f.field,{cube:r,cache:i}));f.accessor=d.nodeFn,f.valueAccessor=d.valueFn,f.attrAccessor=d.attrFn}}};function id(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t.raw(),o=t.key(),a="S"===i.qMode?nd(t):td(i,n,e);if(!a)return null;for(var s=a.height,u=[],l=0;l<=s;l++){var c=null;if(l>0)if("S"===i.qMode){var f=$f(i),d=f[l-1];c=n.fields[d]}else{var m=i.qEffectiveInterColumnSortOrder[l-1];l>i.qEffectiveInterColumnSortOrder.length&&(m=i.qDimensionInfo.length),c=n.fields[m]}var p=r.normalizeConfig(ff(ff({},e),{},{field:c?c.key():void 0}),t),h=p.props,v=p.main,y=Object.keys(h);u[l]={propsArr:y,props:h,main:v};var g=c?Jf(c,{cube:i,cache:n}):{fieldDepth:0};rd({propsArr:y,props:h,cube:i,cache:n,itemDepthObject:g,f:c})}for(var b=a.copy(),x=b.descendants(),M=a.descendants(),S=0;S<M.length;S++){var E=u[M[S].depth].propsArr,C=u[M[S].depth].props,q=u[M[S].depth].main,O=x[S],A=O.data,D=Qf(q,A,{key:o});ed({propsArr:E,props:C,item:O,itemData:A,ret:D,sourceKey:o,isTree:!0}),M[S].data=D}return a}function od(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var s=t.raw(),u=t.key();if(!td(s,n,e))continue;var l="object"===of(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,d=c.main,m=Object.keys(f),p=Jf(l,{cube:s,cache:n}),h=Zf({fieldDepth:0},p),v=h.nodeFn,y=h.attrFn,g=h.valueFn;rd({propsArr:m,props:f,cube:s,cache:n,itemDepthObject:p,f:l});for(var b=!!i[a].trackBy,x=of(i[a].trackBy),M={},S=[],E=v(n.tree),C=[],q=0;q<E.length;q++){var O=E[q],A=y?y(g(O)):g(O);if(!d.filter||d.filter(A)){var D=Qf(d,A,{key:u});ed({propsArr:m,props:f,item:O,itemData:A,ret:D,sourceKey:u}),b&&r.track({cfg:i[a],itemData:A,obj:D,target:S,tracker:M,trackType:x}),C.push(D)}}b?o.push.apply(o,hf(r.collect(S,{main:d,propsArr:m,props:f}))):o.push.apply(o,C)}return o}var ad,sd=(function(e){
7
+ import{useElement as e,useState as t,useEffect as r,useRect as n,usePromise as i,useStaleLayout as o,useModel as a,useApp as s,useAppLayout as l,usePlugins as u,useOptions as c,useTranslator as d,useEmbed as m,useTheme as f,useDeviceType as p,useConstraints as h,useLayout as y,useAction as g,useSelections as v,onTakeSnapshot as b,useImperativeHandle as x}from"@nebula.js/stardust";import M from"hammerjs";import S from"picasso.js";import E from"picasso-plugin-q";import C from"picasso-plugin-hammer";import q from"react";import{Button as O,Popover as A,List as D,ListItem as N,ListItemIcon as T,ListItemText as I}from"@material-ui/core";import w from"react-dom";import{createGenerateClassName as L,StylesProvider as R,ThemeProvider as k}from"@material-ui/styles";function P(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var j=Object.prototype.hasOwnProperty,F=Object.prototype.toString,V=Object.defineProperty,_=Object.getOwnPropertyDescriptor,B=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===F.call(e)},H=function(e){if(!e||"[object Object]"!==F.call(e))return!1;var t,r=j.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&j.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||j.call(e,t)},$=function(e,t){V&&"__proto__"===t.name?V(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},z=function(e,t){if("__proto__"===t){if(!j.call(e,t))return;if(_)return _(e,t).value}return e[t]},U=function e(){var t,r,n,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=z(s,r),s!==(i=z(t,r))&&(c&&i&&(H(i)||(o=B(i)))?(o?(o=!1,a=n&&B(n)?n:[]):a=n&&H(n)?n:{},$(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&$(s,{name:r,newValue:i}));return s};const Y="center",W="bottom";var G={NoDataExist:{label:"NoDataExist",alignment:Y,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:Y,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:Y,default:!1},LimitedData:{label:"LimitedData",alignment:W,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:W,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:W,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:W,default:!1}};const K=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],X={};K.forEach((([e,{width:t,height:r}])=>{X[e]={width:t,height:r}}));const J={getLayoutModes:()=>X,getLayoutMode(e,t){let r;for(r=0;r<K.length;++r)if(e>=K[r][1].width&&t>=K[r][1].height)return K[r][0];return"SPARK"}};const Z=["$date","$timestamp","$time"],Q=["D","TS","T"],ee={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>Z.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&Q.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(ee.hasTimeTag(t)&&ee.hasUnknownFormat(t)||ee.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&ee.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous:e=>!(!(e&&e.qHyperCube&&e.qHyperCube.qDimensionInfo)||e.qHyperCube.qDimensionInfo.length<1)&&ee.canBeContinuousDimension(e.qHyperCube.qDimensionInfo[0]),maxNumberOfLines:12},te=(e,t,r)=>{const n=t.split(".");let i,o=e;if(void 0===o)return r;for(i=0;i<n.length;++i){if(void 0===o[n[i]])return r;o=o[n[i]]}return o},re=e=>te(e,"qHyperCube.qDimensionInfo",[]),ne=e=>te(e,"qHyperCube.qMeasureInfo",[]),ie=e=>te(e,"barGrouping.grouping"),oe={continuous:(e,t=!1)=>!!ee.canBeContinuous(e)&&(te(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!re(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===ie(e)&&(re(e).length>1||ne(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&re(e).length>1&&1===ne(e).length},groupedByMeasure(e){return this.grouped(e)&&1===re(e).length&&ne(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==ie(e)||this.continuous(e))&&(re(e).length>1||ne(e).length>1)},stackedByDimension(e){return this.stacked(e)&&re(e).length>1&&1===ne(e).length},stackedByMeasure(e){return this.stacked(e)&&1===re(e).length&&ne(e).length>1},simple:e=>0===re(e).length||1===re(e).length&&1===ne(e).length,snapshot:e=>!!te(e,"snapshotData")};function ae(e,t){const r=e.component(t);return r&&r._DO_NOT_USE_getInfo&&r._DO_NOT_USE_getInfo().offset}const se=e=>{throw e.isHandled=!0,e};const le={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":return"far";case"far":return"near";default:return"far"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,r)=>"vertical"===e||"y"===e?le.getVerticalDock(t):r?le.getOppositeDock(le.getHorizontalDock(t)):le.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment(e,t){switch(e){case"vertical":return"near"===t||"bottom"===t?1:0;default:return"near"===t||"left"===t?0:1}},getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:r})=>"vertical"===e?t:r},ue={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),r=e.match(/[\u3040-\u309F]/g),n=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,r=r?r.length:0,n=n?n.length:0;const i=t+r+n;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,r="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const n={latin:0,cjk:0};let i;void 0===t?e.forEach((e=>{i=ue.getCharacterRatios(e[r]),n.latin+=i.latin,n.cjk+=i.cjk})):e.forEach((e=>{i=ue.getCharacterRatios(e[t][r]),n.latin+=i.latin,n.cjk+=i.cjk}));const o=Math.max(1,n.latin+n.cjk);return n.latinRatio=n.latin/o,n.cjkRatio=n.cjk/o,n},getAdjustedMaxGlyphCount(e,t,r,n="qText"){const i=ue.getTotalCharacterRatios(t,r,n),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(ue.stringWidthOverMWidth(o)+1.0909090909090908*a)}};function ce(){if(!document.querySelector("#la-vie-tooltip")){const e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function de({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){ce()},beforeUpdate(){ce()},destroyed(){!function(){const e=document.querySelector("#la-vie-tooltip");e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector("#la-vie-tooltip"),content:({h:e,data:t,style:r})=>t[0].map((t=>e("tr",{},function(e,{h:t,style:r}){return e.map((e=>{const n={style:{...r.cell||{},...e.style||{}},class:e.class};return e.colspan&&(n.colspan=e.colspan),t("td",n,e.content)}))}(t,{h:e,style:r})))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const me=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),fe=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),pe=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),he={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>me.test(e),isRtlChar:e=>fe.test(e)||pe.test(e),detectTextDirection(e){const t=e?e.length:0;let r,n;for(r=0;r<t;r++){if(n=e[r],he.isLtrChar(n))return"ltr";if(he.isRtlChar(n))return"rtl"}return"ltr"}},ye={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,r){const n=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(r.coloring.label&&(a.label=""+r.coloring.label),"color"!==r.coloring.type&&n.fillTooltip){const e=i("fill"),t="measure"===r.coloring.fieldType;if(a.value=t&&e?e(n.fillTooltip.value):n.fillTooltip.label?n.fillTooltip.label:n.fillTooltip.value,!r.coloring.label){const e=o(n.fillTooltip.source.key).field(n.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===n._fillColor?ye.getNodeFillColor(t):n._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const r=he.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:r},colspan:2},{}]},getDescriptionRow(e,t){const r=he.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:r},colspan:2},{}]},getNMoreRow(e,t,r){const n=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:n,style:{"font-weight":"bold","text-align":r?"right":"left",direction:he.detectTextDirection(n)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,r){const n=he.detectTextDirection(t.color.label),i=r?[":",t.color.label]:[t.color.label,":"],o=he.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":r?"right":"left",direction:n}},{content:r?[t.color.value,ye.getColorSymbol(e,t)]:[ye.getColorSymbol(e,t),t.color.value],style:{"text-align":r?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,r,n,i=!1){const o=he.detectTextDirection(e.label),a=n?[":",e.label]:[e.label,":"],s=he.detectTextDirection(e.value);let l;return l=i?n?[e.value,ye.getColorSymbol(t,r)]:[ye.getColorSymbol(t,r),e.value]:[e.value],[{content:a,style:{"text-align":n?"right":"left",direction:o}},{content:l,style:{"text-align":n?"left":"right",direction:s,"vertical-align":"middle"}}]}};function ge(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ve(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function be(){}var xe=1/.7,Me="\\s*([+-]?\\d+)\\s*",Se="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ce=/^#([0-9a-f]{3,8})$/,qe=new RegExp("^rgb\\("+[Me,Me,Me]+"\\)$"),Oe=new RegExp("^rgb\\("+[Ee,Ee,Ee]+"\\)$"),Ae=new RegExp("^rgba\\("+[Me,Me,Me,Se]+"\\)$"),De=new RegExp("^rgba\\("+[Ee,Ee,Ee,Se]+"\\)$"),Ne=new RegExp("^hsl\\("+[Se,Ee,Ee]+"\\)$"),Te=new RegExp("^hsla\\("+[Se,Ee,Ee,Se]+"\\)$"),Ie={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function we(){return this.rgb().formatHex()}function Le(){return this.rgb().formatRgb()}function Re(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ce.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?ke(t):3===r?new Ve(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Pe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Pe(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=qe.exec(e))?new Ve(t[1],t[2],t[3],1):(t=Oe.exec(e))?new Ve(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ae.exec(e))?Pe(t[1],t[2],t[3],t[4]):(t=De.exec(e))?Pe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ne.exec(e))?$e(t[1],t[2]/100,t[3]/100,1):(t=Te.exec(e))?$e(t[1],t[2]/100,t[3]/100,t[4]):Ie.hasOwnProperty(e)?ke(Ie[e]):"transparent"===e?new Ve(NaN,NaN,NaN,0):null}function ke(e){return new Ve(e>>16&255,e>>8&255,255&e,1)}function Pe(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ve(e,t,r,n)}function je(e){return e instanceof be||(e=Re(e)),e?new Ve((e=e.rgb()).r,e.g,e.b,e.opacity):new Ve}function Fe(e,t,r,n){return 1===arguments.length?je(e):new Ve(e,t,r,null==n?1:n)}function Ve(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function _e(){return"#"+He(this.r)+He(this.g)+He(this.b)}function Be(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function He(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function $e(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ue(e,t,r,n)}function ze(e){if(e instanceof Ue)return new Ue(e.h,e.s,e.l,e.opacity);if(e instanceof be||(e=Re(e)),!e)return new Ue;if(e instanceof Ue)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ue(a,s,l,e.opacity)}function Ue(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Ye(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}ge(be,Re,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:we,formatHex:we,formatHsl:function(){return ze(this).formatHsl()},formatRgb:Le,toString:Le}),ge(Ve,Fe,ve(be,{brighter:function(e){return e=null==e?xe:Math.pow(xe,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_e,formatHex:_e,formatRgb:Be,toString:Be})),ge(Ue,(function(e,t,r,n){return 1===arguments.length?ze(e):new Ue(e,t,r,null==n?1:n)}),ve(be,{brighter:function(e){return e=null==e?xe:Math.pow(xe,e),new Ue(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ue(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ve(Ye(e>=240?e-240:e+120,i,n),Ye(e,i,n),Ye(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var We=Math.PI/180,Ge=180/Math.PI,Ke=4/29,Xe=6/29,Je=3*Xe*Xe;function Ze(e){if(e instanceof Qe)return new Qe(e.l,e.a,e.b,e.opacity);if(e instanceof at)return st(e);e instanceof Ve||(e=je(e));var t,r,n=nt(e.r),i=nt(e.g),o=nt(e.b),a=et((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=et((.4360747*n+.3850649*i+.1430804*o)/.96422),r=et((.0139322*n+.0971045*i+.7141733*o)/.82521)),new Qe(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Qe(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function et(e){return e>.008856451679035631?Math.pow(e,1/3):e/Je+Ke}function tt(e){return e>Xe?e*e*e:Je*(e-Ke)}function rt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function nt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function it(e){if(e instanceof at)return new at(e.h,e.c,e.l,e.opacity);if(e instanceof Qe||(e=Ze(e)),0===e.a&&0===e.b)return new at(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ge;return new at(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ot(e,t,r,n){return 1===arguments.length?it(e):new at(e,t,r,null==n?1:n)}function at(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function st(e){if(isNaN(e.h))return new Qe(e.l,0,0,e.opacity);var t=e.h*We;return new Qe(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ge(Qe,(function(e,t,r,n){return 1===arguments.length?Ze(e):new Qe(e,t,r,null==n?1:n)}),ve(be,{brighter:function(e){return new Qe(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Qe(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Ve(rt(3.1338561*(t=.96422*tt(t))-1.6168667*(e=1*tt(e))-.4906146*(r=.82521*tt(r))),rt(-.9787684*t+1.9161415*e+.033454*r),rt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),ge(at,ot,ve(be,{brighter:function(e){return new at(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new at(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return st(this).rgb()}}));var lt={isDark:function(e){return ot(e).l<70}};function ut(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ct(e){return 1===e.length&&(e=function(e){return function(t,r){return ut(e(t),r)}}(e)),{left:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}var dt=ct(ut).right,mt=Math.sqrt(50),ft=Math.sqrt(10),pt=Math.sqrt(2);function ht(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=mt?10:o>=ft?5:o>=pt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=mt?10:o>=ft?5:o>=pt?2:1)}function yt(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=mt?i*=10:o>=ft?i*=5:o>=pt&&(i*=2),t<e?-i:i}function gt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function vt(){}function bt(e,t){var r=new vt;if(e instanceof vt)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,i=-1,o=e.length;if(null==t)for(;++i<o;)r.set(i,e[i]);else for(;++i<o;)r.set(t(n=e[i],i,e),n)}else if(e)for(var a in e)r.set(a,e[a]);return r}function xt(){}vt.prototype=bt.prototype={constructor:vt,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var Mt=bt.prototype;xt.prototype={constructor:xt,has:Mt.has,add:function(e){return this["$"+(e+="")]=e,this},remove:Mt.remove,clear:Mt.clear,values:Mt.keys,size:Mt.size,empty:Mt.empty,each:Mt.each};var St=Array.prototype,Et=St.map,Ct=St.slice;function qt(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ot(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function At(){}var Dt=1/.7,Nt="\\s*([+-]?\\d+)\\s*",Tt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",It="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wt=/^#([0-9a-f]{3})$/,Lt=/^#([0-9a-f]{6})$/,Rt=new RegExp("^rgb\\("+[Nt,Nt,Nt]+"\\)$"),kt=new RegExp("^rgb\\("+[It,It,It]+"\\)$"),Pt=new RegExp("^rgba\\("+[Nt,Nt,Nt,Tt]+"\\)$"),jt=new RegExp("^rgba\\("+[It,It,It,Tt]+"\\)$"),Ft=new RegExp("^hsl\\("+[Tt,It,It]+"\\)$"),Vt=new RegExp("^hsla\\("+[Tt,It,It,Tt]+"\\)$"),_t={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Bt(e){var t;return e=(e+"").trim().toLowerCase(),(t=wt.exec(e))?new Yt((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=Lt.exec(e))?Ht(parseInt(t[1],16)):(t=Rt.exec(e))?new Yt(t[1],t[2],t[3],1):(t=kt.exec(e))?new Yt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Pt.exec(e))?$t(t[1],t[2],t[3],t[4]):(t=jt.exec(e))?$t(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ft.exec(e))?Gt(t[1],t[2]/100,t[3]/100,1):(t=Vt.exec(e))?Gt(t[1],t[2]/100,t[3]/100,t[4]):_t.hasOwnProperty(e)?Ht(_t[e]):"transparent"===e?new Yt(NaN,NaN,NaN,0):null}function Ht(e){return new Yt(e>>16&255,e>>8&255,255&e,1)}function $t(e,t,r,n){return n<=0&&(e=t=r=NaN),new Yt(e,t,r,n)}function zt(e){return e instanceof At||(e=Bt(e)),e?new Yt((e=e.rgb()).r,e.g,e.b,e.opacity):new Yt}function Ut(e,t,r,n){return 1===arguments.length?zt(e):new Yt(e,t,r,null==n?1:n)}function Yt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Wt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Gt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Xt(e,t,r,n)}function Kt(e){if(e instanceof Xt)return new Xt(e.h,e.s,e.l,e.opacity);if(e instanceof At||(e=Bt(e)),!e)return new Xt;if(e instanceof Xt)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Xt(a,s,l,e.opacity)}function Xt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Jt(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}qt(At,Bt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),qt(Yt,Ut,Ot(At,{brighter:function(e){return e=null==e?Dt:Math.pow(Dt,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+Wt(this.r)+Wt(this.g)+Wt(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),qt(Xt,(function(e,t,r,n){return 1===arguments.length?Kt(e):new Xt(e,t,r,null==n?1:n)}),Ot(At,{brighter:function(e){return e=null==e?Dt:Math.pow(Dt,e),new Xt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Xt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Yt(Jt(e>=240?e-240:e+120,i,n),Jt(e,i,n),Jt(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Zt=Math.PI/180,Qt=180/Math.PI,er=4/29,tr=6/29,rr=3*tr*tr;function nr(e){if(e instanceof ir)return new ir(e.l,e.a,e.b,e.opacity);if(e instanceof cr){if(isNaN(e.h))return new ir(e.l,0,0,e.opacity);var t=e.h*Zt;return new ir(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Yt||(e=zt(e));var r,n,i=lr(e.r),o=lr(e.g),a=lr(e.b),s=or((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?r=n=s:(r=or((.4360747*i+.3850649*o+.1430804*a)/.96422),n=or((.0139322*i+.0971045*o+.7141733*a)/.82521)),new ir(116*s-16,500*(r-s),200*(s-n),e.opacity)}function ir(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function or(e){return e>.008856451679035631?Math.pow(e,1/3):e/rr+er}function ar(e){return e>tr?e*e*e:rr*(e-er)}function sr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function lr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ur(e){if(e instanceof cr)return new cr(e.h,e.c,e.l,e.opacity);if(e instanceof ir||(e=nr(e)),0===e.a&&0===e.b)return new cr(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Qt;return new cr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function cr(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}qt(ir,(function(e,t,r,n){return 1===arguments.length?nr(e):new ir(e,t,r,null==n?1:n)}),Ot(At,{brighter:function(e){return new ir(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new ir(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Yt(sr(3.1338561*(t=.96422*ar(t))-1.6168667*(e=1*ar(e))-.4906146*(r=.82521*ar(r))),sr(-.9787684*t+1.9161415*e+.033454*r),sr(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),qt(cr,(function(e,t,r,n){return 1===arguments.length?ur(e):new cr(e,t,r,null==n?1:n)}),Ot(At,{brighter:function(e){return new cr(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new cr(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return nr(this).rgb()}}));var dr=-.29227,mr=-.90649,fr=1.97294,pr=fr*mr,hr=1.78277*fr,yr=-.6557636667999999;function gr(e){if(e instanceof vr)return new vr(e.h,e.s,e.l,e.opacity);e instanceof Yt||(e=zt(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(yr*n+pr*t-hr*r)/(yr+pr-hr),o=n-i,a=(fr*(r-i)-dr*o)/mr,s=Math.sqrt(a*a+o*o)/(fr*i*(1-i)),l=s?Math.atan2(a,o)*Qt-120:NaN;return new vr(l<0?l+360:l,s,i,e.opacity)}function vr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function br(e){return function(){return e}}function xr(e){return 1==(e=+e)?Mr:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):br(isNaN(t)?r:t)}}function Mr(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):br(isNaN(e)?t:e)}qt(vr,(function(e,t,r,n){return 1===arguments.length?gr(e):new vr(e,t,r,null==n?1:n)}),Ot(At,{brighter:function(e){return e=null==e?Dt:Math.pow(Dt,e),new vr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new vr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Zt,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new Yt(255*(t+r*(-.14861*n+1.78277*i)),255*(t+r*(dr*n+mr*i)),255*(t+r*(fr*n)),this.opacity)}}));var Sr=function e(t){var r=xr(t);function n(e,t){var n=r((e=Ut(e)).r,(t=Ut(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Mr(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);function Er(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,o=new Array(i),a=new Array(n);for(r=0;r<i;++r)o[r]=Tr(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(e){for(r=0;r<i;++r)a[r]=o[r](e);return a}}function Cr(e,t){var r=new Date;return t-=e=+e,function(n){return r.setTime(e+t*n),r}}function qr(e,t){return t-=e=+e,function(r){return e+t*r}}function Or(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=Tr(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var Ar=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Dr=new RegExp(Ar.source,"g");function Nr(e,t){var r,n,i,o=Ar.lastIndex=Dr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=Ar.exec(e))&&(n=Dr.exec(t));)(i=n.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:qr(r,n)})),o=Dr.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}function Tr(e,t){var r,n=typeof t;return null==t||"boolean"===n?br(t):("number"===n?qr:"string"===n?(r=Bt(t))?(t=r,Sr):Nr:t instanceof Bt?Sr:t instanceof Date?Cr:Array.isArray(t)?Er:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Or:qr)(e,t)}function Ir(e,t){return t-=e=+e,function(r){return Math.round(e+t*r)}}function wr(e){return+e}var Lr=[0,1];function Rr(e){return e}function kr(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Pr(e){var t,r=e[0],n=e[e.length-1];return r>n&&(t=r,r=n,n=t),function(e){return Math.max(r,Math.min(n,e))}}function jr(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=kr(i,n),o=r(a,o)):(n=kr(n,i),o=r(o,a)),function(e){return o(n(e))}}function Fr(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=kr(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=dt(e,t,1,n)-1;return o[r](i[r](t))}}function Vr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function _r(e,t){return function(){var e,t,r,n,i,o,a=Lr,s=Lr,l=Tr,u=Rr;function c(){return n=Math.min(a.length,s.length)>2?Fr:jr,i=o=null,d}function d(t){return isNaN(t=+t)?r:(i||(i=n(a.map(e),s,l)))(e(u(t)))}return d.invert=function(r){return u(t((o||(o=n(s,a.map(e),qr)))(r)))},d.domain=function(e){return arguments.length?(a=Et.call(e,wr),u===Rr||(u=Pr(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=Ct.call(e),c()):s.slice()},d.rangeRound=function(e){return s=Ct.call(e),l=Ir,c()},d.clamp=function(e){return arguments.length?(u=e?Pr(a):Rr,d):u!==Rr},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(r=e,d):r},function(r,n){return e=r,t=n,c()}}()(e,t)}function Br(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Hr(e){return(e=Br(Math.abs(e)))?e[1]:NaN}var $r,zr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ur(e){return new Yr(e)}function Yr(e){if(!(t=zr.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Wr(e,t){var r=Br(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}Ur.prototype=Yr.prototype,Yr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Gr={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Wr(100*e,t)},r:Wr,s:function(e,t){var r=Br(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-($r=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Br(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Kr(e){return e}var Xr,Jr,Zr,Qr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function en(e){var t,r,n=e.grouping&&e.thousands?(t=e.grouping,r=e.thousands,function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}):Kr,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Kr,s=e.percent||"%";function l(e){var t=(e=Ur(e)).fill,r=e.align,l=e.sign,u=e.symbol,c=e.zero,d=e.width,m=e.comma,f=e.precision,p=e.trim,h=e.type;"n"===h?(m=!0,h="g"):Gr[h]||(null==f&&(f=12),p=!0,h="g"),(c||"0"===t&&"="===r)&&(c=!0,t="0",r="=");var y="$"===u?i[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",g="$"===u?i[1]:/[%p]/.test(h)?s:"",v=Gr[h],b=/[defgprs%]/.test(h);function x(e){var i,s,u,x=y,M=g;if("c"===h)M=v(e)+M,e="";else{var S=(e=+e)<0;if(e=v(Math.abs(e),f),p&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(i>0){if(!+e[n])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&(S=!1),x=(S?"("===l?l:"-":"-"===l||"("===l?"":l)+x,M=("s"===h?Qr[8+$r/3]:"")+M+(S&&"("===l?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(u=e.charCodeAt(i))||u>57){M=(46===u?o+e.slice(i+1):e.slice(i))+M,e=e.slice(0,i);break}}m&&!c&&(e=n(e,1/0));var E=x.length+e.length+M.length,C=E<d?new Array(d-E+1).join(t):"";switch(m&&c&&(e=n(C+e,C.length?d-M.length:1/0),C=""),r){case"<":e=x+e+M+C;break;case"=":e=x+C+e+M;break;case"^":e=C.slice(0,E=C.length>>1)+x+e+M+C.slice(E);break;default:e=C+x+e+M}return a(e)}return f=null==f?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var r=l(((e=Ur(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(Hr(t)/3))),i=Math.pow(10,-n),o=Qr[8+n/3];return function(e){return r(i*e)+o}}}}function tn(e,t,r,n){var i,o=yt(e,t,r);switch((n=Ur(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Hr(t)/3)))-Hr(Math.abs(e)))}(o,a))||(n.precision=i),Zr(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Hr(t)-Hr(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-Hr(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return Jr(n)}function rn(e){var t=e.domain;return e.ticks=function(e){var r=t();return function(e,t,r){var n,i,o,a,s=-1;if(r=+r,(e=+e)==(t=+t)&&r>0)return[e];if((n=t<e)&&(i=e,e=t,t=i),0===(a=ht(e,t,r))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return n&&o.reverse(),o}(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return tn(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(n=s,s=l,l=n,n=o,o=a,a=n),(n=ht(s,l,r))>0?n=ht(s=Math.floor(s/n)*n,l=Math.ceil(l/n)*n,r):n<0&&(n=ht(s=Math.ceil(s*n)/n,l=Math.floor(l*n)/n,r)),n>0?(i[o]=Math.floor(s/n)*n,i[a]=Math.ceil(l/n)*n,t(i)):n<0&&(i[o]=Math.ceil(s*n)/n,i[a]=Math.floor(l*n)/n,t(i)),e},e}function nn(){var e=_r(Rr,Rr);return e.copy=function(){return Vr(e,nn())},gt.apply(e,arguments),rn(e)}Xr=en({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Jr=Xr.format,Zr=Xr.formatPrefix;var on=new Date,an=new Date;function sn(e,t,r,n){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},i.round=function(e){var t=i(e),r=i.ceil(e);return e-t<r-e?t:r},i.offset=function(e,r){return t(e=new Date(+e),null==r?1:Math.floor(r)),e},i.range=function(r,n,o){var a,s=[];if(r=i.ceil(r),o=null==o?1:Math.floor(o),!(r<n&&o>0))return s;do{s.push(a=new Date(+r)),t(r,o),e(r)}while(a<r&&r<n);return s},i.filter=function(r){return sn((function(t){if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(i.count=function(t,n){return on.setTime(+t),an.setTime(+n),e(on),e(an),Math.floor(r(on,an))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(n?function(t){return n(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var ln=sn((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));ln.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?sn((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):ln:null};var un=sn((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}));sn((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),sn((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var cn=sn((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function dn(e){return sn((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-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var mn=dn(0),fn=dn(1);dn(2),dn(3);var pn=dn(4);dn(5),dn(6),sn((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()}));var hn=sn((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()}));hn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?sn((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null};var yn=sn((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),gn=sn((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),vn=sn((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function bn(e){return sn((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)/6048e5}))}var xn=bn(0),Mn=bn(1);bn(2),bn(3);var Sn=bn(4);bn(5),bn(6);var En=sn((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()})),Cn=sn((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function qn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function On(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function An(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Cn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?sn((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var Dn,Nn,Tn,In={"-":"",_:" ",0:"0"},wn=/^\s*\d+/,Ln=/^%/,Rn=/[\\^$*+?|[\]().{}]/g;function kn(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function Pn(e){return e.replace(Rn,"\\$&")}function jn(e){return new RegExp("^(?:"+e.map(Pn).join("|")+")","i")}function Fn(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function Vn(e,t,r){var n=wn.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function _n(e,t,r){var n=wn.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Bn(e,t,r){var n=wn.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Hn(e,t,r){var n=wn.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function $n(e,t,r){var n=wn.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function zn(e,t,r){var n=wn.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Un(e,t,r){var n=wn.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Yn(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Wn(e,t,r){var n=wn.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Gn(e,t,r){var n=wn.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Kn(e,t,r){var n=wn.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Xn(e,t,r){var n=wn.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Jn(e,t,r){var n=wn.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Zn(e,t,r){var n=wn.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Qn(e,t,r){var n=wn.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function ei(e,t,r){var n=wn.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function ti(e,t,r){var n=Ln.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function ri(e,t,r){var n=wn.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function ni(e,t,r){var n=wn.exec(t.slice(r));return n?(e.Q=1e3*+n[0],r+n[0].length):-1}function ii(e,t){return kn(e.getDate(),t,2)}function oi(e,t){return kn(e.getHours(),t,2)}function ai(e,t){return kn(e.getHours()%12||12,t,2)}function si(e,t){return kn(1+cn.count(hn(e),e),t,3)}function li(e,t){return kn(e.getMilliseconds(),t,3)}function ui(e,t){return li(e,t)+"000"}function ci(e,t){return kn(e.getMonth()+1,t,2)}function di(e,t){return kn(e.getMinutes(),t,2)}function mi(e,t){return kn(e.getSeconds(),t,2)}function fi(e){var t=e.getDay();return 0===t?7:t}function pi(e,t){return kn(mn.count(hn(e),e),t,2)}function hi(e,t){var r=e.getDay();return e=r>=4||0===r?pn(e):pn.ceil(e),kn(pn.count(hn(e),e)+(4===hn(e).getDay()),t,2)}function yi(e){return e.getDay()}function gi(e,t){return kn(fn.count(hn(e),e),t,2)}function vi(e,t){return kn(e.getFullYear()%100,t,2)}function bi(e,t){return kn(e.getFullYear()%1e4,t,4)}function xi(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+kn(t/60|0,"0",2)+kn(t%60,"0",2)}function Mi(e,t){return kn(e.getUTCDate(),t,2)}function Si(e,t){return kn(e.getUTCHours(),t,2)}function Ei(e,t){return kn(e.getUTCHours()%12||12,t,2)}function Ci(e,t){return kn(1+vn.count(Cn(e),e),t,3)}function qi(e,t){return kn(e.getUTCMilliseconds(),t,3)}function Oi(e,t){return qi(e,t)+"000"}function Ai(e,t){return kn(e.getUTCMonth()+1,t,2)}function Di(e,t){return kn(e.getUTCMinutes(),t,2)}function Ni(e,t){return kn(e.getUTCSeconds(),t,2)}function Ti(e){var t=e.getUTCDay();return 0===t?7:t}function Ii(e,t){return kn(xn.count(Cn(e),e),t,2)}function wi(e,t){var r=e.getUTCDay();return e=r>=4||0===r?Sn(e):Sn.ceil(e),kn(Sn.count(Cn(e),e)+(4===Cn(e).getUTCDay()),t,2)}function Li(e){return e.getUTCDay()}function Ri(e,t){return kn(Mn.count(Cn(e),e),t,2)}function ki(e,t){return kn(e.getUTCFullYear()%100,t,2)}function Pi(e,t){return kn(e.getUTCFullYear()%1e4,t,4)}function ji(){return"+0000"}function Fi(){return"%"}function Vi(e){return+e}function _i(e){return Math.floor(+e/1e3)}!function(e){Dn=function(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=jn(i),c=Fn(i),d=jn(o),m=Fn(o),f=jn(a),p=Fn(a),h=jn(s),y=Fn(s),g=jn(l),v=Fn(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:ii,e:ii,f:ui,H:oi,I:ai,j:si,L:li,m:ci,M:di,p:function(e){return i[+(e.getHours()>=12)]},Q:Vi,s:_i,S:mi,u:fi,U:pi,V:hi,w:yi,W:gi,x:null,X:null,y:vi,Y:bi,Z:xi,"%":Fi},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Mi,e:Mi,f:Oi,H:Si,I:Ei,j:Ci,L:qi,m:Ai,M:Di,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:Vi,s:_i,S:Ni,u:Ti,U:Ii,V:wi,w:Li,W:Ri,x:null,X:null,y:ki,Y:Pi,Z:ji,"%":Fi},M={a:function(e,t,r){var n=f.exec(t.slice(r));return n?(e.w=p[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=d.exec(t.slice(r));return n?(e.w=m[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=g.exec(t.slice(r));return n?(e.m=v[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.m=y[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return C(e,t,r,n)},d:Gn,e:Gn,f:ei,H:Xn,I:Xn,j:Kn,L:Qn,m:Wn,M:Jn,p:function(e,t,r){var n=u.exec(t.slice(r));return n?(e.p=c[n[0].toLowerCase()],r+n[0].length):-1},Q:ri,s:ni,S:Zn,u:_n,U:Bn,V:Hn,w:Vn,W:$n,x:function(e,t,n){return C(e,r,t,n)},X:function(e,t,r){return C(e,n,t,r)},y:Un,Y:zn,Z:Yn,"%":ti};function S(e,t){return function(r){var n,i,o,a=[],s=-1,l=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=In[n=e.charAt(++s)])?n=e.charAt(++s):i="e"===n?" ":"0",(o=t[n])&&(n=o(r,i)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function E(e,t){return function(r){var n,i,o=An(1900);if(C(o,e,r+="",0)!=r.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(n=On(An(o.y))).getUTCDay(),n=i>4||0===i?Mn.ceil(n):Mn(n),n=vn.offset(n,7*(o.V-1)),o.y=n.getUTCFullYear(),o.m=n.getUTCMonth(),o.d=n.getUTCDate()+(o.w+6)%7):(i=(n=t(An(o.y))).getDay(),n=i>4||0===i?fn.ceil(n):fn(n),n=cn.offset(n,7*(o.V-1)),o.y=n.getFullYear(),o.m=n.getMonth(),o.d=n.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?On(An(o.y)).getUTCDay():t(An(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,On(o)):t(o)}}function C(e,t,r,n){for(var i,o,a=0,s=t.length,l=r.length;a<s;){if(n>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=M[i in In?t.charAt(a++):i])||(n=o(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return b.x=S(r,b),b.X=S(n,b),b.c=S(t,b),x.x=S(r,x),x.X=S(n,x),x.c=S(t,x),{format:function(e){var t=S(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",qn);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e,On);return t.toString=function(){return e},t}}}(e),Nn=Dn.utcFormat,Tn=Dn.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||Nn("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||Tn("%Y-%m-%dT%H:%M:%S.%LZ");function Bi(e){return new Date(e)}function Hi(e){return e instanceof Date?+e:+new Date(+e)}function $i(e,t,r,n,i,o,a,s,l){var u=_r(Rr,Rr),c=u.invert,d=u.domain,m=l(".%L"),f=l(":%S"),p=l("%I:%M"),h=l("%I %p"),y=l("%a %d"),g=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,864e5],[n,2,1728e5],[r,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function M(s){return(a(s)<s?m:o(s)<s?f:i(s)<s?p:n(s)<s?h:t(s)<s?r(s)<s?y:g:e(s)<s?v:b)(s)}function S(t,r,n,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(n-r)/t,a=ct((function(e){return e[2]})).right(x,o);a===x.length?(i=yt(r/31536e6,n/31536e6,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(yt(r,n,t),1),t=s)}return null==i?t:t.every(i)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(Et.call(e,Hi)):d().map(Bi)},u.ticks=function(e,t){var r,n=d(),i=n[0],o=n[n.length-1],a=o<i;return a&&(r=i,i=o,o=r),r=(r=S(e,i,o,t))?r.range(i,o+1):[],a?r.reverse():r},u.tickFormat=function(e,t){return null==t?M:l(t)},u.nice=function(e,t){var r=d();return(e=S(e,r[0],r[r.length-1],t))?d(function(e,t){var r,n=0,i=(e=e.slice()).length-1,o=e[n],a=e[i];return a<o&&(r=n,n=i,i=r,r=o,o=a,a=r),e[n]=t.floor(o),e[i]=t.ceil(a),e}(r,e)):u},u.copy=function(){return Vr(u,$i(e,t,r,n,i,o,a,s,l))},u}const zi={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},Ui=e=>e+" 12px -12px inset rgba(0, 0, 0, 0.0625)";var Yi={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:r,rtl:n}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=zi[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Ui(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Ui(t.shadow.endOffset)}}})(r),u="horizontal"===r&&n,c=[];return a||c.push(e("div",{style:{...l.base,...u?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||c.push(e("div",{style:{...l.base,...u?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),c}};function Wi({viewState:e,viewCache:t,layoutService:r,dockService:n,rtl:i}){return!r.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:n.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:r}){return e.meta.isContinuous?function(e,t){const r=e.get("zoom"),n=t.get("continuousMin"),i=t.get("continuousMax");return[(r.min-n)/(i-n),(r.max-n)/(i-n)]}(t,r):function(e){return e.get("viewRange")}(t)}({layoutService:r,viewState:e,viewCache:t})}}}let Gi;function Ki(){Gi=Gi||document.createElement("canvas").getContext("2d")}const Xi={measureTextWidth(e){Ki();const{width:t}=Gi.measureText(e);return t},lineWrap(e,t,r,n){let i,o;Ki();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,d,m=e?e.split(/\s+/):[],f=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof n&&a.length>=n)return a.slice(0,n);for(r&&(Gi.font=r),o=0;o<a.length;o++){for(d=a[o]||"",m=d.split(/\s+/),[f]=m,c="",i=1;i<m.length;i++)if(l=`${f} ${m[i]}`,u=Xi.measureTextWidth(l),u>t&&("number"!=typeof n||n>s.length)?(s.push(f),f=m[i]):f=l,"number"==typeof n&&s.length>=n){c=m.slice(i+1).join(" ");break}"number"!=typeof n||s.length<n?s.push(f):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${f} ${c}`}return s},wordWrap(e,t,r,n,i){if(Ki(),!e||!e.length)return[];r&&(Gi.font=r);let o=[];const a=e.slice();let s,l,u,c;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(c=0;c<a.length;c++)u=a[c],l=null,u&&(u.length<=1||Xi.measureTextWidth(u)<=t?o.push(u):(s=Xi.splitWord(u,t,void 0,n-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[c+1]?Xi.measureTextWidth(`${l} ${a[c+1]}`)>t&&o.length+a.length-c<=n?a.splice(c+1,0,l):a[c+1]=`${l} ${a[c+1]}`:a.push(l))));return o.forEach(((e,t,r)=>{r[t]=e?e.trim():e})),o.length>n?(o=o.splice(0,n),o[o.length-1]=Xi.truncate(o[o.length-1],t,r,i).text):(u=o[o.length-1],u&&u.length>1&&Xi.measureTextWidth(u)>t&&(o[o.length-1]=Xi.truncate(u,t,r,i).text)),o},truncate(e,t,r,n="…"){Ki();let i,o,a,s,l=e;const u=Xi.measureTextWidth("i"),c=Math.ceil(t/u);if(r&&(Gi.font=r),e&&t){if(Xi.measureTextWidth(l)>t){for(i=Math.min(c,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+n,Xi.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,r,n){let i;Ki();let o,a=e,s="",l=[];if(Xi.isNumber(r)&&r<=1)return[e];const u=Math.ceil(t/n);for(i=Math.min(e.length,u);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(Xi.measureTextWidth(a)<=t));i--);return(!i&&!a||Xi.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Xi.measureTextWidth(s)>t?(s=Xi.explodeWord(s,t,r-1,n),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,r,n)=>(Ki(),e&&t?(r&&(Gi.font=r),Xi.explodeWord(e,t,n,Math.max(1,Xi.measureTextWidth("i")))):[]),wrapText(e,t,r,n,i){let o;return Number.isNaN(t)?[e]:(o=n>1?Xi.lineWrap(e,t,r,n):[e],o=Xi.wordWrap(o,t,r,n,i),o)},getFontHeight:e=>(Ki(),e&&(Gi.font=e),1.5*Xi.measureTextWidth("m")),tokenize(e,t,r,n,i,o,a=1){Ki(),t&&(Gi.font=t);const s=Xi.getFontHeight(),l=a*s;let u=[],c=0,d=[];if(o<s)return[];const m=o?Math.max(1,Math.floor(o/l)):n||1;return Array.isArray(n)?(n.forEach((e=>{c+=Number.isNaN(e)||e<=0?0:e})),n.forEach((e=>{u.push(Number.isNaN(e)||e<=0?m-c:e)}))):u=[Number.isNaN(n)||n<=0?m:Math.min(m,n)],Array.isArray(e)?e.forEach(((e,r)=>{d.length<m&&(d=d.concat(Xi.wrapText(e,i,t,u[r])))})):d=Xi.wrapText(e,i,t,u[0],r),d}},Ji={getDefaultSettings:({size:e=10,fill:t="#999",alignment:r}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:r}),createOob({oob:e,dockValue:t,boxCenter:r,rendWidth:n,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=n,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=n,d=t<.5?180:0),a(U({},e,{[s]:r*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}},Zi=U.bind(null,!0),Qi={},{isArray:eo}=Array;function to(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ro(e){return void 0===e}function no(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function io(e,t){const r=t.substring(1).split("/").slice(0,-1);let n;return r.forEach(((t,i)=>{if(i===r.length)return;n=+t;const o=isNaN(n)?{}:[];e[n||t]=ro(e[n||t])?o:e[t],e=e[n||t]})),e}function oo(e,t){let r=!0;if(to(e)&&to(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((n=>{oo(e[n],t[n])||(r=!1)})),r);if(eo(e)&&eo(t)){if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r+=1)if(!oo(e[r],t[r]))return!1;return!0}return e===t}Qi.generate=function(e,t,r){r=r||"";let n=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Zi({},{val:e}).val:e}(t[i]),a=e[i],s=`${r}/${i}`;oo(o,a)||no(t,i)||(ro(a)?n.push({op:"add",path:s,value:o}):to(o)&&to(a)?n=n.concat(Qi.generate(a,o,s)):eo(o)&&eo(a)?n=n.concat(function(e,t,r){let n=[];const i=e.slice();let o=-1;function a(e,t,r){if(e[r]&&ro(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(let r=0,n=e.length;r<n;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(oo(t,i))return n;if(!ro(t[0])&&ro(t[0].qInfo)||0===t.length)return n.push({op:"replace",path:r,value:t}),n;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(n.push({op:"remove",path:`${r}/${e}`}),i.splice(e,1)):n=n.concat(Qi.generate(i[e],t[o],`${r}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(n.push({op:"add",path:`${r}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(n.push({op:"move",path:`${r}/${e}`,from:`${r}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:`${r}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{ro(t[i])&&!no(e,i)&&n.push({op:"remove",path:`${r}/${i}`})})),n},Qi.apply=function(e,t){t.forEach((t=>{let r=io(e,t.path),n=t.path.split("/").splice(-1)[0],i=n&&isNaN(+n)?r[n]:r[+n]||r;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,i=e),"add"===t.op||"replace"===t.op)if(eo(r))"-"===n&&(n=r.length),r.splice(+n,"add"===t.op?0:1,t.value);else if(eo(i)&&eo(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(to(i)&&to(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!no(a,e)&&delete a[e]})),Zi(i,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[n]=t.value}else if("move"===t.op){const i=io(e,t.from);eo(r)?r.splice(+n,0,i.splice(+o,1)[0]):(r[n]=i[o],delete i[o])}else"remove"===t.op&&(eo(r)?r.splice(+n,1):delete r[n]);var a}))},Qi.clone=function(e){return Zi({},e)},Qi.createPatch=function(e,t,r){const n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},Qi.updateObject=function(e,t){Object.keys(e).length?Qi.apply(e,Qi.generate(e,t)):Zi(e,t)};const ao=[[2,4,6],[2,4],[3]],so=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function lo(e,t,r){const n=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<n;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==r&&(o=Math.min(o,r/e[n-1])),e.splice(0,0,o)}function uo(e,t,r){let n;const i=e?e.length:0;for(n=0;n<i;n++)lo(e[n],t,r)}!function(){let e,t;for(uo(ao,1,10),e=0;e<so.length;e++)if(so[e])for(t=0;t<so[e].length;t++)Array.isArray(so[e][t])&&uo(so[e][t])}();const co={isInside(e,t,r,n){if(!n)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=r},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const r=e.position<t.position?e:t,n=e.position<t.position?t:e;return n.position-n.radius-(r.position+r.radius)},findSegmentPositionMeetMax(e,t){const r=Math.max(0,e.max-t);return e.center-r},findSegmentPositionMeetMin(e,t){const r=Math.max(0,t-e.min);return e.center+r},findSegmentPositionMeetMinThenMax(e,t,r){const n=co.findSegmentPositionMeetMin(e,t);return co.findSegmentPositionMeetMax({center:n,max:n+e.radius},r)},findSegmentPositionMeetMaxThenMin(e,t,r){const n=co.findSegmentPositionMeetMax(e,r);return co.findSegmentPositionMeetMin({center:n,min:n-e.radius},t)},layoutPositionFromMin(e,t,r,n=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=co.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-n)/2),s=o.position+o.radius+n/2;a.position=co.findSegmentPositionMeetMaxThenMin(a,s,r)},adjustPositionFromMax(e,t,r,n=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-r);if(0===l)return;let u,c=0;for(o=i;o>0&&(a=e[o],s=e[o-1],u=Math.max(0,co.getGap(s,a)-n),u-=Math.max(0,c+u-l),c+=u,a.move=u,!(c>=l));o--);for(c<l&&(u=Math.max(0,s.position-s.radius-t),u-=Math.max(0,c+u-l),c+=u,s.move=u),c=0,o=0;o<=i;o++)a=e[o],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,r,n=0){const i=e.length-1;if(!(i<0))if(0!==i)co.layoutPositionFromMin(e,t,r,n),co.adjustPositionFromMax(e,t,r,n);else{const n=e[0];n.position=co.findSegmentPositionMeetMaxThenMin(n,t,r)}}},mo=(e,t,r,n=1)=>{const i=e.bandwidth();return r?"start"===t?i:"end"===t?i*(1-n):i*(2-n)/2:"start"===t?0:"end"===t?i*n:i*n/2},fo=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,po=e=>e.filter(fo),ho=(e,t)=>po(te(e,t,[])),yo=e=>fo(e)&&(!1!==e.showValue||!1!==e.showLabel),go=e=>e.filter(yo),vo=(e,t)=>go(te(e,t,[])),bo=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,xo=(e,t,r)=>{const{dimensionRefLineInfo:n}=t;if(n[e])return n[e][r]},Mo=({label:e,dataPages:t})=>{const{qArea:r={}}=t||{},{qTop:n,qHeight:i}=r;return void 0!==n&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<n},So=({label:e,dataPages:t})=>{const{qArea:r={}}=t||{},{qTop:n,qHeight:i}=r;return void 0!==n&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=n+i},Eo=({value:e,qMin:t})=>"NaN"!==t&&e<t,Co=({value:e,qMax:t})=>"NaN"!==t&&e>t,qo={isRefLineVisible:fo,getVisibleRefLines:po,getRefLines:ho,getMeasureRefLines:e=>ho(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:ho(e,"refLine.dimRefLines"),isRefLineLabelVisible:yo,getVisibleRefLineLabels:go,getRefLineLabels:vo,getMeasureRefLineLabels:e=>vo(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:vo(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:r,valueInfo:n,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=mo(s,i,o,a.meta.measureCount),s([r,0])+l;if(a.meta.isGroupedByDimension){if(!n)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=n;let u;return l=mo(s,i,o,t),e&&e.length&&(u=(({pxScale:e,value:t,innerValues:r,invert:n,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:n});for(let n=0;n<r.length;n++){const{id:a,order:s}=r[n],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:r,innerValues:e,invert:o,minOrder:a})),(void 0===u?s(r):u)+l}return l=mo(s,i,o),s(r)+l}return e(r)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:r,layoutService:n})=>{const{isGroupedByDimension:i}=n.meta,o={},a=te(e,"qHyperCube"),s="K"===a.qMode,l=r?r.query.getCurrentDataPage():te(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const u=te(l,s?"qData.0.qSubNodes":"qMatrix",[]),c=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],r=e+d,n=t[c];o[n]||(o[n]={id:t.qElemNo,qText:t.qText,minOrder:r,maxOrder:r})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const r=u[t][0],n=u[t][1],i=t+d,a=r[c];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:n.qElemNumber,order:i}):o[a]={id:r.qElemNumber,qText:r.qText,minOrder:i,maxOrder:i,innerValues:[{id:n.qElemNumber,order:i}]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],r=e+d,n=t[c];o[n]||(o[n]={id:t.qElemNumber,qText:t.qText,minOrder:r,maxOrder:r})}})(),o},getInputValue:bo,extractInfoFromInputValue:xo,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:r})=>{const n=bo({refLineLayout:e,layoutService:r});return xo(n,t,"id")},isDiscreteMinOutOfBounds:Mo,isDiscreteMaxOutOfBounds:So,isContinuousMinOutOfBounds:Eo,isContinuousMaxOutOfBounds:Co,isOutOfRange:({value:e,qMin:t,qMax:r})=>Eo({value:e,qMin:t})||Co({value:e,qMax:r}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&So({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&Mo({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:r})=>"horizontal"===e?t:r};function Oo(e,t,r=70){for(let n=0;n<e.length;n++){const i=e[n];i.lines=Xi.tokenize(i.title,t,"… "+i.valueString,3,r),i.maxNumLines=i.lines.length}}function Ao({title:e,font:t,ellipsis:r,maxNumLines:n=5,maxWidth:i=200}){const o=Xi.tokenize(e,t,r,n,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function Do({oobs:e,font:t,ellipsis:r,maxNumLines:n=5,maxWidth:i=200}){const o=e.map((e=>Ao({title:e.title,font:t,ellipsis:`${r} ${e.valueString}`,maxNumLines:n,maxWidth:i}))),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function No(e,t="value"){e.sort(((e,r)=>e[t]-r[t]))}const To=3,Io=2;function wo({inputValue:e,inputValueLabel:t,localeInfo:r}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!r)return!0;const n=`+-${r.qDecimalSep||""}${r.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${n}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const Lo=({label:e,dataPages:t,qMin:r,qMax:n})=>{if(void 0!==r&&void 0!==n){const{inputValue:t}=e;if(qo.isContinuousMaxOutOfBounds({value:t,qMax:n}))return 1;if(qo.isContinuousMinOutOfBounds({value:t,qMin:r}))return-1}return qo.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:qo.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},Ro={hasEngineFormat:wo,calculateLabelPositions({labels:e,scale:t,size:r,layoutService:n,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=qo.getInvert({orientation:i,rtl:o,isContinuous:a}),u="S"===n.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=n.getHyperCubeValue(u),{canBeContinuous:d}=n.meta;let m,f;if(s&&d){const e=n.getLayoutValue("qHyperCube.qDimensionInfo.0");m=e.qMin,f=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:u,valueInfo:d}=o,p=Lo({label:o,dataPages:c,qMin:m,qMax:f});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:qo.getScaledPosition({scale:t,size:r,value:s,valueInfo:d,align:u,invert:l,layoutService:n,isContinuous:a}),o.center=o.scaledValue*r}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:r,canBeContinuous:n,localeInfo:i}){let o;if(r)for(let r=0;r<e.length;r++){const n=e[r],{value:a,inputValue:s,inputValueLabel:l}=n;o=wo({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,n.valueString=`${he.lrm}(${o})${he.lrm}`,n.title=Ro.getTitle(n)}else if(n)for(let t=0;t<e.length;t++){const r=e[t],{valueText:n,inputValue:a,inputValueLabel:s}=r;o=wo({inputValue:a,inputValueLabel:s,localeInfo:i})?s:n,r.valueString=`${he.lrm}(${o})${he.lrm}`,r.title=Ro.getTitle(r)}else for(let t=0;t<e.length;t++){const r=e[t];o=r.valueText,r.valueString=`${he.lrm}(${o})${he.lrm}`,r.title=Ro.getTitle(r)}},measureLabelsWidth(e,t){for(let r=0;r<e.length;r++){const n=e[r];n.totalWidth=t(n.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,r,n=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-n)/2,a.cMin=o.cMax+n;a.cMax=r}else o.cMax=r},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,r){const n=t-1,i=e.filter((e=>e.maxNumLines===t)),o=Math.min(r,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=n},reduceTotalMaxNumLines(e,t,r){const n=Math.floor(r/t);let i=3;do{const t=Ro.getTotalNumLines(e)-n;if(t<=0)return;Ro.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,r=0){for(let n=0;n<e.length;n++){const i=e[n];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+r)/t)))}},addLabelsSize(e,t,r=15,n){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,Ro.measureLabelMaxLineWidth(o,n)),o.height=o.lines.length*r}},addLabelSegments(e,t){for(let r=0;r<e.length;r++){const n=e[r],{center:i}=n,o=n[t],a=o/2;n.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:r,lowerLimit:n,upperLimit:i,gap:o,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:m,layoutService:f,isContinuous:p,isDimension:h}){const y=e.map((e=>e)),g=r;Ro.calculateLabelPositions({labels:e,scale:t,size:g,layoutService:f,orientation:c,rtl:m,isContinuous:p,isDimension:h}),No(e,"center"),Ro.addLabelsNeighborInfo(e,n,i,o),Oo(e,a,s),Ro.reduceTotalMaxNumLines(y,l,i-(y.length-1)*o),"vertical"===c&&(Ro.reduceMaxNumLines(e,l,.05*o),function(e,t,r=70){for(let n=0;n<e.length;n++){const i=e[n];i.lines.length>i.maxNumLines&&(i.lines=Xi.tokenize(i.title,t,"… "+i.valueString,i.maxNumLines,r))}}(e,a,s)),Ro.addLabelsSize(e,s,l,d),Ro.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:r,areaProps:n,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l}=n,{minorCenter:u}=i,{fontSize:c,fontFamily:d,background:m}=t;let f=[];return e.forEach((e=>{const{lines:t}=e,n=t.length,i=t.map(((t,i)=>{const m={type:"text",text:t,title:Ao({title:e.title,font:a,ellipsis:"… "+e.valueString}),dx:0,dy:0,maxWidth:r,width:r,fontSize:c,fontFamily:d,fill:e.fill,baseline:"central",anchor:"middle"};return m[l]=u,m[s]=e.segment.position,m.y+=(i-(n-1)/2)*o,m}));e.background&&f.push(function({minorCenter:e,majorAxis:t,minorAxis:r,label:n,lineHeight:i,background:o}){const{lines:a}=n,{borderRadius:s=To,padding:l={}}=o,{top:u=Io,bottom:c=Io,left:d=Io,right:m=Io}=l,f=a.length,p={type:"rect",rx:s,ry:s,fill:n.background.fill,width:n.width+(d+m),height:n.height+(u+c)};return p[r]=e,p[t]=n.segment.position,p.x-=n.width/2+d,p.y-=f*i/2+u,p}({minorCenter:u,majorAxis:s,minorAxis:l,label:e,lineHeight:o,background:m})),f=f.concat(i)})),f}};function ko(e,t,r){let n;const i=typeof t;if("string"===i||"object"===i)n=e.formatter(t);else if(void 0!==r&&r.data){const e=r.data()&&r.data().fields;n=e&&e[0]?e[0].formatter():null}return n}function Po(e,t,r){return"top"===e||"bottom"===e?function(e,t){const{font:r,lineHeight:n,top:i,bottom:o,maxLabelWidth:a}=t;let s=1;return Ro.getMaxTextWidth(e)>a&&(Oo(e,r,a),s=Math.max(...e.map((e=>e.lines.length)))),s*n+i+o}(t,r):function(e,t){const{left:r,right:n,maxLabelWidth:i}=t;return Math.min(i,Ro.getMaxTextWidth(e))+r+n}(t,r)}function jo(e,t){return t?e.domain():[0,1]}function Fo(e,t,r,n="value"){let i=e.filter((e=>e[n]>=t));i=i.filter((e=>e[n]<=r));const o=e.filter((e=>e[n]<t)),a=e.filter((e=>e[n]>r));return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function Vo(e){let t,r=0;for(let n=1;n<10;n++)t=e(n),r=Math.max(r,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[r,Math.max(r,Math.sqrt(t.width*t.width+t.height*t.height))]}function _o(e,t){return e>9?t[1]:t[0]}function Bo({alignment:e,dockValue:t,oobs:r,style:n,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:u}){const c=r?r.length:0;if(c<1)return[];const{flipXY:d,majorAxis:m,minorAxis:f,minorDimension:p}=s,h=i[p],y=Ji.createOob({oob:Ji.getDefaultSettings({size:n.size,fill:n.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o}),g="c"+m,v="c"+f,b={type:"circle",r:l,stroke:"transparent",fill:n.text.background.fill,strokeWidth:0};b[v]=h/2,b[g]=a;const x={type:"text",text:c>9?"9+":c,title:Do({oobs:r,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:h,width:h,fontSize:n.text.fontSize,fontFamily:n.text.fontFamily,fill:n.text.fill,baseline:"central",anchor:"middle"};return x[f]=h/2,x[m]=a,[y,b,x]}function Ho(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:Xi.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const $o=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var zo={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:r,isContinuous:n,localeInfo:i}=this.settings,o=!!n||r.meta.canBeContinuous,a=$o(this.settings.labels),s=ko(this.chart,this.settings.formatter,e);Ro.addLabelTitles({labels:a,formatter:s,isContinuous:n,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:r,canBeContinuous:n,layoutService:i})=>{if(r){const[n,i]=jo(t,r);return Fo(e,n,i)}if(n){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:n}=t;if("NaN"!==r&&"NaN"!==n)return Fo(e,r,n,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:n,canBeContinuous:o,layoutService:r});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),c&&c.length){const e=Ho(t.label),{dock:r}=this.settings.layout;return Ro.measureLabelsWidth(c,this.measureText),d=Po(r,c,e),d}const m=Vo(this.measureText),f=l?_o(l,m):0,p=u?_o(u,m):0;return d=Math.max(f,p),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:r,layoutService:n,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||n.meta.canBeContinuous,u=$o(this.settings.labels),{dock:c,rtl:d}=this.settings.layout,{padding:m}=r.label,f=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(c),p=function(e,t,r){const n=e[t.minorDimension];return{minorSize:n,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(n-r.right-r.left)/2+r.left:(n-r.top-r.bottom)/2+r.top}}(this.rect,f,m),{orientation:h,majorDimension:y}=f,{majorSize:g}=p,{font:v,lineHeight:b,gap:x,maxLabelWidth:M}=Ho(r.label),S=ko(this.chart,this.settings.formatter,e),E=g;Ro.addLabelTitles({labels:u,formatter:S,isContinuous:o,canBeContinuous:l,localeInfo:s}),Ro.calculateLabelPositions({labels:u,scale:e,size:E,layoutService:n,orientation:h,rtl:d,isContinuous:o,isDimension:a});const[C,q]=jo(e,o),{filteredLabels:O,lowerOobs:A,upperOobs:D,lowerCircleSize:N,upperCircleSize:T,lowerOobSpace:I,upperOobSpace:w}=function({labels:e,minValue:t,maxValue:r,orientation:n,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:m}=Fo(e,t,r,u),f="scaledValue"!==u&&qo.getInvert({orientation:n,rtl:i,isContinuous:o}),p=function(e,t,r){return r?t:e}(d,c,f),h=function(e,t,r){return r?e:t}(d,c,f),y=p.length,g=h.length,v=Vo(l),b=_o(y,v),x=_o(g,v);return{filteredLabels:m,lowerOobs:p,upperOobs:h,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:function(e,t,r,n,i){return("vertical"===n?i.top:i.left)+(e>0?t+r:0)}(y,a.oob.size,b,n,s),upperOobSpace:function(e,t,r,n,i){return("vertical"===n?i.bottom:i.right)+(e>0?t+r:0)}(g,a.oob.size,x,n,s)}}({labels:u,minValue:C,maxValue:q,orientation:h,rtl:d,isContinuous:o,style:r,padding:m,measureText:this.measureText,prop:o?"value":"scaledValue"}),L=I,R=g-w;No(A),No(D);const k=Bo({alignment:0,dockValue:0,oobs:A,style:r.oob,rect:this.rect,symbol:t,position:r.oob.size+N/2,areaProps:f,radius:N/2,font:v}),P=Bo({alignment:1,dockValue:1,oobs:D,style:r.oob,rect:this.rect,symbol:t,position:g-(r.oob.size+T/2),areaProps:f,radius:T/2,font:v});Ro.addLabelsInfo({labels:O,scale:e,majorSize:g,lowerLimit:L,upperLimit:R,font:v,lineHeight:b,gap:x,maxLabelWidth:M,majorDimension:y,orientation:h,measureText:this.measureText,rtl:d,layoutService:n,isContinuous:o,isDimension:a}),co.layout(O.map((e=>e.segment)),L,R,r.label.gap);const j=O.filter((e=>co.isInside(e.segment,L,R,o)));return Ro.createLabels({labels:j,style:r.label,maxLabelWidth:M,areaProps:f,area:p,lineHeight:b,font:v,theme:i}).concat([...k,...P])}};const{getInputValue:Uo,extractInfoFromInputValue:Yo,resolveValue:Wo}=qo;var Go={resolveValue:Wo,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:r})=>{if(r.meta.isGroupedByDimension){const n=Uo({refLineLayout:e,layoutService:r});return Yo(n,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:r})=>{if(r.meta.mode.K)return 0;const n=Uo({refLineLayout:e,layoutService:r});return Yo(n,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:r})=>{const{dimensionValuesInfo:n}=t,{canBeContinuous:i}=r.meta,o=Uo({refLineLayout:e,layoutService:r});return n[o]&&i?n[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:r})=>{const n=Uo({refLineLayout:e,layoutService:r}),{dimensionRefLineInfo:i}=t;return i[n]}};function Ko({isDimension:e,refLineModel:t={},layoutService:r,colorModel:n,dockService:i,chart:o,scale:a,axis:s,rtl:l,key:u,mainComponentKey:c,path:d,minimumLayoutMode:m}){const f=e?t.dimensionRefLines:d?t.query.getRefLines(d):t.measureRefLines;if(!f.length)return!1;const p={key:u,type:"ref-line",layout:{minimumLayoutMode:m},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}})},h=!(!e||"horizontal"!==i.meta.major.orientation||!l),y=!e||r.meta.isContinuous;return f.forEach((l=>{p.lines[s].push((({isDimension:e,refLineLayout:t,refLineModel:r,layoutService:n,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var m,f;const p={dir:l,line:{strokeWidth:(null==t||null===(m=t.style)||void 0===m?void 0:m.lineThickness)||2,strokeDasharray:null==t||null===(f=t.style)||void 0===f?void 0:f.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||n.meta.isContinuous?(p.scale=s,p.value=t.refLineExpr.value):p.value=()=>{var e;const i=qo.getScaledPosition({scale:a.scale(s),value:Go.resolveValue({refLineLayout:t,refLineModel:r,layoutService:n}),valueInfo:Go.resolveValueInfo({refLineLayout:t,refLineModel:r,layoutService:n}),size:null===(e=a.component(c))||void 0===e?void 0:e.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:u,layoutService:n,isContinuous:d});return Number.isNaN(i)?void 0:i},p})({isDimension:e,refLineLayout:l,refLineModel:t,layoutService:r,colorModel:n,dockService:i,chart:o,scale:a,axis:s,invert:h,component:c,isContinuous:y}))})),p}const Xo={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function Jo({isDimension:e,refLineModel:t={},layoutService:r,colorModel:n,dock:i,scale:o,style:a,formatter:s,theme:l,localeInfo:u,rtl:c,key:d,path:m}){const f=e?t.dimensionRefLineLabels:m?t.query.getRefLineLabels(m):t.measureRefLineLabels;if(!f.length)return[];const p=[],h=!e||r.meta.isContinuous,y=f.map((e=>(({refLineLayout:e,refLineModel:t,layoutService:r,colorModel:n,scale:i,theme:o,isContinuous:a})=>{const s=n.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=i,l.value=e.refLineExpr.value):(l.value=()=>Go.resolveValue({refLineLayout:e,refLineModel:t,layoutService:r}),l.valueText=()=>Go.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:r}),l.valueInfo=()=>Go.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:r})),l})({refLineLayout:e,refLineModel:t,layoutService:r,colorModel:n,scale:o,theme:l,isContinuous:h})));return p.push((({isDimension:e,layoutService:t,style:r,labels:n,scale:i,formatter:o,dock:a,key:s,rtl:l,theme:u,isContinuous:c,localeInfo:d})=>({key:s,type:"reference-line-labels",renderer:"svg",labels:n,formatter:o,scale:i,layoutService:t,layout:{dock:a,rtl:l},theme:u,isContinuous:c,isDimension:e,localeInfo:d,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:l?2:4,right:l?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===a||"right"===a?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}}}))({isDimension:e,rtl:c,style:U(!0,Xo,a),dock:i,key:d,labels:y,scale:o,formatter:s,layoutService:r,theme:l,isContinuous:h,localeInfo:u})),p}function Zo({layoutService:e,discreteModel:t}){const{isContinuous:r,canBeContinuous:n,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=oe.dimensionless(o),l=qo.getMeasureRefLines(o),u=qo.getDimensionRefLines(o,s),c=qo.getMeasureRefLineLabels(o),d=qo.getDimensionRefLineLabels(o,s);let m={},f={};const p=()=>!(!u||!u.length)&&!u.every((t=>{const o=qo.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(n){const r=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:i}=r;return qo.isOutOfRange({value:t,qMin:n,qMax:i})}return!1})(o)||(t=>{if(!f[t])return!1;if(!r&&i){const r={valueInfo:f[t]},n="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(n);return qo.isOutOfDataPages({label:r,dataPages:i})}return!0})(o)})),h={isKMode:a,canBeContinuous:n,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:f,dimensionValuesInfo:m,query:{getRefLines:e=>qo.getRefLines(o,e),getRefLineLabels:e=>qo.getRefLineLabels(o,e)},update:()=>{f=h.dimensionRefLineInfo,p()&&(m=qo.getDimensionValuesInfo({layout:o,canBeContinuous:n,discreteModel:t,layoutService:e}),h.dimensionValuesInfo=m,u.forEach((t=>{const r=qo.getInputValue({refLineLayout:t,layoutService:e});m[r]&&(f[r]?(f[r].innerValues=m[r].innerValues,f[r].minOrder=Math.min(f[r].minOrder,m[r].minOrder),f[r].maxOrder=Math.max(f[r].maxOrder,m[r].maxOrder),f[r].isMinOrderOk=f[r].isMinOrderOk||m[r].isMinOrderOk,f[r].isMaxOrderOk=f[r].isMaxOrderOk||m[r].isMaxOrderOk):f[r]={id:m[r].id,qText:m[r].qText,innerValues:m[r].innerValues,minOrder:m[r].minOrder,maxOrder:m[r].maxOrder,isMinOrderOk:m[r].isMinOrderOk,isMaxOrderOk:m[r].isMaxOrderOk},f[r].numInnerValues=(f[r].maxOrder||0)-(f[r].minOrder||0)+1)})))}};return h.update(),h}const Qo={combineBounds(e){let t=Number.MAX_VALUE,r=-Number.MAX_VALUE,n=Number.MAX_VALUE,i=-Number.MAX_VALUE;return e.forEach((e=>{e&&(t=Math.min(t,e.x,e.x+e.width),r=Math.max(r,e.x,e.x+e.width),n=Math.min(n,e.y,e.y+e.height),i=Math.max(i,e.y,e.y+e.height))})),{x:t,y:n,width:r-t,height:i-n}}};var ea={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},ta={LINE:"line",BAR:"bar",MARKER:"marker"},ra={PRIMARY:0,SECONDARY:1},na={type:"bar",axis:0};const ia={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 oa(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const aa={getImageSize(e,t){let r;function n(){r&&(clearTimeout(r),r=null)}function i(e){const t=e;t.onload=null,t.onerror=null,n()}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:r,width:l}=s,u=o[t]*(r>l?1:r/l),c=o[t]*(l>r?1:l/r);!r||!l||0===r&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(u,r),width:Math.min(c,l)},n()):(e={height:u,width:c},n()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,r=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function sa(e,t,r,n){var i,o,a,s,l,u;const{app:c,flags:d}=t,m=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!m)return[];const[f]=m,p=f.size||"small",h=f.type||"media";let y=-1;for(let e=0;e<r.length;e++)if(r[e].cId===f.cId){y=e;break}const g=(null===(a=n.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==y&&g[y]&&(v=g[y]),"media"===h&&null!==(l=f.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,r){let n=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,r,n,i,o,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,a=void 0!==t.secure?t.secure:t.isSecure,r=a?"https://":"http://",n=t.host||"localhost",i=t.port?":"+t.port:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o+="/"),r+n+i+o):""}(r);i&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(n,i),n=n.replace(/"/g,'\\"'),n=n.replace(/'/g,"\\'"),n=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(n,i));const{height:o,width:a,imageError:s}=await aa.getImageSize(n,t);return{src:n,size:t,height:o,width:a,imageError:s}}(f,p,c);if("url"===h)return async function(e,t,r,n,i){let o,a=r.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&oa(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:r,width:i,imageError:s}=await aa.getImageSize(t,n);o={src:t,size:n,height:r,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:r}=await aa.getImageSize(a,n);o={src:a,size:n,height:e,width:t,imageError:r}}return o}(c,d,f,p,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&v&&v.label){return async function(e,t,r,n){let i;const o=n.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(oa(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:n,width:o,imageError:a}=await aa.getImageSize(e,r);i={src:e,size:r,height:n,width:o,imageError:a}}}catch(e){}return i}(c,r[y],p,v)}return[]}const la={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:r,opts:n}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(sa(e,n,r,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,r;const n=null===(t=e.layout)||void 0===t||null===(r=t.tooltip)||void 0===r?void 0:r.imageComponents;return!!n&&n.length>0}},ua={async handlePromises({customTooltipModel:e,nodes:t,attrExps:r,opts:n}){let i=t;return i=await la.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:r,opts:n}),i},checkIfPromisesExist:({customTooltipModel:e})=>la.checkIfPromisesExist({customTooltipModel:e})};const ca=(e,t)=>{var r,n,i;const o=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qDimensions,a=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:ia.CHART.CHART_PARENT_TYPE,qId:ia.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},da=e=>{var t,r,n;const i=null===(t=e.tooltip)||void 0===t||null===(r=t.chart)||void 0===r||null===(n=r.object)||void 0===n?void 0:n.refId;return{qInfo:{qType:ia.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const ma={createContainer:({ctx:e,layout:t})=>{var r,n;if(!((null===(r=t.qHyperCube)||void 0===r||null===(n=r.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var r,n,i,o;const a=null!==(r=null===(n=t.tooltip)||void 0===n||null===(i=n.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==r?r:"medium",s=ia.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:ia.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:r,dimIndex:n,customTooltipModel:i,rtl:o})=>{var a,s,l;const u=i,c=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!=u&&u.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&c&&!(t.qHyperCubeDef.qDimensions.length<=0)){await ma.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:r}){const n=r,i=ia.CHART.STATE,o=t.qStateName;n.miniChartToken.alternateState||(n.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),n.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:r}){var n;const i=r;null!==(n=i.miniChartToken.sessionObj)&&void 0!==n&&n.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=ia.CHART.STATE,a=ca(t,o),s=await e.createSessionObject(a),l=da(t);if(s.id!==ia.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var d,m,f,p;const e=r.length>0&&void 0!==(null===(d=r[0].data)||void 0===d?void 0:d.value)?[null===(m=r[0].data)||void 0===m?void 0:m.value]:[],a=void 0!==n?n:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===n&&r.length>0){var h,y;const e=null!==(h=r[0].data.selectionOuterDimension)&&void 0!==h?h:r[0].data.selectionDimension;if(null!=e&&null!==(y=e.source)&&void 0!==y&&y.field){var g;const t=null==e||null===(g=e.source)||void 0===g?void 0:g.field.split("/"),r=t[t.length-1],n=void 0!==e.value?[e.value]:[];n.length>0&&void 0!==r&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(r),n,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(ia.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await i.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(f=u.miniChartToken.model)||void 0===f?void 0:f.id,type:null===(p=u.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await ma.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const r=t;null!=r&&r.embed&&(ma.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(ia.CHART.CHART_OBJECT_ID),r.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const r=t,n=ia.CHART.STATE;await e.removeSessionAlternateState(n),r.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,r;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(r=t.vis)||void 0===r?void 0:r.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function fa(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function pa(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:r,IMAGES:n}=ia.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[r]=!0,i[n]=!0,i}function ha(e){const t=pa();return e.filter((e=>t[e.id]))}const ya={getNodes(e,t){const r=function(e,t){let r=0,n=0;e.center?(r+=e.center.x,n+=e.center.y):(r+=e.clientX,n+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:r-i.left,cy:n-i.top}}(e,t);return t.shapesAt({x:r.cx,y:r.cy})},getDataNodes(e,t){let r,n=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const u=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!u||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=[],n.push(e)}}else{r||(r=[],Object.keys(i).forEach((t=>{r=r.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key])))})));const t=r.filter((e=>{var t,r;const n=null!==(t=null!==(r=e.data.stack)&&void 0!==r?r:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return n&&n.value===u.value&&n.label===u.label}));t.length>0&&(n=n.concat(t[0]))}})),n},displayTooltip(e,t,{nodes:r,opts:n={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=ya.getAttrExprData(a);o.length||r.length?ua.handlePromises({customTooltipModel:i,nodes:ya.getDataNodes(s,o.length>0?o:r),attrExps:l,opts:n}).then((()=>{t.emit("show",e,r.length?{nodes:r}:void 0)})):t.emit("show",e,r.length?{nodes:r}:void 0)}else{var s,l;null!==(s=n.flags)&&void 0!==s&&s.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=i&&null!==(l=i.miniChartToken)&&void 0!==l&&l.alternateState&&ma.hide({app:n.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>ua.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var r;const n=t,i=null!==(r=e.qHyperCubeDef)&&void 0!==r&&r.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[i]||(n[i]=[]),n[i]},getAttrExprData(e){var t;let r=[],n="";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;r=(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)||[],n=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:r,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){var r,n;if(!(null===(r=e.qLayoutExclude)||void 0===r||null===(n=r.quarantine)||void 0===n?void 0:n[ia.CUSTOM.QUARANTINE])){!function(e,t){const r=t;let n=r.qLayoutExclude;n||(r.qLayoutExclude={quarantine:{}},n=r.qLayoutExclude),n.quarantine||(n.quarantine={}),n.quarantine[ia.CUSTOM.QUARANTINE]=[],e.forEach((e=>{n.quarantine[ia.CUSTOM.QUARANTINE].push(e)})),r.qLayoutExclude=n}(ha(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,r;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(r=t.quarantine)||void 0===r?void 0:r[ia.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[ia.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const r=fa(e);if(!r)return;const n=void 0!==t?t:r.length-1;if(!r[n])return;const i=this.getAttrExps(e,r[n]);if(0===ha(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)||[],r=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[n].qAttributeExpressions=r:s.qHyperCube.qDimensionInfo[n].qAttrExprInfo=r}},moveCustomTooltipAttrs(e,t={},r){let n=[];const i=fa(e)||[];[...i,t].forEach((e=>{const t=ha(e.qAttributeExpressions||[]);t.length>0&&(n=t)}));const o=pa(),a=i.map((e=>{const t=e,r=e.qAttributeExpressions||[];return t.qAttributeExpressions=r.filter((e=>!o[e.id])),t})),s=void 0!==r?r:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(n));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:he.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const r=he.detectTextDirection(e.src),n=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){n.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const r=e.imageError?`${e.src}?${Math.random()}`:e.src;n.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:r,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,n),""],style:{"text-align":t.rtl?"right":"left",direction:r,"max-width":e.width},colspan:2},{}]}};function ga(e,t,r,n){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[r])||void 0===o||null===(a=o[n])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[n]?e.qSubNodes[n].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const i=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let r;switch(e.id){case ia.CUSTOM.EXPRESSION:r="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case ia.CUSTOM.TITLE:case ia.CUSTOM.DESCRIPTION:case ia.CUSTOM.IMAGES:r=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:r="NaN"}return r}(e,i);l.push({source:{key:"qHyperCube",field:`${r}/${n}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const va={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const r=t-1,n="qDimensionInfo";return{field:`${n}/${r}`,value:t=>ga(t,e,n,r)}}};const ba={getCustomAttrExps(e,t,r){var n,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(n=t.data)||void 0===n||null===(i=n.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,r,n){const i={[ia.CUSTOM.TITLE]:!0,[ia.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=ya.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===ia.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:r("qHyperCube").field(`${a}/${o}`).formatter()(s.value);n.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&&n.customTooltipInfoAttrExpsArr.push({...e.id===ia.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),n}(r,a.map((t=>ye.getMeasure(e,t))),e,o)}};function xa({nodes:e,layout:t,dataset:r}){return function(e,t,r){const n=[];return e.forEach((e=>{n.push(ba.getCustomAttrExps(r,e,t))})),n}(e,t,r).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function Ma({key:e,source:t,layoutService:r,fieldModel:n,colorService:i,series:o}){const{meta:a}=r;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=n.main,l=o.filter((e=>e.type===ta.BAR)),u=r.meta.isContinuous?s:a,c=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:n,refIndex:o})=>({source:t,field:a,value:r.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},segment:{field:e,value:c,reduceLabel:"none"},end:{field:e,value:c,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:n,...i.getDatumProps(o),customTooltipAttrExps:va.getNode(r.getLayout(),r.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function Sa({key:e,series:t,source:r,fieldModel:n,colorService:i,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=n.main,l=e=>"NaN"!==e.qNum?e.qNum:0,u=o.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:n,options:s},c)=>({source:r,field:a,value:o.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:c,typeIndex:n,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:va.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}})))}}]}return[]}function Ea({key:e,layoutService:t,fieldModel:r,series:n}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=r.main,a=n.filter((e=>e.type===ta.BAR)),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const Ca={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var qa={OPTIONS:Ca,DEFAULT:Ca.MINI_CHART};function Oa({layoutService:e,discrete:t}){return({h:r,rect:n,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,u=n[l?"width":"height"];let c=a.qArea.qTop/s*u,d=a.qArea.qHeight/s*u;if(d<o){const e=(o-d)/2;c=c-e+(Math.max(0,0-(c-e))-Math.max(0,c+d+e-u)),d=o}return r("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:c,width:d}:{top:c,left:0,height:d}}})}}function Aa({layoutService:e,viewState:t,viewCache:r}){return e.meta.isContinuous?function(e,t){const r=e.get("zoom"),n=t.get("continuousMin"),i=t.get("continuousMax");return[(r.min-n)/(i-n),(r.max-n)/(i-n)]}(t,r):function(e){return e.get("viewRange")}(t)}const Da=e=>({miniChart:e===qa.OPTIONS.MINI_CHART.value,bar:e===qa.OPTIONS.BAR.value,none:e===qa.OPTIONS.NONE.value});function Na({layoutService:e,override:t}){const r=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Da(t);const r=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===r)return Da(qa.DEFAULT.value);const n=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return Da(!r&&(n||!n&&i)?qa.OPTIONS.NONE.value:qa.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:r})&&(r.miniChart=t.value===qa.OPTIONS.MINI_CHART.value,r.bar=t.value===qa.OPTIONS.BAR.value,r.none=t.value===qa.OPTIONS.NONE.value),r}function Ta({componentKey:e,chart:t,viewState:r,viewCache:n,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:u}=s.center,c=t.element.getBoundingClientRect(),d=t.component(e),m="horizontal"===o.meta.major.orientation,f=m?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,p=m?d.rect.computedInner.width:d.rect.computedInner.height,h=m&&a?p-f:f,y=Math.max(0,Math.min(h/p,1)),[g,v]=Aa({layoutService:i,viewState:r,viewCache:n}),b=y<g,x=y>v,M=!b&&!x;return{pixel:h,relative:y,thumb:M?h-g*p:0,beforeThumb:b,afterThumb:x,onThumb:M}}}function Ia({componentKey:e,chart:t,viewState:r,viewCache:n,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:u}=a.rect.computedInner,c="horizontal"===s?l:u,[d,m]=Aa({layoutService:i,viewState:r,viewCache:n});return{size:c,thumbSize:(m-d)*c}}}function wa({componentKey:e,chart:t,actions:r,viewState:n,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=Ta({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=Ia({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(n,i)=>!i||!!r.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{scrollbarTap(r){r.preventDefault();const a=u(r);if(o.meta.isContinuous){const e=n.get("zoom"),t=e.max-e.min,r=i.get("continuousMin"),o=i.get("continuousMax"),s=r+(o-r)*a.relative;n.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,r+t)})}else{const e=c(),t=a.pixel-e.thumbSize/2,r=Math.max(0,t/e.size);s.command.scrollTo(r)}t.component(e).emit("render")}}}}function La({e:e}){return(e.srcEvent||e).srcElement.getAttribute("data-scrollbar-handle")||""}const Ra="scrollbarResize";function ka({componentKey:e,chart:t,actions:r,viewState:n,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=Ta({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:Ra,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!r.scroll.enabled())&&(!t||(this[Ra]=this[Ra]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&La({e:t})&&(this[Ra].panningEvent=t.srcEvent),!!this[Ra].panningEvent))}},events:{scrollbarResizestart(r){r.preventDefault(),this[Ra]=this[Ra]||{},this[Ra].panningEvent&&t.component(e).emit("dragStart",this[Ra].panningEvent)},scrollbarResizemove(r){if(r.preventDefault(),this[Ra]=this[Ra]||{},!this[Ra].panningEvent)return;const o=n.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),u=i.get("minimiumZoomSpan"),c=(s-a)*l(r).relative+a,d=La({e:this[Ra].panningEvent});let m="start"===d?Math.min(c,o.max):o.min,f="end"===d?Math.max(c,o.min):o.max;m===f&&(m-="start"===d?u:0,f+="end"===d?u:0),n.set("zoom",{min:m,max:f}),t.component(e).emit("render")},scrollbarResizeend(r){r.preventDefault(),this[Ra]=this[Ra]||{},delete this[Ra].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(r){r.preventDefault(),this[Ra]=this[Ra]||{},delete this[Ra].panningEvent,t.component(e).emit("dragEnd")}}}}const Pa="scrollbarPan";function ja({componentKey:e,chart:t,actions:r,viewState:n,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=Ta({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=Ia({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:Pa,threshold:0,enable(n,i){return this[Pa]=this[Pa]||{},!(i&&!this[Pa].isPanning)||!!r.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e)))}},events:{scrollbarPanstart(r){r.preventDefault();const a=u(r);if(this[Pa]=this[Pa]||{},this[Pa].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=n.get("zoom"),t=e.max-e.min,r=i.get("continuousMin"),o=i.get("continuousMax"),s=r+(o-r)*a.relative;s<e.min?n.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,r+t)}):s>e.max&&n.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,r+t)}),this[Pa].relative=a.relative,this[Pa].zoom=n.get("zoom"),this[Pa].zoom.span=this[Pa].zoom.max-this[Pa].zoom.min,this[Pa].zoom.fullSpan=o-r}else if(a.onThumb)this[Pa].offset=a.thumb;else{const e=c();this[Pa].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(r){r.preventDefault();const a=u(r);if(this[Pa]=this[Pa]||{},o.meta.isContinuous){const e=a.relative-this[Pa].relative,{fullSpan:t,span:r,min:o,max:s}=this[Pa].zoom,l=i.get("continuousMin"),u=i.get("continuousMax");n.set("zoom",{min:Math.min(o+e*t,u-r),max:Math.max(s+e*t,l+r)})}else{const e=a.pixel-(this[Pa].offset||0),t=c(),r=Math.max(0,e/t.size);s.command.scrollTo(r)}t.component(e).emit("render")},scrollbarPanend(r){r.preventDefault(),this[Pa]=this[Pa]||{},this[Pa].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(r){r.preventDefault(),this[Pa]=this[Pa]||{},this[Pa].isPanning=!1,t.component(e).emit("unlockState")}}}}function Fa({componentKey:e,chart:t,actions:r,viewState:n,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[wa({componentKey:e,chart:t,actions:r,viewState:n,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),ka({componentKey:e,chart:t,actions:r,viewState:n,viewCache:i,layoutService:o,dockService:a,rtl:l}),ja({componentKey:e,chart:t,actions:r,viewState:n,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function Va({componentKey:e,chart:t,actions:r,layoutService:n}){const i=(i,o)=>{if(!n.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&r.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}const _a={background:"rgba(0, 0, 0, 0.1)"},Ba={top:-1,bottom:-1,width:6},Ha={width:2,background:"#595959"};var $a={before:_a,after:_a,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Ba,endHandle:Ba,startHandleBorder:Ha,endHandleBorder:Ha};const za={background:"rgba(0, 0, 0, 0.1)"},Ua={top:-1,bottom:-1,width:6},Ya={width:2,background:"#595959"};var Wa={before:za,after:za,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Ua,endHandle:Ua,startHandleBorder:Ya,endHandleBorder:Ya};const Ga={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Ka={pointerEvents:"initial"},Xa={pointerEvents:"none"};const Ja="ew-resize",Za="default";function Qa(){const{rect:e}=this,{settings:t}=this.settings,r="horizontal"===t.orientation,n=r?e.computedInner.width:e.computedInner.height,i=t.range(),o=r&&t.rtl;return{size:n,start:(o?1-i[1]:i[0])*n,end:(o?1-i[0]:i[1])*n}}function es(){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?Ja:Za}function ts(e,t,r){const{min:n}=this.settings.settings.size.thumb;if(r-t<n){const i=(n-(r-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,r+i-e);return{size:e,start:t-i+o,end:r+i+o}}return{size:e,start:t,end:r}}function rs(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function ns(){const{size:e,start:t,end:r}=Qa.call(this);this.renderer.render(this.elements(this.h,ts.call(this,e,t,r)))}function is(){const{state:e,settings:t,style:r}=this,n=t.settings.style;return e.style[n]||(e.style[n]=function({id:e,style:t}){const r="slim"===e?Wa:$a;return{container:{...Ga},before:{...Ga,...r.before,...t.before},after:{...Ga,...r.after,...t.after},thumb:{...Ga,...r.thumb,...t.thumb},startHandle:{...Ga,...Ka,...r.startHandle},endHandle:{...Ga,...Ka,...r.endHandle},startHandleBorder:{...Ga,...Xa,...r.startHandleBorder},endHandleBorder:{...Ga,...Xa,...r.endHandleBorder}}}({id:t.settings.style,style:r[n]})),e.style[n]}var os={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(){ns.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||!rs.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=La({e:e});t&&(this.state.hover[t]=!0),es.call(this),ns.call(this)},leave(){this.state.locked||(this.state.hover.reset(),es.call(this),ns.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=La({e:e});t&&(this.state.drag[t]=!0),es.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),es.call(this),ns.call(this))}},preferredSize({outer:e}){const{min:t,max:r,ratio:n}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(r,e[i]*n))},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:r,end:n}=Qa.call(this);return this.elements(e,ts.call(this,t,r,n))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:r,end:n}){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:r,end:n,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:u,injections:c}){const d={[i.end]:t-r},m={[i.start]:n},f={left:-3},p={left:1},h={right:-3,left:"auto"},y={left:3},g=e("div",{style:{...s.before,...u?m:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...u?d:m},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...u?h:f},class:"scrollbar--start-handle","data-scrollbar-handle":"start"},o?e("div",{style:{...s.startHandleBorder,...u?y:p}}):void 0);b.push(t);const r=e("div",{style:{...s.endHandle,...u?f:h},class:"scrollbar--end-handle","data-scrollbar-handle":"end"},a?e("div",{style:{...s.endHandleBorder,...u?p:y}}):void 0);b.push(r)}const x=e("div",{style:{...s.thumb,[i.start]:r,[i.end]:t-n},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[g,x,v,...c])}({h:e,size:t,start:r,end:n,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:is.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function as({layoutService:e}){return e.meta.isContinuous&&Na({layoutService:e}).miniChart}function ss({models:e}){const{layoutService:t,fieldModel:r,seriesModel:n,colorService:i}=e,{primarySeries:o,secondarySeries:a}=n.meta,s=n.query.series(ta.LINE),l=[...Sa({forceCreate:!0,key:ea.COLLECTION.PRIMARY,series:o,fieldModel:r,colorService:i,layoutService:t}),...Sa({key:ea.COLLECTION.SECONDARY,series:a,fieldModel:r,colorService:i,layoutService:t}),...Sa({key:ea.COLLECTION.LINE,series:s,fieldModel:r,colorService:i,layoutService:t}),...Ma({key:ea.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:r,colorService:i,series:o}),...Ma({key:ea.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:r,colorService:i,series:a}),...Ea({key:ea.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:r,series:o}),...Ea({key:ea.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:r,series:a})];return as(e)&&(l.push(...Sa({key:ea.COLLECTION.REDUCED,source:ea.DATA.REDUCED,series:n.query.all(),fieldModel:r,colorService:i,layoutService:t})),l.push(...Sa({key:ea.COLLECTION.REDUCED_PRIMARY,source:ea.DATA.REDUCED,series:o,fieldModel:r,colorService:i,layoutService:t})),l.push(...Sa({key:ea.COLLECTION.REDUCED_SECONDARY,source:ea.DATA.REDUCED,series:a,fieldModel:r,colorService:i,layoutService:t})),l.push(...Ma({key:ea.COLLECTION.REDUCED_STACKED_PRIMARY,source:ea.DATA.REDUCED,layoutService:t,fieldModel:r,series:n.meta.primarySeries.filter((e=>e.type===ta.BAR)),colorService:i})),l.push(...Ma({key:ea.COLLECTION.REDUCED_STACKED_SECONDARY,source:ea.DATA.REDUCED,layoutService:t,fieldModel:r,series:n.meta.secondarySeries.filter((e=>e.type===ta.BAR)),colorService:i}))),l}const ls=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function us({models:e}){const{dockService:t,seriesModel:r}=e;if(1!==r.meta.measureAxes.length)return.5;const n=r.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;return"horizontal"===t.meta.minor.orientation?"near"===n||"bottom"===n?1:0:"near"===n||"left"===n?0:1}const cs=({models:e,environment:t})=>{const{fieldModel:r,discreteModel:n,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:r.main.major,props:{selectionDimension:{field:r.main.major}}}},maxPxStep:ls({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:n.query.getScaleRange,align:us({models:e})}},ds=({models:e,environment:t})=>{const{fieldModel:r,discreteModel:n,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:r.main.major}},measureCount:i.meta.groupSize,maxPxStep:ls({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:n.query.getScaleRange,align:us({models:e})}};function ms({viewState:e,models:t,environment:r}){const{fieldModel:n,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===r.options.direction,data:{extract:{field:n.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function fs({viewCache:e,mainMajor:t}){return U(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function ps({viewState:e,viewCache:t,layoutService:r}){return t.set("qTimeAxisCache",[]),{get:(e,r=0)=>{const n=t.get("qTimeAxisCache");return n[r]&&n[r][0]===e?n[r][1]:void 0},set:(e,r,n=0)=>{t.get("qTimeAxisCache")[n]=[e,r]},key:({distance:n})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=r.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[n,Number.parseFloat(a).toFixed(12),...s].toString()}}}function hs({picasso:e,viewState:t,viewCache:r,models:n,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=n,{measureText:u}=e.renderer("svg")(),{majorNumeric:c}=a.main,d=l.getStyles(),m={type:"time",data:{field:c},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:c,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>u({text:e,fontFamily:d.axis.label.name.fontFamily,fontSize:d.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:ps({viewState:t,viewCache:r,layoutService:o})};return{[ea.SCALE.MAJOR]:U(!0,{},m,{ticks:{level:"outer"}}),[ea.SCALE.MAJOR_INNER]:U(!0,{},m,{ticks:{level:"inner"}})}}function ys({picasso:e,models:t,viewState:r,viewCache:n,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...hs({picasso:e,viewState:r,viewCache:n,models:t,environment:i})}:o.isContinuous?{[ea.SCALE.MAJOR]:ms({models:t,viewState:r,environment:i})}:o.isBarSeriesGrouped?{[ea.SCALE.MAJOR]:ds({models:t,environment:i})}:{[ea.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?ds({models:t,environment:i}):cs({models:t,environment:i})};return as(t)?{...a,[ea.SCALE.REDUCED]:fs({viewCache:n,mainMajor:a[ea.SCALE.MAJOR]})}:a}function gs({fields:e,tickModel:t,dockService:r,environment:n}){const i="rtl"===n.options.direction,{orientation:o}=r.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function vs({layoutService:e,tickModel:t,dockService:r,environment:n}){if(!as({layoutService:e}))return;const i="rtl"===n.options.direction,{orientation:o}=r.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}function bs({picasso:e,models:t,viewState:r,viewCache:n,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:u,dockService:c}=t;return{...ys({picasso:e,models:t,viewState:r,viewCache:n,environment:i}),[ea.SCALE.MINOR.PRIMARY]:gs({fields:a.main.minorsPrimary,tickModel:s,dockService:c,environment:i}),[ea.SCALE.MINOR.SECONDARY]:gs({fields:a.main.minorsSecondary,tickModel:l,dockService:c,environment:i}),[ea.SCALE.MINOR.REDUCED_PRIMARY]:vs({layoutService:o,tickModel:s,dockService:c,environment:i}),[ea.SCALE.MINOR.REDUCED_SECONDARY]:vs({layoutService:o,tickModel:l,dockService:c,environment:i}),...u.custom.wrappedScales()}}var xs={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const Ms=["all","labels"];function Ss({models:e}){const{layoutService:t,dockService:r,seriesModel:n,themeService:i}=e,o=t.getLayoutValue("measureAxes");if(!o||!o.length)return!1;const a=i.getStyles(),{measureAxes:s}=n.meta;return s.filter((e=>{const t=e.isPrimary?0:1;return Ms.some((e=>o[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?ea.COMPONENT.AXIS.MINOR.PRIMARY:ea.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?r.meta.minor.dock:r.meta.minorSecondary.dock,minimumLayoutMode:xs.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:a.axis.label.name.fontFamily,fontSize:a.axis.label.name.fontSize,fill:a.axis.label.name.color},line:{stroke:a.axis.line.major.color},ticks:{stroke:a.axis.line.major.color},minorTicks:{stroke:a.axis.line.minor.color}}})))}var Es=.5,Cs=3,qs=13;function Os({models:e,environment:t}){const{layoutService:r,dockService:n,themeService:i}=e,o="rtl"===t.options.direction,a=r.getLayoutValue("dimensionAxis"),s=i.getStyles(),l=(({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[r]=e.getDataPages(),n=r?r.qMatrix:[];return ue.getAdjustedMaxGlyphCount(t,n,0,"qText")})({layoutService:r}),{orientation:u}=n.meta.major;return{type:"axis",key:ea.COMPONENT.AXIS.MAJOR,scale:ea.SCALE.MAJOR,layout:{dock:n.meta.major.dock,minimumLayoutMode:xs.AXIS.MAJOR[u.toUpperCase()]},settings:{labels:{mode:a.label,tiltAngle:o?-40:40,maxEdgeBleed:50,maxLengthPx:n.meta.minor.size/4,maxGlyphCount:l,tiltThreshold:l>Cs&&l<qs?1:void 0,fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color}},brush:{consume:[{context:"selection",style:{inactive:{opacity:Es}}}]}}}function As({models:e}){const{dockService:t,themeService:r}=e,{orientation:n}=t.meta.major,i=r.getStyles();return{type:"axis",key:ea.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:ea.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:xs.AXIS.MAJOR[n.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:i.axis.label.name.fontFamily,fontSize:i.axis.label.name.fontSize,fill:i.axis.label.name.color},line:{show:!1}}}}function Ds({models:e,environment:t}){const{layoutService:r}=e,n=r.getLayoutValue("dimensionAxis");if(!n)return[];const{show:i}=n;return"none"===i||"title"===i?[]:r.meta.isTime?function({models:e,environment:t}){const{dockService:r,themeService:n}=e,i="rtl"===t.options.direction,{orientation:o}=r.meta.major,a="bottom"===r.meta.major.dock?0:1,s=n.getStyles(),l=i?1:0,u={type:"time-axis",renderer:"svg",layout:{dock:r.meta.major.dock,minimumLayoutMode:xs.AXIS.MAJOR[o]},preferredSize:()=>({size:2*parseFloat(s.axis.label.name.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:i?"end":"start",label:{align:a,justify:l},guideLine:{major:{justify:l},minor:{align:a}},line:{show:!1}},style:{label:{fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color},majorGuideLine:{stroke:s.axis.line.major.color},minorGuideLine:{stroke:s.axis.line.minor.color}}};return[U(!0,{},u,{key:ea.COMPONENT.AXIS.TIME_INNER,scale:ea.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:s.axis.line.minor.color},minorGuideLine:{stroke:s.axis.line.major.color}}}),U(!0,{},u,{key:ea.COMPONENT.AXIS.TIME_OUTER,scale:ea.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):r.meta.isContinuous?[As({models:e})]:[Os({models:e,environment:t})]}const Ns=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:r})=>e([r.value,t])+e.bandwidth()/2:null,Ts=({layoutService:e,seriesModel:t,rtl:r,orientation:n})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,r&&"horizontal"===n?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,r&&"horizontal"===n?1:0])+e.bandwidth():null;function Is({layoutService:e,active:t={},inactive:r={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t,r;return!0===(null===(t=e.data)||void 0===t||null===(r=t.null)||void 0===r?void 0:r.value)?0:1},...t},inactive:{opacity:e=>{var t,r;return!0===(null===(t=e.data)||void 0===t||null===(r=t.null)||void 0===r?void 0:r.value)?0:Es},...r}}}]}}var ws="max",Ls="min";function Rs(e,t){return function(e,t){const{hasExplicitMax:r}=t.meta,{max:n}=t.explicit;return!!r&&e>n}(e,t)||function(e,t){const{hasExplicitMin:r}=t.meta,{min:n}=t.explicit;return!!r&&e<n}(e,t)}const ks=(e,t)=>`${e}-${t.id}`,Ps=4,js=12,Fs=4;function Vs({chart:e,layoutService:t,dockService:r,markerKey:n,markerType:i}){if(t.meta.isContinuous)return()=>Fs+"px";const o={size:void 0},a="horizontal"===r.meta.major.orientation?"width":"height";return t=>{if(!o.size){const r=e.component(n),s=t.resources.scale(ea.SCALE.MAJOR),l=r.rect[a]*s.bandwidth()*.25,u=Math.max(Ps,Math.min(js,l));o.size=("bar"===i?2*u:u)+"px"}return o.size}}const{isDark:_s}=lt;const Bs=({chart:e,models:t,series:r,environment:n})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,c=a.getColor(),{fill:d,marker:m}=r.options,{isContinuous:f}=i.meta,p="rtl"===n.options.direction,{orientation:h}=s.meta.major,y="horizontal"===h,g=(r.isPrimary?l:u).query.getExtrema(),v=({end:e})=>{const{value:t}=e;return Rs(t,g)},b=ks(ea.COMPONENT.MARKER,r);return{type:"point",key:b,data:{filter:e=>r.ref===e.end.source.field,collection:r.collection},settings:{[y?"x":"y"]:{scale:ea.SCALE.MAJOR,fn:Ts({layoutService:i,seriesModel:o,rtl:p,orientation:h}),ref:f?"major":void 0},[y?"y":"x"]:{scale:r.scale,ref:"end",fn:e=>{var t;const r=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(r))}},fill:d?c:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||v(e.datum)?0:1},stroke:e=>{const t=c(e);return d?_s(t)?function(e){return Fe(e).brighter(.5).toString()}(t):function(e){return Fe(e).darker().toString()}(t):t},size:Vs({chart:e,layoutService:i,dockService:s,markerKey:b,markerType:m}),shape:()=>(({marker:e,horizontal:t,rtl:r})=>{let n;return"triangle"!==e||t||(n=r?"left":"right"),"bar"===e&&(n=t?"horizontal":"vertical"),n?{type:e,direction:n}:{type:e}})({marker:m,horizontal:y,rtl:p})},brush:Is({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:Es}}})}};function Hs({property:e="end",isHorizontal:t,isColor:r,fallback:n,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(ea.SCALE.MAJOR),u=s(ea.SCALE.COLOR),c=t&&i?[...a.points].reverse():a.points,d=c.reduce(((t,r,n)=>{const i="NaN"===r[e].value||Number.isNaN(r[e].value),o=c[n+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(r):t.push(r),t}),[]),m="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),f=d.map(m),p=Math.min(...f),h=Math.max(...f)-p,y=0===h?1:h,g=f.map(((e,t)=>0===t?0:t===f.length-1?1:(e-p)/y)),v=[];for(let t=0;t<d.length;t++){const i=d[t],o=i.color&&i.color.value,a=r?o||n:u(o)||n,s=0===t,l=t===d.length-1,c=g[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const r=d[t-1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((c-(c-g[t-1])/2).toFixed(5)))}):v.push({color:a,offset:c});const n=d[t+1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((c+(g[t+1]-c)/2).toFixed(5)))}):v.push({color:a,offset:c})}}const b=v.reduce(((e,t,r)=>{if(t.virtual){const t=v[r-1],n=v[r+1],i=t.offset+(n.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:n.color,offset:i})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function $s({environment:e,models:t,measureIndex:r}){const{layoutService:n,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=n.meta,{mode:l,type:u,nil:c}=i.getSettingsForMeasure(r),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===u)return i.getColor();if("measure"===l&&"categorical"===u)return i.getColor();const m=n.getHyperCubeValue(`qMeasureInfo.${r}.color`);if(null!=m&&m.on)return"byExpression"===m.mode?Hs({isHorizontal:d,isColor:!0,fallback:c,rtl:a}):i.getColor();const f=n.getLayoutValue("color",{}),p=!f.auto&&"byExpression"===f.mode,h=!!f.colorExpression;if(p&&!h)return c;const y=!f.auto&&"byMeasure"===f.mode&&f.byMeasureDef&&void 0!==f.byMeasureDef.activeMeasureIndex;return s||!y?Hs({isHorizontal:d,isColor:"color"===u,fallback:c,rtl:a}):"continuous"===u?function({isHorizontal:e,rtl:t}){return function(r){const{datum:{points:n},resources:{scale:i}}=r,o=i(ea.SCALE.COLOR),a=n.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/c))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:r,rtl:n}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(ea.SCALE.COLOR),l=o.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),u=Math.min(...l),c=Math.max(...l),d=t?Math.min(0,u):u,m=(t?Math.max(0,c):c)-d,f=0===m?1:m,p=s.domain(),h=[];for(let e=0;e<p.length-1;e++){const t=p[e],n=s(t)||r;h.push({color:n,offset:Math.min(1,Math.max(0,(t-d)/f))});const i=p[e+1];h.push({color:n,offset:Math.min(1,Math.max(0,(i-d)/f))})}return{type:"gradient",x1:!e&&n?1:0,x2:e||n?0:1,y1:e?1:0,y2:0,stops:h}}}({isHorizontal:d,fallback:c,rtl:a})}const zs=({models:e,environment:t,series:r})=>{const{layoutService:n,seriesModel:i,dockService:o,styleModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=o.meta.major,u=Ts({layoutService:n,seriesModel:i,rtl:s,orientation:l});return{key:ks(ea.COMPONENT.LINE,r),type:"line",data:{filter:e=>r.ref===e.end.source.field,collection:r.collection},settings:{coordinates:{major:{scale:ea.SCALE.MAJOR,fn:u},minor:{scale:r.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:$s({models:e,environment:t,measureIndex:r.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:r.options.showAsConnections,orientation:o.meta.major.orientation},brush:Is({layoutService:n,active:{stroke:void 0,strokeWidth:void 0,opacity:Es},inactive:{opacity:Es}})}};var Us={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function Ys({series:e,layoutService:t}){const{showAsConnections:r}=e.options,n=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:r}=e.end;return"NaN"===r||Number.isNaN(r)}}({layoutService:t}),i=r?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!n({item:e}))):(e,t)=>0!==e&&!n({item:t[e-1]}),o=r?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!n({item:e}))):(e,t)=>e!==t.length-1&&!n({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const Ws=3,Gs=20;function Ks({models:e,series:t,environment:r}){const{layoutService:n,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,selectionService:c}=e,d=n.getLayoutValue("dataPoint.show",!1),{orientation:m}=a.meta.major,f="horizontal"===m,p="SPARK"===a.meta.chart.mode,h=i.getColor(),{POINT:y}=Us,g=function({layoutService:e,series:t}){const r={key:void 0,map:void 0},n=Ys({series:t,layoutService:e});return({item:e,items:t})=>{r.key!==t&&(r.key=t,r.map=function({items:e}){return e.reduce(((e,t)=>{const{value:r}=t.line;return e[r]||(e[r]={items:[],keys:[]}),e[r].items.push(t),e[r].keys.push(`${t.major.value}-${t.line.value}`),e}),{})}({items:t}));const{value:i}=e.line,o=r.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:u}=n({index:s,items:o.items});return!l&&!u}}({series:t,layoutService:n}),v="rtl"===r.options.direction,b=(t.isPrimary?l:u).query.getExtrema(),{isContinuous:x}=n.meta,M=({end:e})=>{const{value:t}=e;return Rs(t,b)};return{type:"point",key:ks(ea.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:f?y.SIZE.DEFAULT/2:0}}),settings:{[f?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const r=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(r))}},[f?"x":"y"]:{scale:ea.SCALE.MAJOR,fn:Ts({layoutService:n,seriesModel:o,rtl:v,orientation:m}),ref:"major"},sizeLimits:{minPx:Ws,maxPx:Gs},size:e=>{const{value:t}=e.datum.line;return s.query.point.getSize(t)+"px"},fill:h,opacity:({datum:e,data:t})=>{var r;return null!==(r=e.null)&&void 0!==r&&r.value||M(e)?0:p?g({item:e,items:t.items})?1:0:d||g({item:e,items:t.items})?1:0}},brush:Is({layoutService:n,active:{r:e=>e.r+Us.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||M(e.data))return 0;if(!x||d)return 1;const{event:r,components:n=[]}=(null==c?void 0:c.getSelectionInfo())||{};if("continuousRange"===r)return 0;if("tap"!==r)return 1;return[ea.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ea.COMPONENT.AXIS_OVERLAY.TIME_INNER,ea.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>n.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const Xs=(e,{dataset:t})=>{var r;if(null!==(r=e.null)&&void 0!==r&&r.value)return"-";const{value:n,label:i,source:o}=e.end,a=t(o.key).field(o.field);return a.raw().isCustomFormatted?i:a.formatter()(n)};function Js({chart:e,models:t,environment:r,series:n,lineSeries:i}){const{layoutService:o,dockService:a,themeService:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,{id:c}=n,d="rtl"===r.options.direction,m=o.getLayoutValue("dataPoint");if(!m)return!1;if(!m.show||!m.showLineLabels)return!1;const f=(n.isPrimary?l:u).query.getExtrema(),p=s.getStyles();return{type:"point-label",key:`${ea.COMPONENT.POINT_LABEL}-${c}`,layout:{displayOrder:2,minimumLayoutMode:xs.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:n.options.showAsConnections,label:t=>Xs(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{labelSpace:ea.COMPONENT.LABEL_SPACE,point:`${ea.COMPONENT.POINT}-${c}`,allPoints:i.map((e=>`${ea.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>Rs(e.value,f))(e.data)},style:{fontFamily:p.label.value.fontFamily,fontSize:p.label.value.fontSize,fill:p.label.value.color}}}const Zs=({chart:e,dock:t})=>{let r=t;const n=e.component(`${ea.COMPONENT.SLICED_HAT}-${ws}`),i=e.component(`${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.PRIMARY}`),o=e.component(`${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.SECONDARY}`);return n?r=`@${ea.COMPONENT.SLICED_HAT}-${ws}`:i?r=`@${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.PRIMARY}`:o&&(r=`@${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.SECONDARY}`),r},Qs=({dockPosition:e,orientation:t,rtl:r})=>{let n=1;return e!==`@${ea.COMPONENT.SLICED_HAT}-${ws}`&&e!==`@${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.PRIMARY}`&&e!==`@${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.SECONDARY}`||!("horizontal"===t||"vertical"===t&&r)||(n=4),e!==`@${ea.COMPONENT.SLICED_HAT}-${Ls}`&&e!==`@${ea.COMPONENT.SLICED_HAT}-${Ls}-${ra.PRIMARY}`&&e!==`@${ea.COMPONENT.SLICED_HAT}-${Ls}-${ra.SECONDARY}`||"vertical"!==t||r||(n=4),n};function el({chart:e,models:t,environment:r,lineSeries:n}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),u="rtl"===r.options.direction;if(!n.length)return!1;if(!l.show||!l.showLineLabels)return!1;const c="horizontal"===o.meta.major.orientation,{show:d}=i.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=o.meta.major;if(c&&"top"===e)return!1;if(!c&&e===(u?"left":"right"))return!1}const m=u?"left":"right";return{type:"label-space",key:ea.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:xs.LABEL_SPACE,dock:Zs({chart:e,dock:c?"top":m})},settings:{size:10},show:()=>{const t=e.component(`${ea.COMPONENT.LINE}-${n[0].id}`);if(!t||!t.rect)return!1;const r=(c?17:34)/t.rect[c?"height":"width"],i=a.query.getExtrema(),o=e.scale(ea.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=c||u?o:1-o,d=n.filter((e=>e.isPrimary)).length>0,m=s.query.getExtrema(),f=e.scale(ea.SCALE.MINOR.SECONDARY)(m.implicit.line.max),p=c||u?f:1-f,h=n.filter((e=>!e.isPrimary)).length>0;return d&&l<r||h&&p<r}}}const tl={min:"Min",max:"Max"};function rl(e,t,r){const{hasExplicitMax:n}=r.meta,{max:i}=r.explicit;return!!n&&Math.max(e,t)>i&&i<=Math.min(e,t)}function nl(e,t,r){const{hasExplicitMin:n}=r.meta,{min:i}=r.explicit;return!!n&&Math.min(e,t)<i&&i>=Math.max(e,t)}function il(e,t,r){return rl(e,t,r)||nl(e,t,r)}function ol(e,t){const{hasExplicitMax:r}=t.meta,{max:n}=t.explicit;return!!r&&e>n&&n<=0}function al(e,t){const{hasExplicitMin:r}=t.meta,{min:n}=t.explicit;return!!r&&e<n&&n>=0}function sl(e,t){return ol(e,t)||al(e,t)}function ll({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta["hasExplicit"+tl[t]]}({extrema:e,type:t})||function({extrema:e,type:t}){const r=t===ws?e.implicit.bar.max:e.implicit.bar.min,n=Number(r.toFixed(13));return t===ws?!ol(n,e):!al(n,e)}({extrema:e,type:t}))}var ul=Object.freeze({__proto__:null,isSegmentMaxOutOfBounds:rl,isSegmentMinOutOfBounds:nl,isSegmentOutOfBounds:il,isMaxOutOfBounds:ol,isMinOutOfBounds:al,isOutOfBounds:sl,shouldShowOob:ll});const cl={min:"Min",max:"Max"},dl=({chart:e,models:t,markerSeries:r,lineSeries:n,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,primaryTickModel:c,secondaryTickModel:d,layoutService:m,seriesModel:f,themeService:p,fieldModel:h}=t,y="rtl"===o.options.direction,{dock:g,opposite:v,orientation:b}=s.meta.major,x=l.query.getExtrema(),M=u.query.getExtrema(),S=a===ws,{isBarSeriesGrouped:E}=m.meta,C=(({chart:e,type:t,opposite:r,dock:n})=>{let i=t===ws?r:n;const o=e.component(`${ea.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${ea.COMPONENT.SLICED_HAT}-${t}-${ra.PRIMARY}`),s=e.component(`${ea.COMPONENT.SLICED_HAT}-${t}-${ra.SECONDARY}`),l=e.component(ea.COMPONENT.LABEL_SPACE),u=e.component(`${ea.COMPONENT.BAR_OOB}-${t}`),c=e.component(`${ea.COMPONENT.BAR_OOB}-${t}-${ra.PRIMARY}`),d=e.component(`${ea.COMPONENT.BAR_OOB}-${t}-${ra.SECONDARY}`);return o?i=`@${ea.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${ea.COMPONENT.SLICED_HAT}-${t}-${ra.PRIMARY}`:s?i=`@${ea.COMPONENT.SLICED_HAT}-${t}-${ra.SECONDARY}`:u||c||d?l&&t===ws?i="@"+ea.COMPONENT.LABEL_SPACE:u?i=`@${ea.COMPONENT.BAR_OOB}-${t}`:c?i=`@${ea.COMPONENT.BAR_OOB}-${t}-${ra.PRIMARY}`:d&&(i=`@${ea.COMPONENT.BAR_OOB}-${t}-${ra.SECONDARY}`):l&&t===ws&&(i="@"+ea.COMPONENT.LABEL_SPACE),i})({chart:e,type:a,opposite:v,dock:g}),q=Ts({layoutService:m,seriesModel:f,rtl:y,orientation:b}),O=n.concat(r);if(!O.length)return!1;const A=S?x.implicit.bar.max:x.implicit.bar.min,D=Number(A.toFixed(13));if(!E&&i.length&&ul[`is${cl[a]}OutOfBounds`](D,x))return!1;if(!x.meta.hasExplicit&&!M.meta.hasExplicit)return!1;const N=S?"max":"min",T=Math[N](Number(x.implicit.line[N].toFixed(13)),Number(x.implicit.marker[N].toFixed(13))),I=Math[N](Number(M.implicit.line[N].toFixed(13)),Number(M.implicit.marker[N].toFixed(13))),w=O.filter((e=>e.isPrimary)),L=O.filter((e=>!e.isPrimary)),R=w.length>0,k=L.length>0,{major:P,majorNumeric:j}=h.main,F=e=>"NaN"!==e.qNum?e.qNum:0,V=m.meta.isContinuous?j:P;return{type:"data-out-of-bounds-marker",key:`${ea.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:C,minimumLayoutMode:xs.OUT_OF_BOUNDS_MARKER},data:{extract:O.map((({ref:e,typeIndex:t,options:r})=>({field:P,value:m.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:V},end:{field:e,value:r.showAsZeros?F:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:S?()=>c.query.getMax():()=>c.query.getMin(),secondaryExtremum:S?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:w,secondarySeries:L,orientation:b,rtl:y,major:{scale:ea.SCALE.MAJOR,fn:q},markerOffset:Qs({dockPosition:C,orientation:b,rtl:y})},brush:Is({layoutService:m}),show:()=>{if(S){if(R&&T>c.query.getMax())return!0;if(k&&I>d.query.getMax())return!0}if(!S){if(R&&T<c.query.getMin())return!0;if(k&&I<d.query.getMin())return!0}return!1},style:{fill:p.getStyles().outOfRange.color}}};function ml(e){return(ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fl(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,i)}function pl(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){fl(o,n,i,a,s,"next",e)}function s(e){fl(o,n,i,a,s,"throw",e)}a(void 0)}))}}function hl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yl(Object(r),!0).forEach((function(t){hl(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vl(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function bl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||Ml(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xl(e){return function(e){if(Array.isArray(e))return Sl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ml(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 Ml(e,t){if(e){if("string"==typeof e)return Sl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sl(e,t):void 0}}function Sl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var El=Object.prototype.hasOwnProperty,Cl=Object.prototype.toString,ql=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,Al=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Cl.call(e)},Dl=function(e){if(!e||"[object Object]"!==Cl.call(e))return!1;var t,r=El.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&El.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||El.call(e,t)},Nl=function(e,t){ql&&"__proto__"===t.name?ql(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Tl=function(e,t){if("__proto__"===t){if(!El.call(e,t))return;if(Ol)return Ol(e,t).value}return e[t]},Il=function e(){var t,r,n,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=Tl(s,r),s!==(i=Tl(t,r))&&(c&&i&&(Dl(i)||(o=Al(i)))?(o?(o=!1,a=n&&Al(n)?n:[]):a=n&&Dl(n)?n:{},Nl(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&Nl(s,{name:r,newValue:i}));return s};function wl(e,t){return{range:function(e){var r=e.resources,n=e.data,i=r.theme.palette("categorical",t);return n.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function Ll(e,t){return{range:function(e){var r=e.resources,n=e.data,i=r.theme.palette("categorical",t);return n.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function Rl(e,t,r,n,i){var o,a=i.byRow,s=i.byElemNo;if(n&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===r.activeDimensionIndex&&e.hc.qSize.qcy>((null===(o=e.hc.qDataPages[0])||void 0===o?void 0:o.qArea.qHeight)||0)))return s(n,n.raw().qCardinal);if(n){var l=t.pic.extract({field:n.key(),trackBy:n.value}).length;return a(n,l)}return{}}function kl(e,t){var r=e.hc.qDimensionInfo,n=t.input.byDimDef||{activeDimensionIndex:r.length-1};if(n.activeDimensionIndex>=0){var i=r[n.activeDimensionIndex];n=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:n.activeDimensionIndex}:{activeDimensionIndex:n.activeDimensionIndex}}return n}function Pl(e,t){var r;return t.activeDimensionIndex>=0?r=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(r=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r}function jl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Fl(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Vl(){}var _l=1/.7,Bl="\\s*([+-]?\\d+)\\s*",Hl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$l="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zl=/^#([0-9a-f]{3,8})$/,Ul=new RegExp("^rgb\\("+[Bl,Bl,Bl]+"\\)$"),Yl=new RegExp("^rgb\\("+[$l,$l,$l]+"\\)$"),Wl=new RegExp("^rgba\\("+[Bl,Bl,Bl,Hl]+"\\)$"),Gl=new RegExp("^rgba\\("+[$l,$l,$l,Hl]+"\\)$"),Kl=new RegExp("^hsl\\("+[Hl,$l,$l]+"\\)$"),Xl=new RegExp("^hsla\\("+[Hl,$l,$l,Hl]+"\\)$"),Jl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Zl(){return this.rgb().formatHex()}function Ql(){return this.rgb().formatRgb()}function eu(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=zl.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?tu(t):3===r?new ou(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?ru(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?ru(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ul.exec(e))?new ou(t[1],t[2],t[3],1):(t=Yl.exec(e))?new ou(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Wl.exec(e))?ru(t[1],t[2],t[3],t[4]):(t=Gl.exec(e))?ru(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Kl.exec(e))?uu(t[1],t[2]/100,t[3]/100,1):(t=Xl.exec(e))?uu(t[1],t[2]/100,t[3]/100,t[4]):Jl.hasOwnProperty(e)?tu(Jl[e]):"transparent"===e?new ou(NaN,NaN,NaN,0):null}function tu(e){return new ou(e>>16&255,e>>8&255,255&e,1)}function ru(e,t,r,n){return n<=0&&(e=t=r=NaN),new ou(e,t,r,n)}function nu(e){return e instanceof Vl||(e=eu(e)),e?new ou((e=e.rgb()).r,e.g,e.b,e.opacity):new ou}function iu(e,t,r,n){return 1===arguments.length?nu(e):new ou(e,t,r,null==n?1:n)}function ou(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function au(){return"#"+lu(this.r)+lu(this.g)+lu(this.b)}function su(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function lu(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function uu(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new du(e,t,r,n)}function cu(e){if(e instanceof du)return new du(e.h,e.s,e.l,e.opacity);if(e instanceof Vl||(e=eu(e)),!e)return new du;if(e instanceof du)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new du(a,s,l,e.opacity)}function du(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function mu(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function fu(e){return function(){return e}}function pu(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):fu(isNaN(e)?t:e)}jl(Vl,eu,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Zl,formatHex:Zl,formatHsl:function(){return cu(this).formatHsl()},formatRgb:Ql,toString:Ql}),jl(ou,iu,Fl(Vl,{brighter:function(e){return e=null==e?_l:Math.pow(_l,e),new ou(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ou(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:au,formatHex:au,formatRgb:su,toString:su})),jl(du,(function(e,t,r,n){return 1===arguments.length?cu(e):new du(e,t,r,null==n?1:n)}),Fl(Vl,{brighter:function(e){return e=null==e?_l:Math.pow(_l,e),new du(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new du(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ou(mu(e>=240?e-240:e+120,i,n),mu(e,i,n),mu(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var hu=function e(t){var r=function(e){return 1==(e=+e)?pu:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):fu(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=iu(e)).r,(t=iu(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=pu(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1),yu=/^class(-pyramid)?/,gu=function(e,t,r,n){var i=void 0!==r.min?r.min:n.min(),o=void 0!==r.max?r.max:n.max(),a=i,s=o,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return i+(o-i)*e})):l,d=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(xl(c))),o=Math.max.apply(Math,[o].concat(xl(c))),u.min=i,u.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,r=e.max,n=e.limits,i=e.range,o=[],a=[];if(n.length)if(n[n.length-1]<t)a.push(t,r),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(n[0]>r)a.push(t,r),o.push(i[0],i[0],i[0]);else{if(n[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<n.length;s++)if(t<n[s]){o.push(i[s]);break}}for(var l=0;l<n.length;l++)t<n[l]&&n[l]<r&&(a.push(n[l]),o.push(i[l]));if(n[n.length-1]<r)a.push(r),o.push(i[n.length]),o.push(i[n.length]);else{a.push(r);for(var u=0;u<n.length;u++)if(n[u]>r){o.push(i[u]),o.push(i[u]);break}}}else o.push(i[0]);return{min:t,max:r,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:d,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var m=t.breakTypes;u.type="continuous",u.domain=[i],u.range=[d[0]];for(var f=0;f<c.length;f+=1)if(m[f]){var p=d[f],h=d[f+1],y=hu(p,h)(.5);u.range.push(y),u.domain.push(c[f]),f<c.length-1&&m[f+1]&&(u.range.push(d[f+1]),u.domain.push((c[f]+c[f+1])/2))}else u.range.push(d[f]),u.range.push(d[f+1]),u.domain.push(c[f]),u.domain.push(c[f]+Math.min(1e-6,(o-i)/1e6));u.range.push(d[d.length-1]),u.domain.push(o)}else u.domain=c,u.range=d;return u};function vu(e,t,r,n,i){var o,a,s,l=0,u=[],c=(e-t)/(n+1);if(0===c)return 1;for(o=0;o<r.length;o+=1)a=.99*(r[o]-t),s=r[o]>e?Math.floor(e/c):r[o]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(o=0;o<u.length;o+=1)u[o]&&(l+=1);return l<=n||l>=i?Math.max(l,n):vu(e,t,r,n+1,i)}var bu=function(e,t,r,n){var i,o,a=t.theme,s=t.hc,l=n.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:r.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(i=r.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=r.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,xl(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===r.input.autoMinMax){if(u.min=r.input.measureMin,u.max=r.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!d)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,xl(c)),u.max=Math.max.apply(Math,xl(c))}if(r.input.measureScheme&&(u.palettes={quant:r.input.measureScheme}),a){var m=a.getDataColorScales().filter((function(e){return e.key===r.input.measureScheme}))[0];u.type=m&&yu.test(m.type)?"categorical":"continuous","categorical"===u.type&&(o=m.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,xl(m.colors.map((function(e){return e?e.length:0})))):m.colors.length)}if("categorical"===u.type){for(var f=d?vu(u.max,u.min,c,1,o):o,p=(u.max-u.min)/f,h=[],y=0;y<f+1;y+=1)h.push(u.min+p*y);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",f),r=Math.max(1,Math.floor(t.length/f)),n=[],i=0;i<f;i+=1)n.push(t[i*r]);return[n[0]].concat(n,[n[n.length-1]])}}return u};function xu(e,t){var r;return t.activeMeasureIndex>=0?r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?r=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r||(r=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[r.raw().matchMeasure]),r}function Mu(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Su(e,t){for(var r=(null==t?void 0:t.domain)||[],n=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=r.indexOf(o);-1===s?(r.push(o),n.push(a.primary)):n[s]=a.primary,e[o]=null}else if(a){i.push(o);var l=r.indexOf(o);-1!==l&&(r.splice(l,1),n.splice(l,1))}}return{domain:r,range:n,exclude:i}}function Eu(e,t,r,n){var i=function(e,t,r,n){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,r){var n=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?xu:o,s=r.input.byMeasureDef||{activeMeasureIndex:0},l=a(r,s),u=bu(0,{theme:n,hc:i},r,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=r.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=r.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),r.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var d=c.raw().coloring;d&&d.gradient&&Il(u,gu(e,d.gradient,u,c))}else u.auxiliary=s;return u}(e,r,t);if("byDimension"===t.input.mode)return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n.getCDef,o=void 0===i?kl:i,a=n.getCByField,s=void 0===a?Pl:a,l=n.getPersistence,u=void 0===l?Rl:l,c=o(t,r),d=s(r,c),m=d?d.raw():{},f=r&&r.pic?r.pic.raw():{};if(m.qError||m.qSize&&0===m.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var p={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:m.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(p.label=c.label,"color.altLabel"===m.labelExpRef&&(p.label=r.input.altLabel)),!p.label&&d&&(p.label=d.title()),r.input.dimensionScheme&&(p.palettes={categorical:r.input.dimensionScheme}),r.input.useDimColVal&&"libraryItem"===c.type&&(p.auxiliary=c),Il(p,u(t,r,c,d,{byRow:Ll,byElemNo:wl})),p}(e,r,t);if("byExpression"===t.input.mode)return function(e,t,r,n){var i=t.hc,o=t.theme,a=t.translator,s=r.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||r.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:n.nil};if(r.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=bu(0,{hc:i,theme:o},r,{f:s});return l.invalid||(l.label=r.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,r,t,n);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,r,n){var i=t.hc,o=t.theme,a=t.translator,s=r.input.useBaseColors;if(("byMultiple"===r.input.mode||"primary"===r.input.mode&&"measure"===r.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===r.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?u.push(n.primary):u.push(i)}}));var c=r.input.dimensionScheme?{categorical:r.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===r.input.useBaseColors&&d&&(c={categorical:d.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var m=[],f=[];return i.qDimensionInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){m.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?f.push(n.primary):f.push(i)}})),{mode:"dimension",type:"categorical",field:m.length?m[0]:void 0,explicit:m.length?{domain:m,range:f}:void 0}}var p=n.primary;if(void 0!==r.input.paletteColor)r.input.paletteColor&&(p=e.resolveUIColor(r.input.paletteColor));else{var h=r.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(p=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:p}}(e,r,t,n)}return{}}(e,t,r,n);return t.input.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(r,i){return function(e){var t,r=e.cm,n=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,r){var n=r.primary;return void 0!==t.paletteColor&&t.paletteColor&&(n=e.resolveUIColor(t.paletteColor)),gl(gl({},r),{},{mode:"constant",type:"constant",primary:n})}(r,o,n):"byExpression"===s?function(e,t,r){var n="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(n)&&"colorByMeasureExpression"===e.raw().id})),o=i;return gl(gl({},r),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:r.nil})}(i,a,n):null}({cm:e,input:r,defaults:n,index:i,pic:t.pic})})),function(e,t){var r,n,i,o=t.translator;if(Mu(e),1===(null===(r=e.measureOverrides)||void 0===r?void 0:r.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Su(e.measureOverrides,e.explicit),Mu(e)),null!==(n=e.measureOverrides)&&void 0!==n&&n.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=Su(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,r)):i}function Cu(e){var t=gl({hc:null,colorProps:null,layout:null,theme:null},e),r={},n={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(n.auto=e,i):n.auto},getDimensionColorMap:function(e){return e?(n.getDimensionColorMap=e,i):n.getDimensionColorMap},getAttributeDimension:function(e){return e?(n.getAttributeDimension=e,i):n.getAttributeDimension},getMeasure:function(e){return e?(n.getMeasure=e,i):n.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Il(t,e),(r={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=n.auto(e.layout);r.input=Il(!0,{},r.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(r.input.dimensionScheme=a[0].key);var s=0;r.input.byDimDef&&+r.input.byDimDef.activeDimensionIndex>=0&&(s=+r.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&r.input.byDimDef&&(r.input.byDimDef.type="libraryItem",r.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=r.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(r.input=Il(!1,{},r.input,{measureOverrides:null}))},palettes:function(){if(!r.palettes){var e=t.theme,n=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){n.push({key:"ui",colors:e.colors})})),r.palettes=n}return r.palettes},getAuxiliaryData:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=e.auxiliary||{},o=i.key;if("measure"===e.fieldType)return n.getMeasure(o,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(r,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?n.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),o?n.getDimensionColorMap(o,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,n){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,n).then((function(n){if(!n)return{};if("measure"===e.fieldType){if(n.coloring&&n.coloring.gradient){var o=r.pic.field(e.field);return gu(i,n.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=n[0],l=n[1]?n[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[r.pic.field(e.field).raw(),r.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,r,n){var i=n.external,o=n.field,a=gl({},e);Il(a,wl(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=r.resolveUIColor(t.nul)),t.oth&&(a.others=r.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Il(a,wl(o)))):!1===t.autoFill&&t.single?a.range=[r.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Il(a,wl(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,r){for(var n={},i=0;i<e.length;i+=1)n[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var l=i.items[s],u=(l.text||l).label;n[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),o.push(t.resolveUIColor(n[u])))}return a.push(-3,-2),o.push(r.others),o.push(r.nil),a},range:function(){return o}}}(t.colors,r,a)),a}(a,l,i,{external:t,field:r.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===r.uiPalette&&(r.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!r.uiPalette)return e.color;var t="none"===r.uiPalette.colors[0]?e.index:e.index-1;return void 0===r.uiPalette.colors[t]?e.color:r.uiPalette.colors[t]},settings:function(){if(this.palettes(),!r.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},n=t.theme;n&&(e=gl(gl({},e),n.getDataColorSpecials())),r.settings=Il(e,Eu(this,r,t,e))}return r.settings}};return i}var qu=function(e,t){var r=e.fieldType,n={};if(t)if("measure"===r){var i=t.coloring;i&&(n.measureGradient=i.gradient)}else if("dimension"===r){var o=t[0],a=t[1];o&&(n.legendDataPage=o),a&&(n.dimValsData=a.colorMap)}return n},Ou=function(e){throw e.isHandled=!0,e},Au=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:r.snapshotData.content.chartData.dimValsData}):Promise.reject():n&&n.getObject?n.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},Du=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:r.snapshotData.content.chartData.measureGradient}}):Promise.reject():n&&n.getMeasure?n.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},Nu=function(e,t){var r=t.layout,n=t.model,i=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.legendDataPage?Promise.resolve(r.snapshotData.content.chartData.legendDataPage):Promise.reject():n&&n.session&&i?n.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Ou):Promise.reject()};function Tu(e){var t=e.hc,r=e.source,n=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:r,field:n.field,trackBy:n.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}function Iu(e){return function(t){return"object"===ml(t.datum[e])?t.datum[e].value:void 0}}function wu(e){return"object"===ml(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Lu(e){return-3===e.datum.value}var Ru=function(e,t,r){var n=e&&e.dock||void 0;if("auto"!==n)return n||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return r?"left":"right"},ku=function(e,t,r){return!(r.invalid||"color"===r.type||"measure"===r.mode&&t.qMeasureInfo.length<=1||"dimension"===r.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Pu(e,t){var r=e.styleReference,n=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Ru(o,n,i)},show:"function"==typeof o.show?function(){return ku(o,l,a)}:ku(o,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==o.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(r,"legend.title","color"):void 0,fontSize:s?s.getStyle(r,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(r,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function ju(e,t,r){var n=[],i=[],o=function(e,t,r){return"categorical"===t.coloring.type?function(e,t,r){var n=Pu(e,t);if(!n.show)return!1;var i=e.key,o=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,d=t.theme,m=t.scales,f={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"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",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"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"},p="".concat(c,"Legend");return Il(!0,n,{type:"legend-cat",key:"".concat(i,"-cat"),scale:p in m?p:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(n.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:d?d.getStyle(o,"legend.label","color"):void 0,fontSize:d?d.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:d?d.getStyle(o,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:r,button:{content:function(e,t){var r=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:f[r]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,r):"continuous"===t.coloring.type&&function(e,t){var r=e.key,n=e.styleReference,i=e.rtl,o=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=Pu(e,t);return!!u.show&&Il(!0,u,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(n,"legend.label","color"):void 0,fontSize:l?l.getStyle(n,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(n,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!i||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:o,style:a})}(e,t)}(e,t,r&&r.navigationDisabled);return n.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,r=e.requireFailure,n=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,r){var n;if(!r)return!0;if(null!=i&&null!==(n=i.interact)&&void 0!==n&&n.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=r.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,r)),i.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventName,n=t.key,i=t.requireFailure,o=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:r,pointers:1,threshold:10,enable:function(e,t){var i;return this.started===r||!t||!(null!=a&&null!==(i=a.interact)&&void 0!==i&&i.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(n,"-cat")}))}},events:(e={},hl(e,"".concat(r,"start"),(function(e){e.preventDefault(),this.started!==r&&(this.started=r,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),hl(e,"".concat(r,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),hl(e,"".concat(r,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,r))),{interactions:i,components:n}}var Fu=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function Vu(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,r=Cu(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var r=t.layout,n=t.app;return Au(e,{layout:r,app:n})})).getMeasure((function(e,t){var r=t.layout,n=t.app;return Du(e,{layout:r,app:n})})).getAttributeDimension((function(e,t){var r=t.layout,n=t.model,i=t.app;return Nu(e,{layout:r,model:n,app:i})}));return r.getSnapshotData=qu,r}({resources:e}),r={},n={},i=function(e){return n.settings||(e||console.warn("settings() called before auxiliarySettings()"),n.settings=t.settings()),n.settings},o={config:function(i){if(r=gl({},i),n={},!r.key)throw new Error("Missing key");t.set(gl(gl({},e),r))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return n.auxiliarySettings?Promise.resolve(n.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return n.auxiliarySettings=e||{},n.settings=gl(gl({},n.settings),n.auxiliarySettings),n.scales=void 0,n.color=void 0,n.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var r=i();return t.getAuxiliaryData(r,e).then((function(e){return t.getSnapshotData(r,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var r=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||r)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,r=e.coloring,n=e.theme,i=[];if(r&&r.palettes&&n){var o=r.palettes.categorical||t.dimensionScheme,a=n.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||n.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=r.palettes.metric||t.measureScheme,l=n.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(xl(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),i.push({key:"quant",colors:u})}}return i}({coloring:i(),colorProps:r.colorProps,theme:r.theme})},scales:function(){return n.scales=n.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,r=e.coloring,n=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},l=i;if(r){var u={override:!0,domain:r.explicit&&"function"==typeof r.explicit.domain?r.explicit.domain:[].concat(xl((r.explicit||{}).domain||[]),[-3,-2]),range:r.explicit&&"function"==typeof r.explicit.range?r.explicit.range:[].concat(xl((r.explicit||{}).range||[]),[r.others,r.nil])};if("field"===r.mode){if("dimension"===r.fieldType){var c,d=Tu({hc:t,source:o,coloring:r}).data;if(r.legendDataset){var m=0,f={};a.data("q")({data:t}).extract({field:r.field,trackBy:r.valueAccessor,reduce:function(e){var t=e[0];return f[t]=m++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var p={data:d,range:r.range,domain:r.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=p,c&&(s["".concat(l,"Legend")]=gl(gl({},p),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||p.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===r.fieldType){var h={data:{field:r.field},min:r.min,max:r.max};s[l]=Il({},h,{type:"categorical"===r.type?"threshold-color":"sequential-color",range:r.range,domain:r.domain,invert:r.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Il({},h,{invert:!!n}))}else if("color"!==r.type)throw new Error("UNUSED FIELD")}else if("dimension"===r.mode){var y={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}else if("measure"===r.mode){var g={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,n;return!(null!==(t=r.explicit)&&void 0!==t&&null!==(n=t.exclude)&&void 0!==n&&n.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}}return s}({hc:r.hc,coloring:i(),key:r.key,source:r.source,picasso:e.picasso}),n.scales},color:function(){return n.color=n.color||function(e){var t=e.coloring,r=e.scales,n=e.key,i=Iu(n),o=Iu("".concat(n,"IsAnOther")),a=function(e,t){var n=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,d=e.type;return a?function(e){return Lu(e)||o(e)?u:l}:r[t]?function(e){return Lu(e)?u:wu(e)||-2===i(e)&&"dimension"===n||"NaN"===i(e)?l:o(e)?u:e.resources.scale(t)(i(e))||u}:"constant"===s?function(e){return Lu(e)||o(e)?u:wu(e)?l:c}:"color"===d?function(e){return Lu(e)||o(e)?u:wu(e)?l:i(e)||u}:null},s=a(t,n);if(t.measureOverrides){var l=Iu("".concat(n,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:r.key}),n.color},datumProps:function(e){return function(e){var t,r,n=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(r={field:t,reduce:"first"},"color"===i.type&&(r.value=function(e){return"NaN"!==e.qNum?Fu(e.qNum):e.qText&&eu(e.qText)?e.qText:c})):"dimension"===i.mode?r=void 0!==i.field?i.field:n.qDimensionInfo.length-1:"measure"===i.mode&&(r=l);var d=hl({},u,r);return n.qDimensionInfo.length>1&&(d["".concat(u,"IsAnOther")]={fields:n.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(u,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:r.key,hc:r.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:r.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,o=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,d=void 0===c?{}:c,m=e.style,f=void 0===m?{}:m,p=arguments.length>1?arguments[1]:void 0;return ju({eventName:t,key:n,rtl:s,viewState:o,chart:a,styleReference:u,settings:d,style:f},{legendProps:r.legendProps,scaleKey:r.key,coloring:i(),theme:r.theme,hc:r.hc,scales:this.scales()},p)}};return o}var _u=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Bu(e){var t=e.qHyperCube,r=t.qDimensionInfo,n=t.qMeasureInfo,i=r.some(_u),o=n.some(_u),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function Hu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=gl(gl(gl({},e),t),{},{colorProps:gl(gl({},e.colorProps),t.colorProps||{})});return r}var $u=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function zu(e){var t,r=e.qHyperCube.qDimensionInfo.some($u),n=e.qHyperCube.qMeasureInfo.some($u),i=r?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:n?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var Uu=function(){};function Yu(e){var t=e.chart,r=e.logicalSize;if(r)return r;var n=t?t.element.getBoundingClientRect():{};return{width:n.width,height:n.height}}var Wu=[{key:"FULL",size:{width:550,height:450}},{key:"MEDIUM",size:{width:400,height:220}},{key:"SMALL",size:{width:300,height:150}},{key:"XSMALL",size:{width:150,height:75}}];function Gu(e){var t=e.width,r=e.height,n=Wu.filter((function(e){return t>=e.size.width&&r>=e.size.height})).shift();return n?n.key:"SPARK"}var Ku={left:"right",right:"left",top:"bottom",bottom:"top",near:"far",far:"near"};function Xu(e){var t=e.orientation,r=e.dock,n=e.btt,i=e.rtl,o="horizontal"===t?function(e){return"bottom"===e||"near"===e?"bottom":"top"}(r):function(e,t){var r="left"===e||"near"===e?"left":"right";return t?Ku[r]:r}(r,i),a=function(e,t,r){return"vertical"===e?t?"bottom":"top":r?"right":"left"}(t,n,i);return{current:o,opposite:Ku[o],start:a,end:Ku[a]}}function Ju(e){var t=e.chart,r=e.layoutService,n=e.config,i=void 0===n?{}:n,o=i.logicalSize,a=void 0!==o&&o,s=i.rtl,l=void 0!==s&&s,u={chart:{size:void 0,mode:void 0},x:{dock:void 0,opposite:void 0,size:void 0},y:{dock:void 0,opposite:void 0,size:void 0}},c={type:"x-y",meta:u,update:function(e){u.chart.size={width:e.width,height:e.height},u.chart.mode=Gu(e);var t=Xu({orientation:"horizontal",dock:r.getLayoutValue("xAxis.dock"),btt:!1,rtl:l}),n=t.current,i=t.opposite;u.x.dock=n,u.x.opposite=i,u.x.size=e.width;var o=Xu({orientation:"vertical",dock:r.getLayoutValue("yAxis.dock"),btt:!0,rtl:l}),a=o.current,s=o.opposite;u.y.dock=a,u.y.opposite=s,u.y.size=e.height}};return c.update(Yu({chart:t,logicalSize:a})),c}var Zu="vertical",Qu="horizontal";function ec(e){var t=e.chart,r=e.layoutService,n=e.config,i=void 0===n?{}:n,o=e.typeConfig,a=void 0===o?{}:o,s=i.logicalSize,l=void 0!==s&&s,u=i.rtl,c=void 0!==u&&u,d=a.fallback===Zu?Zu:Qu,m=!!a.invert,f=a.measureAxes||[{ref:"measureAxis",name:"minor"}],p={chart:{orientation:void 0,size:void 0,mode:void 0},major:{orientation:void 0,dock:void 0,opposite:void 0,size:void 0}},h={type:"major-minor",meta:p,update:function(e){p.chart.orientation=r.getLayoutValue("orientation",d),p.chart.size={width:e.width,height:e.height},p.chart.mode=Gu(e),p.major.orientation=function(e){var t=e.chartOrientation,r=e.invert;return e.layoutService.meta.isContinuous?Qu:r?t===Zu?Qu:Zu:t}({layoutService:r,chartOrientation:p.chart.orientation,invert:m});var t=Xu({orientation:p.major.orientation,dock:r.getLayoutValue("dimensionAxis.dock"),btt:!1,rtl:c}),n=t.current,i=t.opposite;p.major.dock=n,p.major.opposite=i,p.major.size=p.major.orientation===Zu?e.height:e.width,f.forEach((function(t){var n={};n.orientation=p.major.orientation===Zu?Qu:Zu;var i=Xu({orientation:n.orientation,dock:r.getLayoutValue("".concat(t.ref,".dock")),btt:!0,rtl:c}),o=i.current,a=i.opposite,s=i.start,l=i.end;n.dock=o,n.opposite=a,n.start=s,n.end=l,n.size=n.orientation===Zu?e.height:e.width,p[t.name]=n}))}};return h.update(Yu({chart:t,logicalSize:l})),h}function tc(e){var t=e.chart,r=e.layoutService,n=e.config,i=void 0===n?{}:n,o=e.typeConfig,a=void 0===o?{}:o;return("x-y"===a.type?Ju:ec)({chart:t,layoutService:r,config:i,typeConfig:a})}function rc(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(void 0===i[a])return r;i=i[a]}return i}function nc(e,t,r){if(void 0!==e&&void 0!==t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0===o[s]&&(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}}function ic(){var e={};return{get:function(t){return e[t]},set:function(t,r){return e[t]=r,r},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function oc(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){return e.apply(n,o)};clearTimeout(t),t=setTimeout(s,r)}}function ac(e){var t,r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];r=s;var u=Date.now()-o,c=function(){o=Date.now(),n=0,e.apply(t,r)};n||(u>=i?c():n=setTimeout(c,i-u))}}function sc(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[]).map((function(e){var t,r=null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal;if(r)return r;var n=e.qStateCounts||{},i=n.qLocked,o=void 0===i?0:i,a=n.qOption,s=void 0===a?0:a,l=n.qSelected;return o+s+(void 0===l?0:l)}))}function lc(e){switch(e.qHyperCube.qMode){case"S":return function(e){var t=e.qHyperCube.qSize;return{refs:{dataPages:"qHyperCube.qDataPages"},size:{x:t.qcx,y:t.qcy,dimensions:sc(e)}}}(e);case"K":return function(e){var t=sc(e);return{refs:{dataPages:"qHyperCube.qStackedDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);case"T":return function(e){var t=sc(e);return{refs:{dataPages:"qHyperCube.qTreeDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);default:throw new Error("Mode not supported")}}function uc(e){var t=e.originalArray,r=e.newArray,n=e.matchKey;return Array.isArray(t)&&t.length?(r.forEach((function(e){var r=-1;t.some((function(t,i){return t[n]&&t[n]===e[n]&&(r=i),r})),r>-1?t[r]=e:t.push(e)})),t):r}function cc(e){return(cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fc(e,t,r){return t&&mc(e.prototype,t),r&&mc(e,r),e}function pc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hc(Object(r),!0).forEach((function(t){pc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gc(e,t){return(gc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vc(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function bc(e,t,r){return(bc=vc()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&gc(i,r.prototype),i}).apply(null,arguments)}function xc(e){return function(e){if(Array.isArray(e))return Sc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Mc(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 Mc(e,t){if(e){if("string"==typeof e)return Sc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sc(e,t):void 0}}function Sc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ec=Object.prototype.hasOwnProperty,Cc=Object.prototype.toString,qc=Object.defineProperty,Oc=Object.getOwnPropertyDescriptor,Ac=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Cc.call(e)},Dc=function(e){if(!e||"[object Object]"!==Cc.call(e))return!1;var t,r=Ec.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Ec.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Ec.call(e,t)},Nc=function(e,t){qc&&"__proto__"===t.name?qc(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Tc=function(e,t){if("__proto__"===t){if(!Ec.call(e,t))return;if(Oc)return Oc(e,t).value}return e[t]},Ic=function e(){var t,r,n,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=Tc(s,r),s!==(i=Tc(t,r))&&(c&&i&&(Dc(i)||(o=Ac(i)))?(o?(o=!1,a=n&&Ac(n)?n:[]):a=n&&Dc(n)?n:{},Nc(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&Nc(s,{name:r,newValue:i}));return s};function wc(e,t,r){if(!e)return-1;var n=r.cache,i=e.origin?e.origin():null;i&&(e=i);var o=n.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var l=0;l<n.wrappedFields.length;l++)if(s=n.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=n.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=l;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function Lc(e,t,r){var n=r.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:n,field:e.field.key()}),i}function Rc(e){var t=e.cache,r=e.f,n=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,d=n;if(i.field&&i.field!==r){var m=wc(i.field,o,{cache:t});if(-1===m)return;d=Ic({qRow:a},m(s))}u[c]=Lc(i,d,{key:l})}function kc(e,t,r,n){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var s=t.raw(),l=t.key(),u="object"===cc(i[a].field)?i[a].field:t.field(i[a].field),c=n.normalizeConfig(i[a],t),d=c.props,m=c.main,f=Object.keys(d),p=!!i[a].trackBy,h=cc(i[a].trackBy),y={},g=[],v=[],b=0;b<s.qDataPages.length;b++){var x=wc(u,s.qDataPages[b],{cache:r});if(-1!==x)for(var M=0;M<s.qDataPages[b].qMatrix.length;M++){var S=s.qDataPages[b].qArea.qTop+M,E=Ic({qRow:S},x(s.qDataPages[b].qMatrix[M])),C=Lc(m,E,{key:l});if(!m.filter||m.filter(E)){for(var q=0;q<f.length;q++){var O=d[f[q]],A=O.fields||[O];O.fields&&(C[f[q]]=[]);for(var D=0;D<A.length;D++)Rc({cache:r,f:u,mainCell:E,p:A[D],prop:f[q],props:d,page:s.qDataPages[b],rowIdx:S,row:s.qDataPages[b].qMatrix[M],sourceKey:l,target:O.fields?C[f[q]]:C,targetProp:O.fields?D:f[q]});if(O.fields){var N=C[f[q]].map((function(e){return e.value})),T=C[f[q]].map((function(e){return e.label}));C[f[q]]={value:"function"==typeof O.value?O.value(N):void 0!==O.value?O.value:N,label:"function"==typeof O.label?O.label(T):void 0!==O.label?String(O.label):String(C[f[q]].value)}}}p&&n.track({cfg:i[a],itemData:E,obj:C,target:g,tracker:y,trackType:h}),v.push(C)}}}p?o.push.apply(o,xc(n.collect(g,{main:m,propsArr:f,props:d}))):o.push.apply(o,v)}return o}function Pc(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function jc(e,t){var r,n,i,o,a,s=new Bc(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Fc);r=u.pop();)if(l&&(r.value=+r.data.value),(i=t(r.data))&&(a=i.length))for(r.children=new Array(a),o=a-1;o>=0;--o)u.push(n=r.children[o]=new Bc(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(_c)}function Fc(e){return e.children}function Vc(e){e.data=e.data.data}function _c(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Bc(e){this.data=e,this.depth=this.height=0,this.parent=null}function Hc(e){if("function"!=typeof e)throw new Error;return e}Bc.prototype=jc.prototype={constructor:Bc,count:function(){return this.eachAfter(Pc)},each:function(e){var t,r,n,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,r,n=this,i=[n];n=i.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)i.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return jc(this).eachBefore(Vc)}};var $c={depth:-1},zc={};function Uc(e){return e.id}function Yc(e){return e.parentId}function Wc(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var r,n=e.split("/"),i=t,o=0;o<n.length;o++){if("*"===n[o]&&Array.isArray(i)){var a=[];r=n.slice(o+1).join("/");for(var s=0;s<i.length;s++){var l=Wc(r,i[s]);Array.isArray(l)?a.push.apply(a,xc(l)):a.push(l)}return a}if(!n[o]&&Array.isArray(i)){var u=new Array(i.length);r=n.slice(o+1).join("/");for(var c=0;c<i.length;c++)u[c]=Wc(r,i[c]);return u}n[o]in i&&(i=i[n[o]])}return i}function Gc(e,t,r){var n=[];if(!e||!e.length)return n;if(t<=0){var i=r>=0?[e[r]]:e;n.push.apply(n,xc(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&n.push.apply(n,xc(Gc(e[o].children,t-1,r)));return n}function Kc(e,t,r){if(e===t)return function(e){return e};if(e>t){var n=Math.max(0,Math.min(100,e-t)),i=xc(Array(n)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(i,";"))}if(t>e){var o=Math.max(0,Math.min(100,t-e));return function(e){return Gc(e.children,o-1,r)}}return!1}function Xc(e,t){var r=t.cache;if("number"==typeof e)return r.fields[e];var n=r.allFields;if("function"==typeof e){for(var i=0;i<n.length;i++)if(e(n[i]))return n[i];return!1}if("string"==typeof e){for(var o=0;o<n.length;o++)if(n[o].key()===e||n[o].title()===e)return n[o]}else if(e&&-1!==n.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var Jc=/^qDimensionInfo(?:\/(\d+))?/,Zc=/^\/?qMeasureInfo\/(\d+)/,Qc=/\/qAttrExprInfo\/(\d+)/,ed=/\/qAttrDimInfo\/(\d+)/;function td(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function rd(e,t){var r=t.cube;if(!e)return-1;var n=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,u=-1,c=n,d=r.qEffectiveInterColumnSortOrder,m=td(r);return Jc.test(c)&&(i=!0,o=+Jc.exec(c)[1],c=n.replace(Jc,"")),Zc.test(c)&&("K"===r.qMode?l=+Zc.exec(c)[1]:d&&-1!==d.indexOf(-1)?(l=+Zc.exec(c)[1],u=0):u=+Zc.exec(c)[1],c=c.replace(Zc,"")),c&&(ed.exec(c)?s=+ed.exec(c)[1]:Qc.exec(c)&&(a=+Qc.exec(c)[1])),{fieldDepth:(i?"S"===r.qMode?m[o]:d?d.indexOf(o):o:d&&-1!==d.indexOf(-1)?d.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function nd(e,t){var r,n,i=Kc(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return r=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?n=function(e){var r;return null==e||null===(r=e.qAttrDims)||void 0===r?void 0:r.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(n=function(e){var r;return null==e||null===(r=e.qAttrExps)||void 0===r?void 0:r.qValues[t.attrIdx]}),{nodeFn:i,attrFn:n,valueFn:r}}function id(e,t,r){var n=r.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:n,field:e.field.key()}),i}function od(e){for(var t=e.propsArr,r=e.props,n=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=r[t[s]],u=l.fields||[l],c=void 0,d=void 0;l.fields&&(c=[],d=[]);for(var m=function(e){var r=u[e],m=void 0,f=void 0,p=void 0,h=void 0,y=void 0,g=void 0;if("primitive"===r.type?(p=r.value,g=String(r.value)):("function"==typeof r.value&&(m=function(e){return r.value(e,n)}),"function"==typeof r.label&&(f=function(e){return r.label(e,n)}),r.accessor?(h=r.accessor(n),Array.isArray(h)?(y=h.map(r.valueAccessor),r.attrAccessor&&(y=y.map(r.attrAccessor)),m&&(p=y.map(m),m=null),f&&(g=y.map(f),f=null),p=r.reduce?r.reduce(p):p,g=r.reduceLabel?r.reduceLabel(g,p):String(p)):g=p=r.attrAccessor?r.attrAccessor(r.valueAccessor(h)):r.valueAccessor(h)):(p=i,g=i)),l.fields){var v=m?m(p):p;c.push(v),d.push(f&&null!=g?f(g):null!=g?g:String(v))}else{var b=m?m(p):p;o[t[s]]={value:b,label:f?f(g):null!=g?g:String(b)},r.field&&(o[t[s]].source={field:r.field.key(),key:a})}},f=0;f<u.length;f++)m(f);c&&(o[t[s]]={value:"function"==typeof l.value?l.value(c,n):c,label:"function"==typeof l.label?l.label(d,n):d})}}var ad=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Wc(n,e);return o&&o[0]?(t.tree=jc(o[0],r.children||function(e){return e[i]}),t.tree):null};function sd(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],r=function(e){var t=e.raw().qColumnOrder,r=e.fields();return t&&t.length===r.length?t:r.map((function(e,t){return t}))}(e),n=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,d=0;d<i.length;d++){var m=l[i[d]],f="".concat(u,"__").concat(m.qText);a[f]||(a[f]=yc({__id:f,__parent:u,qValues:[]},m),c=!0),u=f}if(c)for(var p=0;p<o.length;p++){var h=l[o[p]];a[u].qValues.push(h)}}var y=Object.keys(a).map((function(e){return a[e]}));return function(){var e=Uc,t=Yc;function r(r){var n,i,o,a,s,l,u,c=r.length,d=new Array(c),m={};for(i=0;i<c;++i)n=r[i],s=d[i]=new Bc(n),null!=(l=e(n,i,r))&&(l+="")&&(m[u="$"+(s.id=l)]=u in m?zc:s);for(i=0;i<c;++i)if(s=d[i],null!=(l=t(r[i],i,r))&&(l+="")){if(!(a=m["$"+l]))throw new Error("missing: "+l);if(a===zc)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=$c,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(_c),o.parent=null,c>0)throw new Error("cycle");return o}return r.id=function(t){return arguments.length?(e=Hc(t),r):e},r.parentId=function(e){return arguments.length?(t=Hc(e),r):t},r}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(y)}var ld=function(e){for(var t=e.propsArr,r=e.props,n=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=r[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var d=u[c];if(d.field!==a){var m=nd(o,rd(d.field,{cube:n,cache:i}));d.accessor=m.nodeFn,d.valueAccessor=m.valueFn,d.attrAccessor=m.attrFn}}};function ud(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=t.raw(),o=t.key(),a="S"===i.qMode?sd(t):ad(i,r,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===i.qMode){var d=td(i),m=d[u-1];c=r.fields[m]}else{var f=i.qEffectiveInterColumnSortOrder[u-1];u>i.qEffectiveInterColumnSortOrder.length&&(f=i.qDimensionInfo.length),c=r.fields[f]}var p=n.normalizeConfig(yc(yc({},e),{},{field:c?c.key():void 0}),t),h=p.props,y=p.main,g=Object.keys(h);l[u]={propsArr:g,props:h,main:y};var v=c?rd(c,{cube:i,cache:r}):{fieldDepth:0};ld({propsArr:g,props:h,cube:i,cache:r,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),M=a.descendants(),S=0;S<M.length;S++){var E=l[M[S].depth].propsArr,C=l[M[S].depth].props,q=l[M[S].depth].main,O=x[S],A=O.data,D=id(q,A,{key:o});od({propsArr:E,props:C,item:O,itemData:A,ret:D,sourceKey:o,isTree:!0}),M[S].data=D}return a}function cd(e,t,r,n){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var s=t.raw(),l=t.key();if(!ad(s,r,e))continue;var u="object"===cc(i[a].field)?i[a].field:t.field(i[a].field),c=n.normalizeConfig(i[a],t),d=c.props,m=c.main,f=Object.keys(d),p=rd(u,{cube:s,cache:r}),h=nd({fieldDepth:0},p),y=h.nodeFn,g=h.attrFn,v=h.valueFn;ld({propsArr:f,props:d,cube:s,cache:r,itemDepthObject:p,f:u});for(var b=!!i[a].trackBy,x=cc(i[a].trackBy),M={},S=[],E=y(r.tree),C=[],q=0;q<E.length;q++){var O=E[q],A=g?g(v(O)):v(O);if(!m.filter||m.filter(A)){var D=id(m,A,{key:l});od({propsArr:f,props:d,item:O,itemData:A,ret:D,sourceKey:l}),b&&n.track({cfg:i[a],itemData:A,obj:D,target:S,tracker:M,trackType:x}),C.push(D)}}b?o.push.apply(o,xc(n.collect(S,{main:m,propsArr:f,props:d}))):o.push.apply(o,C)}return o}var dd,md=(function(e){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,u,l,c,f,d=e.length,m=e.search(/[0-9\-\+#]/),p=m>0?e.substring(0,m):"",h=e.split("").reverse().join(""),v=h.search(/[0-9\-\+#]/),y=d-v,g=e.substring(y,y+1),b=y+("."===g||","===g?1:0),x=v>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(m,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],u=c[1]&&c[c.length-1].length){for(h="",y=(f=t[0]).length%u,d=f.length,b=0;b<d;b++)h+=f.charAt(b),!((b-y+1)%u)&&b<d-u&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}(ad={exports:{}}),ad.exports);function ud(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var ld={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},cd=/%$/,fd=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,dd=/^\(oct\)/i,md=/^\(dec\)/i,pd=/^\(hex\)/i,hd=/^\(bin\)/i,vd=/^\(rom\)/i,yd=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,gd=/#|0/g;function bd(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function xd(e,t,n){var r=ud(e);return n?r:new RegExp(r||"",t)}function Md(e,t,n){var r,i,o,a,s,u,l,c,f,d,m,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),d=t,(m=n)&&(m=ud(m)),d&&(d=ud(d)),f=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(m,"[#0]+)?")),a=(o=(o=p.match(f))?o[0]:"")?p.substr(0,p.indexOf(o)):p,s=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(o=o.replace(xd(u,"g"),t)),l=n,n=".",l&&(o=o.replace(xd(l,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var h,v=p.split(l);v[1]&&(h=v[1].match(gd)),e.prefix=a||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=h?h.length:2,e.percentage=cd.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(xd(t,null,!0),"|").concat(xd(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=n,e.temp=c}var Sd=function(){function e(t,n,r,i,o){af(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return ld;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return uf(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],yd.test(e[0])&&(r.positive.isFunctional=!0),e[1]?yd.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?yd.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Md(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Md(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Md(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,u,l,c=this._prepared,f="",d="",m=e;if(isNaN(e))return"".concat(m);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return fd.test(t)?e=bd(e,Number(/\d{2}/.exec(t)[0]),t,n):dd.test(t)?e=bd(e,8,t,n):md.test(t)?e=bd(e,10,t,n):pd.test(t)?e=bd(e,16,t,n):hd.test(t)?e=bd(e,2,t,n):vd.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,h,v=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=v[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<v.length;)y=v[++s];s>0&&(p=v[s-1]),p&&n>0&&p>0?h=p:(n<0&&p<0||!p)&&(y<0&&y-n<=c.maxPrecision?h=y:p<=n&&!(y>0&&-n<=c.maxPrecision)&&(h=p)),h&&(f=this.abbreviations[h],e/=Math.pow(10,h))}if(r=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var g=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=sd(b+=o,g)||"0",l){var x=Math.max(0,Math.min(14,l.length)),M=l.replace(/#+$/,"").length,S=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=S.length;s<M;s++)S+="0";S&&(e+=o+S)}else 0===g&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),d=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)u+="#";e=sd(u,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+f+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Ed(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,u=r.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),f=Object.create(null),d=0,m=0;return(t=s?function(){return n=l.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=l(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return d>=o&&(delete c[f[m]],delete f[m],d--,m++),c[e]=t,f[d]=e,d++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),f=Object.create(null),d=0,m=0},t.size=function(){return d},t}function Cd(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return pf(Sd,t)}(i,e,t,n,r),a=Ed(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var qd=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Od=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ad=["January","February","March","April","May","June","July","August","September","October","November","December"],Dd=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Nd(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Id(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Td=function(){function e(t,n,r){af(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:qd,qDayNames:Od,qLongMonthNames:Ad,qMonthNames:Dd}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n||(n=(lf(i={},"T",o.qTimeFmt||"hh:mm:ss"),lf(i,"D",o.qDateFmt||"YYYY-MM-DD"),lf(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}return uf(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(r=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:o,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*Id(t),r=60*Id(n),i=60*Id(r),o=1e3*Id(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,u=r.f,l=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(l=n?n.getDay()-1:0)<0&&(l=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}(e,t));var u=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Nd("".concat(t.year).slice(-2),2),YYY:Nd("".concat(t.year).slice(-3),3),def:function(e){return Nd("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Nd("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Nd("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Nd("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Nd("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Nd("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Nd("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),l=[];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&l.push(c);var f=new RegExp(l.join("|"),"g");return t.replace(f,(function(e){var t,n,r;for(n in u)if(Object.prototype.hasOwnProperty.call(u,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var i in u[n])if(i===e||i.toLowerCase()===e){void 0===(r=u[n][i])&&(r=u[n][i.toLowerCase()]);break}return void 0===r&&(r=u[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function wd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return pf(Td,t)}function Ld(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function kd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=wd(n,e,t),i=Ed(r.format.bind(r),{toKey:function(e){return"object"===of(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?Ld(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=wd(n,e,t),i=Ed(r.format.bind(r),{toKey:function(e){return"object"===of(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function Rd(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return kd(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Cd(n,r,i,o,t)}function Pd(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),f=function(e){return e.qText||""},d="dimension"===u?"first":"avg",m=Rd(n,o),p="dimension"===u?"first":function(e,t){return m(t)},h={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(h)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:f,reduce:d,reduceLabel:p,formatter:function(){return m},tags:function(){return n.qTags}};return h}function jd(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Pd(Of({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=jd("qAttrDimInfo",t,n,a,Of({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=jd("qAttrExprInfo",t,n,a,Of({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=jd("qMeasureInfo",t,n,a,Of({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function Fd(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,u={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},l=o;if(!l)throw new Error('Missing "data" input');if(!l.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=Fd.util,f={cache:u,cube:l,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},d={key:function(){return i},raw:function(){return l},field:function(e){return Uf(e,f)},fields:function(){return u.fields.slice()},extract:function(e){return f.extractor(e,d,u,c)},hierarchy:function(e){return f.hierarchy(e,d,u,c)},_cache:function(){return u}};"K"===l.qMode||"T"===l.qMode||!l.qMode&&l.qNodesOnDim?(f.extractor=od,f.hierarchy=id,f.pages="K"===l.qMode?l.qStackedDataPages:l.qTreeDataPages):"S"===l.qMode?(f.extractor=If,f.pages=l.qDataPages,f.hierarchy=id):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},d,u,c)};var m="S"===l.qMode?function(e){return e.qElemNumber}:void 0,p="S"===l.qMode?function(e){return e.qNum}:void 0;(e=u.wrappedFields).push.apply(e,hf(jd("qDimensionInfo",l,i,"",Of({},f,{value:m,type:"dimension"})))),(t=u.wrappedFields).push.apply(t,hf(jd("qMeasureInfo",l,i,"",Of({},f,{value:p,type:"measure"})))),u.fields=u.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){u.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(u.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=d.field(e.from),n=Pd(ff({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return f.extractor({field:e},d,u,c)},key:e.key,type:t.type(),localeInfo:f.localeInfo,value:t.value},e.override||{}));u.virtualFields.push(n)})),(n=u.allFields).push.apply(n,hf(u.virtualFields)),d}var _d=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Hd=/\/qDimensionInfo(?:\/(\d+))?/,Vd=/\/qMeasureInfo\/(\d+)/,Bd=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,zd=/\/qAttrExprInfo\/(\d+)/,Yd=/\/?qHyperCube/,Ud=/\/?qTreeData/,Wd=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Xd=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function Gd(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};Yd.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=Wd):Ud.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Xd);var s=!0;if(Hd.test(e)&&(r=+Hd.exec(e)[1]),Vd.test(e)&&(i=+Vd.exec(e)[1]),Bd.test(e)){i=-1,r=0;var u=+Bd.exec(n)[2];isNaN(u)||(r=u,n=n.replace(/\/\d+$/,"")),s=!1}if(zd.test(e)){var l=i;if(t){i=0;var c=Bf(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+zd.exec(n)[1]}else r>-1?(r=-1,i=+zd.exec(n)[1]):i+=+zd.exec(n)[1]+1}return _d.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||vf(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function Kd(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},u=e.isActive(),l=!1;return e.brushes().forEach((function(e){var t=Gd(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var u=e.brush.ranges();u.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),u.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(l=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var f=r.qHyperCube,d=f.qNoOfLeftDims,m=f.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===d||m>=d)&&d>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:m-d})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),l=!!s.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));l=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!l&&u?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function $d(e){Fd.util=e.data("matrix").util,e.data("q",Fd),e.formatter("q-number",Cd),e.formatter("q-time",kd)}function Jd(e){var t=$c(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function Zd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===al(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function Qd(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}$d.qBrushHelper=Kd,$d.selections=Kd;function em(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var u=e.filter((function(e){return-2!==e.value}));return u.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=Jd({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,pl(o))})),a.filter(Boolean)}({layout:s,values:u}):u},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var tm=[],nm=0,rm=function(e){var t=tm.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},im=function(){document.addEventListener("keyup",rm)},om=function(){document.removeEventListener("keyup",rm)},am=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},sm=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function um(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function lm(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,u=e.emit,l=void 0===u?"rangeClear":u,c=r.event===i,f=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!f)return!1;var d=t.component(o);return!!d&&(d.emit(l),"string"==typeof s&&t.brush(s).clear(),d)}function cm(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,u=e.cleared;return lm({selectionInfo:t,chart:n,document:r,eventName:void 0!==u&&u?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function fm(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,u=e.cleared;return lm({selectionInfo:t,chart:n,document:r,eventName:void 0!==u&&u?void 0:o,componentName:s,brushName:e.brushName})}function dm(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,u=e.cleared,l=void 0!==u&&u,c=e.brushName,f=lm({selectionInfo:t,chart:n,document:r,eventName:l?void 0:s,componentName:o,brushName:void 0!==c&&c});if(f){var d=f.settings.settings,m=d.scale,p=d.brush,h=n.scale(m).data().fields.map((function(e){return e.id()})),v=n.brush(p),y=v.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));v&&y.length&&y.forEach((function(e){v.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function mm(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;lm({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function pm(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var u=n.currentComponent;n.previousComponent!==u&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function hm(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,u=void 0===s?"legend-range-brush":s,l=e.cleared,c=void 0!==l&&l,f=e.brushName;lm({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:u,brushName:void 0!==f&&f})&&i.clear()}var vm=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=dl(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function ym(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function gm(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,u=e.selectionEvents;if(!1===i||!1===u)return function(){};var l=(a||{}).lasso,c=void 0!==l&&l,f=i.reset,d=void 0===f?ym:f,m=i.clear,p=!1!==m&&function(e){var t=e.clear,n=void 0===t?vm:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(fl({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return cm(fl(fl({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return fm(fl(fl({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return dm(fl(fl({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return mm(fl(fl({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return pm(fl(fl({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return hm(fl(fl({},t),e))}},t))}}({clear:m,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.lasso,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:p,reset:d,lasso:c}),v={};Object.entries(h).forEach((function(e){var t=ml(e,2),n=t[0],r=t[1];v[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,u[n])}));var y=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,u={selections:n,selectionInfo:r,chart:o,document:a},l=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(fl(fl({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,chart:o,selectionInfo:r,setSelectionInfo:l})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(fl(fl({defaultFunc:c({event:e,components:t}),setSelectionInfo:l,clear:i},u),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:u,selections:s,selectionInfo:r,clear:p,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(v).forEach((function(e){var t=ml(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(v).forEach((function(e){var t=ml(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var bm=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function xm(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,u=o.majorScale,l=void 0===u?void 0:u,c=o.selectionActions,f=(c=void 0===c?{}:c).clear,d=c.reset,m=o.selectionEvents,p=void 0===m?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:m,h=o.brushEvents,v=void 0===h?{}:h,y=o.brushName,g=void 0===y?"selection":y,b=o.brushMaxListeners,x=void 0===b?20:b,M=o.brushRanges,S=void 0!==M&&M,E=o.interceptors,C=void 0===E?{}:E,q=o.selectionsFn,O=void 0===q?i.selections:q,A=t.brush(g);if("number"==typeof x&&A.setMaxListeners(x),S){var D=!0===S?bm:S;A.configure({ranges:D})}var N={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},I=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,u=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var l=++nm,c=null,f=[],d={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var m=em({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:f}}}),p=m.rangeInterceptor,h=m.interceptor;r.intercept("set-ranges",p),r.intercept("toggle-ranges",p),r.intercept("toggle-values",h),r.intercept("set-values",h),r.intercept("add-values",h),r.on("start",(function(){return n.begin(u)}));var v={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};am(n,v);var y=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(d=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){a(r,d,c).forEach((function(e){um(e,o.select.brushSelectionIncludeMax,y),n.select(e)}))}))):r.on("update",(function(){a(r,d,c).forEach((function(e){return n.select(e)}))})),0===tm.length&&im(),tm.push({key:l,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){f=e},release:function(){c=null;var e=tm.indexOf(tm.filter((function(e){return e.key===l}))[0]);-1!==e&&tm.splice(e,1),tm.length||om(),sm(n,v)}}}({brush:A,majorScale:l,actions:n,selections:r,picassoQ:i,selectionsFn:O});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=ml(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:A,interceptors:C});var T=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,u=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=ml(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]}));return function(){a.forEach((function(e){var n=ml(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),l=gm({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||"Shift"!==e.key||(t.lasso.action(!0),n=!0)},i=function(e){"Shift"===e.key&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){u(),l(),c()}}({chart:t,brush:A,actions:n,selections:r,selectionInfo:N.selectionInfo,selectionActions:{clear:f,reset:d},selectionEvents:p,brushEvents:v});if(s){var w=!0===s?pl(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;I.allowSimultaneous(w)}return{unbindEvents:T,state:N,picassoSelections:I,brush:A}}function Mm(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=xm({chart:t,actions:i,selections:n,picassoQ:$d,config:a}),u=s.unbindEvents,l=s.state,c=s.picassoSelections,f=s.brush,d=a.custom,m=void 0===d?{}:d,p=a.legendAlias,h=void 0===p?void 0:p,v=a.setBrushAliases,y=void 0===v?Qd:v;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return l.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:Zd(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.singleSelectIndex;return l.singleSelectDimensions[e]},getCanSelect:function(){return l.canSelect},getSelectionInfo:function(){return l.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var u=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,l=void 0===u?[]:u;return s.lockedDimensions=l.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=l.map((function(e,t){return Jd({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===l.length||l.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=l[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:c,layout:e});Object.assign(l,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=dl(e,["colorField","useLegendCube"]),o=fl({useLegendCube:r,colorField:t,brush:f,legendAlias:h},i);y(fl(fl({},o),{},{defaultFunc:function(){return Qd(o)}}))},destroy:function(){u(),c.release()},custom:fl({},m)}}var Sm="QlikView Sans, sans-serif",Em="#737373",Cm="#cccccc",qm="#e6e6e6";function Om(e){var t={};return[].concat(pl(e),pl([["","","color"],["object","axis.title","fontFamily",Sm],["object","axis.title","fontSize","13px"],["object","axis.title","color"],["object","axis.label.name","fontFamily",Sm],["object","axis.label.name","fontSize","12px"],["object","axis.label.name","color","#595959"],["object","axis.line.major","color",Cm],["object","axis.line.minor","color",qm],["object","grid.line.major","color",Cm],["object","grid.line.minor","color",qm],["object","grid.line.highContrast","color",qm],["object","referenceLine.label.name","fontFamily",Sm],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.label.name","color","#333333"],["object","referenceLine.outOfBounds","fontFamily",Sm],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","color",qm],["object","referenceLine.outOfBounds","backgroundColor",Em,function(e){return"transparent"===e?Em:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}function Am(e,t){var n={};return e.forEach((function(e){var r=ml(e,5),i=r[0],o=r[1],a=r[2],s=r[3],u=r[4],l=(void 0===u?function(e){return e}:u)(function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(!e||!1===t)return i;var o=e.getStyle(t,n,r);return void 0===o?i:o}(t,i,o,a,s));Jc(n,[o,a].filter(Boolean).join("."),l)})),n}var Dm={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function Nm(e){var t=e.chart,n=e.models,r=e.viewState,i=e.viewCache,o=e.axis,a=Zc(),s=n.dockService;return function(e){var n,u,l,c,f,d,m=e.data;return f=m.items,d=(t.component("".concat(ka.COMPONENT.BAR,"-").concat(o))||{}).rect,(f.length&&d?(u=r.get("zoom"),l=u.min,c=u.max,a.get([l,c])||a.empty()&&!1):2)||(n=Dm[s.meta.chart.mode],0===Math.abs(i.get("continuousMax")-i.get("continuousMin"))&&n)||function(){var e=r.get("zoom"),t=e.min,n=e.max,o=Math.abs(i.get("continuousMax")-i.get("continuousMin")),u=Math.abs(n-t),l=Dm[s.meta.chart.mode],c=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(u/o/.2,1));return a.set([t,n],Math.max(2,Math.min(l,c)))}()}}var Im=function(e){var t=e.isContinuous,n=e.isBarSeriesGrouped,r=e.styleModel,i=e.discreteModel,o=e.isBarSeriesStackedInBothAxis;return t?1:r.query.bar.getHasStyling()?r.query.bar.getHasStrokeWidth()?function(){var e=r.query.bar.getStrokeWidth()/i.query.getItemSize(),t=r.query.bar.getWidthFn()(),n=t+e;return n>1?t-(n-1):t}:r.query.bar.getWidthFn():n||o?.9:.7};function Tm(e){return Math.min(Math.max(0,e),1)}var wm=function(e){var t=e.chart,n=e.models,r=e.viewState,i=e.viewCache,o=e.isPrimary,a=n.layoutService,s=n.dockService,u=n.colorService,l=n.seriesModel,c=n.styleModel,f=n.discreteModel,d=n.primaryExtremumModel,m=n.secondaryExtremumModel,p=a.meta,h=p.isContinuous,v=p.isBarSeriesStacked,y=p.isBarSeriesGrouped,g=p.isBarSeriesStackedInBothAxis,b=function(e){return e.datum.start?e.datum.start.value:e.scale.min()},x=o?Ra.AXIS.PRIMARY:Ra.AXIS.SECONDARY,M=o?ka.SCALE.MINOR.PRIMARY:ka.SCALE.MINOR.SECONDARY;if(!(o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;var S=v?{scale:M,start:{ref:"start",fn:function(e){var t=b(e);return Tm(e.scale(t))}},end:{ref:"end",fn:function(e){var t=function(e){return e.datum.end?e.datum.end.value:b(e)}(e);return Tm(e.scale(t))}}}:{scale:M,start:{ref:"start",fn:function(e){var t=b(e);return Tm(e.scale(t))}},end:{ref:"end",fn:function(e){var t,n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?b(e):e.datum.end.value;return Tm(e.scale(n))}}},E=(o?d:m).query.getExtrema(),C=v?function(e){var t=e.start,n=e.end;return Zu(t.value,n.value,E)}:function(e){return tl(e.end.value,E)};return{type:"box",key:"".concat(ka.COMPONENT.BAR,"-").concat(x),data:{filter:function(){if(!v){var e=l.query.series(Ra.TYPE.BAR).filter((function(e){return e.isPrimary===o})).map((function(e){return e.ref}));return function(t){return e.some((function(e){return e===t.end.source.field}))}}}(),collection:v?o?ka.COLLECTION.STACKED_PRIMARY:ka.COLLECTION.STACKED_SECONDARY:o?ka.COLLECTION.PRIMARY:ka.COLLECTION.SECONDARY},preferredSize:h?function(){return{size:0,edgeBleed:{left:1,right:1}}}:void 0,settings:{orientation:s.meta.minor.orientation,major:{scale:ka.SCALE.MAJOR,fn:Eu({layoutService:a,axis:x}),ref:h?{start:"major",end:"major"}:void 0},minor:S,box:{width:Im({isContinuous:h,isBarSeriesGrouped:y,styleModel:c,discreteModel:f,isBarSeriesStackedInBothAxis:g}),minWidthPx:h?Nm({chart:t,models:n,viewState:r,viewCache:i,axis:x}):void 0,fill:u.getColor(),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor(),minHeightPx:.3,opacity:function(e){var t,n;return!0===(null===(t=e.datum)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)||C(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:qu({layoutService:a,active:{opacity:function(e){var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||C(e.data)?0:1}},inactive:{opacity:function(e){var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||C(e.data)?0:yu}}})}},Lm=function(e){var t=e.chart,n=e.models,r=e.viewState,i=e.viewCache,o=e.isPrimary,a=n.layoutService,s=n.dockService,u=n.colorService,l=n.seriesModel,c=n.styleModel,f=n.discreteModel,d=a.meta,m=d.isBarSeriesStacked,p=d.isContinuous,h=d.isBarSeriesGrouped,v=d.isBarSeriesStackedInBothAxis,y=o?Ra.AXIS.PRIMARY:Ra.AXIS.SECONDARY,g=o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!m||0===g)return!1;return{key:"".concat(ka.COMPONENT.STACK_BAR,"-").concat(y),type:"box",data:{collection:o?ka.COLLECTION.STACKED_TOTAL_PRIMARY:ka.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:ka.SCALE.MAJOR,fn:Eu({layoutService:a,axis:y}),ref:p?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:o?ka.SCALE.MINOR.PRIMARY:ka.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:s.meta.minor.orientation,box:{width:Im({isContinuous:p,isBarSeriesGrouped:h,styleModel:c,discreteModel:f,isBarSeriesStackedInBothAxis:v}),minWidthPx:p?Nm({chart:t,models:n,viewState:r,viewCache:i,axis:y}):2,opacity:0,fill:u.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function km(e){var t=e.style,n=e.simplifiedPlacement;return function(e){return Nt.isDark(n.background?n.background.fill:e.node.attrs.fill)?t.lightColor:t.darkColor}}function Rm(e,t){var n="horizontal"===e.dockService.meta.major.orientation;return{placements:t.simplifiedPlacements.map((function(e){return function(e){var t=e.simplifiedPlacement,n=e.style,r=e.isHorizontal,i=t.padding||{left:r?0:4,right:r?0:4,top:r?4:0,bottom:r?4:0};return{position:t.position,justify:t.justify,fill:t.onBackground?n.color:km({style:n,simplifiedPlacement:t}),overflow:t.overflow,background:t.background,padding:i}}({simplifiedPlacement:e,style:t.style,isHorizontal:n})})),label:t.label}}function Pm(e,t,n,r){var i=function(e,t){return function(e,t){if(t&&0===e){var n=t.min,r=t.max;return 0===r&&0===n?1:r<=0?-1:n>=0||r>=-n?1:-1}return e>=0?1:-1}(e,t)}(e,r),o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}var jm=function(e,t){if(!e)return!1;var n=t.isBarSeriesStacked,r=t.isContinuous;return!n||!r},Fm=function(e,t){if(!e)return!1;var n=t.isBarSeriesStacked,r=t.isContinuous;return!!n&&(!!r||!1!==e)};function _m(e,t,n,r){var 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}var Hm=function(e){var t,n=e.models,r=e.environment,i=e.isPrimary,o=n.layoutService,a=n.seriesModel,s=o.meta,u="rtl"===r.options.direction,l=n.themeService.getStyles(),c=n.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),f=i?Ra.AXIS.PRIMARY:Ra.AXIS.SECONDARY;if(!(i?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount)||!jm(c,s))return!1;!s.isBarSeriesStacked&&(t=s.isBarSeriesStacked?1:0);var d={label:function(e){return Yu(e.data,e)},simplifiedPlacements:_m(t,0===t?1:0,s.isBarSeriesStacked?.5:1,s.isContinuous),style:l.label.value},m=[Rm(n,d)],p=[{component:"".concat(ka.COMPONENT.BAR,"-").concat(f),selector:"rect",strategy:{type:"bar",settings:{direction:function(e){return Pm(e.data.end.value,n.dockService.meta.minor.orientation,u,0)},labels:m,fontSize:l.label.value.numFontSize,fontFamily:l.label.value.fontFamily}}}];return{type:"labels",key:"".concat(ka.COMPONENT.BAR_LABEL,"-").concat(f),layout:{minimumLayoutMode:hu.VALUE_LABEL},settings:{sources:p}}};function Vm(e,t,n){var r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function Bm(e){var t=e.chart,n=e.models,r=e.environment,i=e.isPrimary,o=n.layoutService.meta,a="rtl"===r.options.direction,s=n.themeService.getStyles(),u=n.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),l=i?Ra.AXIS.PRIMARY:Ra.AXIS.SECONDARY;if(0===(i?n.seriesModel.meta.primaryBarSeriesCount:n.seriesModel.meta.secondaryBarSeriesCount)||!Fm(u,o))return!1;var c=t.formatter(i?ka.FORMATTER.PRIMARY:ka.FORMATTER.SECONDARY)||function(e){return e},f=function(e){return 0===e?"":c(e)},d={label:function(e){return f(e.data.sumOfPositives.value)},simplifiedPlacements:Vm("outside",true,o.isContinuous),style:s.label.value},m={label:function(e){return f(e.data.sumOfNegatives.value)},simplifiedPlacements:Vm("opposite",true,o.isContinuous),style:s.label.value},p=[Rm(n,d),Rm(n,m)];return{type:"labels",key:"".concat(ka.COMPONENT.STACK_BAR_LABEL,"-").concat(l),layout:{displayOrder:2,minimumLayoutMode:hu.VALUE_LABEL},settings:{sources:[{component:"".concat(ka.COMPONENT.STACK_BAR,"-").concat(l),selector:"rect",strategy:{type:"bar",settings:{direction:function(e){return Pm(e.data.sumOfPositives.value,n.dockService.meta.minor.orientation,a)},labels:p,fontSize:s.label.value.numFontSize,fontFamily:s.label.value.fontFamily}}}]}}}var zm=Object.freeze({__proto__:null,hasMaxHat:function(e,t){var n=t.meta.hasExplicitMax,r=t.explicit.max;return!!n&&e>r&&r>0},hasMinHat:function(e,t){var n=t.meta.hasExplicitMin,r=t.explicit.min;return!!n&&e<r&&r<0}}),Ym={min:"Min",max:"Max"};function Um(e){var t=e.chart,n=e.models,r=e.type,i=e.viewCache,o=e.viewState,a=e.isPrimary,s=n.layoutService,u=n.dockService,l=n.primaryExtremumModel,c=n.secondaryExtremumModel,f=n.styleModel,d=n.discreteModel,m=s.meta,p=m.isBarSeriesStacked,h=m.isContinuous,v=m.isBarSeriesGrouped,y=m.isBarSeriesStackedInBothAxis,g=p?Lm({chart:t,models:n,viewCache:i,viewState:o,isPrimary:a}):wm({chart:t,models:n,viewCache:i,viewState:o,isPrimary:a}),b=a?l.query.getExtrema():c.query.getExtrema(),x=r===Ou,M=a?Ra.AXIS.PRIMARY:Ra.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta["hasExplicit".concat(Ym[t])]}(b,r)||function(e,t,n){var r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!zm["has".concat(Ym[t],"Hat")](i,e)}(b,r,x)||function(e,t,n){var r=n?function(e){return e<0}:function(e){return e>0};return e.meta["hasExplicit".concat(Ym[t])]&&r(e.explicit[t])}(b,r,x))return!1;var S="end";p&&(S=x?"sumOfPositives":"sumOfNegatives");var E=function(e){var t;return function(){return void 0===t&&(t=e()),t}}((function(){return t.scale(a?ka.SCALE.MINOR.PRIMARY:ka.SCALE.MINOR.SECONDARY)[r]()}));var C=function(e){var t=e.chart,n=e.type,r=e.isPrimary,i=e.dock,o=i,a=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY)),s=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.SECONDARY));return a&&s&&(o=r?i:"@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY)),o}({chart:t,type:r,isPrimary:a,dock:x?u.meta.minor.end:u.meta.minor.start});return{type:"box-sliced-hat",key:"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(r,"-").concat(M),layout:{dock:C},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:me({},g.settings.box,{fill:p?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){var t=E(),n=function(e){if("number"!=typeof e)return e;var t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[S].value);return x?n>t:n<t},width:Im({isContinuous:h,isBarSeriesGrouped:v,styleModel:f,discreteModel:d,isBarSeriesStackedInBothAxis:y}),strokeWidth:f.query.bar.getStrokeWidth(),stroke:f.query.bar.getStrokeColor()})},brush:qu({layoutService:s})}}var Wm={min:"Min",max:"Max"},Xm={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Gm(e){var t=e.chart,n=e.models,r=e.type,i=e.viewCache,o=e.viewState,a=e.isPrimary,s=n.layoutService,u=n.dockService,l=n.primaryExtremumModel,c=n.secondaryExtremumModel,f=n.themeService,d=u.meta.minor,m=d.end,p=d.start,h=s.meta.isBarSeriesStacked,v=h?Lm({chart:t,models:n,viewCache:i,viewState:o,isPrimary:a}):wm({chart:t,models:n,viewCache:i,viewState:o,isPrimary:a}),y=a?l.query.getExtrema():c.query.getExtrema(),g=r===Ou?y.implicit.bar.max:y.implicit.bar.min,b=Number(g.toFixed(13)),x=a?Ra.AXIS.PRIMARY:Ra.AXIS.SECONDARY;if(!v)return!1;if(!rl["is".concat(Wm[r],"OutOfBounds")](b,y))return!1;var M=function(e){var t=e.chart,n=e.type,r=e.end,i=e.start,o=e.isPrimary,a=n===Ou?r:i,s=t.component(ka.COMPONENT.LABEL_SPACE),u=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY)),l=t.component("".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.SECONDARY)),c=t.component("".concat(ka.COMPONENT.BAR_OOB,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY)),f=t.component("".concat(ka.COMPONENT.BAR_OOB,"-").concat(n,"-").concat(Ra.AXIS.SECONDARY));return u?a="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY):l?a="@".concat(ka.COMPONENT.SLICED_HAT,"-").concat(n,"-").concat(Ra.AXIS.SECONDARY):c&&f&&!o?a="@".concat(ka.COMPONENT.BAR_OOB,"-").concat(n,"-").concat(Ra.AXIS.PRIMARY):s&&n===Ou&&(a="@".concat(ka.COMPONENT.LABEL_SPACE)),a}({chart:t,type:r,end:m,start:p,isPrimary:a}),S="end";return h&&(S=r===Ou?"sumOfPositives":"sumOfNegatives"),{type:"box-out-of-bounds",key:"".concat(ka.COMPONENT.BAR_OOB,"-").concat(r,"-").concat(x),layout:{dock:M},data:v.data,settings:{orientation:v.settings.orientation,major:v.settings.major,minor:v.settings.minor,dockValue:Ie.getDockValue(r===Ou?m:p),oob:me({},v.settings.box,{fill:f.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;var n=h&&0===e.datum[S].value,i=rl["is".concat(Wm[r],"OutOfBounds")](e.datum[S].value,y,r);return(!n||function(e){var t=e.type,n=e.item,r=e.prop,i=e.extrema,o=n.datum[Xm[r]].value;return 0!==o&&rl["is".concat(Wm[t],"OutOfBounds")](o,i,t)}({type:r,item:e,prop:S,extrema:y}))&&i}})},brush:qu({layoutService:s})}}function Km(e){return Math.min(Math.max(0,e),1)}var $m=function(e){var t=e.chart,n=e.models,r=e.type,i=e.isPrimary,o=n.discreteModel,a=n.styleModel,s=n.seriesModel,u=n.layoutService;if(!(i?s.meta.primaryBarSeriesCount:s.meta.secondaryBarSeriesCount))return!1;var l=u.meta,c=l.isBarSeriesStacked,f=l.isContinuous,d=l.isBarSeriesGrouped,m=l.isBarSeriesStackedInBothAxis,p=t.scale(i?ka.SCALE.MINOR.PRIMARY:ka.SCALE.MINOR.SECONDARY),h=i?Ra.AXIS.PRIMARY:Ra.AXIS.SECONDARY,v=i?n.primaryExtremumModel.query.getExtrema():n.secondaryExtremumModel.query.getExtrema(),y=r===Ou;if(!nl({extrema:v,type:r}))return!1;var g=function(e){return e.datum.start?e.datum.start.value:e.scale.min()},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";return e.datum[t]?e.datum[t].value:g(e)};return{type:"box",key:"".concat(ka.COMPONENT.GHOST_BAR_OOB,"-").concat(r,"-").concat(h),data:{filter:function(){if(!c){var e=s.query.series(Ra.TYPE.BAR).filter((function(e){return e.isPrimary===i})).map((function(e){return e.ref}));return function(t){return e.some((function(e){return e===t.end.source.field}))}}}(),collection:c?i?ka.COLLECTION.STACKED_TOTAL_PRIMARY:ka.COLLECTION.STACKED_TOTAL_SECONDARY:i?ka.COLLECTION.PRIMARY:ka.COLLECTION.SECONDARY},settings:{orientation:n.dockService.meta.minor.orientation,major:{scale:ka.SCALE.MAJOR,fn:Eu({layoutService:u,axis:h}),ref:f?{start:"major",end:"major"}:void 0},minor:{scale:i?ka.SCALE.MINOR.PRIMARY:ka.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:function(e){var t=g(e);return Km(e.scale(t))}},end:c?"max"===r?{ref:"sumOfPositives",fn:function(e){var t=b(e,"sumOfPositives");return Km(e.scale(t))}}:{ref:"sumOfNegatives",fn:function(e){var t=b(e,"sumOfNegatives");return Km(e.scale(t))}}:{ref:"end",fn:function(e){var t=b(e);return Km(e.scale(t))}}},box:{width:Im({isContinuous:f,isBarSeriesGrouped:d,styleModel:a,discreteModel:o,isBarSeriesStackedInBothAxis:m}),stroke:"transparent",fill:"none",opacity:0,show:function(e){var t="end";c&&(t=y?"sumOfPositives":"sumOfNegatives");var n=e.datum[t]?e.datum[t].value:p.max();return y?n>p.max():n<p.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Jm(e,t,n,r,i){var o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}var Zm=function(e){var t=e.chart,n=e.models,r=e.type,i=e.environment,o=e.isPrimary,a=n.layoutService,s=n.dockService,u=n.primaryExtremumModel,l=n.secondaryExtremumModel,c=n.themeService,f=n.seriesModel,d=c.getStyles(),m=a.meta,p=m.isBarSeriesStacked,h=t.formatter(o?ka.FORMATTER.PRIMARY:ka.FORMATTER.SECONDARY),v=a.getLayoutValue("dataPoint.showBarLabels",!1),y="horizontal"===s.meta.major.orientation,g="rtl"===i.options.direction;if(!(o?f.meta.primaryBarSeriesCount:f.meta.secondaryBarSeriesCount)||!p&&!jm(v,m)||p&&!Fm(v,m))return!1;var b=o?u.query.getExtrema():l.query.getExtrema();if(!b.meta.hasExplicit)return!1;var x=r===Ou?b.implicit.bar.max:b.implicit.bar.min;if(!(r===Ou?Qu(x,b):el(x,b)))return!1;var M=function(e){return Yu(e.data,e)};m.isBarSeriesStacked&&(M=r===Ou?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(Qu(e.data.sumOfPositives.value,b)){var n=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return h?h(n):n}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(el(e.data.sumOfNegatives.value,b)){var n=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return h?h(n):n}return""});var S={label:M,simplifiedPlacements:Jm("outside",true,m.isContinuous,y,g),style:d.label.value},E={label:M,simplifiedPlacements:Jm("opposite",true,m.isContinuous,y,g),style:d.label.value},C=[Rm(n,S),Rm(n,E)],q=o?Ra.AXIS.PRIMARY:Ra.AXIS.SECONDARY,O="horizontal"===s.meta.major.orientation?"down":"right",A=[{component:"".concat(ka.COMPONENT.GHOST_BAR_OOB,"-").concat(r,"-").concat(q),selector:"rect",strategy:{type:"bar",settings:{direction:O,labels:C,fontSize:d.label.value.numFontSize,fontFamily:d.label.value.fontFamily}}}];return{key:"".concat(ka.COMPONENT.BAR_OOB_LABEL,"-").concat(r,"-").concat(q),type:"labels",layout:{minimumLayoutMode:hu.VALUE_LABEL},settings:{sources:A}}},Qm=function(e){var t=e.chart,n=e.environment,r=e.models,i=e.viewState,o=e.viewCache,a=r.seriesModel,s=a.query.series(Ra.TYPE.BAR).slice(-1),u=a.query.series(Ra.TYPE.LINE),l=a.query.series(Ra.TYPE.MARKER);return[].concat(ee(function(e){var t=e.chart,n=e.models,r=e.viewState,i=e.viewCache;return[wm({chart:t,models:n,viewState:r,viewCache:i,isPrimary:!0}),wm({chart:t,models:n,viewState:r,viewCache:i,isPrimary:!1})]}({chart:t,models:r,viewState:i,viewCache:o})),ee(function(e){var t=e.chart,n=e.models,r=e.viewState,i=e.viewCache;return[Lm({chart:t,models:n,viewState:r,viewCache:i,isPrimary:!0}),Lm({chart:t,models:n,viewState:r,viewCache:i,isPrimary:!1})]}({chart:t,models:r,viewState:i,viewCache:o})),ee(u.map((function(e){return Fu({models:r,environment:n,series:e})}))),ee(u.map((function(e){return zu({models:r,series:e,environment:n})}))),ee(l.map((function(e){return Ru({chart:t,models:r,series:e,environment:n})}))),ee(u.map((function(e){return Uu({chart:t,models:r,environment:n,series:e,lineSeries:u})}))),ee(function(e){var t=e.chart,n=e.models,r=e.environment;return n.layoutService.meta.isBarSeriesStacked?[Bm({chart:t,models:n,environment:r,isPrimary:!0}),Bm({chart:t,models:n,environment:r,isPrimary:!1})]:[Hm({models:n,environment:r,isPrimary:!0}),Hm({models:n,environment:r,isPrimary:!1})]}({chart:t,models:r,environment:n})),ee(function(e){var t=e.chart,n=e.models,r=e.viewCache,i=e.viewState;return[Um({chart:t,models:n,type:"max",viewCache:r,viewState:i,isPrimary:!0}),Um({chart:t,models:n,type:"min",viewCache:r,viewState:i,isPrimary:!0}),Um({chart:t,models:n,type:"max",viewCache:r,viewState:i,isPrimary:!1}),Um({chart:t,models:n,type:"min",viewCache:r,viewState:i,isPrimary:!1})]}({chart:t,models:r,viewCache:o,viewState:i})),ee(function(e){var t=e.chart,n=e.models,r=e.viewCache,i=e.viewState;return[Gm({chart:t,models:n,type:"max",viewCache:r,viewState:i,isPrimary:!0}),Gm({chart:t,models:n,type:"min",viewCache:r,viewState:i,isPrimary:!0}),Gm({chart:t,models:n,type:"max",viewCache:r,viewState:i,isPrimary:!1}),Gm({chart:t,models:n,type:"min",viewCache:r,viewState:i,isPrimary:!1})]}({chart:t,models:r,viewCache:o,viewState:i})),ee(function(e){var t=e.chart,n=e.models;return[$m({chart:t,models:n,type:"max",isPrimary:!0}),$m({chart:t,models:n,type:"min",isPrimary:!0}),$m({chart:t,models:n,type:"max",isPrimary:!1}),$m({chart:t,models:n,type:"min",isPrimary:!1})]}({chart:t,models:r})),ee(function(e){var t=e.chart,n=e.models,r=e.environment;return[Zm({chart:t,models:n,type:"max",environment:r,isPrimary:!0}),Zm({chart:t,models:n,type:"min",environment:r,isPrimary:!0}),Zm({chart:t,models:n,type:"max",environment:r,isPrimary:!1}),Zm({chart:t,models:n,type:"min",environment:r,isPrimary:!1})]}({chart:t,models:r,environment:n})),[ol({chart:t,models:r,markerSeries:l,lineSeries:u,barSeries:s,environment:n,type:"max"}),ol({chart:t,models:r,markerSeries:l,lineSeries:u,barSeries:s,environment:n,type:"min"}),Gu({chart:t,models:r,environment:n,lineSeries:u})])},ep=0,tp=1,np=3;function rp(e){var t=e.models,n=t.dockService,r=t.seriesModel,i=t.layoutService,o=t.themeService,a=i.getLayoutValue("gridLine",{}),s=a.auto,u=a.spacing;if(!s&&u===ep)return!1;var l=o.getStyles(),c=r.meta.primarySeries.length>0;return Y({key:ka.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:hu.GRID_LINE},preferredSize:function(){return{size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}},ticks:{show:!(!s&&u===tp)||function(e,t){return t%2==0},stroke:l.grid.line.major.color},minorTicks:{show:!s&&u===np,stroke:l.grid.line.minor.color}},"horizontal"===n.meta.major.orientation?"y":"x",c?ka.SCALE.MINOR.PRIMARY:ka.SCALE.MINOR.SECONDARY)}function ip(e){var t=e.models,n=t.primaryExtremumModel,r=t.primaryTickModel,i=t.themeService,o=t.dockService,a=t.seriesModel,s=n.query.getExtrema();return!!(a.meta.primarySeries.length>0&&s.meta.includesZero)&&{key:ka.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:hu.GRID_LINE},show:function(){return r.query.getMin()<=0&&r.query.getMax()>=0},lines:Y({},"horizontal"===o.meta.minor.orientation?"x":"y",[{value:0,scale:ka.SCALE.MINOR.PRIMARY,line:{stroke:i.getStyles().grid.line.highContrast.color}}])}}function op(e){var t=e.models;return[rp({models:t}),ip({models:t})].concat(ee(function(e){var t=e.models,n=t.layoutService,r=t.themeService,i=n.meta,o=i.isContinuous,a=i.isTime;if(!o)return[];var s=r.getStyles(),u={type:"grid-line",layout:{minimumLayoutMode:hu.GRID_LINE},ticks:{stroke:s.grid.line.major.color},minorTicks:{show:!1,stroke:s.grid.line.minor.color}};return a?[me(!0,{},u,{key:"time-inner-grid",x:{scale:ka.SCALE.MAJOR_INNER},ticks:{stroke:s.grid.line.minor.color}}),me(!0,{},u,{key:"time-outer-grid",x:{scale:ka.SCALE.MAJOR}})]:[me(!0,{},u,{key:"continuous-grid",x:{scale:ka.SCALE.MAJOR},minorTicks:{show:!0}})]}({models:t})))}function ap(e){var t=e.models,n=e.environment,r=e.actions,i=t.layoutService,o=t.dockService,a=t.propertiesModel,s=t.appModel,u=t.genericObjectModel,l=t.themeService,c=a.query.getProperties(),f=i.getLayoutValue("dimensionAxis");if(!f)return!1;var d=f.show;if("all"!==d&&"title"!==d)return!1;var m=o.meta.major.orientation,p=l.getStyles();return{type:"data-title",key:ka.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:o.meta.major.dock,minimumLayoutMode:hu.AXIS_TITLE.MAJOR[m.toUpperCase()]},settings:{hyperCube:i.getHyperCube(),hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!0,disabled:function(){return!r.interact.enabled()},model:u,app:s,translator:n.translator,rtl:"rtl"===n.options.direction,selections:void 0},style:{fontFamily:p.axis.title.fontFamily,fontSize:p.axis.title.fontSize,color:p.axis.title.color}}}var sp=function(e,t,n){return e.query.seriesByAxis(n).map((function(e){return j(j({},t[e.refIndex]),{},{explicitColumn:e.refIndex})}))};function up(e){var t=e.models,n=e.environment,r=e.actions;return[ap({models:t,environment:n,actions:r})].concat(ee(function(e){var t=e.models,n=e.environment,r=e.actions,i=t.layoutService,o=t.dockService,a=t.seriesModel,s=t.propertiesModel,u=t.appModel,l=t.genericObjectModel,c=t.themeService,f=s.query.getProperties(),d=i.getLayoutValue("measureAxes");if(!d||!d.length)return!1;var m=c.getStyles();return a.meta.measureAxes.filter((function(e){return e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show})).map((function(e){var t=i.getHyperCube(),s=e.isPrimary,c=a.query.seriesByAxis(s).length>1,d={type:"data-title",key:s?ka.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:ka.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:s?o.meta.minor.dock:o.meta.minorSecondary.dock,minimumLayoutMode:hu.AXIS_TITLE.MINOR},settings:{hyperCube:t,hyperCubeDef:f&&f.qHyperCubeDef,isDimension:!1,explicitItemInfos:sp(a,t.qMeasureInfo,s),onChangeToAlternative:function(e){var t=e.oldItem,n=e.newItem;n.qDef.series=t.qDef.series;var r=t.qAttributeExpressions.findIndex((function(e){return"colorByExpression"===e.id}));if(-1!==r){var i=t.qAttributeExpressions.splice(r,1)[0];n.qAttributeExpressions.unshift(i)}},disabled:function(){return!r.interact.enabled()},model:l,app:u,translator:n.translator,rtl:"rtl"===n.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:m.axis.title.fontFamily,fontSize:m.axis.title.fontSize,color:m.axis.title.color}};return c&&(d.settings.padding="0",d.settings.minWidth="auto"),d}))}({models:t,environment:n,actions:r})))}function lp(e){var t=e.models,n=e.environment,r=e.viewState,i=e.viewCache,o=t.discreteModel,a=t.layoutService,s=t.dockService,u=t.continuousModel,l=t.themeService,c=a.meta,f=c.isSnapshot,d=c.isDiscrete,m=c.isContinuous,p="rtl"===n.options.direction;return!(f&&!m)&&function(e){var t=e.layoutService,n=e.dockService,r=e.discrete,i=e.continuousDataModel,o=e.viewState,a=e.viewCache,s=e.themeService,u=e.rtl,l=e.scrollbarOverride,c=e.visualizeCache,f=void 0!==c&&c,d=e.deviceType,m=Ds({layoutService:t,override:l});if(m.none)return!1;var p=n.meta.major.orientation,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===p?n.meta.minor.start:n.meta.minor.end,minimumLayoutMode:"XSMALL"},show:function(){return t.meta.isContinuous?i.getDimensionCardinality()>1:r.query.getCanScroll()},settings:{orientation:p,rtl:u,isContinuous:t.meta.isContinuous,range:function(){return Os({layoutService:t,viewState:o,viewCache:a})}}};m.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===d?{max:16,min:16}:{max:8,min:8}},t.meta.isContinuous||(h.settings.size.thumb={min:4}));var v=s.getStyles();return v.color&&(h.style={standard:{thumb:{"border-color":v.color,opacity:.4},before:{background:v.color,opacity:.1},after:{background:v.color,opacity:.1}}}),t.meta.isDiscrete&&f&&(h.settings.injections=function(){return[qs({layoutService:t,discrete:r})]}),h}({viewState:r,viewCache:i,discrete:o,continuousDataModel:u,layoutService:a,dockService:s,themeService:l,rtl:p,scrollbarOverride:{predicate:function(){return d},value:Cs.OPTIONS.BAR.value},deviceType:n.deviceType})}function cp(e){var t=e.chart,n=e.models,r=e.viewState,i=e.viewCache,o=e.isPrimary,a=n.layoutService,s=wm({chart:t,models:n,viewState:r,viewCache:i,isPrimary:o});if(!s)return!1;var u=o?Ra.AXIS.PRIMARY:Ra.AXIS.SECONDARY;return s.key="".concat(ka.COMPONENT.MINI_CHART.BAR,"-").concat(u),s.data.collection=a.meta.isBarSeriesStacked?o?ka.COLLECTION.REDUCED_STACKED_PRIMARY:ka.COLLECTION.REDUCED_STACKED_SECONDARY:o?ka.COLLECTION.REDUCED_PRIMARY:ka.COLLECTION.REDUCED_SECONDARY,s.settings.box.minWidthPx=void 0,s.settings.minor.scale=o?ka.SCALE.MINOR.REDUCED_PRIMARY:ka.SCALE.MINOR.REDUCED_SECONDARY,s.settings.major.scale=ka.SCALE.REDUCED,s.layout={dock:"@scrollbar"},s}function fp(e){var t=e.chart,n=e.models,r=e.viewState,i=e.viewCache,o=e.environment;return ou(n)?[cp({chart:t,models:n,viewState:r,viewCache:i,isPrimary:!0}),cp({chart:t,models:n,viewState:r,viewCache:i,isPrimary:!1})].concat(ee(function(e){var t=e.environment,n=e.models,r=n.styleModel.query.line.getStrokeDasharrayFn();return n.seriesModel.query.series(Ra.TYPE.LINE).map((function(e){var i=Fu({models:n,environment:t,series:e});return i.key=Nu(ka.COMPONENT.MINI_CHART.LINE,e),i.data.collection=ka.COLLECTION.REDUCED,i.settings.coordinates.minor.scale=e.isPrimary?ka.SCALE.MINOR.REDUCED_PRIMARY:ka.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=ka.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=function(){return void 0===r.apply(void 0,arguments)?void 0:"1, 1"},i.layout={dock:"@scrollbar"},i}))}({environment:o,models:n})),ee(function(e){var t=e.models,n=e.environment;return t.seriesModel.query.series(Ra.TYPE.MARKER).map((function(e){var r=Ru({models:t,environment:n,series:e});return r.key=Nu(ka.COMPONENT.MINI_CHART.MARKER,e),r.data.collection=ka.COLLECTION.REDUCED,r.settings.y.scale=e.isPrimary?ka.SCALE.MINOR.REDUCED_PRIMARY:ka.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=ka.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}({models:n,environment:o}))):[]}function dp(e){var t=e.models,n=e.environment;if("categorical"!==t.colorService.getSettings().type)return!1;var r=Le({key:ka.COMPONENT.LEGEND_TOOLTIP,rtl:"rtl"===n.options.direction}),i=t.themeService.getStyles();return me(!0,r,{settings:{filter:function(e){return function(e){return e.nodes.filter((function(e){return e.data&&e.key===ka.COMPONENT.LEGEND_CATEGORICAL}))}({nodes:e})},extract:function(e){return function(e){return[[{content:e.context.node.data.label,style:{"font-weight":"bold","text-align":"left"},colspan:2}]]}({context:e})},placement:"pointer"},scale:ka.SCALE.COLOR,style:{content:{fontFamily:i.fontFamily}}})}function mp(e){var t=e.colorSettings,n=e.nodes,r=n.filter((function(e){return e.data[ka.SCALE.COLOR]&&function(e){return e.data[ka.SCALE.COLOR].value===e.data.end.value}(e)}))[0];if(r)return r;null!=t&&t.field&&(r=Q(n.filter((function(e){var n,r;return(null===(n=e.data[ka.SCALE.COLOR])||void 0===n||null===(r=n.source)||void 0===r?void 0:r.field)===t.field})),1)[0]);return r||n[0]}var pp=function(e){var t=e.models,n=e.rtl,r=je.detectTextDirection,i=t.colorService.getSettings();return function(e){var t=e.context,o=e.nodes,a=mp({colorSettings:i,nodes:o}),s=function(e){var t=e.colorSettings,n=e.context,r=e.node.data.color;if("color"!==t.type&&r&&t.fieldType){var i=r.value,o=r.label,a=r.source,s=a.key,u=a.field,l=(0,n.resources.dataset)(s).field(u).formatter();if(l&&"measure"===t.fieldType)return Number.isNaN(i)?"-":l(r.value);var c=o||i;return Number.isNaN(c)||"NaN"===c?"-":c}}({colorSettings:i,context:t,node:a});if(void 0===s)return!1;var u=function(e){var t=e.colorSettings,n=e.context,r=e.node;if(t.label)return t.label;var i=r.data.color;if("color"!==t.type&&i){var o=n.resources.dataset,a=i.source,s=a.key,u=a.field;return o(s).field(u).title()}}({colorSettings:i,context:t,node:a}),l=function(e){var t=e.node,n=t.data,r=t.attrs;return n.fillColor?n.fillColor:r&&r.fill?r.fill:void 0}({node:a}),c=t.h("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{label:n?[":",u]:[u,":"],value:n?[s,c]:[c,s],labelDirection:r(u),valueDirection:r(s)}}};function hp(e){var t=e.chart,n=e.models,r=e.rtl,i=e.translator,o=je.detectTextDirection,a=n.tooltipModel,s=n.layoutService,u=pp({models:n,rtl:r}),l=function(e){var t=e.rtl,n=je.detectTextDirection;return function(e){var r,i,o,a=e.node,s=e.dataset,u=a.data,l=u.segment,c=u.end,f=l||c,d=f.value,m=f.label,p=f.source,h=p.key,v=p.field,y=s(h).field(v),g=y.title();return o=y.raw().isCustomFormatted?m:""===d||Number.isNaN(d)||!0===(null===(r=a.data)||void 0===r||null===(i=r.null)||void 0===i?void 0:i.value)?"-":y.formatter()(d),{label:t?[":",g]:[g,":"],value:o,labelDirection:n(g),valueDirection:n(d)}}}({rtl:r});return function(e){var n=e.context,c=n.node.childrenNodes,f=c[0].data,d=n.resources.dataset,m=f.label,p=u({context:n,nodes:c}),h={dataId:f.value,title:{label:m,direction:o(m)},color:p},v=c.map((function(e){return l({chart:t,node:e,dataset:d})})).filter((function(e,t,n){return t===n.findIndex((function(t){return t.label[0]===e.label[0]&&t.value===e.value}))}));if(h.measures=p?v.filter((function(e){return e.label[0]!==p.label[0]||e.value!==p.value[1]})):v,a.query.useCustomTooltip()){var y,g,b=s.getLayout();b.tooltip.hideBasic&&(h.measures=[],h.color=void 0);var x=bs({nodes:[c[0]],layout:b,dataset:d}),M=x.customTooltipInfoAttrExpsArr,S=x.customTooltipAttrExpsArr,E=Q(M.filter((function(e){return e.id===Pa.CUSTOM.TITLE})).map((function(e){var t=e;return t.direction=o(h.customTitle),t})),1);h.customTitle=E[0];var C=Q(M.filter((function(e){return e.id===Pa.CUSTOM.DESCRIPTION})).map((function(e){var t=e;return t.direction=o(h.customDescription),t})),1);if(h.customDescription=C[0],h.customMeasures=S.map((function(e){var t=e;return t.label=r?[":",t.label]:[t.label,":"],t.value=""===t.value||"NaN"===t.value?"-":t.value,t.valueDirection=o(e.value),t.labelDirection=o(e.label),e})),null!==(y=(g=a.query).useTooltipChart)&&void 0!==y&&y.call(g))if(a.query.hasChartLimitation()){cs.destroyVisualization({customTooltipModel:a.query.getCustomTooltipModel()});var q=i.get("properties.tooltip.notselectedmessage");h.customLimitation=q}else{var O=cs.createContainer({ctx:n,layout:b});h.customChart=O}var A=[];c.forEach((function(e){var t,n;(null===(t=e.data)||void 0===t||null===(n=t.customTooltipImages)||void 0===n?void 0:n.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(A=e.data.customTooltipImages)})),A.length>0&&(h.customImages=A)}return h}}function vp(e){return(null==e?void 0:e.type)||Ra.TYPE.BAR}var yp={circle:"circle",square:"rect",diamond:"path",triangle:"path",bar:"rect"},gp=["".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.SECONDARY)];var bp=function(e){var t=function(e){var t=e.value,n=e.chart,r=e.seriesModel.meta.allSeries,i=[];return r.forEach((function(e){var r=vp(e);r===Ra.TYPE.BAR?i.push.apply(i,ee(n.findShapes("rect").filter((function(n){return-1!==gp.indexOf(n.key)&&n.data.typeIndex.value===e.typeIndex&&n.data.major.value===t})))):r===Ra.TYPE.LINE?i.push.apply(i,ee(n.findShapes("circle").filter((function(n){return n.key==="".concat(ka.COMPONENT.POINT,"-").concat(e.id)&&n.data.major.value===t})))):i.push.apply(i,ee(n.findShapes(yp[e.options.marker]).filter((function(n){return n.key==="".concat(ka.COMPONENT.MARKER,"-").concat(e.id)&&n.data.major.value===t}))))})),i}({chart:e.chart,seriesModel:e.seriesModel,value:e.value});return 0===t.lenght?null:{bounds:La(t.map((function(e){return e.bounds}))),data:t.map((function(e){return e.data})),childrenNodes:t,key:t[0].key}},xp=["".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Ou),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Au),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Ou,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Au,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Ou,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Au,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Au),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Au,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Au,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.DATA_OOB_MARKER,"-").concat(Ou),"".concat(ka.COMPONENT.DATA_OOB_MARKER,"-").concat(Au),ka.COMPONENT.AXIS.MAJOR],Mp=function(e){var t=e.chart,n=e.models,r=e.nodes,i=n.seriesModel,o=n.layoutService.meta.isContinuous,a=i.meta,s=a.pointComponentKeys,u=a.markerComponentKeys,l=[].concat(ee(s),ee(u)),c=[].concat(xp,ee(l));return r.length?function(e,t){return e.some((function(e){return e.key===ka.COMPONENT.AXIS_OVERLAY.CONTINUOUS}))||t&&e.every((function(e){return e.key===ka.COMPONENT.AXIS.MAJOR}))}(r,o)?[]:function(e){for(var t=e.chart,n=e.nodes,r=e.seriesModel,i=[],o=[],a=0;a<n.length;++a){var s=(n[a].data||{}).value;if(void 0!==s&&-1===o.indexOf(s)){o.push(s);var u=bp({chart:t,seriesModel:r,value:s});u&&i.push(u)}}return i}({chart:t,nodes:r.filter((function(e){return t={node:e}.node,c.map((function(e){return-1!==t.key.indexOf(e)})).some((function(e){return!0===e}));var t})),seriesModel:i}):[]};function Sp(e){var t=e.chart,n=e.models,r=e.environment,i=n.seriesModel.query.all(),o="rtl"===r.options.direction,a=r.translator,s=n.appModel,u=n.tooltipModel,l=n.propertiesModel,c=null==u?void 0:u.query.getCustomTooltipModel(),f=null==l?void 0:l.query.getProperties(),d=Le({key:ka.COMPONENT.TOOLTIP,rtl:o}),m=function(e){var t=e.chart,n=e.models,r=e.rtl,i=e.translator,o=hp({chart:t,models:n,rtl:r,translator:i});return function(e){var t=e.context,n=o({context:t}),i=n.dataId,a=n.title,s=n.color,u=n.measures,l=n.customTitle,c=n.customDescription,f=n.customMeasures,d=n.customImages,m=n.customChart,p=n.customLimitation,h={dataId:i,title:[{content:a.label,style:{"font-weight":"bold","text-align":r?"right":"left",direction:a.direction},colspan:2}],color:void 0,measures:[]};return s&&(h.color=[{content:s.label,style:{"text-align":r?"right":"left",direction:s.labelDirection}},{content:s.value,style:{"text-align":r?"left":"right","vertical-align":"middle",direction:s.valueDirection}}]),h.measures=u.map((function(e){return[{content:e.label,style:{"text-align":r?"right":"left",direction:e.labelDirection}},{content:e.value,style:{"text-align":r?"left":"right","vertical-align":"middle",direction:e.valueDirection}}]})),(l||c)&&0===f.length&&0===u.length&&(h.title=[]),l&&(h.customTitle=[{content:l.title,style:{"font-weight":"bold","text-align":r?"right":"left",direction:l.direction},colspan:2}]),c&&(h.customDescription=[{content:c.value,style:{"text-align":r?"right":"left",direction:c.direction},colspan:2}]),f&&(h.customMeasures=f.map((function(e){return[{content:e.label,style:{"text-align":r?"right":"left",direction:e.labelDirection}},{content:e.value,style:{"text-align":r?"left":"right","vertical-align":"middle",direction:e.valueDirection}}]}))),m&&(h.customChart=m),p&&(h.customLimitation=hs.getFooterRow(p,t)),d&&(h.customImages=d.map((function(e){return hs.getImageRow(e,t)}))),h}}({chart:t,models:n,rtl:o,translator:a,series:i});var p=[];return me(!0,d,{settings:{filter:function(e){return Mp({chart:t,models:n,nodes:e})},extract:function(e){var t,r,i;if(e&&(p=null!==(t=e.node)&&void 0!==t&&t.childrenNodes?ee(e.node.childrenNodes):[e.node],null!==(r=n.layoutService)&&void 0!==r&&null!==(i=r.meta)&&void 0!==i&&i.isContinuous)){for(var o=[],a=0;a<p.length;a++){var s,u;null!==(s=p[a].data)&&void 0!==s&&null!==(u=s.selectionDimension)&&void 0!==u&&u.value&&(o[a]={data:{value:p[a].data.selectionDimension.value}})}p=o}return m({context:e})},content:function(e){var t=e.h,n=e.data,r=e.style,i=function(e){var t=e.sections,n={visible:[],hidden:[]};return t.reduce((function(e,t){return(e<7?n.visible:n.hidden).push(t),function(e,t){return e+1+(void 0===t.color?0:1)+t.measures.length+(t.customLimitation||t.customChart||t.customImages&&t.customImages.length>0?7:0)}(e,t)}),0),n}({sections:n}),s=i.visible,u=i.hidden,l=s.reduce((function(e,t){var n=t.title,r=t.color,i=t.measures,o=t.customTitle,a=t.customDescription,s=t.customMeasures,u=t.customImages,l=t.customChart,c=t.customLimitation;return o&&e.push(o),a&&e.push(a),e.push(n),r&&e.push(r),e.push.apply(e,ee(i)),s&&e.push.apply(e,ee(s)),l&&e.push(l),c&&e.push(c),u&&e.push.apply(e,ee(u)),e}),[]);return u.length&&l.push(function(e){var t=e.count,n=e.translator,r=e.rtl,i=je.detectTextDirection,o=n?n.get("Object.ChartTooltip.NMore",t):"+".concat(t," more");return[{content:o,style:{"font-weight":"bold","text-align":r?"right":"left",direction:i(o)},colspan:2}]}({count:u.length,rtl:o,translator:a})),l.map((function(e){return t("tr",{},function(e,t){var n=t.h,r=t.style;return e.map((function(e){var t={style:j(j({},r.cell||{}),e.style||{}),class:e.class};return e.colspan&&(t.colspan=e.colspan),n("td",t,e.content)}))}(e,{h:t,style:r}))}))},placement:"bounds",afterShow:function(){u.query.useTooltipChart()&&u.query.useCustomTooltip()&&!u.query.hasChartLimitation()&&cs.show({app:s,properties:f,selectedNodes:p,customTooltipModel:c,rtl:o})}},style:{content:{fontFamily:n.themeService.getStyles().fontFamily}}})}function Ep(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var Cp=[{key:"NoDataExist",alignment:"center",condition:function(e){var t=e.layoutService.meta.size;return t.x*t.y==0}},{key:"OnlyNanData",alignment:"center",condition:function(e){var t=e.layoutService;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNanData",alignment:"center",condition:function(e){return e.layoutService.getHyperCubeValue("qMeasureInfo").every(Ep)}},{key:"DataRangeIncludingZero",alignment:"bottom",condition:function(e){var t=e.layoutService,n=e.primaryExtremumModel,r=e.secondaryExtremumModel,i=e.flags;if(!1===t.getLayout().showDisclaimer&&i.isEnabled("SHOW_DISCLAIMER"))return!1;var o=t.getLayoutValue("measureAxis.logarithmic",!1),a=n.query.getExtrema(),s=r.query.getExtrema();return o&&(a.meta.includesZero||s.meta.includesZero)}}];function qp(e){var t=e.environment,n=e.models,r=t.flags,i=t.translator,o=t.options,a=function(e){for(var t,n,r=e.layoutService,i=e.primaryExtremumModel,o=e.secondaryExtremumModel,a=e.flags,s=0,u=Cp.length;s<u;s++){t=Cp[s];try{n=t.condition({layoutService:r,primaryExtremumModel:i,secondaryExtremumModel:o,flags:a})}catch(e){throw Error("failing disclaimer condition",e)}if(n)return t}return!1}({layoutService:n.layoutService,primaryExtremumModel:n.primaryExtremumModel,secondaryExtremumModel:n.secondaryExtremumModel,flags:r});return!!a&&function(e,t,n){if(!e)return!1;var r=t.translator,i=n.rtl;return{key:"disclaimer",type:"disclaimer",layout:{dock:ve[e].alignment},settings:{label:r.get("Object.Disclaimer.".concat(e)),rtl:i}}}(a.key,{translator:i},{rtl:"rtl"===o.direction})}function Op(e){return!!ou({layoutService:e.layoutService})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:ka.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function Ap(e){var t=e.models,n=e.environment,r=t.layoutService,i=t.colorService,o=t.dockService,a=t.seriesModel,s=t.selectionService,u=r.meta,l=u.hasLineSeries,c=u.isContinuous,f=u.hasMultipleMeasures,d=u.isGroupedByMeasure;if(!l)return!1;var m=n.options,p=r.getLayoutValue("color",{}),h=function(e){return e.filter((function(e){return vp(e)===Ra.TYPE.LINE})).map((function(e){return{key:Nu(ka.COMPONENT.LINE,e),typeIndex:e.typeIndex}}))},v=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex,y=r.getHyperCubeValue("qMeasureInfo").map((function(e){var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:ka.COLLECTION.LINE},settings:{getSelectionInfo:function(){var e;return(null==s||null===(e=s.getSelectionInfo)||void 0===e?void 0:e.call(s))||{}},seriesInfo:{primary:h(a.meta.primarySeries),secondary:h(a.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":c?function(e){return e.value}:function(e){return e.major.value},"qHyperCube/qDimensionInfo/0:numeric":function(e){return e.major.value},"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":function(e){return e.end.value},"qHyperCube/qMeasureInfo/X":function(e){return e.end.value}},colorSettings:function(e){return i.getSettingsForMeasure(e)},colorByData:function(e){return!y[e]&&v},hasMultipleMeasures:f,groupedByMeasure:d,itemsPerGroup:a.meta.barSeriesCount,orientation:o.meta.major.orientation,rtl:"rtl"===m.direction}}}function Dp(e){var t,n=e.chart,r=e.models,i=e.environment,o=e.viewState,a=e.viewCache,s=e.actions,u=r.colorService,l=r.layoutService,c=r.dockService,f=qp({environment:i,models:r});return"center"===(null==f||null===(t=f.layout)||void 0===t?void 0:t.dock)?[f]:[].concat(ee(op({models:r})),ee(function(e){var t=e.models,n=t.layoutService,r=t.dockService,i=t.seriesModel,o=t.themeService,a=n.getLayoutValue("measureAxes");if(!a||!a.length)return!1;var s=o.getStyles();return i.meta.measureAxes.filter((function(e){var t=e.isPrimary?0:1;return vu.some((function(e){return a[t].show===e}))})).map((function(e){return{type:"axis",key:e.isPrimary?ka.COMPONENT.AXIS.MINOR.PRIMARY:ka.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?r.meta.minor.dock:r.meta.minorSecondary.dock,minimumLayoutMode:hu.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color},line:{stroke:s.axis.line.major.color},ticks:{stroke:s.axis.line.major.color},minorTicks:{stroke:s.axis.line.minor.color}}}}))}({models:r})),ee(Qm({chart:n,models:r,environment:i,viewState:o,viewCache:a})),[Ap({models:r,environment:i})],ee(Su({models:r,environment:i})),ee(up({models:r,environment:i,actions:s})),[vo({viewState:o,viewCache:a,layoutService:l,dockService:c})],ee(function(e){var t=e.models,n=t.layoutService,r=t.dockService,i=n.meta,o=i.isContinuous,a=i.isTime,s=n.getLayoutValue("dimensionAxis");if(!s||"none"===s.show||"title"===s.show)return[!1];if(!o)return[!1];var u=hu.AXIS.MAJOR[r.meta.major.orientation.toUpperCase()];return a?[{type:"axis-overlay",key:ka.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:ka.SCALE.MAJOR_INNER,layout:{dock:"@".concat(ka.COMPONENT.AXIS.TIME_INNER),minimumLayoutMode:u}},{type:"axis-overlay",key:ka.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:ka.SCALE.MAJOR,layout:{dock:"@".concat(ka.COMPONENT.AXIS.TIME_OUTER),minimumLayoutMode:u}}]:[{type:"axis-overlay",key:ka.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:ka.SCALE.MAJOR,layout:{dock:"@".concat(ka.COMPONENT.AXIS.MAJOR),minimumLayoutMode:u}}]}({models:r})),ee(function(e){var t=e.chart,n=e.models,r=e.environment,i=n.refLineModel,o=n.layoutService,a=n.colorService,s=n.dockService,u=n.themeService,l=n.appLayoutModel,c=n.seriesModel,f=l.qLocaleInfo,d=r.options,m=r.theme,p="rtl"===d.direction,h=c.query.series(Ra.TYPE.BAR).filter((function(e){return e.isPrimary})),v=c.query.series(Ra.TYPE.BAR).filter((function(e){return!e.isPrimary})),y=c.query.series(Ra.TYPE.LINE),g=c.query.series(Ra.TYPE.MARKER),b=c.query.all(),x=b.some((function(e){return e.isPrimary})),M=b.some((function(e){return!e.isPrimary})),S=x&&M,E={resolveUIColor:a.getPaletteColor},C=x?Ta({refLineModel:i,layoutService:o,colorModel:E,dock:S?s.meta.minor.dock:s.meta.minor.opposite,scale:ka.SCALE.MINOR.PRIMARY,style:u.getStyles(),formatter:ka.FORMATTER.PRIMARY,theme:m,localeInfo:f,rtl:p,key:ka.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],q=M?Ta({refLineModel:i,layoutService:o,colorModel:E,dock:S?s.meta.minor.opposite:s.meta.minor.dock,scale:ka.SCALE.MINOR.SECONDARY,style:u.getStyles(),formatter:ka.FORMATTER.SECONDARY,theme:m,localeInfo:f,rtl:p,key:ka.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!x&&Na({refLineModel:i,layoutService:o,colorModel:E,dockService:s,chart:t,scale:ka.SCALE.MINOR.PRIMARY,axis:"horizontal"===s.meta.major.orientation?"y":"x",key:ka.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:hu.REFERENCE_LINE}),!!M&&Na({refLineModel:i,layoutService:o,colorModel:E,dockService:s,chart:t,scale:ka.SCALE.MINOR.SECONDARY,axis:"horizontal"===s.meta.major.orientation?"y":"x",key:ka.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:hu.REFERENCE_LINE}),Na({isDimension:!0,refLineModel:i,layoutService:o,colorModel:E,dockService:s,chart:t,scale:ka.SCALE.MAJOR,axis:"horizontal"===s.meta.major.orientation?"x":"y",rtl:p,key:ka.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:h.length?"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY):v.length?"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.SECONDARY):y.length?"".concat(ka.COMPONENT.LINE,"-").concat(y[0].id):g.length?"".concat(ka.COMPONENT.MARKER,"-").concat(g[0].id):"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY),minimumLayoutMode:hu.REFERENCE_LINE})].concat(ee(C),ee(q),ee(Ta({isDimension:!0,refLineModel:i,layoutService:o,colorModel:E,dock:s.meta.major.opposite,scale:ka.SCALE.MAJOR,style:u.getStyles(),theme:m,localeInfo:f,rtl:p,key:ka.COMPONENT.DIMENSION_REF_LINE_LABEL})))}({chart:n,models:r,environment:i})),[lp({models:r,environment:i,viewState:o,viewCache:a})],ee(u.custom.legendComponents()),[Op(r)],ee(fp({chart:n,models:r,viewState:o,viewCache:a,environment:i})),ee(function(e){var t=e.chart,n=e.models,r=e.environment;return[dp({models:n,environment:r}),Sp({chart:t,models:n,environment:r})]}({chart:n,models:r,environment:i})),[f]).filter(Boolean)}function Np(e){var t,n=e.models.fieldModel;return Y(t={},ka.FORMATTER.PRIMARY,{data:{fields:n.main.minorsPrimary}}),Y(t,ka.FORMATTER.SECONDARY,{data:{fields:n.main.minorsSecondary}}),t}function Ip(e){var t=e.model,n=e.layoutService,r=e.definitionPath,i=void 0===r?"/qHyperCubeDef":r;return{fetch:function(e,n){var r={qStart:e,qEnd:n,qNbrPoints:this.computeNbrOfBins(),qMaxNbrTicks:300,qMaxNumberLines:this.computeMaxNumberLines()};return t.getHyperCubeContinuousData(i,r,!1)},shouldFetchReduced:function(){var e=n.getLayout().qHyperCube;return e.qSize.qcy*e.qMeasureInfo.length>=2e3},computeNbrOfBins:function(){var e=n.getLayout().qHyperCube;if(!this.shouldFetchReduced())return 2e3;var t=e.qMeasureInfo.length||1,r=4+2*(t-1);return e.qDimensionInfo.length>1&&(t=Math.max(1,Math.min(12,n.meta.size.dimensions[1])),r=4),Math.ceil(2e3/(t*r))},computeMaxNumberLines:function(){return n.getLayout().qHyperCube.qDimensionInfo.length>1&&!this.shouldFetchReduced()?n.meta.size.dimensions[1]+1:12}}}function Tp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cache,n=void 0===t?{}:t;return{fetch:function(){return Promise.resolve(n.merged)}}}function wp(e){var t=e.layoutService,n=e.viewCache;return{fetch:function(){var e=t.getHyperCube(),n=e.qAxisData,r=e.qDataPages;return Promise.resolve({qAxisData:n,qDataPages:r})},getSnapshotData:function(){var e=t.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in e&&"min"in e.zoom&&"max"in e.zoom?{zoom:e.zoom}:function(e,t){var n=e.scrollOffset,r=void 0===n?0:n,i=e.viewRange,o=void 0===i?0:i,a=t+r,s=a+o;return 1===o&&0===r&&(a=t-.5,s=t+.5),{zoom:{min:a,max:s}}}(e,n.get("continuousMin"))}}}function Lp(){var e=function(){},t=[],n={};return e.set=function(e,r){var i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=function(e){t.forEach((function(t,r){return e(n[t],r)}))},e.has=function(e){return e in n},e}function kp(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function(e){for(var t=e.start,n=e.end,r=e.matrix,i=[],o=Lp(),a=Lp(),s=0;s<r.length;s++){var u=r[s],l=u[1].qElemNumber.toString();u[0].qNum<t?o.set(l,u):u[0].qNum>n&&(a.has(l)||a.set(l,u)),u[0].qNum>=t&&u[0].qNum<=n&&i.push(u)}return o.forEach((function(e,t){return i.splice(t,0,e)})),a.forEach((function(e){return i.push(e)})),i}({start:e,end:t,matrix:n}):function(e){for(var t,n,r=e.start,i=e.end,o=e.matrix,a=[],s=0;s<o.length;s++){var u=o[s];u[0].qNum<r?t=u:u[0].qNum>i&&(n||(n=u)),u[0].qNum>=r&&u[0].qNum<=i&&a.push(u)}return t&&a.unshift(t),n&&a.push(n),a}({start:e,end:t,matrix:n})}function Rp(e,t){return j(j({},e),{},{qWidth:t[0]?t[0].length:0,qHeight:t.length})}function Pp(e,t,n){var r={qDataPages:(n.qDataPages||[]).map((function(n){var r=kp(e,t,n.qMatrix),i=Rp(n.qArea,r);return j(j({},n),{},{qArea:i,qMatrix:r})}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((function(n){return{qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce((function(n,r){return(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}function jp(e,t){var n={};return n.qDataPages=(e.qDataPages||[]).map((function(e,n){var r=function(e,t){if(!t||!t.length||!t[0].length)return e;for(var n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[],a=0,s=e.length;a<s;a++){var u=e[a][0];u.qNum<n?i.push(e[a]):u.qNum>r&&o.push(e[a])}return[].concat(i,ee(t),o)}(e.qMatrix,t.qDataPages[n].qMatrix),i=Rp(e.qArea,r);return j(j({},e),{},{qArea:i,qMatrix:r})})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((function(e){return!e.qTicks.length})))return e;for(var n=t.qAxis.map((function(e){return e.qName})),r=t.qAxis.map((function(e){return{start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}})),i=t.qAxis.map((function(e){return{qName:e.qName,qTags:ee(e.qTags),qTicks:ee(e.qTicks)}})),o=0,a=e.qAxis.length;o<a;o++){var s=e.qAxis[o],u=n.indexOf(s.qName),l=[],c=[];if(u>-1){for(var f=r[u],d=f.start,m=f.end,p=0,h=s.qTicks.length;p<h;p++){var v=s.qTicks[p];v.qStart<d?l.push(v):v.qStart>m&&c.push(v)}i[u].qTicks=[].concat(l,ee(i[u].qTicks),c)}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}function Fp(e){return{qDataPages:e.qDataPages.map((function(e){var t=Rp(e.qArea,e.qMatrix);return j(j({},e),{},{qArea:t})})),qAxisData:e.qAxisData}}var _p=Math.pow(2,.5),Hp=1/_p,Vp=Math.pow(Hp,44);function Bp(e,t){return Math.max(1e-6,(t-e)*Vp)}function zp(e){return e.qIsOtherCell}function Yp(e){var t={};return e.forEach((function(e){if(!e.some(zp)){var n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}function Up(e){var t=0;return e.forEach((function(e){e.some(zp)||t++})),t}function Wp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.qDataPages,n=void 0===t?[]:t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.length?n[0].qMatrix:[];return r.isStackedByDimension?Yp(i):Up(i)}function Xp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.qMin,n=e.qMax;return{initialMin:t=Number.isNaN(+t)?0:t,initialMax:n=Number.isNaN(+n)?0:n}}var Gp={command:{processDataPage:function(){}}};var Kp={created:function(){this.state={}},beforeUpdate:function(){this.state={}},beforeRender:function(e){var t=e.size;this.state.ticks=this.scale.ticks({distance:t.width}).filter((function(e){return!e.isMinor})),"linear"===this.scale.type&&function(e,t){for(var n=Q(e.domain(),2)[1],r=0;r<t.length;r++){var i=t[r],o=t[r+1];i.data={},o||1===i.end?o?(i.data.start=i.value,i.data.end=o.value,i.end=o.position):(i.data.start=i.value,i.data.end=i.value):(i.data.start=i.value,i.data.end=n,i.end=1)}}(this.scale,this.state.ticks)},render:function(){var e=this,t=this.scale.data().fields.length?this.scale.data().fields[0].id():"",n=this.state.ticks,r=n.map((function(n){return{type:"rect",fill:"none",data:{source:{field:t},value:[n.data.start,n.data.end]},x:n.start*e.rect.width,y:0,width:(n.end-n.start)*e.rect.width,height:e.rect.height}}));if(n.length&&n[0].start>0){var i=n[0];r.unshift({type:"rect",fill:"none",data:{source:{field:t},value:[this.scale.domain()[0],i.data.start]},x:0,y:0,width:i.start*this.rect.width,height:this.rect.height})}return r}};function $p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(t%2==0)return e;var n=Math.round(e),r=e-n;return r>0?n+=.5:n-=.5,n}function Jp(e,t){var n=t.localProps.size,r=t.props.anchor,i=function(e){var t=e.props,n=e.localProps.size,r=e.style,i=e.renderer,o=t.label.padding,a=Math.max(0,Math.min(t.label.justify,1)),s=Math.max(0,Math.min(t.label.align,1)),u=function(e){return i.measureText({text:e,fontSize:r.label.fontSize,fontFamily:r.label.fontFamily})};return{resolve:function(e,t){var i="string"==typeof e.label?e.label:"",l=u(i),c=t.x,f=t.width;e.start===e.end&&(f=l.width+2*o,1===e.end&&(c-=f));var d={x:c+o,y:o,width:f-2*o,height:n.height-2*o},m=u("".concat(i[0]).concat("…")).width,p=Math.max(0,d.width-l.width),h=Math.max(0,d.height-l.height),v=a*p,y=s*h;return{show:d.width>=Math.min(m,l.width),text:i,dx:v,dy:y,rect:d,style:r.label,segment:{x:c+v,width:l.width+2*o}}}}}(t),o=function(e){var t=e.localProps.size,n=e.style,r=e.scale,i=e.props,o=Q(r.domain(),2),a=o[0],s=o[1],u=Math.max(0,Math.min(1,i.guideLine.major.justify));return{resolve:function(e,r){var i=u*r.width,o=$p(r.x+i,n.majorGuideLine.strokeWidth);return{show:e.value>=a&&e.value<=s,x1:o,y1:0,x2:o,y2:$p(t.height,n.majorGuideLine.strokeWidth),style:n.majorGuideLine}}}}(t),a=e.map((function(e){var t=function(e,t,n){var 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){var n=e.length;if(!(n<2)){var r,i,o=e[n-1],a=t[n-1].label;if(o&&o.start===o.end)for(var s=n-2;s>-1;s--){var u=t[s].label;u.show=u.show&&(r=u.segment,i=a.segment,!(r.x<i.x?r.x+r.width>=i.x:i.x+i.width>=r.x))}}}(e,a),a}function Zp(e,t){var n,r,i,o,a=(r=(n=t).localProps.size,i=n.props,o=n.style,{resolve:function(e){var t=Math.max(r.height-i.guideLine.minor.size,0)*Math.max(0,Math.min(i.guideLine.minor.align,1)),n=$p(e.position*r.width,o.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:n,y1:$p(t,o.minorGuideLine.strokeWidth),x2:n,y2:$p(i.guideLine.minor.size+t,o.minorGuideLine.strokeWidth),style:o.minorGuideLine}}}});return t.props.guideLine.minor.show?e.map(a.resolve):[]}function Qp(e){return e.filter((function(e){return e.show})).map((function(e){return me({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2})}))}var eh={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:function(){return{size:30,edgeBleed:{left:1,right:1}}},init:function(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created:function(){this.init()},beforeUpdate:function(){this.init()},beforeRender:function(e){var t=e.size;this.localProps.size=t;var n=this.scale.ticks({distance:t.width}),r=n.filter((function(e){return!e.isMinor})),i=n.filter((function(e){return e.isMinor}));this.state.line=function(e){var t=e.localProps.size,n=e.style,r=e.props,i=$p(1,n.line.strokeWidth);return{show:r.line.show,x1:$p(0,n.line.strokeWidth),y1:i,x2:$p(t.width,n.line.strokeWidth),y2:i,style:n.line}}(this),this.state.major=Jp(r,this),this.state.minor=Zp(i,this)},render:function(){return[].concat(ee(Qp([this.state.line])),ee(this.state.major.map((function(e){return e.label})).filter((function(e){return e.show})).map((function(e){return me({},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"})}))),ee(Qp(this.state.major.map((function(e){return e.guideLine})))),ee(Qp(this.state.minor.map((function(e){return e.guideLine})))))}};function th(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every((function(e,n){return e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd}))}function nh(e){return e.qTags.indexOf("$qualified")>-1}function rh(e){for(var t=e.qAxis,n=[],r=[],i=0;i<t.length;i++){var o=i+1,a=t[i],s=t[o];th(a,s)?(nh(s)?(n.push(o),r.push(i)):(n.push(i),r.push(o)),i++):(n.push(i),r.push(i))}return{qualified:n,nonQualified:r}}function ih(e){var t=e.qualifiedMeta,n=e.nonQualifiedMeta;return{resolve:function(e){for(var r,i=NaN,o=NaN,a=NaN,s=!1,u=t.length-1;u>=0;u--){var l=t[u];if(l.queries.outer(e)){var c=n[u+1];if(i=l.index,r=u,l.attrs.isDayOrShorter()&&l.queries.canFitHalfDayTicks(e)){o="auto",s=!0;break}if(c&&c.queries.inner(e)){o=c.index;var f=n[u+2];f&&f.queries.minor(e)&&(a=f.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;var d=n[r+1];d&&d.queries.minor(e)&&(a=d.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function oh(e){var t=e.qTicks,n=e.measureText,r=void 0===n?function(){return{width:0}}:n,i=e.cache,o=void 0===i?{}:i,a=e.scale,s=o;return{isDayOrShorter:function(){return s.isDayOrShorter=t.length>0&&Math.abs(t[0].qStart-t[0].qEnd)<=1,s.isDayOrShorter},count:function(){return t.length},maxRange:function(){return s.maxRange=t.length?Math.max.apply(Math,ee(t.map((function(e){return Math.abs(a(e.qStart)-a(e.qEnd))})))):0,s.maxRange},rangeAndWidth:function(){var e=a.clamp();return a.clamp(!1),s.rangeAndWidth=t.map((function(e){return{range:Math.abs(a(e.qStart)-a(e.qEnd)),width:r("".concat(e.qText)).width+16}})),a.clamp(e),s.rangeAndWidth}}}function ah(e){var t=e.attrs,n=e.reqAutoFitWidth;return{outer:function(e){return!t.rangeAndWidth().some((function(t){return t.width>t.range*e}))},inner:function(e){return!t.rangeAndWidth().some((function(t){return t.width>t.range*e}))},minor:function(e){return t.maxRange()*e>=6},canFitHalfDayTicks:function(e){return e>=n*t.count()}}}function sh(e){var t=e.qualified,n=e.nonQualified,r=e.qAxis,i=e.measureText,o=e.reqAutoFitWidth,a=e.scale,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{attributesFactory:oh,queryFactory:ah},u=s.attributesFactory,l=void 0===u?oh:u,c=s.queryFactory,f=void 0===c?ah:c;function d(e,t){var n=e.qTicks,r=l({qTicks:n,measureText:i,scale:a});return{data:e,index:t,attrs:r,queries:f({attrs:r,reqAutoFitWidth:o})}}var m=r.map((function(e,t){return d(e,t)})),p=t.map((function(e){return m[e]})),h=n.map((function(e){return m[e]}));return{qAxisMeta:m,qualifiedMeta:p,nonQualifiedMeta:h}}function uh(e){return!Array.isArray(e)||0===e.length||e.every((function(e){return 0===e.qTicks.length}))}function lh(e){var t=e.qAxis,n=void 0===t?[]:t,r=e.measureText,i=void 0===r?function(){return{width:0}}:r,o=e.cache,a=void 0===o?{}:o,s=e.reqAutoFitWidth,u=void 0===s?0:s,l=e.scale,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metaFactory:sh,mapper:rh,resolver:ih},f=c.metaFactory,d=void 0===f?sh:f,m=c.mapper,p=void 0===m?rh:m,h=c.resolver,v=void 0===h?ih:h,y=p({qAxis:n}),g=y.qualified,b=y.nonQualified,x=d({qAxis:n,qualified:g,nonQualified:b,measureText:i,reqAutoFitWidth:u,scale:l}),M=x.qualifiedMeta,S=x.nonQualifiedMeta,E=v({qualifiedMeta:M,nonQualifiedMeta:S});return{resolve:function(e){var t=a.key({distance:e});if(a.get(t))return a.get(t);if(uh(n))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};var r=E.resolve(e);return a.set(t,r),r}}}function ch(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}var fh=ch(0).getTime();function dh(e){return(e.getTime()-fh)/86400/1e3}var mh=new Date,ph=new Date;function hh(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 hh((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 mh.setTime(+t),ph.setTime(+r),e(mh),e(ph),Math.floor(n(mh,ph))},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 vh=hh((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),yh=hh((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),gh=hh((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),bh=hh((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function xh(e){return hh((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)/6048e5}))}var Mh=xh(0);xh(1),xh(2),xh(3),xh(4),xh(5),xh(6);var Sh=hh((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()})),Eh=hh((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()}));Eh.every=function(e){return isFinite(e=Math.floor(e))&&e>0?hh((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};var Ch=1,qh=2,Oh=3,Ah=4,Dh=5,Nh=6;function Ih(e){var t,n=e.timeScale,r=e.labels,i=e.distance,o=e.isDayOrShorter,a=e.cache,s=e.timeOnly,u=Q(n.domain(),2),l=u[0],c=u[1],f=a.key({distance:i});a.get(f,1)?t=a.get(f,1):(t=function(e,t,n,r,i){var o=vh.count(e,t),a=yh.count(e,t),s=gh.count(e,t),u=bh.count(e,t),l=Mh.count(e,t),c=Sh.count(e,t),f=Eh.count(e,t),d=n/r.second.width-1,m=n/r.minute.width-1,p=n/r.date.width-1,h=n/r.year.width-1,v={type:"year",desc:"year",count:f,interval:Eh.every(1),formatter:r.year.formatter};return o<=d?(v.type=Ch,v.desc="second",v.count=o,v.interval=vh.every(1),v.formatter=r.second.formatter):o/2<=d?(v.type=Ch,v.desc="every other second",v.count=o/2,v.interval=vh.every(2),v.formatter=r.second.formatter):o/5<=d?(v.type=Ch,v.desc="every 5 second",v.count=o/5,v.interval=vh.every(5),v.formatter=r.second.formatter):o/15<=d?(v.type=Ch,v.desc="every 15 second",v.count=o/15,v.interval=vh.every(15),v.formatter=r.second.formatter):o/30<=d?(v.type=Ch,v.desc="every 30 second",v.count=o/30,v.interval=vh.every(30),v.formatter=r.second.formatter):a<=m?(v.type=qh,v.desc="minute",v.count=a,v.interval=yh.every(1),v.formatter=r.minute.formatter):a/2<=m?(v.type=qh,v.desc="every 2 minute",v.count=a/2,v.interval=yh.every(2),v.formatter=r.minute.formatter):a/5<=m?(v.type=qh,v.desc="every 5 minute",v.count=a/5,v.interval=yh.every(5),v.formatter=r.minute.formatter):a/10<=m?(v.type=qh,v.desc="every 10 minute",v.count=a/10,v.interval=yh.every(10),v.formatter=r.minute.formatter):a/15<=m?(v.type=qh,v.desc="every 15 minute",v.count=a/15,v.interval=yh.every(15),v.formatter=r.minute.formatter):a/30<=m?(v.type=qh,v.desc="every 30 minute",v.count=a/30,v.interval=yh.every(30),v.formatter=r.minute.formatter):s<=m?(v.type=Oh,v.desc="hour",v.count=s,v.interval=gh.every(1),v.formatter=r.minute.formatter):s/2<=m?(v.type=Oh,v.desc="every 2 hour",v.count=s/2,v.interval=gh.every(2),v.formatter=r.minute.formatter):s/3<=m?(v.type=Oh,v.desc="every 3 hour",v.count=s/3,v.interval=gh.every(3),v.formatter=r.minute.formatter):s/6<=m?(v.type=Oh,v.desc="every 6 hour",v.count=s/6,v.interval=gh.every(6),v.formatter=r.minute.formatter):s/12<=m||i?(v.type=Oh,v.desc="every 12 hour",v.count=s/12,v.interval=gh.every(12),v.formatter=r.minute.formatter):u<=p?(v.type=Ah,v.desc="day",v.count=u,v.interval=bh.every(1),v.formatter=r.date.formatter):u/2<=p?(v.type=Ah,v.desc="every 2 day",v.count=u/2,v.interval=bh.every(2),v.formatter=r.date.formatter):u/3<=p?(v.type=Ah,v.desc="every 3 day",v.count=u/3,v.interval=bh.every(3),v.formatter=r.date.formatter):l<=p?(v.type=Ah,v.desc="week",v.count=l,v.interval=Mh.every(1),v.formatter=r.date.formatter):l/2<=p?(v.type=Ah,v.desc="every 2 week",v.count=l/2,v.interval=Mh.every(2),v.formatter=r.date.formatter):c<=p?(v.type=Dh,v.desc="month",v.count=c,v.interval=Sh.every(1),v.formatter=r.date.formatter):c/3<=p?(v.type=Dh,v.desc="quarter",v.count=c/3,v.interval=Sh.every(3),v.formatter=r.date.formatter):c/6<=p?(v.type=Dh,v.desc="half year",v.count=c/6,v.interval=Sh.every(6),v.formatter=r.date.formatter):f<=h?(v.type=Nh,v.desc="year",v.count=f,v.interval=Eh.every(1),v.formatter=r.year.formatter):f/2<=h?(v.type=Nh,v.desc="every 2 year",v.count=f/2,v.interval=Eh.every(2),v.formatter=r.year.formatter):f/5<=h?(v.type=Nh,v.desc="every 5 year",v.count=f/5,v.interval=Eh.every(5),v.formatter=r.year.formatter):f/10<=h?(v.type=Nh,v.desc="every 10 year",v.count=f/10,v.interval=Eh.every(10),v.formatter=r.year.formatter):(v.type=Nh,v.desc="every nth year",v.count=Math.floor(f/h),v.interval=Eh.every(Math.floor(f/h)),v.formatter=r.year.formatter),v}(l,c,i,r.all(),o),a.set(f,t,1));var d=n.ticks(t.interval).map((function(e,n,r){var i=r[n+1]?r[n+1]-e:c-e;return{start:e,end:new Date(e.getTime()+i),formatter:t.formatter}})),m=[];if(!s&&t.type<=Oh){var p=r.getFormat("date"),h=n.ticks(bh.every(1));m=(h.length?h:[l]).map((function(e,t,n){var r=n[t+1]?n[t+1]-e:c-e;return{start:e,end:new Date(e.getTime()+r),formatter:p.formatter}}))}return{inner:d,outer:m}}var Th={};function wh(e,t,n,r){return{type:e,start:new Date(Date.UTC.apply(Date,ee(t))),end:new Date(Date.UTC.apply(Date,ee(n))),formatter:r}}function Lh(e,t,n){var r=t.ticks,i=r.generator,o=r.anchor,a=r.clamp,s=r.level,u=t.formatter.qNumFormat;e.clamp(a);var l=Q(e.domain(),2),c=l[0],f=l[1],d=function(){return Ft.apply(co(Ur,Yr,Vr,_r,Fr,jr,Ir,Nr,$r).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([ch(c),ch(f)]);d.clamp(a),d.range(t.invert?[1,0]:[0,1]);var m,p="object"===F(i)?i.type:i;m="d3"===p?function(e,r){return Ih({timeScale:d,labels:n,distance:e,isDayOrShorter:r,cache:t.cache,timeOnly:"T"===u.qType})}:function(e){return function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(Th[[t,n,r,r,o]])return Th[[t,n,r,r,o]];var a,s,u,l={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},c=ch(n),f=c.getFullYear(),d=c.getMonth(),m=c.getDate(),p=r-n,h=t/(i-r),v=h/1440,y=h/86400,g=366*h,b=3*h*30,x=l.second.width/y,M=l.minute.width/v,S=l.date.width/b,E=l.year.width/g,C=0,q=0,O=null,A=null,D=null,N=null,I=null,T=null,w={outer:[],inner:[]};for(x<1?(O=1,q=1/86400):x<2?(O=2,q=1/86400*2):x<5?(O=5,q=1/86400*5):x<10?(O=10,q=1/86400*10):x<30?(O=30,q=1/86400*30):M<1?(A=1,q=1/1440):M<2?(A=2,q=1/1440*2):M<5?(A=5,q=1/1440*5):M<10?(A=10,q=1/1440*10):M<30?(A=30,q=1/1440*30):M<60?(D=1,q=1/24):M<120?(D=2,q=2/24):M<360?(D=6,q=.25):M<720?(D=12,q=.5):S<1/90?(q=1,N=1):S<2/90?(q=2,N=2):S<7/90?(q=7,N=7):S<31/90?(I=1,q=31):S<1?(I=3,q=90):E<1?(T=1,q=366):E<2?(T=2,q=732):E<5?(T=5,q=1826.25):(T=10,q=3652.5),s=Math.floor((p+n%1)/q);C<i;){u=s+1,C=dh((a=T?wh("year",[f+s*T,0,1],[f+u*T,0,1],l.year.formatter):I?wh("month",[f,d+s*I,1],[f,d+u*I,1],l.date.formatter):N?wh("day",[f,d,m+s*N],[f,d,m+u*N],l.date.formatter):D?wh("hour",[f,d,m,0+s*D],[f,d,m,0+u*D],l.minute.formatter):A?wh("minute",[f,d,m,0,0+s*A],[f,d,m,0,0+u*A],l.minute.formatter):wh("second",[f,d,m,0,0,0+s*O],[f,d,m,0,0,0+u*O],l.second.formatter)).start),w.inner.push(a);var L=Math.floor(C);if(!(o||T||I||N)){var k={type:"day",start:ch(L),end:ch(L+1),formatter:l.date.formatter,qStart:L};w.outer[w.outer.length-1]&&w.outer[w.outer.length-1].qStart===k.qStart||w.outer.push(k)}s++}return w.min=r,w.max=i,Th[[t,n,r,r,o]]=w,w}(n,e,i.min,c,f,"T"===u.qType)};var h={transform:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isMinor,i=void 0!==r&&r;return t.map((function(t){var n;n="start"===o?t.qStart:"end"===o?t.qEnd:(t.qStart+t.qEnd)/2;var r=e.clamp();i&&e.clamp(!1);var a=e(n),s=e(t.qStart),u=e(t.qEnd);return e.clamp(r),{value:n,position:a,start:s,end:u,label:t.qText,isMinor:i,data:i?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((function(e){return e.position>=0&&e.position<=1}))},generate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=arguments.length>1?arguments[1]:void 0,r=m(t,n),i=r[s];return i.map((function(t){var n;return n="start"===o?dh(t.start):"end"===o?dh(t.end):(dh(t.start)+dh(t.end))/2,{position:d(t.start),start:d(t.start),end:d(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:dh(t.start),end:dh(t.end),scaleStart:e.domain()[0]}}})).filter((function(e){return e.position>=0&&e.position<=1}))}};return h}var kh=/t+/i;function Rh(e){var t={},n=e.formatter,r=n.measureText,i=n.fn,o=n.localeInfo,a={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return o&&kh.test(o.qTimestampFmt)&&(a.minute.pattern+=" tt",a.second.pattern+=" tt"),a.date.pattern=o&&o.qDateFmt?o.qDateFmt:a.date.pattern,Object.keys(a).forEach((function(e){a[e].formatter=i(a[e].pattern),a[e].width=Math.max(a[e].width,r(a[e].formatter(41000.2343433)).width+16)})),t.getFormat=function(e){return a[e]},t.all=function(){return a},t.getFormatFromTicks=function(e){var t=e.filter((function(e){return!e.isMinor})),n=t.length;if(!n)return a.date;var r=ch(t[0].data.start),i=ch(t[n-1].data.start);return bh.count(r,i)/n>=1?a.date:gh.count(r,i)/n>0?a.minute:yh.count(r,i)/n>0?a.second:a.date},t}function Ph(e,t,n){var r={};return Object.keys(t).forEach((function(i){var o=e[i],a=F(o);"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=me(!0,{},t[i],o)})),r}var jh={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:function(){return function(e){return e}},measureText:function(){return{width:0,height:0}},localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:function(){return!1},set:function(){},key:function(){return""}}};function Fh(e,t){var n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min.apply(Math,ee(t[t.length-1].qTicks.map((function(e){return e.qStart})))),r=Math.max.apply(Math,ee(t[t.length-1].qTicks.map((function(e){return e.qEnd}))))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}function _h(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]))}var Hh="continuousPan";var Vh={model:function(e){var t,n,r,i=e.model,o=e.layoutService,a=e.dataProcessorModel,s=void 0===a?Gp:a,u=e.viewCache,l=e.viewState,c=e.definitionPath,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=f.engineFetcherFactory,m=void 0===d?Ip:d,p=f.snapshotFetcherFactory,h=void 0===p?wp:p,v=f.cacheFetcherFactory,y=void 0===v?Tp:v,g=f.cache,b=void 0===g?{initial:{},merged:{}}:g,x=m({model:i,layoutService:o,definitionPath:c}),M=h({layoutService:o,viewCache:u}),S=y({cache:b}),E=function(e){throw e.isHandled=!0,e};return{update:function(e){var i=Xp(e.qHyperCube.qDimensionInfo[0]);if(n=i.initialMin,r=i.initialMax,u.set("continuousMin",n),u.set("continuousMax",r),u.set("minimiumZoomSpan",Bp(n,r)),t=o.meta.isSnapshot?M:x,o.meta.isSnapshot){var a=M.getSnapshotData().zoom;n=a.min,r=a.max}l.preventSet("zoom",{min:n,max:r})},updateLayout:function(e){var t=e.qDataPages,n=e.qAxisData;return o.setHyperCubeValue("qDataPages",t),o.setHyperCubeValue("qAxisData",n),o.setHyperCubeValue("qMode","S"),e},initialFetch:function(){var e=this;return t.fetch(n,r).then((function(e){var t=Fp(e);return s.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),b.initial=t,b.merged=t,e})).then((function(e){return Pp(n,r,e)})).then((function(t){return e.updateLayout(t)})).catch(E)},fetch:function(e,n){return t.fetch(e,n).then((function(e){return jp(b.initial,e)})).then((function(e){return s.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),b.merged=e,e})).then((function(t){return Pp(e,n,t)})).catch(E)},fetchFromCache:function(e,t){return S.fetch(e,t).then((function(n){return Pp(e,t,n)}))},fetchMinMaxData:function(){return Promise.resolve(b.initial.qDataPages||[])},getInitialCube:function(){var e=o.getHyperCube();return me({},e,j({},b.initial))},getInitialLayout:function(){var e=this.getInitialCube();return me({},o.getLayout(),{qHyperCube:e})},getDimensionCardinality:function(){return Wp(b.initial,o.meta)},setSnapshotData:function(e){var t=e.qHyperCube;t.qDataPages=b.merged.qDataPages,t.qAxisData=b.merged.qAxisData}}},event:{onZoomChange:function(e,t){var n=e.layoutService,r=e.continuousDataModel;function i(e,n,i){return r[e](n,i).then((function(e){return r.updateLayout(e),t(),e}))}var o=Qc((function(e,t){return i("fetch",e,t)}),50);return function(e,t){var r=e.min,a=e.max,s=t.min,u=t.max;return!n.meta.isContinuous||r===s&&a===u?Promise.resolve(null):i("fetchFromCache",r,a).then((function(e){return o(r,a),e}))}},onZoomIntercept:function(e){var t=e.viewCache,n=NaN,r=NaN,i=NaN;return function(e,o){return n=t.get("continuousMin"),r=t.get("continuousMax"),i=t.get("minimiumZoomSpan"),Math.abs(e.max-e.min)<i?o:{min:Math.min(e.max,Math.max(n,e.min)),max:Math.max(e.min,Math.min(r,e.max))}}},onZoom:function(e,t){var n=e.viewCache,r=e.viewState,i=e.chart,o=t.threshold,a=void 0===o?50:o,s=t.rtl,u=void 0!==s&&s,l=t.targetKey,c=n.get("continuousMin"),f=n.get("continuousMax");return ef((function(e,t){var n=function(e){return i.componentsFromPoint(e).filter((function(e){return e.key===l}))[0]}(e);if(n){var o=function(e,t,n){var r=e.x;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,i,n),a=u?1-o:o,s=r.get("zoom"),d=s.min,m=s.max,p=Math.abs(m-d),h=p-(t>0?Hp:_p)*p,v=d+h*a,y=m-h*(1-a),g=v<c?c-v:0,b=y>f?y-f:0;r.set("zoom",{min:Math.max(v-b,c),max:Math.min(y+g,f)})}}),a)}},interactions:{areaPan:function(e){var t,n=e.targetKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache;return{type:"Pan",key:"continuous:pan",options:{event:Hh,pointers:1,threshold:10,enable:function(e,t){return this.started===Hh||!t||!!i.scroll.enabled()&&r.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===n}))}},events:(t={},Y(t,"".concat(Hh,"start"),(function(e){e.preventDefault(),this.started=Hh;var t=o.get("zoom"),i=t.min,a=t.max;this[Hh]={min:i,max:a,size:r.component(n).rect.computedInner.width,span:a-i}})),Y(t,"".concat(Hh,"move"),(function(e){e.preventDefault();var t=this[Hh],n=t.span,r=t.min,i=t.max,s=t.size,u=-e.deltaX/s;o.set("zoom",{min:Math.min(r+u*n,a.get("continuousMax")-n),max:Math.max(i+u*n,a.get("continuousMin")+n)})})),Y(t,"".concat(Hh,"end"),(function(e){e.preventDefault(),this.started=!1})),Y(t,"".concat(Hh,"cancel"),(function(e){e.preventDefault(),this.started=!1})),t)}}},picassoComponents:{axisOverlay:Kp,timeAxis:eh},picassoScales:{time:function e(t){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Ph(t,jh,i),a=o.qAxis,s=qr(),u={instance:null,invert:!1},l=Fh(o,a),c=l.min,f=l.max,d=[],m=function(e){return Number.isNaN(+e)?NaN:s(e)};m.ticks=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.distance,i=e.resolve,s=void 0===i?n.resolve:i,u=s(t),l=u[o.ticks.level];if(Number.isNaN(+l)||(d=r.transform(a[l].qTicks,{isMinor:!1})),!Number.isNaN(+u.minor)){var c=r.transform(a[u.minor].qTicks,{isMinor:!0});d=d.concat(c)}return"auto"===l&&(d=r.generate(t,u.isDayOrShorter)),d},m.invert=function(e){return s.invert(e)},m.domain=function(e){return Array.isArray(e)?s.domain(e):s.domain()},m.range=function(e){return Array.isArray(e)?s.range(e):s.range()},m.norm=function(e){return _h(u,m),u.instance(e)},m.normInvert=function(e){return _h(u,m),u.instance.invert(e)},m.copy=function(){return e(t,i)},m.clamp=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return s.clamp(e),s.clamp()},m.min=function(){return Math.min(c,f)},m.max=function(){return Math.max(c,f)},s.range(o.invert?[1,0]:[0,1]),s.domain([c,f]),u.invert=o.invert;var p=Rh(o);return r=Lh(s.copy(),o,p),n=lh({qAxis:a,measureText:o.formatter.measureText,reqAutoFitWidth:2*p.getFormat("minute").width,cache:o.cache,scale:m}),m.data=function(){return{fields:[{formatter:m.formatter,id:function(){return"qHyperCube/".concat(o.field)},key:function(){return o.field},raw:$c(i,"fields.0.raw",(function(){return{}}))}]}},m.formatter=function(){return p.getFormatFromTicks(d).formatter},m}}},Bh=function(e){return e.meta.seriesComponentKeys[0]};var zh=Vh.event.onZoom,Yh=["".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Ou),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Au),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Ou,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Au,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Ou,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.BAR_OOB,"-").concat(Au,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Au),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Au,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Ou,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.SLICED_HAT,"-").concat(Au,"-").concat(Ra.AXIS.SECONDARY),"".concat(ka.COMPONENT.DATA_OOB_MARKER,"-").concat(Ou),"".concat(ka.COMPONENT.DATA_OOB_MARKER,"-").concat(Au),ka.COMPONENT.AXIS.MAJOR];function Uh(e){var t=e.chart,n=e.models,r=e.actions,i=e.viewState,o=e.viewCache,a=e.environment,s=n.appModel,u=n.layoutService,l=n.seriesModel,c=n.tooltipModel,f=n.flags,d=l.meta,m=d.pointComponentKeys,p=d.markerComponentKeys,h=d.barComponentKeys,v=[].concat(ee(m),ee(p)),y=ee(h),g=[].concat(Yh,ee(v)),b=c.query.getCustomTooltipModel(),x=Bh(l),M=b.utils,S=Qc(M.displayTooltip,M.DEBOUNCE_THRESHOLD),E=u.meta.isContinuous?zh({chart:t,viewState:i,viewCache:o},{rtl:"rtl"===a.options.direction,threshold:50,targetKey:x}):function(){},C=function(){return t.component(ka.COMPONENT.LEGEND_TOOLTIP)},q=function(){return t.component(ka.COMPONENT.TOOLTIP)},O=function(){!function(){var e=C();e&&e.show&&e.emit("hide")}(),function(){var e=q();e&&e.show&&(e.emit("hide"),c.query.useCustomTooltip()&&S&&S({},e,{nodes:[],opts:{app:s,flags:f},customTooltipModel:b,hide:!0}))}()};return{type:"native",events:{wheel:function(e){var n={x:e.clientX,y:e.clientY},i=t.componentsFromPoint(n);r.interact.enabled()&&function(e,t){if(t){var n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}}(e,Q(i.filter((function(e){return e.key===ka.COMPONENT.LEGEND_CATEGORICAL})),1)[0]);r.scroll.enabled()&&(Q(i.filter((function(e){return e.key===x})),1)[0]&&(E(n,Math.sign(-e.deltaY)),e.preventDefault()));O()},mousemove:function(e){if(r.tooltip.enabled()){var i=t.componentsFromPoint({x:e.clientX,y:e.clientY}),o=C();o&&o.show&&(i.some((function(e){return e.key===ka.COMPONENT.LEGEND_CATEGORICAL}))?o.emit("show",e):o.emit("hide"));var a=q();if(a&&a.show)if(i.some((function(e){return-1!==g.indexOf(e.key)}))){var u=[],l=function(e){var t=e.chart,n=e.e,r=t.element.getBoundingClientRect(),i=r.left,o=r.top;return{x:(n.center?n.center.x:n.clientX)-i,y:(n.center?n.center.y:n.clientY)-o}}({chart:t,e:e}),d=l.x,m=l.y;if(i.some((function(e){return v.indexOf(e.key)>-1}))&&u.push.apply(u,ee(t.shapesAt({cx:d,cy:m,r:3},{components:v.map((function(e){return{key:e}}))}))),i.some((function(e){return y.indexOf(e.key)>-1}))&&u.push.apply(u,ee(t.shapesAt({x:d,y:m},{components:y.map((function(e){return{key:e}}))}))),c.query.useCustomTooltip()&&M.checkIfPromisesExist({customTooltipModel:b})){var p=[];if(0===u.length&&(u.push.apply(u,ee(M.getNodes(e,t))),1===u.length&&u[0].key===ka.COMPONENT.AXIS.MAJOR)){var h,x=Mp({chart:t,models:n,nodes:u});null!=x&&x.length&&null!==(h=x[0].childrenNodes)&&void 0!==h&&h.length&&(p=x[0].childrenNodes)}S(e,a,{nodes:u,extractedNodes:p,opts:{app:s,flags:f},customTooltipModel:b})}else a.emit("show",e,u.length?{nodes:u}:void 0)}else a.emit("hide")}},mouseup:function(e){2===e.button&&O()},mouseleave:function(){O()}}}}var Wh=Vh.interactions.areaPan;function Xh(e){var t,n=e.chart,r=e.models,i=e.environment,o=e.viewState,a=e.viewCache,s=e.actions,u=e.selectables,l=r.layoutService,c=r.dockService,f=r.discreteModel,d=r.colorService,m="rtl"===i.options.direction,p=function(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.viewState,o=e.viewCache,a=e.layoutService;return{gestures:ee(js({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:e.dockService,discrete:e.discrete,rtl:e.rtl})),native:Fs({componentKey:t,chart:n,actions:r,layoutService:a})}}({componentKey:"scrollbar",chart:n,actions:s,viewState:o,viewCache:a,discrete:f,layoutService:l,dockService:c,rtl:m}),h={type:"hammer",enable:!0,gestures:[].concat(ee(d.custom.legendInteractions()),ee(u.gestures.sort((function(e,t){return(t.prio||0)-(e.prio||0)}))),ee(p.gestures))},v=[Uh({chart:n,models:r,actions:s,viewState:o,viewCache:a,environment:i}),p.native];l.meta.isDiscrete&&((t=h.gestures).push.apply(t,ee(f.interactions.gestures)),v.push(f.interactions.native));return l.meta.isContinuous&&h.gestures.push(Wh({targetKey:Bh(r.seriesModel),chart:n,actions:s,viewState:o,viewCache:a}),function(e){var t,n=e.targetKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache,s=e.rtl,u={last:0,diff:0},l=Vh.event.onZoom({viewCache:a,viewState:o,chart:r},{threshold:100,rtl:s,targetKey:n});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:"continuousPinchZoom",pointers:2,threshold:0,enable:function(e,t){return!t||!!i.scroll.enabled()&&r.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===n}))}},events:(t={},Y(t,"".concat("continuousPinchZoom","start"),(function(e){u.last=e.scale,e.preventDefault()})),Y(t,"".concat("continuousPinchZoom","move"),(function(e){var t=e.scale-u.last;Math.abs(t)>.01&&l(e.center,t>0?1:-1),u.last=e.scale,e.preventDefault()})),t)}}({targetKey:Bh(r.seriesModel),chart:n,actions:s,viewState:o,viewCache:a,rtl:m})),[h].concat(v)}function Gh(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[function(e,t){var n,r=e.targets,i=e.requireFailure,o=e.recognizeWith,a=e.components,s=e.eventName,u=void 0===s?"tap":s,l=t.customTooltipModel?t.customTooltipModel.utils:void 0,c=l?t.debouncer(l.displayTooltip,l.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:i,recognizeWith:o,options:{event:u,interval:10,pointers:1,enable:function(e,i){return!i||!(!t.actions.select.enabled()&&!t.actions.tooltip.enabled())&&(n=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((function(e){return-1!==r.indexOf(e.key)}))).length>0}},events:Y({},u,(function(e){e.preventDefault();var i=function(e,t){var n,r,i=t.element.getBoundingClientRect();return e.center?(n=e.center.x,r=e.center.y):(n=e.clientX,r=e.clientY),{x:n-i.left,y:r-i.top}}(e,this.chart),o=t.hitRadius?t.hitRadius(n):0,s=o>0?{cx:i.x,cy:i.y,r:o}:i,f=t.shapesAt?t.shapesAt(s):this.chart.shapesAt(s,{components:r.map((function(e){return{key:e,propagation:"stop"}})),propagation:"stop"}),d=this.chart.component("tooltip"),m="mouse"!==e.pointerType&&d&&d.show;if(!t.isLocked(n)&&!t.tooltipOnly&&t.actions.select.enabled()){var p=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),h=p.some((function(e){return"legend-cat"===e.type}));if(!f.length&&h||(this.chart.brushSelectionIncludeMax=!1,t.actions.select.brushSelectionIncludeMax=!1,t.actions.select.emit("start",u,p)),f.length&&a){this.chart.brushSelectionIncludeMax=!1,t.actions.select.brushSelectionIncludeMax=!1;var v="function"==typeof a?a(e,f):a;this.chart.brushFromShapes(f,{components:v}),t.actions.select.emit("end",u)}}if(d&&t.actions.tooltip.enabled())if(f.length){var y=t.customTooltipModel;if(y.useCustomTooltip&&l.checkIfPromisesExist({customTooltipModel:y})){var g=l.getNodes(e,this.chart);c(e,d,{nodes:g,opts:t,customTooltipModel:y})}else d.emit("show",e,{nodes:f})}else m&&d.emit("hide")}))}}(e,t)],components:[]}}var Kh=function(e,t,n){var r,i=e.eventName,o=e.key,a=e.fillTargets,s=void 0===a?[]:a,u=e.requireFailure,l=e.recognizeWith;return{key:"event:".concat(o),type:"Pan",requireFailure:u,recognizeWith:l,options:{event:i,enable:function(e,n){if(this.started===i||!n)return!0;if(!t.actions.select.enabled())return!1;var r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((function(e){return-1!==s.indexOf(e.key)}));return 0===r.length&&function(e,t){var n=e.srcEvent.target;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf("".concat(t,"-")))}(n,o)?(this.started=i,!0):r.length>0}},events:(r={},Y(r,"".concat(i,"start"),(function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,t.actions.select.brushSelectionIncludeMax=!0),e.preventDefault(),t.actions.select.emit("start",i),this.chart.component(o).emit("".concat(n,"Start"),e),this.started=i})),Y(r,"".concat(i,"move"),(function(e){e.preventDefault(),this.chart.component(o).emit("".concat(n,"Move"),e)})),Y(r,"".concat(i,"end"),(function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,t.actions.select.brushSelectionIncludeMax=!0),e.preventDefault(),this.chart.component(o).emit("".concat(n,"End"),e),t.actions.select.emit("end",i),this.started=!1})),r)}};function $h(e,t){var n=function(e){var t=e.key,n=e.targets,r=e.fillTargets,i=e.targetSelector,o=e.targetFillSelector,a=e.dock,s=e.scale,u=e.bubblesPlacement,l=void 0===u?"inside":u,c=e.observeBrush,f=void 0!==c&&c,d=e.multiple,m=void 0!==d&&d,p=e.toLabel,h=e.onEdited;return{key:t,type:"brush-range",layout:{dock:n.map((function(e){return"@".concat(e)})).join(",")},on:h?{bubbleEnd:function(){h()}}:{},settings:{brush:f?{context:"selection",observe:!0}:"selection",scale:s,multiple:m,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:p},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=Kh(e,t,"range");return{interactions:[e.onEdited?function(e,t){var n=e.key,r=e.requireFailure,i=e.recognizeWith,o=e.eventName,a=void 0===o?"tap":o;return{prio:1,key:"event:".concat(n,"-tap"),type:"Tap",requireFailure:r,recognizeWith:i,options:{event:"".concat(a,"-").concat(n,"-tap"),interval:10,pointers:1,enable:function(e,r){return!!(r&&t.actions.select.enabled()&&(r.target&&"INPUT"===r.target.nodeName||r.target&&r.target.hasAttribute("data-other-value")&&(r.target.getAttribute("data-key")||"").split("-bubble")[0]===n))}},events:Y({},"".concat(a,"-").concat(n,"-tap"),(function(e){(e.target.getAttribute("data-key")||"").split("-bubble")[0]&&(e.preventDefault(),this.chart.component(n).emit("bubbleStart",e))}))}}(e,t):null,r].filter(Boolean),components:[n]}}var Jh=/axis|legend/;function Zh(e){var t=e.actions,n=e.models,r=n.seriesModel,i=n.layoutService,o=n.colorService,a=n.tooltipModel,s=n.flags,u=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1);return Gh({targets:["".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.SECONDARY)].concat(ee(r.query.series(Ra.TYPE.MARKER).map((function(e){return Nu(ka.COMPONENT.MARKER,e)}))),ee(r.query.series(Ra.TYPE.LINE).map((function(e){return Nu(ka.COMPONENT.POINT,e)}))),[ka.COMPONENT.AXIS.MAJOR,ka.COMPONENT.AXIS_OVERLAY.TIME_INNER,ka.COMPONENT.AXIS_OVERLAY.TIME_OUTER,ka.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ka.COMPONENT.LEGEND_CATEGORICAL]),components:function(e,t){var n=Q(t,1)[0].key,r={key:n,action:e.srcEvent.ctrlKey||u?"set":"toggle",contexts:["selection"]};return-1===[ka.COMPONENT.AXIS.MAJOR,ka.COMPONENT.AXIS_OVERLAY.TIME_INNER,ka.COMPONENT.AXIS_OVERLAY.TIME_OUTER,ka.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ka.COMPONENT.LEGEND_CATEGORICAL].indexOf(n)&&(r.data=["selectionDimension"]),[r]}},{actions:t,isLocked:function(e){return e.some((function(e){return"legend-cat"===e.type}))?o.isSelectionLocked({isMeasureSelectionLocked:i.meta.isDimensionLocked}):i.meta.isDimensionLocked},hitRadius:function(e){return function(e){return e.some((function(e){return Jh.test(e.type)}))}(e)?0:3},customTooltipModel:a.query.getCustomTooltipModel(),debouncer:Qc,flags:s})}function Qh(e){var t=e.actions,n=e.models,r=n.layoutService,i=n.dockService,o=n.seriesModel,a=r.meta,s=a.isDiscrete,u=a.isDimensionLocked;if(!s||u)return!1;var l=[].concat(ee(o.meta.seriesComponentKeys),[ka.COMPONENT.AXIS.MAJOR]);return function(e,t){var n=function(e){var t=e.key,n=e.targets,r=e.components,i=e.fillTargets,o=e.dock;return{key:t,type:"brush-area-dir",layout:{dock:n.map((function(e){return"@".concat(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:[Kh(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:l[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:l,fillTargets:[ka.COMPONENT.AXIS.MAJOR],dock:i.meta.major.dock},{actions:t})}var ev={components:[],interactions:[]};function tv(e){var t=e.actions,n=e.chart,r=e.models,i=function(e){var t=e.actions,n=e.models,r=n.dockService,i=n.seriesModel,o=n.layoutService;return!o.meta.isDimensionLocked&&!o.meta.isBarSeriesStacked&&$h({eventName:"minorRange",key:"minor-range-brush",targets:[ka.COMPONENT.AXIS.MINOR.PRIMARY,"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY)].concat(ee(i.query.series(Ra.TYPE.MARKER).filter((function(e){return e.isPrimary})).map((function(e){return Nu(ka.COMPONENT.MARKER,e)}))),ee(i.query.series(Ra.TYPE.LINE).filter((function(e){return e.isPrimary})).map((function(e){return Nu(ka.COMPONENT.POINT,e)})))),fillTargets:[ka.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:ka.SCALE.MINOR.PRIMARY,onEdited:function(){t.select.emit("end","minorRange")}},{actions:t})}({actions:t,models:r})||ev,o=function(e){var t=e.actions,n=e.models,r=n.dockService,i=n.seriesModel,o=n.layoutService;return!o.meta.isDimensionLocked&&!o.meta.isBarSeriesStacked&&$h({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[ka.COMPONENT.AXIS.MINOR.SECONDARY,"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.SECONDARY)].concat(ee(i.query.series(Ra.TYPE.MARKER).filter((function(e){return!e.isPrimary})).map((function(e){return Nu(ka.COMPONENT.MARKER,e)}))),ee(i.query.series(Ra.TYPE.LINE).filter((function(e){return!e.isPrimary})).map((function(e){return Nu(ka.COMPONENT.POINT,e)})))),fillTargets:[ka.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:ka.SCALE.MINOR.SECONDARY,onEdited:function(){t.select.emit("end","minorRange-secondary")}},{actions:t})}({actions:t,models:r})||ev,a=Qh({actions:t,models:r})||ev,s=function(e){var t=e.actions,n=e.chart,r=e.models,i=r.layoutService,o=r.dockService,a=r.seriesModel,s=i.meta,u=s.isContinuous,l=s.isTime;if(!u)return!1;var c=l?[ka.COMPONENT.AXIS_OVERLAY.TIME_INNER,ka.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[ka.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return $h({eventName:"continuousRange",key:"continuous-range-brush",targets:["".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY),"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.SECONDARY)].concat(ee(a.query.series(Ra.TYPE.MARKER).map((function(e){return Nu(ka.COMPONENT.MARKER,e)}))),ee(a.query.series(Ra.TYPE.LINE).map((function(e){return Nu(ka.COMPONENT.POINT,e)}))),c),fillTargets:c,dock:o.meta.major.dock,scale:l?ka.SCALE.MAJOR_INNER:ka.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel:function(e){var t=e.datum,r=e.data,i=e.scale,o=l?i.formatter():n.formatter(ka.FORMATTER.PRIMARY),a=n.scale(ka.SCALE.MAJOR).max(),s=n.brushSelectionIncludeMax&&t===a;return"".concat(t!==Math.max.apply(Math,ee(r))||s?"":"<").concat(o(t))}},{actions:t})}({actions:t,chart:n,models:r})||ev,u=function(e){var t=e.actions,n=e.models,r=n.colorService,i=n.layoutService,o=Q(r.custom.legendComponents(),1)[0],a=r.custom.wrappedScales();if(i.meta.isDimensionLocked||!o)return!1;var s="".concat(ka.SCALE.COLOR,"Range"),u=o.type,l=o.key,c=a[s];return!("legend-seq"!==u||!c||c.min>=c.max)&&$h({eventName:"legendRange",key:"legend-range-brush",targets:[l],fillTargets:[l],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:o.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:function(){t.select.emit("end","legendRange")}},{actions:t})}({actions:t,models:r})||ev;return{components:[].concat(ee(i.components),ee(o.components),ee(a.components),ee(s.components),ee(u.components)),interactions:[].concat(ee(i.interactions),ee(o.interactions),ee(a.interactions),ee(s.interactions),ee(u.interactions))}}function nv(e){var t=e.actions,n=e.models,r=n.layoutService,i=n.seriesModel.meta.seriesComponentKeys;return r.meta.isDimensionLocked?{components:[],interactions:[]}:function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");var n,r=j({key:"lasso"},e),i={key:(n=r).key,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:n.components},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}}};return{interactions:[function(e,t){var n=e.key,r=e.componentTargetKey,i=e.requireFailure,o=e.recognizeWith;return{key:"event:".concat(n),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:"lasso",enable:function(e,n){return"lasso"===this.started||!n||!!(t.actions.select.enabled()&&t.actions.lasso.enabled()&&t.actions.lasso.active())&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((function(e){return e.key===r})).length>0}},events:{lassostart:function(e){e.preventDefault(),"lasso"!==this.started&&(t.actions.select.emit("start","lasso"),this.chart.component(n).emit("lassoStart",e),this.started="lasso")},lassomove:function(e){e.preventDefault(),this.chart.component(n).emit("lassoMove",e)},lassoend:function(e){e.preventDefault(),this.started=!1,this.chart.component(n).emit("lassoEnd",e),t.actions.select.emit("end","lasso")}}}}(r,t)],components:[i]}}({key:"lasso",componentTargetKey:i[0],components:i.map((function(e){return{key:e,action:"add",contexts:["selection"],data:["selectionDimension"]}}))},{actions:t})}function rv(e){var t=e.picasso,n=e.chart,r=e.models,i=e.environment,o=e.viewState,a=e.viewCache,s=e.actions,u=r.colorService,l=r.pluginService,c=r.layoutService.getLayout(),f=function(e,t){return{layoutModes:be(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?j({align:.5,preserveAspectRatio:!0},t.logicalSize):void 0}}(0,{logicalSize:function(e){var t=e.layout,n=e.options,r=void 0===n?{}:n;return!(null==t||!t.snapshotData||r.freeResize)&&{width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h}}({layout:c,options:i.options}),minCenterRatio:0}),d=Dp({chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s}),m=function(e){var t=e.actions,n=e.chart,r=e.models,i=r.layoutService.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),o=Zh({actions:t,models:r});if(i)return{components:ee(o.components),gestures:ee(o.interactions)};var a=tv({actions:t,chart:n,models:r}),s=nv({actions:t,models:r});return{components:[].concat(ee(o.components),ee(a.components),ee(s.components)),gestures:[].concat(ee(o.interactions),ee(a.interactions),ee(s.interactions))}}({actions:s,chart:n,models:r}),p=l.extendComponents([].concat(ee(d),ee(m.components)));return{collections:au({models:r}),scales:pu({picasso:t,models:r,viewState:o,viewCache:a,environment:i}),components:p,formatters:Np({models:r}),interactions:Xh({chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s,selectables:m}),strategy:f,palettes:u.getPalettes()}}var iv=function(e){var t=e.models,n=t.layoutService,r=t.fieldModel,i=t.appLayoutModel;return{type:"q",key:ka.DATA.MAIN,data:n.getHyperCube(),config:{virtualFields:r.virtuals,localeInfo:i.qLocaleInfo}}},ov=function(e){var t=e.models,n=t.layoutService,r=t.fieldModel,i=t.continuousModel,o=t.appLayoutModel;return n.meta.isContinuous?[{type:"q",key:ka.DATA.REDUCED,data:i.getInitialCube(),config:{virtualFields:r.virtuals,localeInfo:o.qLocaleInfo}}]:[]},av=Vh.event,sv=av.onZoomIntercept,uv=av.onZoomChange,lv=[ka.COMPONENT.AXIS_TITLE.MAJOR,ka.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,ka.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,ka.COMPONENT.GRID_LINE,ka.COMPONENT.ZERO_LINE],cv=function(e){var t=e.picasso,r=e.chart,o=e.models,a=e.environment,s=e.viewState,u=e.viewCache,l=e.actions;!function(e){var t=e.chart,r=e.models,i=e.viewState,o=e.viewCache;n((function(){if(r&&i&&o){var e=r.layoutService,n=r.continuousModel,a=r.refLineModel,s=r.seriesModel.meta.miniComponentKeys,u=function(){a&&a.update(),t.update({partialData:!0,excludeFromUpdate:[].concat(lv,ee(s))})};i.onChanged("scrollOffset",u),e.meta.isContinuous&&(i.onChanged("zoom",uv({layoutService:e,continuousDataModel:n},u)),i.intercept("zoom",sv({viewCache:o})))}}),[r,i,o])}({chart:r,models:o,viewState:s,viewCache:u}),function(e){var t=e.picasso,n=e.chart,r=e.models,o=e.environment,a=e.viewState,s=e.viewCache,u=e.actions,l=Q(i(H(regeneratorRuntime.mark((function e(){var i,l,c,f,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n.update({settings:rv({picasso:t,chart:n,models:r,environment:o,viewState:a,viewCache:s,actions:u}),data:e&&[iv({models:r})].concat(ee(ov({models:r})),ee(l.getData()))})},null!=n&&n.update&&r&&o){e.next=3;break}return e.abrupt("return");case 3:if(i=r.layoutService,l=r.colorService,c=r.discreteModel,d=i.getDataPages(),i.setDataPages([]),f(!0),i.setDataPages(d),i.meta.isContinuous){e.next=11;break}return e.next=11,c.command.initialize();case 11:f(!1);case 12:case"end":return e.stop()}}),e)}))),[null==n?void 0:n.update,r,o]),2)[1];if(l)throw l}({picasso:t,chart:r,models:o,environment:a,viewState:s,viewCache:u,actions:l})},fv={exports:{}};function dv(){}function mv(){}mv.resetWarningCache=dv;fv.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:mv,resetWarningCache:dv};return n.PropTypes=n,n}();var pv=fv.exports;function hv(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function vv(e){var t=e.d,n=e.size,r=e.style,i=void 0===r?{}:r,o=e.viewBox,a=void 0===o?"0 0 16 16":o,s=j({fontSize:hv(n),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},i);return q.createElement("i",{style:s},q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:a,fill:"currentColor"},q.createElement("path",{d:t})))}var yv={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"},gv={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"},bv="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",xv={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"},Mv={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 Sv(e,t,n){(function(e){var t=e.model,n=e.properties;return t.modifiers?t.modifiers.apply({model:t,properties:n}):Promise.resolve()})({model:e,properties:n}).then((function(){e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");var r=So.generate(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))}))}function Ev(e,t,n,r,i,o){e.getEffectiveProperties().then((function(a){var s=me(!0,{},a),u=s.qHyperCubeDef[r][t],l=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];l.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(l.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=l,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=u,i&&i({oldItem:u,newItem:l,oldProperties:a,newProperties:s,model:e}),Sv(e,a,s)}))}function Cv(e){return"H"===e.qGrouping?e.title||"":e.qFallbackTitle||""}function qv(e){var t=e.dir,n=e.dock,r=e.altList,i=e.model,o=e.translator,a=e.app,s=e.onChange;return 0===r.length?null:{dir:t,dock:n,getAlternatives:function(){var e=r.map((function(e){return function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((function(e){return e.getLayout()})).catch((function(){return null})).then((function(e){return e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")}));var r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);var i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,a,o).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){Ev(i,e,t,"qDimensions",s)}}}function Ov(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/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:Cv(e),drillUp:function(e){n.drillUp(r,t,e)}}}function Av(e){var t=e.altList,n=e.app,r=e.dir,i=e.dock,o=e.model,a=e.onChange,s=e.skipAttributeExpressions,u=e.translator;return 0===t.length?null:{dir:r,dock:i,getAlternatives:function(){var e=t.map((function(e){return function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((function(e){return e.getLayout()})).catch((function(){return null})).then((function(e){return e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")}));var r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);var i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,n,u).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){Ev(o,e,t,"qMeasures",a,s)}}}function Dv(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}var Nv=["children"],Iv={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"}}},Tv=function(e){var t=e.children,n=K(e,Nv);return q.createElement(O,U({size:"small",disableRipple:!0,disableTouchRipple:!0},n),t)};function wv(){function e(e){var t=e.title,n=e.selected,r=e.onClick,i=je.detectTextDirection(t);return q.createElement(N,{button:!0,onClick:r,style:{textAlign:"start"}},q.createElement(I,{style:{minWidth:32}},q.createElement(vv,{d:n?bv:""})),q.createElement(T,{primaryTypographyProps:{dir:i}},t))}function t(t){var n=t.alignTo,r=t.changeTo,i=t.current,o=t.dir,a=t.dock,s=t.list,u=t.onClose,l=t.show,c=s.map((function(t,n){return q.createElement(e,{key:t.id,title:t.title,onClick:function(){return r(n)}})}));return q.createElement(A,U({anchorEl:n,open:l,onClose:u},Iv[a],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),q.createElement(D,{dense:!0,dir:o,component:"nav"},q.createElement(e,{title:i,selected:!0,onClick:u}),c))}e.propTypes={title:pv.string.isRequired,selected:pv.bool,onClick:pv.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:pv.any,changeTo:pv.func.isRequired,current:pv.string.isRequired,dir:pv.string.isRequired,dock:pv.string.isRequired,list:pv.array,onClose:pv.func.isRequired,show:pv.bool.isRequired},t.defaultProps={list:[],alignTo:null};var n=function(e){W(r,q.Component);var n=Z(r);function r(e){var t;return V(this,r),(t=n.call(this,e)).state={open:!1,inSelection:e.selections&&e.selections.isActive()},t.openPopover=t.openPopover.bind($(t)),t.closePopover=t.closePopover.bind($(t)),t.changeTo=t.changeTo.bind($(t)),t.alignToRef=q.createRef(),t}return z(r,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selections;t&&(this.onSelectionsActivated=function(){return e.setState({inSelection:!0})},this.onSelectionsDeactivated=function(){return e.setState({inSelection:!1})},t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated))}},{key:"componentWillUnmount",value:function(){var e=this.props.selections;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}},{key:"changeTo",value:function(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}},{key:"openPopover",value:function(){var e=this;this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((function(t){e.setState({open:!0,alternatives:t})}))}},{key:"closePopover",value:function(){this.setState({open:!1,closeTime:Date.now()})}},{key:"render",value:function(){var e=this.props,n=e.titleData,r=e.popover,i=e.translator,o=e.disabled,a=e.isDimension,s=e.padding,u=e.minWidth,l=e.hasAlternative,c=j({flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal"},this.props.style),f=n.breadcrumbs.length,d=o||this.state.inSelection,m=n.breadcrumbs.map((function(e,t){return q.createElement(Tv,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:t,onClick:function(){return d?void 0:n.drillUp(f-t)},title:e},q.createElement("span",{style:c},e),q.createElement(vv,U({},Mv,{size:"small",style:{margin:"0 8px"}})))})),p=r&&!this.state.open?this.openPopover:this.closePopover,h=!r||o||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:h&&"rgba(89, 89, 89, 0.8)",height:!a&&h&&"20px",lineHeight:!a&&h&&"20px",border:!a&&h&&"none"};s&&(v.padding=s),u&&(v.minWidth=u);var y=je.detectTextDirection(n.text),g=q.createElement(Tv,{style:v,onClick:h?void 0:p,title:n.text,tabIndex:"-1"},n.locked&&q.createElement(vv,U({},gv,{size:"small",title:i.get("Tooltip.selections.locked")})),q.createElement("span",{style:c,dir:y},n.text),r&&q.createElement(vv,U({},xv,{size:"small",style:{margin:"0 8px"}})));return q.createElement(q.Fragment,null,n.drilldown&&q.createElement(vv,U({},yv,{size:"small",title:i.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,q.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:l?"auto":"none"}},g),r&&q.createElement(t,{dock:r.dock,dir:r.dir,current:n.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}]),r}();function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&Ee(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:pv.bool.isRequired,padding:pv.string,minWidth:pv.string,titleData:pv.shape({breadcrumbs:pv.arrayOf(pv.string).isRequired,drilldown:pv.bool.isRequired,index:pv.number.isRequired,locked:pv.bool.isRequired,text:pv.string.isRequired,popoverText:pv.string.isRequired,drillUp:pv.func}).isRequired,popover:pv.shape({dir:pv.string.isRequired,dock:pv.string.isRequired,changeTo:pv.func.isRequired,getAlternatives:pv.func.isRequired}),translator:pv.shape({get:pv.func.isRequired}).isRequired,selections:pv.shape({isActive:pv.func,addListener:pv.func,removeListener:pv.func}),style:pv.shape({fontSize:pv.string,color:pv.string,fontFamily:pv.string}).isRequired,isDimension:pv.bool.isRequired,hasAlternative:pv.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render:function(){var e,t=this,o=this.settings,a=o.settings,s=a.app,u=a.disabled,l=a.explicitItemInfos,c=a.hyperCube,f=a.hyperCubeDef,d=a.isDimension,m=a.minWidth,p=a.model,h=a.onChangeToAlternative,v=a.padding,y=a.rtl,g=a.selections,b=a.skipAttributeExpressions,x=a.translator,M=o.layout.dock,S="top"!==M&&"bottom"!==M||!y?"ltr":"rtl",E=function(e,t){var n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width="".concat(t.height,"px"),n.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),n.transformOrigin="top left"):"right"===e&&(n.width="".concat(t.height,"px"),n.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),n.transformOrigin="top left"),n}(M,this.rect),C=f&&f.qLayoutExclude&&f.qLayoutExclude.qHyperCubeDef,O=C&&C[d?"qDimensions":"qMeasures"]||[],A=l||c[d?"qDimensionInfo":"qMeasureInfo"],D=d?qv:Av,N=d?Ov:Dv,I=p&&p.colorSupport&&p.modifiers&&D({altList:O,app:s,dir:y?"rtl":"ltr",dock:r(M),model:p,onChange:h,skipAttributeExpressions:b,translator:x}),T=(e=this.settings.settings).isDimension&&Ee(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings),w=A.map((function(e,r){var i="number"==typeof e.explicitColumn?e.explicitColumn:r,o=N(e,i,p),a=r===A.length-1;return q.createElement(q.Fragment,{key:e.cId},q.createElement(n,{popover:I,titleData:o,model:p,translator:x,selections:g,disabled:u(),style:t.style,isDimension:d,padding:v,minWidth:m,hasAlternative:T}),!a&&q.createElement("span",null,", "))}));return q.createElement("div",{style:E,dir:S},w)}}}function Lv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function kv(e){if(e.type)return e;if("#"===e.charAt(0))return kv(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function Rv(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function Pv(e){var t="hsl"===(e=kv(e)).type?kv(function(e){var t=(e=kv(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),Rv({type:s,values:u})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function jv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fv(){return(Fv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _v(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hv(){return(Hv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Vv(e){return(Vv="function"==typeof Symbol&&"symbol"===F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}function Bv(e){return(Bv="function"==typeof Symbol&&"symbol"===Vv(Symbol.iterator)?function(e){return Vv(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Vv(e)})(e)}function zv(e){return e&&"object"===Bv(e)&&!Array.isArray(e)}function Yv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Hv({},e):e;return zv(e)&&zv(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(zv(t[i])&&i in e?r[i]=Yv(e[i],t[i],n):r[i]=t[i])})),r}var Uv=["xs","sm","md","lg","xl"];function Wv(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=_v(e,["values","unit","step"]);function u(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function l(e,t){var r=Uv.indexOf(t)+1;return r===Uv.length?u(e):"@media (min-width:".concat(n[e]).concat(i,") and ")+"(max-width:".concat(n[Uv[r]]-a/100).concat(i,")")}return Fv({keys:Uv,values:n,up:u,down:function(e){var t=Uv.indexOf(e)+1,r=n[Uv[t]];return t===Uv.length?u("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:l,only:function(e){return l(e,e)},width:function(e){return n[e]}},s)}function Xv(e,t,n){var r;return Fv({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Fv({paddingLeft:t(2),paddingRight:t(2)},n,jv({},e.up("sm"),Fv({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},jv(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),jv(r,e.up("sm"),{minHeight:64}),r)},n)}var Gv="#7986cb",Kv="#3f51b5",$v="#303f9f",Jv="#ff4081",Zv="#f50057",Qv="#c51162",ey={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},ty="#e57373",ny="#f44336",ry="#d32f2f",iy={black:"#000",white:"#fff"},oy={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:iy.white,default:ey[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},ay={text:{primary:iy.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:ey[800],default:"#303030"},action:{active:iy.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function sy(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=kv(e),t=Lv(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return Rv(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=kv(e),t=Lv(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return Rv(e)}(e.main,1.5*r)))}function uy(e){var t=e.primary,n=void 0===t?{light:Gv,main:Kv,dark:$v}:t,r=e.secondary,i=void 0===r?{light:Jv,main:Zv,dark:Qv}:r,o=e.error,a=void 0===o?{light:ty,main:ny,dark:ry}:o,s=e.type,u=void 0===s?"light":s,l=e.contrastThreshold,c=void 0===l?3:l,f=e.tonalOffset,d=void 0===f?.2:f,m=_v(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function p(e){return function(e,t){var n=Pv(e),r=Pv(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,ay.text.primary)>=c?ay.text.primary:oy.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Fv({},e)).main&&e[t]&&(e.main=e[t]),sy(e,"light",n,d),sy(e,"dark",r,d),e.contrastText||(e.contrastText=p(e.main)),e}var v={dark:ay,light:oy};return Yv(Fv({common:iy,type:u,primary:h(n),secondary:h(i,"A400","A200","A700"),error:h(a),grey:ey,contrastThreshold:c,getContrastText:p,augmentColor:h,tonalOffset:d},v[u]),m,{clone:!1})}function ly(e){return Math.round(1e5*e)/1e5}var cy={textTransform:"uppercase"};function fy(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,u=void 0===s?300:s,l=n.fontWeightRegular,c=void 0===l?400:l,f=n.fontWeightMedium,d=void 0===f?500:f,m=n.fontWeightBold,p=void 0===m?700:m,h=n.htmlFontSize,v=void 0===h?16:h,y=n.allVariants,g=n.pxToRem,b=_v(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,M=g||function(e){return"".concat(e/v*x,"rem")},S=function(e,t,n,r,o){return Fv({fontFamily:i,fontWeight:e,fontSize:M(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===i?{letterSpacing:"".concat(ly(r/t),"em")}:{},{},o,{},y)},E={h1:S(u,96,1,-1.5),h2:S(u,60,1,-.5),h3:S(c,48,1.04,0),h4:S(c,34,1.17,.25),h5:S(c,24,1.33,0),h6:S(d,20,1.6,.15),subtitle1:S(c,16,1.75,.15),subtitle2:S(d,14,1.57,.1),body1:S(c,16,1.5,.15),body2:S(c,14,1.43,.15),button:S(d,14,1.75,.4,cy),caption:S(c,12,1.66,.4),overline:S(c,12,2.66,1,cy)};return Yv(Fv({htmlFontSize:v,pxToRem:M,round:ly,fontFamily:i,fontSize:a,fontWeightLight:u,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:p},E),b,{clone:!1})}function dy(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var my=["none",dy(0,2,1,-1,0,1,1,0,0,1,3,0),dy(0,3,1,-2,0,2,2,0,0,1,5,0),dy(0,3,3,-2,0,3,4,0,0,1,8,0),dy(0,2,4,-1,0,4,5,0,0,1,10,0),dy(0,3,5,-1,0,5,8,0,0,1,14,0),dy(0,3,5,-1,0,6,10,0,0,1,18,0),dy(0,4,5,-2,0,7,10,1,0,2,16,1),dy(0,5,5,-3,0,8,10,1,0,3,14,2),dy(0,5,6,-3,0,9,12,1,0,3,16,2),dy(0,6,6,-3,0,10,14,1,0,4,18,3),dy(0,6,7,-4,0,11,15,1,0,4,20,3),dy(0,7,8,-4,0,12,17,2,0,5,22,4),dy(0,7,8,-4,0,13,19,2,0,5,24,4),dy(0,7,9,-4,0,14,21,2,0,5,26,4),dy(0,8,9,-5,0,15,22,2,0,6,28,5),dy(0,8,10,-5,0,16,24,2,0,6,30,5),dy(0,8,11,-5,0,17,26,2,0,6,32,5),dy(0,9,11,-5,0,18,28,2,0,7,34,6),dy(0,9,12,-6,0,19,29,2,0,7,36,6),dy(0,10,13,-6,0,20,31,3,0,8,38,7),dy(0,10,13,-6,0,21,33,3,0,8,40,7),dy(0,10,14,-6,0,22,35,3,0,8,42,7),dy(0,11,14,-7,0,23,36,3,0,9,44,8),dy(0,11,15,-7,0,24,38,3,0,9,46,8)],py={borderRadius:4};function hy(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var vy={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},yy={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},gy=function(e){return"".concat(Math.round(e),"ms")},by={easing:vy,duration:yy,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?yy.standard:n,i=t.easing,o=void 0===i?vy.easeInOut:i,a=t.delay,s=void 0===a?0:a;return _v(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:gy(r)," ").concat(o," ").concat("string"==typeof s?s:gy(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},xy={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var My=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.shadows,u=e.spacing,l=e.typography,c=void 0===l?{}:l,f=_v(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),d=uy(a),m=Wv(n),p=hy(u),h=Fv({breakpoints:m,direction:"ltr",mixins:Xv(m,p,i),overrides:{},palette:d,props:{},shadows:s||my,typography:fy(d,c),spacing:p},Yv({shape:py,transitions:by,zIndex:xy},f));return h}({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:'"QlikView Sans", "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}}});function Sy(e,t){return q.createElement(k,{generateClassName:t},q.createElement(R,{theme:My},e))}var Ey=L({productionPrefix:"q".concat("2d5e"),disableGlobal:!0,seed:""});function Cy(){return function(e){var t;e.renderer("react",function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=e.y,r=e.width,i=e.height,o=e.scaleRatio,a=e.margin,s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return s.x=Number.isNaN(t)?s.x:t,s.y=Number.isNaN(n)?s.y:n,s.width=Number.isNaN(r)?s.width:r,s.height=Number.isNaN(i)?s.height:i,void 0!==o&&(s.scaleRatio.x=Number.isNaN(o.x)?s.scaleRatio.x:o.x,s.scaleRatio.y=Number.isNaN(o.y)?s.scaleRatio.y:o.y),void 0!==a&&(s.margin.left=Number.isNaN(a.left)?0:a.left,s.margin.top=Number.isNaN(a.top)?0:a.top),s}return function(){var t,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createElement,r=void 0===n?document.createElement.bind(document):n,i=e(),o={element:function(){return t},root:function(){return t},appendTo:function(e){return t||((t=r("div")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none"),e.appendChild(t),t},render:function(e){if(!t)return!1;var n=i.scaleRatio.x,r=i.scaleRatio.y;return t.style.left="".concat(Math.round(i.margin.left+i.x*n),"px"),t.style.top="".concat(Math.round(i.margin.top+i.y*r),"px"),t.style.width="".concat(Math.round(i.width),"px"),t.style.height="".concat(Math.round(i.height),"px"),t.style.transform="scale(".concat(n,", ").concat(r,")"),t.style.transformOrigin="top left",w.render(Sy(e,Ey),t),!0},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){return t&&w.unmountComponentAtNode(t),o},destroy:function(){t&&t.parentElement&&(w.unmountComponentAtNode(t),t.parentElement.removeChild(t)),t=null},size:function(t){return t&&(i=e(t)),i}};return o}}()),e.component("data-title",wv()),e.component("disclaimer",((t=function(e){W(n,q.Component);var t=Z(n);function n(){return V(this,n),t.apply(this,arguments)}return z(n,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.spanStyle;return q.createElement(q.Fragment,null,q.createElement("span",{ref:this.alignToRef,style:n,title:t},t))}}]),n}()).propTypes={label:pv.string.isRequired,spanStyle:pv.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render:function(){var e=this.settings,n=e.settings,r=n.label,i=n.rtl,o=e.layout.dock,a="top"!==o&&"bottom"!==o||!i?"ltr":"rtl",s=function(e,t){var n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width="".concat(t.height,"px"),n.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),n.transformOrigin="top left";break;case"right":n.width="".concat(t.height,"px"),n.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),n.transformOrigin="top left";break;case"center":n.width="".concat(t.width,"px"),n.height="".concat(t.height,"px"),n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(o,this.rect),u="center"===o?r:"* ".concat(r),l="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return q.createElement("div",{style:s,dir:a},q.createElement(q.Fragment,null,q.createElement(t,{label:u,spanStyle:l})))}}))}}function qy(e,t,n,r){var i=function(t){var n=String(t);return e(n)};return i.ticks=function(){return t.map((function(t){var 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=function(){return e.bandwidth()},i.data=function(){return e.data()},i.domain=function(){return e.domain()},i.pxScale=function(r){var i=e.pxScale(r);return i===e?this:qy(i,t,n)},i}function Oy(e){var t=e.scale("band");e.scale("group-by-measure",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],u=e.measureCount;return o.forEach((function(e,t){for(var n=0;n<u;++n)s.push(String([e,n]));s.push("SPACER_".concat(t,"_SPACER"))})),s.splice(-1),i.domain(s),qy(i,a,u,e.invert)}))}var Ay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n=void 0===t?10:t,r=e.fill,i=void 0===r?"#999":r,o=e.alignment;return{show:!0,type:"n-polygon",fill:i,stroke:"#000",strokeWidth:0,size:n,sides:3,startAngle:-90,alignment:o}},Dy=function(e){var t,n=e.oob,r=e.dockValue,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,s="x",u="y",l=o,c=a,f=r<.5?90:-90;return e.flipXY&&(s="y",u="x",l=a,c=o,f=r<.5?180:0),(0,e.symbol)(me({},n,(Y(t={},s,i*l),Y(t,u,c-Math.max(n.size/2,Math.min(r*c,c-n.size/2))),Y(t,"startAngle",f),t)))};function Ny(e){var t,n=e.i,r=e.width,i=e.height,o=e.resolved,a=e.keys,s=e.flipXY,u=e.calcKey,l=void 0===u?"box":u,c=null,f=null;void 0!==o.major.settings.binStart?(c=o.major.items[n].binStart,f=o.major.items[n].binEnd,t=o.major.settings.binStart.scale):c=(t=o.major.settings.major.scale)?o.major.items[n].major:0;var d=0;t?t.bandwidth?c-=(d=t.bandwidth())/2:d=f-c:d=1;var m=me({},{major:c,majorEnd:f},o.minor.items[n]);a.forEach((function(e){m[e]=o[e].items[n]}));var p=s?i:r,h=function(e){var t=e.bandwidth,n=e.width,r=e.minWidthPx,i=e.maxWidthPx,o=e.maxMajorWidth,a=t>=0?1:-1,s=Math.min(a*t*n,Number.isNaN(Number(i))?o:i/o);return(s=Number.isNaN(Number(r))?s:Math.max(r/o,s))*a}({bandwidth:d,width:m[l].width,minWidthPx:m[l].minWidthPx,maxWidthPx:m[l].maxWidthPx,maxMajorWidth:p}),v=(d-h)/2,y=v+m.major+h/2;return{item:m,boxCenter:y,boxWidth:h,boxPadding:v,rendWidth:r,rendHeight:i}}function Iy(e){var t,n=e.keys,r=e.data,i=e.defaultSettings,o=e.style,a=e.settings,s=e.width,u=e.height,l=e.resolver,c=me(!0,{},i||{},o||{}),f={major:"horizontal"===a.orientation?u:s,minor:"horizontal"===a.orientation?s:u},d=a.major;t="object"===F(d)&&"object"===F(d.ref)&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:me(!0,{},{binStart:{scale:a.major.scale,ref:a.major.ref.start},binEnd:{scale:a.major.scale,ref:a.major.ref.end}})}):"object"===F(d)&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:me(!0,{},{binStart:{scale:a.major.scale,ref:"binStart"},binEnd:{scale:a.major.scale,ref:"binEnd"}},a.major)}):l.resolve({data:r,scaled:f,defaults:{major:.5},settings:{major:a.major}});for(var m,p=a.minor||{},h={major:t,minor:l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:me(!0,{},{start:{scale:p.scale,ref:"start"},end:{scale:p.scale,ref:"end"},min:{scale:p.scale,ref:"min"},max:{scale:p.scale,ref:"max"},med:{scale:p.scale,ref:"med"}},p)})},v=0,y=n.length;v<y;v++)h[m=n[v]]=l.resolve({data:r,defaults:c[m],settings:a[m],scaled:f});return h}var Ty=["oob"];var wy={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created:function(){this.state={}},preferredSize:function(){return this.settings.settings.size},render:function(){var e=this.rect,t=e.width,n=e.height,r=this.settings.settings.dockValue,i="horizontal"===this.settings.settings.orientation,o=this.data,a=this.style,s=this.resolver,u=this.symbol,l=Iy({keys:Ty,data:o,defaultSettings:{oob:Ay()},style:a,settings:this.settings.settings,width:t,height:n,resolver:s}),c=l.settings;return function(e){for(var t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e.symbol,s=e.dockValue,u=e._calcItemRenderingOpts,l=void 0===u?Ny:u,c=[],f=i.major.items,d=0,m=f.length;d<m;d++){var p=l({i:d,width:t,height:n,resolved:i,keys:o,flipXY:r,calcKey:"oob"}),h=p.item,v=p.boxCenter,y=p.rendWidth,g=p.rendHeight,b=f[d].data,x=[];if(h.oob.show){x.push(Dy({oob:h.oob,dockValue:s,boxCenter:v,rendWidth:y,rendHeight:g,flipXY:r,symbol:a}));var M={type:"container",data:b,collider:{type:"bounds"},children:x};c.push(M)}}return c}({items:l.items,settings:c,width:t,height:n,flipXY:i,resolved:l,keys:Ty,symbol:u,dockValue:r})}},Ly={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},ky=["hat"];function Ry(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r<e.length;r++){var i=e[r];n+=0===r?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),n+=" "}return t&&(n+="Z"),n}function Py(e){var t,n,r,i,o,a,s,u,l,c,f=e.item,d=e.boxWidth,m=e.boxPadding,p=e.rendWidth,h=e.rendHeight,v=e.flipXY,y="x",g="y",b=p,x=h,M=f.hat.alignment||0;v&&(y="y",g="x",b=h,x=p,M=1-M);var S=(m+f.major)*b,E=[(t={},Y(t,y,S),Y(t,g,0+x),t),(n={},Y(n,y,S+d*M*b),Y(n,g,8),n),(r={},Y(r,y,S+d*b),Y(r,g,0+x),r),(i={},Y(i,y,S+d*b),Y(i,g,0+x+10),i),(o={},Y(o,y,S),Y(o,g,0+x+10),o)],C=me({},f.hat,{type:"path",d:Ry(E)});return E=[(a={},Y(a,y,S),Y(a,g,0),a),(s={},Y(s,y,S+d*(1-M)*b),Y(s,g,0+x-8),s),(u={},Y(u,y,S+d*b),Y(u,g,0),u),(l={},Y(l,y,S+d*b),Y(l,g,-10),l),(c={},Y(c,y,S),Y(c,g,-10),c)],[C,me({},f.hat,{type:"path",d:Ry(E)})]}var jy={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created:function(){this.state={}},preferredSize:function(){return this.settings.settings.size},render:function(){var e=this.rect,t=e.width,n=e.height,r="horizontal"===this.settings.settings.orientation,i=this.data,o=this.style,a=this.resolver,s=Iy({keys:ky,data:i,defaultSettings:Ly,style:o,settings:this.settings.settings,width:t,height:n,resolver:a}),u=s.settings;return function(e){for(var t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e._calcItemRenderingOpts,s=void 0===a?Ny:a,u=[],l=i.major.items,c=0,f=l.length;c<f;c++){var d=s({i:c,width:t,height:n,resolved:i,keys:o,flipXY:r,calcKey:"hat"}),m=d.item,p=d.boxWidth,h=d.boxPadding,v=d.rendWidth,y=d.rendHeight,g=l[c].data,b=[];m.hat.show&&b.push.apply(b,ee(Py({item:m,boxWidth:p,boxPadding:h,rendWidth:v,rendHeight:y,flipXY:r})));var x={type:"container",data:g,collider:{type:"bounds"},children:b};u.push(x)}return u}({items:s.items,settings:u,width:t,height:n,flipXY:r,resolved:s,keys:ky})}},Fy="unclassified",_y="equal-equal",Hy="equal-higher",Vy="equal-lower",By="equal-void",zy="higher-equal",Yy="higher-higher-acute",Uy="higher-higher-obtuse",Wy="higher-lower-negative",Xy="higher-lower-positive",Gy="higher-void",Ky="lower-equal",$y="lower-higher-negative",Jy="lower-higher-positive",Zy="lower-lower-acute",Qy="lower-lower-obtuse",eg="lower-void",tg="void-equal",ng="void-higher",rg="void-lower",ig="void-void";function og(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function ag(e,t,n){var r=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),i=Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)),o=Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function sg(e){var t=e.previous,n=e.current,r=e.next,i=t&&t.value,o=n&&n.value,a=r&&r.value;return t||r?t?r?i===o?o===a?_y:o<a?Hy:Vy:o===a?i>o?zy:Ky:i>o?o<a?ag(t,n,r)>90?Uy:Yy:og(t,n)>og(t,r)?Xy:Wy:o>a?ag(t,n,r)>90?Qy:Zy:og(t,n)>og(t,r)?Jy:$y:i===o?By:i>o?Gy:eg:o===a?tg:o<a?ng:rg:ig}function ug(e){var t=e.bounds,n=e.size,r=t.x,i=t.y,o=t.width,a=t.height;return"center"===n.insideStrategy?Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=n.width&&Math.floor(i+a/2)>=0&&Math.ceil(i+a/2)<=n.height:Math.floor(r+o)>0&&Math.ceil(r)<n.width&&Math.floor(i+a/2)>=0&&Math.ceil(i+a/2)<=n.height}var lg=1,cg=0;function fg(e){var t=e.node,n=e.line,r=e.groupIndex,i=e.extract,o=e.style,a=e.measureText,s=e.size,u=e.horizontal,l=e.rtl,c=e.meta,f=e.showLabel,d=i.label(t.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;var m=a({fontFamily:o.fontFamily,fontSize:o.fontSize,text:d}),p=t.localBounds,h=t.attrs["stroke-width"],v=i.pointValue(t.data),y={x:p.x+p.width/2,y:p.y+p.height/2,width:m.width+2*lg,height:m.height+2*cg},g="".concat(y.x,"-").concat(y.y),b=!u&&!l,x=u?s.height:s.width,M=(u?y.y:y.x)/x,S=(b?1-M:M)<=(x<=200?.25:.1),E={key:g,node:t,line:n,group:r,value:v,labelMeasurements:m,bounds:y,inside:ug({bounds:p,size:s}),border:h?h/2:0,classification:Fy,setClassification:function(e){E.classification=e},preferences:[],setPreferences:function(e){var t;(t=E.preferences).push.apply(t,ee(e))},placement:void 0,setPlacement:function(e){E.placement=e},duplicate:!1,setDuplicate:function(){E.duplicate=!0},extreme:c.getExtreme(g),minority:c.getMinority(g),elite:S,show:f(t)};return E}function dg(e){var t=e.nodes,n=e.extract,r=e.style,i=e.measureText,o=e.size,a=e.horizontal,s=e.rtl,u=e.showLabel,l=function(e){var t=e.nodes,n=e.size,r=e.horizontal,i={top:[],right:[],bottom:[],left:[]},o=r?n.height:n.width,a=r?"y":"x",s=ee([.2,.4,.6,.8,1].map((function(e){return{threshold:e*o,count:0,distribution:0}}))),u={},l=t.map((function(e){for(var n=e.localBounds,r={x:n.x+n.width/2,y:n.y+n.height/2},i="".concat(r.x,"-").concat(r.y),o=0;o<s.length;o++){var l=s[o];if(r[a]<l.threshold||o===s.length-1){l.count++,l.distribution=l.count/t.length,u[i]=o;break}}return{key:i,center:r}})),c=l.reduce((function(e,t){return(!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e}),{});return i.top=l.filter((function(e){return e.center.y===c.top.center.y})).map((function(e){return e.key})),i.right=l.filter((function(e){return e.center.x===c.right.center.x})).map((function(e){return e.key})),i.bottom=l.filter((function(e){return e.center.y===c.bottom.center.y})).map((function(e){return e.key})),i.left=l.filter((function(e){return e.center.x===c.left.center.x})).map((function(e){return e.key})),{getExtrema:function(e){return{top:-1!==i.top.indexOf(e),right:-1!==i.right.indexOf(e),bottom:-1!==i.bottom.indexOf(e),left:-1!==i.left.indexOf(e)}},getExtreme:function(e){return[i.top,i.right,i.bottom,i.left].some((function(t){return-1!==t.indexOf(e)}))},getMinority:function(e){return s[u[e]].distribution<1}}}({nodes:t,size:o,horizontal:a});return function(e){var t=e.nodes,n=e.by,r=e.lineIndex,i=t.reduce((function(e,t,i){var o=n(t.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:t,line:t.data[r].value}),e}),{});return Object.keys(i).map((function(e){return i[e]})).sort((function(e,t){return e.index-t.index})).map((function(e){return e.items}))}({nodes:t,by:n.majorValue,lineIndex:n.lineIndex}).map((function(e,t){return e.map((function(e){return{line:e.line,item:fg({node:e.node,line:e.line,groupIndex:t,extract:n,style:r,measureText:i,size:o,horizontal:a,rtl:s,meta:l,showLabel:u})}})).filter((function(e){return e.item})).reduce((function(e,t){return e[t.line]=t.item,e}),{})})).filter((function(e){return Object.keys(e).length}))}var mg,pg={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},hg=(Y(mg={},_y,[pg.TOP,pg.BOTTOM]),Y(mg,Hy,[pg.BOTTOM,pg.BOTTOM_RIGHT]),Y(mg,Vy,[pg.TOP,pg.TOP_RIGHT]),Y(mg,By,[pg.TOP,pg.BOTTOM]),Y(mg,zy,[pg.LEFT,pg.BOTTOM_LEFT,pg.TOP,pg.TOP_RIGHT]),Y(mg,Yy,[pg.BOTTOM,pg.BOTTOM_LEFT,pg.LEFT,pg.TOP_RIGHT]),Y(mg,Uy,[pg.BOTTOM,pg.TOP]),Y(mg,Wy,[pg.TOP,pg.TOP_RIGHT,pg.RIGHT]),Y(mg,Xy,[pg.BOTTOM,pg.BOTTOM_LEFT,pg.LEFT]),Y(mg,Gy,[pg.TOP]),Y(mg,Ky,[pg.TOP]),Y(mg,$y,[pg.TOP,pg.TOP_LEFT]),Y(mg,Jy,[pg.BOTTOM_RIGHT]),Y(mg,Zy,[pg.TOP,pg.TOP_LEFT,pg.LEFT,pg.TOP_RIGHT,pg.RIGHT]),Y(mg,Qy,[pg.TOP,pg.BOTTOM]),Y(mg,eg,[pg.TOP]),Y(mg,tg,[pg.TOP]),Y(mg,ng,[pg.TOP,pg.BOTTOM]),Y(mg,rg,[pg.TOP,pg.BOTTOM,pg.LEFT]),Y(mg,ig,[pg.TOP]),mg);function vg(e){var t=dg({nodes:e.nodes,extract:e.extract,style:e.style,measureText:e.measureText,size:e.size,horizontal:e.horizontal,rtl:e.rtl,showLabel:e.showLabel}),n=ee(t.reduce((function(e,t){return e.push.apply(e,ee(Object.keys(t).map((function(e){return t[e]})))),e}),[])),r=n.reduce((function(e,t){return e[t.line]||(e[t.line]=0),e[t.line]++,e}),{}),i=Math.max.apply(Math,ee(Object.keys(r).map((function(e){return r[e]})))),o=t.map((function(e){return Object.keys(e).map((function(t){return e[t]}))})),a={getItems:function(){return n},getMaxLineDensity:function(){return i},getLocalLines:function(e){var t=e.index,n=e.reach;return function(e){for(var t=e.groups,n=e.index,r=e.reach,i={},o=n-r;o<=n+r;o++){var a=t[o];if(a)for(var s=0;s<a.length;s++){var u=a[s],l=u.line;i[l]||(i[l]=[]),i[l].push(u.bounds)}}for(var c=Object.keys(i).map((function(e){return i[e]})),f=[],d=0;d<c.length;d++)for(var m=0;m<c[d].length-1;m++){var p=c[d][m],h=c[d][m+1],v={x1:p.x,y1:p.y,x2:h.x,y2:h.y};f.push(v)}return{lines:f}}({groups:o,index:t,reach:n}).lines}};return function(e){for(var t=e.groups,n=function(e){for(var n=Object.keys(t[e]).map((function(n){return t[e][n]})),r=0;r<n.length;r++){var i=n[r],o=sg({previous:t[e-1]&&t[e-1][i.line],current:i,next:t[e+1]&&t[e+1][i.line]});i.setClassification(o)}},r=0;r<t.length;r++)n(r)}({groups:t}),a.getItems().forEach((function(e){return e.setPreferences(hg[e.classification])})),a}function yg(e){var t=e.item,n=e.placement,r=e.size;return n.x>=0-r.edgeBleed.left&&n.x<=r.width-t.bounds.width+r.edgeBleed.right&&n.y>=0-r.edgeBleed.top&&n.y<=r.height-t.bounds.height}function gg(e){var t=e.line1,n=e.line2,r=(n.y2-n.y1)*(t.x2-t.x1)-(n.x2-n.x1)*(t.y2-t.y1);if(0===r)return!1;var i=((n.x2-n.x1)*(t.y1-n.y1)-(n.y2-n.y1)*(t.x1-n.x1))/r,o=((t.x2-t.x1)*(t.y1-n.y1)-(t.y2-t.y1)*(t.x1-n.x1))/r;return i>=0&&i<=1&&o>=0&&o<=1}function bg(e){var t=e.candidate,n=e.lines,r=e.rects;return!!n.some((function(e){return function(e){var t=e.line,n=e.rect,r={x:n.x,y:n.y},i={x:n.x+n.width,y:n.y},o={x:n.x+n.width,y:n.y+n.height},a={x:n.x,y:n.y+n.height},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},u={x1:o.x,y1:o.y,x2:a.x,y2:a.y},l={x1:a.x,y1:a.y,x2:r.x,y2:r.y};return gg({line1:t,line2:{x1:r.x,y1:r.y,x2:i.x,y2:i.y}})||gg({line1:t,line2:s})||gg({line1:t,line2:u})||gg({line1:t,line2:l})}({line:e,rect:t})}))||r.some((function(e){return function(e){var t=e.rect1,n=e.rect2;return!(n.x>t.x+t.width||n.x+n.width<t.x||n.y>t.y+t.height||n.y+n.height<t.y)}({rect1:e,rect2:t})}))}var xg={x:0,width:0,y:0,height:0};var Mg=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width/2,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},Sg=function(e){var t=e.item;return{x:t.bounds.x,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},Eg=function(e){var t=e.item;return{x:t.bounds.x+t.node.localBounds.width/2+t.border,y:t.bounds.y-t.bounds.height/2}},Cg=function(e){var t=e.item;return{x:t.bounds.x,y:t.bounds.y+t.node.localBounds.height/2+t.border}},qg=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width/2,y:t.bounds.y+t.node.localBounds.height/2+t.border}},Og=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width,y:t.bounds.y+t.node.localBounds.height/2+t.border}},Ag=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width-t.node.localBounds.width/2-t.border,y:t.bounds.y-t.bounds.height/2}},Dg=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}};var Ng=2.5,Ig=4,Tg=[pg.TOP,pg.TOP_LEFT,pg.TOP_RIGHT],wg=[pg.BOTTOM,pg.BOTTOM_LEFT,pg.BOTTOM_RIGHT];function Lg(e){var t=e.position,n={x:Ng,width:-2*Ng,y:0,height:0},r=Tg.indexOf(t)>-1,i=wg.indexOf(t)>-1;return r&&(n.y=Ig,n.height=-Ig),i&&(n.height=-Ig),n}function kg(e){var t=e.cx,n=e.cy,r=e.r,i=e.degrees*(Math.PI/180);return{x:Math.round(t+r*Math.sin(i)),y:Math.round(n+r*-Math.cos(i))}}function Rg(e){var t=e.coordinates,n=e.degrees,r=e.item,i={x:t.x,y:t.y};return n<=90?i.y-=r.bounds.height:n>180&&n<=270?i.x-=r.bounds.width:n>270&&(i.y-=r.bounds.height,i.x-=r.bounds.width),i}function Pg(e){for(var t=e.item,n=e.validator,r=e.force,i=void 0!==r&&r,o=function(e){return[e.item.node.localBounds.height/2*Math.sqrt(2)]}({item:t}),a=t.bounds.x,s=t.bounds.y,u=0;u<o.length;u++){for(var l=o[u],c=40;c<=180;c+=15){var f=Rg({coordinates:kg({cx:a,cy:s,r:l,degrees:c}),degrees:c,item:t});if(n({item:t,placement:f,ignoreLines:i}).valid)return f}for(var d=320;d>180;d-=15){var m=Rg({coordinates:kg({cx:a,cy:s,r:l,degrees:d}),degrees:d,item:t});if(n({item:t,placement:m,ignoreLines:i}).valid)return m}}return!1}function jg(e){for(var t,n=e.item,r=e.validator,i=e.force,o=void 0!==i&&i,a=[].concat(ee(n.preferences),ee(Object.keys(pg).map((function(e){return pg[e]})).filter((function(e){return-1===n.preferences.indexOf(e)})))),s=(Y(t={},pg.TOP,Mg),Y(t,pg.TOP_RIGHT,Sg),Y(t,pg.RIGHT,Eg),Y(t,pg.BOTTOM_RIGHT,Cg),Y(t,pg.BOTTOM,qg),Y(t,pg.BOTTOM_LEFT,Og),Y(t,pg.LEFT,Ag),Y(t,pg.TOP_LEFT,Dg),t),u=[],l=0;l<a.length;l++){var c=a[l],f=s[c]({item:n}),d=Lg({position:c}),m=r({item:n,placement:f,adjustment:d,ignoreLines:o});if(o&&m.inside&&u.push(f),m.valid)return f}var p=function(){return Pg({item:n,validator:r,force:o})};if(o){var h=p();return h||(u[0]||undefined)}return(n.extreme||n.elite)&&p()||undefined}function Fg(e){var t=e.model,n=e.itemSize,r=e.connect,i=e.size,o=e.all,a={},s=function(e){return e.model.getItems().length>1e3}({model:t}),u=function(e){var t=e.model,n=e.itemSize,r=e.connect,i=e.size,o=t.getItems(),a=Math.max.apply(Math,ee(o.map((function(e){return e.labelMeasurements.width})))),s=n||i.width/o.length,u=Math.ceil(a/s)+1;return r?Math.max(u,t.getMaxLineDensity()):u}({model:t,itemSize:n,connect:r,size:i}),l=t.getItems(),c=ee(l.map((function(e){return{x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2}}))),f=[];l.forEach((function(e){var n=e.node.data;if(!(!e.show||!e.inside||n.null&&n.null.value||n.interpolated&&n.interpolated.value)&&(!s||e.minority)){var r=e.key;if(a[r])e.setDuplicate();else{a[r]=!0;var l=function(e){var t=e.size,n=e.lines,r=e.placements;return function(e){var i=e.item,o=e.placement,a=e.adjustment,s=void 0===a?xg:a,u=e.ignoreLines,l=void 0!==u&&u,c={inside:yg({item:i,placement:o,size:t}),collides:!0,valid:!1};return c.inside?(c.collides=bg({candidate:{x:o.x+s.x,y:o.y+s.y,width:i.bounds.width+s.width,height:i.bounds.height+s.height},lines:l?[]:n,rects:r}),c.valid=c.inside&&!c.collides,c):c}}({size:i,lines:t.getLocalLines({index:e.group,reach:u}),placements:c}),d=jg({item:e,validator:l});d?(d.height=e.bounds.height,d.width=e.bounds.width,c.push(d),e.setPlacement(d)):o&&f.push({item:e,validator:l})}}})),f.forEach((function(e){var t=e.item,n=jg({item:t,validator:e.validator,force:!0});n&&(n.height=t.bounds.height,n.width=t.bounds.width,c.push(n),t.setPlacement(n))}))}var _g={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,itemSize:function(){},connect:!1,all:!1,label:function(){},showLabel:function(){return!0},pointValue:function(){},majorValue:function(){},target:{labelSpace:"label-space-component",point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge"},style:{fontFamily:"QlikView Sans, sans-serif",fontSize:"12px",fill:"#333"}},preferredSize:function(){var e={edgeBleed:{top:0,right:0,left:0}},t=this.chart.component(this.settings.settings.target.labelSpace);if(!t||!t.rect)return e;var n=this.settings.settings,r=n.orientation,i=n.rtl,o="horizontal"===r;if(t.show(i)){var a=t.settings.settings.size;e.edgeBleed.top=o?a:0,e.edgeBleed[i?"left":"right"]=o?0:a}return e},render:function(){var e=this;if(!this.chart.component(this.settings.settings.target.point))return[];var t=this.settings.settings.target.allPoints.length?function(t){return e.settings.settings.target.allPoints.includes(t.key)}:function(t){return t.key===e.settings.settings.target.point},n=this.chart.findShapes("circle").filter(t);if(!n.length)return[];var r=this.settings.settings,i={label:r.label,pointValue:r.pointValue,majorValue:r.majorValue,lineIndex:r.lineIndex},o=this.rect,a={height:o.height,width:o.width,edgeBleed:o.edgeBleed,insideStrategy:r.insideStrategy},s=this.style,u=vg({nodes:n,extract:i,style:s,measureText:this.renderer.measureText,size:a,horizontal:"horizontal"===r.orientation,rtl:r.rtl,showLabel:r.showLabel});return{model:u}.model.getItems().sort((function(e,t){return e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1})),Fg({model:u,itemSize:r.itemSize(),connect:r.connect,size:a,all:r.all}),u.getItems().filter((function(t){return t.placement&&t.node.key===e.settings.settings.target.point})).map((function(e){return{type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:s.fontSize,fontFamily:s.fontFamily,fill:s.fill,text:i.label(e.node.data),baseline:"central",anchor:"middle"}}))}},Hg={defaultSettings:{settings:{size:10}},preferredSize:function(){return this.settings.settings.size},render:function(){return[]}};var Vg={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:function(){},secondaryExtremum:function(){},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize:function(){return this.settings.settings.size},render:function(){var e=this,t=this.data.items,n=void 0===t?[]:t;if(!n.length)return[];var r=this.settings.settings,i=r.type,o=r.orientation,a=r.rtl,s=r.markerOffset,u=r.size,l=r.major,c=r.primarySeries,f=r.secondarySeries,d=this.settings.settings.primaryExtremum(),m=this.settings.settings.secondaryExtremum(),p=c.length&&void 0!==d,h=f.length&&void 0!==m;if(!p&&!h)return[];var v=c.map((function(e){return e.ref})),y=f.map((function(e){return e.ref})),g=function(e){var t=e.type,n=e.primaryExtremum,r=e.secondaryExtremum,i=e.primaryItems,o=void 0===i?[]:i,a=e.secondaryItems,s=void 0===a?[]:a,u=e.primarySeries,l=void 0===u?[]:u,c=e.secondarySeries,f=void 0===c?[]:c,d=[];return[].concat(ee(l),ee(f)).forEach((function(e){var i=e.isPrimary?n:r,a=e.isPrimary?o:s;d.push(function(e){var t=e.type,n=e.extremum,r=e.separateStacking,i=e.items,o="max"===t?function(e){return e>n}:function(e){return e<n},a=r?function(e){return o(e.point.value<0?e.start.value:e.end.value)}:function(e){return o(e.end.value)};return i.filter(a)}({type:t,extremum:i,items:a}))})),function(e){var t=e.items,n=[],r=[];return t.forEach((function(e){var t=e.major.value;n[t]||(n[t]=!0,r.push(e))})),r}({items:d.reduce((function(e,t){return e.concat(t)}),[])})}({type:i,primaryExtremum:d,secondaryExtremum:m,primaryItems:n.filter((function(e){return v.includes(e.end.source.field)})),secondaryItems:n.filter((function(e){return y.includes(e.end.source.field)})),primarySeries:c,secondarySeries:f});if(!g.length)return[];var b="horizontal"===o,x=this.rect[b?"width":"height"],M=this.resolver.resolve({data:{items:g},settings:{major:l},scaled:{major:x}}),S=("max"===i?90:-90)-(b?0:90)-(!b&&a?180:0),E=u/2*s,C=this.settings.style.fill;return M.items.map((function(t){return(0,(n={symbol:e.symbol,size:u,fill:C,startAngle:S,x:b?x*t.major:E,y:b?E:x*t.major,data:t.data}).symbol)({type:"n-polygon",show:!0,size:n.size,fill:n.fill,stroke:"#205891",strokeWidth:0,sides:3,startAngle:n.startAngle,width:.7,x:n.x,y:n.y,data:n.data});var n}))}};function Bg(e){var t=e.x,n=e.y,r=e.size,i=e.stroke,o=e.strokeWidth,a=e.fill;return{type:"container",children:[{type:"line",stroke:i||a,strokeWidth:o,x1:t-r/2,y1:n,x2:t+r/2,y2:n},{type:"circle",strokeWidth:0,fill:a,cx:t,cy:n,r:.25*r}]}}function zg(e){var t=e.chart,n=e.seriesInfo,r={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},i=[].concat(ee(n.primary.map((function(e){return e.key}))),ee(n.secondary.map((function(e){return e.key}))));return t.findShapes("path").filter((function(e){return i.some((function(t){return t===e.key}))})).reduce((function(e,t){return(n.primary.some((function(e){return e.key===t.key}))?e.primary:e.secondary).paths.push(t),e}),r),{getLine:function(e,t){var n=t?r.primary:r.secondary;if(!n.map[e]){var i=Q(n.paths.filter((function(t){return t.data&&t.data.typeIndex.value===e})),1)[0];n.map[e]=i}return n.map[e]}}}function Yg(e){var t=e.brush.brush.values();return function(e){var n=e.value;return-1!==t.indexOf(n)}}function Ug(e){var t=e.brush,n=e.chart,r=t.brush.ranges();if(!r.length)return!1;var i=n&&n.scale(ka.SCALE.MAJOR),o=i&&i.max&&i.max(),a="qHyperCube/qDimensionInfo/0:numeric"===t.id?function(e,t){return t===o?e<=t:e<t}:function(e,t){return e<=t};return function(e){var t=e.value;return r.some((function(e){return e.min<=t&&a(t,e.max)}))}}function Wg(e){var t=e.brush,n=e.selectionInfo,r=e.items,i=e.selectionValues,o=e.colorByData,a=e.chart,s=t.brushes();if(!s.length)return[];var u=s[0],l=n.minorRange,c=n.legendRange,f=n.legendTap,d=0===u.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":u.id,m=[c?function(e){return e.color.value}:i[d]].filter(Boolean);if(o&&l&&m.push((function(e){return e.color.value})),!o&&f&&(m=[function(e){return e.color.value}]),!m.length)return[];var p=function(e){var t=e.brush,n=e.chart;return("value"===t.type?Yg:Ug)({brush:t,chart:n})}({brush:u,chart:a});return p?r.reduce((function(e,t,n){return m.some((function(e){return p({value:e(t)})}))&&e.push({item:t,index:n}),e}),[]):[]}function Xg(e){var t=e.chart,n=e.selected,r=e.connection,i=e.gradient,o=e.fallback,a=t.scale(ka.SCALE.COLOR),s=n.filter((function(e){return-1!==r.indexOf(e.index)})).map((function(e){return e.item.end.value})),u=Math.min.apply(Math,ee(s)),l=Math.max.apply(Math,ee(s)),c=l-u,f=0===c?1:c,d=a.domain().map((function(e){return{color:a(Math.min(l,Math.max(u,e)))||o,offset:Math.min(1,Math.max(0,(e-u)/f))}})),m=d.map((function(e){return e.offset})),p=m.lastIndexOf(0),h=m.indexOf(1),v=d.slice(-1===p?0:p,-1===h?d.length:h+1);return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:v}}function Gg(e){for(var t=e.chart,n=e.selected,r=e.connection,i=e.gradient,o=e.fallback,a=t.scale(ka.SCALE.COLOR),s=n.filter((function(e){return-1!==r.indexOf(e.index)})).map((function(e){return e.item.end.value})),u=Math.min.apply(Math,ee(s)),l=Math.max.apply(Math,ee(s))-u,c=0===l?1:l,f=a.domain(),d=[],m=0;m<f.length-1;m++){var p=f[m],h=a(p)||o;d.push({color:h,offset:Math.min(1,Math.max(0,(p-u)/c))});var v=f[m+1];d.push({color:h,offset:Math.min(1,Math.max(0,(v-u)/c))})}var y=d.map((function(e){return e.offset})),g=y.lastIndexOf(0),b=y.indexOf(1),x=d.slice(-1===g?0:g,-1===b?d.length:b+1);return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:x}}function Kg(e){var t=e.property,n=e.chart,r=e.connection,i=e.attrs,o=e.colorSettings,a=e.colorByData,s=e.selected,u=e.hasMultipleMeasures,l=e.groupedByMeasure,c=e.itemsPerGroup,f=e.orientation,d=e.rtl,m=i[t];if("gradient"!==m.type)return m;var p=o.type,h=o.nil;return u||!a?function(e){for(var t=e.chart,n=e.selected,r=e.connection,i=e.gradient,o=e.fallback,a=e.orientation,s=e.isColorCode,u=e.groupedByMeasure,l=e.itemsPerGroup,c=e.rtl,f=t.scale(ka.SCALE.MAJOR),d=t.scale(ka.SCALE.COLOR),m=u?function(e){return f([e,0])+f.bandwidth()*l/2}:function(e){return f(e)},p=n.filter((function(e){return-1!==r.indexOf(e.index)})),h=("vertical"===a&&c?p.reverse():p).map((function(e){return e.item})),v=h.map((function(e){return m(e.major.value)})),y=Math.min.apply(Math,ee(v)),g=Math.max.apply(Math,ee(v))-y,b=0===g?1:g,x=v.map((function(e,t){return 0===t?0:t===v.length-1?1:(e-y)/b})),M=[],S=0;S<h.length;S++){var E=h[S],C=s?E.color.value:d(E.color.value)||o,q=x[S];M.push({color:C,offset:0===S?0:Math.max(0,M[M.length-1].offset)}),M.push({color:C,offset:S===h.length-1?1:Math.max(0,parseFloat((q+(x[S+1]-q)/2).toFixed(5)))})}return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:M}}({chart:n,selected:s,connection:r,gradient:m,fallback:h,orientation:f,isColorCode:"color"===p,groupedByMeasure:l,itemsPerGroup:c,rtl:d}):("continuous"===p?Xg:Gg)({chart:n,selected:s,connection:r,gradient:m,fallback:h})}function $g(e){var t=e.chart,n=e.pathModel,r=e.colorSettings,i=e.colorByData,o=e.hasMultipleMeasures,a=e.groupedByMeasure,s=e.itemsPerGroup,u=e.orientation,l=e.lineKey,c=e.primary,f=e.selected,d=e.connections,m=e.rtl,p=e.count,h=n.getLine(l,c).attrs,v=function(e){return e.d.replace("Z","").split(/(?=[LMC])/).map((function(e){var t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");if("M"===t||"L"===t){var i=Q(r,1);n.x=i[0];var o=Q(r,2);n.y=o[1]}else if("C"===t){var a=Q(r,5);n.x=a[4];var s=Q(r,6);n.y=s[5]}return n}))}({d:h.d});return d.map((function(e){return function(e){var t=e.chart,n=e.colorSettings,r=e.colorByData,i=e.hasMultipleMeasures,o=e.groupedByMeasure,a=e.itemsPerGroup,s=e.orientation,u=e.selected,l=e.connection,c=e.commands,f=e.attrs,d=e.rtl,m=e.count;return{path:l.map((function(e,t){var n=c[e];return 0!==t||"M"===n.letter?n.raw:"M".concat(n.x,",").concat(n.y)})).join(""),attrs:f,stroke:Kg({property:"stroke",chart:t,connection:l,attrs:f,selected:u,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,rtl:d,count:m})}}({chart:t,colorSettings:r,colorByData:i,hasMultipleMeasures:o,groupedByMeasure:a,itemsPerGroup:s,orientation:u,selected:f,connection:e,commands:v,attrs:h,rtl:m,count:p})}))}function Jg(e){var t=e.chart,n=e.pathModel,r=e.seriesInfo,i=e.brush,o=e.selectionInfo,a=e.items,s=e.selectionValues,u=e.colorSettings,l=e.colorByData,c=e.hasMultipleMeasures,f=e.groupedByMeasure,d=e.itemsPerGroup,m=e.orientation,p=e.rtl,h=function(e){var t=e.items,n=e.seriesInfo,r=t.reduce((function(e,t,r){var i,o=t.typeIndex.value;return e[o]||(e[o]={key:o,items:[],index:r,measureIx:null===(i=t.colorMeasureIdx)||void 0===i?void 0:i.value,primary:n.primary.some((function(e){return e.typeIndex===o}))}),e[o].items.push(t),e}),{});return Object.keys(r).map((function(e){return r[e]})).sort((function(e,t){return e.index-t.index})).map((function(e){return{lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx}}))}({items:function(e){var t=e.items,n=e.selectionInfo,r=e.seriesInfo;return t.filter((function(e){if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;var t=n.minorRange,i=n.minorRangePrimary;return!t||(i?r.primary:r.secondary).some((function(t){return t.typeIndex===e.typeIndex.value}))}))}({items:a,selectionInfo:o,seriesInfo:r}),seriesInfo:r}).reduce((function(e,r){var a,h=Wg({brush:i,selectionInfo:o,items:r.items,selectionValues:s,colorByData:l,chart:t});if(h.length<2)return e;var v=function(e){return e.selected.reduce((function(e,t){var n=t.index;if(e.length){var r=e[e.length-1];n===r[r.length-1]+1?r.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((function(e){return e.length>1}))}({selected:h});return v.length?((a=e.lines).push.apply(a,ee($g({chart:t,pathModel:n,colorSettings:u(r.measureIx),colorByData:l(r.measureIx),hasMultipleMeasures:c,groupedByMeasure:f,itemsPerGroup:d,orientation:m,lineKey:r.lineKey,primary:r.primary,selected:h,connections:v,rtl:p,count:r.items.length}))),e):e}),{lines:[]}).lines,v=[];return h.forEach((function(e){return v.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"})})),v}var Zg={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener:function(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners:function(){var e=this;this.state.listeners.forEach((function(t){return e.state.brush.removeListener(t.type,t.fn)})),this.state.listeners.length=0},created:function(){this.state={pathModel:zg({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted:function(){var e=this;this.addListener("update",(function(){e.state.selectionInfo=e.settings.settings.getSelectionInfo();var t=Jg({chart:e.chart,pathModel:e.state.pathModel,seriesInfo:e.settings.settings.seriesInfo,brush:e.state.brush,selectionInfo:e.state.selectionInfo,items:e.data.items,selectionValues:e.settings.settings.selectionValues,colorSettings:e.settings.settings.colorSettings,colorByData:e.settings.settings.colorByData,isColorCode:e.settings.settings.isColorCode,hasMultipleMeasures:e.settings.settings.hasMultipleMeasures,groupedByMeasure:e.settings.settings.groupedByMeasure,itemsPerGroup:e.settings.settings.itemsPerGroup,orientation:e.settings.settings.orientation,rtl:e.settings.settings.rtl});e.renderer.render(t)})),this.addListener("end",(function(){e.renderer.render([])}))},render:function(){return this.state.pathModel=zg({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo(),Jg({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed:function(){this.removeListeners()}},Qg="QlikView Sans, sans-serif",eb=[["object.comboChart","","fontFamily"],["object.comboChart","outOfRange","color","#999"],["object.comboChart","axis.title","color"],["object.comboChart","axis.title","fontSize","13px"],["object.comboChart","axis.title","fontFamily",Qg],["object.comboChart","axis.label.name","color","#595959"],["object.comboChart","axis.label.name","fontSize","12px"],["object.comboChart","axis.label.name","fontFamily",Qg],["object.comboChart","axis.line.major","color","#cccccc"],["object.comboChart","axis.line.minor","color","#e6e6e6"],["object.comboChart","label.value","fontFamily",Qg],["object.comboChart","label.value","fontSize","12px"],["object.comboChart","label.value","numFontSize","12px",function(e){return parseInt(e,10)}],["object.comboChart","label.value","color","#595959"],[!1,"label.value","lightColor","#E6E6E6"],[!1,"label.value","darkColor","#595959"]];var tb={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},nb=function(e){return void 0===e.marker?tb.circle:tb[e.marker]},rb=function(e){return void 0===e.markerFill||e.markerFill};function ib(e){var t=e.series,n=e.layoutService;switch(vp(t)){case Ra.TYPE.MARKER:return function(e){return{marker:nb(e),fill:rb(e)}}(t);case Ra.TYPE.LINE:return function(e){var t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}}(n);default:return{}}}function ob(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ra.NOPE_SERIES,t=arguments.length>1?arguments[1]:void 0;return t?e.axis===Ra.AXIS.PRIMARY:e.axis===Ra.AXIS.PRIMARY||vp(e)===Ra.TYPE.BAR}var ab={exports:{}},sb={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},ub="object"===("undefined"==typeof process?"undefined":F(process))&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=console).error.apply(e,["SEMVER"].concat(n))}:function(){};!function(e,t){var n=sb.MAX_SAFE_COMPONENT_LENGTH,r=ub,i=(t=ab.exports={}).re=[],o=t.src=[],a=t.t={},s=0,u=function(e,t,n){var u=s++;r(u,t),a[e]=u,o[u]=t,i[u]=new RegExp(t,n?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION","(".concat(o[a.NUMERICIDENTIFIER],")\\.")+"(".concat(o[a.NUMERICIDENTIFIER],")\\.")+"(".concat(o[a.NUMERICIDENTIFIER],")")),u("MAINVERSIONLOOSE","(".concat(o[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[a.NUMERICIDENTIFIERLOOSE],")")),u("PRERELEASEIDENTIFIER","(?:".concat(o[a.NUMERICIDENTIFIER],"|").concat(o[a.NONNUMERICIDENTIFIER],")")),u("PRERELEASEIDENTIFIERLOOSE","(?:".concat(o[a.NUMERICIDENTIFIERLOOSE],"|").concat(o[a.NONNUMERICIDENTIFIER],")")),u("PRERELEASE","(?:-(".concat(o[a.PRERELEASEIDENTIFIER],"(?:\\.").concat(o[a.PRERELEASEIDENTIFIER],")*))")),u("PRERELEASELOOSE","(?:-?(".concat(o[a.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(o[a.PRERELEASEIDENTIFIERLOOSE],")*))")),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD","(?:\\+(".concat(o[a.BUILDIDENTIFIER],"(?:\\.").concat(o[a.BUILDIDENTIFIER],")*))")),u("FULLPLAIN","v?".concat(o[a.MAINVERSION]).concat(o[a.PRERELEASE],"?").concat(o[a.BUILD],"?")),u("FULL","^".concat(o[a.FULLPLAIN],"$")),u("LOOSEPLAIN","[v=\\s]*".concat(o[a.MAINVERSIONLOOSE]).concat(o[a.PRERELEASELOOSE],"?").concat(o[a.BUILD],"?")),u("LOOSE","^".concat(o[a.LOOSEPLAIN],"$")),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE","".concat(o[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),u("XRANGEIDENTIFIER","".concat(o[a.NUMERICIDENTIFIER],"|x|X|\\*")),u("XRANGEPLAIN","[v=\\s]*(".concat(o[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIER],")")+"(?:".concat(o[a.PRERELEASE],")?").concat(o[a.BUILD],"?")+")?)?"),u("XRANGEPLAINLOOSE","[v=\\s]*(".concat(o[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(o[a.PRERELEASELOOSE],")?").concat(o[a.BUILD],"?")+")?)?"),u("XRANGE","^".concat(o[a.GTLT],"\\s*").concat(o[a.XRANGEPLAIN],"$")),u("XRANGELOOSE","^".concat(o[a.GTLT],"\\s*").concat(o[a.XRANGEPLAINLOOSE],"$")),u("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),u("COERCERTL",o[a.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM","(\\s*)".concat(o[a.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",u("TILDE","^".concat(o[a.LONETILDE]).concat(o[a.XRANGEPLAIN],"$")),u("TILDELOOSE","^".concat(o[a.LONETILDE]).concat(o[a.XRANGEPLAINLOOSE],"$")),u("LONECARET","(?:\\^)"),u("CARETTRIM","(\\s*)".concat(o[a.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",u("CARET","^".concat(o[a.LONECARET]).concat(o[a.XRANGEPLAIN],"$")),u("CARETLOOSE","^".concat(o[a.LONECARET]).concat(o[a.XRANGEPLAINLOOSE],"$")),u("COMPARATORLOOSE","^".concat(o[a.GTLT],"\\s*(").concat(o[a.LOOSEPLAIN],")$|^$")),u("COMPARATOR","^".concat(o[a.GTLT],"\\s*(").concat(o[a.FULLPLAIN],")$|^$")),u("COMPARATORTRIM","(\\s*)".concat(o[a.GTLT],"\\s*(").concat(o[a.LOOSEPLAIN],"|").concat(o[a.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE","^\\s*(".concat(o[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(o[a.XRANGEPLAIN],")")+"\\s*$"),u("HYPHENRANGELOOSE","^\\s*(".concat(o[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(o[a.XRANGEPLAINLOOSE],")")+"\\s*$"),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0.0.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}(0,ab.exports);var lb=["includePrerelease","loose","rtl"],cb=function(e){return e?"object"!==F(e)?{loose:!0}:lb.filter((function(t){return e[t]})).reduce((function(e,t){return e[t]=!0,e}),{}):{}},fb=/^[0-9]+$/,db=function(e,t){var n=fb.test(e),r=fb.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},mb={compareIdentifiers:db,rcompareIdentifiers:function(e,t){return db(t,e)}},pb=ub,hb=sb.MAX_LENGTH,vb=sb.MAX_SAFE_INTEGER,yb=ab.exports.re,gb=ab.exports.t,bb=cb,xb=mb.compareIdentifiers,Mb=function(){function e(t,n){if(V(this,e),n=bb(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>hb)throw new TypeError("version is longer than ".concat(hb," characters"));pb("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=t.trim().match(n.loose?yb[gb.LOOSE]:yb[gb.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>vb||this.major<0)throw new TypeError("Invalid major version");if(this.minor>vb||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>vb||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<vb)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}return z(e,[{key:"format",value:function(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}},{key:"toString",value:function(){return this.version}},{key:"compare",value:function(t){if(pb("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}},{key:"compareMain",value:function(t){return t instanceof e||(t=new e(t,this.options)),xb(this.major,t.major)||xb(this.minor,t.minor)||xb(this.patch,t.patch)}},{key:"comparePre",value:function(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var n=0;do{var r=this.prerelease[n],i=t.prerelease[n];if(pb("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return xb(r,i)}while(++n)}},{key:"compareBuild",value:function(t){t instanceof e||(t=new e(t,this.options));var n=0;do{var r=this.build[n],i=t.build[n];if(pb("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return xb(r,i)}while(++n)}},{key:"inc",value:function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}(),Sb=sb.MAX_LENGTH,Eb=ab.exports.re,Cb=ab.exports.t,qb=Mb,Ob=cb,Ab=function(e,t){if(t=Ob(t),e instanceof qb)return e;if("string"!=typeof e)return null;if(e.length>Sb)return null;if(!(t.loose?Eb[Cb.LOOSE]:Eb[Cb.FULL]).test(e))return null;try{return new qb(e,t)}catch(e){return null}},Db=Ab,Nb=function(e,t){var n=Db(e,t);return n?n.version:null},Ib=Ab,Tb=function(e,t){var n=Ib(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},wb=Mb,Lb=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new wb(e,n).inc(t,r).version}catch(e){return null}},kb=Mb,Rb=function(e,t,n){return new kb(e,n).compare(new kb(t,n))},Pb=Rb,jb=function(e,t,n){return 0===Pb(e,t,n)},Fb=Ab,_b=jb,Hb=function(e,t){if(_b(e,t))return null;var n=Fb(e),r=Fb(t),i=n.prerelease.length||r.prerelease.length,o=i?"pre":"",a=i?"prerelease":"";for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return o+s;return a},Vb=Mb,Bb=function(e,t){return new Vb(e,t).major},zb=Mb,Yb=function(e,t){return new zb(e,t).minor},Ub=Mb,Wb=function(e,t){return new Ub(e,t).patch},Xb=Ab,Gb=function(e,t){var n=Xb(e,t);return n&&n.prerelease.length?n.prerelease:null},Kb=Rb,$b=function(e,t,n){return Kb(t,e,n)},Jb=Rb,Zb=function(e,t){return Jb(e,t,!0)},Qb=Mb,ex=function(e,t,n){var r=new Qb(e,n),i=new Qb(t,n);return r.compare(i)||r.compareBuild(i)},tx=ex,nx=function(e,t){return e.sort((function(e,n){return tx(e,n,t)}))},rx=ex,ix=function(e,t){return e.sort((function(e,n){return rx(n,e,t)}))},ox=Rb,ax=function(e,t,n){return ox(e,t,n)>0},sx=Rb,ux=function(e,t,n){return sx(e,t,n)<0},lx=Rb,cx=function(e,t,n){return 0!==lx(e,t,n)},fx=Rb,dx=function(e,t,n){return fx(e,t,n)>=0},mx=Rb,px=function(e,t,n){return mx(e,t,n)<=0},hx=jb,vx=cx,yx=ax,gx=dx,bx=ux,xx=px,Mx=function(e,t,n,r){switch(t){case"===":return"object"===F(e)&&(e=e.version),"object"===F(n)&&(n=n.version),e===n;case"!==":return"object"===F(e)&&(e=e.version),"object"===F(n)&&(n=n.version),e!==n;case"":case"=":case"==":return hx(e,n,r);case"!=":return vx(e,n,r);case">":return yx(e,n,r);case">=":return gx(e,n,r);case"<":return bx(e,n,r);case"<=":return xx(e,n,r);default:throw new TypeError("Invalid operator: ".concat(t))}},Sx=Mb,Ex=Ab,Cx=ab.exports.re,qx=ab.exports.t,Ox=function(e,t){if(e instanceof Sx)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var r;(r=Cx[qx.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),Cx[qx.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;Cx[qx.COERCERTL].lastIndex=-1}else n=e.match(Cx[qx.COERCE]);return null===n?null:Ex("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),t)},Ax=Dx;function Dx(e){var t=this;if(t instanceof Dx||(t=new Dx),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}function Nx(e,t,n){var r=t===e.head?new wx(n,null,t,e):new wx(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function Ix(e,t){e.tail=new wx(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function Tx(e,t){e.head=new wx(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function wx(e,t,n,r){if(!(this instanceof wx))return new wx(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}Dx.Node=wx,Dx.create=Dx,Dx.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Dx.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Dx.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Dx.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)Ix(this,arguments[e]);return this.length},Dx.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)Tx(this,arguments[e]);return this.length},Dx.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Dx.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Dx.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},Dx.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},Dx.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},Dx.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},Dx.prototype.map=function(e,t){t=t||this;for(var n=new Dx,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},Dx.prototype.mapReverse=function(e,t){t=t||this;for(var n=new Dx,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},Dx.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},Dx.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},Dx.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},Dx.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},Dx.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new Dx;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;for(;null!==i&&r<t;r++,i=i.next)n.push(i.value);return n},Dx.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new Dx;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,i=this.tail;null!==i&&r>t;r--)i=i.prev;for(;null!==i&&r>e;r--,i=i.prev)n.push(i.value);return n},Dx.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n<e;n++)r=r.next;var i=[];for(n=0;r&&n<t;n++)i.push(r.value),r=this.removeNode(r);null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(n=0;n<(arguments.length<=2?0:arguments.length-2);n++)r=Nx(this,r,n+2<2||arguments.length<=n+2?void 0:arguments[n+2]);return i},Dx.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{!function(e){e.prototype[Symbol.iterator]=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}(Dx)}catch(Yd){}var Lx=Ax,kx=Symbol("max"),Rx=Symbol("length"),Px=Symbol("lengthCalculator"),jx=Symbol("allowStale"),Fx=Symbol("maxAge"),_x=Symbol("dispose"),Hx=Symbol("noDisposeOnSet"),Vx=Symbol("lruList"),Bx=Symbol("cache"),zx=Symbol("updateAgeOnGet"),Yx=function(){return 1},Ux=function(){function e(t){if(V(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[kx]=t.max||1/0;var n=t.length||Yx;if(this[Px]="function"!=typeof n?Yx:n,this[jx]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[Fx]=t.maxAge||0,this[_x]=t.dispose,this[Hx]=t.noDisposeOnSet||!1,this[zx]=t.updateAgeOnGet||!1,this.reset()}return z(e,[{key:"max",get:function(){return this[kx]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[kx]=e||1/0,Gx(this)}},{key:"allowStale",get:function(){return this[jx]},set:function(e){this[jx]=!!e}},{key:"maxAge",get:function(){return this[Fx]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[Fx]=e,Gx(this)}},{key:"lengthCalculator",get:function(){return this[Px]},set:function(e){var t=this;"function"!=typeof e&&(e=Yx),e!==this[Px]&&(this[Px]=e,this[Rx]=0,this[Vx].forEach((function(e){e.length=t[Px](e.value,e.key),t[Rx]+=e.length}))),Gx(this)}},{key:"length",get:function(){return this[Rx]}},{key:"itemCount",get:function(){return this[Vx].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var n=this[Vx].tail;null!==n;){var r=n.prev;Jx(this,e,n,t),n=r}}},{key:"forEach",value:function(e,t){t=t||this;for(var n=this[Vx].head;null!==n;){var r=n.next;Jx(this,e,n,t),n=r}}},{key:"keys",value:function(){return this[Vx].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[Vx].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[_x]&&this[Vx]&&this[Vx].length&&this[Vx].forEach((function(t){return e[_x](t.key,t.value)})),this[Bx]=new Map,this[Vx]=new Lx,this[Rx]=0}},{key:"dump",value:function(){var e=this;return this[Vx].map((function(t){return!Xx(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[Vx]}},{key:"set",value:function(e,t,n){if((n=n||this[Fx])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");var r=n?Date.now():0,i=this[Px](t,e);if(this[Bx].has(e)){if(i>this[kx])return Kx(this,this[Bx].get(e)),!1;var o=this[Bx].get(e).value;return this[_x]&&(this[Hx]||this[_x](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[Rx]+=i-o.length,o.length=i,this.get(e),Gx(this),!0}var a=new $x(e,t,i,r,n);return a.length>this[kx]?(this[_x]&&this[_x](e,t),!1):(this[Rx]+=a.length,this[Vx].unshift(a),this[Bx].set(e,this[Vx].head),Gx(this),!0)}},{key:"has",value:function(e){if(!this[Bx].has(e))return!1;var t=this[Bx].get(e).value;return!Xx(this,t)}},{key:"get",value:function(e){return Wx(this,e,!0)}},{key:"peek",value:function(e){return Wx(this,e,!1)}},{key:"pop",value:function(){var e=this[Vx].tail;return e?(Kx(this,e),e.value):null}},{key:"del",value:function(e){Kx(this,this[Bx].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),n=e.length-1;n>=0;n--){var r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{var o=i-t;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var e=this;this[Bx].forEach((function(t,n){return Wx(e,n,!1)}))}}]),e}(),Wx=function(e,t,n){var r=e[Bx].get(t);if(r){var i=r.value;if(Xx(e,i)){if(Kx(e,r),!e[jx])return}else n&&(e[zx]&&(r.value.now=Date.now()),e[Vx].unshiftNode(r));return i.value}},Xx=function(e,t){if(!t||!t.maxAge&&!e[Fx])return!1;var n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[Fx]&&n>e[Fx]},Gx=function(e){if(e[Rx]>e[kx])for(var t=e[Vx].tail;e[Rx]>e[kx]&&null!==t;){var n=t.prev;Kx(e,t),t=n}},Kx=function(e,t){if(t){var n=t.value;e[_x]&&e[_x](n.key,n.value),e[Rx]-=n.length,e[Bx].delete(n.key),e[Vx].removeNode(t)}},$x=function e(t,n,r,i,o){V(this,e),this.key=t,this.value=n,this.length=r,this.now=i,this.maxAge=o||0},Jx=function(e,t,n,r){var i=n.value;Xx(e,i)&&(Kx(e,n),e[jx]||(i=void 0)),i&&t.call(r,i.value,i.key,e)},Zx=Ux,Qx=function(){function e(t,n){var r=this;if(V(this,e),n=tM(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof nM)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((function(e){return r.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(t));if(this.set.length>1){var i=this.set[0];if(this.set=this.set.filter((function(e){return!cM(e[0])})),0===this.set.length)this.set=[i];else if(this.set.length>1){var o,a=re(this.set);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(1===s.length&&fM(s[0])){this.set=[s];break}}}catch(e){a.e(e)}finally{a.f()}}}this.format()}return z(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this;e=e.trim();var n=Object.keys(this.options).join(","),r="parseRange:".concat(n,":").concat(e),i=eM.get(r);if(i)return i;var o=this.options.loose,a=o?oM[aM.HYPHENRANGELOOSE]:oM[aM.HYPHENRANGE];e=e.replace(a,EM(this.options.includePrerelease)),rM("hyphen replace",e),e=e.replace(oM[aM.COMPARATORTRIM],sM),rM("comparator trim",e,oM[aM.COMPARATORTRIM]),e=(e=(e=e.replace(oM[aM.TILDETRIM],uM)).replace(oM[aM.CARETTRIM],lM)).split(/\s+/).join(" ");var s=o?oM[aM.COMPARATORLOOSE]:oM[aM.COMPARATOR],u=e.split(" ").map((function(e){return mM(e,t.options)})).join(" ").split(/\s+/).map((function(e){return SM(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(s)}:function(){return!0}).map((function(e){return new nM(e,t.options)}));u.length;var l,c=new Map,f=re(u);try{for(f.s();!(l=f.n()).done;){var d=l.value;if(cM(d))return[d];c.set(d.value,d)}}catch(e){f.e(e)}finally{f.f()}c.size>1&&c.has("")&&c.delete("");var m=ee(c.values());return eM.set(r,m),m}},{key:"intersects",value:function(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((function(e){return dM(e,n)&&t.set.some((function(t){return dM(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new iM(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(CM(this.set[t],e,this.options))return!0;return!1}}]),e}(),eM=new Zx({max:1e3}),tM=cb,nM=OM,rM=ub,iM=Mb,oM=ab.exports.re,aM=ab.exports.t,sM=ab.exports.comparatorTrimReplace,uM=ab.exports.tildeTrimReplace,lM=ab.exports.caretTrimReplace,cM=function(e){return"<0.0.0-0"===e.value},fM=function(e){return""===e.value},dM=function(e,t){for(var n=!0,r=e.slice(),i=r.pop();n&&r.length;)n=r.every((function(e){return i.intersects(e,t)})),i=r.pop();return n},mM=function(e,t){return rM("comp",e,t),e=yM(e,t),rM("caret",e),e=hM(e,t),rM("tildes",e),e=bM(e,t),rM("xrange",e),e=MM(e,t),rM("stars",e),e},pM=function(e){return!e||"x"===e.toLowerCase()||"*"===e},hM=function(e,t){return e.trim().split(/\s+/).map((function(e){return vM(e,t)})).join(" ")},vM=function(e,t){var n=t.loose?oM[aM.TILDELOOSE]:oM[aM.TILDE];return e.replace(n,(function(t,n,r,i,o){var a;return rM("tilde",e,t,n,r,i,o),pM(n)?a="":pM(r)?a=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):pM(i)?a=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):o?(rM("replaceTilde pr",o),a=">=".concat(n,".").concat(r,".").concat(i,"-").concat(o," <").concat(n,".").concat(+r+1,".0-0")):a=">=".concat(n,".").concat(r,".").concat(i," <").concat(n,".").concat(+r+1,".0-0"),rM("tilde return",a),a}))},yM=function(e,t){return e.trim().split(/\s+/).map((function(e){return gM(e,t)})).join(" ")},gM=function(e,t){rM("caret",e,t);var n=t.loose?oM[aM.CARETLOOSE]:oM[aM.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(function(t,n,i,o,a){var s;return rM("caret",e,t,n,i,o,a),pM(n)?s="":pM(i)?s=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):pM(o)?s="0"===n?">=".concat(n,".").concat(i,".0").concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".0").concat(r," <").concat(+n+1,".0.0-0"):a?(rM("replaceCaret pr",a),s="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(o,"-").concat(a," <").concat(n,".").concat(i,".").concat(+o+1,"-0"):">=".concat(n,".").concat(i,".").concat(o,"-").concat(a," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(o,"-").concat(a," <").concat(+n+1,".0.0-0")):(rM("no pr"),s="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(o).concat(r," <").concat(n,".").concat(i,".").concat(+o+1,"-0"):">=".concat(n,".").concat(i,".").concat(o).concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(o," <").concat(+n+1,".0.0-0")),rM("caret return",s),s}))},bM=function(e,t){return rM("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return xM(e,t)})).join(" ")},xM=function(e,t){e=e.trim();var n=t.loose?oM[aM.XRANGELOOSE]:oM[aM.XRANGE];return e.replace(n,(function(n,r,i,o,a,s){rM("xRange",e,n,r,i,o,a,s);var u=pM(i),l=u||pM(o),c=l||pM(a),f=c;return"="===r&&f&&(r=""),s=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(l&&(o=0),a=0,">"===r?(r=">=",l?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),"<"===r&&(s="-0"),n="".concat(r+i,".").concat(o,".").concat(a).concat(s)):l?n=">=".concat(i,".0.0").concat(s," <").concat(+i+1,".0.0-0"):c&&(n=">=".concat(i,".").concat(o,".0").concat(s," <").concat(i,".").concat(+o+1,".0-0")),rM("xRange return",n),n}))},MM=function(e,t){return rM("replaceStars",e,t),e.trim().replace(oM[aM.STAR],"")},SM=function(e,t){return rM("replaceGTE0",e,t),e.trim().replace(oM[t.includePrerelease?aM.GTE0PRE:aM.GTE0],"")},EM=function(e){return function(t,n,r,i,o,a,s,u,l,c,f,d,m){return n=pM(r)?"":pM(i)?">=".concat(r,".0.0").concat(e?"-0":""):pM(o)?">=".concat(r,".").concat(i,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":""),u=pM(l)?"":pM(c)?"<".concat(+l+1,".0.0-0"):pM(f)?"<".concat(l,".").concat(+c+1,".0-0"):d?"<=".concat(l,".").concat(c,".").concat(f,"-").concat(d):e?"<".concat(l,".").concat(c,".").concat(+f+1,"-0"):"<=".concat(u),"".concat(n," ").concat(u).trim()}},CM=function(e,t,n){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(var i=0;i<e.length;i++)if(rM(e[i].semver),e[i].semver!==nM.ANY&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0},qM=Symbol("SemVer ANY"),OM=function(){function e(t,n){if(V(this,e),n=AM(n),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}TM("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===qM?this.value="":this.value=this.operator+this.semver.version,TM("comp",this)}return z(e,[{key:"parse",value:function(e){var t=this.options.loose?DM[NM.COMPARATORLOOSE]:DM[NM.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new wM(n[2],this.options.loose):this.semver=qM}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(TM("Comparator.test",e,this.options.loose),this.semver===qM||e===qM)return!0;if("string"==typeof e)try{e=new wM(e,this.options)}catch(e){return!1}return IM(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!(t instanceof e))throw new TypeError("a Comparator is required");if(n&&"object"===F(n)||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new LM(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new LM(this.value,n).test(t.semver);var r=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),o=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),s=IM(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),u=IM(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||i||o&&a||s||u}}],[{key:"ANY",get:function(){return qM}}]),e}(),AM=cb,DM=ab.exports.re,NM=ab.exports.t,IM=Mx,TM=ub,wM=Mb,LM=Qx,kM=Qx,RM=function(e,t,n){try{t=new kM(t,n)}catch(e){return!1}return t.test(e)},PM=Qx,jM=function(e,t){return new PM(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},FM=Mb,_M=Qx,HM=function(e,t,n){var r=null,i=null,o=null;try{o=new _M(t,n)}catch(e){return null}return e.forEach((function(e){o.test(e)&&(r&&-1!==i.compare(e)||(i=new FM(r=e,n)))})),r},VM=Mb,BM=Qx,zM=function(e,t,n){var r=null,i=null,o=null;try{o=new BM(t,n)}catch(e){return null}return e.forEach((function(e){o.test(e)&&(r&&1!==i.compare(e)||(i=new VM(r=e,n)))})),r},YM=Mb,UM=Qx,WM=ax,XM=function(e,t){e=new UM(e,t);var n=new YM("0.0.0");if(e.test(n))return n;if(n=new YM("0.0.0-0"),e.test(n))return n;n=null;for(var r=function(t){var r=e.set[t],i=null;r.forEach((function(e){var t=new YM(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!WM(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}})),!i||n&&!WM(n,i)||(n=i)},i=0;i<e.set.length;++i)r(i);return n&&e.test(n)?n:null},GM=Qx,KM=function(e,t){try{return new GM(e,t).range||"*"}catch(e){return null}},$M=Mb,JM=OM,ZM=JM.ANY,QM=Qx,eS=RM,tS=ax,nS=ux,rS=px,iS=dx,oS=function(e,t,n,r){var i,o,a,s,u;switch(e=new $M(e,r),t=new QM(t,r),n){case">":i=tS,o=rS,a=nS,s=">",u=">=";break;case"<":i=nS,o=iS,a=tS,s="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(eS(e,t,r))return!1;for(var l=function(n){var l=t.set[n],c=null,f=null;return l.forEach((function(e){e.semver===ZM&&(e=new JM(">=0.0.0")),c=c||e,f=f||e,i(e.semver,c.semver,r)?c=e:a(e.semver,f.semver,r)&&(f=e)})),c.operator===s||c.operator===u?{v:!1}:f.operator&&f.operator!==s||!o(e,f.semver)?f.operator===u&&a(e,f.semver)?{v:!1}:void 0:{v:!1}},c=0;c<t.set.length;++c){var f=l(c);if("object"===F(f))return f.v}return!0},aS=oS,sS=function(e,t,n){return aS(e,t,">",n)},uS=oS,lS=function(e,t,n){return uS(e,t,"<",n)},cS=Qx,fS=function(e,t,n){return e=new cS(e,n),t=new cS(t,n),e.intersects(t)},dS=RM,mS=Rb,pS=Qx,hS=OM,vS=hS.ANY,yS=RM,gS=Rb,bS=function(e,t,n){if(e===t)return!0;if(1===e.length&&e[0].semver===vS){if(1===t.length&&t[0].semver===vS)return!0;e=n.includePrerelease?[new hS(">=0.0.0-0")]:[new hS(">=0.0.0")]}if(1===t.length&&t[0].semver===vS){if(n.includePrerelease)return!0;t=[new hS(">=0.0.0")]}var r,i,o,a,s=new Set,u=re(e);try{for(u.s();!(o=u.n()).done;){var l=o.value;">"===l.operator||">="===l.operator?r=xS(r,l,n):"<"===l.operator||"<="===l.operator?i=MS(i,l,n):s.add(l.semver)}}catch(e){u.e(e)}finally{u.f()}if(s.size>1)return null;if(r&&i){if((a=gS(r.semver,i.semver,n))>0)return null;if(0===a&&(">="!==r.operator||"<="!==i.operator))return null}var c,f,d,m,p,h=re(s);try{for(h.s();!(c=h.n()).done;){var v=c.value;if(r&&!yS(v,String(r),n))return null;if(i&&!yS(v,String(i),n))return null;var y,g=re(t);try{for(g.s();!(y=g.n()).done;){var b=y.value;if(!yS(v,String(b),n))return!1}}catch(e){g.e(e)}finally{g.f()}return!0}}catch(e){h.e(e)}finally{h.f()}var x=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver,M=!(!r||n.includePrerelease||!r.semver.prerelease.length)&&r.semver;x&&1===x.prerelease.length&&"<"===i.operator&&0===x.prerelease[0]&&(x=!1);var S,E=re(t);try{for(E.s();!(S=E.n()).done;){var C=S.value;if(p=p||">"===C.operator||">="===C.operator,m=m||"<"===C.operator||"<="===C.operator,r)if(M&&C.semver.prerelease&&C.semver.prerelease.length&&C.semver.major===M.major&&C.semver.minor===M.minor&&C.semver.patch===M.patch&&(M=!1),">"===C.operator||">="===C.operator){if((f=xS(r,C,n))===C&&f!==r)return!1}else if(">="===r.operator&&!yS(r.semver,String(C),n))return!1;if(i)if(x&&C.semver.prerelease&&C.semver.prerelease.length&&C.semver.major===x.major&&C.semver.minor===x.minor&&C.semver.patch===x.patch&&(x=!1),"<"===C.operator||"<="===C.operator){if((d=MS(i,C,n))===C&&d!==i)return!1}else if("<="===i.operator&&!yS(i.semver,String(C),n))return!1;if(!C.operator&&(i||r)&&0!==a)return!1}}catch(e){E.e(e)}finally{E.f()}return!(r&&m&&!i&&0!==a)&&(!(i&&p&&!r&&0!==a)&&(!M&&!x))},xS=function(e,t,n){if(!e)return t;var r=gS(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},MS=function(e,t,n){if(!e)return t;var r=gS(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e},SS=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return!0;e=new pS(e,n),t=new pS(t,n);var r,i=!1,o=re(e.set);try{e:for(o.s();!(r=o.n()).done;){var a,s=r.value,u=re(t.set);try{for(u.s();!(a=u.n()).done;){var l=a.value,c=bS(s,l,n);if(i=i||null!==c,c)continue e}}catch(e){u.e(e)}finally{u.f()}if(i)return!1}}catch(e){o.e(e)}finally{o.f()}return!0},ES=ab.exports,CS={re:ES.re,src:ES.src,tokens:ES.t,SEMVER_SPEC_VERSION:sb.SEMVER_SPEC_VERSION,SemVer:Mb,compareIdentifiers:mb.compareIdentifiers,rcompareIdentifiers:mb.rcompareIdentifiers,parse:Ab,valid:Nb,clean:Tb,inc:Lb,diff:Hb,major:Bb,minor:Yb,patch:Wb,prerelease:Gb,compare:Rb,rcompare:$b,compareLoose:Zb,compareBuild:ex,sort:nx,rsort:ix,gt:ax,lt:ux,eq:jb,neq:cx,gte:dx,lte:px,cmp:Mx,coerce:Ox,Comparator:OM,Range:Qx,satisfies:RM,toComparators:jM,maxSatisfying:HM,minSatisfying:zM,minVersion:XM,validRange:KM,outside:oS,gtr:sS,ltr:lS,intersects:fS,simplifyRange:function(e,t,n){var r,i=[],o=null,a=null,s=e.sort((function(e,t){return mS(e,t,n)})),u=re(s);try{for(u.s();!(r=u.n()).done;){var l=r.value;dS(l,t,n)?(a=l,o||(o=l)):(a&&i.push([o,a]),a=null,o=null)}}catch(e){u.e(e)}finally{u.f()}o&&i.push([o,null]);for(var c=[],f=0,d=i;f<d.length;f++){var m=Q(d[f],2),p=m[0],h=m[1];p===h?c.push(p):h||p!==s[0]?h?p===s[0]?c.push("<=".concat(h)):c.push("".concat(p," - ").concat(h)):c.push(">=".concat(p)):c.push("*")}var v=c.join(" || "),y="string"==typeof t.raw?t.raw:String(t);return v.length<y.length?v:t},subset:SS},qS="0.23.1",OS=function(e){return!e||CS.lt(CS.coerce(e),CS.coerce(qS))},AS=function(e){var t=e.layoutService,n=e.flags.isEnabled("BARS_IN_SECONDARY_AXIS")&&!OS(t.getLayoutValue("version")),r=t.getHyperCubeValue("qMeasureInfo").map(function(e,t){var n,r=(Y(n={},Ra.TYPE.BAR,0),Y(n,Ra.TYPE.LINE,0),Y(n,Ra.TYPE.MARKER,0),n);return function(n,i){var o=n.series,a=void 0===o?Ra.NOPE_SERIES:o,s=ob(a,t),u=vp(a);return{id:i,type:u,typeIndex:r[u]++,ref:"qMeasureInfo/".concat(i),refIndex:i,isPrimary:s,scale:s?ka.SCALE.MINOR.PRIMARY:ka.SCALE.MINOR.SECONDARY,collection:s?ka.COLLECTION.PRIMARY:ka.COLLECTION.SECONDARY,options:ib({series:a,layoutService:e})}}}(t,n)),i=function(e,t){return e.filter((function(e){return vp(e)===t})).length},o=r.filter((function(e){return e.isPrimary})),a=r.filter((function(e){return!e.isPrimary})),s=[!!o.length&&o[0],!!a.length&&a[0]].filter((function(e){return!!e})),u=i(r,Ra.TYPE.BAR),l=i(o,Ra.TYPE.BAR),c=i(a,Ra.TYPE.BAR),f=function(e){return r.filter((function(t){return vp(t)===e}))},d=f(Ra.TYPE.LINE).map((function(e){return Nu(ka.COMPONENT.POINT,e)})),m=f(Ra.TYPE.MARKER).map((function(e){return Nu(ka.COMPONENT.MARKER,e)})),p=[];l>0&&p.push("".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY)),c>0&&p.push("".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.SECONDARY));var h=[].concat(p,ee(d),ee(m)),v=ka.COMPONENT.MINI_CHART,y=f(Ra.TYPE.LINE).map((function(e){return Nu(v.LINE,e)})),g=f(Ra.TYPE.MARKER).map((function(e){return Nu(v.MARKER,e)})),b=t.meta.isContinuous?["".concat(v.BAR,"-").concat(Ra.AXIS.PRIMARY),"".concat(v.BAR,"-").concat(Ra.AXIS.SECONDARY)].concat(ee(y),ee(g)):[];return{meta:{allSeries:r,primarySeries:o,secondarySeries:a,barSeriesCount:u,primaryBarSeriesCount:l,secondaryBarSeriesCount:c,measureAxes:s,pointComponentKeys:d,markerComponentKeys:m,barComponentKeys:p,seriesComponentKeys:h,miniComponentKeys:b},query:{all:function(){return r},seriesByAxis:function(e){return e?o:a},series:f,isPrimary:ob}}};function DS(e){return function(t){var n,r,i,o=t.layout,a=$c(o,"qHyperCube.qMeasureInfo",[]),s=a.some((function(e){var t=e.series;return vp(void 0===t?Ra.NOPE_SERIES:t)===Ra.TYPE.LINE})),u=qe(o,(function(){return s&&Se.isTime(!0,o)})),l=e.isEnabled("BARS_IN_SECONDARY_AXIS")&&!OS($c(o,"version","")),c=a.filter((function(e){var t=e.series;return vp(void 0===t?Ra.NOPE_SERIES:t)===Ra.TYPE.BAR})),f=c.length,d=c.filter((function(e){return e.series.axis===Ra.AXIS.PRIMARY})).length,m=c.filter((function(e){return e.series.axis===Ra.AXIS.SECONDARY})).length,p=l?d>1||m>1:f>1,h=("grouped"!==$c(o,"barGrouping.grouping")||u)&&p,v=!h&&f>1,y=l&&h&&(d>0&&m>1||d>1&&m>0),g=!(null==o||null===(n=o.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r||null===(i=r[0])||void 0===i||!i.qLocked);return{canBeContinuous:Se.canBeContinuous(o),isDiscrete:!u,isContinuous:u,isTime:Se.isTime(u,o),isSnapshot:Ae(o),isBarSeriesStacked:h,isBarSeriesGrouped:v,isBarSeriesStackedInBothAxis:y,isGrouped:v||y,isGroupedByMeasure:v||y,isDimensionLocked:g,groupSize:y?2:f,hasLineSeries:s}}}function NS(e){var t=e.layoutService.meta,n=t.dimensionCount,r=t.measureCount;return{qTop:0,qLeft:0,qWidth:n+r,qHeight:Math.min(2e3,1e4/(r+1))}}function IS(e){var t=e.genericObjectModel,n=e.layoutService;return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(Ne).then((function(e){var n,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")}}}))}(t,n,{path:"/qHyperCubeDef",rect:NS({layoutService:n}),zoomLevel:-1,filter:"D1"})}}function TS(e){var t=e.genericObjectModel,n=e.layoutService,r=n.meta,i=r.isSnapshot,o=r.isContinuous;return i?function(e){var t=e.layoutService;return function(){return Promise.resolve({reducedCube:t.getLayoutValue("reducedHyperCube")||t.getHyperCube()})}}({layoutService:n}):o?function(e){var t=e.layoutService;return function(){var e=t.getHyperCube();return Promise.resolve({reducedCube:j(j({},e),{},{qDataPages:ee(e.qDataPages)})})}}({layoutService:n}):IS({genericObjectModel:t,layoutService:n})}var wS=function(e){return"number"==typeof e&&!Number.isNaN(e)};function LS(e){var t=e.isPrimary,n=e.layoutService,r=e.seriesModel;return function(){var e=n.getHyperCubeValue("qMeasureInfo"),i=r.query.seriesByAxis(t).map((function(t){return e[t.refIndex]})),o=i.filter((function(e){return vp(e.series)===Ra.TYPE.BAR})),a=i.filter((function(e){return vp(e.series)===Ra.TYPE.LINE})),s=i.filter((function(e){return vp(e.series)===Ra.TYPE.MARKER}));return{min:Math.min.apply(Math,ee(i.filter((function(e){return wS(e.qMin)})).map((function(e){return e.qMin})))),max:Math.max.apply(Math,ee(i.filter((function(e){return wS(e.qMax)})).map((function(e){return e.qMax})))),bar:{min:Math.min.apply(Math,ee(o.filter((function(e){return wS(e.qMin)})).map((function(e){return e.qMin})))),max:Math.max.apply(Math,ee(o.filter((function(e){return wS(e.qMax)})).map((function(e){return e.qMax}))))},line:{min:Math.min.apply(Math,ee(a.filter((function(e){return wS(e.qMin)})).map((function(e){return e.qMin})))),max:Math.max.apply(Math,ee(a.filter((function(e){return wS(e.qMax)})).map((function(e){return e.qMax}))))},marker:{min:Math.min.apply(Math,ee(s.filter((function(e){return wS(e.qMin)})).map((function(e){return e.qMin})))),max:Math.max.apply(Math,ee(s.filter((function(e){return wS(e.qMax)})).map((function(e){return e.qMax}))))}}}}function kS(e){var t=e.isPrimary,n=e.layoutService,r=e.seriesModel,i=LS({isPrimary:t,layoutService:n,seriesModel:r}),o=function(e){var t=e.seriesModel,n=e.isPrimary;return function(e){var r=e.dataPage,i=t.query.series(Ra.TYPE.BAR).filter((function(e){return e.isPrimary===n})).map((function(e){return e.refIndex})),o=r.qMatrix,a={min:NaN,max:NaN};return o.forEach((function(e){var t=0,n=0;e.slice(1).filter((function(e,t){return i.some((function(e){return e===t}))&&"NaN"!==e.qNum})).forEach((function(e){e.qNum>=0?n+=e.qNum:t+=e.qNum})),a.min=Number.isNaN(a.min)?t:Math.min(t,a.min),a.max=Number.isNaN(a.max)?n:Math.max(n,a.max)})),a}}({seriesModel:r,isPrimary:t});return function(e){var t=e.dataPage,n=i({dataPage:t});return n.bar=o({dataPage:t}),n.min=Math.min(n.bar.min,n.line.min,n.marker.min),n.max=Math.max(n.bar.max,n.line.max,n.marker.max),n}}function RS(e){var t=e.isPrimary,n=e.continuousModel,r=e.layoutService,i=e.reducedModel,o=e.seriesModel,a={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},s=function(e){var t=e.isPrimary,n=e.layoutService,r=e.seriesModel;return n.meta.isBarSeriesStacked?kS({isPrimary:t,layoutService:n,seriesModel:r}):LS({isPrimary:t,layoutService:n,seriesModel:r})}({isPrimary:t,layoutService:r,seriesModel:o});return{query:{getExtrema:function(){return a}},command:{initialize:function(){var e=function(e){var t=e.isPrimary,n={min:NaN,max:NaN},r=(0,e.layoutService.getLayoutValue)("measureAxes.".concat(t?0:1),{});if(r.autoMinMax)return n;var i=r.minMax,o=r.min,a=r.max;return"min"!==i&&"minMax"!==i||(n.min=o),"max"!==i&&"minMax"!==i||(n.max=a),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(o,a),n.max=Math.max(o,a)),n}({isPrimary:t,layoutService:r}),u=e.min,l=e.max;return a.explicit.min=u,a.explicit.max=l,a.meta.hasExplicitMin=!Number.isNaN(u),a.meta.hasExplicitMax=!Number.isNaN(l),a.meta.hasExplicit=a.meta.hasExplicitMin||a.meta.hasExplicitMax,function(e){var t=e.continuousModel,n=e.layoutService,r=e.reducedModel;if(n.meta.isDiscrete){var i=r.query.getCube();return Promise.resolve({dataPage:i.qDataPages[0]})}return t.fetchMinMaxData().then((function(e){return{dataPage:e[0]}}))}({continuousModel:n,layoutService:r,reducedModel:i}).then((function(e){var n=e.dataPage,r=s({dataPage:n}),i=r.min,u=r.max,l=r.bar,c=r.line,f=r.marker,d=o.query.seriesByAxis(t).some((function(e){return vp(e)===Ra.TYPE.BAR})),m=d?Math.min(i,0):i,p=d?Math.max(u,0):u,h=d?Math.min(l.min,0):l.min,v=d?Math.max(l.max,0):l.max,y=d?Math.min(c.min,0):c.min,g=d?Math.max(c.max,0):c.max,b=d?Math.min(f.min,0):f.min,x=d?Math.max(f.max,0):f.max;a.implicit.min=Number.isFinite(m)?m:0,a.implicit.max=Number.isFinite(p)?p:0,a.implicit.bar.min=Number.isFinite(h)?h:0,a.implicit.bar.max=Number.isFinite(v)?v:0,a.implicit.line.min=Number.isFinite(y)?y:0,a.implicit.line.max=Number.isFinite(g)?g:0,a.implicit.marker.min=Number.isFinite(b)?b:0,a.implicit.marker.max=Number.isFinite(x)?x:0,a.min=Number.isNaN(a.explicit.min)?a.implicit.min:a.explicit.min,a.max=Number.isNaN(a.explicit.max)?a.implicit.max:a.explicit.max,a.meta.hasExplicitMin&&!a.meta.hasExplicitMax&&(a.max=Math.max(a.min,a.max)),a.meta.hasExplicitMax&&!a.meta.hasExplicitMin&&(a.min=Math.min(a.min,a.max)),a.meta.includesZero=!!((0-a.min)*(0-a.max)<=0)}))}}}}function PS(e){var t=e.extrema,n=e.ticks,r=t.meta.hasExplicit?2:3;return n.filter((function(e){return function(e){return!t.meta.hasExplicitMin||e>=t.explicit.min}(e)&&function(e){return!t.meta.hasExplicitMax||e<=t.explicit.max}(e)})).length>=r}function jS(e){var t=e.min,n=e.max,r=e.count,i=e.threshold,o=e.disable,a=function(e,t,n){var r=qr().domain([e,t]);return r.nice(n),r}(t,n,r),s=function(e){var t=e.min,n=e.max,r=e.threshold,i=e.scale,o={start:!0,stop:!0};if(e.disable)return o;var a=Q(i.domain(),2),s=a[0],u=a[1];return 0!==t&&0!==s&&(o.start=i(t)>r),0!==n&&0!==u&&(o.stop=i(n)<1-r),o}({min:t,max:n,threshold:i,scale:a,disable:o});if(!s.start||!s.stop){var u=Q(a.domain(),2),l=u[0],c=u[1],f=a.ticks(r),d=f.length>=4?f[1]-f[0]:.1*l,m=f.length>=4?f[f.length-1]-f[f.length-2]:.1*c;a.domain([s.start?l:l-d,s.stop?c:c+m]),a.nice(r)}return a}var FS=50,_S=100,HS=200,VS=125;function BS(e){var t=e.config.measureAxesRef,n=e.layoutService,r=e.size,i=function(e){switch(e){case.5:return FS;case 1:return _S;case 2:return HS;default:return e*VS}}(n.getLayoutValue("".concat(t,".spacing"),1));return Math.max(1,Math.round(r/i))}function zS(e){for(var t=e.config,n=e.chart,r=e.layoutService,i=e.dockService,o=e.measureText,a=e.size,s=e.min,u=e.max,l=BS({config:t,layoutService:r,size:a}),c=jS({min:s,max:u,count:l,threshold:.05,disable:!0}),f=c.domain(),d={roundedMin:f[0],roundedMax:f[1],ticks:c.ticks(l)},m="horizontal"===i.meta.major.orientation?"height":"width",p=function(e){return o(e)[m]},h=n.formatter(t.formatter),v=function(){var e=d.ticks.map(h);return!e.some((function(t,n){return e.indexOf(t)!==n}))&&function(e){var t=a/d.ticks.length;return Math.max.apply(Math,ee(e.map(p)))<=t}(e)},y=l-1;y>0&&!v();y--){c.domain([s,u]),c.nice(y);var g=Q(c.domain(),2);d.roundedMin=g[0],d.roundedMax=g[1],d.ticks=c.ticks(y)}return d}function YS(e){var t=e.tick,n=e.index,r=e.ticks;return 0===n||n===r.length-1||0===t}function US(e){var t=e.index,n=e.ticks;return 0===t||t===n.length-1||t===Math.floor((n.length-1)/2)}function WS(e){var t=e.config,n=e.chart,r=e.extrema,i={roundedMin:0,roundedMax:0,ticks:[]},o=jS({min:e.min,max:e.max,count:10,threshold:.15,disable:!0}),a=Q(o.domain(),2);i.roundedMin=a[0],i.roundedMax=a[1];var s=o.ticks(10),u=function(e){var t=e.ticks,n=Math.round(.3*t.length),r=n,i=t.length-n;return t.slice(r,i).some((function(e){return 0===e}))}({ticks:s}),l=u?YS:US;i.ticks=s.filter((function(e,t,n){return l({tick:e,index:t,ticks:n})})),i.ticks.length%2==0&&!u&&!r.meta.hasExplicit&&s.length>1&&(i.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);var c=n.formatter(t.formatter),f=i.ticks.map(c);return f.some((function(e,t){return f.indexOf(e)!==t}))&&(i.ticks=[i.ticks[0],i.ticks[i.ticks.length-1]]),i}function XS(e){var t=e.config,n=e.chart,r=e.layoutService,i=e.dockService,o=e.extrema,a=function(e){var t=e.config,n=e.chart,r=e.layoutService,i=e.dockService,o=e.extrema,a=e.measureText,s=e.size,u=e.min,l=e.max;if("SPARK"===i.meta.chart.mode)return function(e){return{roundedMin:e.min,roundedMax:e.max,ticks:[]}}({min:u,max:l});var c=zS({config:t,chart:n,layoutService:r,dockService:i,measureText:a,size:s,min:u,max:l});return PS({extrema:o,ticks:c.ticks})?c:WS({config:t,chart:n,extrema:o,min:u,max:l})}({config:t,chart:n,layoutService:r,dockService:i,extrema:o,measureText:e.measureText,size:e.size,min:e.min,max:e.max}),s=a.ticks,u=a.roundedMin,l=a.roundedMax,c=function(e){for(var t=e.ticks,n=e.count,r=[],i=0;i<t.length-1;i++)for(var o=t[i],a=(t[i+1]-o)/(n+1),s=1;s<=n;s++)r.push(o+a*s);return r}({ticks:s,count:1});return{min:u,max:l,values:[].concat(ee(function(e){var t=e.ticks,n=e.extrema,r=ee(t);return n.meta.hasExplicit&&t.length?(n.meta.hasExplicitMin&&!t.some((function(e){return e===n.explicit.min}))&&(r.unshift(n.explicit.min),r=r.filter((function(e){return e>=n.explicit.min}))),n.meta.hasExplicitMax&&!t.some((function(e){return e===n.explicit.max}))&&(r.push(n.explicit.max),r=r.filter((function(e){return e<=n.explicit.max}))),r):r}({ticks:s,extrema:o}).map((function(e){return{value:e,isMinor:!1}}))),ee(c.map((function(e){return{value:e,isMinor:!0}})))).sort((function(e,t){return e.value-t.value}))}}function GS(e){var t=e.config,n=e.chart,r=e.layoutService,i=e.dockService,o=e.measureText,a=e.extrema,s=e.size,u=function(e){var t=e.extrema,n=t.min,r=t.max;return n!==r?{min:n,max:r}:0===n||1===n?{min:n-1,max:r+1}:{min:n-.2*n*Math.sign(n),max:r+.2*r*Math.sign(r)}}({extrema:a});return XS({config:t,chart:n,layoutService:r,dockService:i,extrema:a,measureText:o,size:s,min:u.min,max:u.max})}function KS(e){var t=e.config,n=e.chart,r=e.layoutService,i=e.extremumModel,o=e.dockService,a=e.seriesModel,s=e.themeService,u={locked:!1,resolved:void 0},l=i.query.getExtrema,c=function(e){var t=e.chart,n=e.config,r=e.dockService,i=e.extremumModel,o=e.layoutService,a=e.seriesModel,s=e.themeService,u=S.renderer("svg")().measureText;return function(){var e=s.getStyles(),l=function(e){var t,n=e.dockService,r=e.seriesModel,i=e.chart.component(r.meta.seriesComponentKeys[0]),o=null!==(t=null==i?void 0:i.rect)&&void 0!==t?t:n.meta.chart.size;return"horizontal"===n.meta.major.orientation?o.height:o.width}({chart:t,dockService:r,seriesModel:a}),c=i.query.getExtrema();return GS({config:n,chart:t,layoutService:o,dockService:r,measureText:function(t){return u({text:t,fontFamily:e.axis.label.name.fontFamily,fontSize:e.axis.label.name.fontSize})},extrema:c,size:l})}}({config:t,chart:n,layoutService:r,extremumModel:i,dockService:o,seriesModel:a,themeService:s}),f=function(){return u.locked&&u.resolved||(u.resolved=c()),u.resolved};return{query:{getValues:function(){return f().values},getMin:function(){return l().meta.hasExplicitMin?l().explicit.min:f().min},getMax:function(){return l().meta.hasExplicitMax?l().explicit.max:f().max}},command:{lock:function(){u.locked=!0},unlock:function(){u.locked=!1}}}}function $S(e){var t=e.genericObjectModel,n=e.layoutService,r={properties:void 0};return{query:{getProperties:function(){return r.properties}},command:{initialize:function(){return function(e){var t=e.layout,n=e.model;return Ae(t)?Promise.resolve(null):n.getEffectiveProperties().then((function(e){return{properties:e}}))}({layout:n.getLayout(),model:t}).then((function(e){var t=(null!=e?e:{}).properties;r.properties=t}))}}}}function JS(e){var t=e.layoutService,n=e.seriesModel,r=e.colorService.getSettings(),i=r.type,o=r.mode,a=r.fieldType;if("categorical"===i){var s,u=t.getLayoutValue("dataPoint.show",!1)?"line-point":"line";s="field"===o?"measure"===a?function(){return{type:Ra.TYPE.BAR}}:function(){return n.query.all()[0]}:function(e){return n.query.all()[e.value]};return{item:{shape:{type:function(e){var t=e.datum,n=s(t),r=n.type,i=n.options;switch(r){case"line":return u;case"marker":return i.marker;default:return"square"}},stroke:{},strokeWidth:function(e){var t=e.datum,n=s(t),r=n.type,i=n.options;return r===Ra.TYPE.LINE?2:r!==Ra.TYPE.MARKER||i.fill?0:1},size:10,fill:{fn:function(e){var t=e.datum,n=e.scale,r=s(t),i=r.type,o=r.options;return i!==Ra.TYPE.MARKER||o.fill?n(t.value):"none"}}}}}}}function ZS(e){var t=e.layout,n=(0,e.defaultAuto)(t),r=t.qHyperCube.qMeasureInfo.length>1;return j(j({},n),{},{useBaseColors:r?"measure":n.useBaseColors})}function QS(e){var t,n=e.actions,r=e.appLayoutModel,i=e.appModel,o=e.chart,a=e.environment,s=e.flags,u=e.genericObjectModel,l=e.layoutService,c=e.picasso,f=e.seriesModel,d=e.viewState,m=a.theme,p=a.translator,h={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return t=function(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,u=e.translator,l=e.layoutService,c=void 0===l?void 0:l,f=e.createConfig,d=void 0===f?_c:f,m=e.config,p=void 0===m?{}:m,h=e.custom,v=void 0===h?{}:h,y=p.localeInfo,g=p.key,b=p.theme,x=void 0===b?void 0:b,M=p.auto,S=void 0===M?void 0:M,E=p.definitionPath,C=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),q={theme:x,key:g,localeInfo:y,layout:C,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:fl(fl({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:C?Rc(C):void 0})},O=Lc({picasso:o,model:a,app:s,translator:u,auto:S});!1!==S&&O.auto((function(e){return S?S({layout:e,defaultAuto:Fc}):Fc(e)}));var A=!1;return{getColor:function(){return O.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return O.resolveUIColor({index:t,color:n})},getData:function(){return O.data()},getDatumProps:function(e){return O.datumProps(e)},getSnapshotData:function(){return O.getSnapshotData(E)},getSettingsForMeasure:function(e){return O.settingsForMeasure(e)},getSettings:function(){return O.settings()},getLegend:function(e,t){return O.legend(e,t)},getScales:function(){return O.scales()},getPalettes:function(){return O.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return O.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return A},custom:fl({},v),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?d:e)({getUseBaseColors:Rc}),n=Pc(q,t);return O.config(n),O.getAuxiliarySettings(E).then((function(){A=!0}))}}}({picasso:c,model:u,app:i,translator:p,layoutService:l,createConfig:function(){var e;return s.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&(e=l.getHyperCubeValue("qMeasureInfo").map((function(e){return e.color}))),{theme:m,colorProps:{measureOverrides:e},legendProps:l.getLayoutValue("legend"),hc:l.getHyperCube(),key:ka.SCALE.COLOR}},config:{auto:ZS,localeInfo:r.qLocaleInfo},custom:{wrappedScales:function(){return h.wrappedScales},legendComponents:function(){return h.legendComponents},legendInteractions:function(){return h.legendInteractions},updateLegend:function(){var e=function(e){var t=e.viewState,n=e.chart,r=e.layoutService,i=e.seriesModel,o=e.environment,a=e.colorService,s=e.actions,u=o.options,l={eventName:"legend-c",key:ka.COMPONENT.LEGEND,viewState:t,chart:n,styleReference:"object.comboChart",rtl:"rtl"===u.direction,settings:JS({layoutService:r,seriesModel:i,colorService:a})},c=a.getLegend(l,{actions:s,navigationDisabled:!s.interact.enabled()}),f=c.components,d=c.interactions,m=a.getScales();return{components:f.filter(Boolean).map((function(e){var t=e.layout.dock,n=m["".concat(ka.SCALE.COLOR,"Range")];return!n||"right"!==t&&"left"!==t||(n.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:d,scales:m}}({viewState:d,chart:o,environment:a,colorService:t,seriesModel:f,layoutService:l,actions:n}),r=e.components,i=e.interactions,s=e.scales;h.wrappedScales=s,h.legendComponents=r,h.legendInteractions=i}}})}var eE=function(){},tE=2,nE=20,rE=200;var iE={contains:function(e,t){if(!e)return!1;var n=e.qArea;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(e){var t=e.layoutService,n=function(e){e.qArea.qHeight=e.qMatrix.length,e.qArea.qWidth=t.meta.size.x};return n.should=function(e){return 0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length},n},slicer:function(e,t){for(var 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),u=Math.max(0,o-e.qArea.qLeft),l=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:l-u,qTop:i,qLeft:o},qMatrix:[]},f=a;f<s;f++)c.qMatrix.push(e.qMatrix[f].slice(u,l));return c},cacheWarden:function(e){var t=e.bounds,n=void 0===t?{width:0,height:0}:t;return{release:function(e,t){var r=t.qTop-10<=e.qTop,i=t.qLeft+t.qWidth+10>=e.qLeft+e.qWidth,o=t.qTop+t.qHeight+10>=e.qTop+e.qHeight,a=t.qLeft-10<=e.qLeft;return r&&e.qTop>0||i&&e.qLeft+e.qWidth<n.width||o&&e.qTop+e.qHeight<n.height||a&&e.qLeft>0}}},request:function(e){var t=e.definitionPath;return function(e){return{method:"getHyperCubeData",args:[t,[e]]}}}};var oE={contains:function(e,t){if(!e)return!1;var n=e.qArea;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function(e){var t=e.layoutService,n=function(e){e.qArea.qHeight=e.qData[0].qSubNodes.length,e.qArea.qWidth=t.meta.size.x};return n.should=function(e){return 0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length},n},slicer:function(e,t){for(var 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),u={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[j(j({},e.qData[0]),{},{qUp:r,qDown:s,qSubNodes:[]})]},l=o;l<a;l++)u.qData[0].qSubNodes.push(e.qData[0].qSubNodes[l]);return u},cacheWarden:function(e){var t=e.bounds,n=void 0===t?{height:0}:t;return{release:function(e,t){var r=t.qTop-10<=e.qTop,i=t.qTop+t.qHeight+10>=e.qTop+e.qHeight;return r&&e.qTop>0||i&&e.qTop+e.qHeight<n.height}}},request:function(e){var t=e.layoutService,n=e.definitionPath,r=t.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return function(e){var t={method:"getHyperCubeStackData",args:[n,[e]]};return"auto"===r&&t.args.push(600),t}}};var aE={contains:function(){return!1},patcher:function(){var e=function(e){return e};return e.should=function(){return!1},e},slicer:function(e){return e},cacheWarden:function(){return{release:function(){return!0}}},request:function(e){var t=e.definitionPath;return function(e){return{method:"getHyperCubeTreeData",args:[t,[e]]}}}};var sE="pages";var uE="discretePan";function lE(e){var t,n=e.chart,r=e.actions,i=e.componentKey,o=e.dockService,a=e.rtl,s=e.scroller;return{type:"Pan",key:"discrete:pan",options:{event:uE,pointers:1,threshold:10,enable:function(e,t){return this.started===uE||!t||!!r.scroll.enabled()&&n.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===i}))}},events:(t={},Y(t,"".concat(uE,"start"),(function(e){e.preventDefault(),this.started=uE;var t="horizontal"===o.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10})),Y(t,"".concat(uE,"move"),(function(e){e.preventDefault();var t="horizontal"===o.meta.major.orientation,n=t?e.deltaX:e.deltaY,r=t&&a?-1:1,i=(n-this.previousTotalDelta)*r;this.previousTotalDelta=n,s.scroll(i)})),Y(t,"".concat(uE,"end"),(function(e){e.preventDefault(),this.started=!1})),Y(t,"".concat(uE,"cancel"),(function(e){e.preventDefault(),this.started=!1})),t)}}function cE(e){var t=e.chart,n=e.componentKey,r=e.actions,i=e.scroller;return function(e){if(r.scroll.enabled()&&Q(t.componentsFromPoint({x:e.clientX,y:e.clientY}).filter((function(e){return e.key===n})),1)[0]){e.preventDefault();var o=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX,a=100*Math.sign(-o);i.scroll(a)}}}function fE(e){var t=e.layoutService,n=void 0===e.areaBuffer?function(e){var t=e.layoutService,n=Math.floor(1e4/(t.meta.dimensionCount+t.meta.measureCount));return function(e){var t=e.width,r=e.height,i=Math.min(n,Math.max(rE,r));return{width:t,height:Math.max(nE,Math.min(r*tE,i))}}}({layoutService:t}):function(e){var t=e.layoutService,n=Math.floor(1e4/(t.meta.dimensionCount+t.meta.measureCount));return function(e){var t=e.width,r=e.height;return{width:t,height:Math.min(n,r)}}}({layoutService:t}),r={width:t.meta.size.x,height:t.meta.size.y};return function(e){var t=n({width:e.qWidth,height:e.qHeight}),i=t.width,o=t.height,a=o?Math.ceil((o-e.qHeight)/2):0,s=i?Math.ceil((i-e.qWidth)/2):0;return{qHeight:o?Math.min(o,r.height):e.qHeight,qWidth:i?Math.min(i,r.width):e.qWidth,qTop:o?Math.max(0,Math.min(e.qTop-a,r.height-o)):e.qTop,qLeft:i?Math.max(0,Math.min(e.qLeft-s,r.width-i)):e.qLeft}}}function dE(e){var t,n,r=function r(i){var o=(t=i).request,a=o.method,s=o.args;e[a].apply(e,ee(s)).then((function(e){if(t.canceled||n)return t.reject("REJECTED"),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=function(e){return new Promise((function(i,o){var a={request:e,resolve:i,reject:o,canceled:!1,cancel:function(){a.canceled=!0}};t?function(e){n&&n.reject("REJECTED"),n=e}(a):r(a)}))};return i.isProcessing=function(){return!!t},i.hasQueued=function(){return!!n},i.cancel=function(){i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject("REJECTED"),n=null)},i}var mE={command:{update:function(){}}};function pE(e){var t=e.dataStore,n=e.composition,r=e.enigmaModel,i=e.layoutService,o=e.trendLineModel,a=void 0===o?mE:o,s=e.definitionPath,u=e.areaBuffer,l=e.processDataPage,c=n.slicer,f=n.cacheWarden,d=n.request,m=function(e){var t=e.dataStore,n=e.slice,r=e.warden,i=e.expand,o=e.request,a=e.process,s=e.connectionless,u=e.processDataPage;return function(e){var l=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).onProcessing;if(t.contains(e)){var c=t.getCurrent();if(s)return Promise.resolve(n(c,e));var f=r.release(c.qArea,e),d=a.isProcessing();if(!f&&d&&a.cancel(),!f||d)return Promise.resolve(n(c,e))}if(s)return Promise.resolve(t.getCurrent());a.isProcessing()&&l&&l();var m=i(e);return a(o(m)).then((function(r){return u(r),t.add(r),n(r,e)}))}}({dataStore:t,slice:c,warden:f({bounds:{width:i.meta.size.x,height:i.meta.size.y}}),expand:fE({layoutService:i,areaBuffer:u}),request:d({layoutService:i,definitionPath:s}),process:dE(r),connectionless:i.meta.isSnapshot,processDataPage:l}),p=ef((function(e,t){var n=t.onProcessing,r=t.onData;m(e,{onProcessing:n}).then((function(e){return r(e)})).catch((function(e){if("REJECTED"!==e)throw e}))}),50);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.onProcessing,r=void 0===n?eE:n,o=t.onDataPage,s=void 0===o?eE:o;p(e,{onProcessing:r,onData:function(e){i.setDataPages(e?[e]:[]),a.command.update(),s(e)}})}}var hE={inTotal:function(e){return e.layoutService.meta.size.x},area:function(e){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.layoutService.meta.size.x}},scaleRange:function(e){var t=e.layoutService,n=e.offsets,r=e.items,i=e.viewSize,o=n.pixel,a=t.getDataPages()[0],s=o/i;return[s,r.inView>=r.inTotal?s+1:s+a.qArea.qWidth/r.inView]}};var vE={inTotal:function(e){var t=e.layoutService;if(t.meta.isSnapshot&&!t.getLayoutValue("reducedHyperCube")){var n=Q(t.getDataPages(),1)[0];if(n)return n.qArea.qHeight}return t.meta.size.y},area:function(e){var t=e.layoutService,n=e.itemOffset,r=e.inView,i=e.areaBuffer,o=void 0===i?4:i,a=Math.max(0,Math.floor(n)-o/2);return{qTop:a,qHeight:Math.min(t.meta.size.y-a,Math.max(0,Math.ceil(r+o))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function(e){var t=e.layoutService,n=e.offsets,r=e.items,i=e.viewSize,o=n.pixel,a=t.getDataPages()[0],s=i/r.inView,u=(o+a.qArea.qTop*s)/i;return[u,r.inView>=r.inTotal?u+1:u+a.qArea.qHeight/r.inView]}};function yE(e){var t=e.meta,n=t.groupSize,r=t.measureCount;return null!=n?n:r}function gE(e,t){for(var n=[],r=0;r<e.length;r++){var i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function bE(e){return gE(e.qMatrix,(function(e){return e[0].qElemNumber}))-1}var xE={inTotal:function(e){var t=e.layoutService,n=yE(t);return t.meta.size.y*n*(1+1/n)-1},area:function(e){var t=e.layoutService,n=e.itemOffset,r=e.inView,i=e.areaBuffer,o=yE(t),a=void 0===i?o:i,s=n/(o+1),u=Math.max(0,Math.floor((n-s-a/2)/o));return{qTop:u,qHeight:Math.min(t.meta.size.y-u,Math.max(0,Math.ceil((r+a)/o+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function(e){var t=e.layoutService,n=e.offsets,r=e.items,i=e.viewSize,o=yE(t),a=t.getDataPages()[0],s=i/r.inView,u=n.pixel,l=bE(a),c=a.qArea.qHeight*o+l,f=(u+(a.qArea.qTop*o+a.qArea.qTop)*s)/i;return[f,r.inView>=r.inTotal?f+1:f+c/r.inView]}};var ME=function(e,t){return t/(e.meta.size.y/e.meta.size.dimensions[0]+1)};function SE(e){return{itemOffset:function(t,n){if(0!==t.qArea.qTop)return ME(e,n);var r=function(e,t){for(var n={successful:!0,count:0},r=Math.abs(Math.floor(t)),i=[],o=0;o<=r;o++){if(!e[o])return n.successful=!1,n;var a=e[o][0].qElemNumber;-1===i.indexOf(a)&&(i.push(a),r--)}return n.count=i.length-1,n}(t.qMatrix,n);return r.successful?r.count:ME(e,n)},area:function(t,n,r){return 0!==t.qArea.qTop?ME(e,n):gE(t.qMatrix.slice(0,r.qTop+1),(function(e){return e[0].qElemNumber}))-1}}}var EE={inTotal:function(e){var t=e.layoutService;return t.meta.size.y+t.meta.size.dimensions[0]-1},area:function(e){var t=e.getDataPages,n=e.layoutService,r=e.itemOffset,i=e.inView,o=SE(n).itemOffset(t(),r),a=Math.max(0,Math.floor(r-o));return{qTop:a,qHeight:Math.min(n.meta.size.y-a,Math.max(0,Math.ceil(i+1))),qLeft:0,qWidth:n.meta.size.x}},scaleRange:function(e){var t=e.getDataPages,n=e.layoutService,r=e.offsets,i=e.items,o=e.viewSize,a=e.upperBound,s=n.getDataPages()[0],u=o/i.inView,l=r.item,c=r.pixel,f=SE(n).area(t(),l,s.qArea),d=bE(s),m=s.qArea.qHeight+d,p=c===a?(i.inView-m)*u/o:(c+(s.qArea.qTop+f)*u)/o;return[p,i.inView>=i.inTotal?p+1:p+m/i.inView]}};function CE(e){var t=e.rect,n=e.dockService,r=e.itemWidths,i=e.dimensionAxis,o=e.inTotal,a=e.isMajorVisible,s=e.isMajorLabelless,u=e.maxDataRows,l=r[n.meta.chart.mode],c=l.DEFAULT,f=l.SQUEEZE,d=l.LABELLESS,m=i.axisDisplayMode,p=void 0===m?"auto":m,h=i.maxVisibleItems,v=void 0===h?10:h,y="horizontal"===n.meta.major.orientation?t.width:t.height,g=y/o>=f;switch(p){case"max":return Math.min(o,u);case"custom":return Math.min(v,u);case"auto":default:return!a||s?y/d:g?o:y/c}}function qE(e){var t=e.chart,n=e.getRect,r=e.getDataPages,i=e.layoutService,o=e.dockService,a=e.getItemWidths,s=e.axisKey,u=e.areaBuffer,l=e.rtl,c=function(e){var t=e.layoutService.meta,n=t.isDimensionless,r=t.isGrouped,i=t.isGroupedByMeasure;return n?hE:r?i?xE:EE:vE}({layoutService:i}),f=c.inTotal,d=c.area,m=c.scaleRange,p=function(){return"horizontal"===o.meta.major.orientation?n().width:n().height},h=function(e){return e?p()/e:0},v=function(e,t){return-(e-t)*h(t)};return{getItems:function(){var e=i.getLayoutValue("dimensionAxis"),r=f({layoutService:i}),u=t.component(s),l=!s||!u||u.isVisible();return{inTotal:r,inView:CE({rect:n(),dockService:o,itemWidths:a(),dimensionAxis:e,inTotal:r,isMajorVisible:l,isMajorLabelless:"none"===e.show||"title"===e.show,maxDataRows:Math.floor(1e4/(i.meta.dimensionCount+i.meta.measureCount))})}},getItemSize:function(e){var t=e.items.inView;return h(t)},getOffsets:function(e){var t=e.pixelOffset,n=e.items,r=n.inTotal,i=n.inView,o=Math.min(0,Math.max(t,v(r,i)));return{pixel:o,item:i?Math.abs(i*o/p()):0}},getUpperBound:function(e){var t=e.items,n=t.inTotal,r=t.inView;return v(n,r)},getViewRange:function(e){var t=e.pixelOffset,n=e.items,r=n.inTotal,i=n.inView;return function(e){var t=e.viewSize,n=e.inTotal,r=e.inView,i=e.pixelOffset,o=t/r*n,a=Math.abs(i)/o;return[a,a+t/o]}({viewSize:p(),inTotal:r,inView:i,pixelOffset:t})},getArea:function(e){var t=e.itemOffset,n=e.items;return d({getDataPages:r,layoutService:i,itemOffset:t,inView:n.inView,areaBuffer:u})},getScaleRange:function(e){var t=e.offsets,n=e.items,a=m({getDataPages:r,layoutService:i,offsets:t,items:n,viewSize:p(),upperBound:v(n.inTotal,n.inView)});return"horizontal"===o.meta.major.orientation&&l?function(e){return[1-e[1],1-e[0]]}(a):a},validate:{offset:function(e){var t=e.pixelOffset,n=e.items,r=n.inTotal,i=n.inView;return t<=0&&t>=v(r,i)}},convert:{itemToPixelOffset:function(e){var t=e.itemOffset,n=e.items.inView,r=t*h(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset:function(e){var t=e.relativeOffset,n=e.items,r=n.inTotal,i=n.inView;return-t*(h(i)*r)}}}}function OE(e){var t=e.chart,n=e.componentKey,r=e.state,i=e.dataStore,o=e.pageData,a=e.layoutService,s=e.dockService,u=e.itemWidths,l=e.getRect,c=e.axisKey,f=e.areaBuffer,d=e.viewState,m=e.rtl;r.set("rect",{width:0,height:0}),r.set("itemWidths",{}),r.set("itemSize",0),r.set("items",{}),r.set("offsets",{}),r.set("finished",0),r.set("scaleRange",[0,1]);var p=qE({chart:t,getRect:function(){return r.get("rect")},getDataPages:i.getCurrent,layoutService:a,dockService:s,getItemWidths:function(){return r.get("itemWidths")},axisKey:c,areaBuffer:f,rtl:m}),h=function(){var e=p.getItems();return r.set("items",e),e},v=function(e){var t=e.pixelOffset,n=e.items,i=p.getOffsets({pixelOffset:t,items:n});return r.set("offsets",i),i},y=function(e){var t=Date.now(),n=h(),i=v({pixelOffset:e,items:n}),s=p.getArea({itemOffset:i.item,items:n});if(function(e){var t=Q(a.getDataPages(),1)[0].qArea;return!!t&&Object.keys(e).every((function(n){return e[n]===t[n]}))}(s))(p.validate.offset({pixelOffset:e,items:n})||d.get("scrollOffset")!==i.item)&&(r.set("finished",t),r.set("scaleRange",p.getScaleRange({offsets:i,items:n})),d.preventSet("viewRange",p.getViewRange({pixelOffset:i.pixel,items:n})),d.set("scrollOffset",i.item));else{d.preventSet("viewRange",p.getViewRange({pixelOffset:i.pixel,items:n}));var u=function(){r.get("finished")>t||(r.set("finished",t),r.set("scaleRange",p.getScaleRange({offsets:i,items:n})),d.set("scrollOffset",i.item))};o(s,{onProcessing:u,onDataPage:u})}};return{enabled:function(){var e=r.get("items");return e.inTotal>e.inView},itemSize:function(){return r.get("itemSize")},scaleRange:function(){return r.get("scaleRange")},initialize:function(){var e=t.component(n);if(!e)return Promise.resolve();r.set("rect","function"==typeof l?l():e.rect),r.set("itemWidths","function"==typeof u?u():u);var i=h();r.set("itemSize",p.getItemSize({items:i}));var s=void 0===d.get("scrollOffset")?function(e){var t=e.items;return 1===a.getLayoutValue("scrollStartPos")?p.getUpperBound({items:t}):0}({items:i}):p.convert.itemToPixelOffset({itemOffset:d.get("scrollOffset"),items:i}),c=v({pixelOffset:s,items:i});d.preventSet("viewRange",p.getViewRange({pixelOffset:c.pixel,items:i}));var f=p.getArea({itemOffset:c.item,items:i});return new Promise((function(e){o(f,{onDataPage:function(){r.set("scaleRange",p.getScaleRange({offsets:c,items:i})),d.preventSet("scrollOffset",c.item),e()}})}))},scroll:function(e){var t=r.get("offsets").pixel+e;y(t)},scrollToRelative:function(e){var t=r.get("items"),n=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(n)}}}function AE(e){var t=e.chart,n=e.actions,r=e.componentKey,i=e.enigmaModel,o=e.layoutService,a=e.dockService,s=e.trendLineModel,u=e.itemWidths,l=e.viewState,c=e.rtl,f=e.options,d=(f=void 0===f?{}:f).definitionPath,m=void 0===d?"/qHyperCubeDef":d,p=f.getRect,h=void 0===p?void 0:p,v=f.axisKey,y=void 0===v?void 0:v,g=f.areaBuffer,b=void 0===g?void 0:g,x=f.processDataPage,M=void 0===x?function(){}:x,S=Zc(),E=function(e){switch(e.qMode){case"S":default:return iE;case"K":return oE;case"T":return aE}}({qMode:o.getHyperCubeValue("qMode")}),C=function(e){var t=e.state,n=e.contains;return t.set(sE,[]),{add:function(e){var n=t.get(sE);n.length=0,n.push(e)},getCurrent:function(){return t.get(sE)[0]},getAll:function(){return t.get(sE)},contains:function(e){return n(t.get(sE)[0],e)}}}({state:S,contains:E.contains});!function(e){var t=e.layoutService,n=e.dataStore,r=e.composition,i=t.getDataPages()[0];if(i){var o=r.patcher({layoutService:t});o.should(i)&&o(i),n.add(i)}}({layoutService:o,dataStore:C,composition:E});var q=function(e){var t=e.buffer;return void 0===t?void 0:2*Math.round(t/2)}({buffer:b}),O=pE({dataStore:C,composition:E,enigmaModel:i,layoutService:o,trendLineModel:s,definitionPath:m,areaBuffer:q,processDataPage:M}),A=OE({chart:t,componentKey:r,state:S,dataStore:C,pageData:O,layoutService:o,dockService:a,itemWidths:u,getRect:h,axisKey:y,areaBuffer:q,viewState:l,rtl:c}),D=function(e){var t=e.layoutService,n=e.dataStore;return function(e){var r=$c(e,"".concat(t.refs.dataPages));r.length=0,r.push(n.getCurrent())}}({layoutService:o,dataStore:C});return{interactions:function(e){var t=e.chart,n=e.actions,r=e.componentKey,i=e.dockService,o=e.rtl,a=e.scroller;return{gestures:[lE({chart:t,actions:n,componentKey:r,dockService:i,rtl:o,scroller:a})],native:{type:"native",events:{wheel:cE({chart:t,actions:n,componentKey:r,scroller:a})}}}}({chart:t,actions:n,componentKey:r,dockService:a,rtl:c,scroller:A}),query:{getCanScroll:function(){return A.enabled()},getItemSize:function(){return A.itemSize()},getScaleRange:function(){return A.scaleRange()},getCurrentDataPage:function(){return C.getCurrent()}},command:{initialize:function(){return A.initialize()},scrollTo:function(e){return A.scrollToRelative(e)},setSnapshotData:function(e){return D(e)}}}}var DE={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function NE(e){var t=e.appLayoutModel,n=e.appModel,r=e.chart,i=e.environment,o=e.flags,a=e.genericObjectModel,s=e.layout,u=e.picasso,l=i.translator,c=i.embed,f=function(e){var t=e.layout,n=e.app,r=e.picasso,i=e.model,o=e.chart,a=e.translator,s=e.localeInfo,u=e.embed;return{layout:t,app:n,picasso:r,model:i,chart:o,translator:a,localeInfo:s,useCustomTooltip:t.tooltip&&!t.tooltip.auto,utils:hs,miniChartToken:{},embed:u}}({layout:s,app:n,model:a,picasso:u,chart:r,translator:l,localeInfo:t.qLocaleInfo,embed:c});return{query:{useCustomTooltip:function(){return f.useCustomTooltip},useTooltipChart:function(){var e,t,n,r;return o.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(e=s.tooltip)||void 0===e||null===(t=e.chart)||void 0===t||null===(n=t.object)||void 0===n?void 0:n.refId)&&f.embed&&"function"==typeof(null===(r=f.model)||void 0===r?void 0:r.getEffectiveProperties)},hasChartLimitation:function(){var e;return null==n||null===(e=n.isInModalSelection)||void 0===e?void 0:e.call(n)},getCustomTooltipModel:function(){return f}}}}function IE(e){var t=e.layoutService,n=e.key,r=(t.getLayoutValue("components",[]).filter((function(e){return e.key===n}))[0]||{}).style;return function(e){var i=e.property,o=e.defaultValue,a=e.index,s=r&&Object.hasOwnProperty.call(r,i)?r[i]:o;if(void 0===a)return s;var u=(t.getHyperCubeValue(function(e){return"qMeasureInfo.".concat(e,".styling")}(a),[]).filter((function(e){return e.key===n}))[0]||{}).style;return u&&Object.hasOwnProperty.call(u,i)?u[i]:s}}function TE(e){var t=e.layoutService,n=e.dockService,r=_u.BAR,i=_u.LINE,o=_u.POINT,a=IE({layoutService:t,key:"bar"}),s=IE({layoutService:t,key:"line"}),u=function(){var e=a({property:"strokeWidth",defaultValue:"none"});return e?r.STROKE.WIDTH[e.toUpperCase()]:0};return{query:{bar:{getHasStyling:function(){return!!t.getLayoutValue("components",[]).filter((function(e){return"bar"===e.key})).length},getWidthFn:function(){return function(){return a({property:"width",defaultValue:.7})}},getHasStrokeWidth:function(){return!!u()},getStrokeWidth:function(){return u()},getStrokeColor:function(){return a({property:"strokeColor",defaultValue:{index:-1,color:r.STROKE.COLOR}}).color}},line:{getCurveFn:function(){return function(e,t){return s({property:"lineCurve",defaultValue:i.CURVE.LINEAR,index:t})}},getStrokeWidthFn:function(){return function(e,t){return s({property:"lineThickness",defaultValue:"FULL"===n.meta.chart.mode?i.WIDTH.FULL.DEFAULT:i.WIDTH.LESS.DEFAULT,index:t})}},getStrokeDasharrayFn:function(){return function(e,t){var n=s({property:"lineType",defaultValue:i.TYPE.SOLID,index:t});return n&&i.TYPE[n.toUpperCase()]}}},point:{getSize:function(e){return s({property:"dataPointSize",defaultValue:o.SIZE.DEFAULT,index:e})}}}}}var wE=Vh.model,LE=function(e){var c=e.picasso,f=e.chart,d=e.environment,m=e.flags,p=e.viewState,h=e.viewCache,v=e.actions,y=e.selectionService,g=o(),b=r(),x=b.width,M=b.height,S=Q(t(),2),E=S[0],C=S[1],q=Q(t(),2),O=q[0],A=q[1],D=a(),N=s(),I=u(),T=l();n((function(){if(g&&null!=f&&f.update&&d&&p){var e=function(e){var t=e.source,n=e.metaAdditionsFn,r=ql(!0,{},t),i=nf(r),o=function(){return function(e){var t=e.layout,n=e.additionsFn,r=void 0===n?function(){return{}}:n,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,s=a.qDimensionInfo,u=a.qMeasureInfo,l=a.qMode,c=s.length,f=u.length,d=fl({mode:{S:"S"===l,P:"P"===l,K:"K"===l,T:"T"===l},dimensionCount:c,measureCount:f,hasMultipleDimensions:c>1,hasMultipleMeasures:f>1,isOneDimensional:1===c,isTwoDimensional:2===c},o);return fl(fl({},d),r({layout:t,meta:d}))}({layout:r,additionsFn:n,additionsProps:{size:i.size}})},a={refs:fl({},i.refs),meta:o(),getLayout:function(){return r},getLayoutValue:function(e,t){return $c(r,e,t)},setLayoutValue:function(e,t){Jc(r,e,t),i=nf(r),a.meta=o()},getHyperCube:function(){return r.qHyperCube},getHyperCubeValue:function(e,t){return $c(r.qHyperCube,e,t)},setHyperCubeValue:function(e,t){Jc(r.qHyperCube,e,t),i=nf(r),a.meta=o()},getDataPages:function(){return $c(r,i.refs.dataPages)},setDataPages:function(e){Jc(r,i.refs.dataPages,e),a.meta=o()}};return a}({source:g,metaAdditionsFn:DS(m)}),t=d.options.viewState,n=void 0===t?{}:t,r=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):n,i=r.legendScrollOffset,o=r.scrollOffset;p.preventSet("scrollOffset",o),p.preventSet("legendScrollOffset",i),p.preventSet("title",e.getLayoutValue("title"));var a=function(e){var t=e.genericObjectModel,n=e.layoutService,r={cube:void 0,on:!1},i=TS({genericObjectModel:t,layoutService:n});return{query:{getCube:function(){return r.cube},getIsReduced:function(){return r.on}},command:{initialize:function(){return i().then((function(e){var t=e.reducedCube;r.cube=t,r.on=!!(r.cube&&r.cube.qDataPages[0]&&r.cube.qDataPages[0].qIsReduced)}))},setSnapshotData:function(e){e.reducedHyperCube=r.cube}}}}({genericObjectModel:D,layoutService:e}),s=Kc({chart:f,layoutService:e,config:{logicalSize:{width:x,height:M},rtl:"rtl"===d.options.direction},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),u=TE({layoutService:e,dockService:s}),l=AS({layoutService:e,flags:m}),b=e.meta.isDiscrete?function(e){var t=e.chart,n=e.genericObjectModel,r=e.layoutService,i=e.dockService,o=e.seriesModel,a=e.viewState,s=e.rtl;return AE({chart:t,actions:e.actions,componentKey:Bh(o),enigmaModel:n,layoutService:r,dockService:i,viewState:a,rtl:s,itemWidths:DE,options:{axisKey:ka.COMPONENT.AXIS.MAJOR}})}({chart:f,genericObjectModel:D,layoutService:e,dockService:s,seriesModel:l,viewState:p,rtl:"rtl"===d.options.direction,actions:v}):void 0,S=e.meta.isContinuous?wE({model:D,layoutService:e,viewState:p,viewCache:h}):void 0,E=QS({actions:v,appLayoutModel:I,appModel:N,chart:f,environment:d,flags:m,genericObjectModel:D,layoutService:e,picasso:c,seriesModel:l,viewState:p}),q=function(e){var t=e.theme,n=e.styleMatrix,r={theme:t,styleMatrix:Om(void 0===n?[]:n),styles:void 0};return r.styles=Am(r.styleMatrix,t),{getStyles:function(){return r.styles},getTheme:function(){return r.theme},setTheme:function(e){r.theme=e,r.styles=Am(r.styleMatrix,e)}}}({theme:d.theme,styleMatrix:eb}),O=function(e){var t=e.layoutService,n=e.seriesModel,r=t.meta.isContinuous,i="qDimensionInfo/0",o="".concat(i,":numeric");return{main:{major:i,majorNumeric:o,minorsPrimary:n.meta.primarySeries.map((function(e){return e.ref})),minorsSecondary:n.meta.secondarySeries.map((function(e){return e.ref}))},virtuals:r?[{key:o,from:i,override:{value:function(e){return e.qNum}}}]:void 0}}({layoutService:e,seriesModel:l}),A=RS({isPrimary:!0,layoutService:e,reducedModel:a,seriesModel:l,continuousModel:S,flags:m}),w=RS({isPrimary:!1,layoutService:e,reducedModel:a,seriesModel:l,continuousModel:S,flags:m}),L=KS({config:{measureAxesRef:"measureAxes.0",formatter:ka.FORMATTER.PRIMARY},chart:f,layoutService:e,extremumModel:A,dockService:s,seriesModel:l,themeService:q}),k=KS({config:{measureAxesRef:"measureAxes.1",formatter:ka.FORMATTER.SECONDARY},chart:f,layoutService:e,extremumModel:w,dockService:s,seriesModel:l,themeService:q}),R=$S({genericObjectModel:D,layoutService:e}),P=NE({appLayoutModel:I,appModel:N,chart:f,environment:d,flags:m,genericObjectModel:D,layout:g,picasso:c}),F=wa({layoutService:e,discreteModel:b}),_=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:ka.SCALE.MAJOR,MAJOR_INNER:ka.SCALE.MAJOR_INNER,MINOR:{PRIMARY:ka.SCALE.MINOR.PRIMARY,SECONDARY:ka.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.PRIMARY),BAR_SECONDARY:"".concat(ka.COMPONENT.BAR,"-").concat(Ra.AXIS.SECONDARY),AXIS:{MAJOR:ka.COMPONENT.AXIS.MAJOR,TIME_INNER:ka.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:ka.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:ka.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:ka.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:ka.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:ka.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:ka.COLLECTION.MAIN}}}}(e),H=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 ul(regeneratorRuntime.mark((function e(){var r,a,s,u;return regeneratorRuntime.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=ul(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.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(fl({},i));case 4:if("object"===al(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(fl({},i))}))),e.next=6,Promise.all([a,s]);case 6:u=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,pl(u[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=ml(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=ql(!0,{},n.brush);ql(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===al(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=rf({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=rf({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:c,plugins:T,pluginArgs:_});C(j(j(j({selectionService:y,genericObjectModel:D,appModel:N,dockService:s,styleModel:u,layoutService:e,fieldModel:O,seriesModel:l,reducedModel:a,primaryExtremumModel:A,secondaryExtremumModel:w,primaryTickModel:L,secondaryTickModel:k,propertiesModel:R,colorService:E,themeService:q,appLayoutModel:I,tooltipModel:P,flags:m},b&&{discreteModel:b}),S&&{continuousModel:S}),{},{refLineModel:F,pluginService:H}))}}),[g,D,N,I,d,null==f?void 0:f.update,p]);var w=Q(i((function(){if(!E)return Promise.resolve();var e=E.layoutService,t=E.colorService,n=E.reducedModel,r=E.primaryExtremumModel,i=E.secondaryExtremumModel,o=E.propertiesModel,a=E.continuousModel,s=E.discreteModel,u=E.pluginService,l=a?function(){var t,n;a.update(e.getLayout());var r=a.initialFetch(),i=!e.meta.isSnapshot&&(null==d||null===(t=d.options)||void 0===t||null===(n=t.viewState)||void 0===n?void 0:n.zoom);return i&&p.preventSet("zoom",i),r}:function(){return Promise.resolve()},c=t.initialize().then((function(){var e=t.getSettings().field;y.setBrushAliases({colorField:e}),t.custom.updateLegend()}));return Promise.all([u.initialize(),n.command.initialize(),D?o.command.initialize():Promise.resolve(),c,l(),v.scroll.attachDiscreteModel(s)]).then((function(){return Promise.all([r.command.initialize(),i.command.initialize()]).then((function(){return A(E)}))}))}),[E]),2)[1];if(w)throw w;return O};function kE(){var e=Q(t(),2),r=e[0],i=e[1];return n((function(){i(function(e){var t=fl({},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}))}),[]),r}var RE={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"}}]};var PE={query:{getCanScroll:function(){return!0}}};function jE(){var e=h(),r=Q(t(!1),2),i=r[0],o=r[1],a=Q(t(!1),2),s=a[0],u=a[1],l=Q(t(!1),2),c=l[0],f=l[1],d=function(){var e=h(),r=Q(t(!1),2),i=r[0],o=r[1],a=Q(t({}),2),s=a[0],u=a[1],l=Q(t(),2),c=l[0],f=l[1];return n((function(){return function(){u({})}}),[]),n((function(){e&&o(!e.select&&!e.active)}),[e]),{enabled:function(){return i},emit:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return s[e].forEach((function(e){return e.apply(void 0,n)}))},removeListener:function(e,t){var n,r=null===(n=s[e])||void 0===n?void 0:n.indexOf(t);r>-1&&s[e].splice(r,1)},on:function(e,t){Array.isArray(s[e])?s[e].push(t):s[e]=[t]},get brushSelectionIncludeMax(){return c},set brushSelectionIncludeMax(e){f(e)},getBrushOptions:void 0}}(),m=function(){var e,r,i,o=h(),a=Q(t(!1),2),s=a[0],u=a[1],l=Q(t(!1),2),c=l[0],f=l[1],d=v(),m=!!d.qSelectionInfo.qInSelections,p=!(null===(e=d.qHyperCube)||void 0===e||null===(r=e.qDimensionInfo)||void 0===r||null===(i=r[0])||void 0===i||!i.qIsOneAndOnlyOne);n((function(){o&&u(!o.select&&!o.active)}),[o]);var g=function(e){f("boolean"==typeof e?e:!c)};return y((function(){return{key:"lasso",label:"Lasso",icon:RE,hidden:!s||!m||p,active:c,action:g}}),[m,p,c,s]),{action:g,enabled:function(){return s},active:function(){return c}}}(),p=PE;n((function(){e&&(o(!e.active),u(!e.active),f(!e.passive))}),[e]);var g=Q(t({}),1)[0];return g.scroll={enabled:function(){return i&&p.query.getCanScroll()},attachDiscreteModel:function(e){p=e||PE}},g.interact={enabled:function(){return s}},g.tooltip={enabled:function(){return c}},g.lasso=m,g.select=d,g}function FE(e){var t=e.clearMinor,n=e.clearDiscrete,r=e.clearLegend;t(),t({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),n({brushName:!1}),r()}function _E(e){var t=e.setSelectionInfo,n=e.event,r=e.components,i=e.clear,o=null!=r&&r.length?r.map((function(e){return e.key})).filter(Boolean):[];t({event:n,components:o,minorRangePrimary:"minorRange"===n,minorRange:["minorRange","minorRange-secondary"].includes(n),legendRange:"legendRange"===n,legendTap:"tap"===n&&o[0]===ka.COMPONENT.LEGEND_CATEGORICAL}),i()}var HE,VE={exports:{}};HE=VE,function(e,t){HE.exports=t()}(window,(function(){return 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"===F(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="./index.js")}({"../node_modules/extend/index.js":
9
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,l,u,c,d,m=e.length,f=e.search(/[0-9\-\+#]/),p=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),y=h.search(/[0-9\-\+#]/),g=m-y,v=e.substring(g,g+1),b=g+("."===v||","===v?1:0),x=y>0?e.substring(b,m):"";if(r=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",g=(d=t[0]).length%l,m=d.length,b=0;b<m;b++)h+=d.charAt(b),!((b-g+1)%l)&&b<m-l&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),p+(r?"-":"")+n+x}}(dd={exports:{}}),dd.exports);function fd(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var pd={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},hd=/%$/,yd=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,gd=/^\(oct\)/i,vd=/^\(dec\)/i,bd=/^\(hex\)/i,xd=/^\(bin\)/i,Md=/^\(rom\)/i,Sd=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Ed=/#|0/g;function Cd(e,t,r,n){return e=e.toString(t),r[1]===r[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function qd(e,t,r){var n=fd(e);return r?n:new RegExp(n||"",t)}function Od(e,t,r){var n,i,o,a,s,l,u,c,d,m,f,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),m=t,(f=r)&&(f=fd(f)),m&&(m=fd(m)),d=new RegExp("(?:[#0]+".concat(m,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(o=(o=p.match(d))?o[0]:"")?p.substr(0,p.indexOf(o)):p,s=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===r&&(i=(n=o.split(r)).pop(),o=n.join("")+r+i,t=""),l=t,t=/,/.test(r)?"¤":",",l&&(o=o.replace(qd(l,"g"),t)),u=r,r=".",u&&(o=o.replace(qd(u,"g"),r)),c=(c=o.match(/#/g))?c.length:0;var h,y=p.split(u);y[1]&&(h=y[1].match(Ed)),e.prefix=a||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=h?h.length:2,e.percentage=hd.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(qd(t,null,!0),"|").concat(qd(r,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=r,e.temp=c}var Ad=function(){function e(t,r,n,i,o){dc(this,e),this.localeInfo=t,this.pattern=r,this.thousandDelimiter=n||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return pd;var r={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(r[t[0]]=t[1])})),r}(t,this.patternSeparator),this.prepare()}return fc(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,r,n){return this.prepare(t,r,n),this.formatValue(e)}},{key:"prepare",value:function(e,t,r){var n;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===r&&(r=this.decimalDelimiter),e?(this._prepared={positive:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},n=this._prepared,e=e.split(this.patternSeparator),n.positive.pattern=e[0],n.negative.pattern=e[1],n.zero.pattern=e[2],Sd.test(e[0])&&(n.positive.isFunctional=!0),e[1]?Sd.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?Sd.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||Od(n.positive,t,r),n.negative&&!n.negative.isFunctional&&Od(n.negative,t,r),n.zero&&!n.zero.isFunctional&&Od(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,i,o,a,s,l,u,c=this._prepared,d="",m="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,r){var n;return yd.test(t)?e=Cd(e,Number(/\d{2}/.exec(t)[0]),t,r):gd.test(t)?e=Cd(e,8,t,r):vd.test(t)?e=Cd(e,10,t,r):bd.test(t)?e=Cd(e,16,t,r):xd.test(t)?e=Cd(e,2,t,r):Md.test(t)&&(n="",e<0&&(n="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?n+(e=function(e,t){for(var r,n="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(r=0;r<a.length;r++)if(a[r]<=i){n+=s[r],i-=a[r];break}for(r=0;r<o;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}(e,t)):t+n+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,h,y=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),g=y[0];for(s=0,r=Number(Number(e).toExponential().split("e")[1]);g<=r&&s<y.length;)g=y[++s];s>0&&(p=y[s-1]),p&&r>0&&p>0?h=p:(r<0&&p<0||!p)&&(g<0&&g-r<=c.maxPrecision?h=g:p<=r&&!(g>0&&-r<=c.maxPrecision)&&(h=p)),h&&(d=this.abbreviations[h],e/=Math.pow(10,h))}if(n=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(o)[0];if(e=md(b+=o,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),M=u.replace(/#+$/,"").length,S=("I"===this.type?0:n%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=S.length;s<M;s++)S+="0";S&&(e+=o+S)}else 0===v&&(i=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),m=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)l+="#";e=md(l,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+m+d+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Dd(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.size,o=void 0===i?5e3:i,a=n.multipleArguments,s=void 0!==a&&a,l=n.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),d=Object.create(null),m=0,f=0;return(t=s?function(){return r=u.apply(void 0,arguments),t.has(r)?t.get(r):t.set(r,e.apply(void 0,arguments))}:function(n){return r=u(n),t.has(r)?t.get(r):t.set(r,e(n))}).set=function(e,t){return m>=o&&(delete c[d[f]],delete d[f],m--,f++),c[e]=t,d[m]=e,m++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),d=Object.create(null),m=0,f=0},t.size=function(){return m},t}function Nd(e,t,r,n,i){var o=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return bc(Ad,t)}(i,e,t,r,n),a=Dd(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,r,n){return a.clear(),o.format(t,e,r,n)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var Td=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Id=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],wd=["January","February","March","April","May","June","July","August","September","October","November","December"],Ld=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Rd(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function kd(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Pd=function(){function e(t,r,n){dc(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Td,qDayNames:Id,qLongMonthNames:wd,qMonthNames:Ld}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),r||(r=(pc(i={},"T",o.qTimeFmt||"hh:mm:ss"),pc(i,"D",o.qDateFmt||"YYYY-MM-DD"),pc(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[n]),this.pattern=r}return fc(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var r,n,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(n=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=n.getUTCDay()-1)<0&&(a=6),r={year:n.getUTCFullYear(),month:n.getUTCMonth(),day:a,date:n.getUTCDate(),h:o,m:n.getUTCMinutes(),s:n.getUTCSeconds(),f:n.getUTCMilliseconds(),t:n.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){var r,n=function(e){var t=e,r=24*kd(t),n=60*kd(r),i=60*kd(n),o=1e3*kd(i);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(i),f:Math.round(o)}}(e),i=n.d,o=n.h,a=n.m,s=n.s,l=n.f,u=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=r?r.getDay()-1:0)<0&&(u=6);var c="";return r&&(c=r.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:s,f:l,t:c}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Rd("".concat(t.year).slice(-2),2),YYY:Rd("".concat(t.year).slice(-3),3),def:function(e){return Rd("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Rd("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Rd("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Rd("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Rd("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Rd("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Rd("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var r="".concat(t.f),n=e.length-r.length;if(n>0)for(var i=0;i<n;i++)r+="0";else n<0&&(r=r.slice(0,e.length));return r}},"t{1,2}|T{1,2}":{def:function(e){var r=t.t;return e[0].toUpperCase()===e[0]&&(r=r.toUpperCase()),r.slice(0,e.length)}}}}(this,r),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var d=new RegExp(u.join("|"),"g");return t.replace(d,(function(e){var t,r,n;for(r in l)if(Object.prototype.hasOwnProperty.call(l,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var i in l[r])if(i===e||i.toLowerCase()===e){void 0===(n=l[r][i])&&(n=l[r][i.toLowerCase()]);break}return void 0===n&&(n=l[r].def),"function"==typeof n&&(n=n(e)),n}))}}]),e}();function jd(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return bc(Pd,t)}function Fd(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Vd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=jd(r,e,t),i=Dd(n.format.bind(n),{toKey:function(e){return"object"===cc(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?Fd(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),n.format(t,e)},a.locale=function(r){return n=jd(r,e,t),i=Dd(n.format.bind(n),{toKey:function(e){return"object"===cc(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function _d(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Vd(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var r="#",n=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(r=e.qNumFormat.qFmt||r,n=e.qNumFormat.qThou||n,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(r="#".concat(i,"##A"),o="U"),Nd(r,n,i,o,t)}function Bd(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.meta,n=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,u=t.sourceField,c=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),d=function(e){return e.qText||""},m="dimension"===l?"first":"avg",f=_d(r,o),p="dimension"===l?"first":function(e,t){return f(t)},h={id:function(){return n},key:function(){return i},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(h)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:c,label:d,reduce:m,reduceLabel:p,formatter:function(){return f},tags:function(){return r.qTags}};return h}function Hd(e,t,r,n,i){return(t[e]||[]).map((function(t,o){var a="".concat(n?"".concat(n,"/"):"").concat(e,"/").concat(o),s={instance:Bd(Ic({id:"".concat(r?"".concat(r,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Hd("qAttrDimInfo",t,r,a,Ic({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=Hd("qAttrExprInfo",t,r,a,Ic({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=Hd("qMeasureInfo",t,r,a,Ic({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function $d(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.key,o=n.data,a=n.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},u=o;if(!u)throw new Error('Missing "data" input');if(!u.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=$d.util,d={cache:l,cube:u,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},m={key:function(){return i},raw:function(){return u},field:function(e){return Xc(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,m,l,c)},hierarchy:function(e){return d.hierarchy(e,m,l,c)},_cache:function(){return l}};"K"===u.qMode||"T"===u.qMode||!u.qMode&&u.qNodesOnDim?(d.extractor=cd,d.hierarchy=ud,d.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(d.extractor=kc,d.pages=u.qDataPages,d.hierarchy=ud):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},m,l,c)};var f="S"===u.qMode?function(e){return e.qElemNumber}:void 0,p="S"===u.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,xc(Hd("qDimensionInfo",u,i,"",Ic({},d,{value:f,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,xc(Hd("qMeasureInfo",u,i,"",Ic({},d,{value:p,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=m.field(e.from),r=Bd(yc({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return d.extractor({field:e},m,l,c)},key:e.key,type:t.type(),localeInfo:d.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(r)})),(r=l.allFields).push.apply(r,xc(l.virtualFields)),m}var zd=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Ud=/\/qDimensionInfo(?:\/(\d+))?/,Yd=/\/qMeasureInfo\/(\d+)/,Wd=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Gd=/\/qAttrExprInfo\/(\d+)/,Kd=/\/?qHyperCube/,Xd=/\/?qTreeData/,Jd=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Zd=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function Qd(e,t){var r=e,n=-1,i=-1,o="",a=function(e){return e};Kd.test(e)?(o="".concat(r.substr(0,r.indexOf("qHyperCube")+10)),a=Jd):Xd.test(e)&&(o="".concat(r.substr(0,r.indexOf("qTreeData")+9)),a=Zd);var s=!0;if(Ud.test(e)&&(n=+Ud.exec(e)[1]),Yd.test(e)&&(i=+Yd.exec(e)[1]),Wd.test(e)){i=-1,n=0;var l=+Wd.exec(r)[2];isNaN(l)||(n=l,r=r.replace(/\/\d+$/,"")),s=!1}if(Gd.test(e)){var u=i;if(t){i=0;var c=Wc(o,t);i+=(c.qMeasureInfo||[]).length,n>-1?(i=c.qDimensionInfo.slice(0,n).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),n=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+Gd.exec(r)[1]}else n>-1?(n=-1,i=+Gd.exec(r)[1]):i+=+Gd.exec(r)[1]+1}return zd.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||Mc(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0],i=t[1];r=r.replace(n,i)})),s&&(r=a(r)),r&&"/"!==r[0]&&(r="/".concat(r)),{measureIdx:i,dimensionIdx:n,path:r}}function em(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=r.byCells,o=r.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=Qd(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var r=e.brush.ranges();r.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),r.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){var d=n.qHyperCube,m=d.qNoOfLeftDims,f=d.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===m||f>=m)&&m>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:f-m})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),u=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),u=!!s.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));u=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!u&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=r.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function tm(e){$d.util=e.data("matrix").util,e.data("q",$d),e.formatter("q-number",Nd),e.formatter("q-time",Vd)}function rm(e){var t=rc(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var r=t.qIsOneAndOnlyOne;return void 0!==r&&r}function nm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===ml(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function im(e){var t=e.brush,r=e.colorField,n=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!r||/qAttrDimInfo/.test(r)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),n&&t.removeKeyAlias(n),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(r))):o&&t.addKeyAlias(n,"qHyperCube/".concat(r))}tm.qBrushHelper=em,tm.selections=em;function om(e){var t=e.brush,r=e.getConfig;return{interceptor:function(e){var n=t.brushes(),i=r(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;n.forEach((function(r){var n,i,a;("range"===r.type||null!==(n=e[0])&&void 0!==n&&n.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==r.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));return l.length>1?function(e){var t=e.layout,r=void 0===t?{}:t,n=e.values,i=void 0===n?[]:n;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=rm({layout:r,path:e}),n=i.filter((function(t){return t.key===e})),o=t?[n.pop()]:n;a.push.apply(a,xl(o))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var n=t.brushes(),i=r().allowSimultaneous;return n.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(n.forEach((function(r){var n=r.id===e[0].key||i.includes(r.id)&&i.includes(e[0].key);"range"!==r.type||n||t.clear([])})),e)}}}var am=[],sm=0,lm=function(e){var t=am.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},um=function(){document.addEventListener("keyup",lm)},cm=function(){document.removeEventListener("keyup",lm)},dm=function(e,t){Object.keys(t).forEach((function(r){e.on(r,t[r])}))},mm=function(e,t){Object.keys(t).forEach((function(r){e.removeListener(r,t[r])}))};function fm(e,t,r){if(t&&void 0!==r&&"selectHyperCubeContinuousRange"===e.method){var n=e.params;if(n&&n[1]&&n[1][0]){var i=n[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=r&&(a.qMaxInclEq=!0)}}}function pm(e){var t=e.chart,r=e.document,n=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,u=void 0===l?"rangeClear":l,c=n.event===i,d=r.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!d)return!1;var m=t.component(o);return!!m&&(m.emit(u),"string"==typeof s&&t.brush(s).clear(),m)}function hm(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return pm({selectionInfo:t,chart:r,document:n,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function ym(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return pm({selectionInfo:t,chart:r,document:n,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}function gm(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,u=void 0!==l&&l,c=e.brushName,d=pm({selectionInfo:t,chart:r,document:n,eventName:u?void 0:s,componentName:o,brushName:void 0!==c&&c});if(d){var m=d.settings.settings,f=m.scale,p=m.brush,h=r.scale(f).data().fields.map((function(e){return e.id()})),y=r.brush(p),g=y.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));y&&g.length&&g.forEach((function(e){y.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function vm(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;pm({selectionInfo:t,chart:r,document:n,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function bm(e){var t=e.chart,r=e.selectionInfo,n=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(r&&o.includes(r.event)){var l=r.currentComponent;r.previousComponent!==l&&(n.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function xm(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,l=void 0===s?"legend-range-brush":s,u=e.cleared,c=void 0!==u&&u,d=e.brushName;pm({selectionInfo:t,chart:r,document:n,eventName:c?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}var Mm=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=vl(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Sm(e){var t,r=e.lasso;null!=r&&null!==(t=r.active)&&void 0!==t&&t.call(r)&&(null==r||r.action(!1))}function Em(e){var t,r=e.chart,n=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,l=e.selectionEvents;if(!1===i||!1===l)return function(){};var u=(a||{}).lasso,c=void 0!==u&&u,d=i.reset,m=void 0===d?Sm:d,f=i.clear,p=!1!==f&&function(e){var t=e.clear,r=void 0===t?Mm:t,n=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:n,selectionInfo:i,chart:o,document:document,cleared:e};return r(gl({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return hm(gl(gl({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ym(gl(gl({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return gm(gl(gl({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return vm(gl(gl({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return bm(gl(gl({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xm(gl(gl({},t),e))}},t))}}({clear:f,selections:s,selectionInfo:n,chart:r}),h=function(e){var t=e.chart,r=e.lasso,n=e.reset,i=e.clear,o=!1,a={deactivated:function(e){n({e:e,lasso:r})},canceled:function(e){n({e:e,lasso:r}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===n&&delete a.deactivated,!1===i&&delete a.cleared,!1===n&&!1===i&&delete a.canceled,a}({chart:r,clear:p,reset:m,lasso:c}),y={};Object.entries(h).forEach((function(e){var t=bl(e,2),r=t[0],n=t[1];y[r]=function(e,t){return t?function(r){return t({event:r,defaultFunc:e})}:e}(n,l[r])}));var g=function(e){var t=e.selectionEvents,r=e.selections,n=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:r,selectionInfo:n,chart:o,document:a},u=function(e){return Object.assign(n,e||{})},c=function(e){var t=e.event,r=e.components;return function(){return function(e){var t=e.selectionInfo,r=e.clear,n=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(gl(gl({},void 0===t?{}:t),{},{event:n,components:o.map((function(e){return e.key})).filter(Boolean)})),r()}({event:t,components:r,clear:i,chart:o,selectionInfo:n,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(gl(gl({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:i},l),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:n,clear:p,chart:r,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",g),Object.entries(y).forEach((function(e){var t=bl(e,2),r=t[0],n=t[1];null==s||s.on(r,n)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",g),Object.entries(y).forEach((function(e){var t=bl(e,2),r=t[0],n=t[1];null==s||s.removeListener(r,n)}))}}var Cm=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function qm(e){var t=e.chart,r=e.actions,n=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,l=o.majorScale,u=void 0===l?void 0:l,c=o.selectionActions,d=(c=void 0===c?{}:c).clear,m=c.reset,f=o.selectionEvents,p=void 0===f?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:f,h=o.brushEvents,y=void 0===h?{}:h,g=o.brushName,v=void 0===g?"selection":g,b=o.brushMaxListeners,x=void 0===b?20:b,M=o.brushRanges,S=void 0!==M&&M,E=o.interceptors,C=void 0===E?{}:E,q=o.selectionsFn,O=void 0===q?i.selections:q,A=t.brush(v);if("number"==typeof x&&A.setMaxListeners(x),S){var D=!0===S?Cm:S;A.configure({ranges:D})}var N={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},T=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.selections,n=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!r)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var u=++sm,c=null,d=[],m={};r.on=r.on.bind(r),r.isActive=r.isActive.bind(r),r.addListener=r.addListener.bind(r),r.removeListener=r.removeListener.bind(r);var f=om({brush:n,getConfig:function(){return{layout:c,allowSimultaneous:d}}}),p=f.rangeInterceptor,h=f.interceptor;n.intercept("set-ranges",p),n.intercept("toggle-ranges",p),n.intercept("toggle-values",h),n.intercept("set-values",h),n.intercept("add-values",h),n.on("start",(function(){return r.begin(l)}));var y={activate:function(){},deactivated:function(){return n.end()},cleared:function(){return n.clear()},canceled:function(){return n.end()}};dm(r,y);var g=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;n.start(),"function"==typeof o.select.getBrushOptions&&(m=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){a(n,m,c).forEach((function(e){fm(e,o.select.brushSelectionIncludeMax,g),r.select(e)}))}))):n.on("update",(function(){a(n,m,c).forEach((function(e){return r.select(e)}))})),0===am.length&&um(),am.push({key:u,selections:r}),{layout:function(e){c=e},allowSimultaneous:function(e){d=e},release:function(){c=null;var e=am.indexOf(am.filter((function(e){return e.key===u}))[0]);-1!==e&&am.splice(e,1),am.length||cm(),mm(r,y)}}}({brush:A,majorScale:u,actions:r,selections:n,picassoQ:i,selectionsFn:O});!function(e){var t=e.brush,r=e.interceptors,n=void 0===r?{}:r;Object.entries(n).forEach((function(e){var r=bl(e,2),n=r[0],i=r[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(n,e)}))}))}({brush:A,interceptors:C});var I=function(e){var t=e.chart,r=e.selectionActions,n=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,r=e.chart,n=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=bl(e,2),o=i[0],a=i[1],s=function(){return a({chart:r,selectionInfo:n})};return t.on(o,s),[o,s]}));return function(){a.forEach((function(e){var r=bl(e,2),n=r[0],i=r[1];t.removeListener(n,i)}))}}({brush:n,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),u=Em({chart:t,selectionInfo:o,selectionActions:r,actions:i,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var r=!1,n=function(e){r||"Shift"!==e.key||(t.lasso.action(!0),r=!0)},i=function(e){"Shift"===e.key&&(t.lasso.action(!1),r=!1)};return document.addEventListener("keydown",n),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",n),document.removeEventListener("keyup",i)}}({actions:i});return function(){l(),u(),c()}}({chart:t,brush:A,actions:r,selections:n,selectionInfo:N.selectionInfo,selectionActions:{clear:d,reset:m},selectionEvents:p,brushEvents:y});if(s){var w=!0===s?xl(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;T.allowSimultaneous(w)}return{unbindEvents:I,state:N,picassoSelections:T,brush:A}}function Om(e){var t=e.chart,r=e.selections,n=e.actions,i=void 0!==n&&n,o=e.config,a=void 0===o?{}:o,s=qm({chart:t,actions:i,selections:r,picassoQ:tm,config:a}),l=s.unbindEvents,u=s.state,c=s.picassoSelections,d=s.brush,m=a.custom,f=void 0===m?{}:m,p=a.legendAlias,h=void 0===p?void 0:p,y=a.setBrushAliases,g=void 0===y?im:y;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==r||null===(t=r.isLocked)||void 0===t?void 0:t.call(r))&&void 0!==e?e:nm(n)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,r,n,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var l=(null!==(r=null==a?void 0:a.qHyperCube)&&void 0!==r?r:{}).qDimensionInfo,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return rm({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,r=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,n=void 0===r?[]:r;return null!==(t=n.map((function(e,t){var r;return!(e.qLocked||(null===(r=e.qCardinalities)||void 0===r?void 0:r.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(n.length-1,0)}(a),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(n=u[0])||void 0===n||!n.qLocked),s}({selections:r,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,r=e.useLegendCube,n=void 0!==r&&r,i=vl(e,["colorField","useLegendCube"]),o=gl({useLegendCube:n,colorField:t,brush:d,legendAlias:h},i);g(gl(gl({},o),{},{defaultFunc:function(){return im(o)}}))},destroy:function(){l(),c.release()},custom:gl({},f)}}var Am="QlikView Sans, sans-serif",Dm="#737373",Nm="#cccccc",Tm="#e6e6e6";function Im(e){var t={};return[].concat(xl(e),xl([["","","color"],["object","axis.title","fontFamily",Am],["object","axis.title","fontSize","13px"],["object","axis.title","color"],["object","axis.label.name","fontFamily",Am],["object","axis.label.name","fontSize","12px"],["object","axis.label.name","color","#595959"],["object","axis.line.major","color",Nm],["object","axis.line.minor","color",Tm],["object","grid.line.major","color",Nm],["object","grid.line.minor","color",Tm],["object","grid.line.highContrast","color",Tm],["object","referenceLine.label.name","fontFamily",Am],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.label.name","color","#333333"],["object","referenceLine.outOfBounds","fontFamily",Am],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","color",Tm],["object","referenceLine.outOfBounds","backgroundColor",Dm,function(e){return"transparent"===e?Dm:e}]])).reduce((function(e,r){var n="".concat(r[0],"-").concat(r[1],"-").concat(r[2],"}");return t[n]||(t[n]=!0,e.push(r)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}function wm(e,t){var r={};return e.forEach((function(e){var n=bl(e,5),i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=(void 0===l?function(e){return e}:l)(function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(!e||!1===t)return i;var o=e.getStyle(t,r,n);return void 0===o?i:o}(t,i,o,a,s));nc(r,[o,a].filter(Boolean).join("."),u)})),r}const Lm={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function Rm({chart:e,models:t,viewState:r,viewCache:n,axis:i}){const o=ic(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:r}=e.component(`${ea.COMPONENT.BAR}-${i}`)||{};return(!t.length||!r)&&2})(t)||(()=>{const{min:e,max:t}=r.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=Lm[a.meta.chart.mode];return 0===Math.abs(n.get("continuousMax")-n.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=r.get("zoom"),i=Math.abs(n.get("continuousMax")-n.get("continuousMin")),s=Math.abs(t-e),l=Lm[a.meta.chart.mode],u=function(e,t,r){return e*(1-r)+t*r}(2,l,1-Math.min(s/i/.2,1));return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const km=({isContinuous:e,isBarSeriesGrouped:t,styleModel:r,discreteModel:n,isBarSeriesStackedInBothAxis:i})=>e?1:r.query.bar.getHasStyling()?r.query.bar.getHasStrokeWidth()?function(){const e=r.query.bar.getStrokeWidth()/n.query.getItemSize(),t=r.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:r.query.bar.getWidthFn():t||i?.9:.7;function Pm(e){return Math.min(Math.max(0,e),1)}const jm=({chart:e,models:t,viewState:r,viewCache:n,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c,primaryExtremumModel:d,secondaryExtremumModel:m}=t,{isContinuous:f,isBarSeriesStacked:p,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:y}=o.meta,g=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=i?ra.PRIMARY:ra.SECONDARY,b=i?ea.SCALE.MINOR.PRIMARY:ea.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=p?{scale:b,start:{ref:"start",fn:e=>{const t=g(e);return Pm(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:g(e))(e);return Pm(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=g(e);return Pm(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const r=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?g(e):e.datum.end.value;return Pm(e.scale(r))}}},M=(i?d:m).query.getExtrema(),S=p?({start:e,end:t})=>il(e.value,t.value,M):({end:e})=>sl(e.value,M);return{type:"box",key:`${ea.COMPONENT.BAR}-${v}`,data:{filter:(()=>{if(p)return;const e=l.query.series(ta.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:p?i?ea.COLLECTION.STACKED_PRIMARY:ea.COLLECTION.STACKED_SECONDARY:i?ea.COLLECTION.PRIMARY:ea.COLLECTION.SECONDARY},preferredSize:f?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:ea.SCALE.MAJOR,fn:Ns({layoutService:o,axis:v}),ref:f?{start:"major",end:"major"}:void 0},minor:x,box:{width:km({isContinuous:f,isBarSeriesGrouped:h,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:y}),minWidthPx:f?Rm({chart:e,models:t,viewState:r,viewCache:n,axis:v}):void 0,fill:s.getColor(),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t,r;return!0===(null===(t=e.datum)||void 0===t||null===(r=t.null)||void 0===r?void 0:r.value)||S(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:Is({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:Es}}})}},Fm=({chart:e,models:t,viewState:r,viewCache:n,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c}=t,{isBarSeriesStacked:d,isContinuous:m,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:p}=o.meta,h=i?ra.PRIMARY:ra.SECONDARY,y=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===y)return!1;return{key:`${ea.COMPONENT.STACK_BAR}-${h}`,type:"box",data:{collection:i?ea.COLLECTION.STACKED_TOTAL_PRIMARY:ea.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:ea.SCALE.MAJOR,fn:Ns({layoutService:o,axis:h}),ref:m?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?ea.SCALE.MINOR.PRIMARY:ea.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:km({isContinuous:m,isBarSeriesGrouped:f,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:p}),minWidthPx:m?Rm({chart:e,models:t,viewState:r,viewCache:n,axis:h}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Vm({style:e,simplifiedPlacement:t}){return r=>lt.isDark(t.background?t.background.fill:r.node.attrs.fill)?e.lightColor:e.darkColor}function _m(e,t){const r="horizontal"===e.dockService.meta.major.orientation;return{placements:t.simplifiedPlacements.map((e=>function({simplifiedPlacement:e,style:t,isHorizontal:r}){const n=e.padding||{left:r?0:4,right:r?0:4,top:r?4:0,bottom:r?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:Vm({style:t,simplifiedPlacement:e}),overflow:e.overflow,background:e.background,padding:n}}({simplifiedPlacement:e,style:t.style,isHorizontal:r}))),label:t.label}}function Bm(e,t,r,n){const i=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:r}=t;return 0===r&&0===e?1:r<=0?-1:e>=0||r>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,n);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!r||i<0&&r?"right":"left"),o}const Hm=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:r,isContinuous:n}=t;return!r||!n},$m=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:r,isContinuous:n}=t;return!!r&&(!!n||!1!==e)};function zm(e,t,r,n){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:n}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:r}),i}const Um=({models:e,environment:t,isPrimary:r})=>{const{layoutService:n,seriesModel:i}=e,{meta:o}=n,a="rtl"===t.options.direction,s=e.themeService.getStyles(),l=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),u=r?ra.PRIMARY:ra.SECONDARY;if(!(r?i.meta.primaryBarSeriesCount:i.meta.secondaryBarSeriesCount)||!Hm(l,o))return!1;let c;!o.isBarSeriesStacked&&(c=o.isBarSeriesStacked?1:0);const d={label:e=>Xs(e.data,e),simplifiedPlacements:zm(c,0===c?1:0,o.isBarSeriesStacked?.5:1,o.isContinuous),style:s.label.value},m=[_m(e,d)],f=[{component:`${ea.COMPONENT.BAR}-${u}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Bm(t.data.end.value,e.dockService.meta.minor.orientation,a,0),labels:m,fontSize:s.label.value.numFontSize,fontFamily:s.label.value.fontFamily}}}];return{type:"labels",key:`${ea.COMPONENT.BAR_LABEL}-${u}`,layout:{minimumLayoutMode:xs.VALUE_LABEL},settings:{sources:f}}};function Ym(e,t,r){const n=[{position:e,onBackground:!0,justify:0,overflow:r}];return t&&n.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),n}function Wm({chart:e,models:t,environment:r,isPrimary:n}){const{meta:i}=t.layoutService,o="rtl"===r.options.direction,a=t.themeService.getStyles(),s=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),l=n?ra.PRIMARY:ra.SECONDARY;if(0===(n?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!$m(s,i))return!1;const u=e.formatter(n?ea.FORMATTER.PRIMARY:ea.FORMATTER.SECONDARY)||(e=>e),c=e=>0===e?"":u(e),d={label:e=>c(e.data.sumOfPositives.value),simplifiedPlacements:Ym("outside",true,i.isContinuous),style:a.label.value},m={label:e=>c(e.data.sumOfNegatives.value),simplifiedPlacements:Ym("opposite",true,i.isContinuous),style:a.label.value},f=[_m(t,d),_m(t,m)];return{type:"labels",key:`${ea.COMPONENT.STACK_BAR_LABEL}-${l}`,layout:{displayOrder:2,minimumLayoutMode:xs.VALUE_LABEL},settings:{sources:[{component:`${ea.COMPONENT.STACK_BAR}-${l}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Bm(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,o),labels:f,fontSize:a.label.value.numFontSize,fontFamily:a.label.value.fontFamily}}}]}}}var Gm=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:r}=t.meta,{max:n}=t.explicit;return!!r&&e>n&&n>0},hasMinHat:function(e,t){const{hasExplicitMin:r}=t.meta,{min:n}=t.explicit;return!!r&&e<n&&n<0}});const Km={min:"Min",max:"Max"};function Xm({chart:e,models:t,type:r,viewCache:n,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,discreteModel:d}=t,{isBarSeriesStacked:m,isContinuous:f,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:h}=a.meta,y=m?Fm({chart:e,models:t,viewCache:n,viewState:i,isPrimary:o}):jm({chart:e,models:t,viewCache:n,viewState:i,isPrimary:o}),g=o?l.query.getExtrema():u.query.getExtrema(),v=r===ws,b=o?ra.PRIMARY:ra.SECONDARY;if(!y)return!1;if(function(e,t){return!e.meta["hasExplicit"+Km[t]]}(g,r)||function(e,t,r){const n=r?e.implicit.bar.max:e.implicit.bar.min,i=Number(n.toFixed(13));return!Gm[`has${Km[t]}Hat`](i,e)}(g,r,v)||function(e,t,r){const n=r?e=>e<0:e=>e>0;return e.meta["hasExplicit"+Km[t]]&&n(e.explicit[t])}(g,r,v))return!1;let x="end";m&&(x=v?"sumOfPositives":"sumOfNegatives");const M=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?ea.SCALE.MINOR.PRIMARY:ea.SCALE.MINOR.SECONDARY)[r]()));const S=(({chart:e,type:t,isPrimary:r,dock:n})=>{let i=n;const o=e.component(`${ea.COMPONENT.SLICED_HAT}-${t}-${ra.PRIMARY}`),a=e.component(`${ea.COMPONENT.SLICED_HAT}-${t}-${ra.SECONDARY}`);return o&&a&&(i=r?n:`@${ea.COMPONENT.SLICED_HAT}-${t}-${ra.PRIMARY}`),i})({chart:e,type:r,isPrimary:o,dock:v?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${ea.COMPONENT.SLICED_HAT}-${r}-${b}`,layout:{dock:S},data:y.data,settings:{orientation:y.settings.orientation,major:y.settings.major,minor:y.settings.minor,hat:U({},y.settings.box,{fill:m?"#999":y.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=M(),r=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[x].value);return v?r>t:r<t},width:km({isContinuous:f,isBarSeriesGrouped:p,styleModel:c,discreteModel:d,isBarSeriesStackedInBothAxis:h}),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor()})},brush:Is({layoutService:a})}}const Jm={min:"Min",max:"Max"},Zm={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Qm({chart:e,models:t,type:r,viewCache:n,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,themeService:c}=t,{end:d,start:m}=s.meta.minor,{isBarSeriesStacked:f}=a.meta,p=f?Fm({chart:e,models:t,viewCache:n,viewState:i,isPrimary:o}):jm({chart:e,models:t,viewCache:n,viewState:i,isPrimary:o}),h=o?l.query.getExtrema():u.query.getExtrema(),y=r===ws?h.implicit.bar.max:h.implicit.bar.min,g=Number(y.toFixed(13)),v=o?ra.PRIMARY:ra.SECONDARY;if(!p)return!1;if(!ul[`is${Jm[r]}OutOfBounds`](g,h))return!1;const b=(({chart:e,type:t,end:r,start:n,isPrimary:i})=>{let o=t===ws?r:n;const a=e.component(ea.COMPONENT.LABEL_SPACE),s=e.component(`${ea.COMPONENT.SLICED_HAT}-${t}-${ra.PRIMARY}`),l=e.component(`${ea.COMPONENT.SLICED_HAT}-${t}-${ra.SECONDARY}`),u=e.component(`${ea.COMPONENT.BAR_OOB}-${t}-${ra.PRIMARY}`),c=e.component(`${ea.COMPONENT.BAR_OOB}-${t}-${ra.SECONDARY}`);return s?o=`@${ea.COMPONENT.SLICED_HAT}-${t}-${ra.PRIMARY}`:l?o=`@${ea.COMPONENT.SLICED_HAT}-${t}-${ra.SECONDARY}`:u&&c&&!i?o=`@${ea.COMPONENT.BAR_OOB}-${t}-${ra.PRIMARY}`:a&&t===ws&&(o="@"+ea.COMPONENT.LABEL_SPACE),o})({chart:e,type:r,end:d,start:m,isPrimary:o});let x="end";f&&(x=r===ws?"sumOfPositives":"sumOfNegatives");return{type:"box-out-of-bounds",key:`${ea.COMPONENT.BAR_OOB}-${r}-${v}`,layout:{dock:b},data:p.data,settings:{orientation:p.settings.orientation,major:p.settings.major,minor:p.settings.minor,dockValue:le.getDockValue(r===ws?d:m),oob:U({},p.settings.box,{fill:c.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const n=f&&0===e.datum[x].value,i=ul[`is${Jm[r]}OutOfBounds`](e.datum[x].value,h,r);return(!n||function({type:e,item:t,prop:r,extrema:n}){const i=t.datum[Zm[r]].value;return 0!==i&&ul[`is${Jm[e]}OutOfBounds`](i,n,e)}({type:r,item:e,prop:x,extrema:h}))&&i}})},brush:Is({layoutService:a})}}function ef(e){return Math.min(Math.max(0,e),1)}const tf=({chart:e,models:t,type:r,isPrimary:n})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(n?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:u,isBarSeriesGrouped:c,isBarSeriesStackedInBothAxis:d}=s.meta,m=e.scale(n?ea.SCALE.MINOR.PRIMARY:ea.SCALE.MINOR.SECONDARY),f=n?ra.PRIMARY:ra.SECONDARY,p=n?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),h=r===ws;if(!ll({extrema:p,type:r}))return!1;const y=e=>e.datum.start?e.datum.start.value:e.scale.min(),g=(e,t="end")=>e.datum[t]?e.datum[t].value:y(e);return{type:"box",key:`${ea.COMPONENT.GHOST_BAR_OOB}-${r}-${f}`,data:{filter:(()=>{if(l)return;const e=a.query.series(ta.BAR).filter((e=>e.isPrimary===n)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?n?ea.COLLECTION.STACKED_TOTAL_PRIMARY:ea.COLLECTION.STACKED_TOTAL_SECONDARY:n?ea.COLLECTION.PRIMARY:ea.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:ea.SCALE.MAJOR,fn:Ns({layoutService:s,axis:f}),ref:u?{start:"major",end:"major"}:void 0},minor:{scale:n?ea.SCALE.MINOR.PRIMARY:ea.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=y(e);return ef(e.scale(t))}},end:l?"max"===r?{ref:"sumOfPositives",fn:e=>{const t=g(e,"sumOfPositives");return ef(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=g(e,"sumOfNegatives");return ef(e.scale(t))}}:{ref:"end",fn:e=>{const t=g(e);return ef(e.scale(t))}}},box:{width:km({isContinuous:u,isBarSeriesGrouped:c,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=h?"sumOfPositives":"sumOfNegatives");const r=e.datum[t]?e.datum[t].value:m.max();return h?r>m.max():r<m.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function rf(e,t,r,n,i){const o=[{position:e,justify:0,overflow:r,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&o.push({position:"inside",onBackground:!1,justify:n||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const nf=({chart:e,models:t,type:r,environment:n,isPrimary:i})=>{const{layoutService:o,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,themeService:u,seriesModel:c}=t,d=u.getStyles(),{meta:m}=o,{isBarSeriesStacked:f}=m,p=e.formatter(i?ea.FORMATTER.PRIMARY:ea.FORMATTER.SECONDARY),h=o.getLayoutValue("dataPoint.showBarLabels",!1),y="horizontal"===a.meta.major.orientation,g="rtl"===n.options.direction;if(!(i?c.meta.primaryBarSeriesCount:c.meta.secondaryBarSeriesCount)||!f&&!Hm(h,m)||f&&!$m(h,m))return!1;const v=i?s.query.getExtrema():l.query.getExtrema();if(!v.meta.hasExplicit)return!1;const b=r===ws?v.implicit.bar.max:v.implicit.bar.min;if(!(r===ws?ol(b,v):al(b,v)))return!1;let x=e=>Xs(e.data,e);m.isBarSeriesStacked&&(x=r===ws?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(ol(e.data.sumOfPositives.value,v)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return p?p(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(al(e.data.sumOfNegatives.value,v)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return p?p(t):t}return""});const M={label:x,simplifiedPlacements:rf("outside",true,m.isContinuous,y,g),style:d.label.value},S={label:x,simplifiedPlacements:rf("opposite",true,m.isContinuous,y,g),style:d.label.value},E=[_m(t,M),_m(t,S)],C=i?ra.PRIMARY:ra.SECONDARY,q="horizontal"===a.meta.major.orientation?"down":"right",O=[{component:`${ea.COMPONENT.GHOST_BAR_OOB}-${r}-${C}`,selector:"rect",strategy:{type:"bar",settings:{direction:q,labels:E,fontSize:d.label.value.numFontSize,fontFamily:d.label.value.fontFamily}}}];return{key:`${ea.COMPONENT.BAR_OOB_LABEL}-${r}-${C}`,type:"labels",layout:{minimumLayoutMode:xs.VALUE_LABEL},settings:{sources:O}}},of=({chart:e,models:t,viewState:r,viewCache:n})=>[jm({chart:e,models:t,viewState:r,viewCache:n,isPrimary:!0}),jm({chart:e,models:t,viewState:r,viewCache:n,isPrimary:!1})],af=({chart:e,models:t,viewState:r,viewCache:n})=>[Fm({chart:e,models:t,viewState:r,viewCache:n,isPrimary:!0}),Fm({chart:e,models:t,viewState:r,viewCache:n,isPrimary:!1})],sf=({chart:e,models:t,environment:r})=>{const{isBarSeriesStacked:n}=t.layoutService.meta;if(n){return[Wm({chart:e,models:t,environment:r,isPrimary:!0}),Wm({chart:e,models:t,environment:r,isPrimary:!1})]}return[Um({models:t,environment:r,isPrimary:!0}),Um({models:t,environment:r,isPrimary:!1})]},lf=({chart:e,models:t,viewCache:r,viewState:n})=>[Xm({chart:e,models:t,type:"max",viewCache:r,viewState:n,isPrimary:!0}),Xm({chart:e,models:t,type:"min",viewCache:r,viewState:n,isPrimary:!0}),Xm({chart:e,models:t,type:"max",viewCache:r,viewState:n,isPrimary:!1}),Xm({chart:e,models:t,type:"min",viewCache:r,viewState:n,isPrimary:!1})],uf=({chart:e,models:t,viewCache:r,viewState:n})=>[Qm({chart:e,models:t,type:"max",viewCache:r,viewState:n,isPrimary:!0}),Qm({chart:e,models:t,type:"min",viewCache:r,viewState:n,isPrimary:!0}),Qm({chart:e,models:t,type:"max",viewCache:r,viewState:n,isPrimary:!1}),Qm({chart:e,models:t,type:"min",viewCache:r,viewState:n,isPrimary:!1})],cf=({chart:e,models:t})=>[tf({chart:e,models:t,type:"max",isPrimary:!0}),tf({chart:e,models:t,type:"min",isPrimary:!0}),tf({chart:e,models:t,type:"max",isPrimary:!1}),tf({chart:e,models:t,type:"min",isPrimary:!1})],df=({chart:e,models:t,environment:r})=>[nf({chart:e,models:t,type:"max",environment:r,isPrimary:!0}),nf({chart:e,models:t,type:"min",environment:r,isPrimary:!0}),nf({chart:e,models:t,type:"max",environment:r,isPrimary:!1}),nf({chart:e,models:t,type:"min",environment:r,isPrimary:!1})],mf=({chart:e,environment:t,models:r,viewState:n,viewCache:i})=>{const{seriesModel:o}=r,a=o.query.series(ta.BAR).slice(-1),s=o.query.series(ta.LINE),l=o.query.series(ta.MARKER);return[...of({chart:e,models:r,viewState:n,viewCache:i}),...af({chart:e,models:r,viewState:n,viewCache:i}),...s.map((e=>zs({models:r,environment:t,series:e}))),...s.map((e=>Ks({models:r,series:e,environment:t}))),...l.map((n=>Bs({chart:e,models:r,series:n,environment:t}))),...s.map((n=>Js({chart:e,models:r,environment:t,series:n,lineSeries:s}))),...sf({chart:e,models:r,environment:t}),...lf({chart:e,models:r,viewCache:i,viewState:n}),...uf({chart:e,models:r,viewCache:i,viewState:n}),...cf({chart:e,models:r}),...df({chart:e,models:r,environment:t}),dl({chart:e,models:r,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),dl({chart:e,models:r,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),el({chart:e,models:r,environment:t,lineSeries:s})]},ff=0,pf=1,hf=3;function yf({models:e}){const{dockService:t,seriesModel:r,layoutService:n,themeService:i}=e,{auto:o,spacing:a}=n.getLayoutValue("gridLine",{});if(!o&&a===ff)return!1;const s=i.getStyles(),l=r.meta.primarySeries.length>0;return{key:ea.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:xs.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!o&&a===pf)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!o&&a===hf,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?ea.SCALE.MINOR.PRIMARY:ea.SCALE.MINOR.SECONDARY}}function gf({models:e}){const{primaryExtremumModel:t,primaryTickModel:r,themeService:n,dockService:i,seriesModel:o}=e,a=t.query.getExtrema();return!!(o.meta.primarySeries.length>0&&a.meta.includesZero)&&{key:ea.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:xs.GRID_LINE},show:()=>r.query.getMin()<=0&&r.query.getMax()>=0,lines:{["horizontal"===i.meta.minor.orientation?"x":"y"]:[{value:0,scale:ea.SCALE.MINOR.PRIMARY,line:{stroke:n.getStyles().grid.line.highContrast.color}}]}}}function vf({models:e}){const{layoutService:t,themeService:r}=e,{isContinuous:n,isTime:i}=t.meta;if(!n)return[];const o=r.getStyles(),a={type:"grid-line",layout:{minimumLayoutMode:xs.GRID_LINE},ticks:{stroke:o.grid.line.major.color},minorTicks:{show:!1,stroke:o.grid.line.minor.color}};return i?[U(!0,{},a,{key:"time-inner-grid",x:{scale:ea.SCALE.MAJOR_INNER},ticks:{stroke:o.grid.line.minor.color}}),U(!0,{},a,{key:"time-outer-grid",x:{scale:ea.SCALE.MAJOR}})]:[U(!0,{},a,{key:"continuous-grid",x:{scale:ea.SCALE.MAJOR},minorTicks:{show:!0}})]}function bf({models:e}){return[yf({models:e}),gf({models:e}),...vf({models:e})]}function xf({models:e,environment:t,actions:r}){const{layoutService:n,dockService:i,propertiesModel:o,appModel:a,genericObjectModel:s,themeService:l}=e,u=o.query.getProperties(),c=n.getLayoutValue("dimensionAxis");if(!c)return!1;const{show:d}=c;if("all"!==d&&"title"!==d)return!1;const{orientation:m}=i.meta.major,f=l.getStyles();return{type:"data-title",key:ea.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:xs.AXIS_TITLE.MAJOR[m.toUpperCase()]},settings:{hyperCube:n.getHyperCube(),hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!0,disabled:()=>!r.interact.enabled(),model:s,app:a,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0},style:{fontFamily:f.axis.title.fontFamily,fontSize:f.axis.title.fontSize,color:f.axis.title.color}}}const Mf=(e,t,r)=>e.query.seriesByAxis(r).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function Sf({models:e,environment:t,actions:r}){const{layoutService:n,dockService:i,seriesModel:o,propertiesModel:a,appModel:s,genericObjectModel:l,themeService:u}=e,c=a.query.getProperties(),d=n.getLayoutValue("measureAxes");if(!d||!d.length)return!1;const m=u.getStyles(),{measureAxes:f}=o.meta;return f.filter((e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show)).map((e=>{const a=n.getHyperCube(),{isPrimary:u}=e,d=o.query.seriesByAxis(u).length>1,f={type:"data-title",key:u?ea.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:ea.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:u?i.meta.minor.dock:i.meta.minorSecondary.dock,minimumLayoutMode:xs.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!1,explicitItemInfos:Mf(o,a.qMeasureInfo,u),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const r=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==r){const n=e.qAttributeExpressions.splice(r,1)[0];t.qAttributeExpressions.unshift(n)}},disabled:()=>!r.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:m.axis.title.fontFamily,fontSize:m.axis.title.fontSize,color:m.axis.title.color}};return d&&(f.settings.padding="0",f.settings.minWidth="auto"),f}))}function Ef({models:e,environment:t,actions:r}){return[xf({models:e,environment:t,actions:r}),...Sf({models:e,environment:t,actions:r})]}function Cf({models:e,environment:t,viewState:r,viewCache:n}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:u,isDiscrete:c,isContinuous:d}=o.meta,m="rtl"===t.options.direction;return!(u&&!d)&&function({layoutService:e,dockService:t,discrete:r,continuousDataModel:n,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=Na({layoutService:e,override:l});if(d.none)return!1;const{orientation:m}=t.meta.major,f={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?n.getDimensionCardinality()>1:r.query.getCanScroll(),settings:{orientation:m,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Aa({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(f.settings.style="slim",f.settings.size={area:"touch"===c?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(f.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(f.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&u&&(f.settings.injections=()=>[Oa({layoutService:e,discrete:r})]),f}({viewState:r,viewCache:n,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:m,scrollbarOverride:{predicate:()=>c,value:qa.OPTIONS.BAR.value},deviceType:t.deviceType})}function qf({chart:e,models:t,viewState:r,viewCache:n,isPrimary:i}){const{layoutService:o}=t,a=jm({chart:e,models:t,viewState:r,viewCache:n,isPrimary:i});if(!a)return!1;const s=i?ra.PRIMARY:ra.SECONDARY;return a.key=`${ea.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?ea.COLLECTION.REDUCED_STACKED_PRIMARY:ea.COLLECTION.REDUCED_STACKED_SECONDARY:i?ea.COLLECTION.REDUCED_PRIMARY:ea.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?ea.SCALE.MINOR.REDUCED_PRIMARY:ea.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=ea.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function Of({environment:e,models:t}){const r=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(ta.LINE).map((n=>{const i=zs({models:t,environment:e,series:n});return i.key=ks(ea.COMPONENT.MINI_CHART.LINE,n),i.data.collection=ea.COLLECTION.REDUCED,i.settings.coordinates.minor.scale=n.isPrimary?ea.SCALE.MINOR.REDUCED_PRIMARY:ea.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=ea.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===r(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i}))}function Af({models:e,environment:t}){return e.seriesModel.query.series(ta.MARKER).map((r=>{const n=Bs({models:e,environment:t,series:r});return n.key=ks(ea.COMPONENT.MINI_CHART.MARKER,r),n.data.collection=ea.COLLECTION.REDUCED,n.settings.y.scale=r.isPrimary?ea.SCALE.MINOR.REDUCED_PRIMARY:ea.SCALE.MINOR.REDUCED_SECONDARY,n.settings.x.scale=ea.SCALE.REDUCED,n.layout={dock:"@scrollbar"},n}))}function Df({chart:e,models:t,viewState:r,viewCache:n,environment:i}){return as(t)?[qf({chart:e,models:t,viewState:r,viewCache:n,isPrimary:!0}),qf({chart:e,models:t,viewState:r,viewCache:n,isPrimary:!1}),...Of({environment:i,models:t}),...Af({models:t,environment:i})]:[]}function Nf({models:e,environment:t}){const{type:r}=e.colorService.getSettings();if("categorical"!==r)return!1;const n=de({key:ea.COMPONENT.LEGEND_TOOLTIP,rtl:"rtl"===t.options.direction}),i=e.themeService.getStyles();return U(!0,n,{settings:{filter:e=>function({nodes:e}){return e.filter((e=>e.data&&e.key===ea.COMPONENT.LEGEND_CATEGORICAL))}({nodes:e}),extract:e=>function({context:e}){return[[{content:e.node.data.label,style:{"font-weight":"bold","text-align":"left"},colspan:2}]]}({context:e}),placement:"pointer"},scale:ea.SCALE.COLOR,style:{content:{fontFamily:i.fontFamily}}})}function Tf({colorSettings:e,nodes:t}){let r=t.filter((e=>e.data[ea.SCALE.COLOR]&&(e=>e.data[ea.SCALE.COLOR].value===e.data.end.value)(e)))[0];return r||(null!=e&&e.field&&([r]=t.filter((t=>{var r,n;return(null===(r=t.data[ea.SCALE.COLOR])||void 0===r||null===(n=r.source)||void 0===n?void 0:n.field)===e.field}))),r||t[0])}const If=({models:e,rtl:t})=>{const{detectTextDirection:r}=he,n=e.colorService.getSettings();return function({context:e,nodes:i}){const o=Tf({colorSettings:n,nodes:i}),a=function({colorSettings:e,context:t,node:r}){const{color:n}=r.data;if("color"===e.type||!n||!e.fieldType)return;const{value:i,label:o}=n,{key:a,field:s}=n.source,{dataset:l}=t.resources,u=l(a).field(s).formatter();if(u&&"measure"===e.fieldType)return Number.isNaN(i)?"-":u(n.value);const c=o||i;return Number.isNaN(c)||"NaN"===c?"-":c}({colorSettings:n,context:e,node:o});if(void 0===a)return!1;const s=function({colorSettings:e,context:t,node:r}){if(e.label)return e.label;const{color:n}=r.data;if("color"!==e.type&&n){const{dataset:e}=t.resources,{key:r,field:i}=n.source;return e(r).field(i).title()}}({colorSettings:n,context:e,node:o}),l=function({node:e}){const{data:t,attrs:r}=e;return t.fillColor?t.fillColor:r&&r.fill?r.fill:void 0}({node:o}),u=e.h("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{label:t?[":",s]:[s,":"],value:t?[a,u]:[u,a],labelDirection:r(s),valueDirection:r(a)}}};function wf({chart:e,models:t,rtl:r,translator:n}){const{detectTextDirection:i}=he,{tooltipModel:o,layoutService:a}=t,s=If({models:t,rtl:r}),l=function({rtl:e}){const{detectTextDirection:t}=he;return function({node:r,dataset:n}){var i,o;const{segment:a,end:s}=r.data,{value:l,label:u,source:c}=a||s,{key:d,field:m}=c,f=n(d).field(m),p=f.title();let h;return h=f.raw().isCustomFormatted?u:""===l||Number.isNaN(l)||!0===(null===(i=r.data)||void 0===i||null===(o=i.null)||void 0===o?void 0:o.value)?"-":f.formatter()(l),{label:e?[":",p]:[p,":"],value:h,labelDirection:t(p),valueDirection:t(l)}}}({rtl:r});return function({context:t}){const u=t.node.childrenNodes,{data:c}=u[0],{dataset:d}=t.resources,m=c.label,f=s({context:t,nodes:u}),p={dataId:c.value,title:{label:m,direction:i(m)},color:f},h=u.map((t=>l({chart:e,node:t,dataset:d}))).filter(((e,t,r)=>t===r.findIndex((t=>t.label[0]===e.label[0]&&t.value===e.value))));if(p.measures=f?h.filter((e=>e.label[0]!==f.label[0]||e.value!==f.value[1])):h,o.query.useCustomTooltip()){var y,g;const e=a.getLayout();e.tooltip.hideBasic&&(p.measures=[],p.color=void 0);const{customTooltipInfoAttrExpsArr:s,customTooltipAttrExpsArr:l}=xa({nodes:[u[0]],layout:e,dataset:d});if([p.customTitle]=s.filter((e=>e.id===ia.CUSTOM.TITLE)).map((e=>{const t=e;return t.direction=i(p.customTitle),t})),[p.customDescription]=s.filter((e=>e.id===ia.CUSTOM.DESCRIPTION)).map((e=>{const t=e;return t.direction=i(p.customDescription),t})),p.customMeasures=l.map((e=>{const t=e;return t.label=r?[":",t.label]:[t.label,":"],t.value=""===t.value||"NaN"===t.value?"-":t.value,t.valueDirection=i(e.value),t.labelDirection=i(e.label),e})),null!==(y=(g=o.query).useTooltipChart)&&void 0!==y&&y.call(g))if(o.query.hasChartLimitation()){ma.destroyVisualization({customTooltipModel:o.query.getCustomTooltipModel()});const e=n.get("properties.tooltip.notselectedmessage");p.customLimitation=e}else{const r=ma.createContainer({ctx:t,layout:e});p.customChart=r}let c=[];u.forEach((e=>{var t,r;(null===(t=e.data)||void 0===t||null===(r=t.customTooltipImages)||void 0===r?void 0:r.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(c=e.data.customTooltipImages)})),c.length>0&&(p.customImages=c)}return p}}function Lf(e){return(null==e?void 0:e.type)||ta.BAR}const Rf={circle:"circle",square:"rect",diamond:"path",triangle:"path",bar:"rect"},kf=[`${ea.COMPONENT.BAR}-${ra.PRIMARY}`,`${ea.COMPONENT.BAR}-${ra.SECONDARY}`];const Pf=({chart:e,seriesModel:t,value:r})=>{const n=function({value:e,chart:t,seriesModel:r}){const n=r.meta.allSeries,i=[];return n.forEach((r=>{const n=Lf(r);n===ta.BAR?i.push(...t.findShapes("rect").filter((t=>-1!==kf.indexOf(t.key)&&t.data.typeIndex.value===r.typeIndex&&t.data.major.value===e))):n===ta.LINE?i.push(...t.findShapes("circle").filter((t=>t.key===`${ea.COMPONENT.POINT}-${r.id}`&&t.data.major.value===e))):i.push(...t.findShapes(Rf[r.options.marker]).filter((t=>t.key===`${ea.COMPONENT.MARKER}-${r.id}`&&t.data.major.value===e)))})),i}({chart:e,seriesModel:t,value:r});if(0===n.lenght)return null;return{bounds:Qo.combineBounds(n.map((e=>e.bounds))),data:n.map((e=>e.data)),childrenNodes:n,key:n[0].key}},jf=[`${ea.COMPONENT.BAR}-${ra.PRIMARY}`,`${ea.COMPONENT.BAR}-${ra.SECONDARY}`,`${ea.COMPONENT.BAR_OOB}-${ws}`,`${ea.COMPONENT.BAR_OOB}-${Ls}`,`${ea.COMPONENT.BAR_OOB}-${ws}-${ra.PRIMARY}`,`${ea.COMPONENT.BAR_OOB}-${Ls}-${ra.PRIMARY}`,`${ea.COMPONENT.BAR_OOB}-${ws}-${ra.SECONDARY}`,`${ea.COMPONENT.BAR_OOB}-${Ls}-${ra.SECONDARY}`,`${ea.COMPONENT.SLICED_HAT}-${ws}`,`${ea.COMPONENT.SLICED_HAT}-${Ls}`,`${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.PRIMARY}`,`${ea.COMPONENT.SLICED_HAT}-${Ls}-${ra.PRIMARY}`,`${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.SECONDARY}`,`${ea.COMPONENT.SLICED_HAT}-${Ls}-${ra.SECONDARY}`,`${ea.COMPONENT.DATA_OOB_MARKER}-${ws}`,`${ea.COMPONENT.DATA_OOB_MARKER}-${Ls}`,ea.COMPONENT.AXIS.MAJOR],Ff=({chart:e,models:t,nodes:r})=>{const{seriesModel:n}=t,{pointComponentKeys:i,markerComponentKeys:o}=n.meta,a=[...i,...o],s=[...jf,...a];return r.length?(({chart:e,nodes:t,seriesModel:r})=>{const n=[],i=[];for(let o=0;o<t.length;++o){const{value:a}=t[o].data||{};if(void 0!==a&&-1===i.indexOf(a)){i.push(a);const t=Pf({chart:e,seriesModel:r,value:a});t&&n.push(t)}}return n})({chart:e,nodes:r.filter((e=>(({node:e})=>s.map((t=>-1!==e.key.indexOf(t))).some((e=>!0===e)))({node:e}))),seriesModel:n}):[]};function Vf({chart:e,models:t,environment:r}){const n=t.seriesModel.query.all(),i="rtl"===r.options.direction,{translator:o}=r,{appModel:a,tooltipModel:s,propertiesModel:l}=t,u=null==s?void 0:s.query.getCustomTooltipModel(),c=null==l?void 0:l.query.getProperties(),d=de({key:ea.COMPONENT.TOOLTIP,rtl:i}),m=function({chart:e,models:t,rtl:r,translator:n}){const i=wf({chart:e,models:t,rtl:r,translator:n});return function({context:e}){const t=i({context:e}),{dataId:n,title:o,color:a,measures:s,customTitle:l,customDescription:u,customMeasures:c,customImages:d,customChart:m,customLimitation:f}=t,p={dataId:n,title:[{content:o.label,style:{"font-weight":"bold","text-align":r?"right":"left",direction:o.direction},colspan:2}],color:void 0,measures:[]};return a&&(p.color=[{content:a.label,style:{"text-align":r?"right":"left",direction:a.labelDirection}},{content:a.value,style:{"text-align":r?"left":"right","vertical-align":"middle",direction:a.valueDirection}}]),p.measures=s.map((e=>[{content:e.label,style:{"text-align":r?"right":"left",direction:e.labelDirection}},{content:e.value,style:{"text-align":r?"left":"right","vertical-align":"middle",direction:e.valueDirection}}])),(l||u)&&0===c.length&&0===s.length&&(p.title=[]),l&&(p.customTitle=[{content:l.title,style:{"font-weight":"bold","text-align":r?"right":"left",direction:l.direction},colspan:2}]),u&&(p.customDescription=[{content:u.value,style:{"text-align":r?"right":"left",direction:u.direction},colspan:2}]),c&&(p.customMeasures=c.map((e=>[{content:e.label,style:{"text-align":r?"right":"left",direction:e.labelDirection}},{content:e.value,style:{"text-align":r?"left":"right","vertical-align":"middle",direction:e.valueDirection}}]))),m&&(p.customChart=m),f&&(p.customLimitation=ya.getFooterRow(f,e)),d&&(p.customImages=d.map((t=>ya.getImageRow(t,e)))),p}}({chart:e,models:t,rtl:i,translator:o,series:n});let f=[];return U(!0,d,{settings:{filter:r=>Ff({chart:e,models:t,nodes:r}),extract:e=>{var r,n,i;if(e&&(f=null!==(r=e.node)&&void 0!==r&&r.childrenNodes?[...e.node.childrenNodes]:[e.node],null!==(n=t.layoutService)&&void 0!==n&&null!==(i=n.meta)&&void 0!==i&&i.isContinuous)){const e=[];for(let t=0;t<f.length;t++){var o,a;null!==(o=f[t].data)&&void 0!==o&&null!==(a=o.selectionDimension)&&void 0!==a&&a.value&&(e[t]={data:{value:f[t].data.selectionDimension.value}})}f=e}return m({context:e})},content:({h:e,data:t,style:r})=>{const n=t,{visible:a,hidden:s}=function({sections:e}){const t={visible:[],hidden:[]};return e.reduce(((e,r)=>((e<7?t.visible:t.hidden).push(r),((e,t)=>{const r=void 0===t.color?0:1,{length:n}=t.measures;return e+1+r+n+(t.customLimitation||t.customChart||t.customImages&&t.customImages.length>0?7:0)})(e,r))),0),t}({sections:n}),l=a.reduce(((e,t)=>{const{title:r,color:n,measures:i,customTitle:o,customDescription:a,customMeasures:s,customImages:l,customChart:u,customLimitation:c}=t;return o&&e.push(o),a&&e.push(a),e.push(r),n&&e.push(n),e.push(...i),s&&e.push(...s),u&&e.push(u),c&&e.push(c),l&&e.push(...l),e}),[]);return s.length&&l.push(function({count:e,translator:t,rtl:r}){const{detectTextDirection:n}=he,i=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:i,style:{"font-weight":"bold","text-align":r?"right":"left",direction:n(i)},colspan:2}]}({count:s.length,rtl:i,translator:o})),l.map((t=>e("tr",{},function(e,{h:t,style:r}){return e.map((e=>{const n={style:{...r.cell||{},...e.style||{}},class:e.class};return e.colspan&&(n.colspan=e.colspan),t("td",n,e.content)}))}(t,{h:e,style:r}))))},placement:"bounds",afterShow:()=>{s.query.useTooltipChart()&&s.query.useCustomTooltip()&&!s.query.hasChartLimitation()&&ma.show({app:a,properties:c,selectedNodes:f,customTooltipModel:u,rtl:i})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function _f({chart:e,models:t,environment:r}){return[Nf({models:t,environment:r}),Vf({chart:e,models:t,environment:r})]}function Bf({models:e}){const{layoutService:t,dockService:r}=e,{isContinuous:n,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!n)return[!1];const a=xs.AXIS.MAJOR[r.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:ea.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:ea.SCALE.MAJOR_INNER,layout:{dock:"@"+ea.COMPONENT.AXIS.TIME_INNER,minimumLayoutMode:a}},{type:"axis-overlay",key:ea.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:ea.SCALE.MAJOR,layout:{dock:"@"+ea.COMPONENT.AXIS.TIME_OUTER,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:ea.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:ea.SCALE.MAJOR,layout:{dock:"@"+ea.COMPONENT.AXIS.MAJOR_CONTINUOUS,minimumLayoutMode:a}}]}function Hf({chart:e,models:t,environment:r}){const{refLineModel:n,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:u}=t,c=l.qLocaleInfo,{options:d,theme:m}=r,f="rtl"===d.direction,p=u.query.series(ta.BAR).filter((e=>e.isPrimary)),h=u.query.series(ta.BAR).filter((e=>!e.isPrimary)),y=u.query.series(ta.LINE),g=u.query.series(ta.MARKER),v=u.query.all(),b=v.some((e=>e.isPrimary)),x=v.some((e=>!e.isPrimary)),M=b&&x,S={resolveUIColor:o.getPaletteColor},E=b?Jo({refLineModel:n,layoutService:i,colorModel:S,dock:M?a.meta.minor.dock:a.meta.minor.opposite,scale:ea.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:ea.FORMATTER.PRIMARY,theme:m,localeInfo:c,rtl:f,key:ea.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],C=x?Jo({refLineModel:n,layoutService:i,colorModel:S,dock:M?a.meta.minor.opposite:a.meta.minor.dock,scale:ea.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:ea.FORMATTER.SECONDARY,theme:m,localeInfo:c,rtl:f,key:ea.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&Ko({refLineModel:n,layoutService:i,colorModel:S,dockService:a,chart:e,scale:ea.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:ea.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:xs.REFERENCE_LINE}),!!x&&Ko({refLineModel:n,layoutService:i,colorModel:S,dockService:a,chart:e,scale:ea.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:ea.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:xs.REFERENCE_LINE}),Ko({isDimension:!0,refLineModel:n,layoutService:i,colorModel:S,dockService:a,chart:e,scale:ea.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:f,key:ea.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:p.length?`${ea.COMPONENT.BAR}-${ra.PRIMARY}`:h.length?`${ea.COMPONENT.BAR}-${ra.SECONDARY}`:y.length?`${ea.COMPONENT.LINE}-${y[0].id}`:g.length?`${ea.COMPONENT.MARKER}-${g[0].id}`:`${ea.COMPONENT.BAR}-${ra.PRIMARY}`,minimumLayoutMode:xs.REFERENCE_LINE}),...E,...C,...Jo({isDimension:!0,refLineModel:n,layoutService:i,colorModel:S,dock:a.meta.major.opposite,scale:ea.SCALE.MAJOR,style:s.getStyles(),theme:m,localeInfo:c,rtl:f,key:ea.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function $f(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var zf=[{key:"NoDataExist",alignment:"center",condition:({layoutService:e})=>{const{x:t,y:r}=e.meta.size;return t*r==0}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>{const{isContinuous:t}=e.meta;if(!t)return!1;const r=e.getHyperCubeValue("qDimensionInfo.0");return r&&(r.qMax<r.qMin||"NaN"===r.qMax)}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>e.getHyperCubeValue("qMeasureInfo").every($f)},{key:"DataRangeIncludingZero",alignment:"bottom",condition:({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:r,flags:n})=>{if(!1===e.getLayout().showDisclaimer&&n.isEnabled("SHOW_DISCLAIMER"))return!1;const i=e.getLayoutValue("measureAxis.logarithmic",!1),o=t.query.getExtrema(),a=r.query.getExtrema();return i&&(o.meta.includesZero||a.meta.includesZero)}}];function Uf({environment:e,models:t}){const{flags:r,translator:n,options:i}=e,{layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=function({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:r,flags:n}){let i,o;for(let a=0,s=zf.length;a<s;a++){i=zf[a];try{o=i.condition({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:r,flags:n})}catch(e){throw Error("failing disclaimer condition",e)}if(o)return i}return!1}({layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s,flags:r});if(!l)return!1;return function(e,t,r){if(!e)return!1;const{translator:n}=t,{rtl:i}=r;return{key:"disclaimer",type:"disclaimer",layout:{dock:G[e].alignment},settings:{label:n.get("Object.Disclaimer."+e),rtl:i}}}(l.key,{translator:n},{rtl:"rtl"===i.direction})}function Yf({layoutService:e}){return!!as({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:ea.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function Wf({models:e,environment:t}){const{layoutService:r,colorService:n,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:u,isGroupedByMeasure:c}=r.meta;if(!s)return!1;const{options:d}=t,m=r.getLayoutValue("color",{}),f=e=>e.filter((e=>Lf(e)===ta.LINE)).map((e=>({key:ks(ea.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),p=!m.auto&&"byMeasure"===m.mode&&m.byMeasureDef&&void 0!==m.byMeasureDef.activeMeasureIndex,h=r.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:ea.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:f(o.meta.primarySeries),secondary:f(o.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>n.getSettingsForMeasure(e),colorByData:e=>!h[e]&&p,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:o.meta.barSeriesCount,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function Gf({models:{fieldModel:e}}){return{[ea.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[ea.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}function Kf({model:e,layoutService:t,definitionPath:r="/qHyperCubeDef"}){return{fetch(t,n){const i={qStart:t,qEnd:n,qNbrPoints:this.computeNbrOfBins(),qMaxNbrTicks:300,qMaxNumberLines:this.computeMaxNumberLines()};return e.getHyperCubeContinuousData(r,i,!1)},shouldFetchReduced(){const{qHyperCube:e}=t.getLayout();return e.qSize.qcy*e.qMeasureInfo.length>=2e3},computeNbrOfBins(){const{qHyperCube:e}=t.getLayout();if(!this.shouldFetchReduced())return 2e3;let r=e.qMeasureInfo.length||1,n=4+2*(r-1);return e.qDimensionInfo.length>1&&(r=Math.max(1,Math.min(12,t.meta.size.dimensions[1])),n=4),Math.ceil(2e3/(r*n))},computeMaxNumberLines(){const{qHyperCube:e}=t.getLayout();return e.qDimensionInfo.length>1&&!this.shouldFetchReduced()?t.meta.size.dimensions[1]+1:12}}}function Xf(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Jf({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:r}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:r})},getSnapshotData(){const r=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in r&&"min"in r.zoom&&"max"in r.zoom?function({zoom:e}){return{zoom:e}}(r):function({scrollOffset:e=0,viewRange:t=0},r){let n=r+e,i=n+t;return 1===t&&0===e&&(n=r-.5,i=r+.5),{zoom:{min:n,max:i}}}(r,t.get("continuousMin"))}}}function Zf(){const e=()=>{},t=[],r={};return e.set=(e,n)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),r[e]=n},e.forEach=e=>{t.forEach(((t,n)=>e(r[t],n)))},e.has=e=>e in r,e}function Qf(e,t,r){return r[0]&&r[0][1]&&r[0][1].qElemNumber>-1?function({start:e,end:t,matrix:r}){const n=[],i=Zf(),o=Zf();for(let a=0;a<r.length;a++){const s=r[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&&n.push(s)}return i.forEach(((e,t)=>n.splice(t,0,e))),o.forEach((e=>n.push(e))),n}({start:e,end:t,matrix:r}):function({start:e,end:t,matrix:r}){const n=[];let i,o;for(let a=0;a<r.length;a++){const s=r[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&n.push(s)}return i&&n.unshift(i),o&&n.push(o),n}({start:e,end:t,matrix:r})}function ep(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function tp(e,t,r){const n={qDataPages:(r.qDataPages||[]).map((r=>{const n=Qf(e,t,r.qMatrix),i=ep(r.qArea,n);return{...r,qArea:i,qMatrix:n}}))};return r.qAxisData&&r.qAxisData.qAxis&&(n.qAxisData=function(e,t,r){return{qAxis:r.qAxis.map((r=>({qName:r.qName,qTags:r.qTags,qTicks:r.qTicks.reduce(((r,n)=>((n.qStart>=e&&n.qStart<=t||n.qEnd>=e&&n.qEnd<=t||n.qStart<e&&n.qEnd>t)&&r.push(n),r)),[])})))}}(e,t,r.qAxisData)),n}function rp(e){return e.qIsOtherCell}function np({qDataPages:e=[]}={},t={}){const r=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(rp)){const r=e[0].qElemNumber;t[r]=void 0}})),Object.keys(t).length}(r):function(e){let t=0;return e.forEach((e=>{e.some(rp)||t++})),t}(r)}const ip={command:{processDataPage:()=>{}}};var op={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[,r]=e.domain();for(let e=0;e<t.length;e++){const n=t[e],i=t[e+1];n.data={},i||1===n.end?i?(n.data.start=n.value,n.data.end=i.value,n.end=i.position):(n.data.start=n.value,n.data.end=n.value):(n.data.start=n.value,n.data.end=r,n.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,r=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 n=t[0];r.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],n.data.start]},x:0,y:0,width:n.start*this.rect.width,height:this.rect.height})}return r}};function ap(e,t=1){if(t%2==0)return e;let r=Math.round(e);return e-r>0?r+=.5:r-=.5,r}function sp(e,t){const{localProps:{size:r},props:{anchor:n}}=t,i=function({props:e,localProps:{size:t},style:r,renderer:n}){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=>n.measureText({text:e,fontSize:r.label.fontSize,fontFamily:r.label.fontFamily});return{resolve:(e,n)=>{const l="string"==typeof e.label?e.label:"",u=s(l);let{x:c,width:d}=n;e.start===e.end&&(d=u.width+2*i,1===e.end&&(c-=d));const m={x:c+i,y:i,width:d-2*i,height:t.height-2*i},f=s(l[0]+"…").width,p=Math.max(0,m.width-u.width),h=Math.max(0,m.height-u.height),y=o*p,g=a*h;return{show:m.width>=Math.min(f,u.width),text:l,dx:y,dy:g,rect:m,style:r.label,segment:{x:c+y,width:u.width+2*i}}}}}(t),o=function({localProps:{size:e},style:t,scale:r,props:n}){const[i,o]=r.domain(),a=Math.max(0,Math.min(1,n.guideLine.major.justify));return{resolve:(r,n)=>{const s=a*n.width,l=ap(n.x+s,t.majorGuideLine.strokeWidth);return{show:r.value>=i&&r.value<=o,x1:l,y1:0,x2:l,y2:ap(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine}}}}(t),a=e.map((e=>{const t=function(e,t,r){const n=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[r],0)*t.width,y:0,width:n,height:t.height}}(e,r,n);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const r=e.length;if(r<2)return;const n=e[r-1],i=t[r-1].label;if(n&&n.start===n.end)for(let e=r-2;e>-1;e--){const r=t[e].label;r.show=r.show&&(o=r.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 lp(e,t){const r=function({localProps:{size:e},props:t,style:r}){return{resolve:n=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=ap(n.position*e.width,r.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:ap(i,r.minorGuideLine.strokeWidth),x2:o,y2:ap(t.guideLine.minor.size+i,r.minorGuideLine.strokeWidth),style:r.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(r.resolve):[]}function up(e){return e.filter((e=>e.show)).map((e=>U({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2})))}var cp={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}),r=t.filter((e=>!e.isMinor)),n=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:r}){const n=ap(1,t.line.strokeWidth);return{show:r.line.show,x1:ap(0,t.line.strokeWidth),y1:n,x2:ap(e.width,t.line.strokeWidth),y2:n,style:t.line}}(this),this.state.major=sp(r,this),this.state.minor=lp(n,this)},render(){return[...up([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>U({},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"})))),...up(this.state.major.map((e=>e.guideLine))),...up(this.state.minor.map((e=>e.guideLine)))];var e}};function dp(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,r)=>e.qStart===t.qTicks[r].qStart&&e.qEnd===t.qTicks[r].qEnd))}function mp(e){return e.qTags.indexOf("$qualified")>-1}function fp({qAxis:e}){const t=[],r=[];for(let n=0;n<e.length;n++){const i=n+1,o=e[n],a=e[i];dp(o,a)?(mp(a)?(t.push(i),r.push(n)):(t.push(n),r.push(i)),n++):(t.push(n),r.push(n))}return{qualified:t,nonQualified:r}}function pp({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(r){let n,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const u=e[l];if(u.queries.outer(r)){const e=t[l+1];if(i=u.index,n=l,u.attrs.isDayOrShorter()&&u.queries.canFitHalfDayTicks(r)){o="auto",s=!0;break}if(e&&e.queries.inner(r)){o=e.index;const n=t[l+2];n&&n.queries.minor(r)&&(a=n.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[n+1];e&&e.queries.minor(r)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function hp({qTicks:e,measureText:t=(()=>({width:0})),cache:r={},scale:n}){const i=r;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(n(e.qStart)-n(e.qEnd))))):0,i.maxRange),rangeAndWidth(){const r=n.clamp();return n.clamp(!1),i.rangeAndWidth=e.map((e=>({range:Math.abs(n(e.qStart)-n(e.qEnd)),width:t(""+e.qText).width+16}))),n.clamp(r),i.rangeAndWidth}}}function yp({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:r})=>e>r*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:r})=>e>r*t)),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:r=>r>=t*e.count()}}function gp({qualified:e,nonQualified:t,qAxis:r,measureText:n,reqAutoFitWidth:i,scale:o},{attributesFactory:a=hp,queryFactory:s=yp}={attributesFactory:hp,queryFactory:yp}){const l=r.map(((e,t)=>function(e,t){const{qTicks:r}=e,l=a({qTicks:r,measureText:n,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function vp({qAxis:e=[],measureText:t=(()=>({width:0})),cache:r={},reqAutoFitWidth:n=0,scale:i},{metaFactory:o=gp,mapper:a=fp,resolver:s=pp}={metaFactory:gp,mapper:fp,resolver:pp}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:n,scale:i}),m=s({qualifiedMeta:c,nonQualifiedMeta:d});return{resolve:t=>{const n=r.key({distance:t});if(r.get(n))return r.get(n);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=m.resolve(t);return r.set(n,i),i}}}function bp(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const xp=bp(0).getTime();function Mp(e){return(e.getTime()-xp)/86400/1e3}var Sp=new Date,Ep=new Date;function Cp(e,t,r,n){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(r){return e(r=new Date(r-1)),t(r,1),e(r),r},i.round=function(e){var t=i(e),r=i.ceil(e);return e-t<r-e?t:r},i.offset=function(e,r){return t(e=new Date(+e),null==r?1:Math.floor(r)),e},i.range=function(r,n,o){var a,s=[];if(r=i.ceil(r),o=null==o?1:Math.floor(o),!(r<n&&o>0))return s;do{s.push(a=new Date(+r)),t(r,o),e(r)}while(a<r&&r<n);return s},i.filter=function(r){return Cp((function(t){if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(i.count=function(t,n){return Sp.setTime(+t),Ep.setTime(+n),e(Sp),e(Ep),Math.floor(r(Sp,Ep))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(n?function(t){return n(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var qp=Cp((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),Op=Cp((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),Ap=Cp((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),Dp=Cp((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Np(e){return Cp((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)/6048e5}))}var Tp=Np(0);Np(1),Np(2),Np(3),Np(4),Np(5),Np(6);var Ip=Cp((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()})),wp=Cp((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()}));wp.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Cp((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var Lp=wp;const Rp=1,kp=2,Pp=3,jp=4,Fp=5,Vp=6;function _p({timeScale:e,labels:t,distance:r,isDayOrShorter:n,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=i.key({distance:r});let c;i.get(u,1)?c=i.get(u,1):(c=function(e,t,r,n,i,o){function a(e){return Lp.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=qp.count(e,t),l=Op.count(e,t),u=Ap.count(e,t),c=Dp.count(e,t),d=Tp.count(e,t),m=Ip.count(e,t),f=Lp.count(e,t),p=r/n.second.width-1,h=r/n.minute.width-1,y=r/n.date.width-1,g=r/n.year.width-1,v={type:"year",desc:"year",count:f,interval:Lp.every(1),formatter:n.year.formatter,offset:e=>Lp.offset(e,-1),floor:Lp.floor};if(s<=p)v.type=Rp,v.desc="second",v.count=s,v.interval=qp.every(1),v.formatter=n.second.formatter,v.offset=e=>qp.offset(e,-1),v.floor=qp.floor;else if(s/2<=p)v.type=Rp,v.desc="every other second",v.count=s/2,v.interval=qp.every(2),v.formatter=n.second.formatter,v.offset=e=>qp.offset(e,-2),v.floor=qp.floor;else if(s/5<=p)v.type=Rp,v.desc="every 5 second",v.count=s/5,v.interval=qp.every(5),v.formatter=n.second.formatter,v.offset=e=>qp.offset(e,-5),v.floor=qp.floor;else if(s/15<=p)v.type=Rp,v.desc="every 15 second",v.count=s/15,v.interval=qp.every(15),v.formatter=n.second.formatter,v.offset=e=>qp.offset(e,-15),v.floor=qp.floor;else if(s/30<=p)v.type=Rp,v.desc="every 30 second",v.count=s/30,v.interval=qp.every(30),v.formatter=n.second.formatter,v.offset=e=>qp.offset(e,-30),v.floor=qp.floor;else if(l<=h)v.type=kp,v.desc="minute",v.count=l,v.interval=Op.every(1),v.formatter=n.minute.formatter,v.offset=e=>Op.offset(e,-1),v.floor=Op.floor;else if(l/2<=h)v.type=kp,v.desc="every 2 minute",v.count=l/2,v.interval=Op.every(2),v.formatter=n.minute.formatter,v.offset=e=>Op.offset(e,-2),v.floor=Op.floor;else if(l/5<=h)v.type=kp,v.desc="every 5 minute",v.count=l/5,v.interval=Op.every(5),v.formatter=n.minute.formatter,v.offset=e=>Op.offset(e,-5),v.floor=Op.floor;else if(l/10<=h)v.type=kp,v.desc="every 10 minute",v.count=l/10,v.interval=Op.every(10),v.formatter=n.minute.formatter,v.offset=e=>Op.offset(e,-10),v.floor=Op.floor;else if(l/15<=h)v.type=kp,v.desc="every 15 minute",v.count=l/15,v.interval=Op.every(15),v.formatter=n.minute.formatter,v.offset=e=>Op.offset(e,-15),v.floor=Op.floor;else if(l/30<=h)v.type=kp,v.desc="every 30 minute",v.count=l/30,v.interval=Op.every(30),v.formatter=n.minute.formatter,v.offset=e=>Op.offset(e,-30),v.floor=Op.floor;else if(u<=h)v.type=Pp,v.desc="hour",v.count=u,v.interval=Ap.every(1),v.formatter=n.minute.formatter,v.offset=e=>Ap.offset(e,-1),v.floor=Ap.floor;else if(u/2<=h)v.type=Pp,v.desc="every 2 hour",v.count=u/2,v.interval=Ap.every(2),v.formatter=n.minute.formatter,v.offset=e=>Ap.offset(e,-2),v.floor=Ap.floor;else if(u/3<=h)v.type=Pp,v.desc="every 3 hour",v.count=u/3,v.interval=Ap.every(3),v.formatter=n.minute.formatter,v.offset=e=>Ap.offset(e,-3),v.floor=Ap.floor;else if(u/6<=h)v.type=Pp,v.desc="every 6 hour",v.count=u/6,v.interval=Ap.every(6),v.formatter=n.minute.formatter,v.offset=e=>Ap.offset(e,-6),v.floor=Ap.floor;else if(u/12<=h||i)v.type=Pp,v.desc="every 12 hour",v.count=u/12,v.interval=Ap.every(12),v.formatter=n.minute.formatter,v.offset=e=>Ap.offset(e,-12),v.floor=Ap.floor;else if(c<=y)v.type=jp,v.desc="day",v.count=c,v.interval=Dp.every(1),v.formatter=n.date.formatter,v.offset=e=>Dp.offset(e,-1),v.floor=Dp.floor;else if(c/2<=y)v.type=jp,v.desc="every 2 day",v.count=c/2,v.interval=Dp.every(2),v.formatter=n.date.formatter,v.offset=e=>Dp.offset(e,-2),v.floor=Dp.floor;else if(c/3<=y)v.type=jp,v.desc="every 3 day",v.count=c/3,v.interval=Dp.every(3),v.formatter=n.date.formatter,v.offset=e=>Dp.offset(e,-3),v.floor=Dp.floor;else if(d<=y)v.type=jp,v.desc="week",v.count=d,v.interval=Tp.every(1),v.formatter=n.date.formatter,v.offset=e=>Tp.offset(e,-1),v.floor=Dp.floor;else if(d/2<=y)v.type=jp,v.desc="every 2 week",v.count=d/2,v.interval=Tp.every(2),v.formatter=n.date.formatter,v.offset=e=>Tp.offset(e,-2),v.floor=Dp.floor;else if(m<=y)v.type=Fp,v.desc="month",v.count=m,v.interval=Ip.every(1),v.formatter=n.date.formatter,v.offset=e=>Ip.offset(e,-1),v.floor=Dp.floor;else if(m/3<=y)v.type=Fp,v.desc="quarter",v.count=m/3,v.interval=Ip.every(3),v.formatter=n.date.formatter,v.offset=e=>Ip.offset(e,-3),v.floor=Dp.floor;else if(m/6<=y)v.type=Fp,v.desc="half year",v.count=m/6,v.interval=Ip.every(6),v.formatter=n.date.formatter,v.offset=e=>Ip.offset(e,-6),v.floor=Dp.floor;else if(f<=g)v.type=Vp,v.desc="year",v.count=f,v.interval=Lp.every(1),v.formatter=n.year.formatter,v.offset=e=>Lp.offset(e,-1),v.floor=Lp.floor;else if(f/2<=g)v.type=Vp,v.desc="every 2 year",v.count=f/2,v.interval=a(2),v.formatter=n.year.formatter,v.offset=e=>Lp.offset(e,-2),v.floor=Lp.floor;else if(f/5<=g)v.type=Vp,v.desc="every 5 year",v.count=f/5,v.interval=a(5),v.formatter=n.year.formatter,v.offset=e=>Lp.offset(e,-5),v.floor=Lp.floor;else if(f/10<=g)v.type=Vp,v.desc="every 10 year",v.count=f/10,v.interval=a(10),v.formatter=n.year.formatter,v.offset=e=>Lp.offset(e,-10),v.floor=Lp.floor;else{const e=Math.floor(f/g);v.type=Vp,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=n.year.formatter,v.offset=t=>Lp.offset(t,-e),v.floor=Lp.floor}return v}(s,l,r,t.all(),n,a),i.set(u,c,1));const d=e.ticks(c.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(c.offset(d[0])):d.push(c.floor(s));const m=d.map(((e,t,r)=>{const n=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+n),formatter:c.formatter}}));let f=[];if(!o&&c.type<=Pp){const r=t.getFormat("date"),n=e.ticks(Dp.every(1));n.length&&s.getUTCDate()!==n[0].getUTCDate()&&n.unshift(Dp.offset(n[0],-1)),f=(n.length?n:[Dp.floor(s)]).map(((e,t,n)=>{const i=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:r.formatter}}))}return{inner:m,outer:f}}const Bp={};function Hp(e,t,r,n){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...r)),formatter:n}}function $p(e,t,r){const{generator:n,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=function(){return gt.apply($i(Cn,En,xn,vn,gn,yn,un,ln,Nn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([bp(l),bp(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof n?n:{type:n};let m;m="d3"===d.type?(e,i)=>_p({timeScale:c,labels:r,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:bp(n.initialMin)}):e=>function(e,t,r,n,i,o=!1){if(Bp[[t,r,n,n,o]])return Bp[[t,r,n,n,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=bp(r),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=n-r,m=t/(i-n),f=m/1440,p=m/86400,h=366*m,y=3*m*30,g=a.second.width/p,v=a.minute.width/f,b=a.date.width/y,x=a.year.width/h;let M,S,E,C=0,q=0,O=null,A=null,D=null,N=null,T=null,I=null;const w={outer:[],inner:[]};for(g<1?(O=1,q=1/86400):g<2?(O=2,q=1/86400*2):g<5?(O=5,q=1/86400*5):g<10?(O=10,q=1/86400*10):g<30?(O=30,q=1/86400*30):v<1?(A=1,q=1/1440):v<2?(A=2,q=1/1440*2):v<5?(A=5,q=1/1440*5):v<10?(A=10,q=1/1440*10):v<30?(A=30,q=1/1440*30):v<60?(D=1,q=1/24):v<120?(D=2,q=2/24):v<360?(D=6,q=.25):v<720?(D=12,q=.5):b<1/90?(q=1,N=1):b<2/90?(q=2,N=2):b<7/90?(q=7,N=7):b<31/90?(T=1,q=31):b<1?(T=3,q=90):x<1?(I=1,q=366):x<2?(I=2,q=732):x<5?(I=5,q=1826.25):(I=10,q=3652.5),S=Math.floor((d+r%1)/q);C<i;){E=S+1,M=I?Hp("year",[l+S*I,0,1],[l+E*I,0,1],a.year.formatter):T?Hp("month",[l,u+S*T,1],[l,u+E*T,1],a.date.formatter):N?Hp("day",[l,u,c+S*N],[l,u,c+E*N],a.date.formatter):D?Hp("hour",[l,u,c,0+S*D],[l,u,c,0+E*D],a.minute.formatter):A?Hp("minute",[l,u,c,0,0+S*A],[l,u,c,0,0+E*A],a.minute.formatter):Hp("second",[l,u,c,0,0,0+S*O],[l,u,c,0,0,0+E*O],a.second.formatter),C=Mp(M.start),w.inner.push(M);const e=Math.floor(C);if(!(o||I||T||N)){const t={type:"day",start:bp(e),end:bp(e+1),formatter:a.date.formatter,qStart:e};w.outer[w.outer.length-1]&&w.outer[w.outer.length-1].qStart===t.qStart||w.outer.push(t)}S++}return w.min=n,w.max=i,Bp[[t,r,n,n,o]]=w,w}(r,e,d.min,l,u,"T"===s.qType);const f={transform:(t=[],{isMinor:r=!1}={})=>t.map((t=>{let n;n="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();r&&e.clamp(!1);const a=e(n),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:n,position:a,start:s,end:l,label:t.qText,isMinor:r,data:r?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,r)=>m(t,r)[a].map((t=>{let r;return r="start"===i?Mp(t.start):"end"===i?Mp(t.end):(Mp(t.start)+Mp(t.end))/2,{position:c(t.start),start:c(t.start),end:c(t.end),value:r,label:t.formatter(r),isMinor:!1,data:{start:Mp(t.start),end:Mp(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return f}const zp=/t+/i;const Up={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 Yp(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 Wp="continuousPan";var Gp={model:function({model:e,layoutService:t,dataProcessorModel:r=ip,viewCache:n,viewState:i,definitionPath:o},a={}){const{engineFetcherFactory:s=Kf,snapshotFetcherFactory:l=Jf,cacheFetcherFactory:u=Xf,cache:c={initial:{},merged:{}}}=a,d=s({model:e,layoutService:t,definitionPath:o}),m=l({layoutService:t,viewCache:n}),f=u({cache:c}),p=e=>{throw e.isHandled=!0,e};let h,y,g;return{update(e){var r,o;({initialMin:y,initialMax:g}=function(e={}){let{qMin:t,qMax:r}=e;return t=Number.isNaN(+t)?0:t,r=Number.isNaN(+r)?0:r,{initialMin:t,initialMax:r}}(e.qHyperCube.qDimensionInfo[0])),n.set("continuousMin",y),n.set("continuousMax",g),n.set("minimiumZoomSpan",(r=y,o=g,Math.max(1e-6,2.3841857910156157e-7*(o-r)))),h=t.meta.isSnapshot?m:d,t.meta.isSnapshot&&({zoom:{min:y,max:g}}=m.getSnapshotData()),i.preventSet("zoom",{min:y,max:g})},updateLayout(e){const{qDataPages:r,qAxisData:n}=e;return t.setHyperCubeValue("qDataPages",r),t.setHyperCubeValue("qAxisData",n),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return h.fetch(y,g).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=ep(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),c.initial=t,c.merged=t,e})).then((e=>tp(y,g,e))).then((e=>this.updateLayout(e))).catch(p)},fetch:(e,t)=>h.fetch(e,t).then((e=>function(e,t){const r={};return r.qDataPages=(e.qDataPages||[]).map(((e,r)=>{const n=function(e,t){if(!t||!t.length||!t[0].length)return e;const r=t[0][0].qNum,n=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<r?i.push(e[t]):a.qNum>n&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[r].qMatrix),i=ep(e.qArea,n);return{...e,qArea:i,qMatrix:n}})),e.qAxisData&&e.qAxisData.qAxis&&(r.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const r=t.qAxis.map((e=>e.qName)),n=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=r.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=n[a];for(let r=0,n=o.qTicks.length;r<n;r++){const n=o.qTicks[r];n.qStart<e?s.push(n):n.qStart>t&&l.push(n)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),r}(c.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),c.merged=e,e))).then((r=>tp(e,t,r))).catch(p),fetchFromCache:(e,t)=>f.fetch(e,t).then((r=>tp(e,t,r))),fetchMinMaxData:()=>Promise.resolve(c.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return U({},e,{...c.initial})},getInitialLayout(){const e=this.getInitialCube();return U({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>np(c.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e;t.qDataPages=c.merged.qDataPages,t.qAxisData=c.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:r,continuousDataModel:n}=e;function i(e,r,i){return n[e](r,i).then((e=>(n.updateLayout(e),t(),e)))}const o=oc(((e,t)=>i("fetch",e,t)),50);return({min:e,max:t},{min:n,max:a})=>!r.meta.isContinuous||e===n&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then((r=>(o(e,t),r)))},onZoomIntercept:function({viewCache:e}){let t=NaN,r=NaN,n=NaN;return(i,o)=>(t=e.get("continuousMin"),r=e.get("continuousMax"),n=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<n?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(r,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:r},{threshold:n=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return ac(((e,n)=>{const l=(e=>r.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=function(e,t,r){let{x:n}=e;return n-=t.element.getBoundingClientRect().left,n-=r.rect.x,Math.max(0,Math.min(1,n/r.rect.width))}(e,r,l),u=i?1-o:o,{min:c,max:d}=t.get("zoom"),m=Math.abs(d-c),f=m-(n>0?.7071067811865475:1.4142135623730951)*m,p=c+f*u,h=d-f*(1-u),y=p<a?a-p:0,g=h>s?h-s:0;t.set("zoom",{min:Math.max(p-g,a),max:Math.min(h+y,s)})}}),n)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:r,viewState:n,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:Wp,pointers:1,threshold:10,enable(n,i){return this.started===Wp||!i||!!r.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(r){r.preventDefault(),this.started=Wp;const{min:i,max:o}=n.get("zoom");this[Wp]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},continuousPanmove(e){e.preventDefault();const{span:t,min:r,max:o,size:a}=this[Wp],s=-e.deltaX/a;n.set("zoom",{min:Math.min(r+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:op,timeAxis:cp},picassoScales:{time:function e(t,r={}){const n=function(e,t,r){const n={};return Object.keys(t).forEach((i=>{const o=e[i],a=typeof o;"function"===a?n[i]=o(r):"object"!==a||Array.isArray(o)?n[i]="undefined"===a?t[i]:o:n[i]=U(!0,{},t[i],o)})),n}(t,Up,r),{qAxis:i}=n,o=nn(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let r=+e.min,n=+e.max;return Number.isNaN(r)&&Number.isNaN(n)&&Array.isArray(t)&&t.length&&(r=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),n=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),r===n&&(r-=.5,n+=.5),{min:Number.isNaN(+r)?0:r,max:Number.isNaN(+n)?1:n}}(n,i);let u,c,d=[];const m=function(e){return Number.isNaN(+e)?NaN:o(e)};m.ticks=({distance:e,resolve:t=u.resolve}={})=>{const r=t(e),o=r[n.ticks.level];if(Number.isNaN(+o)||(d=c.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+r.minor)){const e=c.transform(i[r.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=c.generate(e,r.isDayOrShorter)),d},m.invert=e=>o.invert(e),m.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),m.range=e=>Array.isArray(e)?o.range(e):o.range(),m.norm=e=>(Yp(a,m),a.instance(e)),m.normInvert=e=>(Yp(a,m),a.instance.invert(e)),m.copy=()=>e(t,r),m.clamp=(e=!0)=>(o.clamp(e),o.clamp()),m.min=()=>Math.min(s,l),m.max=()=>Math.max(s,l),o.range(n.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=n.invert;const f=function(e){const t={},{measureText:r,fn:n,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&&zp.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=n(o[e].pattern),o[e].width=Math.max(o[e].width,r(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:r}=t;if(!r)return o.date;const n=bp(t[0].data.start),i=bp(t[r-1].data.start);return Dp.count(n,i)/r>=1?o.date:Ap.count(n,i)/r>0?o.minute:Op.count(n,i)/r>0?o.second:o.date},t}(n);return c=$p(o.copy(),n,f),u=vp({qAxis:i,measureText:n.formatter.measureText,reqAutoFitWidth:2*f.getFormat("minute").width,cache:n.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>"qHyperCube/"+n.field,key:()=>n.field,raw:rc(r,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>f.getFormatFromTicks(d).formatter,m}}};const Kp=e=>e.meta.seriesComponentKeys[0];const{event:{onZoom:Xp}}=Gp,Jp=[`${ea.COMPONENT.BAR}-${ra.PRIMARY}`,`${ea.COMPONENT.BAR}-${ra.SECONDARY}`,`${ea.COMPONENT.BAR_OOB}-${ws}`,`${ea.COMPONENT.BAR_OOB}-${Ls}`,`${ea.COMPONENT.BAR_OOB}-${ws}-${ra.PRIMARY}`,`${ea.COMPONENT.BAR_OOB}-${Ls}-${ra.PRIMARY}`,`${ea.COMPONENT.BAR_OOB}-${ws}-${ra.SECONDARY}`,`${ea.COMPONENT.BAR_OOB}-${Ls}-${ra.SECONDARY}`,`${ea.COMPONENT.SLICED_HAT}-${ws}`,`${ea.COMPONENT.SLICED_HAT}-${Ls}`,`${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.PRIMARY}`,`${ea.COMPONENT.SLICED_HAT}-${Ls}-${ra.PRIMARY}`,`${ea.COMPONENT.SLICED_HAT}-${ws}-${ra.SECONDARY}`,`${ea.COMPONENT.SLICED_HAT}-${Ls}-${ra.SECONDARY}`,`${ea.COMPONENT.DATA_OOB_MARKER}-${ws}`,`${ea.COMPONENT.DATA_OOB_MARKER}-${Ls}`,ea.COMPONENT.AXIS.MAJOR];function Zp({chart:e,models:t,actions:r,viewState:n,viewCache:i,environment:o}){const{appModel:a,layoutService:s,seriesModel:l,tooltipModel:u,flags:c}=t,{pointComponentKeys:d,markerComponentKeys:m,barComponentKeys:f}=l.meta,p=[...d,...m],h=[...f],y=[...Jp,...p],g=u.query.getCustomTooltipModel(),v=Kp(l),b=g.utils,x=oc(b.displayTooltip,b.DEBOUNCE_THRESHOLD),M=s.meta.isContinuous?Xp({chart:e,viewState:n,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:v}):()=>{},S=()=>e.component(ea.COMPONENT.LEGEND_TOOLTIP),E=()=>e.component(ea.COMPONENT.TOOLTIP),C=()=>{(()=>{const e=S();e&&e.show&&e.emit("hide")})(),(()=>{const e=E();e&&e.show&&(e.emit("hide"),u.query.useCustomTooltip()&&x&&x({},e,{nodes:[],opts:{app:a,flags:c},customTooltipModel:g,hide:!0}))})()};return{type:"native",events:{wheel(t){const n={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(n);if(r.interact.enabled()){const[e]=i.filter((e=>e.key===ea.COMPONENT.LEGEND_CATEGORICAL));((e,t)=>{if(t){const r=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(r>=0?"next":"prev"),e.preventDefault()}})(t,e)}if(r.scroll.enabled()){const[e]=i.filter((e=>e.key===v));e&&(M(n,Math.sign(-t.deltaY)),t.preventDefault())}C()},mousemove(n){if(!r.tooltip.enabled())return;const i=e.componentsFromPoint({x:n.clientX,y:n.clientY}),o=S();o&&o.show&&(i.some((e=>e.key===ea.COMPONENT.LEGEND_CATEGORICAL))?o.emit("show",n):o.emit("hide"));const s=E();if(s&&s.show)if(i.some((e=>-1!==y.indexOf(e.key)))){const r=[],{x:o,y:d}=function({chart:e,e:t}){const{left:r,top:n}=e.element.getBoundingClientRect();return{x:(t.center?t.center.x:t.clientX)-r,y:(t.center?t.center.y:t.clientY)-n}}({chart:e,e:n});if(i.some((e=>p.indexOf(e.key)>-1))&&r.push(...e.shapesAt({cx:o,cy:d,r:3},{components:p.map((e=>({key:e})))})),i.some((e=>h.indexOf(e.key)>-1))&&r.push(...e.shapesAt({x:o,y:d},{components:h.map((e=>({key:e})))})),u.query.useCustomTooltip()&&b.checkIfPromisesExist({customTooltipModel:g})){let i=[];if(0===r.length&&(r.push(...b.getNodes(n,e)),1===r.length&&r[0].key===ea.COMPONENT.AXIS.MAJOR)){var l;const n=Ff({chart:e,models:t,nodes:r});null!=n&&n.length&&null!==(l=n[0].childrenNodes)&&void 0!==l&&l.length&&(i=n[0].childrenNodes)}x(n,s,{nodes:r,extractedNodes:i,opts:{app:a,flags:c},customTooltipModel:g})}else s.emit("show",n,r.length?{nodes:r}:void 0)}else s.emit("hide")},mouseup(e){2===e.button&&C()},mouseleave(){C()}}}}const Qp=Gp.interactions.areaPan;function eh({chart:e,models:t,environment:r,viewState:n,viewCache:i,actions:o,selectables:a}){const{layoutService:s,dockService:l,discreteModel:u,colorService:c}=t,d="rtl"===r.options.direction,m=function({componentKey:e,chart:t,actions:r,viewState:n,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...Fa({componentKey:e,chart:t,actions:r,viewState:n,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:Va({componentKey:e,chart:t,actions:r,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:n,viewCache:i,discrete:u,layoutService:s,dockService:l,rtl:d}),f={type:"hammer",enable:!0,gestures:[...c.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...m.gestures]},p=[Zp({chart:e,models:t,actions:o,viewState:n,viewCache:i,environment:r}),m.native];return s.meta.isDiscrete&&(f.gestures.push(...u.interactions.gestures),p.push(u.interactions.native)),s.meta.isContinuous&&f.gestures.push(Qp({targetKey:Kp(t.seriesModel),chart:e,actions:o,viewState:n,viewCache:i}),function({targetKey:e,chart:t,actions:r,viewState:n,viewCache:i,rtl:o}){const a={last:0,diff:0},s=Gp.event.onZoom({viewCache:i,viewState:n,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:"continuousPinchZoom",pointers:2,threshold:0,enable:(n,i)=>!i||!!r.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{continuousPinchZoomstart(e){a.last=e.scale,e.preventDefault()},continuousPinchZoommove(e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:Kp(t.seriesModel),chart:e,actions:o,viewState:n,viewCache:i,rtl:d})),[f,...p]}const th=({key:e,componentTargetKey:t,requireFailure:r,recognizeWith:n},i)=>({key:"event:"+e,type:"Pan",requireFailure:r,recognizeWith:n,options:{event:"lasso",enable(e,r){if("lasso"===this.started||!r)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),"lasso"!==this.started&&(i.actions.select.emit("start","lasso"),this.chart.component(e).emit("lassoStart",t),this.started="lasso")},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end","lasso")}}});const rh=({targets:e,requireFailure:t,recognizeWith:r,components:n,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:r,options:{event:i,interval:10,pointers:1,enable(t,r){return!r||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[i](t){t.preventDefault();const r=function(e,t){const r=t.element.getBoundingClientRect();let n,i;return e.center?(({x:n}=e.center),({y:i}=e.center)):(n=e.clientX,i=e.clientY),{x:n-r.left,y:i-r.top}}(t,this.chart),u=o.hitRadius?o.hitRadius(a):0,c=u>0?{cx:r.x,cy:r.y,r:u}:r,d=o.shapesAt?o.shapesAt(c):this.chart.shapesAt(c,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),m=this.chart.component("tooltip"),f="mouse"!==t.pointerType&&m&&m.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),r=e.some((e=>"legend-cat"===e.type));if(!d.length&&r||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&n){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof n?n(t,d):n;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i)}}if(m&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const r=s.getNodes(t,this.chart);l(t,m,{nodes:r,opts:o,customTooltipModel:e})}else m.emit("show",t,{nodes:d})}else f&&m.emit("hide")}}}};const nh=({key:e,requireFailure:t,recognizeWith:r,eventName:n="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:r,options:{event:`${n}-${e}-tap`,interval:10,pointers:1,enable:(t,r)=>!!r&&(!!i.actions.select.enabled()&&(!(!r.target||"INPUT"!==r.target.nodeName)||!(!r.target||!r.target.hasAttribute("data-other-value"))&&(r.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${n}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const ih=({eventName:e,key:t,fillTargets:r=[],requireFailure:n,recognizeWith:i},o,a)=>({key:"event:"+t,type:"Pan",requireFailure:n,recognizeWith:i,options:{event:e,enable(n,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!==r.indexOf(e.key)));return 0===a.length&&function(e,t){const{target:r}=e.srcEvent;return!(!r||0!==(r.getAttribute("data-key")||"").indexOf(t+"-"))}(i,t)?(this.started=e,!0):a.length>0}},events:{[e+"start"](r){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),r.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(a+"Start",r),this.started=e},[e+"move"](e){e.preventDefault(),this.chart.component(t).emit(a+"Move",e)},[e+"end"](r){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),r.preventDefault(),this.chart.component(t).emit(a+"End",r),o.actions.select.emit("end",e),this.started=!1}}});function oh(e,t){const r=function(e){const{key:t,targets:r,fillTargets:n,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:u=!1,multiple:c=!1,toLabel:d,onEdited:m}=e;return{key:t,type:"brush-range",layout:{dock:r.map((e=>"@"+e)).join(",")},on:m?{bubbleEnd(){m()}}:{},settings:{brush:u?{context:"selection",observe:!0}:"selection",scale:s,multiple:c,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:n,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),n=ih(e,t,"range");return{interactions:[e.onEdited?nh(e,t):null,n].filter(Boolean),components:[r]}}const ah=/axis|legend/;function sh({actions:e,models:t}){const{seriesModel:r,layoutService:n,colorService:i,tooltipModel:o,flags:a}=t,s=n.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1);return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[rh(e,t)],components:[]}}({targets:[`${ea.COMPONENT.BAR}-${ra.PRIMARY}`,`${ea.COMPONENT.BAR}-${ra.SECONDARY}`,...r.query.series(ta.MARKER).map((e=>ks(ea.COMPONENT.MARKER,e))),...r.query.series(ta.LINE).map((e=>ks(ea.COMPONENT.POINT,e))),ea.COMPONENT.AXIS.MAJOR,ea.COMPONENT.AXIS_OVERLAY.TIME_INNER,ea.COMPONENT.AXIS_OVERLAY.TIME_OUTER,ea.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ea.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[r]=t,{key:n}=r,i={key:n,action:e.srcEvent.ctrlKey||s?"set":"toggle",contexts:["selection"]};return-1===[ea.COMPONENT.AXIS.MAJOR,ea.COMPONENT.AXIS_OVERLAY.TIME_INNER,ea.COMPONENT.AXIS_OVERLAY.TIME_OUTER,ea.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ea.COMPONENT.LEGEND_CATEGORICAL].indexOf(n)&&(i.data=["selectionDimension"]),[i]}},{actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?i.isSelectionLocked({isMeasureSelectionLocked:n.meta.isDimensionLocked}):n.meta.isDimensionLocked,hitRadius:e=>(e=>e.some((e=>ah.test(e.type))))(e)?0:3,customTooltipModel:o.query.getCustomTooltipModel(),debouncer:oc,flags:a})}function lh({actions:e,models:t}){const{layoutService:r,dockService:n,seriesModel:i}=t,{isDiscrete:o,isDimensionLocked:a}=r.meta;if(!o||a)return!1;const s=[...i.meta.seriesComponentKeys,ea.COMPONENT.AXIS.MAJOR];return function(e,t){const r=function(e){const{key:t,targets:r,components:n,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:r.map((e=>"@"+e)).join(",")},settings:{multiple:!0,brush:{components:n},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:[ih(e,t,"area")],components:[r]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[ea.COMPONENT.AXIS.MAJOR],dock:n.meta.major.dock},{actions:e})}const uh={components:[],interactions:[]};function ch({actions:e,chart:t,models:r}){const n=function({actions:e,models:t}){const{dockService:r,seriesModel:n,layoutService:i}=t;return!i.meta.isDimensionLocked&&!i.meta.isBarSeriesStacked&&oh({eventName:"minorRange",key:"minor-range-brush",targets:[ea.COMPONENT.AXIS.MINOR.PRIMARY,`${ea.COMPONENT.BAR}-${ra.PRIMARY}`,...n.query.series(ta.MARKER).filter((e=>e.isPrimary)).map((e=>ks(ea.COMPONENT.MARKER,e))),...n.query.series(ta.LINE).filter((e=>e.isPrimary)).map((e=>ks(ea.COMPONENT.POINT,e)))],fillTargets:[ea.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:ea.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:r})||uh,i=function({actions:e,models:t}){const{dockService:r,seriesModel:n,layoutService:i}=t;return!i.meta.isDimensionLocked&&!i.meta.isBarSeriesStacked&&oh({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[ea.COMPONENT.AXIS.MINOR.SECONDARY,`${ea.COMPONENT.BAR}-${ra.SECONDARY}`,...n.query.series(ta.MARKER).filter((e=>!e.isPrimary)).map((e=>ks(ea.COMPONENT.MARKER,e))),...n.query.series(ta.LINE).filter((e=>!e.isPrimary)).map((e=>ks(ea.COMPONENT.POINT,e)))],fillTargets:[ea.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:ea.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:r})||uh,o=lh({actions:e,models:r})||uh,a=function({actions:e,chart:t,models:r}){const{layoutService:n,dockService:i,seriesModel:o}=r,{isContinuous:a,isTime:s}=n.meta;if(!a)return!1;const l=s?[ea.COMPONENT.AXIS_OVERLAY.TIME_INNER,ea.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[ea.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return oh({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${ea.COMPONENT.BAR}-${ra.PRIMARY}`,`${ea.COMPONENT.BAR}-${ra.SECONDARY}`,...o.query.series(ta.MARKER).map((e=>ks(ea.COMPONENT.MARKER,e))),...o.query.series(ta.LINE).map((e=>ks(ea.COMPONENT.POINT,e))),...l],fillTargets:l,dock:i.meta.major.dock,scale:s?ea.SCALE.MAJOR_INNER:ea.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:r,scale:n}){const i=s?n.formatter():t.formatter(ea.FORMATTER.PRIMARY),o=t.scale(ea.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...r)||a?"":"<"}${i(e)}`}},{actions:e})}({actions:e,chart:t,models:r})||uh,s=function({actions:e,models:t}){const{colorService:r,layoutService:n}=t,[i]=r.custom.legendComponents(),o=r.custom.wrappedScales(),{isDimensionLocked:a}=n.meta;if(a||!i)return!1;const s=ea.SCALE.COLOR+"Range",{type:l,key:u}=i,c=o[s];return!("legend-seq"!==l||!c||c.min>=c.max)&&oh({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:i.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:r})||uh;return{components:[...n.components,...i.components,...o.components,...a.components,...s.components],interactions:[...n.interactions,...i.interactions,...o.interactions,...a.interactions,...s.interactions]}}function dh({actions:e,models:t}){const{layoutService:r,seriesModel:n}=t,{seriesComponentKeys:i}=n.meta;if(r.meta.isDimensionLocked)return{components:[],interactions:[]};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const r={key:"lasso",...e},n=(({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}}}))(r);return{interactions:[th(r,t)],components:[n]}}({key:"lasso",componentTargetKey:i[0],components:i.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function mh({picasso:e,chart:t,models:r,environment:n,viewState:i,viewCache:o,actions:a}){const{colorService:s,pluginService:l}=r,u=r.layoutService.getLayout(),{options:c}=n,d=function(e,t){return{layoutModes:J.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}(0,{logicalSize:function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:u,options:c}),minCenterRatio:0}),m=function({chart:e,models:t,environment:r,viewState:n,viewCache:i,actions:o}){var a;const{colorService:s,layoutService:l,dockService:u}=t,c=Uf({environment:r,models:t});return"center"===(null==c||null===(a=c.layout)||void 0===a?void 0:a.dock)?[c]:[...bf({models:t}),...Ss({models:t}),...mf({chart:e,models:t,environment:r,viewState:n,viewCache:i}),Wf({models:t,environment:r}),...Ds({models:t,environment:r}),...Ef({models:t,environment:r,actions:o}),Wi({viewState:n,viewCache:i,layoutService:l,dockService:u}),...Bf({models:t}),...Hf({chart:e,models:t,environment:r}),Cf({models:t,environment:r,viewState:n,viewCache:i}),...s.custom.legendComponents(),Yf(t),...Df({chart:e,models:t,viewState:n,viewCache:i,environment:r}),..._f({chart:e,models:t,environment:r}),c].filter(Boolean)}({chart:t,models:r,environment:n,viewState:i,viewCache:o,actions:a}),f=function({actions:e,chart:t,models:r}){const{layoutService:n}=r,i=n.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),o=sh({actions:e,models:r});if(i)return{components:[...o.components],gestures:[...o.interactions]};const a=ch({actions:e,chart:t,models:r}),s=dh({actions:e,models:r});return{components:[...o.components,...a.components,...s.components],gestures:[...o.interactions,...a.interactions,...s.interactions]}}({actions:a,chart:t,models:r}),p=l.extendComponents([...m,...f.components]);return{collections:ss({models:r}),scales:bs({picasso:e,models:r,viewState:i,viewCache:o,environment:n}),components:p,formatters:Gf({models:r}),interactions:eh({chart:t,models:r,environment:n,viewState:i,viewCache:o,actions:a,selectables:f}),strategy:d,palettes:s.getPalettes()}}const fh=({models:{layoutService:e,fieldModel:t,appLayoutModel:r}})=>({type:"q",key:ea.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}),ph=({models:{layoutService:e,fieldModel:t,continuousModel:r,appLayoutModel:n}})=>e.meta.isContinuous?[{type:"q",key:ea.DATA.REDUCED,data:r.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}]:[],{event:{onZoomIntercept:hh,onZoomChange:yh}}=Gp,gh=[ea.COMPONENT.AXIS_TITLE.MAJOR,ea.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,ea.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,ea.COMPONENT.GRID_LINE,ea.COMPONENT.ZERO_LINE],vh=({picasso:e,chart:t,models:n,environment:o,viewState:a,viewCache:s,actions:l})=>{(({chart:e,models:t,viewState:n,viewCache:i})=>{r((()=>{if(!t||!n||!i)return;const{layoutService:r,continuousModel:o,refLineModel:a,seriesModel:s}=t,{miniComponentKeys:l}=s.meta,u=()=>{a&&a.update(),e.update({partialData:!0,excludeFromUpdate:[...gh,...l]})};n.onChanged("scrollOffset",u),r.meta.isContinuous&&(n.onChanged("zoom",yh({layoutService:r,continuousDataModel:o},u)),n.intercept("zoom",hh({viewCache:i})))}),[t,n,i])})({chart:t,models:n,viewState:a,viewCache:s}),(({picasso:e,chart:t,models:r,environment:n,viewState:o,viewCache:a,actions:s})=>{const[,l]=i((async()=>{if(null==t||!t.update||!r||!n)return;const{layoutService:i,colorService:l,discreteModel:u}=r;function c(i=!1){t.update({settings:mh({picasso:e,chart:t,models:r,environment:n,viewState:o,viewCache:a,actions:s}),data:i&&[fh({models:r}),...ph({models:r}),...l.getData()]})}const d=i.getDataPages();i.setDataPages([]),c(!0),i.setDataPages(d),i.meta.isContinuous||await u.command.initialize(),c(!1)}),[null==t?void 0:t.update,r,n]);if(l)throw l})({picasso:e,chart:t,models:n,environment:o,viewState:a,viewCache:s,actions:l})};function bh(){return(bh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var xh={exports:{}};function Mh(){}function Sh(){}Sh.resetWarningCache=Mh;xh.exports=function(){function e(e,t,r,n,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Sh,resetWarningCache:Mh};return r.PropTypes=r,r}();var Eh=xh.exports;function Ch(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function qh({d:e,size:t,style:r={},viewBox:n="0 0 16 16"}){const i={fontSize:Ch(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...r};return q.createElement("i",{style:i},q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:n,fill:"currentColor"},q.createElement("path",{d:e})))}const Oh={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"},Ah={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"},Dh="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Nh={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"},Th={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 Ih(e,t,r){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:r}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(r,"qHyperCubeDef.");let n=Qi.generate(t,r);n&&n.length&&(n=n.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(n,!0))}))}function wh(e,t,r,n,i,o){e.getEffectiveProperties().then((a=>{const s=U(!0,{},a),l=s.qHyperCubeDef[n][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],o||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[n][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r]=l,i&&i({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),Ih(e,a,s)}))}function Lh({dir:e,dock:t,altList:r,model:n,translator:i,app:o,onChange:a}){return 0===r.length?null:{dir:e,dock:t,getAlternatives(){const e=r.map((e=>function(e,t,r){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:r.get("Object.ErrorMessage.MissingDimension")));const n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);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})))));return Promise.all(e)},changeTo(e,t){wh(n,e,t,"qDimensions",a)}}}function Rh(e,t,r,n="/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){r.drillUp(n,t,e)}};var i}function kh({altList:e,app:t,dir:r,dock:n,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:r,dock:n,getAlternatives(){const r=e.map((e=>function(e,t,r){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:r.get("Object.ErrorMessage.MissingMeasure")));const n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);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})))));return Promise.all(r)},changeTo(e,t){wh(i,e,t,"qMeasures",o,a)}}}function Ph(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const jh={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"}}},Fh=({children:e,...t})=>q.createElement(O,bh({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function Vh(){function e({title:e,selected:t,onClick:r}){const n=he.detectTextDirection(e);return q.createElement(N,{button:!0,onClick:r,style:{textAlign:"start"}},q.createElement(T,{style:{minWidth:32}},q.createElement(qh,{d:t?Dh:""})),q.createElement(I,{primaryTypographyProps:{dir:n}},e))}function t({alignTo:t,changeTo:r,current:n,dir:i,dock:o,list:a,onClose:s,show:l}){const u=a.map(((t,n)=>q.createElement(e,{key:t.id,title:t.title,onClick:()=>r(n)})));return q.createElement(A,bh({anchorEl:t,open:l,onClose:s},jh[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),q.createElement(D,{dense:!0,dir:i,component:"nav"},q.createElement(e,{title:n,selected:!0,onClick:s}),u))}e.propTypes={title:Eh.string.isRequired,selected:Eh.bool,onClick:Eh.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:Eh.any,changeTo:Eh.func.isRequired,current:Eh.string.isRequired,dir:Eh.string.isRequired,dock:Eh.string.isRequired,list:Eh.array,onClose:Eh.func.isRequired,show:Eh.bool.isRequired},t.defaultProps={list:[],alignTo:null};class r extends q.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=q.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:r,translator:n,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l}=this.props,u={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},c=e.breadcrumbs.length,d=i||this.state.inSelection,m=e.breadcrumbs.map(((t,r)=>q.createElement(Fh,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:r,onClick:()=>d?void 0:e.drillUp(c-r),title:t},q.createElement("span",{style:u},t),q.createElement(qh,bh({},Th,{size:"small",style:{margin:"0 8px"}}))))),f=r&&!this.state.open?this.openPopover:this.closePopover,p=!r||i||this.state.inSelection,h={display:"flex",alignItems:"center",width:"100%",color:p&&"rgba(89, 89, 89, 0.8)",height:!o&&p&&"20px",lineHeight:!o&&p&&"20px",border:!o&&p&&"none"};this.state.open&&(h.background="rgba(0,0,0,0.08)");a&&(h.padding=a),s&&(h.minWidth=s);const y=he.detectTextDirection(e.text),g=q.createElement(Fh,{style:h,onClick:p?void 0:f,title:e.text,tabIndex:p?-1:0,onFocus:p?void 0:e=>{this.state.closeTime&&Date.now()-this.state.closeTime<20||(e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px")},onBlur:p?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&q.createElement(qh,bh({},Ah,{size:"small",title:n.get("Tooltip.selections.locked")})),q.createElement("span",{style:u,dir:y},e.text),r&&q.createElement(qh,bh({},Nh,{size:"small",style:{margin:"0 8px"}})));return q.createElement(q.Fragment,null,e.drilldown&&q.createElement(qh,bh({},Oh,{size:"small",title:n.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,q.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:l?"auto":"none"}},g),r&&q.createElement(t,{dock:r.dock,dir:r.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function n(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&te(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:Eh.bool.isRequired,padding:Eh.string,minWidth:Eh.string,titleData:Eh.shape({breadcrumbs:Eh.arrayOf(Eh.string).isRequired,drilldown:Eh.bool.isRequired,index:Eh.number.isRequired,locked:Eh.bool.isRequired,text:Eh.string.isRequired,popoverText:Eh.string.isRequired,drillUp:Eh.func}).isRequired,popover:Eh.shape({dir:Eh.string.isRequired,dock:Eh.string.isRequired,changeTo:Eh.func.isRequired,getAlternatives:Eh.func.isRequired}),translator:Eh.shape({get:Eh.func.isRequired}).isRequired,selections:Eh.shape({isActive:Eh.func,addListener:Eh.func,removeListener:Eh.func}),style:Eh.shape({fontSize:Eh.string,color:Eh.string,fontFamily:Eh.string}).isRequired,isDimension:Eh.bool.isRequired,hasAlternative:Eh.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:o,hyperCube:a,hyperCubeDef:s,isDimension:l,minWidth:u,model:c,onChangeToAlternative:d,padding:m,rtl:f,selections:p,skipAttributeExpressions:h,translator:y},layout:{dock:g}}=this.settings,v="top"!==g&&"bottom"!==g||!f?"ltr":"rtl",b=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(r.width=t.height+"px",r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left"):"right"===e&&(r.width=t.height+"px",r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left"),r}(g,this.rect),x=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,M=x&&x[l?"qDimensions":"qMeasures"]||[],S=o||a[l?"qDimensionInfo":"qMeasureInfo"],E=l?Lh:kh,C=l?Rh:Ph,O=c&&c.colorSupport&&c.modifiers&&E({altList:M,app:e,dir:f?"rtl":"ltr",dock:n(g),model:c,onChange:d,skipAttributeExpressions:h,translator:y}),A=(D=this.settings.settings).isDimension&&te(D,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var D;const N=S.map(((e,n)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:n,o=C(e,i,c),a=n===S.length-1;return q.createElement(q.Fragment,{key:e.cId},q.createElement(r,{popover:O,titleData:o,model:c,translator:y,selections:p,disabled:t(),style:this.style,isDimension:l,padding:m,minWidth:u,hasAlternative:A}),!a&&q.createElement("span",null,", "))}));return q.createElement("div",{style:b,dir:v},N)}}}function _h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>r?r:e}function Bh(e){if(e.type)return e;if("#"===e.charAt(0))return Bh(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map((function(e){return e+e}))),r?"rgb(".concat(r.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var n=e.substring(t+1,e.length-1).split(",");return{type:r,values:n=n.map((function(e){return parseFloat(e)}))}}function Hh(e){var t=e.type,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function $h(e){var t="hsl"===(e=Bh(e)).type?Bh(function(e){var t=(e=Bh(e)).values,r=t[0],n=t[1]/100,i=t[2]/100,o=n*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Hh({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function zh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uh(){return(Uh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Yh(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Wh(){return(Wh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Gh(e){return(Gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kh(e){return(Kh="function"==typeof Symbol&&"symbol"===Gh(Symbol.iterator)?function(e){return Gh(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Gh(e)})(e)}function Xh(e){return e&&"object"===Kh(e)&&!Array.isArray(e)}function Jh(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},n=r.clone?Wh({},e):e;return Xh(e)&&Xh(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(Xh(t[i])&&i in e?n[i]=Jh(e[i],t[i],r):n[i]=t[i])})),n}var Zh=["xs","sm","md","lg","xl"];function Qh(e){var t=e.values,r=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,n=e.unit,i=void 0===n?"px":n,o=e.step,a=void 0===o?5:o,s=Yh(e,["values","unit","step"]);function l(e){var t="number"==typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function u(e,t){var n=Zh.indexOf(t)+1;return n===Zh.length?l(e):"@media (min-width:".concat(r[e]).concat(i,") and ")+"(max-width:".concat(r[Zh[n]]-a/100).concat(i,")")}return Uh({keys:Zh,values:r,up:l,down:function(e){var t=Zh.indexOf(e)+1,n=r[Zh[t]];return t===Zh.length?l("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-a/100).concat(i,")")},between:u,only:function(e){return u(e,e)},width:function(e){return r[e]}},s)}function ey(e,t,r){var n;return Uh({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Uh({paddingLeft:t(2),paddingRight:t(2)},r,zh({},e.up("sm"),Uh({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(n={minHeight:56},zh(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),zh(n,e.up("sm"),{minHeight:64}),n)},r)}var ty={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},ry={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},ny={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},iy={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},oy={black:"#000",white:"#fff"},ay={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:oy.white,default:ny[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},sy={text:{primary:oy.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:ny[800],default:"#303030"},action:{active:oy.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function ly(e,t,r,n){e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=function(e,t){if(e=Bh(e),t=_h(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return Hh(e)}(e.main,n):"dark"===t&&(e.dark=function(e,t){if(e=Bh(e),t=_h(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]*=1-t;return Hh(e)}(e.main,1.5*n)))}function uy(e){var t=e.primary,r=void 0===t?{light:ty[300],main:ty[500],dark:ty[700]}:t,n=e.secondary,i=void 0===n?{light:ry.A200,main:ry.A400,dark:ry.A700}:n,o=e.error,a=void 0===o?{light:iy[300],main:iy[500],dark:iy[700]}:o,s=e.type,l=void 0===s?"light":s,u=e.contrastThreshold,c=void 0===u?3:u,d=e.tonalOffset,m=void 0===d?.2:d,f=Yh(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function p(e){return function(e,t){var r=$h(e),n=$h(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}(e,sy.text.primary)>=c?sy.text.primary:ay.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Uh({},e)).main&&e[t]&&(e.main=e[t]),ly(e,"light",r,m),ly(e,"dark",n,m),e.contrastText||(e.contrastText=p(e.main)),e}var y={dark:sy,light:ay};return Jh(Uh({common:oy,type:l,primary:h(r),secondary:h(i,"A400","A200","A700"),error:h(a),grey:ny,contrastThreshold:c,getContrastText:p,augmentColor:h,tonalOffset:m},y[l]),f,{clone:!1})}function cy(e){return Math.round(1e5*e)/1e5}var dy={textTransform:"uppercase"};function my(e,t){var r="function"==typeof t?t(e):t,n=r.fontFamily,i=void 0===n?'"Roboto", "Helvetica", "Arial", sans-serif':n,o=r.fontSize,a=void 0===o?14:o,s=r.fontWeightLight,l=void 0===s?300:s,u=r.fontWeightRegular,c=void 0===u?400:u,d=r.fontWeightMedium,m=void 0===d?500:d,f=r.fontWeightBold,p=void 0===f?700:f,h=r.htmlFontSize,y=void 0===h?16:h,g=r.allVariants,v=r.pxToRem,b=Yh(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,M=v||function(e){return"".concat(e/y*x,"rem")},S=function(e,t,r,n,o){return Uh({fontFamily:i,fontWeight:e,fontSize:M(t),lineHeight:r},'"Roboto", "Helvetica", "Arial", sans-serif'===i?{letterSpacing:"".concat(cy(n/t),"em")}:{},{},o,{},g)},E={h1:S(l,96,1,-1.5),h2:S(l,60,1,-.5),h3:S(c,48,1.04,0),h4:S(c,34,1.17,.25),h5:S(c,24,1.33,0),h6:S(m,20,1.6,.15),subtitle1:S(c,16,1.75,.15),subtitle2:S(m,14,1.57,.1),body1:S(c,16,1.5,.15),body2:S(c,14,1.43,.15),button:S(m,14,1.75,.4,dy),caption:S(c,12,1.66,.4),overline:S(c,12,2.66,1,dy)};return Jh(Uh({htmlFontSize:y,pxToRem:M,round:cy,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:m,fontWeightBold:p},E),b,{clone:!1})}function fy(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var py=["none",fy(0,2,1,-1,0,1,1,0,0,1,3,0),fy(0,3,1,-2,0,2,2,0,0,1,5,0),fy(0,3,3,-2,0,3,4,0,0,1,8,0),fy(0,2,4,-1,0,4,5,0,0,1,10,0),fy(0,3,5,-1,0,5,8,0,0,1,14,0),fy(0,3,5,-1,0,6,10,0,0,1,18,0),fy(0,4,5,-2,0,7,10,1,0,2,16,1),fy(0,5,5,-3,0,8,10,1,0,3,14,2),fy(0,5,6,-3,0,9,12,1,0,3,16,2),fy(0,6,6,-3,0,10,14,1,0,4,18,3),fy(0,6,7,-4,0,11,15,1,0,4,20,3),fy(0,7,8,-4,0,12,17,2,0,5,22,4),fy(0,7,8,-4,0,13,19,2,0,5,24,4),fy(0,7,9,-4,0,14,21,2,0,5,26,4),fy(0,8,9,-5,0,15,22,2,0,6,28,5),fy(0,8,10,-5,0,16,24,2,0,6,30,5),fy(0,8,11,-5,0,17,26,2,0,6,32,5),fy(0,9,11,-5,0,18,28,2,0,7,34,6),fy(0,9,12,-6,0,19,29,2,0,7,36,6),fy(0,10,13,-6,0,20,31,3,0,8,38,7),fy(0,10,13,-6,0,21,33,3,0,8,40,7),fy(0,10,14,-6,0,22,35,3,0,8,42,7),fy(0,11,14,-7,0,23,36,3,0,9,44,8),fy(0,11,15,-7,0,24,38,3,0,9,46,8)],hy={borderRadius:4};function yy(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var r=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return 0===r.length?e(1):1===r.length?e(r[0]):r.map((function(t){var r=e(t);return"number"==typeof r?"".concat(r,"px"):r})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r}var gy={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},vy={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},by=function(e){return"".concat(Math.round(e),"ms")},xy={easing:gy,duration:vy,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.duration,n=void 0===r?vy.standard:r,i=t.easing,o=void 0===i?gy.easeInOut:i,a=t.delay,s=void 0===a?0:a;return Yh(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof n?n:by(n)," ").concat(o," ").concat("string"==typeof s?s:by(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},My={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const Sy=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,r=void 0===t?{}:t,n=e.mixins,i=void 0===n?{}:n,o=e.palette,a=void 0===o?{}:o,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,d=Yh(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),m=uy(a),f=Qh(r),p=yy(l),h=Uh({breakpoints:f,direction:"ltr",mixins:ey(f,p,i),overrides:{},palette:m,props:{},shadows:s||py,typography:my(m,c),spacing:p},Jh({shape:hy,transitions:xy,zIndex:My},d));return h}({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:'"QlikView Sans", "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 Ey=L({productionPrefix:"q4f5d",disableGlobal:!0,seed:""});function Cy(){function e({x:e,y:t,width:r,height:n,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(r)?a.width:r,a.height=Number.isNaN(n)?a.height:n,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:r=document.createElement.bind(document)}=t;let n,i=e();const o={element:()=>n,root:()=>n,appendTo:e=>(n||(n=r("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),render(e){if(!n)return!1;const t=i.scaleRatio.x,r=i.scaleRatio.y;return n.style.left=Math.round(i.margin.left+i.x*t)+"px",n.style.top=Math.round(i.margin.top+i.y*r)+"px",n.style.width=Math.round(i.width)+"px",n.style.height=Math.round(i.height)+"px",n.style.transform=`scale(${t}, ${r})`,n.style.transformOrigin="top left",w.render(function(e,t){return q.createElement(R,{generateClassName:t},q.createElement(k,{theme:Sy},e))}(e,Ey),n),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(n&&w.unmountComponentAtNode(n),o),destroy(){n&&n.parentElement&&(w.unmountComponentAtNode(n),n.parentElement.removeChild(n)),n=null},size:t=>(t&&(i=e(t)),i)};return o}}function qy(){return function(e){e.renderer("react",Cy()),e.component("data-title",Vh()),e.component("disclaimer",function(){class e extends q.Component{render(){const{label:e,spanStyle:t}=this.props;return q.createElement(q.Fragment,null,q.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:Eh.string.isRequired,spanStyle:Eh.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:r},layout:{dock:n}}=this.settings,i="top"!==n&&"bottom"!==n||!r?"ltr":"rtl",o=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width=t.height+"px",r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=t.height+"px",r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left";break;case"center":r.width=t.width+"px",r.height=t.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}(n,this.rect),a="center"===n?t:"* "+t,s="center"!==n?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return q.createElement("div",{style:o,dir:i},q.createElement(q.Fragment,null,q.createElement(e,{label:a,spanStyle:s})))}}}())}}function Oy(e,t,r,n){const i=function(t){const r=String(t);return e(r)};return i.ticks=()=>t.map((t=>{const o=i([t.data.value,n?r-1:0]),a=i([t.data.value,n?0:r-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(n){const i=e.pxScale(n);return i===e?this:Oy(i,t,r)},i}function Ay(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},r={},n={}){const i=t(e,r,n),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),Oy(i,a,l,e.invert)}))}const Dy={getDefaultSettings:({size:e=10,fill:t="#999",alignment:r}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:r}),createOob({oob:e,dockValue:t,boxCenter:r,rendWidth:n,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=n,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=n,d=t<.5?180:0),a(U({},e,{[s]:r*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};function Ny({i:e,width:t,height:r,resolved:n,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==n.major.settings.binStart?(l=n.major.items[e].binStart,u=n.major.items[e].binEnd,s=n.major.settings.binStart.scale):(s=n.major.settings.major.scale,l=s?n.major.items[e].major:0);let c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const d=U({},{major:l,majorEnd:u},n.minor.items[e]);i.forEach((t=>{d[t]=n[t].items[e]}));const m=o?r:t,f=function({bandwidth:e,width:t,minWidthPx:r,maxWidthPx:n,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(n))?i:n/i);return a=Number.isNaN(Number(r))?a:Math.max(r/i,a),a*o}({bandwidth:c,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:m}),p=(c-f)/2,h=p+d.major+f/2;return{item:d,boxCenter:h,boxWidth:f,boxPadding:p,rendWidth:t,rendHeight:r}}function Ty({keys:e,data:t,defaultSettings:r,style:n,settings:i,width:o,height:a,resolver:s}){const l=U(!0,{},r||{},n||{}),u={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},c=i.major;let d;d="object"==typeof c&&"object"==typeof c.ref&&void 0!==c.ref.start&&void 0!==c.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:U(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof c&&void 0!==c.binStart&&void 0!==c.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:U(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:i.major}});const m=i.minor||{};let f;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:U(!0,{},{start:{scale:m.scale,ref:"start"},end:{scale:m.scale,ref:"end"},min:{scale:m.scale,ref:"min"},max:{scale:m.scale,ref:"max"},med:{scale:m.scale,ref:"med"}},m)})};for(let r=0,n=e.length;r<n;r++)f=e[r],p[f]=s.resolve({data:t,defaults:l[f],settings:i[f],scaled:u});return p}const Iy=["oob"];const wy={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:r}=this.settings.settings,n="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=Ty({keys:Iy,data:i,defaultSettings:{oob:Dy.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:u,items:c}=l;return function({width:e,height:t,flipXY:r,resolved:n,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Ny}){const l=[],{items:u}=n.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:m,rendWidth:f,rendHeight:p}=s({i:c,width:e,height:t,resolved:n,keys:i,flipXY:r,calcKey:"oob"}),h=u[c].data,y=[];if(d.oob.show){y.push(Dy.createOob({oob:d.oob,dockValue:a,boxCenter:m,rendWidth:f,rendHeight:p,flipXY:r,symbol:o}));const e={type:"container",data:h,collider:{type:"bounds"},children:y};l.push(e)}}return l}({items:c,settings:u,width:e,height:t,flipXY:n,resolved:l,keys:Iy,symbol:s,dockValue:r})}},Ly={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Ry=["hat"];function ky(e,t=!0){let r="";for(let t=0;t<e.length;t++){const n=e[t];r+=0===t?`M${n.x} ${n.y}`:`L${n.x} ${n.y}`,r+=" "}return t&&(r+="Z"),r}function Py({item:e,boxWidth:t,boxPadding:r,rendWidth:n,rendHeight:i,flipXY:o}){let a="x",s="y",l=n,u=i,c=e.hat.alignment||0;o&&(a="y",s="x",l=i,u=n,c=1-c);const d=(r+e.major)*l;let m=[{[a]:d,[s]:0+u},{[a]:d+t*c*l,[s]:8},{[a]:d+t*l,[s]:0+u},{[a]:d+t*l,[s]:0+u+10},{[a]:d,[s]:0+u+10}];const f=U({},e.hat,{type:"path",d:ky(m)});m=[{[a]:d,[s]:0},{[a]:d+t*(1-c)*l,[s]:0+u-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[f,U({},e.hat,{type:"path",d:ky(m)})]}const jy={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,r="horizontal"===this.settings.settings.orientation,{data:n,style:i,resolver:o}=this,a=Ty({keys:Ry,data:n,defaultSettings:Ly,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:r,resolved:n,keys:i,_calcItemRenderingOpts:o=Ny}){const a=[],{items:s}=n.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:f}=o({i:l,width:e,height:t,resolved:n,keys:i,flipXY:r,calcKey:"hat"}),p=s[l].data,h=[];u.hat.show&&h.push(...Py({item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:f,flipXY:r}));const y={type:"container",data:p,collider:{type:"bounds"},children:h};a.push(y)}return a}({items:l,settings:s,width:e,height:t,flipXY:r,resolved:a,keys:Ry})}};var Fy="unclassified",Vy="equal-equal",_y="equal-higher",By="equal-lower",Hy="equal-void",$y="higher-equal",zy="higher-higher-acute",Uy="higher-higher-obtuse",Yy="higher-lower-negative",Wy="higher-lower-positive",Gy="higher-void",Ky="lower-equal",Xy="lower-higher-negative",Jy="lower-higher-positive",Zy="lower-lower-acute",Qy="lower-lower-obtuse",eg="lower-void",tg="void-equal",rg="void-higher",ng="void-lower",ig="void-void";function og(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function ag(e,t,r){const n=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),i=Math.sqrt((t.x-r.x)**2+(t.y-r.y)**2),o=Math.sqrt((r.x-e.x)**2+(r.y-e.y)**2);return Math.acos((i*i+n*n-o*o)/(2*i*n))*(180/Math.PI)}function sg({previous:e,current:t,next:r}){const n=e&&e.value,i=t&&t.value,o=r&&r.value;return e||r?e?r?n===i?i===o?Vy:i<o?_y:By:i===o?n>i?$y:Ky:n>i?i<o?ag(e,t,r)>90?Uy:zy:og(e,t)>og(e,r)?Wy:Yy:i>o?ag(e,t,r)>90?Qy:Zy:og(e,t)>og(e,r)?Jy:Xy:n===i?Hy:n>i?Gy:eg:i===o?tg:i<o?rg:ng:ig}function lg({bounds:e,size:t}){const{x:r,y:n,width:i,height:o}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(r+i/2)>=0&&Math.ceil(r+i/2)<=t.width&&Math.floor(n+o/2)>=0&&Math.ceil(n+o/2)<=t.height:Math.floor(r+i)>0&&Math.ceil(r)<t.width&&Math.floor(n+o/2)>=0&&Math.ceil(n+o/2)<=t.height}const ug=1,cg=0;function dg({node:e,line:t,groupIndex:r,extract:n,style:i,measureText:o,size:a,horizontal:s,rtl:l,meta:u,showLabel:c}){const d=n.label(e.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;const m=o({fontFamily:i.fontFamily,fontSize:i.fontSize,text:d}),{localBounds:f}=e,{"stroke-width":p}=e.attrs,h=n.pointValue(e.data),y={x:f.x+f.width/2,y:f.y+f.height/2,width:m.width+2*ug,height:m.height+2*cg},g=`${y.x}-${y.y}`,v=!s&&!l,b=s?a.height:a.width,x=(s?y.y:y.x)/b,M=(v?1-x:x)<=(b<=200?.25:.1),S={key:g,node:e,line:t,group:r,value:h,labelMeasurements:m,bounds:y,inside:lg({bounds:f,size:a}),border:p?p/2:0,classification:Fy,setClassification(e){S.classification=e},preferences:[],setPreferences(e){S.preferences.push(...e)},placement:void 0,setPlacement(e){S.placement=e},duplicate:!1,setDuplicate(){S.duplicate=!0},extreme:u.getExtreme(g),elite:M,show:c(e)};return S}function mg({nodes:e,extract:t,style:r,measureText:n,size:i,horizontal:o,rtl:a,showLabel:s}){const l=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},r=e.map((e=>{const{localBounds:t}=e,r={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${r.x}-${r.y}`,center:r}})),n=r.reduce(((e,t)=>((!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e)),{});return t.top=r.filter((e=>e.center.y===n.top.center.y)).map((e=>e.key)),t.right=r.filter((e=>e.center.x===n.right.center.x)).map((e=>e.key)),t.bottom=r.filter((e=>e.center.y===n.bottom.center.y)).map((e=>e.key)),t.left=r.filter((e=>e.center.x===n.left.center.x)).map((e=>e.key)),{getExtrema:e=>({top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}),getExtreme:e=>{const{top:r,right:n,bottom:i,left:o}=t;return[r,n,i,o].some((t=>-1!==t.indexOf(e)))}}}({nodes:e});return function({nodes:e,by:t,lineIndex:r}){const n=e.reduce(((e,n,i)=>{const o=t(n.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:n,line:n.data[r].value}),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:e,by:t.majorValue,lineIndex:t.lineIndex}).map(((e,u)=>e.map((e=>({line:e.line,item:dg({node:e.node,line:e.line,groupIndex:u,extract:t,style:r,measureText:n,size:i,horizontal:o,rtl:a,meta:l,showLabel:s})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{}))).filter((e=>Object.keys(e).length))}var fg={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},pg={[Vy]:[fg.TOP,fg.BOTTOM],[_y]:[fg.BOTTOM,fg.BOTTOM_RIGHT],[By]:[fg.TOP,fg.TOP_RIGHT],[Hy]:[fg.TOP,fg.BOTTOM],[$y]:[fg.LEFT,fg.BOTTOM_LEFT,fg.TOP,fg.TOP_RIGHT],[zy]:[fg.BOTTOM,fg.BOTTOM_LEFT,fg.LEFT,fg.TOP_RIGHT],[Uy]:[fg.BOTTOM,fg.TOP],[Yy]:[fg.TOP,fg.TOP_RIGHT,fg.RIGHT],[Wy]:[fg.BOTTOM,fg.BOTTOM_LEFT,fg.LEFT],[Gy]:[fg.TOP],[Ky]:[fg.TOP],[Xy]:[fg.TOP,fg.TOP_LEFT],[Jy]:[fg.BOTTOM_RIGHT],[Zy]:[fg.TOP,fg.TOP_LEFT,fg.LEFT,fg.TOP_RIGHT,fg.RIGHT],[Qy]:[fg.TOP,fg.BOTTOM],[eg]:[fg.TOP],[tg]:[fg.TOP],[rg]:[fg.TOP,fg.BOTTOM],[ng]:[fg.TOP,fg.BOTTOM,fg.LEFT],[ig]:[fg.TOP]};function hg({nodes:e,extract:t,style:r,measureText:n,size:i,horizontal:o,rtl:a,showLabel:s}){const l=mg({nodes:e,extract:t,style:r,measureText:n,size:i,horizontal:o,rtl:a,showLabel:s}),u=[...l.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[c]=u,d=function({groups:e,threshold:t}){const r=e.map((e=>Object.keys(e).map((t=>e[t])))),n={};for(let e=0;e<=r.length;e++){const t=r[e];if(t)for(let e=0;e<t.length;e++){const r=t[e],{line:i}=r;n[i]||(n[i]=[]),n[i].push(r.bounds)}}const i=Object.keys(n).map((e=>n[e])),o=[];for(let e=0;e<i.length;e++)for(let r=0;r<i[e].length-1;r++){const n=i[e][r],a=i[e][r+1],s={x1:n.x,y1:n.y,x2:a.x,y2:a.y},l=s.x1-s.x2,u=s.y1-s.y2;Math.sqrt(l*l+u*u)>t&&o.push(s)}return o}({groups:l,threshold:c.node.localBounds.height}),m={getItems:()=>u,getLines:()=>d};return function({groups:e}){for(let t=0;t<e.length;t++){const r=Object.keys(e[t]).map((r=>e[t][r]));for(let n=0;n<r.length;n++){const i=r[n],o=sg({previous:e[t-1]&&e[t-1][i.line],current:i,next:e[t+1]&&e[t+1][i.line]});i.setClassification(o)}}}({groups:l}),m.getItems().forEach((e=>e.setPreferences(pg[e.classification]))),m}function yg({item:e,placement:t,size:r}){return t.x>=0-r.edgeBleed.left&&t.x<=r.width-e.bounds.width+r.edgeBleed.right&&t.y>=0-r.edgeBleed.top&&t.y<=r.height-e.bounds.height}function gg({line1:e,line2:t}){const r=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===r)return!1;const n=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/r,i=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/r;return n>=0&&n<=1&&i>=0&&i<=1}function vg({candidate:e,lines:t,rects:r}){return!!r.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const r={x:t.x,y:t.y},n={x:t.x+t.width,y:t.y},i={x:t.x+t.width,y:t.y+t.height},o={x:t.x,y:t.y+t.height},a={x1:n.x,y1:n.y,x2:i.x,y2:i.y},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:r.x,y2:r.y};return gg({line1:e,line2:{x1:r.x,y1:r.y,x2:n.x,y2:n.y}})||gg({line1:e,line2:a})||gg({line1:e,line2:s})||gg({line1:e,line2:l})}({line:t,rect:e})))}const bg={x:0,width:0,y:0,height:0};const xg=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Mg=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Sg=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),Eg=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Cg=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),qg=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Og=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),Ag=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var Dg=2.5,Ng=4;const Tg=[fg.TOP,fg.TOP_LEFT,fg.TOP_RIGHT],Ig=[fg.BOTTOM,fg.BOTTOM_LEFT,fg.BOTTOM_RIGHT];function wg({position:e}){const t={x:Dg,width:-2*Dg,y:0,height:0},r=Tg.indexOf(e)>-1,n=Ig.indexOf(e)>-1;return r&&(t.y=Ng,t.height=-Ng),n&&(t.height=-Ng),t}function Lg({cx:e,cy:t,r:r,degrees:n}){const i=n*(Math.PI/180);return{x:Math.round(e+r*Math.sin(i)),y:Math.round(t+r*-Math.cos(i))}}function Rg({coordinates:e,degrees:t,item:r}){const n={x:e.x,y:e.y};return t<=90?n.y-=r.bounds.height:t>180&&t<=270?n.x-=r.bounds.width:t>270&&(n.y-=r.bounds.height,n.x-=r.bounds.width),n}function kg({item:e,validator:t,force:r=!1}){const n=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),i=e.bounds.x,o=e.bounds.y;for(let a=0;a<n.length;a++){const s=n[a];for(let n=40;n<=180;n+=15){const a=Rg({coordinates:Lg({cx:i,cy:o,r:s,degrees:n}),degrees:n,item:e});if(t({item:e,placement:a,ignoreLines:r}).valid)return a}for(let n=320;n>180;n-=15){const a=Rg({coordinates:Lg({cx:i,cy:o,r:s,degrees:n}),degrees:n,item:e});if(t({item:e,placement:a,ignoreLines:r}).valid)return a}}return!1}function Pg({item:e,validator:t,force:r=!1}){const n=[...e.preferences,...Object.keys(fg).map((e=>fg[e])).filter((t=>-1===e.preferences.indexOf(t)))],i={[fg.TOP]:xg,[fg.TOP_RIGHT]:Mg,[fg.RIGHT]:Sg,[fg.BOTTOM_RIGHT]:Eg,[fg.BOTTOM]:Cg,[fg.BOTTOM_LEFT]:qg,[fg.LEFT]:Og,[fg.TOP_LEFT]:Ag},o=[];for(let a=0;a<n.length;a++){const s=n[a],l=i[s]({item:e}),u=wg({position:s}),c=t({item:e,placement:l,adjustment:u,ignoreLines:r});if(r&&c.inside&&o.push(l),c.valid)return l}const a=()=>kg({item:e,validator:t,force:r});if(r){const e=a();return e||(o[0]||undefined)}return(e.extreme||e.elite)&&a()||undefined}function jg({model:e,size:t,all:r}){const n={},i=e.getItems(),o=[...i.map((e=>({x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2})))],a=[],s=e.getLines();i.forEach((e=>{const{data:i}=e.node;if(!e.show||!e.inside||i.null&&i.null.value||i.interpolated&&i.interpolated.value)return;const{key:l}=e;if(n[l])return void e.setDuplicate();n[l]=!0;const u=function({size:e,lines:t,placements:r}){return function({item:n,placement:i,adjustment:o=bg,ignoreLines:a=!1}){const s={inside:yg({item:n,placement:i,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=vg({candidate:{x:i.x+o.x,y:i.y+o.y,width:n.bounds.width+o.width,height:n.bounds.height+o.height},lines:a?[]:t,rects:r}),s.valid=!s.collides,s):s}}({size:t,lines:s,placements:o}),c=Pg({item:e,validator:u});c?(c.height=e.bounds.height,c.width=e.bounds.width,o.push(c),e.setPlacement(c)):r&&a.push({item:e,validator:u})})),a.forEach((e=>{const{item:t,validator:r}=e,n=Pg({item:t,validator:r,force:!0});n&&(n.height=t.bounds.height,n.width=t.bounds.width,o.push(n),t.setPlacement(n))}))}var Fg={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,connect:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},target:{labelSpace:"label-space-component",point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge"},style:{fontFamily:"QlikView Sans, sans-serif",fontSize:"12px",fill:"#333"}},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},t=this.chart.component(this.settings.settings.target.labelSpace);if(!t||!t.rect)return e;const{orientation:r,rtl:n}=this.settings.settings,i="horizontal"===r;if(t.show(n)){const{size:r}=t.settings.settings;e.edgeBleed.top=i?r:0,e.edgeBleed[n?"left":"right"]=i?0:r}return e},render(){if(!this.chart.component(this.settings.settings.target.point))return[];const{allPoints:e}=this.settings.settings.target,t=e.length?e=>this.settings.settings.target.allPoints.includes(e.key):e=>e.key===this.settings.settings.target.point,r=this.chart.findShapes("circle").filter(t);if(!r.length)return[];const{settings:n}=this.settings,i="horizontal"===n.orientation,o=i?"x":"y";r.sort(((e,t)=>e.localBounds[o]-t.localBounds[o]));const a={label:n.label,pointValue:n.pointValue,majorValue:n.majorValue,lineIndex:n.lineIndex},{height:s,width:l,edgeBleed:u}=this.rect,c={height:s,width:l,edgeBleed:u,insideStrategy:n.insideStrategy},{style:d}=this,m=hg({nodes:r,extract:a,style:d,measureText:this.renderer.measureText,size:c,horizontal:i,rtl:n.rtl,showLabel:n.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:m}),jg({model:m,size:c,all:n.all}),m.getItems().filter((e=>e.placement&&e.node.key===this.settings.settings.target.point)).map((e=>({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:d.fontSize,fontFamily:d.fontFamily,fill:d.fill,text:a.label(e.node.data),baseline:"central",anchor:"middle"})))}},Vg={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var _g={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:r,rtl:n,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,u=this.settings.settings.primaryExtremum(),c=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==u,m=l.length&&void 0!==c;if(!d&&!m)return[];const f=s.map((e=>e.ref)),p=l.map((e=>e.ref)),h=function({type:e,primaryExtremum:t,secondaryExtremum:r,primaryItems:n=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];return[...o,...a].forEach((o=>{const a=o.isPrimary?t:r,l=o.isPrimary?n:i;s.push((({type:e,extremum:t,separateStacking:r,items:n})=>{const i="max"===e?e=>e>t:e=>e<t,o=r?e=>i(e.point.value<0?e.start.value:e.end.value):e=>i(e.end.value);return n.filter(o)})({type:e,extremum:a,items:l}))})),(({items:e})=>{const t=[],r=[];return e.forEach((e=>{const{value:n}=e.major;t[n]||(t[n]=!0,r.push(e))})),r})({items:s.reduce(((e,t)=>e.concat(t)),[])})}({type:t,primaryExtremum:u,secondaryExtremum:c,primaryItems:e.filter((e=>f.includes(e.end.source.field))),secondaryItems:e.filter((e=>p.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!h.length)return[];const y="horizontal"===r,g=this.rect[y?"width":"height"],v=this.resolver.resolve({data:{items:h},settings:{major:a},scaled:{major:g}}),b=("max"===t?90:-90)-(y?0:90)-(!y&&n?180:0),x=o/2*i,{fill:M}=this.settings.style;return v.items.map((e=>function({symbol:e,size:t,fill:r,startAngle:n,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:r,stroke:"#205891",strokeWidth:0,sides:3,startAngle:n,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:M,startAngle:b,x:y?g*e.major:x,y:y?x:g*e.major,data:e.data})))}};function Bg({x:e,y:t,size:r,stroke:n,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:n||o,strokeWidth:i,x1:e-r/2,y1:t,x2:e+r/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*r}]}}function Hg({chart:e,seriesInfo:t}){const r={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},n=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))];return e.findShapes("path").filter((e=>n.some((t=>t===e.key)))).reduce(((e,r)=>((t.primary.some((e=>e.key===r.key))?e.primary:e.secondary).paths.push(r),e)),r),{getLine:(e,t)=>{const n=t?r.primary:r.secondary;if(!n.map[e]){const[t]=n.paths.filter((t=>t.data&&t.data.typeIndex.value===e));n.map[e]=t}return n.map[e]}}}function $g({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function zg({brush:e,chart:t}){const r=e.brush.ranges();if(!r.length)return!1;const n=t&&t.scale(ea.SCALE.MAJOR),i=n&&n.max&&n.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return r.some((t=>t.min<=e&&o(e,t.max)))}}function Ug({brush:e,selectionInfo:t,items:r,selectionValues:n,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:u,legendTap:c}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let m=[u?e=>e.color.value:n[d]].filter(Boolean);if(i&&l&&m.push((e=>e.color.value)),!i&&c&&(m=[e=>e.color.value]),!m.length)return[];const f=function({brush:e,chart:t}){return("value"===e.type?$g:zg)({brush:e,chart:t})}({brush:s,chart:o});return f?r.reduce(((e,t,r)=>(m.some((e=>f({value:e(t)})))&&e.push({item:t,index:r}),e)),[]):[]}function Yg({chart:e,selected:t,connection:r,gradient:n,fallback:i}){const o=e.scale(ea.SCALE.COLOR),a=t.filter((e=>-1!==r.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/c))}))),m=d.map((e=>e.offset)),f=m.lastIndexOf(0),p=m.indexOf(1),h=d.slice(-1===f?0:f,-1===p?d.length:p+1);return{type:"gradient",x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2,stops:h}}function Wg({chart:e,selected:t,connection:r,gradient:n,fallback:i}){const o=e.scale(ea.SCALE.COLOR),a=t.filter((e=>-1!==r.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,u=0===l?1:l,c=o.domain(),d=[];for(let e=0;e<c.length-1;e++){const t=c[e],r=o(t)||i;d.push({color:r,offset:Math.min(1,Math.max(0,(t-s)/u))});const n=c[e+1];d.push({color:r,offset:Math.min(1,Math.max(0,(n-s)/u))})}const m=d.map((e=>e.offset)),f=m.lastIndexOf(0),p=m.indexOf(1),h=d.slice(-1===f?0:f,-1===p?d.length:p+1);return{type:"gradient",x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2,stops:h}}function Gg({property:e,chart:t,connection:r,attrs:n,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:u,orientation:c,rtl:d}){const m=n[e];if("gradient"!==m.type)return m;const{type:f,nil:p}=i;if(s||!o)return function({chart:e,selected:t,connection:r,gradient:n,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:u}){const c=e.scale(ea.SCALE.MAJOR),d=e.scale(ea.SCALE.COLOR),m=s?e=>c([e,0])+c.bandwidth()*l/2:e=>c(e),f=t.filter((e=>-1!==r.indexOf(e.index))),p=("vertical"===o&&u?f.reverse():f).map((e=>e.item)),h=p.map((e=>m(e.major.value))),y=Math.min(...h),g=Math.max(...h)-y,v=0===g?1:g,b=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-y)/v)),x=[];for(let e=0;e<p.length;e++){const t=p[e],r=a?t.color.value:d(t.color.value)||i,n=b[e];x.push({color:r,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:r,offset:e===p.length-1?1:Math.max(0,parseFloat((n+(b[e+1]-n)/2).toFixed(5)))})}return{type:"gradient",x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2,stops:x}}({chart:t,selected:a,connection:r,gradient:m,fallback:p,orientation:c,isColorCode:"color"===f,groupedByMeasure:l,itemsPerGroup:u,rtl:d});return("continuous"===f?Yg:Wg)({chart:t,selected:a,connection:r,gradient:m,fallback:p})}function Kg({chart:e,pathModel:t,colorSettings:r,colorByData:n,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:u,selected:c,connections:d,rtl:m,count:f}){const p=t.getLine(l,u),{attrs:h}=p,y=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),r={letter:t,x:0,y:0,raw:e},n=e.substring(1).split(",");return"M"===t||"L"===t?([r.x]=n,[,r.y]=n):"C"===t&&([,,,,r.x]=n,[,,,,,r.y]=n),r}))}({d:h.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:r,hasMultipleMeasures:n,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:u,attrs:c,rtl:d,count:m}){return{path:l.map(((e,t)=>{const r=u[e];return 0!==t||"M"===r.letter?r.raw:`M${r.x},${r.y}`})).join(""),attrs:c,stroke:Gg({property:"stroke",chart:e,connection:l,attrs:c,selected:s,colorSettings:t,colorByData:r,hasMultipleMeasures:n,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:d,count:m})}}({chart:e,colorSettings:r,colorByData:n,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:c,connection:t,commands:y,attrs:h,rtl:m,count:f})))}function Xg({chart:e,pathModel:t,seriesInfo:r,brush:n,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,rtl:f}){const p=function({items:e,seriesInfo:t}){const r=e.reduce(((e,r,n)=>{const i=r.typeIndex.value;var o;return e[i]||(e[i]={key:i,items:[],index:n,measureIx:null===(o=r.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===i))}),e[i].items.push(r),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:function({items:e,selectionInfo:t,seriesInfo:r}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:n,minorRangePrimary:i}=t;return!n||(i?r.primary:r.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:i,seriesInfo:r}),seriesInfo:r}),{lines:h}=p.reduce(((r,o)=>{const p=Ug({brush:n,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l,chart:e});if(p.length<2)return r;const h=function({selected:e}){return e.reduce(((e,t)=>{const{index:r}=t;if(e.length){const t=e[e.length-1];r===t[t.length-1]+1?t.push(r):e.push([r])}else e.push([r]);return e}),[]).filter((e=>e.length>1))}({selected:p});return h.length?(r.lines.push(...Kg({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,lineKey:o.lineKey,primary:o.primary,selected:p,connections:h,rtl:f,count:o.items.length})),r):r}),{lines:[]}),y=[];return h.forEach((e=>y.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),y}var Jg={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:Hg({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=Xg({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=Hg({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return Xg({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const Zg="QlikView Sans, sans-serif";var Qg=[["object.comboChart","","fontFamily"],["object.comboChart","outOfRange","color","#999"],["object.comboChart","axis.title","color"],["object.comboChart","axis.title","fontSize","13px"],["object.comboChart","axis.title","fontFamily",Zg],["object.comboChart","axis.label.name","color","#595959"],["object.comboChart","axis.label.name","fontSize","12px"],["object.comboChart","axis.label.name","fontFamily",Zg],["object.comboChart","axis.line.major","color","#cccccc"],["object.comboChart","axis.line.minor","color","#e6e6e6"],["object.comboChart","label.value","fontFamily",Zg],["object.comboChart","label.value","fontSize","12px"],["object.comboChart","label.value","numFontSize","12px",e=>parseInt(e,10)],["object.comboChart","label.value","color","#595959"],[!1,"label.value","lightColor","#E6E6E6"],[!1,"label.value","darkColor","#595959"]];const ev={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},tv=e=>void 0===e.marker?ev.circle:ev[e.marker],rv=e=>void 0===e.markerFill||e.markerFill;function nv({series:e,layoutService:t}){switch(Lf(e)){case ta.MARKER:return(e=>({marker:tv(e),fill:rv(e)}))(e);case ta.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);default:return{}}}function iv(e=na,t){return t?e.axis===ra.PRIMARY:e.axis===ra.PRIMARY||Lf(e)===ta.BAR}var ov={exports:{}};var av={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};var sv="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r}=av,n=sv,i=(t=e.exports={}).re=[],o=t.src=[],a=t.t={};let s=0;const l=(e,t,r)=>{const l=s++;n(l,t),a[e]=l,o[l]=t,i[l]=new RegExp(t,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`),l("FULL",`^${o[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`),l("LOOSE",`^${o[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",o[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",o[a.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?)?)?`),l("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),l("COERCERTL",o[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})\\s+-\\s+(${o[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}(ov,ov.exports);const lv=["includePrerelease","loose","rtl"];var uv=e=>e?"object"!=typeof e?{loose:!0}:lv.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const cv=/^[0-9]+$/,dv=(e,t)=>{const r=cv.test(e),n=cv.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1};var mv={compareIdentifiers:dv,rcompareIdentifiers:(e,t)=>dv(t,e)};const fv=sv,{MAX_LENGTH:pv,MAX_SAFE_INTEGER:hv}=av,{re:yv,t:gv}=ov.exports,vv=uv,{compareIdentifiers:bv}=mv;class xv{constructor(e,t){if(t=vv(t),e instanceof xv){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>pv)throw new TypeError(`version is longer than ${pv} characters`);fv("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?yv[gv.LOOSE]:yv[gv.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>hv||this.major<0)throw new TypeError("Invalid major version");if(this.minor>hv||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>hv||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<hv)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(e){if(fv("SemVer.compare",this.version,this.options,e),!(e instanceof xv)){if("string"==typeof e&&e===this.version)return 0;e=new xv(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof xv||(e=new xv(e,this.options)),bv(this.major,e.major)||bv(this.minor,e.minor)||bv(this.patch,e.patch)}comparePre(e){if(e instanceof xv||(e=new xv(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],n=e.prerelease[t];if(fv("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return bv(r,n)}while(++t)}compareBuild(e){e instanceof xv||(e=new xv(e,this.options));let t=0;do{const r=this.build[t],n=e.build[t];if(fv("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return bv(r,n)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}var Mv=xv;const{MAX_LENGTH:Sv}=av,{re:Ev,t:Cv}=ov.exports,qv=Mv,Ov=uv;var Av=(e,t)=>{if(t=Ov(t),e instanceof qv)return e;if("string"!=typeof e)return null;if(e.length>Sv)return null;if(!(t.loose?Ev[Cv.LOOSE]:Ev[Cv.FULL]).test(e))return null;try{return new qv(e,t)}catch(e){return null}};const Dv=Av;var Nv=(e,t)=>{const r=Dv(e,t);return r?r.version:null};const Tv=Av;var Iv=(e,t)=>{const r=Tv(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};const wv=Mv;var Lv=(e,t,r,n)=>{"string"==typeof r&&(n=r,r=void 0);try{return new wv(e,r).inc(t,n).version}catch(e){return null}};const Rv=Mv;var kv=(e,t,r)=>new Rv(e,r).compare(new Rv(t,r));const Pv=kv;var jv=(e,t,r)=>0===Pv(e,t,r);const Fv=Av,Vv=jv;var _v=(e,t)=>{if(Vv(e,t))return null;{const r=Fv(e),n=Fv(t),i=r.prerelease.length||n.prerelease.length,o=i?"pre":"",a=i?"prerelease":"";for(const e in r)if(("major"===e||"minor"===e||"patch"===e)&&r[e]!==n[e])return o+e;return a}};const Bv=Mv;var Hv=(e,t)=>new Bv(e,t).major;const $v=Mv;var zv=(e,t)=>new $v(e,t).minor;const Uv=Mv;var Yv=(e,t)=>new Uv(e,t).patch;const Wv=Av;var Gv=(e,t)=>{const r=Wv(e,t);return r&&r.prerelease.length?r.prerelease:null};const Kv=kv;var Xv=(e,t,r)=>Kv(t,e,r);const Jv=kv;var Zv=(e,t)=>Jv(e,t,!0);const Qv=Mv;var eb=(e,t,r)=>{const n=new Qv(e,r),i=new Qv(t,r);return n.compare(i)||n.compareBuild(i)};const tb=eb;var rb=(e,t)=>e.sort(((e,r)=>tb(e,r,t)));const nb=eb;var ib=(e,t)=>e.sort(((e,r)=>nb(r,e,t)));const ob=kv;var ab=(e,t,r)=>ob(e,t,r)>0;const sb=kv;var lb=(e,t,r)=>sb(e,t,r)<0;const ub=kv;var cb=(e,t,r)=>0!==ub(e,t,r);const db=kv;var mb=(e,t,r)=>db(e,t,r)>=0;const fb=kv;var pb=(e,t,r)=>fb(e,t,r)<=0;const hb=jv,yb=cb,gb=ab,vb=mb,bb=lb,xb=pb;var Mb=(e,t,r,n)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return hb(e,r,n);case"!=":return yb(e,r,n);case">":return gb(e,r,n);case">=":return vb(e,r,n);case"<":return bb(e,r,n);case"<=":return xb(e,r,n);default:throw new TypeError("Invalid operator: "+t)}};const Sb=Mv,Eb=Av,{re:Cb,t:qb}=ov.exports;var Ob=(e,t)=>{if(e instanceof Sb)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=Cb[qb.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),Cb[qb.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;Cb[qb.COERCERTL].lastIndex=-1}else r=e.match(Cb[qb.COERCE]);return null===r?null:Eb(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)},Ab=Db;function Db(e){var t=this;if(t instanceof Db||(t=new Db),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)t.push(arguments[r]);return t}function Nb(e,t,r){var n=t===e.head?new wb(r,null,t,e):new wb(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function Tb(e,t){e.tail=new wb(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function Ib(e,t){e.head=new wb(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function wb(e,t,r,n){if(!(this instanceof wb))return new wb(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Db.Node=wb,Db.create=Db,Db.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Db.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Db.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Db.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)Tb(this,arguments[e]);return this.length},Db.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)Ib(this,arguments[e]);return this.length},Db.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Db.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Db.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},Db.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},Db.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Db.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Db.prototype.map=function(e,t){t=t||this;for(var r=new Db,n=this.head;null!==n;)r.push(e.call(t,n.value,this)),n=n.next;return r},Db.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Db,n=this.tail;null!==n;)r.push(e.call(t,n.value,this)),n=n.prev;return r},Db.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},Db.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},Db.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Db.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Db.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Db;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;for(;null!==i&&n<t;n++,i=i.next)r.push(i.value);return r},Db.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Db;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=this.length,i=this.tail;null!==i&&n>t;n--)i=i.prev;for(;null!==i&&n>e;n--,i=i.prev)r.push(i.value);return r},Db.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var o=[];for(n=0;i&&n<t;n++)o.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(n=0;n<r.length;n++)i=Nb(this,i,r[n]);return o},Db.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{!function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}(Db)}catch(Kd){}const Lb=Ab,Rb=Symbol("max"),kb=Symbol("length"),Pb=Symbol("lengthCalculator"),jb=Symbol("allowStale"),Fb=Symbol("maxAge"),Vb=Symbol("dispose"),_b=Symbol("noDisposeOnSet"),Bb=Symbol("lruList"),Hb=Symbol("cache"),$b=Symbol("updateAgeOnGet"),zb=()=>1;const Ub=(e,t,r)=>{const n=e[Hb].get(t);if(n){const t=n.value;if(Yb(e,t)){if(Gb(e,n),!e[jb])return}else r&&(e[$b]&&(n.value.now=Date.now()),e[Bb].unshiftNode(n));return t.value}},Yb=(e,t)=>{if(!t||!t.maxAge&&!e[Fb])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[Fb]&&r>e[Fb]},Wb=e=>{if(e[kb]>e[Rb])for(let t=e[Bb].tail;e[kb]>e[Rb]&&null!==t;){const r=t.prev;Gb(e,t),t=r}},Gb=(e,t)=>{if(t){const r=t.value;e[Vb]&&e[Vb](r.key,r.value),e[kb]-=r.length,e[Hb].delete(r.key),e[Bb].removeNode(t)}};class Kb{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const Xb=(e,t,r,n)=>{let i=r.value;Yb(e,i)&&(Gb(e,r),e[jb]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};var Jb=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[Rb]=e.max||1/0;const t=e.length||zb;if(this[Pb]="function"!=typeof t?zb:t,this[jb]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[Fb]=e.maxAge||0,this[Vb]=e.dispose,this[_b]=e.noDisposeOnSet||!1,this[$b]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[Rb]=e||1/0,Wb(this)}get max(){return this[Rb]}set allowStale(e){this[jb]=!!e}get allowStale(){return this[jb]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[Fb]=e,Wb(this)}get maxAge(){return this[Fb]}set lengthCalculator(e){"function"!=typeof e&&(e=zb),e!==this[Pb]&&(this[Pb]=e,this[kb]=0,this[Bb].forEach((e=>{e.length=this[Pb](e.value,e.key),this[kb]+=e.length}))),Wb(this)}get lengthCalculator(){return this[Pb]}get length(){return this[kb]}get itemCount(){return this[Bb].length}rforEach(e,t){t=t||this;for(let r=this[Bb].tail;null!==r;){const n=r.prev;Xb(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[Bb].head;null!==r;){const n=r.next;Xb(this,e,r,t),r=n}}keys(){return this[Bb].toArray().map((e=>e.key))}values(){return this[Bb].toArray().map((e=>e.value))}reset(){this[Vb]&&this[Bb]&&this[Bb].length&&this[Bb].forEach((e=>this[Vb](e.key,e.value))),this[Hb]=new Map,this[Bb]=new Lb,this[kb]=0}dump(){return this[Bb].map((e=>!Yb(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[Bb]}set(e,t,r){if((r=r||this[Fb])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,i=this[Pb](t,e);if(this[Hb].has(e)){if(i>this[Rb])return Gb(this,this[Hb].get(e)),!1;const o=this[Hb].get(e).value;return this[Vb]&&(this[_b]||this[Vb](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[kb]+=i-o.length,o.length=i,this.get(e),Wb(this),!0}const o=new Kb(e,t,i,n,r);return o.length>this[Rb]?(this[Vb]&&this[Vb](e,t),!1):(this[kb]+=o.length,this[Bb].unshift(o),this[Hb].set(e,this[Bb].head),Wb(this),!0)}has(e){if(!this[Hb].has(e))return!1;const t=this[Hb].get(e).value;return!Yb(this,t)}get(e){return Ub(this,e,!0)}peek(e){return Ub(this,e,!1)}pop(){const e=this[Bb].tail;return e?(Gb(this,e),e.value):null}del(e){Gb(this,this[Hb].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[Hb].forEach(((e,t)=>Ub(this,t,!1)))}};class Zb{constructor(e,t){if(t=tx(t),e instanceof Zb)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Zb(e.raw,t);if(e instanceof rx)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!cx(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&dx(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=ex.get(t);if(r)return r;const n=this.options.loose,i=n?ox[ax.HYPHENRANGELOOSE]:ox[ax.HYPHENRANGE];e=e.replace(i,Ex(this.options.includePrerelease)),nx("hyphen replace",e),e=e.replace(ox[ax.COMPARATORTRIM],sx),nx("comparator trim",e,ox[ax.COMPARATORTRIM]),e=(e=(e=e.replace(ox[ax.TILDETRIM],lx)).replace(ox[ax.CARETTRIM],ux)).split(/\s+/).join(" ");const o=n?ox[ax.COMPARATORLOOSE]:ox[ax.COMPARATOR],a=e.split(" ").map((e=>fx(e,this.options))).join(" ").split(/\s+/).map((e=>Sx(e,this.options))).filter(this.options.loose?e=>!!e.match(o):()=>!0).map((e=>new rx(e,this.options)));a.length;const s=new Map;for(const e of a){if(cx(e))return[e];s.set(e.value,e)}s.size>1&&s.has("")&&s.delete("");const l=[...s.values()];return ex.set(t,l),l}intersects(e,t){if(!(e instanceof Zb))throw new TypeError("a Range is required");return this.set.some((r=>mx(r,t)&&e.set.some((e=>mx(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new ix(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(Cx(this.set[t],e,this.options))return!0;return!1}}var Qb=Zb;const ex=new Jb({max:1e3}),tx=uv,rx=Ax,nx=sv,ix=Mv,{re:ox,t:ax,comparatorTrimReplace:sx,tildeTrimReplace:lx,caretTrimReplace:ux}=ov.exports,cx=e=>"<0.0.0-0"===e.value,dx=e=>""===e.value,mx=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},fx=(e,t)=>(nx("comp",e,t),e=gx(e,t),nx("caret",e),e=hx(e,t),nx("tildes",e),e=bx(e,t),nx("xrange",e),e=Mx(e,t),nx("stars",e),e),px=e=>!e||"x"===e.toLowerCase()||"*"===e,hx=(e,t)=>e.trim().split(/\s+/).map((e=>yx(e,t))).join(" "),yx=(e,t)=>{const r=t.loose?ox[ax.TILDELOOSE]:ox[ax.TILDE];return e.replace(r,((t,r,n,i,o)=>{let a;return nx("tilde",e,t,r,n,i,o),px(r)?a="":px(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:px(i)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(nx("replaceTilde pr",o),a=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,nx("tilde return",a),a}))},gx=(e,t)=>e.trim().split(/\s+/).map((e=>vx(e,t))).join(" "),vx=(e,t)=>{nx("caret",e,t);const r=t.loose?ox[ax.CARETLOOSE]:ox[ax.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,o,a)=>{let s;return nx("caret",e,t,r,i,o,a),px(r)?s="":px(i)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:px(o)?s="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:a?(nx("replaceCaret pr",a),s="0"===r?"0"===i?`>=${r}.${i}.${o}-${a} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${a} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${a} <${+r+1}.0.0-0`):(nx("no pr"),s="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),nx("caret return",s),s}))},bx=(e,t)=>(nx("replaceXRanges",e,t),e.split(/\s+/).map((e=>xx(e,t))).join(" ")),xx=(e,t)=>{e=e.trim();const r=t.loose?ox[ax.XRANGELOOSE]:ox[ax.XRANGE];return e.replace(r,((r,n,i,o,a,s)=>{nx("xRange",e,r,n,i,o,a,s);const l=px(i),u=l||px(o),c=u||px(a),d=c;return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(o=0),a=0,">"===n?(n=">=",u?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===n&&(n="<",u?i=+i+1:o=+o+1),"<"===n&&(s="-0"),r=`${n+i}.${o}.${a}${s}`):u?r=`>=${i}.0.0${s} <${+i+1}.0.0-0`:c&&(r=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`),nx("xRange return",r),r}))},Mx=(e,t)=>(nx("replaceStars",e,t),e.trim().replace(ox[ax.STAR],"")),Sx=(e,t)=>(nx("replaceGTE0",e,t),e.trim().replace(ox[t.includePrerelease?ax.GTE0PRE:ax.GTE0],"")),Ex=e=>(t,r,n,i,o,a,s,l,u,c,d,m,f)=>`${r=px(n)?"":px(i)?`>=${n}.0.0${e?"-0":""}`:px(o)?`>=${n}.${i}.0${e?"-0":""}`:a?">="+r:`>=${r}${e?"-0":""}`} ${l=px(u)?"":px(c)?`<${+u+1}.0.0-0`:px(d)?`<${u}.${+c+1}.0-0`:m?`<=${u}.${c}.${d}-${m}`:e?`<${u}.${c}.${+d+1}-0`:"<="+l}`.trim(),Cx=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(nx(e[r].semver),e[r].semver!==rx.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0},qx=Symbol("SemVer ANY");class Ox{static get ANY(){return qx}constructor(e,t){if(t=Dx(t),e instanceof Ox){if(e.loose===!!t.loose)return e;e=e.value}wx("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===qx?this.value="":this.value=this.operator+this.semver.version,wx("comp",this)}parse(e){const t=this.options.loose?Nx[Tx.COMPARATORLOOSE]:Nx[Tx.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new Lx(r[2],this.options.loose):this.semver=qx}toString(){return this.value}test(e){if(wx("Comparator.test",e,this.options.loose),this.semver===qx||e===qx)return!0;if("string"==typeof e)try{e=new Lx(e,this.options)}catch(e){return!1}return Ix(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Ox))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new Rx(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new Rx(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=Ix(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),s=Ix(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||i&&o||a||s}}var Ax=Ox;const Dx=uv,{re:Nx,t:Tx}=ov.exports,Ix=Mb,wx=sv,Lx=Mv,Rx=Qb,kx=Qb;var Px=(e,t,r)=>{try{t=new kx(t,r)}catch(e){return!1}return t.test(e)};const jx=Qb;var Fx=(e,t)=>new jx(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const Vx=Mv,_x=Qb;var Bx=(e,t,r)=>{let n=null,i=null,o=null;try{o=new _x(t,r)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(n&&-1!==i.compare(e)||(n=e,i=new Vx(n,r)))})),n};const Hx=Mv,$x=Qb;var zx=(e,t,r)=>{let n=null,i=null,o=null;try{o=new $x(t,r)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(n&&1!==i.compare(e)||(n=e,i=new Hx(n,r)))})),n};const Ux=Mv,Yx=Qb,Wx=ab;var Gx=(e,t)=>{e=new Yx(e,t);let r=new Ux("0.0.0");if(e.test(r))return r;if(r=new Ux("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const n=e.set[t];let i=null;n.forEach((e=>{const t=new Ux(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!Wx(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})),!i||r&&!Wx(r,i)||(r=i)}return r&&e.test(r)?r:null};const Kx=Qb;var Xx=(e,t)=>{try{return new Kx(e,t).range||"*"}catch(e){return null}};const Jx=Mv,Zx=Ax,{ANY:Qx}=Zx,eM=Qb,tM=Px,rM=ab,nM=lb,iM=pb,oM=mb;var aM=(e,t,r,n)=>{let i,o,a,s,l;switch(e=new Jx(e,n),t=new eM(t,n),r){case">":i=rM,o=iM,a=nM,s=">",l=">=";break;case"<":i=nM,o=oM,a=rM,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(tM(e,t,n))return!1;for(let r=0;r<t.set.length;++r){const u=t.set[r];let c=null,d=null;if(u.forEach((e=>{e.semver===Qx&&(e=new Zx(">=0.0.0")),c=c||e,d=d||e,i(e.semver,c.semver,n)?c=e:a(e.semver,d.semver,n)&&(d=e)})),c.operator===s||c.operator===l)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const sM=aM;var lM=(e,t,r)=>sM(e,t,">",r);const uM=aM;var cM=(e,t,r)=>uM(e,t,"<",r);const dM=Qb;var mM=(e,t,r)=>(e=new dM(e,r),t=new dM(t,r),e.intersects(t));const fM=Px,pM=kv;const hM=Qb,yM=Ax,{ANY:gM}=yM,vM=Px,bM=kv,xM=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===gM){if(1===t.length&&t[0].semver===gM)return!0;e=r.includePrerelease?[new yM(">=0.0.0-0")]:[new yM(">=0.0.0")]}if(1===t.length&&t[0].semver===gM){if(r.includePrerelease)return!0;t=[new yM(">=0.0.0")]}const n=new Set;let i,o,a,s,l,u,c;for(const t of e)">"===t.operator||">="===t.operator?i=MM(i,t,r):"<"===t.operator||"<="===t.operator?o=SM(o,t,r):n.add(t.semver);if(n.size>1)return null;if(i&&o){if(a=bM(i.semver,o.semver,r),a>0)return null;if(0===a&&(">="!==i.operator||"<="!==o.operator))return null}for(const e of n){if(i&&!vM(e,String(i),r))return null;if(o&&!vM(e,String(o),r))return null;for(const n of t)if(!vM(e,String(n),r))return!1;return!0}let d=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver,m=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;d&&1===d.prerelease.length&&"<"===o.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(c=c||">"===e.operator||">="===e.operator,u=u||"<"===e.operator||"<="===e.operator,i)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),">"===e.operator||">="===e.operator){if(s=MM(i,e,r),s===e&&s!==i)return!1}else if(">="===i.operator&&!vM(i.semver,String(e),r))return!1;if(o)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=SM(o,e,r),l===e&&l!==o)return!1}else if("<="===o.operator&&!vM(o.semver,String(e),r))return!1;if(!e.operator&&(o||i)&&0!==a)return!1}return!(i&&u&&!o&&0!==a)&&(!(o&&c&&!i&&0!==a)&&(!m&&!d))},MM=(e,t,r)=>{if(!e)return t;const n=bM(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},SM=(e,t,r)=>{if(!e)return t;const n=bM(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};var EM=(e,t,r={})=>{if(e===t)return!0;e=new hM(e,r),t=new hM(t,r);let n=!1;e:for(const i of e.set){for(const e of t.set){const t=xM(i,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0};const CM=ov.exports;var qM={re:CM.re,src:CM.src,tokens:CM.t,SEMVER_SPEC_VERSION:av.SEMVER_SPEC_VERSION,SemVer:Mv,compareIdentifiers:mv.compareIdentifiers,rcompareIdentifiers:mv.rcompareIdentifiers,parse:Av,valid:Nv,clean:Iv,inc:Lv,diff:_v,major:Hv,minor:zv,patch:Yv,prerelease:Gv,compare:kv,rcompare:Xv,compareLoose:Zv,compareBuild:eb,sort:rb,rsort:ib,gt:ab,lt:lb,eq:jv,neq:cb,gte:mb,lte:pb,cmp:Mb,coerce:Ob,Comparator:Ax,Range:Qb,satisfies:Px,toComparators:Fx,maxSatisfying:Bx,minSatisfying:zx,minVersion:Gx,validRange:Xx,outside:aM,gtr:lM,ltr:cM,intersects:mM,simplifyRange:(e,t,r)=>{const n=[];let i=null,o=null;const a=e.sort(((e,t)=>pM(e,t,r)));for(const e of a){fM(e,t,r)?(o=e,i||(i=e)):(o&&n.push([i,o]),o=null,i=null)}i&&n.push([i,null]);const s=[];for(const[e,t]of n)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push("<="+t):s.push(`${e} - ${t}`):s.push(">="+e):s.push("*");const l=s.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return l.length<u.length?l:t},subset:EM},OM="0.23.1";const AM=e=>!e||qM.lt(qM.coerce(e),qM.coerce(OM)),DM=({layoutService:e,flags:t})=>{const r=t.isEnabled("BARS_IN_SECONDARY_AXIS")&&!AM(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const r={[ta.BAR]:0,[ta.LINE]:0,[ta.MARKER]:0};return({series:n=na},i)=>{const o=iv(n,t),a=Lf(n);return{id:i,type:a,typeIndex:r[a]++,ref:"qMeasureInfo/"+i,refIndex:i,isPrimary:o,scale:o?ea.SCALE.MINOR.PRIMARY:ea.SCALE.MINOR.SECONDARY,collection:o?ea.COLLECTION.PRIMARY:ea.COLLECTION.SECONDARY,options:nv({series:n,layoutService:e})}}})(e,r)),i=(e,t)=>e.filter((e=>Lf(e)===t)).length,o=n.filter((e=>e.isPrimary)),a=n.filter((e=>!e.isPrimary)),s=[!!o.length&&o[0],!!a.length&&a[0]].filter((e=>!!e)),l=i(n,ta.BAR),u=i(o,ta.BAR),c=i(a,ta.BAR),d=e=>n.filter((t=>Lf(t)===e)),m=d(ta.LINE).map((e=>ks(ea.COMPONENT.POINT,e))),f=d(ta.MARKER).map((e=>({key:ks(ea.COMPONENT.MARKER,e),type:e.options.marker}))),p=f.map((e=>e.key)),h=[];u>0&&h.push(`${ea.COMPONENT.BAR}-${ra.PRIMARY}`),c>0&&h.push(`${ea.COMPONENT.BAR}-${ra.SECONDARY}`);const y=[...h,...m,...p],{MINI_CHART:g}=ea.COMPONENT,v=d(ta.LINE).map((e=>ks(g.LINE,e))),b=d(ta.MARKER).map((e=>ks(g.MARKER,e))),x=e.meta.isContinuous?[`${g.BAR}-${ra.PRIMARY}`,`${g.BAR}-${ra.SECONDARY}`,...v,...b]:[];return{meta:{allSeries:n,primarySeries:o,secondarySeries:a,barSeriesCount:l,primaryBarSeriesCount:u,secondaryBarSeriesCount:c,measureAxes:s,pointComponentKeys:m,markerComponentKeys:p,barComponentKeys:h,seriesComponentKeys:y,miniComponentKeys:x,markers:f},query:{all:()=>n,seriesByAxis:e=>e?o:a,series:d,isPrimary:iv}}};function NM(e){return function({layout:t}){var r,n,i;const o=rc(t,"qHyperCube.qMeasureInfo",[]),a=o.some((({series:e=na})=>Lf(e)===ta.LINE)),s=oe.continuous(t,(()=>a&&ee.isTime(!0,t))),l=e.isEnabled("BARS_IN_SECONDARY_AXIS")&&!AM(rc(t,"version","")),u=o.filter((({series:e=na})=>Lf(e)===ta.BAR)),c=u.length,d=u.filter((({series:e=na})=>e.axis===ra.PRIMARY)).length,m=u.filter((({series:e=na})=>e.axis===ra.SECONDARY)).length,f=l?d>1||m>1:c>1,p=("grouped"!==rc(t,"barGrouping.grouping")||s)&&f,h=!p&&c>1,y=l&&p&&(d>0&&m>1||d>1&&m>0),g=!(null==t||null===(r=t.qHyperCube)||void 0===r||null===(n=r.qDimensionInfo)||void 0===n||null===(i=n[0])||void 0===i||!i.qLocked);return{canBeContinuous:ee.canBeContinuous(t),isDiscrete:!s,isContinuous:s,isTime:ee.isTime(s,t),isSnapshot:oe.snapshot(t),isBarSeriesStacked:p,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:y,isGrouped:h||y,isGroupedByMeasure:h||y,isDimensionLocked:g,groupSize:y?2:c,hasLineSeries:a}}}function TM({layoutService:e}){const{dimensionCount:t,measureCount:r}=e.meta;return{qTop:0,qLeft:0,qWidth:t+r,qHeight:Math.min(2e3,1e4/(r+1))}}function IM({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,r){return e.getHyperCubeReducedData(r.path,[r.rect],r.zoomLevel,r.filter).catch(se).then((e=>{var r;const n=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===n&&i.length>1&&(null===(r=e[0])||void 0===r?void 0:r.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,{path:"/qHyperCubeDef",rect:TM({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function wM({genericObjectModel:e,layoutService:t}){const{isSnapshot:r,isContinuous:n}=t.meta;return r?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):n?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):IM({genericObjectModel:e,layoutService:t})}const LM=e=>"number"==typeof e&&!Number.isNaN(e);function RM({isPrimary:e,layoutService:t,seriesModel:r}){return function(){const n=t.getHyperCubeValue("qMeasureInfo"),i=r.query.seriesByAxis(e).map((e=>n[e.refIndex])),o=i.filter((e=>Lf(e.series)===ta.BAR)),a=i.filter((e=>Lf(e.series)===ta.LINE)),s=i.filter((e=>Lf(e.series)===ta.MARKER));return{min:Math.min(...i.filter((e=>LM(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>LM(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>LM(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>LM(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>LM(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>LM(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>LM(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>LM(e.qMax))).map((e=>e.qMax)))}}}}function kM({isPrimary:e,layoutService:t,seriesModel:r}){const n=RM({isPrimary:e,layoutService:t,seriesModel:r}),i=function({seriesModel:e,isPrimary:t}){return function({dataPage:r}){const n=e.query.series(ta.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:i}=r,o={min:NaN,max:NaN};return i.forEach((e=>{let t=0,r=0;e.slice(1).filter(((e,t)=>n.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?r+=e.qNum:t+=e.qNum})),o.min=Number.isNaN(o.min)?t:Math.min(t,o.min),o.max=Number.isNaN(o.max)?r:Math.max(r,o.max)})),o}}({seriesModel:r,isPrimary:e});return function({dataPage:e}){const t=n({dataPage:e});return t.bar=i({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function PM({isPrimary:e,continuousModel:t,layoutService:r,reducedModel:n,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:r}){const{isBarSeriesStacked:n}=t.meta;return n?kM({isPrimary:e,layoutService:t,seriesModel:r}):RM({isPrimary:e,layoutService:t,seriesModel:r})}({isPrimary:e,layoutService:r,seriesModel:i});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const r={min:NaN,max:NaN},{getLayoutValue:n}=t,i=n("measureAxes."+(e?0:1),{});if(i.autoMinMax)return r;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(r.min=a),"max"!==o&&"minMax"!==o||(r.max=s),Number.isNaN(r.min)||Number.isNaN(r.max)||(r.min=Math.min(a,s),r.max=Math.max(a,s)),r}({isPrimary:e,layoutService:r});return o.explicit.min=s,o.explicit.max=l,o.meta.hasExplicitMin=!Number.isNaN(s),o.meta.hasExplicitMax=!Number.isNaN(l),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:r}){const{isDiscrete:n}=t.meta;if(n){const e=r.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:r,reducedModel:n}).then((({dataPage:t})=>{const{min:r,max:n,bar:s,line:l,marker:u}=a({dataPage:t}),c=i.query.seriesByAxis(e).some((e=>Lf(e)===ta.BAR)),d=c?Math.min(r,0):r,m=c?Math.max(n,0):n,f=c?Math.min(s.min,0):s.min,p=c?Math.max(s.max,0):s.max,h=c?Math.min(l.min,0):l.min,y=c?Math.max(l.max,0):l.max,g=c?Math.min(u.min,0):u.min,v=c?Math.max(u.max,0):u.max;o.implicit.min=Number.isFinite(d)?d:0,o.implicit.max=Number.isFinite(m)?m:0,o.implicit.bar.min=Number.isFinite(f)?f:0,o.implicit.bar.max=Number.isFinite(p)?p:0,o.implicit.line.min=Number.isFinite(h)?h:0,o.implicit.line.max=Number.isFinite(y)?y:0,o.implicit.marker.min=Number.isFinite(g)?g:0,o.implicit.marker.max=Number.isFinite(v)?v:0,o.min=Number.isNaN(o.explicit.min)?o.implicit.min:o.explicit.min,o.max=Number.isNaN(o.explicit.max)?o.implicit.max:o.explicit.max,o.meta.hasExplicitMin&&!o.meta.hasExplicitMax&&(o.max=Math.max(o.min,o.max)),o.meta.hasExplicitMax&&!o.meta.hasExplicitMin&&(o.min=Math.min(o.min,o.max)),o.meta.includesZero=!!((0-o.min)*(0-o.max)<=0)}))}}}}function jM({extrema:e,ticks:t}){const r=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=r}function FM({min:e,max:t,count:r,threshold:n,disable:i}){const o=function(e,t,r){const n=nn().domain([e,t]);return n.nice(r),n}(e,t,r),a=function({min:e,max:t,threshold:r,scale:n,disable:i}){const o={start:!0,stop:!0};if(i)return o;const[a,s]=n.domain();return 0!==e&&0!==a&&(o.start=n(e)>r),0!==t&&0!==s&&(o.stop=n(t)<1-r),o}({min:e,max:t,threshold:n,scale:o,disable:i});if(!a.start||!a.stop){const[e,t]=o.domain(),n=o.ticks(r),i=n.length>=4?n[1]-n[0]:.1*e,s=n.length>=4?n[n.length-1]-n[n.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(r)}return o}const VM=50,_M=100,BM=200,HM=125;function $M({config:{measureAxesRef:e},layoutService:t,size:r}){const n=(e=>{switch(e){case.5:return VM;case 1:return _M;case 2:return BM;default:return e*HM}})(t.getLayoutValue(e+".spacing",1));return Math.max(1,Math.round(r/n))}function zM({config:e,chart:t,layoutService:r,dockService:n,measureText:i,size:o,min:a,max:s}){const l=$M({config:e,layoutService:r,size:o}),u=FM({min:a,max:s,count:l,threshold:.05,disable:!0}),c=u.domain(),d={roundedMin:c[0],roundedMax:c[1],ticks:u.ticks(l)},m="horizontal"===n.meta.major.orientation?"height":"width",f=e=>i(e)[m],p=t.formatter(e.formatter),h=()=>{const e=d.ticks.map(p);return!e.some(((t,r)=>e.indexOf(t)!==r))&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(f))<=t})(e)};for(let e=l-1;e>0&&!h();e--)u.domain([a,s]),u.nice(e),[d.roundedMin,d.roundedMax]=u.domain(),d.ticks=u.ticks(e);return d}function UM({tick:e,index:t,ticks:r}){return 0===t||t===r.length-1||0===e}function YM({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function WM({config:e,chart:t,extrema:r,min:n,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=FM({min:n,max:i,count:10,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),r=t,n=e.length-t;return e.slice(r,n).some((e=>0===e))}({ticks:s}),u=l?UM:YM;o.ticks=s.filter(((e,t,r)=>u({tick:e,index:t,ticks:r})));o.ticks.length%2==0&&!l&&!r.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const c=t.formatter(e.formatter),d=o.ticks.map(c);return d.some(((e,t)=>d.indexOf(e)!==t))&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function GM({ticks:e,extrema:t}){let r=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(r.unshift(t.explicit.min),r=r.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(r.push(t.explicit.max),r=r.filter((e=>e<=t.explicit.max))),r):r}function KM({config:e,chart:t,layoutService:r,dockService:n,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:u,roundedMin:c,roundedMax:d}=function({config:e,chart:t,layoutService:r,dockService:n,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===n.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const u=zM({config:e,chart:t,layoutService:r,dockService:n,measureText:o,size:a,min:s,max:l});return jM({extrema:i,ticks:u.ticks})?u:WM({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:r,dockService:n,extrema:i,measureText:o,size:a,min:s,max:l}),m=function({ticks:e,count:t}){const r=[];for(let n=0;n<e.length-1;n++){const i=e[n],o=(e[n+1]-i)/(t+1);for(let e=1;e<=t;e++)r.push(i+o*e)}return r}({ticks:u,count:1});return{min:c,max:d,values:[...GM({ticks:u,extrema:i}).map((e=>({value:e,isMinor:!1}))),...m.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value))}}function XM({config:e,chart:t,layoutService:r,dockService:n,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:r}=e;return t!==r?{min:t,max:r}:0===t||1===t?{min:t-1,max:r+1}:{min:t-.2*t*Math.sign(t),max:r+.2*r*Math.sign(r)}}({extrema:o});return KM({config:e,chart:t,layoutService:r,dockService:n,extrema:o,measureText:i,size:a,min:s,max:l})}function JM({config:e,chart:t,layoutService:r,extremumModel:n,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=n.query,u=function({chart:e,config:t,dockService:r,extremumModel:n,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=S.renderer("svg")();return()=>{const l=a.getStyles(),u=function({dockService:e,seriesModel:t,chart:r}){var n;const i=r.component(t.meta.seriesComponentKeys[0]),o=null!==(n=null==i?void 0:i.rect)&&void 0!==n?n:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:r,seriesModel:o}),c=n.query.getExtrema();return XM({config:t,chart:e,layoutService:i,dockService:r,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:c,size:u})}}({config:e,chart:t,layoutService:r,extremumModel:n,dockService:i,seriesModel:o,themeService:a}),c=()=>(s.locked&&s.resolved||(s.resolved=u()),s.resolved);return{query:{getValues:()=>c().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:c().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:c().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function ZM({genericObjectModel:e,layoutService:t}){const r={properties:void 0};return{query:{getProperties:()=>r.properties},command:{initialize:()=>function({layout:e,model:t}){return oe.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};r.properties=t}))}}}function QM({layoutService:e,seriesModel:t,colorService:r}){const{type:n,mode:i,fieldType:o}=r.getSettings();if("categorical"!==n)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:ta.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:r}=s(e);switch(t){case"line":return a;case"marker":return r.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:r}=s(e);return t===ta.LINE?2:t!==ta.MARKER||r.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:r,options:n}=s(e);return r!==ta.MARKER||n.fill?t(e.value):"none"}}}}}}function eS({layout:e,defaultAuto:t}){const r=t(e),n=e.qHyperCube.qMeasureInfo.length>1;return{...r,useBaseColors:n?"measure":r.useBaseColors}}function tS({actions:e,appLayoutModel:t,appModel:r,chart:n,environment:i,flags:o,genericObjectModel:a,layoutService:s,picasso:l,seriesModel:u,viewState:c}){let d;const{theme:m,translator:f}=i,p={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return d=function(e){var t,r,n,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,u=e.layoutService,c=void 0===u?void 0:u,d=e.createConfig,m=void 0===d?Uu:d,f=e.config,p=void 0===f?{}:f,h=e.custom,y=void 0===h?{}:h,g=p.localeInfo,v=p.key,b=p.theme,x=void 0===b?void 0:b,M=p.auto,S=void 0===M?void 0:M,E=p.definitionPath,C=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),q={theme:x,key:v,localeInfo:g,layout:C,hc:null==c||null===(r=c.getHyperCube)||void 0===r?void 0:r.call(c),legendProps:null==c||null===(n=c.getLayoutValue)||void 0===n?void 0:n.call(c,"legend"),colorProps:gl(gl({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:C?Bu(C):void 0})},O=Vu({picasso:o,model:a,app:s,translator:l,auto:S});!1!==S&&O.auto((function(e){return S?S({layout:e,defaultAuto:zu}):zu(e)}));var A=!1;return{getColor:function(){return O.color()},getPaletteColor:function(e){var t=e.index,r=e.color;return O.resolveUIColor({index:t,color:r})},getData:function(){return O.data()},getDatumProps:function(e){return O.datumProps(e)},getSnapshotData:function(){return O.getSnapshotData(E)},getSettingsForMeasure:function(e){return O.settingsForMeasure(e)},getSettings:function(){return O.settings()},getLegend:function(e,t){return O.legend(e,t)},getScales:function(){return O.scales()},getPalettes:function(){return O.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return O.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return A},custom:gl({},y),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?m:e)({getUseBaseColors:Bu}),r=Hu(q,t);return O.config(r),O.getAuxiliarySettings(E).then((function(){A=!0}))}}}({picasso:l,model:a,app:r,translator:f,layoutService:s,createConfig:()=>{let e;o.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&(e=s.getHyperCubeValue("qMeasureInfo").map((e=>e.color)));return{theme:m,colorProps:{measureOverrides:e},legendProps:s.getLayoutValue("legend"),hc:s.getHyperCube(),key:ea.SCALE.COLOR}},config:{auto:eS,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>p.wrappedScales,legendComponents:()=>p.legendComponents,legendInteractions:()=>p.legendInteractions,updateLegend:()=>{const{components:t,interactions:r,scales:o}=function({viewState:e,chart:t,layoutService:r,seriesModel:n,environment:i,colorService:o,actions:a}){const{options:s}=i,l={eventName:"legend-c",key:ea.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",rtl:"rtl"===s.direction,settings:QM({layoutService:r,seriesModel:n,colorService:o})},{components:u,interactions:c}=o.getLegend(l,{actions:a,navigationDisabled:!a.interact.enabled()}),d=o.getScales();return{components:u.filter(Boolean).map((e=>{const{layout:t}=e,{dock:r}=t,n=d[ea.SCALE.COLOR+"Range"];return!n||"right"!==r&&"left"!==r||(n.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:c,scales:d}}({viewState:c,chart:n,environment:i,colorService:d,seriesModel:u,layoutService:s,actions:e});p.wrappedScales=o,p.legendComponents=t,p.legendInteractions=r}}}),d}const rS=()=>{},nS=2,iS=20,oS=200;var aS={contains:function(e,t){if(!e)return!1;const{qArea:r}=e;return!!r&&(r.qLeft<=t.qLeft&&r.qLeft+r.qWidth>=t.qLeft+t.qWidth&&r.qTop<=t.qTop&&r.qTop+r.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 r=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),n=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+r-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),u=Math.min(o+n-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)c.qMatrix.push(e.qMatrix[t].slice(l,u));return c},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,r){const n=r.qTop-10<=t.qTop,i=r.qLeft+r.qWidth+10>=t.qLeft+t.qWidth,o=r.qTop+r.qHeight+10>=t.qTop+t.qHeight,a=r.qLeft-10<=t.qLeft;return n&&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 sS={contains:function(e,t){if(!e)return!1;const{qArea:r}=e;return!!r&&(r.qTop<=t.qTop&&r.qTop+r.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 r=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),n=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,n-e.qArea.qTop),a=Math.min(n+r-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-n-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:n,qLeft:i},qData:[{...e.qData[0],qUp:n,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,r){const n=r.qTop-10<=t.qTop,i=r.qTop+r.qHeight+10>=t.qTop+t.qHeight;return n&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const r=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const n={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===r&&n.args.push(600),n}}};var lS={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 uS="pages";const cS="discretePan";function dS({chart:e,actions:t,componentKey:r,dockService:n,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:cS,pointers:1,threshold:10,enable(n,i){return this.started===cS||!i||!!t.scroll.enabled()&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===r))}},events:{discretePanstart(e){e.preventDefault(),this.started=cS;const t="horizontal"===n.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},discretePanmove(e){e.preventDefault();const t="horizontal"===n.meta.major.orientation,r=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(r-this.previousTotalDelta)*a;this.previousTotalDelta=r,o.scroll(s)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function mS({chart:e,componentKey:t,actions:r,scroller:n}){return function(i){if(!r.scroll.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);n.scroll(s)}}function fS({layoutService:e,areaBuffer:t}){const r=void 0===t?function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:r}){const n=Math.min(t,Math.max(oS,r));return{width:e,height:Math.max(iS,Math.min(r*nS,n))}}}({layoutService:e}):function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:r}){return{width:e,height:Math.min(t,r)}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:t,height:i}=r({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=t?Math.ceil((t-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:t?Math.min(t,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:t?Math.max(0,Math.min(e.qLeft-a,n.width-t)):e.qLeft}}}function pS(e){let t,r;const n=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||r)return t.reject("REJECTED"),t=null,void(r&&(n(r),r=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=>{r&&r.reject("REJECTED"),r=e})(a):n(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!r,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(r.reject("REJECTED"),r=null)},i}const hS={command:{update:()=>{}}};function yS({dataStore:e,composition:t,enigmaModel:r,layoutService:n,trendLineModel:i=hS,definitionPath:o,areaBuffer:a,processDataPage:s}){const{slicer:l,cacheWarden:u,request:c}=t,d=function({dataStore:e,slice:t,warden:r,expand:n,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{if(e.contains(l)){const n=e.getCurrent();if(a)return Promise.resolve(t(n,l));const i=r.release(n.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(n,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&u&&u();const c=n(l);return o(i(c)).then((r=>(s(r),e.add(r),t(r,l))))}}({dataStore:e,slice:l,warden:u({bounds:{width:n.meta.size.x,height:n.meta.size.y}}),expand:fS({layoutService:n,areaBuffer:a}),request:c({layoutService:n,definitionPath:o}),process:pS(r),connectionless:n.meta.isSnapshot,processDataPage:s}),m=ac(((e,{onProcessing:t,onData:r})=>{d(e,{onProcessing:t}).then((e=>r(e))).catch((e=>{if("REJECTED"!==e)throw e}))}),50);return function(e,{onProcessing:t=rS,onDataPage:r=rS}={}){m(e,{onProcessing:t,onData:e=>{n.setDataPages(e?[e]:[]),i.command.update(),r(e)}})}}var gS={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:r,viewSize:n}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/n;return[a,r.inView>=r.inTotal?a+1:a+o.qArea.qWidth/r.inView]}};var vS={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:r,areaBuffer:n}){const i=void 0===n?4:n,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(r+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:r,viewSize:n}){const{pixel:i}=t,o=e.getDataPages()[0],a=n/r.inView,s=(i+o.qArea.qTop*a)/n;return[s,r.inView>=r.inTotal?s+1:s+o.qArea.qHeight/r.inView]}};function bS(e){const{groupSize:t,measureCount:r}=e.meta;return null!=t?t:r}function xS(e,t){const r=[];for(let n=0;n<e.length;n++){const i=t(e[n]);-1===r.indexOf(i)&&r.push(i)}return r.length}function MS(e){return xS(e.qMatrix,(e=>e[0].qElemNumber))-1}var SS={inTotal:function({layoutService:e}){const t=bS(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:r,areaBuffer:n}){const i=bS(e),o=void 0===n?i:n,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((r+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:r,viewSize:n}){const i=bS(e),o=e.getDataPages()[0],a=n/r.inView,{pixel:s}=t,l=MS(o),u=o.qArea.qHeight*i+l,c=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/n;return[c,r.inView>=r.inTotal?c+1:c+u/r.inView]}};const ES=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function CS(e){return{itemOffset(t,r){if(0!==t.qArea.qTop)return ES(e,r);const n=((e,t)=>{const r={successful:!0,count:0};let n=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=n;t++){if(!e[t])return r.successful=!1,r;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),n--)}return r.count=i.length-1,r})(t.qMatrix,r);return n.successful?n.count:ES(e,r)},area(t,r,n){if(0!==t.qArea.qTop)return ES(e,r);return xS(t.qMatrix.slice(0,n.qTop+1),(e=>e[0].qElemNumber))-1}}}var qS={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:r,inView:n}){const i=CS(t).itemOffset(e(),r),o=Math.max(0,Math.floor(r-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(n+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:r,items:n,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/n.inView,{item:l,pixel:u}=r,c=CS(t).area(e(),l,a.qArea),d=MS(a),m=a.qArea.qHeight+d,f=u===o?(n.inView-m)*s/i:(u+(a.qArea.qTop+c)*s)/i;return[f,n.inView>=n.inTotal?f+1:f+m/n.inView]}};function OS({rect:e,dockService:t,itemWidths:r,dimensionAxis:n,inTotal:i,isMajorVisible:o,isMajorLabelless:a,maxDataRows:s}){const{DEFAULT:l,SQUEEZE:u,LABELLESS:c}=r[t.meta.chart.mode],{axisDisplayMode:d="auto",maxVisibleItems:m=10}=n,f="horizontal"===t.meta.major.orientation?e.width:e.height,p=f/i>=u;switch(d){case"max":return Math.min(i,s);case"custom":return Math.min(m,s);case"auto":default:return!o||a?f/c:p?i:f/l}}function AS({chart:e,getRect:t,getDataPages:r,layoutService:n,dockService:i,getItemWidths:o,axisKey:a,areaBuffer:s,rtl:l}){const{inTotal:u,area:c,scaleRange:d}=function({layoutService:e}){const{isDimensionless:t,isGrouped:r,isGroupedByMeasure:n}=e.meta;return t?gS:r?n?SS:qS:vS}({layoutService:n}),m=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,f=e=>e?m()/e:0,p=(e,t)=>-(e-t)*f(t);return{getItems(){const r=n.getLayoutValue("dimensionAxis"),s=u({layoutService:n}),l=e.component(a),c=!a||!l||l.isVisible();return{inTotal:s,inView:OS({rect:t(),dockService:i,itemWidths:o(),dimensionAxis:r,inTotal:s,isMajorVisible:c,isMajorLabelless:"none"===r.show||"title"===r.show,maxDataRows:Math.floor(1e4/(n.meta.dimensionCount+n.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return f(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:r,inView:n}=t,i=Math.min(0,Math.max(e,p(r,n)));return{pixel:i,item:n?Math.abs(n*i/m()):0}},getUpperBound({items:e}){const{inTotal:t,inView:r}=e;return p(t,r)},getViewRange({pixelOffset:e,items:t}){const{inTotal:r,inView:n}=t;return function({viewSize:e,inTotal:t,inView:r,pixelOffset:n}){const i=e/r*t,o=Math.abs(n)/i;return[o,o+e/i]}({viewSize:m(),inTotal:r,inView:n,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>c({getDataPages:r,layoutService:n,itemOffset:e,inView:t.inView,areaBuffer:s}),getScaleRange({offsets:e,items:t}){const o=d({getDataPages:r,layoutService:n,offsets:e,items:t,viewSize:m(),upperBound:p(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&l?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:r,inView:n}=t;return e<=0&&e>=p(r,n)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:r}=t,n=e*f(r);return Number.isFinite(n)?-n:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:r,inView:n}=t;return-e*(f(n)*r)}}}}function DS({chart:e,componentKey:t,state:r,dataStore:n,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,areaBuffer:c,viewState:d,rtl:m}){r.set("rect",{width:0,height:0}),r.set("itemWidths",{}),r.set("itemSize",0),r.set("items",{}),r.set("offsets",{}),r.set("finished",0),r.set("scaleRange",[0,1]);const f=AS({chart:e,getRect:()=>r.get("rect"),getDataPages:n.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>r.get("itemWidths"),axisKey:u,areaBuffer:c,rtl:m}),p=()=>{const e=f.getItems();return r.set("items",e),e},h=({pixelOffset:e,items:t})=>{const n=f.getOffsets({pixelOffset:e,items:t});return r.set("offsets",n),n},y=e=>{const t=Date.now(),n=p(),a=h({pixelOffset:e,items:n}),s=f.getArea({itemOffset:a.item,items:n});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((r=>e[r]===t[r]))})(s))return void((f.validate.offset({pixelOffset:e,items:n})||d.get("scrollOffset")!==a.item)&&(r.set("finished",t),r.set("scaleRange",f.getScaleRange({offsets:a,items:n})),d.preventSet("viewRange",f.getViewRange({pixelOffset:a.pixel,items:n})),d.set("scrollOffset",a.item)));d.preventSet("viewRange",f.getViewRange({pixelOffset:a.pixel,items:n}));const l=()=>{r.get("finished")>t||(r.set("finished",t),r.set("scaleRange",f.getScaleRange({offsets:a,items:n})),d.set("scrollOffset",a.item))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=r.get("items");return e>t},itemSize:()=>r.get("itemSize"),scaleRange:()=>r.get("scaleRange"),initialize(){const n=e.component(t);if(!n)return Promise.resolve();r.set("rect","function"==typeof l?l():n.rect),r.set("itemWidths","function"==typeof s?s():s);const a=p();r.set("itemSize",f.getItemSize({items:a}));const u=void 0===d.get("scrollOffset")?(({items:e})=>1===o.getLayoutValue("scrollStartPos")?f.getUpperBound({items:e}):0)({items:a}):f.convert.itemToPixelOffset({itemOffset:d.get("scrollOffset"),items:a}),c=h({pixelOffset:u,items:a});d.preventSet("viewRange",f.getViewRange({pixelOffset:c.pixel,items:a}));const m=f.getArea({itemOffset:c.item,items:a});return new Promise((e=>{i(m,{onDataPage:()=>{r.set("scaleRange",f.getScaleRange({offsets:c,items:a})),d.preventSet("scrollOffset",c.item),e()}})}))},scroll(e){const t=r.get("offsets").pixel+e;y(t)},scrollToRelative(e){const t=r.get("items"),n=f.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(n)}}}function NS({chart:e,actions:t,componentKey:r,enigmaModel:n,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:m,areaBuffer:f,processDataPage:p=(()=>{})}={}}){const h=ic(),y=function({qMode:e}){switch(e){case"S":default:return aS;case"K":return sS;case"T":return lS}}({qMode:i.getHyperCubeValue("qMode")}),g=function({state:e,contains:t}){return e.set(uS,[]),{add:t=>{const r=e.get(uS);r.length=0,r.push(t)},getCurrent:()=>e.get(uS)[0],getAll:()=>e.get(uS),contains:r=>t(e.get(uS)[0],r)}}({state:h,contains:y.contains});!function({layoutService:e,dataStore:t,composition:r}){const n=e.getDataPages()[0];if(!n)return;const i=r.patcher({layoutService:e});i.should(n)&&i(n),t.add(n)}({layoutService:i,dataStore:g,composition:y});const v=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:f}),b=yS({dataStore:g,composition:y,enigmaModel:n,layoutService:i,trendLineModel:a,definitionPath:c,areaBuffer:v,processDataPage:p}),x=DS({chart:e,componentKey:r,state:h,dataStore:g,pageData:b,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:m,areaBuffer:v,viewState:l,rtl:u}),M=function({layoutService:e,dataStore:t}){return function(r){const n=rc(r,""+e.refs.dataPages);n.length=0,n.push(t.getCurrent())}}({layoutService:i,dataStore:g});return{interactions:function({chart:e,actions:t,componentKey:r,dockService:n,rtl:i,scroller:o}){return{gestures:[dS({chart:e,actions:t,componentKey:r,dockService:n,rtl:i,scroller:o})],native:{type:"native",events:{wheel:mS({chart:e,actions:t,componentKey:r,scroller:o})}}}}({chart:e,actions:t,componentKey:r,dockService:o,rtl:u,scroller:x}),query:{getCanScroll:()=>x.enabled(),getItemSize:()=>x.itemSize(),getScaleRange:()=>x.scaleRange(),getCurrentDataPage:()=>g.getCurrent()},command:{initialize:()=>x.initialize(),scrollTo:e=>x.scrollToRelative(e),setSnapshotData:e=>M(e)}}}var TS={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function IS({appLayoutModel:e,appModel:t,chart:r,environment:n,flags:i,genericObjectModel:o,layout:a,picasso:s}){const{translator:l,embed:u}=n,c=function({layout:e,app:t,picasso:r,model:n,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:r,model:n,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:ya,miniChartToken:{},embed:s}}({layout:a,app:t,model:o,picasso:s,chart:r,translator:l,localeInfo:e.qLocaleInfo,embed:u});return{query:{useCustomTooltip:()=>c.useCustomTooltip,useTooltipChart:()=>{var e,t,r,n;return i.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(e=a.tooltip)||void 0===e||null===(t=e.chart)||void 0===t||null===(r=t.object)||void 0===r?void 0:r.refId)&&c.embed&&"function"==typeof(null===(n=c.model)||void 0===n?void 0:n.getEffectiveProperties)},hasChartLimitation:()=>{var e;return null==t||null===(e=t.isInModalSelection)||void 0===e?void 0:e.call(t)},getCustomTooltipModel:()=>c}}}function wS({layoutService:e,key:t}){const{style:r}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:n,defaultValue:i,index:o})=>{const a=r&&Object.hasOwnProperty.call(r,n)?r[n]:i;if(void 0===o)return a;const{style:s}=e.getHyperCubeValue((e=>`qMeasureInfo.${e}.styling`)(o),[]).filter((e=>e.key===t))[0]||{};return s&&Object.hasOwnProperty.call(s,n)?s[n]:a}}function LS({layoutService:e,dockService:t}){const{BAR:r,LINE:n,POINT:i}=Us,o=wS({layoutService:e,key:"bar"}),a=wS({layoutService:e,key:"line"}),s=()=>{const e=o({property:"strokeWidth",defaultValue:"none"});return e?r.STROKE.WIDTH[e.toUpperCase()]:0};return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>o({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!s(),getStrokeWidth:()=>s(),getStrokeColor:()=>o({property:"strokeColor",defaultValue:{index:-1,color:r.STROKE.COLOR}}).color},line:{getCurveFn:()=>(e,t)=>a({property:"lineCurve",defaultValue:n.CURVE.LINEAR,index:t}),getStrokeWidthFn:()=>(e,r)=>a({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?n.WIDTH.FULL.DEFAULT:n.WIDTH.LESS.DEFAULT,index:r}),getStrokeDasharrayFn:()=>(e,t)=>{const r=a({property:"lineType",defaultValue:n.TYPE.SOLID,index:t});return r&&n.TYPE[r.toUpperCase()]}},point:{getSize:e=>a({property:"dataPointSize",defaultValue:i.SIZE.DEFAULT,index:e})}}}}const{model:RS}=Gp,kS=({picasso:e,chart:c,environment:d,flags:m,viewState:f,viewCache:p,actions:h,selectionService:y})=>{const g=o(),{width:v,height:b}=n(),[x,M]=t(),[S,E]=t(),C=a(),q=s(),O=l(),A=u();r((()=>{if(!(g&&null!=c&&c.update&&d&&f))return;const t=function(e){var t=e.source,r=e.metaAdditionsFn,n=Il(!0,{},t),i=lc(n),o=function(){return function(e){var t=e.layout,r=e.additionsFn,n=void 0===r?function(){return{}}:r,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,s=a.qDimensionInfo,l=a.qMeasureInfo,u=a.qMode,c=s.length,d=l.length,m=gl({mode:{S:"S"===u,P:"P"===u,K:"K"===u,T:"T"===u},dimensionCount:c,measureCount:d,hasMultipleDimensions:c>1,hasMultipleMeasures:d>1,isOneDimensional:1===c,isTwoDimensional:2===c},o);return gl(gl({},m),n({layout:t,meta:m}))}({layout:n,additionsFn:r,additionsProps:{size:i.size}})},a={refs:gl({},i.refs),meta:o(),getLayout:function(){return n},getLayoutValue:function(e,t){return rc(n,e,t)},setLayoutValue:function(e,t){nc(n,e,t),i=lc(n),a.meta=o()},getHyperCube:function(){return n.qHyperCube},getHyperCubeValue:function(e,t){return rc(n.qHyperCube,e,t)},setHyperCubeValue:function(e,t){nc(n.qHyperCube,e,t),i=lc(n),a.meta=o()},getDataPages:function(){return rc(n,i.refs.dataPages)},setDataPages:function(e){nc(n,i.refs.dataPages,e),a.meta=o()}};return a}({source:g,metaAdditionsFn:NM(m)}),{viewState:r={}}=d.options,{legendScrollOffset:n,scrollOffset:i}=t.meta.isSnapshot?t.getLayoutValue("snapshotData.content.chartData",{}):r;f.preventSet("scrollOffset",i),f.preventSet("legendScrollOffset",n),f.preventSet("title",t.getLayoutValue("title"));const o=function({genericObjectModel:e,layoutService:t}){const r={cube:void 0,on:!1},n=wM({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>r.cube,getIsReduced:()=>r.on},command:{initialize:()=>n().then((({reducedCube:e})=>{r.cube=e,r.on=!!(r.cube&&r.cube.qDataPages[0]&&r.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=r.cube}}}}({genericObjectModel:C,layoutService:t}),a=tc({chart:c,layoutService:t,config:{logicalSize:{width:v,height:b},rtl:"rtl"===d.options.direction},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),s=LS({layoutService:t,dockService:a}),l=DM({layoutService:t,flags:m}),u=t.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:r,dockService:n,seriesModel:i,viewState:o,rtl:a,actions:s}){return NS({chart:e,actions:s,componentKey:Kp(i),enigmaModel:t,layoutService:r,dockService:n,viewState:o,rtl:a,itemWidths:TS,options:{axisKey:ea.COMPONENT.AXIS.MAJOR}})}({chart:c,genericObjectModel:C,layoutService:t,dockService:a,seriesModel:l,viewState:f,rtl:"rtl"===d.options.direction,actions:h}):void 0,x=t.meta.isContinuous?RS({model:C,layoutService:t,viewState:f,viewCache:p}):void 0,S=tS({actions:h,appLayoutModel:O,appModel:q,chart:c,environment:d,flags:m,genericObjectModel:C,layoutService:t,picasso:e,seriesModel:l,viewState:f}),E=function(e){var t=e.theme,r=e.styleMatrix,n={theme:t,styleMatrix:Im(void 0===r?[]:r),styles:void 0};return n.styles=wm(n.styleMatrix,t),{getStyles:function(){return n.styles},getTheme:function(){return n.theme},setTheme:function(e){n.theme=e,n.styles=wm(n.styleMatrix,e)}}}({theme:d.theme,styleMatrix:Qg}),D=function({layoutService:e,seriesModel:t}){const{isContinuous:r}=e.meta,n="qDimensionInfo/0",i=n+":numeric";return{main:{major:n,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:r?[{key:i,from:n,override:{value:e=>e.qNum}}]:void 0}}({layoutService:t,seriesModel:l}),N=PM({isPrimary:!0,layoutService:t,reducedModel:o,seriesModel:l,continuousModel:x,flags:m}),T=PM({isPrimary:!1,layoutService:t,reducedModel:o,seriesModel:l,continuousModel:x,flags:m}),I=JM({config:{measureAxesRef:"measureAxes.0",formatter:ea.FORMATTER.PRIMARY},chart:c,layoutService:t,extremumModel:N,dockService:a,seriesModel:l,themeService:E}),w=JM({config:{measureAxesRef:"measureAxes.1",formatter:ea.FORMATTER.SECONDARY},chart:c,layoutService:t,extremumModel:T,dockService:a,seriesModel:l,themeService:E}),L=ZM({genericObjectModel:C,layoutService:t}),R=IS({appLayoutModel:O,appModel:q,chart:c,environment:d,flags:m,genericObjectModel:C,layout:g,picasso:e}),k=Zo({layoutService:t,discreteModel:u}),P=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:ea.SCALE.MAJOR,MAJOR_INNER:ea.SCALE.MAJOR_INNER,MINOR:{PRIMARY:ea.SCALE.MINOR.PRIMARY,SECONDARY:ea.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${ea.COMPONENT.BAR}-${ra.PRIMARY}`,BAR_SECONDARY:`${ea.COMPONENT.BAR}-${ra.SECONDARY}`,AXIS:{MAJOR:ea.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:ea.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:ea.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:ea.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:ea.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:ea.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:ea.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:ea.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:ea.COLLECTION.MAIN}}}}(t),j=function(e){var t=e.picassoInstance,r=e.plugins,n=e.pluginArgs,i=void 0===n?{}:n,o={initialized:!1,definitions:[]};return{initialize:function(){return pl(regeneratorRuntime.mark((function e(){var n,a,s,l;return regeneratorRuntime.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(r.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=pl(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,r.fn(gl({},i));case 4:if("object"===ml(n=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(r.info.componentName,n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(r.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(gl({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(n=o.definitions).push.apply(n,xl(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var r=bl(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(r){var n=Il(!0,{},r.brush);Il(!0,r,t),t.brush&&(r.brush=function(e,t){return"object"===ml(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=uc({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=uc({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(n,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:e,plugins:A,pluginArgs:P});M({selectionService:y,genericObjectModel:C,appModel:q,dockService:a,styleModel:s,layoutService:t,fieldModel:D,seriesModel:l,reducedModel:o,primaryExtremumModel:N,secondaryExtremumModel:T,primaryTickModel:I,secondaryTickModel:w,propertiesModel:L,colorService:S,themeService:E,appLayoutModel:O,tooltipModel:R,flags:m,...u&&{discreteModel:u},...x&&{continuousModel:x},refLineModel:k,pluginService:j})}),[g,C,q,O,d,null==c?void 0:c.update,f]);const[,D]=i((()=>{if(!x)return Promise.resolve();const{layoutService:e,colorService:t,reducedModel:r,primaryExtremumModel:n,secondaryExtremumModel:i,propertiesModel:o,continuousModel:a,discreteModel:s,pluginService:l}=x,u=a?()=>{var t,r;a.update(e.getLayout());const n=a.initialFetch(),i=!e.meta.isSnapshot&&(null==d||null===(t=d.options)||void 0===t||null===(r=t.viewState)||void 0===r?void 0:r.zoom);return i&&f.preventSet("zoom",i),n}:()=>Promise.resolve(),c=t.initialize().then((()=>{const e=t.getSettings().field;y.setBrushAliases({colorField:e}),t.custom.updateLegend()}));return Promise.all([l.initialize(),r.command.initialize(),C?o.command.initialize():Promise.resolve(),c,u(),h.scroll.attachDiscreteModel(s)]).then((()=>Promise.all([n.command.initialize(),i.command.initialize()]).then((()=>E(x)))))}),[x]);if(D)throw D;return S};function PS(){const[e,n]=t();return r((()=>{n(function(e){var t=gl({},e),r={},n={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&r[e]?t[e]=r[e](o,a):t[e]=o,!i&&n[e]&&n[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){r[e]=t},onChanged:function(e,t){n[e]=t}};return o}({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}const jS={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};const FS={query:{getCanScroll:()=>!0}};function VS(){const e=h(),[n,i]=t(!1),[o,a]=t(!1),[s,l]=t(!1),u=function(){const e=h(),[n,i]=t(!1),[o,a]=t({}),[s,l]=t();return r((()=>()=>{a({})}),[]),r((()=>{e&&i(!e.select&&!e.active)}),[e]),{enabled:()=>n,emit:(e,...t)=>o[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var r;const n=null===(r=o[e])||void 0===r?void 0:r.indexOf(t);n>-1&&o[e].splice(n,1)},on:(e,t)=>{Array.isArray(o[e])?o[e].push(t):o[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),c=function(){var e,n,i;const o=h(),[a,s]=t(!1),[l,u]=t(!1),c=y(),d=!!c.qSelectionInfo.qInSelections,m=!(null===(e=c.qHyperCube)||void 0===e||null===(n=e.qDimensionInfo)||void 0===n||null===(i=n[0])||void 0===i||!i.qIsOneAndOnlyOne);r((()=>{o&&s(!o.select&&!o.active)}),[o]);const f=e=>{u("boolean"==typeof e?e:!l)};return g((()=>({key:"lasso",label:"Lasso",icon:jS,hidden:!a||!d||m,active:l,action:f})),[d,m,l,a]),{action:f,enabled:()=>a,active:()=>l}}();let d=FS;r((()=>{e&&(i(!e.active),a(!e.active),l(!e.passive))}),[e]);const[m]=t({});return m.scroll={enabled:()=>n&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||FS}},m.interact={enabled:()=>o},m.tooltip={enabled:()=>s},m.lasso=c,m.select=u,m}function _S({clearMinor:e,clearDiscrete:t,clearLegend:r}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),r()}function BS({setSelectionInfo:e,event:t,components:r,clear:n}){const i=null!=r&&r.length?r.map((e=>e.key)).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===ea.COMPONENT.LEGEND_CATEGORICAL}),n()}var HS,$S={exports:{}};HS=$S,function(e,t){HS.exports=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/conversion/",r(r.s="./index.js")}({"../node_modules/extend/index.js":
10
10
  /*!***************************************!*\
11
11
  !*** ../node_modules/extend/index.js ***!
12
12
  \***************************************/
13
13
  /*! no static exports found */
14
- 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)},u=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)},l=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},c=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,f=arguments[0],d=1,m=arguments.length,p=!1;for("boolean"==typeof f&&(p=f,f=arguments[1]||{},d=2),(null==f||"object"!==F(f)&&"function"!=typeof f)&&(f={});d<m;++d)if(null!=(t=arguments[d]))for(n in t)r=c(f,n),f!==(i=c(t,n))&&(p&&i&&(u(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&u(r)?r:{},l(f,{name:n,newValue:e(p,a,i)})):void 0!==i&&l(f,{name:n,newValue:i}));return f}},"../node_modules/qlik-modifiers/dist/qlik-modifiers.js":
14
+ function(e,t,r){var n=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,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},u=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},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,d=arguments[0],m=1,f=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},m=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});m<f;++m)if(null!=(t=arguments[m]))for(r in t)n=c(d,r),d!==(i=c(t,r))&&(p&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(d,{name:r,newValue:e(p,a,i)})):void 0!==i&&u(d,{name:r,newValue:i}));return d}},"../node_modules/qlik-modifiers/dist/qlik-modifiers.js":
15
15
  /*!*************************************************************!*\
16
16
  !*** ../node_modules/qlik-modifiers/dist/qlik-modifiers.js ***!
17
17
  \*************************************************************/
18
18
  /*! no static exports found */
19
- function(e,t,n){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"==F(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)},u=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)},l=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},c=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,f=arguments[0],d=1,m=arguments.length,p=!1;for("boolean"==typeof f&&(p=f,f=arguments[1]||{},d=2),(null==f||"object"!=F(f)&&"function"!=typeof f)&&(f={});d<m;++d)if(null!=(t=arguments[d]))for(n in t)r=c(f,n),f!==(i=c(t,n))&&(p&&i&&(u(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&u(r)?r:{},l(f,{name:n,newValue:e(p,a,i)})):void 0!==i&&l(f,{name:n,newValue:i}));return f}},function(e,t,n){n.r(t);var r=n(0),i=n.n(r),o={setValue: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},getValue: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}},a="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function u(e){return a+e+s}function l(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 u=a.qFieldDefs[s];if(u.qName===i)return u}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function c(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function d(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 m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function h(e){return void 0===e?")":", 0, ".concat(e,")")}function v(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 y(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,u=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=v(l(r[0],i),m(0));return"".concat(a,"({1<").concat(c,">}").concat(u,")")}if(r&&2===r.length){var f=l(r[0],i),d=l(r[1],i),p=m(0),h=m(1),y=v(f,p),g=v(d,h);return"".concat(a,"({1<").concat(y,",").concat(g,">}").concat(u,")")}return"".concat(a,"({1}").concat(u,")")}function g(e){return"".concat(e,"(")}function b(){return")"}function x(e){var t=e.properties,n=e.layout;return o.getValue(t,"qHyperCubeDef.qDimensions",o.getValue(n,"qHyperCube.qDimensionInfo",[])).length}var M={isFullRange:c,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(d(t));if(!n.showExcludedValues)return a;var s=y({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var f=m(0),p=m(1);return"If(Count(".concat(f,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!c(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:p,getAboveCompSuffix:h,getAboveComp:function(e,t,n,r){return p(e,t)+n+h(r)},getFunctionPrefix:g,getFunctionSuffix:b,getRangeComp:function(e,t){return g(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:y,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=m(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:d,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(a);if(-1!==n){var r=t.indexOf(s);if(-1!==r)return t.substring(n+a.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:l,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:u,canExtract:function(e){var t=e.indexOf(a),n=e.indexOf(s);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function S(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")}()}function E(e){return(E="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}var C=i.a.bind(null,!0),q={},O=Array.isArray;function A(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function D(e){return void 0===e}function N(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(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]=D(e[n||t])?o:e[t],e=e[n||t]}})),e}function T(e,t){var n=!0;if(A(e)&&A(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){T(e[r],t[r])||(n=!1)})),n);if(O(e)&&O(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!T(e[r],t[r]))return!1;return!0}return e===t}q.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?C({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);T(o,a)||N(t,i)||(D(a)?r.push({op:"add",path:s,value:o}):A(o)&&A(a)?r=r.concat(q.generate(a,o,s)):O(o)&&O(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&D(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(T(t,i))return r;if(!D(t[0])&&D(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(q.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(r.push({op:"move",path:"".concat(n,"/").concat(u),from:"".concat(n,"/").concat(o)}),i.splice(u,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){D(t[i])&&!N(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},q.apply=function(e,t){t.forEach((function(t){var n,r=I(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(O(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(O(o)&&O(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,S(u))}else if(A(o)&&A(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!N(n,e)&&delete n[e]})),C(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 l=I(e,t.from);O(r)?r.splice(+i,0,l.splice(+a,1)[0]):(r[i]=l[a],delete l[a])}else"remove"===t.op&&(O(r)?r.splice(+i,1):delete r[i])}))},q.clone=function(e){return C({},e)},q.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},q.updateObject=function(e,t){Object.keys(e).length?q.apply(e,q.generate(e,t)):C(e,t)};var w=q,L={saveSoftProperties:function(e,t,n){if(!e)return Promise.resolve();var r=w.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()}},k="accumulation";function R(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===k)return n[r]}function P(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===k)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},_={translationKey:"properties.modifier.accumulation",needDimension:M.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return M.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,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var u=a;void 0===u&&(u=M.getNumDimensions({properties:r,layout:i}));var l=o.getValue(r,"qHyperCubeDef.qDimensions",[]),c=M.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:s}),f=M.getNumStepComp(n,u),d=M.getAboveComp(n,u,c,f),m=M.getRangeComp("RangeSum",d);if(M.needDimension({modifier:n,properties:r,layout:i})){var p=M.getDimComp(l,1),h=M.getDimComp(l,0),v=M.getAggrComp(m,p,h);m=n.showExcludedValues?M.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:s,valueComp:v}):v}return m},extractInputExpression:M.extractInputExpression,initModifier:function(e){M.initModifier(e,j)},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!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(P(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(P(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(P(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(P(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=R(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=R(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(k))return!1;var o=R(t,e);return o&&!o.disabled}}}},H="movingAverage";function V(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===H)return n[r]}function B(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===H)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},Y={translationKey:"properties.modifier.movingAverage",needDimension:M.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return M.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,u=e.dimensionAndFieldList;if(!r)return n;var l=s;void 0===l&&(l=M.getNumDimensions({properties:i,layout:a}));var c=o.getValue(i,"qHyperCubeDef.qDimensions",[]),f=r.showExcludedValues&&r.nullSuppression,d=M.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:u,treatMissingAsNull:f}),m=M.getNumStepComp(r,l),p=M.getAboveComp(r,l,d,m);if(r.nullSuppression)t=M.getRangeComp("RangeAvg",p);else{var h=M.getRangeComp("RangeSum",p),v=function(e,t){var n=M.getRowNoComp(e,t);if(!M.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,l);t="".concat(h," / ").concat(v)}var y=t;if(M.needDimension({modifier:r,properties:i,layout:a})){var g=M.getDimComp(c,1),b=M.getDimComp(c,0),x=M.getAggrComp(y,g,b);y=r.showExcludedValues?M.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:u,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:M.extractInputExpression,initModifier:function(e){M.initModifier(e,z)},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!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(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(B(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(B(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(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=V(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=V(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(H))return!1;var o=V(t,e);return o&&!o.disabled}}}},U="difference";function W(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===U)return n[r]}function X(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===U)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var G={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},K={translationKey:"properties.modifier.difference",needDimension:M.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return M.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:M.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var u=a;void 0===u&&(u=M.getNumDimensions({properties:r,layout:i}));var l=o.getValue(r,"qHyperCubeDef.qDimensions",[]),c=M.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:s}),f=M.getAboveComp(n,u,c),d="".concat(c," - ").concat(f);if(M.needDimension({modifier:n,properties:r,layout:i})){var m=M.getDimComp(l,1),p=M.getDimComp(l,0),h=M.getAggrComp(d,m,p);d=n.showExcludedValues?M.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys(G).forEach((function(t){void 0===e[t]&&(e[t]=G[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!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(X(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(X(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(X(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=W(t,e);return o&&!o.disabled}}}},$={SELECTION:{CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},DIMENSION:{ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2}},J="normalization";function Z(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===J)return n[r]}function Q(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===J)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ee(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function te(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:$.DIMENSION.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:$.DIMENSION.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:$.DIMENSION.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=ee(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=ee(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,o)}function ne(e,t,n){var r=[{value:$.SELECTION.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:$.SELECTION.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:$.SELECTION.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=ee(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:$.DIMENSION.DISREGARD_ALL_DIMENSIONS,selectionScope:$.SELECTION.DISREGARD_SELECTION};function ie(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(M.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,n){return 0===e&&t>1?"<".concat(M.getDimDefWithWrapper(n),">"):""}function ue(e,t,n,r,i,o,a){var s=ie(t),u=oe(t,n,r),l=""===s&&""===u?"":s||u,c=ae(i,o),f=se(i,o,a),d=function(e){for(var t=[],n=0;n<e;n++)t[n]=M.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(l," ").concat(c).concat(f," Aggr(").concat(l," ").concat(e,", ").concat(d,"))")}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return M.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:M.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var u=a;void 0===u&&(u=M.getNumDimensions({properties:r,layout:i}));var l=o.getValue(r,"qHyperCubeDef.qDimensions",[]),c=M.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:s}),f=n.selectionScope,d=n.dimensionalScope;return ue(c,f,n.field,n.value,d,u,n.primaryDimension)},initModifier:function(e){Object.keys(re).forEach((function(t){void 0===e[t]&&(e[t]=re[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!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Q(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:$.SELECTION.DISREGARD_SELECTION,options:function(n){return ne(n,t,e)}},field:{refFn:function(t){return"".concat(Q(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 Z(t,e).selectionScope===$.SELECTION.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Q(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===$.SELECTION.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Q(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:$.DIMENSION.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return te(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Q(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(Z(t,e).dimensionalScope||0)===$.DIMENSION.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=Z(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ie,getFieldSelectionComp:oe,getTotalComp:ae,getSelectedDimComp:se};function ce(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function u(e){var t={},n=o.getValue(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=o.getValue(e,n)})),JSON.stringify(t)}function l(e){var t=e.qInfo.qId;if(r[t]){var i=u(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(l),enabled:!1,properties:u(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.measureLibraryIds,n=e.dimensionLibraryIds;i={},t.forEach((function(e){i[e]=!0})),a={},n.forEach((function(e){a[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach((function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}var fe={getExpression:function(e){return o.getValue(e,"qDef.base.qDef")||o.getValue(e,"qDef.qDef")},getExpressionRef:function(e){return o.getValue(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return o.getValue(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return o.getValue(e,"qDef.base.qLibraryId")||o.getValue(e,"qLibraryId")},getLabelRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},de={initBase:function(e,t){(t||de.isValid(e))&&(o.setValue(e,"qDef.base.qDef",o.getValue(e,"qDef.qDef")),o.setValue(e,"qDef.base.qLibraryId",o.getValue(e,"qLibraryId")),o.setValue(e,"qDef.base.qLabel",o.getValue(e,"qDef.qLabel")),o.setValue(e,"qDef.base.qLabelExpression",o.getValue(e,"qDef.qLabelExpression")))},restoreBase:function(e){de.isValid(e)&&(o.setValue(e,"qDef.qDef",o.getValue(e,"qDef.base.qDef")),o.setValue(e,"qLibraryId",o.getValue(e,"qDef.base.qLibraryId")),o.setValue(e,"qDef.qLabel",o.getValue(e,"qDef.base.qLabel")),o.setValue(e,"qDef.qLabelExpression",o.getValue(e,"qDef.base.qLabelExpression")),o.getValue(e,"qDef.qAggrFunc")&&o.getValue(e,"qDef.base.qAggrFunc")&&o.setValue(e,"qDef.qAggrFunc",o.getValue(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=o.getValue(e,"qDef.base.qDef"),n=o.getValue(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},me=de;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}var he={accumulation:_,movingAverage:Y,difference:K,normalization:le},ve=(t.default={modifiers:he,apply:ye,applyModifiers:ge,cleanUpMeasure:be,destroy:function(e){e&&ve[e.id]&&ve[e.id].masterItemSubscriber&&(ve[e.id].masterItemSubscriber&&ve[e.id].masterItemSubscriber.unsubscribe(),delete ve[e.id])},hasActiveModifiers:xe,getActiveModifier:Me,initBase:me.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return he[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return he[e]&&he[e].isApplicable({properties:n,layout:r})}))},measureBase:fe,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=Ce(e);Te({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Pe({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:Se},{});function ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,a=void 0!==r&&r,s=e.masterItem;ve[t.id]=ve[t.id]||{isFirstTime:!0};var u=ve[t.id].isFirstTime;if(ve[t.id].isFirstTime=!1,n&&"object"===pe(n))return ge({model:t,properties:n});var l=t?t.layout:void 0,c=o.getValue(l,"qSelectionInfo.qInSelections");if(a||c)return Promise.resolve(!1);var f=o.getValue(l,"qHyperCube.qMeasureInfo"),d=ve[t.id].lastReloadTime;if(ve[t.id].lastReloadTime=o.getValue(t,"app.layout.qLastReloadTime"),xe({measures:f,layout:l})){var m=function(e){var t=e.measures,n=e.layout,r=e.model,i=e.lastReloadTime;return o.getValue(r,"app.layout.qLastReloadTime")!==i&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ie({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:f,layout:l,model:t,lastReloadTime:d});return m||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 Te({modifiers:Ce(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:f,layout:l,masterItem:s,isFirstTime:u})?t.getEffectiveProperties().then((function(e){var n=i()(!0,{},e);Oe(n);var r=je(n);return we({model:t}).then((function(i){return Le({libraryIds:r,model:t}).then((function(r){return m&&function(e){var t=e.properties;Ee(t).forEach((function(e){return function(e){var t=e.measure,n=e.properties;if(Ie({measure:t,properties:n})){var r=0,i=t.qDef.modifiers;Array.isArray(i)&&i.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(r++,"object"!==pe(he[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=he[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&De(t)&&M.simplifyExpression(t.qDef.base.qDef)!==M.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),ge({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"===pe(e.base)}))}(f)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=je(n);return Fe({model:t,libraryIds:r}).then((function(){var e=i()(!0,{},n);return Ee(n).forEach((function(e){return be(e)})),Re({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ge(e){var t=e.model,n=e.oldProperties,r=e.properties,a=e.measures,s=e.runUpdateIfChange,u=void 0!==s&&s,l=e.masterItem,c=e.libraryItemsProps,f=e.dimensionAndFieldList;void 0===n&&(n=u?i()(!0,{},r):r),Oe(r);var d=je(r);return Fe({model:t,libraryIds:d,masterItem:l}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=Ee(n)),!t.length)return Promise.resolve();if(!xe({measures:t,properties:n}))return t.forEach((function(e){return be(e)})),Promise.resolve();var u=a?void 0:je(n);return we({model:r,dimensionAndFieldList:s}).then((function(e){return Le({libraryIds:u,model:r,libraryItemsProps:a}).then((function(r){t.forEach((function(t){Te({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;me.isValid(t)||me.initBase(t,!0);var u=t.qDef,l=u.modifiers,c=u.base;Array.isArray(l)&&l.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(s++,"object"!==pe(he[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)");he[e.type].initModifier(e);var u=t.qLibraryId||c&&c.qLibraryId;u?function(e){var t=e.measure,n=e.modifier,r=e.libraryId,o=e.properties,a=e.libraryItemsProps,s=e.dimensionAndFieldList,u=a[r],l=u.qMeasure.qDef,c=he[n.type].generateExpression({expression:l,modifier:n,properties:o,dimensionAndFieldList:s});n.outputExpression=c,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||u.qMeasure.qLabel)&&(t.qDef.qLabel=u.qMeasure.qLabel),(t.qDef.qLabelExpression||u.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=u.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&u.qMeasure.qNumFormat&&(t.qDef.qNumFormat=u.qMeasure.qNumFormat,t.qDef.isCustomFormatted=u.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=u.qMeasure.coloring,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:u,properties:n,libraryItemsProps:r,dimensionAndFieldList:a}):function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList;"function"==typeof he[n.type].updateModifier&&he[n.type].updateModifier(n,r.qHyperCubeDef);var a=fe.getExpression(t),s=he[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:a}),function(e){var t=o.getValue(e,"qDef.qAggrFunc");"Expr"!==t||Se(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Se(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}),Ae(t)):be(t)}))}))}))}({measures:a,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:f}).then((function(){return u?Re({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function be(e){!function(e){var t=Ce(e);return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&!he[e.type]}))}(e)?me.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ae(e)}function xe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Te({modifiers:Ce(e),properties:n,layout:r})}))}function Me(e){var t=Ce(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(he[r.type]&&!r.disabled)return r}}function Se(e){var t=Me(e);return!t||he[t.type].enableTotalsFunction(e)}function Ee(e){return o.getValue(e,"qHyperCubeDef.qMeasures",[]).concat(o.getValue(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Ce(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function qe(e){return o.getValue(e,"outputExpression.qValueExpression.qExpr")||o.getValue(e,"outputExpression")}function Oe(e){Ee(e).forEach((function(e){return function(e){var t=Me(e);t&&(void 0!==t.outputExpression&&qe(t)!==e.qDef.qDef?delete e.qDef.base:!me.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Ae(e){var t=Ce(e);Array.isArray(t)&&t.forEach((function(t){"object"===pe(t)&&(t.disabled||!he[t.type]&&qe(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function De(e){return e.base||e.qDef&&e.qDef.base}function Ne(e){var t=De(e);return e.qLibraryId||t&&t.qLibraryId}function Ie(e){var t=e.measure,n=e.properties,r=e.layout;return!Ne(t)&&Te({modifiers:Ce(t),properties:n,layout:r})}function Te(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==pe(e)||e.disabled||!he[e.type])&&(void 0===i[e.type]&&(i[e.type]=he[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function we(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 Le(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 ke(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Re(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o.getValue(t,"qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(o.getValue(n,"qHyperCubeDef.qMeasures"),ke)||JSON.stringify(o.getValue(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(o.getValue(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o.getValue(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):L.saveSoftProperties(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Pe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&he[e.type]&&he[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function je(e){var t=Ee(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=Ce(t);if(Te({modifiers:r,properties:e})){var o=Ne(t);o&&n.push(o),i=i||Pe({modifiers:r,properties:e})}})),o.getValue(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Fe(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(ve[t.id].masterItemSubscriber=ve[t.id].masterItemSubscriber||ce({model:t,callback:function(e){return ye({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),ve[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},"./axis-chart/export-properties/index.js":
19
+ function(e,t,r){window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/qlik-modifiers/",r(r.s=1)}([function(e,t,r){var n=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,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},u=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},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,d=arguments[0],m=1,f=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},m=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});m<f;++m)if(null!=(t=arguments[m]))for(r in t)n=c(d,r),d!==(i=c(t,r))&&(p&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(d,{name:r,newValue:e(p,a,i)})):void 0!==i&&u(d,{name:r,newValue:i}));return d}},function(e,t,r){r.r(t);var n=r(0),i=r.n(n),o={setValue:function(e,t,r){if(!t)return!1;var n,i=t.split("."),o=i[i.length-1],a=e;for(n=0;n<i.length-1;++n)void 0===a[i[n]]&&(a[i[n]]=Number.isNaN(+i[n+1])?{}:[]),a=a[i[n]];if(void 0!==r){var s=a[o];return a[o]=r,{updated:r,previous:s}}return delete a[o],!1},getValue:function(e,t,r){var n,i=t.split("."),o=e;if(void 0===o)return r;for(n=0;n<i.length;++n){if(void 0===o[i[n]])return r;o=o[i[n]]}return o}},a="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function l(e){return a+e+s}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===i)return n;if(n.qDerivedFieldData)for(var o=0;o<n.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=n.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 n&&n.qTags.indexOf("$numeric")>-1}function c(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function m(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 f(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function h(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 g(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var c=y(u(n[0],i),f(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(n&&2===n.length){var d=u(n[0],i),m=u(n[1],i),p=f(0),h=f(1),g=y(d,p),v=y(m,h);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function v(e){return"".concat(e,"(")}function b(){return")"}function x(e){var t=e.properties,r=e.layout;return o.getValue(t,"qHyperCubeDef.qDimensions",o.getValue(r,"qHyperCube.qDimensionInfo",[])).length}var M={isFullRange:c,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=l(m(t));if(!r.showExcludedValues)return a;var s=g({modifier:r,dimensions:n,dimensionAndFieldList:i}),u=o?"":", 0";if(n&&1===n.length){var c=f(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(u,")")}if(n&&2===n.length){var d=f(0),p=f(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(u,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!c(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return d(e,t)},getAboveCompPrefix:p,getAboveCompSuffix:h,getAboveComp:function(e,t,r,n){return p(e,t)+r+h(n)},getFunctionPrefix:v,getFunctionSuffix:b,getRangeComp:function(e,t){return v(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:g,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=f(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var i=["Descending","Ascending"],o=r.qSortByNumeric?"(Numeric, ".concat(i[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(i[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(o,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(o,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:m,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(a);if(-1!==r){var n=t.indexOf(s);if(-1!==n)return t.substring(r+a.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,i=void 0===n?1:n,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!r)return!0;var s=x({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:l,canExtract:function(e){var t=e.indexOf(a),r=e.indexOf(s);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:f,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function S(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(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")}()}function E(e){return(E="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 C=i.a.bind(null,!0),q={},O=Array.isArray;function A(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function D(e){return void 0===e}function N(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function T(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,i){if(i!==n.length){r=+t;var o=Number.isNaN(r)?{}:[];e[r||t]=D(e[r||t])?o:e[t],e=e[r||t]}})),e}function I(e,t){var r=!0;if(A(e)&&A(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){I(e[n],t[n])||(r=!1)})),r);if(O(e)&&O(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!I(e[n],t[n]))return!1;return!0}return e===t}q.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?C({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);I(o,a)||N(t,i)||(D(a)?n.push({op:"add",path:s,value:o}):A(o)&&A(a)?n=n.concat(q.generate(a,o,s)):O(o)&&O(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&D(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,i=e.length;n<i;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(I(t,i))return n;if(!D(t[0])&&D(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),i.splice(s,1)):n=n.concat(q.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){D(t[i])&&!N(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},q.apply=function(e,t){t.forEach((function(t){var r,n=T(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?n[i]:n[+i]||n,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(O(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(O(o)&&O(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,S(l))}else if(A(o)&&A(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!N(r,e)&&delete r[e]})),C(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[i]=t.value}else if("move"===t.op){var u=T(e,t.from);O(n)?n.splice(+i,0,u.splice(+a,1)[0]):(n[i]=u[a],delete u[a])}else"remove"===t.op&&(O(n)?n.splice(+i,1):delete n[i])}))},q.clone=function(e){return C({},e)},q.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},q.updateObject=function(e,t){Object.keys(e).length?q.apply(e,q.generate(e,t)):C(e,t)};var w=q,L={saveSoftProperties:function(e,t,r){if(!e)return Promise.resolve();var n=w.generate(t,r);return i()(!0,t,r),n&&n.length?(n=n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(n,!0)):Promise.resolve()}},R="accumulation";function k(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===R)return r[n]}function P(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===R)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},F={translationKey:"properties.modifier.accumulation",needDimension:M.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return M.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=M.getNumDimensions({properties:n,layout:i}));var u=o.getValue(n,"qHyperCubeDef.qDimensions",[]),c=M.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=M.getNumStepComp(r,l),m=M.getAboveComp(r,l,c,d),f=M.getRangeComp("RangeSum",m);if(M.needDimension({modifier:r,properties:n,layout:i})){var p=M.getDimComp(u,1),h=M.getDimComp(u,0),y=M.getAggrComp(f,p,h);f=r.showExcludedValues?M.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:y}):y}return f},extractInputExpression:M.extractInputExpression,initModifier:function(e){M.initModifier(e,j)},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!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(P(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(P(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(P(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(P(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=k(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=k(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(R))return!1;var o=k(t,e);return o&&!o.disabled}}}},V="movingAverage";function _(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===V)return r[n]}function B(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===V)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},$={translationKey:"properties.modifier.movingAverage",needDimension:M.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return M.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=M.getNumDimensions({properties:i,layout:a}));var c=o.getValue(i,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,m=M.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=M.getNumStepComp(n,u),p=M.getAboveComp(n,u,m,f);if(n.nullSuppression)t=M.getRangeComp("RangeAvg",p);else{var h=M.getRangeComp("RangeSum",p),y=function(e,t){var r=M.getRowNoComp(e,t);if(!M.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(y)}var g=t;if(M.needDimension({modifier:n,properties:i,layout:a})){var v=M.getDimComp(c,1),b=M.getDimComp(c,0),x=M.getAggrComp(g,v,b);g=n.showExcludedValues?M.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return g},extractInputExpression:M.extractInputExpression,initModifier:function(e){M.initModifier(e,H)},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!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(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(B(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(B(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(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=_(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=_(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=_(t,e);return o&&!o.disabled}}}},z="difference";function U(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===z)return r[n]}function Y(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===z)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var W={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},G={translationKey:"properties.modifier.difference",needDimension:M.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return M.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:M.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=M.getNumDimensions({properties:n,layout:i}));var u=o.getValue(n,"qHyperCubeDef.qDimensions",[]),c=M.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=M.getAboveComp(r,l,c),m="".concat(c," - ").concat(d);if(M.needDimension({modifier:r,properties:n,layout:i})){var f=M.getDimComp(u,1),p=M.getDimComp(u,0),h=M.getAggrComp(m,f,p);m=r.showExcludedValues?M.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return m},initModifier:function(e){Object.keys(W).forEach((function(t){void 0===e[t]&&(e[t]=W[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!M.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Y(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(Y(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(Y(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=U(t,e);return o&&!o.disabled}}}},K={SELECTION:{CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},DIMENSION:{ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2}},X="normalization";function J(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Z(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function Q(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}function ee(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:K.DIMENSION.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:K.DIMENSION.ALL_DIMENSIOANS,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:K.DIMENSION.DISREGARD_ALL_DIMENSIONS,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,r){if(e<2){var n=Q(t,0);t.splice(n,1)}return t}(i,o),function(e,t,r){if(0===e){var n=Q(t,1);t.splice(n,1)}return t}(J(e,n).selectionScope,o)}function te(e,t,r){var n=[{value:K.SELECTION.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:K.SELECTION.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:K.SELECTION.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,r){if(1===e){var n=Q(t,0);t.splice(n,1)}return t}(J(e,r).dimensionalScope,n)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:K.DIMENSION.DISREGARD_ALL_DIMENSIONS,selectionScope:K.SELECTION.DISREGARD_SELECTION};function ne(e){return 2===e?"{1}":""}function ie(e,t,r){return 1===e?"{$<".concat(M.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,r){return 0===e&&t>1?"<".concat(M.getDimDefWithWrapper(r),">"):""}function se(e,t,r,n,i,o,a){var s=ne(t),l=ie(t,r,n),u=""===s&&""===l?"":s||l,c=oe(i,o),d=ae(i,o,a),m=function(e){for(var t=[],r=0;r<e;r++)t[r]=M.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(m,"))")}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return M.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:M.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=M.getNumDimensions({properties:n,layout:i}));var u=o.getValue(n,"qHyperCubeDef.qDimensions",[]),c=M.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=r.selectionScope,m=r.dimensionalScope;return se(c,d,r.field,r.value,m,l,r.primaryDimension)},initModifier:function(e){Object.keys(re).forEach((function(t){void 0===e[t]&&(e[t]=re[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!M.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.SELECTION.DISREGARD_SELECTION,options:function(r){return te(r,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,r){return r.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.SELECTION.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.SELECTION.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:K.DIMENSION.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(r,n){return ee(r,n,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,r){return(J(t,e).dimensionalScope||0)===K.DIMENSION.ONE_DIMENSION&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return M.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ne,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae};function ue(e){var t=e.model,r=e.callback,n={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=o.getValue(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=o.getValue(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var i=l(e);n[t].properties!==i&&(n[t].properties=i,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.measureLibraryIds,r=e.dimensionLibraryIds;i={},t.forEach((function(e){i[e]=!0})),a={},r.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:o}),Object.keys(n).forEach((function(e){i[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}var ce={getExpression:function(e){return o.getValue(e,"qDef.base.qDef")||o.getValue(e,"qDef.qDef")},getExpressionRef:function(e){return o.getValue(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return o.getValue(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return o.getValue(e,"qDef.base.qLibraryId")||o.getValue(e,"qLibraryId")},getLabelRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},de={initBase:function(e,t){(t||de.isValid(e))&&(o.setValue(e,"qDef.base.qDef",o.getValue(e,"qDef.qDef")),o.setValue(e,"qDef.base.qLibraryId",o.getValue(e,"qLibraryId")),o.setValue(e,"qDef.base.qLabel",o.getValue(e,"qDef.qLabel")),o.setValue(e,"qDef.base.qLabelExpression",o.getValue(e,"qDef.qLabelExpression")))},restoreBase:function(e){de.isValid(e)&&(o.setValue(e,"qDef.qDef",o.getValue(e,"qDef.base.qDef")),o.setValue(e,"qLibraryId",o.getValue(e,"qDef.base.qLibraryId")),o.setValue(e,"qDef.qLabel",o.getValue(e,"qDef.base.qLabel")),o.setValue(e,"qDef.qLabelExpression",o.getValue(e,"qDef.base.qLabelExpression")),o.getValue(e,"qDef.qAggrFunc")&&o.getValue(e,"qDef.base.qAggrFunc")&&o.setValue(e,"qDef.qAggrFunc",o.getValue(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=o.getValue(e,"qDef.base.qDef"),r=o.getValue(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},me=de;function fe(e){return(fe="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 pe={accumulation:F,movingAverage:$,difference:G,normalization:le},he=(t.default={modifiers:pe,apply:ye,applyModifiers:ge,cleanUpMeasure:ve,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:be,getActiveModifier:xe,initBase:me.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return pe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return pe[e]&&pe[e].isApplicable({properties:r,layout:n})}))},measureBase:ce,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=Ee(e);Te({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||ke({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:Me},{});function ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,a=void 0!==n&&n,s=e.masterItem;he[t.id]=he[t.id]||{isFirstTime:!0};var l=he[t.id].isFirstTime;if(he[t.id].isFirstTime=!1,r&&"object"===fe(r))return ge({model:t,properties:r});var u=t?t.layout:void 0,c=o.getValue(u,"qSelectionInfo.qInSelections");if(a||c)return Promise.resolve(!1);var d=o.getValue(u,"qHyperCube.qMeasureInfo"),m=he[t.id].lastReloadTime;if(he[t.id].lastReloadTime=o.getValue(t,"app.layout.qLastReloadTime"),be({measures:d,layout:u})){var f=function(e){var t=e.measures,r=e.layout,n=e.model,i=e.lastReloadTime;return o.getValue(n,"app.layout.qLastReloadTime")!==i&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ne({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:d,layout:u,model:t,lastReloadTime:m});return f||function(e){var t=e.measures,r=e.layout,n=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Te({modifiers:Ee(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:d,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var r=i()(!0,{},e);qe(r);var n=Pe(r);return Ie({model:t}).then((function(i){return we({libraryIds:n,model:t}).then((function(n){return f&&function(e){var t=e.properties;Se(t).forEach((function(e){return function(e){var t=e.measure,r=e.properties;if(Ne({measure:t,properties:r})){var n=0,i=t.qDef.modifiers;Array.isArray(i)&&i.forEach((function(e){if("object"===fe(e)&&!e.disabled){if(n++,"object"!==fe(pe[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=pe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ae(t)&&M.simplifyExpression(t.qDef.base.qDef)!==M.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:r}),ge({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:n,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===fe(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Pe(r);return je({model:t,libraryIds:n}).then((function(){var e=i()(!0,{},r);return Se(r).forEach((function(e){return ve(e)})),Re({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ge(e){var t=e.model,r=e.oldProperties,n=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?i()(!0,{},n):n),qe(n);var m=Pe(n);return je({model:t,libraryIds:m,masterItem:u}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=Se(r)),!t.length)return Promise.resolve();if(!be({measures:t,properties:r}))return t.forEach((function(e){return ve(e)})),Promise.resolve();var l=a?void 0:Pe(r);return Ie({model:n,dimensionAndFieldList:s}).then((function(e){return we({libraryIds:l,model:n,libraryItemsProps:a}).then((function(n){t.forEach((function(t){Te({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;me.isValid(t)||me.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===fe(e)&&!e.disabled){if(s++,"object"!==fe(pe[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)");pe[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,r=e.modifier,n=e.libraryId,o=e.properties,a=e.libraryItemsProps,s=e.dimensionAndFieldList,l=a[n],u=l.qMeasure.qDef,c=pe[r.type].generateExpression({expression:u,modifier:r,properties:o,dimensionAndFieldList:s});r.outputExpression=c,t.qDef.qDef=r.outputExpression,(t.qDef.qLabel||l.qMeasure.qLabel)&&(t.qDef.qLabel=l.qMeasure.qLabel),(t.qDef.qLabelExpression||l.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=l.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&l.qMeasure.qNumFormat&&(t.qDef.qNumFormat=l.qMeasure.qNumFormat,t.qDef.isCustomFormatted=l.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=l.qMeasure.coloring,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:r,libraryItemsProps:n,dimensionAndFieldList:a}):function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList;"function"==typeof pe[r.type].updateModifier&&pe[r.type].updateModifier(r,n.qHyperCubeDef);var a=ce.getExpression(t),s=pe[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:o});r.outputExpression=s,t.qDef.qDef=r.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o.getValue(e,"qDef.qAggrFunc");"Expr"!==t||Me(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Me(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:r,libraryItemsProps:n,dimensionAndFieldList:e}),Oe(t)):ve(t)}))}))}))}({measures:a,properties:n,model:t,libraryItemsProps:c,dimensionAndFieldList:d}).then((function(){return l?Re({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ve(e){!function(e){var t=Ee(e);return Array.isArray(t)&&t.some((function(e){return"object"===fe(e)&&!e.disabled&&!pe[e.type]}))}(e)?me.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Oe(e)}function be(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Te({modifiers:Ee(e),properties:r,layout:n})}))}function xe(e){var t=Ee(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(pe[n.type]&&!n.disabled)return n}}function Me(e){var t=xe(e);return!t||pe[t.type].enableTotalsFunction(e)}function Se(e){return o.getValue(e,"qHyperCubeDef.qMeasures",[]).concat(o.getValue(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Ee(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ce(e){return o.getValue(e,"outputExpression.qValueExpression.qExpr")||o.getValue(e,"outputExpression")}function qe(e){Se(e).forEach((function(e){return function(e){var t=xe(e);t&&(void 0!==t.outputExpression&&Ce(t)!==e.qDef.qDef?delete e.qDef.base:!me.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Oe(e){var t=Ee(e);Array.isArray(t)&&t.forEach((function(t){"object"===fe(t)&&(t.disabled||!pe[t.type]&&Ce(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ae(e){return e.base||e.qDef&&e.qDef.base}function De(e){var t=Ae(e);return e.qLibraryId||t&&t.qLibraryId}function Ne(e){var t=e.measure,r=e.properties,n=e.layout;return!De(t)&&Te({modifiers:Ee(t),properties:r,layout:n})}function Te(e){var t=e.modifiers,r=e.properties,n=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==fe(e)||e.disabled||!pe[e.type])&&(void 0===i[e.type]&&(i[e.type]=pe[e.type].isApplicable({properties:r,layout:n})),i[e.type])}))}function Ie(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));n.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return i}))}function we(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=r.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 Le(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Re(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(o.getValue(t,"qHyperCubeDef.qMeasures"),Le)!==JSON.stringify(o.getValue(r,"qHyperCubeDef.qMeasures"),Le)||JSON.stringify(o.getValue(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Le)!==JSON.stringify(o.getValue(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Le);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o.getValue(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):L.saveSoftProperties(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function ke(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===fe(e)&&!e.disabled&&pe[e.type]&&pe[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Pe(e){var t=Se(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=Ee(t);if(Te({modifiers:n,properties:e})){var o=De(t);o&&r.push(o),i=i||ke({modifiers:n,properties:e})}})),o.getValue(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function je(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(he[t.id].masterItemSubscriber=he[t.id].masterItemSubscriber||ue({model:t,callback:function(e){return ye({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),he[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},"./axis-chart/export-properties/index.js":
20
20
  /*!***********************************************!*\
21
21
  !*** ./axis-chart/export-properties/index.js ***!
22
22
  \***********************************************/
23
23
  /*! exports provided: default */
24
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
24
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
25
25
  /*! ../../quarantine/quarantine-property */
26
- "./quarantine/quarantine-property.js"),i=n(
26
+ "./quarantine/quarantine-property.js"),i=r(
27
27
  /*! ../../color-chart */
28
- "./color-chart/index.js");function o(e){var t=e.propertyTree,n=e.hypercubePath,o=e.viewDataMode,a=e.supportedAutoMinMax,s=void 0===a||a,u=i.default.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:o}),l=u.properties;return s?(Object(r.default)(l,"measureAxis.min","supportedAutoMinMax"),Object(r.default)(l,"measureAxis.max","supportedAutoMinMax")):(Object(r.default)(l,"measureAxis.min","unsupportedAutoMinMax"),Object(r.default)(l,"measureAxis.max","unsupportedAutoMinMax")),u}},"./axis-chart/import-properties/helpers/get-measures-per-axis.js":
28
+ "./color-chart/index.js");function o(e){var t=e.propertyTree,r=e.hypercubePath,o=e.viewDataMode,a=e.supportedAutoMinMax,s=void 0===a||a,l=i.default.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:o}),u=l.properties;return s?(Object(n.default)(u,"measureAxis.min","supportedAutoMinMax"),Object(n.default)(u,"measureAxis.max","supportedAutoMinMax")):(Object(n.default)(u,"measureAxis.min","unsupportedAutoMinMax"),Object(n.default)(u,"measureAxis.max","unsupportedAutoMinMax")),l}},"./axis-chart/import-properties/helpers/get-measures-per-axis.js":
29
29
  /*!***********************************************************************!*\
30
30
  !*** ./axis-chart/import-properties/helpers/get-measures-per-axis.js ***!
31
31
  \***********************************************************************/
32
32
  /*! exports provided: default */
33
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=["bar","marker","line"];function i(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,i=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),r.includes(i)&&t[o].type[i]++,t[o].type.total++}})),t}},"./axis-chart/import-properties/helpers/handle-auto-min-max.js":
33
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=["bar","marker","line"];function i(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,i=r.type,o=r.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),n.includes(i)&&t[o].type[i]++,t[o].type.total++}})),t}},"./axis-chart/import-properties/helpers/handle-auto-min-max.js":
34
34
  /*!*********************************************************************!*\
35
35
  !*** ./axis-chart/import-properties/helpers/handle-auto-min-max.js ***!
36
36
  \*********************************************************************/
37
37
  /*! exports provided: default */
38
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
38
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
39
39
  /*! extend */
40
- "../node_modules/extend/index.js"),i=n.n(r),o=n(
40
+ "../node_modules/extend/index.js"),i=r.n(n),o=r(
41
41
  /*! ../../../quarantine/unquarantine-property */
42
- "./quarantine/unquarantine-property.js");function a(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?Object(o.default)(n,"unsupportedAutoMinMax")||i()(n.measureAxis,t.measureAxis):Object(o.default)(n,"supportedAutoMinMax")||i()(n.measureAxis,t.measureAxis)}},"./axis-chart/import-properties/helpers/handle-measures-axis.js":
42
+ "./quarantine/unquarantine-property.js");function a(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?Object(o.default)(r,"unsupportedAutoMinMax")||i()(r.measureAxis,t.measureAxis):Object(o.default)(r,"supportedAutoMinMax")||i()(r.measureAxis,t.measureAxis)}},"./axis-chart/import-properties/helpers/handle-measures-axis.js":
43
43
  /*!**********************************************************************!*\
44
44
  !*** ./axis-chart/import-properties/helpers/handle-measures-axis.js ***!
45
45
  \**********************************************************************/
46
46
  /*! exports provided: default */
47
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
47
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
48
48
  /*! extend */
49
- "../node_modules/extend/index.js"),i=n.n(r),o=n(
49
+ "../node_modules/extend/index.js"),i=r.n(n),o=r(
50
50
  /*! ./should-update-measure-axis */
51
- "./axis-chart/import-properties/helpers/should-update-measure-axis.js"),a=n(
51
+ "./axis-chart/import-properties/helpers/should-update-measure-axis.js"),a=r(
52
52
  /*! ./get-measures-per-axis */
53
- "./axis-chart/import-properties/helpers/get-measures-per-axis.js");function s(e){var t,n=e.exportFormat,r=e.initialProperties,s=e.properties,u=e.measureType,l=s.qHyperCubeDef,c=s.measureAxis;if(Object(o.default)({exportFormat:n,initialProperties:r})){var f=Object(a.default)(l);f.length?(u&&(t=f.filter((function(e){return e.type[u]>0})).sort((function(e,t){return t.type[u]-e.type[u]}))),t&&t.length||(t=f.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&i()(c,n.properties.measureAxes[t[0].axis])):i()(c,n.properties.measureAxes[0])}}},"./axis-chart/import-properties/helpers/index.js":
53
+ "./axis-chart/import-properties/helpers/get-measures-per-axis.js");function s(e){var t,r=e.exportFormat,n=e.initialProperties,s=e.properties,l=e.measureType,u=s.qHyperCubeDef,c=s.measureAxis;if(Object(o.default)({exportFormat:r,initialProperties:n})){var d=Object(a.default)(u);d.length?(l&&(t=d.filter((function(e){return e.type[l]>0})).sort((function(e,t){return t.type[l]-e.type[l]}))),t&&t.length||(t=d.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&i()(c,r.properties.measureAxes[t[0].axis])):i()(c,r.properties.measureAxes[0])}}},"./axis-chart/import-properties/helpers/index.js":
54
54
  /*!*******************************************************!*\
55
55
  !*** ./axis-chart/import-properties/helpers/index.js ***!
56
56
  \*******************************************************/
57
57
  /*! exports provided: default */
58
- function(e,t,n){n.r(t);var r=n(
58
+ function(e,t,r){r.r(t);var n=r(
59
59
  /*! ./handle-auto-min-max */
60
- "./axis-chart/import-properties/helpers/handle-auto-min-max.js"),i=n(
60
+ "./axis-chart/import-properties/helpers/handle-auto-min-max.js"),i=r(
61
61
  /*! ./handle-measures-axis */
62
- "./axis-chart/import-properties/helpers/handle-measures-axis.js"),o=n(
62
+ "./axis-chart/import-properties/helpers/handle-measures-axis.js"),o=r(
63
63
  /*! ./set-inter-column-sort-order */
64
- "./axis-chart/import-properties/helpers/set-inter-column-sort-order.js");t.default={handleAutoMinMax:r.default,handleMeasuresAxis:i.default,setInterColumnSortOrder:o.default}},"./axis-chart/import-properties/helpers/set-inter-column-sort-order.js":
64
+ "./axis-chart/import-properties/helpers/set-inter-column-sort-order.js");t.default={handleAutoMinMax:n.default,handleMeasuresAxis:i.default,setInterColumnSortOrder:o.default}},"./axis-chart/import-properties/helpers/set-inter-column-sort-order.js":
65
65
  /*!*****************************************************************************!*\
66
66
  !*** ./axis-chart/import-properties/helpers/set-inter-column-sort-order.js ***!
67
67
  \*****************************************************************************/
68
68
  /*! exports provided: default */
69
- function(e,t,n){function r(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}}}n.r(t),n.d(t,"default",(function(){return r}))},"./axis-chart/import-properties/helpers/should-update-measure-axis.js":
69
+ function(e,t,r){function n(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}}r.r(t),r.d(t,"default",(function(){return n}))},"./axis-chart/import-properties/helpers/should-update-measure-axis.js":
70
70
  /*!****************************************************************************!*\
71
71
  !*** ./axis-chart/import-properties/helpers/should-update-measure-axis.js ***!
72
72
  \****************************************************************************/
73
73
  /*! exports provided: default */
74
- function(e,t,n){function r(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}n.r(t),n.d(t,"default",(function(){return r}))},"./axis-chart/import-properties/index.js":
74
+ function(e,t,r){function n(e){var t=e.exportFormat,r=e.initialProperties;return!(!t.properties.measureAxes||r.measureAxes||!r.measureAxis||void 0===r.measureAxis.autoMinMax)}r.r(t),r.d(t,"default",(function(){return n}))},"./axis-chart/import-properties/index.js":
75
75
  /*!***********************************************!*\
76
76
  !*** ./axis-chart/import-properties/index.js ***!
77
77
  \***********************************************/
78
78
  /*! exports provided: default */
79
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
79
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
80
80
  /*! ./helpers */
81
- "./axis-chart/import-properties/helpers/index.js"),i=n(
81
+ "./axis-chart/import-properties/helpers/index.js"),i=r(
82
82
  /*! ../../color-chart */
83
- "./color-chart/index.js");function o(e){var t=e.exportFormat,n=e.initialProperties,o=e.dataDefinition,a=e.defaultPropertyValues,s=e.hypercubePath,u=e.measureType,l=i.default.importProperties({exportFormat:t,initialProperties:n,dataDefinition:o,defaultPropertyValues:a,hypercubePath:s}),c=l.qProperty;return r.default.handleAutoMinMax({initialProperties:n,properties:c}),r.default.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:c,measureType:u}),r.default.setInterColumnSortOrder(c.qHyperCubeDef),l}},"./axis-chart/index.js":
83
+ "./color-chart/index.js");function o(e){var t=e.exportFormat,r=e.initialProperties,o=e.dataDefinition,a=e.defaultPropertyValues,s=e.hypercubePath,l=e.measureType,u=i.default.importProperties({exportFormat:t,initialProperties:r,dataDefinition:o,defaultPropertyValues:a,hypercubePath:s}),c=u.qProperty;return n.default.handleAutoMinMax({initialProperties:r,properties:c}),n.default.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:c,measureType:l}),n.default.setInterColumnSortOrder(c.qHyperCubeDef),u}},"./axis-chart/index.js":
84
84
  /*!*****************************!*\
85
85
  !*** ./axis-chart/index.js ***!
86
86
  \*****************************/
87
87
  /*! exports provided: default */
88
- function(e,t,n){n.r(t);var r=n(
88
+ function(e,t,r){r.r(t);var n=r(
89
89
  /*! ./export-properties */
90
- "./axis-chart/export-properties/index.js"),i=n(
90
+ "./axis-chart/export-properties/index.js"),i=r(
91
91
  /*! ./import-properties */
92
- "./axis-chart/import-properties/index.js");t.default={exportProperties:r.default,importProperties:i.default}},"./color-chart/export-properties/index.js":
92
+ "./axis-chart/import-properties/index.js");t.default={exportProperties:n.default,importProperties:i.default}},"./color-chart/export-properties/index.js":
93
93
  /*!************************************************!*\
94
94
  !*** ./color-chart/export-properties/index.js ***!
95
95
  \************************************************/
96
96
  /*! exports provided: default */
97
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
97
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
98
98
  /*! ../../utils/attribute-expression-util */
99
- "./utils/attribute-expression-util/index.js"),i=n(
99
+ "./utils/attribute-expression-util/index.js"),i=r(
100
100
  /*! ../../hypercube */
101
- "./hypercube/index.js");function o(e){var t=e.propertyTree,n=e.hypercubePath,o=e.viewDataMode,a=i.default.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:o}),s=a.data[0],u=s.dimensions.concat(s.excludedDimensions),l=s.measures.concat(s.excludedMeasures),c=r.default.IDMAP,f=c.COLOR_BY_ALTERNATIVE,d=c.COLOR_BY_EXPRESSION;return r.default.moveByIdFromGroup(u,[],"qAttributeDimensions",f),r.default.moveByIdFromGroup(u,[],"qAttributeExpressions",f),r.default.moveByIdFromGroup(l,[],"qAttributeExpressions",d),a}},"./color-chart/import-properties/helpers/add-color-by-expression.js":
101
+ "./hypercube/index.js");function o(e){var t=e.propertyTree,r=e.hypercubePath,o=e.viewDataMode,a=i.default.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:o}),s=a.data[0],l=s.dimensions.concat(s.excludedDimensions),u=s.measures.concat(s.excludedMeasures),c=n.default.IDMAP,d=c.COLOR_BY_ALTERNATIVE,m=c.COLOR_BY_EXPRESSION;return n.default.moveByIdFromGroup(l,[],"qAttributeDimensions",d),n.default.moveByIdFromGroup(l,[],"qAttributeExpressions",d),n.default.moveByIdFromGroup(u,[],"qAttributeExpressions",m),a}},"./color-chart/import-properties/helpers/add-color-by-expression.js":
102
102
  /*!**************************************************************************!*\
103
103
  !*** ./color-chart/import-properties/helpers/add-color-by-expression.js ***!
104
104
  \**************************************************************************/
105
105
  /*! exports provided: default */
106
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
106
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
107
107
  /*! ../../../utils */
108
- "./utils/index.js");function i(e){var t=r.default.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=r.default.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),r.default.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)}},"./color-chart/import-properties/helpers/change-property.js":
108
+ "./utils/index.js");function i(e){var t=n.default.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=n.default.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),n.default.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)}},"./color-chart/import-properties/helpers/change-property.js":
109
109
  /*!******************************************************************!*\
110
110
  !*** ./color-chart/import-properties/helpers/change-property.js ***!
111
111
  \******************************************************************/
112
112
  /*! exports provided: default */
113
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
113
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
114
114
  /*! ../../../utils */
115
- "./utils/index.js"),i=n(
115
+ "./utils/index.js"),i=r(
116
116
  /*! ./update-layout-exclude */
117
- "./color-chart/import-properties/helpers/update-layout-exclude.js");function o(e,t,n){r.default.setValue(e,t,n),r.default.isAtomicValue(n)&&Object(i.default)(e,t,n)}},"./color-chart/import-properties/helpers/clear-attribute-by-type.js":
117
+ "./color-chart/import-properties/helpers/update-layout-exclude.js");function o(e,t,r){n.default.setValue(e,t,r),n.default.isAtomicValue(r)&&Object(i.default)(e,t,r)}},"./color-chart/import-properties/helpers/clear-attribute-by-type.js":
118
118
  /*!**************************************************************************!*\
119
119
  !*** ./color-chart/import-properties/helpers/clear-attribute-by-type.js ***!
120
120
  \**************************************************************************/
121
121
  /*! exports provided: default */
122
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
122
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
123
123
  /*! ../../../utils/array-util */
124
- "./utils/array-util.js");function i(e,t,n){if(Array.isArray(e[t])){var i=r.default.findIndexByPropertyValue(e[t],"id",n);i>=0&&e[t].splice(i,1)}else e[t]=[]}},"./color-chart/import-properties/helpers/clear-color-by-item.js":
124
+ "./utils/array-util.js");function i(e,t,r){if(Array.isArray(e[t])){var i=n.default.findIndexByPropertyValue(e[t],"id",r);i>=0&&e[t].splice(i,1)}else e[t]=[]}},"./color-chart/import-properties/helpers/clear-color-by-item.js":
125
125
  /*!**********************************************************************!*\
126
126
  !*** ./color-chart/import-properties/helpers/clear-color-by-item.js ***!
127
127
  \**********************************************************************/
128
128
  /*! exports provided: default */
129
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
129
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
130
130
  /*! ../../../utils/attribute-expression-util */
131
- "./utils/attribute-expression-util/index.js"),i=n(
131
+ "./utils/attribute-expression-util/index.js"),i=r(
132
132
  /*! ./clear-attribute-by-type */
133
- "./color-chart/import-properties/helpers/clear-attribute-by-type.js");function o(e,t){var n=r.default.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",n),Object(i.default)(e,"qAttributeExpressions",n)})),t.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",n),Object(i.default)(e,"qAttributeExpressions",n)}))}},"./color-chart/import-properties/helpers/delete-total-mode.js":
133
+ "./color-chart/import-properties/helpers/clear-attribute-by-type.js");function o(e,t){var r=n.default.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",r),Object(i.default)(e,"qAttributeExpressions",r)})),t.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",r),Object(i.default)(e,"qAttributeExpressions",r)}))}},"./color-chart/import-properties/helpers/delete-total-mode.js":
134
134
  /*!********************************************************************!*\
135
135
  !*** ./color-chart/import-properties/helpers/delete-total-mode.js ***!
136
136
  \********************************************************************/
137
137
  /*! exports provided: default */
138
- function(e,t,n){function r(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/get-can-color-by.js":
138
+ function(e,t,r){function n(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/get-can-color-by.js":
139
139
  /*!*******************************************************************!*\
140
140
  !*** ./color-chart/import-properties/helpers/get-can-color-by.js ***!
141
141
  \*******************************************************************/
142
142
  /*! exports provided: default */
143
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
143
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
144
144
  /*! ./get-color-options */
145
- "./color-chart/import-properties/helpers/get-color-options.js");function i(e,t){var n={primary:!0};if(e){var i=Object(r.default)(t);n.byDimension=i.dimension(e),n.byMeasure=i.measure(e),n.byMultiple=i.multiColor(e),n.byExpression=i.expression(e)}return n}},"./color-chart/import-properties/helpers/get-color-by-definition.js":
145
+ "./color-chart/import-properties/helpers/get-color-options.js");function i(e,t){var r={primary:!0};if(e){var i=Object(n.default)(t);r.byDimension=i.dimension(e),r.byMeasure=i.measure(e),r.byMultiple=i.multiColor(e),r.byExpression=i.expression(e)}return r}},"./color-chart/import-properties/helpers/get-color-by-definition.js":
146
146
  /*!**************************************************************************!*\
147
147
  !*** ./color-chart/import-properties/helpers/get-color-by-definition.js ***!
148
148
  \**************************************************************************/
149
149
  /*! exports provided: default */
150
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
150
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
151
151
  /*! ./get-expression */
152
- "./color-chart/import-properties/helpers/get-expression.js"),i=n(
152
+ "./color-chart/import-properties/helpers/get-expression.js"),i=r(
153
153
  /*! ./get-dimension-label */
154
- "./color-chart/import-properties/helpers/get-dimension-label.js"),o=n(
154
+ "./color-chart/import-properties/helpers/get-dimension-label.js"),o=r(
155
155
  /*! ./get-measure-label */
156
- "./color-chart/import-properties/helpers/get-measure-label.js"),a=n(
156
+ "./color-chart/import-properties/helpers/get-measure-label.js"),a=r(
157
157
  /*! ./get-measure-library-id */
158
- "./color-chart/import-properties/helpers/get-measure-library-id.js");function s(e,t,n,s){var u,l,c={};switch(e){case"dimension":n.qLibraryId?(c.type="dimension",c.name=n.qLibraryId,c.id=n.qLibraryId):(c.type="field",t?(c.name=n.label||n.qDef,c.id=n.qDef):(c.name=n.qDef.qFieldDefs[0],c.label=Object(i.default)(n)));break;case"measure":(u=Object(a.default)(n,t))?(c.type="measure",c.name=u,c.id=u,(l=Object(r.default)(n,s))&&(c.expression=l)):(c.type="expression",t?(c.name=n.label||n.qExpression,c.id=n.qExpression):(c.name=n.qDef.qDef,c.label=Object(o.default)(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return c}},"./color-chart/import-properties/helpers/get-color-options.js":
158
+ "./color-chart/import-properties/helpers/get-measure-library-id.js");function s(e,t,r,s){var l,u,c={};switch(e){case"dimension":r.qLibraryId?(c.type="dimension",c.name=r.qLibraryId,c.id=r.qLibraryId):(c.type="field",t?(c.name=r.label||r.qDef,c.id=r.qDef):(c.name=r.qDef.qFieldDefs[0],c.label=Object(i.default)(r)));break;case"measure":(l=Object(a.default)(r,t))?(c.type="measure",c.name=l,c.id=l,(u=Object(n.default)(r,s))&&(c.expression=u)):(c.type="expression",t?(c.name=r.label||r.qExpression,c.id=r.qExpression):(c.name=r.qDef.qDef,c.label=Object(o.default)(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return c}},"./color-chart/import-properties/helpers/get-color-options.js":
159
159
  /*!********************************************************************!*\
160
160
  !*** ./color-chart/import-properties/helpers/get-color-options.js ***!
161
161
  \********************************************************************/
162
162
  /*! exports provided: default */
163
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
163
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
164
164
  /*! ./patches/default */
165
- "./color-chart/import-properties/helpers/patches/default.js"),i=n(
165
+ "./color-chart/import-properties/helpers/patches/default.js"),i=r(
166
166
  /*! ./patches/scatter-plot */
167
- "./color-chart/import-properties/helpers/patches/scatter-plot.js"),o=n(
167
+ "./color-chart/import-properties/helpers/patches/scatter-plot.js"),o=r(
168
168
  /*! ./patches/pie-chart */
169
- "./color-chart/import-properties/helpers/patches/pie-chart.js"),a=n(
169
+ "./color-chart/import-properties/helpers/patches/pie-chart.js"),a=r(
170
170
  /*! ./patches/line-chart */
171
- "./color-chart/import-properties/helpers/patches/line-chart.js"),s=n(
171
+ "./color-chart/import-properties/helpers/patches/line-chart.js"),s=r(
172
172
  /*! ./patches/map */
173
- "./color-chart/import-properties/helpers/patches/map.js"),u=n(
173
+ "./color-chart/import-properties/helpers/patches/map.js"),l=r(
174
174
  /*! ./patches/distribution-plot */
175
- "./color-chart/import-properties/helpers/patches/distribution-plot.js"),l={scatterplot:i.default,piechart:o.default,linechart:a.default,map:s.default,distributionplot:u.default};function c(e){return(l[e]||r.default).colorModeOptions||r.default.colorModeOptions}},"./color-chart/import-properties/helpers/get-dimension-label.js":
175
+ "./color-chart/import-properties/helpers/patches/distribution-plot.js"),u={scatterplot:i.default,piechart:o.default,linechart:a.default,map:s.default,distributionplot:l.default};function c(e){return(u[e]||n.default).colorModeOptions||n.default.colorModeOptions}},"./color-chart/import-properties/helpers/get-dimension-label.js":
176
176
  /*!**********************************************************************!*\
177
177
  !*** ./color-chart/import-properties/helpers/get-dimension-label.js ***!
178
178
  \**********************************************************************/
179
179
  /*! exports provided: default */
180
- function(e,t,n){function r(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qFieldLabels&&t.qFieldLabels[0]?t.qFieldLabels[0]:t.qFieldDefs[0]}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/get-expression.js":
180
+ function(e,t,r){function n(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qFieldLabels&&t.qFieldLabels[0]?t.qFieldLabels[0]:t.qFieldDefs[0]}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/get-expression.js":
181
181
  /*!*****************************************************************!*\
182
182
  !*** ./color-chart/import-properties/helpers/get-expression.js ***!
183
183
  \*****************************************************************/
184
184
  /*! exports provided: default */
185
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
185
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
186
186
  /*! qlik-modifiers */
187
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=n.n(r);function o(e,t){return i.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}},"./color-chart/import-properties/helpers/get-measure-label.js":
187
+ "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e,t){return i.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}},"./color-chart/import-properties/helpers/get-measure-label.js":
188
188
  /*!********************************************************************!*\
189
189
  !*** ./color-chart/import-properties/helpers/get-measure-label.js ***!
190
190
  \********************************************************************/
191
191
  /*! exports provided: default */
192
- function(e,t,n){function r(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/get-measure-library-id.js":
192
+ function(e,t,r){function n(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/get-measure-library-id.js":
193
193
  /*!*************************************************************************!*\
194
194
  !*** ./color-chart/import-properties/helpers/get-measure-library-id.js ***!
195
195
  \*************************************************************************/
196
196
  /*! exports provided: default */
197
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
197
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
198
198
  /*! qlik-modifiers */
199
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=n.n(r);function o(e,t){return t?e.qLibraryId:i.a.measureBase.getLibraryId(e)}},"./color-chart/import-properties/helpers/index.js":
199
+ "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e,t){return t?e.qLibraryId:i.a.measureBase.getLibraryId(e)}},"./color-chart/import-properties/helpers/index.js":
200
200
  /*!********************************************************!*\
201
201
  !*** ./color-chart/import-properties/helpers/index.js ***!
202
202
  \********************************************************/
203
203
  /*! exports provided: default */
204
- function(e,t,n){n.r(t);var r=n(
204
+ function(e,t,r){r.r(t);var n=r(
205
205
  /*! ./change-property */
206
- "./color-chart/import-properties/helpers/change-property.js"),i=n(
206
+ "./color-chart/import-properties/helpers/change-property.js"),i=r(
207
207
  /*! ./get-can-color-by */
208
- "./color-chart/import-properties/helpers/get-can-color-by.js"),o=n(
208
+ "./color-chart/import-properties/helpers/get-can-color-by.js"),o=r(
209
209
  /*! ./should-update-color-by */
210
- "./color-chart/import-properties/helpers/should-update-color-by.js"),a=n(
210
+ "./color-chart/import-properties/helpers/should-update-color-by.js"),a=r(
211
211
  /*! ./update-color-by */
212
- "./color-chart/import-properties/helpers/update-color-by.js"),s=n(
212
+ "./color-chart/import-properties/helpers/update-color-by.js"),s=r(
213
213
  /*! ./delete-total-mode */
214
- "./color-chart/import-properties/helpers/delete-total-mode.js"),u=n(
214
+ "./color-chart/import-properties/helpers/delete-total-mode.js"),l=r(
215
215
  /*! ./should-add-color-by-expression */
216
- "./color-chart/import-properties/helpers/should-add-color-by-expression.js"),l=n(
216
+ "./color-chart/import-properties/helpers/should-add-color-by-expression.js"),u=r(
217
217
  /*! ./add-color-by-expression */
218
- "./color-chart/import-properties/helpers/add-color-by-expression.js"),c=n(
218
+ "./color-chart/import-properties/helpers/add-color-by-expression.js"),c=r(
219
219
  /*! ./switch-to-auto-color */
220
- "./color-chart/import-properties/helpers/switch-to-auto-color.js"),f=n(
220
+ "./color-chart/import-properties/helpers/switch-to-auto-color.js"),d=r(
221
221
  /*! ./should-switch-to-color-persistent */
222
- "./color-chart/import-properties/helpers/should-switch-to-color-persistent.js");t.default={changeProperty:r.default,getCanColorBy:i.default,shouldUpdateColorBy:o.default,updateColorBy:a.default,deleteTotalMode:s.default,shouldAddColorByExpression:u.default,addColorByExpression:l.default,switchToAutoColor:c.default,shouldSwitchToColorPersistent:f.default}},"./color-chart/import-properties/helpers/is-map-point-layer.js":
222
+ "./color-chart/import-properties/helpers/should-switch-to-color-persistent.js");t.default={changeProperty:n.default,getCanColorBy:i.default,shouldUpdateColorBy:o.default,updateColorBy:a.default,deleteTotalMode:s.default,shouldAddColorByExpression:l.default,addColorByExpression:u.default,switchToAutoColor:c.default,shouldSwitchToColorPersistent:d.default}},"./color-chart/import-properties/helpers/is-map-point-layer.js":
223
223
  /*!*********************************************************************!*\
224
224
  !*** ./color-chart/import-properties/helpers/is-map-point-layer.js ***!
225
225
  \*********************************************************************/
226
226
  /*! exports provided: default */
227
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
227
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
228
228
  /*! ../../../utils */
229
- "./utils/index.js");function i(e,t,n){var i=r.default.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=r.default.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===i&&"point"===s}},"./color-chart/import-properties/helpers/patches/default.js":
229
+ "./utils/index.js");function i(e,t,r){var i=n.default.getValue(t,"visualization"),o=r.split("."),a=Number(o[1]),s=n.default.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===i&&"point"===s}},"./color-chart/import-properties/helpers/patches/default.js":
230
230
  /*!******************************************************************!*\
231
231
  !*** ./color-chart/import-properties/helpers/patches/default.js ***!
232
232
  \******************************************************************/
233
233
  /*! exports provided: default */
234
- function(e,t,n){n.r(t);var r=n(
234
+ function(e,t,r){r.r(t);var n=r(
235
235
  /*! ../../../../utils/hypercube-util */
236
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return r.default.getNumDimensions(e)>0&&r.default.getNumMeasures(e)<=1},multiColor:function(e){return r.default.getNumMeasures(e)>1},measure:function(e){return r.default.getNumDimensions(e)>0},expression:function(e){return r.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/distribution-plot.js":
236
+ "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>0&&n.default.getNumMeasures(e)<=1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)>0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/distribution-plot.js":
237
237
  /*!****************************************************************************!*\
238
238
  !*** ./color-chart/import-properties/helpers/patches/distribution-plot.js ***!
239
239
  \****************************************************************************/
240
240
  /*! exports provided: default */
241
- function(e,t,n){n.r(t);var r=n(
241
+ function(e,t,r){r.r(t);var n=r(
242
242
  /*! ../../../../utils/hypercube-util */
243
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return r.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/line-chart.js":
243
+ "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/line-chart.js":
244
244
  /*!*********************************************************************!*\
245
245
  !*** ./color-chart/import-properties/helpers/patches/line-chart.js ***!
246
246
  \*********************************************************************/
247
247
  /*! exports provided: default */
248
- function(e,t,n){n.r(t);var r=n(
248
+ function(e,t,r){r.r(t);var n=r(
249
249
  /*! ../../../../utils/hypercube-util */
250
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return r.default.getNumDimensions(e)>1},multiColor:function(e){return r.default.getNumMeasures(e)>1},measure:function(e){return r.default.getNumDimensions(e)<=1},expression:function(e){return r.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/map.js":
250
+ "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)<=1},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/map.js":
251
251
  /*!**************************************************************!*\
252
252
  !*** ./color-chart/import-properties/helpers/patches/map.js ***!
253
253
  \**************************************************************/
254
254
  /*! exports provided: default */
255
- function(e,t,n){n.r(t);var r=n(
255
+ function(e,t,r){r.r(t);var n=r(
256
256
  /*! ../../../../utils/hypercube-util */
257
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return r.default.getNumDimensions(e)>=1},multiColor:function(e){return r.default.getNumMeasures(e)>1},measure:function(e){return r.default.getNumDimensions(e)>=1},expression:function(e){return r.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/pie-chart.js":
257
+ "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>=1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)>=1},expression:function(e){return n.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/pie-chart.js":
258
258
  /*!********************************************************************!*\
259
259
  !*** ./color-chart/import-properties/helpers/patches/pie-chart.js ***!
260
260
  \********************************************************************/
261
261
  /*! exports provided: default */
262
- function(e,t,n){n.r(t);var r=n(
262
+ function(e,t,r){r.r(t);var n=r(
263
263
  /*! ../../../../utils/hypercube-util */
264
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return r.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/scatter-plot.js":
264
+ "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/scatter-plot.js":
265
265
  /*!***********************************************************************!*\
266
266
  !*** ./color-chart/import-properties/helpers/patches/scatter-plot.js ***!
267
267
  \***********************************************************************/
268
268
  /*! exports provided: default */
269
- function(e,t,n){n.r(t);var r=n(
269
+ function(e,t,r){r.r(t);var n=r(
270
270
  /*! ../../../../utils/hypercube-util */
271
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return r.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/resolve-color-by-property-def.js":
271
+ "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/resolve-color-by-property-def.js":
272
272
  /*!********************************************************************************!*\
273
273
  !*** ./color-chart/import-properties/helpers/resolve-color-by-property-def.js ***!
274
274
  \********************************************************************************/
275
275
  /*! exports provided: default */
276
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
276
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return l}));var n=r(
277
277
  /*! ../../../utils */
278
- "./utils/index.js"),i=n(
278
+ "./utils/index.js"),i=r(
279
279
  /*! ../../../utils/attribute-expression-util */
280
- "./utils/attribute-expression-util/index.js"),o=n(
280
+ "./utils/attribute-expression-util/index.js"),o=r(
281
281
  /*! ./clear-color-by-item */
282
- "./color-chart/import-properties/helpers/clear-color-by-item.js"),a=n(
282
+ "./color-chart/import-properties/helpers/clear-color-by-item.js"),a=r(
283
283
  /*! ./set-attribute-by-expression */
284
- "./color-chart/import-properties/helpers/set-attribute-by-expression.js"),s=n(
284
+ "./color-chart/import-properties/helpers/set-attribute-by-expression.js"),s=r(
285
285
  /*! ./set-attribute-by-library */
286
- "./color-chart/import-properties/helpers/set-attribute-by-library.js");function u(e){var t=e.properties,n=e.isDimension,u=e.dimensions,l=e.excludedDimensions,c=e.measures,f=e.label;Object(o.default)(u,l);var d=u[u.length-1];if(d){var m=n?r.default.getValue(t,"color.byDimDef"):r.default.getValue(t,"color.byMeasureDef"),p=r.default.getValue(t,"color.formatting.qNumFormat"),h=r.default.getValue(t,"color.formatting.isCustomFormatted");if(m){var v=i.default.create(i.default.IDMAP.COLOR_BY_ALTERNATIVE);switch(m.type){case"expression":Object(a.default)({attributeExpression:v,label:f,item:m,isDimension:n,qNumFormat:p,isCustomFormatted:h});break;case"libraryItem":Object(s.default)({attributeExpression:v,measures:c,item:m,isDimension:n,qNumFormat:p,isCustomFormatted:h})}n?(v.qSortBy={qSortByAscii:1},d.qAttributeDimensions.push(v)):d.qAttributeExpressions.push(v)}}}},"./color-chart/import-properties/helpers/set-alt-label.js":
286
+ "./color-chart/import-properties/helpers/set-attribute-by-library.js");function l(e){var t=e.properties,r=e.isDimension,l=e.dimensions,u=e.excludedDimensions,c=e.measures,d=e.label;Object(o.default)(l,u);var m=l[l.length-1];if(m){var f=r?n.default.getValue(t,"color.byDimDef"):n.default.getValue(t,"color.byMeasureDef"),p=n.default.getValue(t,"color.formatting.qNumFormat"),h=n.default.getValue(t,"color.formatting.isCustomFormatted");if(f){var y=i.default.create(i.default.IDMAP.COLOR_BY_ALTERNATIVE);switch(f.type){case"expression":Object(a.default)({attributeExpression:y,label:d,item:f,isDimension:r,qNumFormat:p,isCustomFormatted:h});break;case"libraryItem":Object(s.default)({attributeExpression:y,measures:c,item:f,isDimension:r,qNumFormat:p,isCustomFormatted:h})}r?(y.qSortBy={qSortByAscii:1},m.qAttributeDimensions.push(y)):m.qAttributeExpressions.push(y)}}}},"./color-chart/import-properties/helpers/set-alt-label.js":
287
287
  /*!****************************************************************!*\
288
288
  !*** ./color-chart/import-properties/helpers/set-alt-label.js ***!
289
289
  \****************************************************************/
290
290
  /*! exports provided: default */
291
- function(e,t,n){function r(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/set-attribute-by-expression.js":
291
+ function(e,t,r){function n(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/set-attribute-by-expression.js":
292
292
  /*!******************************************************************************!*\
293
293
  !*** ./color-chart/import-properties/helpers/set-attribute-by-expression.js ***!
294
294
  \******************************************************************************/
295
295
  /*! exports provided: default */
296
- function(e,t,n){function r(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")}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/set-attribute-by-library.js":
296
+ function(e,t,r){function n(e){var t=e.attributeExpression,r=e.label,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,i?t.qDef=n.key:(t.qExpression=n.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/set-attribute-by-library.js":
297
297
  /*!***************************************************************************!*\
298
298
  !*** ./color-chart/import-properties/helpers/set-attribute-by-library.js ***!
299
299
  \***************************************************************************/
300
300
  /*! exports provided: default */
301
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
301
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
302
302
  /*! ../../../utils/array-util */
303
- "./utils/array-util.js");function i(e){var t=e.attributeExpression,n=e.measures,i=e.item,o=e.isDimension,a=e.qNumFormat,s=e.isCustomFormatted;o||(t.matchMeasure=r.default.findIndexByPropertyValue(n,"qLibraryId",i.key),a&&(t.qNumFormat=a,t.isCustomFormatted=s)),void 0!==i.expression?t.qExpression=i.expression:t.qLibraryId=i.key,t.colorMapRef=i.key}},"./color-chart/import-properties/helpers/set-color-by-dimension-1.js":
303
+ "./utils/array-util.js");function i(e){var t=e.attributeExpression,r=e.measures,i=e.item,o=e.isDimension,a=e.qNumFormat,s=e.isCustomFormatted;o||(t.matchMeasure=n.default.findIndexByPropertyValue(r,"qLibraryId",i.key),a&&(t.qNumFormat=a,t.isCustomFormatted=s)),void 0!==i.expression?t.qExpression=i.expression:t.qLibraryId=i.key,t.colorMapRef=i.key}},"./color-chart/import-properties/helpers/set-color-by-dimension-1.js":
304
304
  /*!***************************************************************************!*\
305
305
  !*** ./color-chart/import-properties/helpers/set-color-by-dimension-1.js ***!
306
306
  \***************************************************************************/
307
307
  /*! exports provided: default */
308
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
308
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
309
309
  /*! ../../../utils */
310
- "./utils/index.js"),i=n(
310
+ "./utils/index.js"),i=r(
311
311
  /*! ./get-color-by-definition */
312
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=n(
312
+ "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=r(
313
313
  /*! ./set-color-by-property-def */
314
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),a=r.default.getValue(e,"color.byDimDef");a.activeDimensionIndex=Math.min(a.activeDimensionIndex,n.length-1);var s=n[a.activeDimensionIndex],u=Object(i.default)("dimension",!1,s);u.activeDimensionIndex=a.activeDimensionIndex,Object(o.default)(e,u)}},"./color-chart/import-properties/helpers/set-color-by-dimension-2.js":
314
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),a=n.default.getValue(e,"color.byDimDef");a.activeDimensionIndex=Math.min(a.activeDimensionIndex,r.length-1);var s=r[a.activeDimensionIndex],l=Object(i.default)("dimension",!1,s);l.activeDimensionIndex=a.activeDimensionIndex,Object(o.default)(e,l)}},"./color-chart/import-properties/helpers/set-color-by-dimension-2.js":
315
315
  /*!***************************************************************************!*\
316
316
  !*** ./color-chart/import-properties/helpers/set-color-by-dimension-2.js ***!
317
317
  \***************************************************************************/
318
318
  /*! exports provided: default */
319
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return l}));var r=n(
319
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return u}));var n=r(
320
320
  /*! ../../../utils */
321
- "./utils/index.js"),i=n(
321
+ "./utils/index.js"),i=r(
322
322
  /*! ../../../utils/array-util */
323
- "./utils/array-util.js"),o=n(
323
+ "./utils/array-util.js"),o=r(
324
324
  /*! ../../../utils/attribute-expression-util */
325
- "./utils/attribute-expression-util/index.js"),a=n(
325
+ "./utils/attribute-expression-util/index.js"),a=r(
326
326
  /*! ./get-color-by-definition */
327
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=n(
327
+ "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=r(
328
328
  /*! ./set-color-by-property-def */
329
- "./color-chart/import-properties/helpers/set-color-by-property-def.js"),u=n(
329
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js"),l=r(
330
330
  /*! ./is-map-point-layer */
331
- "./color-chart/import-properties/helpers/is-map-point-layer.js");function l(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),l=n[Object(u.default)(n,e,t)?0:n.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,f=i.default.findItemByPropertyValue(l.qAttributeDimensions,"id",c);return Object(s.default)(e,Object(a.default)("dimension",!!f,f||l)),!!f}},"./color-chart/import-properties/helpers/set-color-by-measure-1.js":
331
+ "./color-chart/import-properties/helpers/is-map-point-layer.js");function u(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),u=r[Object(l.default)(r,e,t)?0:r.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,d=i.default.findItemByPropertyValue(u.qAttributeDimensions,"id",c);return Object(s.default)(e,Object(a.default)("dimension",!!d,d||u)),!!d}},"./color-chart/import-properties/helpers/set-color-by-measure-1.js":
332
332
  /*!*************************************************************************!*\
333
333
  !*** ./color-chart/import-properties/helpers/set-color-by-measure-1.js ***!
334
334
  \*************************************************************************/
335
335
  /*! exports provided: default */
336
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
336
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
337
337
  /*! ../../../utils */
338
- "./utils/index.js"),i=n(
338
+ "./utils/index.js"),i=r(
339
339
  /*! ./get-color-by-definition */
340
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=n(
340
+ "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=r(
341
341
  /*! ./set-color-by-property-def */
342
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var n=r.default.getValue(e,"".concat(t,"qMeasures"),[]),a=r.default.getValue(e,"color.byMeasureDef");if(a.activeMeasureIndex=Math.min(a.activeMeasureIndex,n.length-1),a.activeMeasureIndex>-1){var s=n[a.activeMeasureIndex],u=Object(i.default)("measure",!1,s,!0);u.activeMeasureIndex=a.activeMeasureIndex,Object(o.default)(e,u)}}},"./color-chart/import-properties/helpers/set-color-by-measure-2.js":
342
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var r=n.default.getValue(e,"".concat(t,"qMeasures"),[]),a=n.default.getValue(e,"color.byMeasureDef");if(a.activeMeasureIndex=Math.min(a.activeMeasureIndex,r.length-1),a.activeMeasureIndex>-1){var s=r[a.activeMeasureIndex],l=Object(i.default)("measure",!1,s,!0);l.activeMeasureIndex=a.activeMeasureIndex,Object(o.default)(e,l)}}},"./color-chart/import-properties/helpers/set-color-by-measure-2.js":
343
343
  /*!*************************************************************************!*\
344
344
  !*** ./color-chart/import-properties/helpers/set-color-by-measure-2.js ***!
345
345
  \*************************************************************************/
346
346
  /*! exports provided: default */
347
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
347
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return l}));var n=r(
348
348
  /*! ../../../utils */
349
- "./utils/index.js"),i=n(
349
+ "./utils/index.js"),i=r(
350
350
  /*! ../../../utils/array-util */
351
- "./utils/array-util.js"),o=n(
351
+ "./utils/array-util.js"),o=r(
352
352
  /*! ../../../utils/attribute-expression-util */
353
- "./utils/attribute-expression-util/index.js"),a=n(
353
+ "./utils/attribute-expression-util/index.js"),a=r(
354
354
  /*! ./get-color-by-definition */
355
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=n(
355
+ "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=r(
356
356
  /*! ./set-color-by-property-def */
357
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function u(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),u=r.default.getValue(e,"".concat(t,"qMeasures"),[]),l=n[n.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,f=i.default.findItemByPropertyValue(l.qAttributeExpressions,"id",c);return Object(s.default)(e,Object(a.default)("measure",!!f,f||u[0])),!!f}},"./color-chart/import-properties/helpers/set-color-by-property-def.js":
357
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js");function l(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),l=n.default.getValue(e,"".concat(t,"qMeasures"),[]),u=r[r.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,d=i.default.findItemByPropertyValue(u.qAttributeExpressions,"id",c);return Object(s.default)(e,Object(a.default)("measure",!!d,d||l[0])),!!d}},"./color-chart/import-properties/helpers/set-color-by-property-def.js":
358
358
  /*!****************************************************************************!*\
359
359
  !*** ./color-chart/import-properties/helpers/set-color-by-property-def.js ***!
360
360
  \****************************************************************************/
361
361
  /*! exports provided: default */
362
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
362
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
363
363
  /*! ../../../utils/hypercube-util */
364
- "./utils/hypercube-util.js"),i=n(
364
+ "./utils/hypercube-util.js"),i=r(
365
365
  /*! ../../../utils/number-format-util */
366
- "./utils/number-format-util.js"),o=n(
366
+ "./utils/number-format-util.js"),o=r(
367
367
  /*! ./set-alt-label */
368
- "./color-chart/import-properties/helpers/set-alt-label.js");function a(e,t,n,a){var s=n?"expression":t.type,u=e.color,l=u.mode,c=r.default.getItemLabel(t);switch(Object(o.default)(e,c||""),s){case"field":l="byDimension",u.byDimDef={label:t.label||r.default.wrapFieldName(t.name),key:r.default.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":l="byMeasure",u.byMeasureDef={label:n||c,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":l="byDimension",u.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":l="byMeasure",u.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},u.formatting&&i.default.useMasterNumberFormat(u.formatting)}a||(u.auto=!1,u.mode=l)}},"./color-chart/import-properties/helpers/should-add-color-by-expression.js":
368
+ "./color-chart/import-properties/helpers/set-alt-label.js");function a(e,t,r,a){var s=r?"expression":t.type,l=e.color,u=l.mode,c=n.default.getItemLabel(t);switch(Object(o.default)(e,c||""),s){case"field":u="byDimension",l.byDimDef={label:t.label||n.default.wrapFieldName(t.name),key:n.default.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":u="byMeasure",l.byMeasureDef={label:r||c,key:r||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":u="byDimension",l.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":u="byMeasure",l.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},l.formatting&&i.default.useMasterNumberFormat(l.formatting)}a||(l.auto=!1,l.mode=u)}},"./color-chart/import-properties/helpers/should-add-color-by-expression.js":
369
369
  /*!*********************************************************************************!*\
370
370
  !*** ./color-chart/import-properties/helpers/should-add-color-by-expression.js ***!
371
371
  \*********************************************************************************/
372
372
  /*! exports provided: default */
373
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
373
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
374
374
  /*! ../../../utils */
375
- "./utils/index.js");function i(e){var t=e.shouldUpdateColorBy,n=e.properties,i=r.default.getValue(n,"qHyperCubeDef.qMeasures",[]),o=r.default.getValue(n,"color.mode","");return!t&&"byExpression"===o&&i.length>0}},"./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js":
375
+ "./utils/index.js");function i(e){var t=e.shouldUpdateColorBy,r=e.properties,i=n.default.getValue(r,"qHyperCubeDef.qMeasures",[]),o=n.default.getValue(r,"color.mode","");return!t&&"byExpression"===o&&i.length>0}},"./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js":
376
376
  /*!**********************************************************************************!*\
377
377
  !*** ./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js ***!
378
378
  \**********************************************************************************/
379
379
  /*! exports provided: default */
380
- function(e,t,n){function r(e){return!!(e&&e.activeDimensionIndex>-1)}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js":
380
+ function(e,t,r){function n(e){return!!(e&&e.activeDimensionIndex>-1)}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js":
381
381
  /*!**********************************************************************************!*\
382
382
  !*** ./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js ***!
383
383
  \**********************************************************************************/
384
384
  /*! exports provided: default */
385
- function(e,t,n){function r(e){return!e||!e.key}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-set-color-by-measure-1.js":
385
+ function(e,t,r){function n(e){return!e||!e.key}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-set-color-by-measure-1.js":
386
386
  /*!********************************************************************************!*\
387
387
  !*** ./color-chart/import-properties/helpers/should-set-color-by-measure-1.js ***!
388
388
  \********************************************************************************/
389
389
  /*! exports provided: default */
390
- function(e,t,n){function r(e){return!!(e&&e.activeMeasureIndex>-1)}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-set-color-by-measure-2.js":
390
+ function(e,t,r){function n(e){return!!(e&&e.activeMeasureIndex>-1)}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-set-color-by-measure-2.js":
391
391
  /*!********************************************************************************!*\
392
392
  !*** ./color-chart/import-properties/helpers/should-set-color-by-measure-2.js ***!
393
393
  \********************************************************************************/
394
394
  /*! exports provided: default */
395
- function(e,t,n){function r(e,t){return(!e||!e.key)&&t.length>0}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-switch-to-color-persistent.js":
395
+ function(e,t,r){function n(e,t){return(!e||!e.key)&&t.length>0}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-switch-to-color-persistent.js":
396
396
  /*!************************************************************************************!*\
397
397
  !*** ./color-chart/import-properties/helpers/should-switch-to-color-persistent.js ***!
398
398
  \************************************************************************************/
399
399
  /*! exports provided: default */
400
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
400
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
401
401
  /*! ../../../utils */
402
- "./utils/index.js");function i(e){var t=r.default.getValue(e,"qHyperCubeDef.qDimensions",[]),n=r.default.getValue(e,"color.persistent",!1);return t.length>1&&!n}},"./color-chart/import-properties/helpers/should-update-color-by-dimension.js":
402
+ "./utils/index.js");function i(e){var t=n.default.getValue(e,"qHyperCubeDef.qDimensions",[]),r=n.default.getValue(e,"color.persistent",!1);return t.length>1&&!r}},"./color-chart/import-properties/helpers/should-update-color-by-dimension.js":
403
403
  /*!***********************************************************************************!*\
404
404
  !*** ./color-chart/import-properties/helpers/should-update-color-by-dimension.js ***!
405
405
  \***********************************************************************************/
406
406
  /*! exports provided: default */
407
- function(e,t,n){function r(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/should-update-color-by-measure.js":
407
+ function(e,t,r){function n(e){var t=e.auto,r=e.colorMode,n=e.dimensions;return!t&&"byDimension"===r&&n.length>0}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-update-color-by-measure.js":
408
408
  /*!*********************************************************************************!*\
409
409
  !*** ./color-chart/import-properties/helpers/should-update-color-by-measure.js ***!
410
410
  \*********************************************************************************/
411
411
  /*! exports provided: default */
412
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
412
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
413
413
  /*! ../../../utils */
414
- "./utils/index.js");function i(e){var t=e.auto,n=e.colorMode,i=e.dimensions,o=e.measures,a=e.properties,s=r.default.getValue(a,"visualization");return!(t||"byMeasure"!==n||!i.length||"map"!==s&&!o.length)}},"./color-chart/import-properties/helpers/should-update-color-by.js":
414
+ "./utils/index.js");function i(e){var t=e.auto,r=e.colorMode,i=e.dimensions,o=e.measures,a=e.properties,s=n.default.getValue(a,"visualization");return!(t||"byMeasure"!==r||!i.length||"map"!==s&&!o.length)}},"./color-chart/import-properties/helpers/should-update-color-by.js":
415
415
  /*!*************************************************************************!*\
416
416
  !*** ./color-chart/import-properties/helpers/should-update-color-by.js ***!
417
417
  \*************************************************************************/
418
418
  /*! exports provided: default */
419
- function(e,t,n){function r(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))}n.r(t),n.d(t,"default",(function(){return r}))},"./color-chart/import-properties/helpers/switch-to-auto-color.js":
419
+ function(e,t,r){function n(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/switch-to-auto-color.js":
420
420
  /*!***********************************************************************!*\
421
421
  !*** ./color-chart/import-properties/helpers/switch-to-auto-color.js ***!
422
422
  \***********************************************************************/
423
423
  /*! exports provided: default */
424
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
424
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
425
425
  /*! ../../../utils */
426
- "./utils/index.js");function i(e){r.default.setValue(e,"color.mode","primary"),r.default.setValue(e,"color.auto",!0)}},"./color-chart/import-properties/helpers/update-color-by-dimension.js":
426
+ "./utils/index.js");function i(e){n.default.setValue(e,"color.mode","primary"),n.default.setValue(e,"color.auto",!0)}},"./color-chart/import-properties/helpers/update-color-by-dimension.js":
427
427
  /*!****************************************************************************!*\
428
428
  !*** ./color-chart/import-properties/helpers/update-color-by-dimension.js ***!
429
429
  \****************************************************************************/
430
430
  /*! exports provided: default */
431
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
431
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
432
432
  /*! ../../../utils */
433
- "./utils/index.js"),i=n(
433
+ "./utils/index.js"),i=r(
434
434
  /*! ./set-alt-label */
435
- "./color-chart/import-properties/helpers/set-alt-label.js"),o=n(
435
+ "./color-chart/import-properties/helpers/set-alt-label.js"),o=r(
436
436
  /*! ./resolve-color-by-property-def */
437
- "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=n(
437
+ "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=r(
438
438
  /*! ./should-set-color-by-dimension-1 */
439
- "./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js"),s=n(
439
+ "./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js"),s=r(
440
440
  /*! ./should-set-color-by-dimension-2 */
441
- "./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js"),u=n(
441
+ "./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js"),l=r(
442
442
  /*! ./set-color-by-dimension-1 */
443
- "./color-chart/import-properties/helpers/set-color-by-dimension-1.js"),l=n(
443
+ "./color-chart/import-properties/helpers/set-color-by-dimension-1.js"),u=r(
444
444
  /*! ./set-color-by-dimension-2 */
445
- "./color-chart/import-properties/helpers/set-color-by-dimension-2.js");function c(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),c=r.default.getValue(e,"".concat(t,"qMeasures"),[]),f=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=r.default.getValue(e,"color.byDimDef");if(d&&Object(i.default)(e,d.label),Object(a.default)(d))Object(u.default)(e,t);else if(Object(s.default)(d)&&Object(l.default)(e,t))return;var m=r.default.getValue(e,"color.byDimDef.label");Object(o.default)({properties:e,isDimension:!0,dimensions:n,excludedDimensions:f,measures:c,label:m})}},"./color-chart/import-properties/helpers/update-color-by-measure.js":
445
+ "./color-chart/import-properties/helpers/set-color-by-dimension-2.js");function c(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),c=n.default.getValue(e,"".concat(t,"qMeasures"),[]),d=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),m=n.default.getValue(e,"color.byDimDef");if(m&&Object(i.default)(e,m.label),Object(a.default)(m))Object(l.default)(e,t);else if(Object(s.default)(m)&&Object(u.default)(e,t))return;var f=n.default.getValue(e,"color.byDimDef.label");Object(o.default)({properties:e,isDimension:!0,dimensions:r,excludedDimensions:d,measures:c,label:f})}},"./color-chart/import-properties/helpers/update-color-by-measure.js":
446
446
  /*!**************************************************************************!*\
447
447
  !*** ./color-chart/import-properties/helpers/update-color-by-measure.js ***!
448
448
  \**************************************************************************/
449
449
  /*! exports provided: default */
450
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
450
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
451
451
  /*! ../../../utils */
452
- "./utils/index.js"),i=n(
452
+ "./utils/index.js"),i=r(
453
453
  /*! ./set-alt-label */
454
- "./color-chart/import-properties/helpers/set-alt-label.js"),o=n(
454
+ "./color-chart/import-properties/helpers/set-alt-label.js"),o=r(
455
455
  /*! ./resolve-color-by-property-def */
456
- "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=n(
456
+ "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=r(
457
457
  /*! ./set-color-by-measure-1 */
458
- "./color-chart/import-properties/helpers/set-color-by-measure-1.js"),s=n(
458
+ "./color-chart/import-properties/helpers/set-color-by-measure-1.js"),s=r(
459
459
  /*! ./set-color-by-measure-2 */
460
- "./color-chart/import-properties/helpers/set-color-by-measure-2.js"),u=n(
460
+ "./color-chart/import-properties/helpers/set-color-by-measure-2.js"),l=r(
461
461
  /*! ./should-set-color-by-measure-1 */
462
- "./color-chart/import-properties/helpers/should-set-color-by-measure-1.js"),l=n(
462
+ "./color-chart/import-properties/helpers/should-set-color-by-measure-1.js"),u=r(
463
463
  /*! ./should-set-color-by-measure-2 */
464
- "./color-chart/import-properties/helpers/should-set-color-by-measure-2.js");function c(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),c=r.default.getValue(e,"".concat(t,"qMeasures"),[]),f=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=r.default.getValue(e,"color.byMeasureDef");if(d&&Object(i.default)(e,d.label),Object(u.default)(d))Object(a.default)(e,t);else if(Object(l.default)(d,c)&&Object(s.default)(e,t))return;var m=r.default.getValue(e,"color.byMeasureDef.label");Object(o.default)({properties:e,isDimension:!1,dimensions:n,excludedDimensions:f,measures:c,label:m})}},"./color-chart/import-properties/helpers/update-color-by-other.js":
464
+ "./color-chart/import-properties/helpers/should-set-color-by-measure-2.js");function c(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),c=n.default.getValue(e,"".concat(t,"qMeasures"),[]),d=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),m=n.default.getValue(e,"color.byMeasureDef");if(m&&Object(i.default)(e,m.label),Object(l.default)(m))Object(a.default)(e,t);else if(Object(u.default)(m,c)&&Object(s.default)(e,t))return;var f=n.default.getValue(e,"color.byMeasureDef.label");Object(o.default)({properties:e,isDimension:!1,dimensions:r,excludedDimensions:d,measures:c,label:f})}},"./color-chart/import-properties/helpers/update-color-by-other.js":
465
465
  /*!************************************************************************!*\
466
466
  !*** ./color-chart/import-properties/helpers/update-color-by-other.js ***!
467
467
  \************************************************************************/
468
468
  /*! exports provided: default */
469
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
469
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
470
470
  /*! ../../../utils */
471
- "./utils/index.js"),i=n(
471
+ "./utils/index.js"),i=r(
472
472
  /*! ./clear-color-by-item */
473
- "./color-chart/import-properties/helpers/clear-color-by-item.js");function o(e,t){var n=r.default.getValue(e,"color.mode"),o=r.default.getValue(e,"".concat(t,"qDimensions"),[]),a=r.default.getValue(e,"".concat(t,"qMeasures"),[]),s=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&a.length<2&&r.default.setValue(e,"color.mode","primary"),Object(i.default)(o,s)}},"./color-chart/import-properties/helpers/update-color-by.js":
473
+ "./color-chart/import-properties/helpers/clear-color-by-item.js");function o(e,t){var r=n.default.getValue(e,"color.mode"),o=n.default.getValue(e,"".concat(t,"qDimensions"),[]),a=n.default.getValue(e,"".concat(t,"qMeasures"),[]),s=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&a.length<2&&n.default.setValue(e,"color.mode","primary"),Object(i.default)(o,s)}},"./color-chart/import-properties/helpers/update-color-by.js":
474
474
  /*!******************************************************************!*\
475
475
  !*** ./color-chart/import-properties/helpers/update-color-by.js ***!
476
476
  \******************************************************************/
477
477
  /*! exports provided: default */
478
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
478
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
479
479
  /*! ../../../utils */
480
- "./utils/index.js"),i=n(
480
+ "./utils/index.js"),i=r(
481
481
  /*! ./clear-color-by-item */
482
- "./color-chart/import-properties/helpers/clear-color-by-item.js"),o=n(
482
+ "./color-chart/import-properties/helpers/clear-color-by-item.js"),o=r(
483
483
  /*! ./should-update-color-by-dimension */
484
- "./color-chart/import-properties/helpers/should-update-color-by-dimension.js"),a=n(
484
+ "./color-chart/import-properties/helpers/should-update-color-by-dimension.js"),a=r(
485
485
  /*! ./should-update-color-by-measure */
486
- "./color-chart/import-properties/helpers/should-update-color-by-measure.js"),s=n(
486
+ "./color-chart/import-properties/helpers/should-update-color-by-measure.js"),s=r(
487
487
  /*! ./update-color-by-dimension */
488
- "./color-chart/import-properties/helpers/update-color-by-dimension.js"),u=n(
488
+ "./color-chart/import-properties/helpers/update-color-by-dimension.js"),l=r(
489
489
  /*! ./update-color-by-measure */
490
- "./color-chart/import-properties/helpers/update-color-by-measure.js"),l=n(
490
+ "./color-chart/import-properties/helpers/update-color-by-measure.js"),u=r(
491
491
  /*! ./update-color-by-other */
492
- "./color-chart/import-properties/helpers/update-color-by-other.js");function c(e,t){var n=r.default.getValue(e,"color.mode"),c=r.default.getValue(e,"color.auto"),f=r.default.getValue(e,"".concat(t,"qDimensions"),[]),d=r.default.getValue(e,"".concat(t,"qMeasures"),[]),m=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);c?Object(i.default)(f,m):Object(o.default)({auto:c,colorMode:n,dimensions:f})?Object(s.default)(e,t):Object(a.default)({auto:c,colorMode:n,dimensions:f,measures:d,properties:e})?Object(u.default)(e,t):Object(l.default)(e,t)}},"./color-chart/import-properties/helpers/update-layout-exclude.js":
492
+ "./color-chart/import-properties/helpers/update-color-by-other.js");function c(e,t){var r=n.default.getValue(e,"color.mode"),c=n.default.getValue(e,"color.auto"),d=n.default.getValue(e,"".concat(t,"qDimensions"),[]),m=n.default.getValue(e,"".concat(t,"qMeasures"),[]),f=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);c?Object(i.default)(d,f):Object(o.default)({auto:c,colorMode:r,dimensions:d})?Object(s.default)(e,t):Object(a.default)({auto:c,colorMode:r,dimensions:d,measures:m,properties:e})?Object(l.default)(e,t):Object(u.default)(e,t)}},"./color-chart/import-properties/helpers/update-layout-exclude.js":
493
493
  /*!************************************************************************!*\
494
494
  !*** ./color-chart/import-properties/helpers/update-layout-exclude.js ***!
495
495
  \************************************************************************/
496
496
  /*! exports provided: default */
497
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
497
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
498
498
  /*! ../../../utils */
499
- "./utils/index.js");function i(e,t,n){var i=e.qLayoutExclude;i&&(i.changed||(i.changed={}),i.changed[t]={from:r.default.getValue(e,t),to:n})}},"./color-chart/import-properties/index.js":
499
+ "./utils/index.js");function i(e,t,r){var i=e.qLayoutExclude;i&&(i.changed||(i.changed={}),i.changed[t]={from:n.default.getValue(e,t),to:r})}},"./color-chart/import-properties/index.js":
500
500
  /*!************************************************!*\
501
501
  !*** ./color-chart/import-properties/index.js ***!
502
502
  \************************************************/
503
503
  /*! exports provided: default */
504
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
504
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
505
505
  /*! ../../utils */
506
- "./utils/index.js"),i=n(
506
+ "./utils/index.js"),i=r(
507
507
  /*! ./helpers */
508
- "./color-chart/import-properties/helpers/index.js"),o=n(
508
+ "./color-chart/import-properties/helpers/index.js"),o=r(
509
509
  /*! ../../hypercube */
510
- "./hypercube/index.js");function a(e){var t=e.exportFormat,n=e.initialProperties,a=e.dataDefinition,s=e.defaultPropertyValues,u=e.hypercubePath,l=o.default.importProperties({exportFormat:t,initialProperties:n,dataDefinition:a,defaultPropertyValues:s,hypercubePath:u}),c=l.qProperty,f=r.default.getValue(c,"visualization"),d=r.default.getValue(c,"qHyperCubeDef.qDimensions",[]),m=r.default.getValue(c,"color.mode",""),p=r.default.getValue(c,"color.auto",""),h=i.default.getCanColorBy(c,f),v=i.default.shouldUpdateColorBy({canColorBy:h,autoColor:p,colorMode:m,dimensions:d});return h[m]?i.default.shouldAddColorByExpression({shouldUpdateColorBy:v,properties:c})&&i.default.addColorByExpression(c):i.default.switchToAutoColor(c),v&&i.default.updateColorBy(c,"qHyperCubeDef."),i.default.shouldSwitchToColorPersistent(c)&&i.default.changeProperty(c,"color.persistent",!0),i.default.deleteTotalMode(d),l}},"./color-chart/index.js":
510
+ "./hypercube/index.js");function a(e){var t=e.exportFormat,r=e.initialProperties,a=e.dataDefinition,s=e.defaultPropertyValues,l=e.hypercubePath,u=o.default.importProperties({exportFormat:t,initialProperties:r,dataDefinition:a,defaultPropertyValues:s,hypercubePath:l}),c=u.qProperty,d=n.default.getValue(c,"visualization"),m=n.default.getValue(c,"qHyperCubeDef.qDimensions",[]),f=n.default.getValue(c,"color.mode",""),p=n.default.getValue(c,"color.auto",""),h=i.default.getCanColorBy(c,d),y=i.default.shouldUpdateColorBy({canColorBy:h,autoColor:p,colorMode:f,dimensions:m});return h[f]?i.default.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:c})&&i.default.addColorByExpression(c):i.default.switchToAutoColor(c),y&&i.default.updateColorBy(c,"qHyperCubeDef."),i.default.shouldSwitchToColorPersistent(c)&&i.default.changeProperty(c,"color.persistent",!0),i.default.deleteTotalMode(m),u}},"./color-chart/index.js":
511
511
  /*!******************************!*\
512
512
  !*** ./color-chart/index.js ***!
513
513
  \******************************/
514
514
  /*! exports provided: default */
515
- function(e,t,n){n.r(t);var r=n(
515
+ function(e,t,r){r.r(t);var n=r(
516
516
  /*! ./export-properties */
517
- "./color-chart/export-properties/index.js"),i=n(
517
+ "./color-chart/export-properties/index.js"),i=r(
518
518
  /*! ./import-properties */
519
- "./color-chart/import-properties/index.js");t.default={exportProperties:r.default,importProperties:i.default}},"./conditional-coloring.js":
519
+ "./color-chart/import-properties/index.js");t.default={exportProperties:n.default,importProperties:i.default}},"./conditional-coloring.js":
520
520
  /*!*********************************!*\
521
521
  !*** ./conditional-coloring.js ***!
522
522
  \*********************************/
523
523
  /*! exports provided: default */
524
- function(e,t,n){n.r(t);var r=n(
524
+ function(e,t,r){r.r(t);var n=r(
525
525
  /*! ./quarantine/quarantine-array-prop */
526
- "./quarantine/quarantine-array-prop.js"),i=n(
526
+ "./quarantine/quarantine-array-prop.js"),i=r(
527
527
  /*! ./quarantine/unquarantine-array-prop */
528
- "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="conditionalColoring",s="measures",u="qDef.conditionalColoring";t.default={quarantine:function(e){Object(r.default)({properties:e,arrayPath:o,quarantineName:a,arrayName:s,itemPath:u})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,itemPath:u,arrayName:s,quarantineName:a})}}},"./conditional-show.js":
528
+ "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="conditionalColoring",s="measures",l="qDef.conditionalColoring";t.default={quarantine:function(e){Object(n.default)({properties:e,arrayPath:o,quarantineName:a,arrayName:s,itemPath:l})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,itemPath:l,arrayName:s,quarantineName:a})}}},"./conditional-show.js":
529
529
  /*!*****************************!*\
530
530
  !*** ./conditional-show.js ***!
531
531
  \*****************************/
532
532
  /*! exports provided: default */
533
- function(e,t,n){n.r(t);var r=n(
533
+ function(e,t,r){r.r(t);var n=r(
534
534
  /*! ./quarantine/quarantine-array-prop */
535
- "./quarantine/quarantine-array-prop.js"),i=n(
535
+ "./quarantine/quarantine-array-prop.js"),i=r(
536
536
  /*! ./quarantine/unquarantine-array-prop */
537
- "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="measures",s="qHyperCubeDef.qDimensions",u="dimensions",l="qCalcCondition",c="conditionalShowHide";t.default={quarantine:function(e){Object(r.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(r.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:u,itemPath:l})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(i.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:u,itemPath:l})}}},"./export-format.js":
537
+ "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="measures",s="qHyperCubeDef.qDimensions",l="dimensions",u="qCalcCondition",c="conditionalShowHide";t.default={quarantine:function(e){Object(n.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:u}),Object(n.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:l,itemPath:u})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:u}),Object(i.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:l,itemPath:u})}}},"./export-format.js":
538
538
  /*!**************************!*\
539
539
  !*** ./export-format.js ***!
540
540
  \**************************/
541
541
  /*! exports provided: default */
542
- function(e,t,n){function r(){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}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/export-properties/helpers/add-dimensions.js":
542
+ function(e,t,r){function n(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/export-properties/helpers/add-dimensions.js":
543
543
  /*!***************************************************************!*\
544
544
  !*** ./hypercube/export-properties/helpers/add-dimensions.js ***!
545
545
  \***************************************************************/
546
546
  /*! exports provided: default */
547
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
547
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
548
548
  /*! ../../../utils */
549
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(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 o(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)?o(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 o(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 a(e){var t,n=e.exportFormat,o=e.qHyperCubeDef,a=n.data[0];(t=a.dimensions).push.apply(t,i(o.qDimensions));var s,u=r.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qDimensions");u&&(s=a.excludedDimensions).push.apply(s,i(u))}},"./hypercube/export-properties/helpers/add-measures.js":
549
+ "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(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 o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t,r=e.exportFormat,o=e.qHyperCubeDef,a=r.data[0];(t=a.dimensions).push.apply(t,i(o.qDimensions));var s,l=n.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=a.excludedDimensions).push.apply(s,i(l))}},"./hypercube/export-properties/helpers/add-measures.js":
550
550
  /*!*************************************************************!*\
551
551
  !*** ./hypercube/export-properties/helpers/add-measures.js ***!
552
552
  \*************************************************************/
553
553
  /*! exports provided: default */
554
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
554
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
555
555
  /*! ../../../utils */
556
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(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 o(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)?o(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 o(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 a(e){var t,n=e.exportFormat,o=e.qHyperCubeDef,a=n.data[0];(t=a.measures).push.apply(t,i(o.qMeasures));var s,u=r.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qMeasures");u&&(s=a.excludedMeasures).push.apply(s,i(u))}},"./hypercube/export-properties/helpers/copy-properties.js":
556
+ "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(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 o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t,r=e.exportFormat,o=e.qHyperCubeDef,a=r.data[0];(t=a.measures).push.apply(t,i(o.qMeasures));var s,l=n.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qMeasures");l&&(s=a.excludedMeasures).push.apply(s,i(l))}},"./hypercube/export-properties/helpers/copy-properties.js":
557
557
  /*!****************************************************************!*\
558
558
  !*** ./hypercube/export-properties/helpers/copy-properties.js ***!
559
559
  \****************************************************************/
560
560
  /*! exports provided: default */
561
- function(e,t,n){function r(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/export-properties/helpers/index.js":
561
+ function(e,t,r){function n(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/export-properties/helpers/index.js":
562
562
  /*!******************************************************!*\
563
563
  !*** ./hypercube/export-properties/helpers/index.js ***!
564
564
  \******************************************************/
565
565
  /*! exports provided: default */
566
- function(e,t,n){n.r(t);var r=n(
566
+ function(e,t,r){r.r(t);var n=r(
567
567
  /*! ./add-dimensions */
568
- "./hypercube/export-properties/helpers/add-dimensions.js"),i=n(
568
+ "./hypercube/export-properties/helpers/add-dimensions.js"),i=r(
569
569
  /*! ./add-measures */
570
- "./hypercube/export-properties/helpers/add-measures.js"),o=n(
570
+ "./hypercube/export-properties/helpers/add-measures.js"),o=r(
571
571
  /*! ./set-inter-column-sort-order */
572
- "./hypercube/export-properties/helpers/set-inter-column-sort-order.js"),a=n(
572
+ "./hypercube/export-properties/helpers/set-inter-column-sort-order.js"),a=r(
573
573
  /*! ./copy-properties */
574
- "./hypercube/export-properties/helpers/copy-properties.js"),s=n(
574
+ "./hypercube/export-properties/helpers/copy-properties.js"),s=r(
575
575
  /*! ./update-layout-exclude */
576
- "./hypercube/export-properties/helpers/update-layout-exclude.js"),u=n(
576
+ "./hypercube/export-properties/helpers/update-layout-exclude.js"),l=r(
577
577
  /*! ./store-measures-modifiers */
578
- "./hypercube/export-properties/helpers/store-measures-modifiers.js");t.default={addDimensions:r.default,addMeasures:i.default,setInterColumnSortOrder:o.default,copyProperties:a.default,updateLayoutExclude:s.default,storeMeasuresModifiers:u.default}},"./hypercube/export-properties/helpers/restore-changed-properties.js":
578
+ "./hypercube/export-properties/helpers/store-measures-modifiers.js");t.default={addDimensions:n.default,addMeasures:i.default,setInterColumnSortOrder:o.default,copyProperties:a.default,updateLayoutExclude:s.default,storeMeasuresModifiers:l.default}},"./hypercube/export-properties/helpers/restore-changed-properties.js":
579
579
  /*!***************************************************************************!*\
580
580
  !*** ./hypercube/export-properties/helpers/restore-changed-properties.js ***!
581
581
  \***************************************************************************/
582
582
  /*! exports provided: default */
583
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
583
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
584
584
  /*! ../../../utils */
585
- "./utils/index.js");function i(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===r.default.getValue(e,t)&&r.default.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}},"./hypercube/export-properties/helpers/set-inter-column-sort-order.js":
585
+ "./utils/index.js");function i(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===n.default.getValue(e,t)&&n.default.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}},"./hypercube/export-properties/helpers/set-inter-column-sort-order.js":
586
586
  /*!****************************************************************************!*\
587
587
  !*** ./hypercube/export-properties/helpers/set-inter-column-sort-order.js ***!
588
588
  \****************************************************************************/
589
589
  /*! exports provided: default */
590
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
590
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
591
591
  /*! ../../../utils */
592
- "./utils/index.js"),i=n(
592
+ "./utils/index.js"),i=r(
593
593
  /*! ../../../utils/array-util */
594
- "./utils/array-util.js");function o(e){var t=e.exportFormat,n=e.qHyperCubeDef,o=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),o.interColumnSortOrder=n.qInterColumnSortOrder.concat();var a=r.default.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");a&&i.default.isOrderedSubset(a,o.interColumnSortOrder)&&(o.interColumnSortOrder=a.concat())}},"./hypercube/export-properties/helpers/store-measures-modifiers.js":
594
+ "./utils/array-util.js");function o(e){var t=e.exportFormat,r=e.qHyperCubeDef,o=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),o.interColumnSortOrder=r.qInterColumnSortOrder.concat();var a=n.default.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");a&&i.default.isOrderedSubset(a,o.interColumnSortOrder)&&(o.interColumnSortOrder=a.concat())}},"./hypercube/export-properties/helpers/store-measures-modifiers.js":
595
595
  /*!*************************************************************************!*\
596
596
  !*** ./hypercube/export-properties/helpers/store-measures-modifiers.js ***!
597
597
  \*************************************************************************/
598
598
  /*! exports provided: default */
599
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
599
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
600
600
  /*! qlik-modifiers */
601
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=n.n(r);function o(e){e.forEach((function(e){i.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}},"./hypercube/export-properties/helpers/update-layout-exclude.js":
601
+ "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e){e.forEach((function(e){i.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}},"./hypercube/export-properties/helpers/update-layout-exclude.js":
602
602
  /*!**********************************************************************!*\
603
603
  !*** ./hypercube/export-properties/helpers/update-layout-exclude.js ***!
604
604
  \**********************************************************************/
605
605
  /*! exports provided: default */
606
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
606
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
607
607
  /*! ../../../utils */
608
- "./utils/index.js"),i=n(
608
+ "./utils/index.js"),i=r(
609
609
  /*! ./restore-changed-properties */
610
- "./hypercube/export-properties/helpers/restore-changed-properties.js");function o(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&&(Object(i.default)(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!r.default.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude}},"./hypercube/export-properties/index.js":
610
+ "./hypercube/export-properties/helpers/restore-changed-properties.js");function o(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(Object(i.default)(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!n.default.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude}},"./hypercube/export-properties/index.js":
611
611
  /*!**********************************************!*\
612
612
  !*** ./hypercube/export-properties/index.js ***!
613
613
  \**********************************************/
614
614
  /*! exports provided: default */
615
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
615
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
616
616
  /*! ../../export-format */
617
- "./export-format.js"),i=n(
617
+ "./export-format.js"),i=r(
618
618
  /*! ../../utils */
619
- "./utils/index.js"),o=n(
619
+ "./utils/index.js"),o=r(
620
620
  /*! ./helpers */
621
- "./hypercube/export-properties/helpers/index.js");function a(e){var t=e.propertyTree,n=e.hypercubePath,a=e.viewDataMode,s=Object(r.default)(),u=t.qProperty,l=i.default.getValue(u,n||""),c=l.qHyperCubeDef;return c.qInterColumnSortOrder||(c.qInterColumnSortOrder=[]),o.default.addDimensions({exportFormat:s,qHyperCubeDef:c}),o.default.addMeasures({exportFormat:s,qHyperCubeDef:c}),o.default.setInterColumnSortOrder({exportFormat:s,qHyperCubeDef:c}),delete c.qLayoutExclude,o.default.copyProperties({exportFormat:s,properties:u}),n&&(s.properties.qHyperCubeDef=c,delete l.qHyperCubeDef),o.default.updateLayoutExclude({exportFormat:s,properties:u}),a||o.default.storeMeasuresModifiers(s.properties.qHyperCubeDef.qMeasures),s}},"./hypercube/import-properties/helpers/add-dimensions.js":
621
+ "./hypercube/export-properties/helpers/index.js");function a(e){var t=e.propertyTree,r=e.hypercubePath,a=e.viewDataMode,s=Object(n.default)(),l=t.qProperty,u=i.default.getValue(l,r||""),c=u.qHyperCubeDef;return c.qInterColumnSortOrder||(c.qInterColumnSortOrder=[]),o.default.addDimensions({exportFormat:s,qHyperCubeDef:c}),o.default.addMeasures({exportFormat:s,qHyperCubeDef:c}),o.default.setInterColumnSortOrder({exportFormat:s,qHyperCubeDef:c}),delete c.qLayoutExclude,o.default.copyProperties({exportFormat:s,properties:l}),r&&(s.properties.qHyperCubeDef=c,delete u.qHyperCubeDef),o.default.updateLayoutExclude({exportFormat:s,properties:l}),a||o.default.storeMeasuresModifiers(s.properties.qHyperCubeDef.qMeasures),s}},"./hypercube/import-properties/helpers/add-dimensions.js":
622
622
  /*!***************************************************************!*\
623
623
  !*** ./hypercube/import-properties/helpers/add-dimensions.js ***!
624
624
  \***************************************************************/
625
625
  /*! exports provided: default */
626
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
626
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
627
627
  /*! ./create-dimension */
628
- "./hypercube/import-properties/helpers/create-dimension.js");function i(e){var t,n=e.exportFormat,i=e.maxDimensions,o=e.minDimensions,a=e.newHyperCubeDef,s=e.defaultDimension,u=n.data[0];for(t=0;t<u.dimensions.length;++t){var l=Object(r.default)(u.dimensions[t],s);a.qDimensions.length<i?a.qDimensions.push(l):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<u.excludedDimensions.length;++t){var c=Object(r.default)(u.excludedDimensions[t],s);a.qDimensions.length<o?a.qDimensions.push(c):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}}},"./hypercube/import-properties/helpers/add-measures.js":
628
+ "./hypercube/import-properties/helpers/create-dimension.js");function i(e){var t,r=e.exportFormat,i=e.maxDimensions,o=e.minDimensions,a=e.newHyperCubeDef,s=e.defaultDimension,l=r.data[0];for(t=0;t<l.dimensions.length;++t){var u=Object(n.default)(l.dimensions[t],s);a.qDimensions.length<i?a.qDimensions.push(u):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}for(t=0;t<l.excludedDimensions.length;++t){var c=Object(n.default)(l.excludedDimensions[t],s);a.qDimensions.length<o?a.qDimensions.push(c):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}}},"./hypercube/import-properties/helpers/add-measures.js":
629
629
  /*!*************************************************************!*\
630
630
  !*** ./hypercube/import-properties/helpers/add-measures.js ***!
631
631
  \*************************************************************/
632
632
  /*! exports provided: default */
633
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
633
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
634
634
  /*! ./create-measure */
635
- "./hypercube/import-properties/helpers/create-measure.js");function i(e){var t,n=e.exportFormat,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=e.defaultMeasure,u=n.data[0];for(t=0;t<u.measures.length;++t){var l=Object(r.default)(u.measures[t],s);a.qMeasures.length<i?a.qMeasures.push(l):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<u.excludedMeasures.length;++t){var c=Object(r.default)(u.excludedMeasures[t],s);a.qMeasures.length<o?a.qMeasures.push(c):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}}},"./hypercube/import-properties/helpers/copy-property-if-exist.js":
635
+ "./hypercube/import-properties/helpers/create-measure.js");function i(e){var t,r=e.exportFormat,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=e.defaultMeasure,l=r.data[0];for(t=0;t<l.measures.length;++t){var u=Object(n.default)(l.measures[t],s);a.qMeasures.length<i?a.qMeasures.push(u):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}for(t=0;t<l.excludedMeasures.length;++t){var c=Object(n.default)(l.excludedMeasures[t],s);a.qMeasures.length<o?a.qMeasures.push(c):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}}},"./hypercube/import-properties/helpers/copy-property-if-exist.js":
636
636
  /*!***********************************************************************!*\
637
637
  !*** ./hypercube/import-properties/helpers/copy-property-if-exist.js ***!
638
638
  \***********************************************************************/
639
639
  /*! exports provided: default */
640
- function(e,t,n){function r(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/copy-property-or-set-default.js":
640
+ function(e,t,r){function n(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/copy-property-or-set-default.js":
641
641
  /*!*****************************************************************************!*\
642
642
  !*** ./hypercube/import-properties/helpers/copy-property-or-set-default.js ***!
643
643
  \*****************************************************************************/
644
644
  /*! exports provided: default */
645
- function(e,t,n){function r(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/create-dimension.js":
645
+ function(e,t,r){function n(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/create-dimension.js":
646
646
  /*!*****************************************************************!*\
647
647
  !*** ./hypercube/import-properties/helpers/create-dimension.js ***!
648
648
  \*****************************************************************/
649
649
  /*! exports provided: default */
650
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
650
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
651
651
  /*! extend */
652
- "../node_modules/extend/index.js"),i=n.n(r),o=n(
652
+ "../node_modules/extend/index.js"),i=r.n(n),o=r(
653
653
  /*! ../../../utils */
654
- "./utils/index.js"),a=n(
654
+ "./utils/index.js"),a=r(
655
655
  /*! ./get-others-label */
656
- "./hypercube/import-properties/helpers/get-others-label.js");function s(e,t){var n=i()(!0,{},t,e);return o.default.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.default.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.default.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.default.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel=Object(a.default)()),n}},"./hypercube/import-properties/helpers/create-measure.js":
656
+ "./hypercube/import-properties/helpers/get-others-label.js");function s(e,t){var r=i()(!0,{},t,e);return o.default.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.default.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.default.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.default.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel=Object(a.default)()),r}},"./hypercube/import-properties/helpers/create-measure.js":
657
657
  /*!***************************************************************!*\
658
658
  !*** ./hypercube/import-properties/helpers/create-measure.js ***!
659
659
  \***************************************************************/
660
660
  /*! exports provided: default */
661
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
661
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
662
662
  /*! extend */
663
- "../node_modules/extend/index.js"),i=n.n(r);function o(e,t){return i()(!0,{},t,e)}},"./hypercube/import-properties/helpers/create-new-properties.js":
663
+ "../node_modules/extend/index.js"),i=r.n(n);function o(e,t){return i()(!0,{},t,e)}},"./hypercube/import-properties/helpers/create-new-properties.js":
664
664
  /*!**********************************************************************!*\
665
665
  !*** ./hypercube/import-properties/helpers/create-new-properties.js ***!
666
666
  \**********************************************************************/
667
667
  /*! exports provided: default */
668
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
668
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
669
669
  /*! extend */
670
- "../node_modules/extend/index.js"),i=n.n(r),o=n(
670
+ "../node_modules/extend/index.js"),i=r.n(n),o=r(
671
671
  /*! ../../../utils */
672
- "./utils/index.js"),a=n(
672
+ "./utils/index.js"),a=r(
673
673
  /*! ./is-master-item-property */
674
- "./hypercube/import-properties/helpers/is-master-item-property.js");function s(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,s={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(s.qLayoutExclude.quarantine=i()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.default.setValue(s,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Object(a.default)(e)?s[e]=t.properties[e]:s.qLayoutExclude.disabled[e]=t.properties[e]})),null===(s=i()(!0,{},n,s)).components&&(s.components=[]),s}},"./hypercube/import-properties/helpers/get-default-dimension.js":
674
+ "./hypercube/import-properties/helpers/is-master-item-property.js");function s(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,s={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(s.qLayoutExclude.quarantine=i()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?o.default.setValue(s,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||Object(a.default)(e)?s[e]=t.properties[e]:s.qLayoutExclude.disabled[e]=t.properties[e]})),null===(s=i()(!0,{},r,s)).components&&(s.components=[]),s}},"./hypercube/import-properties/helpers/get-default-dimension.js":
675
675
  /*!**********************************************************************!*\
676
676
  !*** ./hypercube/import-properties/helpers/get-default-dimension.js ***!
677
677
  \**********************************************************************/
678
678
  /*! exports provided: default */
679
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
679
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
680
680
  /*! ./get-others-label */
681
- "./hypercube/import-properties/helpers/get-others-label.js");function i(){return{qDef:{autoSort:!0,cId:"",othersLabel:Object(r.default)()},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}}},"./hypercube/import-properties/helpers/get-default-measure.js":
681
+ "./hypercube/import-properties/helpers/get-others-label.js");function i(){return{qDef:{autoSort:!0,cId:"",othersLabel:Object(n.default)()},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}}},"./hypercube/import-properties/helpers/get-default-measure.js":
682
682
  /*!********************************************************************!*\
683
683
  !*** ./hypercube/import-properties/helpers/get-default-measure.js ***!
684
684
  \********************************************************************/
685
685
  /*! exports provided: default */
686
- function(e,t,n){function r(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/get-max-min-dimension-measure.js":
686
+ function(e,t,r){function n(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/get-max-min-dimension-measure.js":
687
687
  /*!******************************************************************************!*\
688
688
  !*** ./hypercube/import-properties/helpers/get-max-min-dimension-measure.js ***!
689
689
  \******************************************************************************/
690
690
  /*! exports provided: default */
691
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
691
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
692
692
  /*! ./resolve-value */
693
- "./hypercube/import-properties/helpers/resolve-value.js"),i=Math.pow(2,53)-1;function o(e){var t=e.exportFormat,n=e.dataDefinition,o=void 0===n?{}:n,a=t.data[0],s=o.dimensions||{max:0},u=o.measures||{max:0},l=Object(r.default)(u.max,a.dimensions.length,i),c=Object(r.default)(u.min,a.dimensions.length,0);return{maxDimensions:Object(r.default)(s.max,l,i),minDimensions:Object(r.default)(s.min,c,0),maxMeasures:l,minMeasures:c}}},"./hypercube/import-properties/helpers/get-others-label.js":
693
+ "./hypercube/import-properties/helpers/resolve-value.js"),i=Math.pow(2,53)-1;function o(e){var t=e.exportFormat,r=e.dataDefinition,o=void 0===r?{}:r,a=t.data[0],s=o.dimensions||{max:0},l=o.measures||{max:0},u=Object(n.default)(l.max,a.dimensions.length,i),c=Object(n.default)(l.min,a.dimensions.length,0);return{maxDimensions:Object(n.default)(s.max,u,i),minDimensions:Object(n.default)(s.min,c,0),maxMeasures:u,minMeasures:c}}},"./hypercube/import-properties/helpers/get-others-label.js":
694
694
  /*!*****************************************************************!*\
695
695
  !*** ./hypercube/import-properties/helpers/get-others-label.js ***!
696
696
  \*****************************************************************/
697
697
  /*! exports provided: default */
698
- function(e,t,n){function r(){return"Others"}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/import-common-properties.js":
698
+ function(e,t,r){function n(){return"Others"}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/import-common-properties.js":
699
699
  /*!*************************************************************************!*\
700
700
  !*** ./hypercube/import-properties/helpers/import-common-properties.js ***!
701
701
  \*************************************************************************/
702
702
  /*! exports provided: default */
703
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
703
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
704
704
  /*! ../../../utils */
705
- "./utils/index.js");function i(e,t,n){var i="masterobject"===r.default.getValue(t,"properties.qInfo.qType")?"masterobject":r.default.getValue(n,"qInfo.qType");r.default.setValue(e,"qInfo.qType",i),e.visualization=n.visualization}},"./hypercube/import-properties/helpers/index.js":
705
+ "./utils/index.js");function i(e,t,r){var i="masterobject"===n.default.getValue(t,"properties.qInfo.qType")?"masterobject":n.default.getValue(r,"qInfo.qType");n.default.setValue(e,"qInfo.qType",i),e.visualization=r.visualization}},"./hypercube/import-properties/helpers/index.js":
706
706
  /*!******************************************************!*\
707
707
  !*** ./hypercube/import-properties/helpers/index.js ***!
708
708
  \******************************************************/
709
709
  /*! exports provided: default */
710
- function(e,t,n){n.r(t);var r=n(
710
+ function(e,t,r){r.r(t);var n=r(
711
711
  /*! ./import-common-properties */
712
- "./hypercube/import-properties/helpers/import-common-properties.js"),i=n(
712
+ "./hypercube/import-properties/helpers/import-common-properties.js"),i=r(
713
713
  /*! ./copy-property-if-exist */
714
- "./hypercube/import-properties/helpers/copy-property-if-exist.js"),o=n(
714
+ "./hypercube/import-properties/helpers/copy-property-if-exist.js"),o=r(
715
715
  /*! ./copy-property-or-set-default */
716
- "./hypercube/import-properties/helpers/copy-property-or-set-default.js"),a=n(
716
+ "./hypercube/import-properties/helpers/copy-property-or-set-default.js"),a=r(
717
717
  /*! ./get-default-dimension */
718
- "./hypercube/import-properties/helpers/get-default-dimension.js"),s=n(
718
+ "./hypercube/import-properties/helpers/get-default-dimension.js"),s=r(
719
719
  /*! ./get-default-measure */
720
- "./hypercube/import-properties/helpers/get-default-measure.js"),u=n(
720
+ "./hypercube/import-properties/helpers/get-default-measure.js"),l=r(
721
721
  /*! ./add-dimensions */
722
- "./hypercube/import-properties/helpers/add-dimensions.js"),l=n(
722
+ "./hypercube/import-properties/helpers/add-dimensions.js"),u=r(
723
723
  /*! ./add-measures */
724
- "./hypercube/import-properties/helpers/add-measures.js"),c=n(
724
+ "./hypercube/import-properties/helpers/add-measures.js"),c=r(
725
725
  /*! ./get-max-min-dimension-measure */
726
- "./hypercube/import-properties/helpers/get-max-min-dimension-measure.js"),f=n(
726
+ "./hypercube/import-properties/helpers/get-max-min-dimension-measure.js"),d=r(
727
727
  /*! ./set-inter-column-sort-order */
728
- "./hypercube/import-properties/helpers/set-inter-column-sort-order.js"),d=n(
728
+ "./hypercube/import-properties/helpers/set-inter-column-sort-order.js"),m=r(
729
729
  /*! ./create-new-properties */
730
- "./hypercube/import-properties/helpers/create-new-properties.js"),m=n(
730
+ "./hypercube/import-properties/helpers/create-new-properties.js"),f=r(
731
731
  /*! ./should-init-layout-exclude */
732
- "./hypercube/import-properties/helpers/should-init-layout-exclude.js"),p=n(
732
+ "./hypercube/import-properties/helpers/should-init-layout-exclude.js"),p=r(
733
733
  /*! ./init-layout-exclude */
734
- "./hypercube/import-properties/helpers/init-layout-exclude.js"),h=n(
734
+ "./hypercube/import-properties/helpers/init-layout-exclude.js"),h=r(
735
735
  /*! ./update-dimensions-on-added */
736
- "./hypercube/import-properties/helpers/update-dimensions-on-added.js"),v=n(
736
+ "./hypercube/import-properties/helpers/update-dimensions-on-added.js"),y=r(
737
737
  /*! ./update-measures-on-added */
738
- "./hypercube/import-properties/helpers/update-measures-on-added.js");t.default={importCommonProperties:r.default,copyPropertyIfExist:i.default,copyPropertyOrSetDefault:o.default,getDefaultDimension:a.default,getDefaultMeasure:s.default,addDimensions:u.default,addMeasures:l.default,getMaxMinDimensionMeasure:c.default,setInterColumnSortOrder:f.default,createNewProperties:d.default,shouldInitLayoutExclude:m.default,initLayoutExclude:p.default,updateDimensionsOnAdded:h.default,updateMeasuresOnAdded:v.default}},"./hypercube/import-properties/helpers/init-layout-exclude.js":
738
+ "./hypercube/import-properties/helpers/update-measures-on-added.js");t.default={importCommonProperties:n.default,copyPropertyIfExist:i.default,copyPropertyOrSetDefault:o.default,getDefaultDimension:a.default,getDefaultMeasure:s.default,addDimensions:l.default,addMeasures:u.default,getMaxMinDimensionMeasure:c.default,setInterColumnSortOrder:d.default,createNewProperties:m.default,shouldInitLayoutExclude:f.default,initLayoutExclude:p.default,updateDimensionsOnAdded:h.default,updateMeasuresOnAdded:y.default}},"./hypercube/import-properties/helpers/init-layout-exclude.js":
739
739
  /*!********************************************************************!*\
740
740
  !*** ./hypercube/import-properties/helpers/init-layout-exclude.js ***!
741
741
  \********************************************************************/
742
742
  /*! exports provided: default */
743
- function(e,t,n){function r(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=[]))}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/is-master-item-property.js":
743
+ function(e,t,r){function n(e){var t=e.exportFormat,r=e.maxDimensions,n=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>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(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=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/is-master-item-property.js":
744
744
  /*!************************************************************************!*\
745
745
  !*** ./hypercube/import-properties/helpers/is-master-item-property.js ***!
746
746
  \************************************************************************/
747
747
  /*! exports provided: default */
748
- function(e,t,n){function r(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/resolve-value.js":
748
+ function(e,t,r){function n(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/resolve-value.js":
749
749
  /*!**************************************************************!*\
750
750
  !*** ./hypercube/import-properties/helpers/resolve-value.js ***!
751
751
  \**************************************************************/
752
752
  /*! exports provided: default */
753
- function(e,t,n){function r(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/set-inter-column-sort-order.js":
753
+ function(e,t,r){function n(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/set-inter-column-sort-order.js":
754
754
  /*!****************************************************************************!*\
755
755
  !*** ./hypercube/import-properties/helpers/set-inter-column-sort-order.js ***!
756
756
  \****************************************************************************/
757
757
  /*! exports provided: default */
758
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
758
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
759
759
  /*! ../../../utils/array-util */
760
- "./utils/array-util.js");function i(e){var t=e.exportFormat,n=e.newHyperCubeDef,i=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=i.interColumnSortOrder.concat();var a=n.qInterColumnSortOrder.length;if(a!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=i.interColumnSortOrder.concat());a!==o;)a<o?(r.default.indexAdded(n.qInterColumnSortOrder,a),++a):(--a,r.default.indexRemoved(n.qInterColumnSortOrder,a))}},"./hypercube/import-properties/helpers/should-init-layout-exclude.js":
760
+ "./utils/array-util.js");function i(e){var t=e.exportFormat,r=e.newHyperCubeDef,i=t.data[0],o=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=i.interColumnSortOrder.concat();var a=r.qInterColumnSortOrder.length;if(a!==o)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=i.interColumnSortOrder.concat());a!==o;)a<o?(n.default.indexAdded(r.qInterColumnSortOrder,a),++a):(--a,n.default.indexRemoved(r.qInterColumnSortOrder,a))}},"./hypercube/import-properties/helpers/should-init-layout-exclude.js":
761
761
  /*!***************************************************************************!*\
762
762
  !*** ./hypercube/import-properties/helpers/should-init-layout-exclude.js ***!
763
763
  \***************************************************************************/
764
764
  /*! exports provided: default */
765
- function(e,t,n){function r(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}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/update-dimensions-on-added.js":
765
+ function(e,t,r){function n(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!r&&a.dimensions.length>0}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/update-dimensions-on-added.js":
766
766
  /*!***************************************************************************!*\
767
767
  !*** ./hypercube/import-properties/helpers/update-dimensions-on-added.js ***!
768
768
  \***************************************************************************/
769
769
  /*! exports provided: default */
770
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
770
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
771
771
  /*! ../../../utils */
772
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(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 o(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)?o(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 o(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 a(e){var t=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=r.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qDimensions);a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),n.dimensions.added(e,t)}))}}},"./hypercube/import-properties/helpers/update-measures-on-added.js":
772
+ "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(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 o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=n.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qDimensions);a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),r.dimensions.added(e,t)}))}}},"./hypercube/import-properties/helpers/update-measures-on-added.js":
773
773
  /*!*************************************************************************!*\
774
774
  !*** ./hypercube/import-properties/helpers/update-measures-on-added.js ***!
775
775
  \*************************************************************************/
776
776
  /*! exports provided: default */
777
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
777
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
778
778
  /*! ../../../utils */
779
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(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 o(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)?o(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 o(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 a(e){var t=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=r.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qMeasures);a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),n.measures.added(e,t)}))}}},"./hypercube/import-properties/index.js":
779
+ "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(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 o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=n.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qMeasures);a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),r.measures.added(e,t)}))}}},"./hypercube/import-properties/index.js":
780
780
  /*!**********************************************!*\
781
781
  !*** ./hypercube/import-properties/index.js ***!
782
782
  \**********************************************/
783
783
  /*! exports provided: default */
784
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
784
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
785
785
  /*! ../../utils */
786
- "./utils/index.js"),i=n(
786
+ "./utils/index.js"),i=r(
787
787
  /*! ./helpers */
788
- "./hypercube/import-properties/helpers/index.js");function o(e){var t=e.exportFormat,n=e.initialProperties,o=void 0===n?{}:n,a=e.dataDefinition,s=void 0===a?{}:a,u=e.defaultPropertyValues,l=void 0===u?{}:u,c=e.hypercubePath,f={qChildren:[]},d=i.default.createNewProperties({exportFormat:t,initialProperties:o,hypercubePath:c}),m=r.default.getValue(o,c||"").qHyperCubeDef,p=r.default.getValue(d,c||"").qHyperCubeDef,h=i.default.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:s}),v=h.maxDimensions,y=h.minDimensions,g=h.maxMeasures,b=h.minMeasures,x=l.defaultDimension,M=void 0===x?i.default.getDefaultDimension():x,S=l.defaultMeasure,E=void 0===S?i.default.getDefaultMeasure():S;return p.qDimensions.length=0,p.qMeasures.length=0,i.default.shouldInitLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:y,maxMeasures:g,minMeasures:b})&&i.default.initLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:y,maxMeasures:g,minMeasures:b,newHyperCubeDef:p}),i.default.addDimensions({exportFormat:t,maxDimensions:v,minDimensions:y,newHyperCubeDef:p,defaultDimension:M}),i.default.addMeasures({exportFormat:t,maxMeasures:g,minMeasures:b,newHyperCubeDef:p,defaultMeasure:E}),i.default.updateDimensionsOnAdded({newProperties:d,dataDefinition:s,hypercubePath:c}),i.default.updateMeasuresOnAdded({newProperties:d,dataDefinition:s,hypercubePath:c}),i.default.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:p}),i.default.copyPropertyIfExist("qMaxStackedCells",m,p),i.default.copyPropertyIfExist("qNoOfLeftDims",m,p),i.default.copyPropertyOrSetDefault("qInitialDataFetch",m,p,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),i.default.copyPropertyOrSetDefault("qMode",m,p,"S"),i.default.copyPropertyOrSetDefault("qReductionMode",m,p,"N"),i.default.copyPropertyOrSetDefault("qSortbyYValue",m,p),i.default.copyPropertyOrSetDefault("qIndentMode",m,p),i.default.copyPropertyOrSetDefault("qShowTotalsAbove",m,p),i.default.importCommonProperties(d,t,o),f.qProperty=d,f}},"./hypercube/index.js":
788
+ "./hypercube/import-properties/helpers/index.js");function o(e){var t=e.exportFormat,r=e.initialProperties,o=void 0===r?{}:r,a=e.dataDefinition,s=void 0===a?{}:a,l=e.defaultPropertyValues,u=void 0===l?{}:l,c=e.hypercubePath,d={qChildren:[]},m=i.default.createNewProperties({exportFormat:t,initialProperties:o,hypercubePath:c}),f=n.default.getValue(o,c||"").qHyperCubeDef,p=n.default.getValue(m,c||"").qHyperCubeDef,h=i.default.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:s}),y=h.maxDimensions,g=h.minDimensions,v=h.maxMeasures,b=h.minMeasures,x=u.defaultDimension,M=void 0===x?i.default.getDefaultDimension():x,S=u.defaultMeasure,E=void 0===S?i.default.getDefaultMeasure():S;return p.qDimensions.length=0,p.qMeasures.length=0,i.default.shouldInitLayoutExclude({exportFormat:t,maxDimensions:y,minDimensions:g,maxMeasures:v,minMeasures:b})&&i.default.initLayoutExclude({exportFormat:t,maxDimensions:y,minDimensions:g,maxMeasures:v,minMeasures:b,newHyperCubeDef:p}),i.default.addDimensions({exportFormat:t,maxDimensions:y,minDimensions:g,newHyperCubeDef:p,defaultDimension:M}),i.default.addMeasures({exportFormat:t,maxMeasures:v,minMeasures:b,newHyperCubeDef:p,defaultMeasure:E}),i.default.updateDimensionsOnAdded({newProperties:m,dataDefinition:s,hypercubePath:c}),i.default.updateMeasuresOnAdded({newProperties:m,dataDefinition:s,hypercubePath:c}),i.default.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:p}),i.default.copyPropertyIfExist("qMaxStackedCells",f,p),i.default.copyPropertyIfExist("qNoOfLeftDims",f,p),i.default.copyPropertyOrSetDefault("qInitialDataFetch",f,p,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),i.default.copyPropertyOrSetDefault("qMode",f,p,"S"),i.default.copyPropertyOrSetDefault("qReductionMode",f,p,"N"),i.default.copyPropertyOrSetDefault("qSortbyYValue",f,p),i.default.copyPropertyOrSetDefault("qIndentMode",f,p),i.default.copyPropertyOrSetDefault("qShowTotalsAbove",f,p),i.default.importCommonProperties(m,t,o),d.qProperty=m,d}},"./hypercube/index.js":
789
789
  /*!****************************!*\
790
790
  !*** ./hypercube/index.js ***!
791
791
  \****************************/
792
792
  /*! exports provided: default */
793
- function(e,t,n){n.r(t);var r=n(
793
+ function(e,t,r){r.r(t);var n=r(
794
794
  /*! ./export-properties */
795
- "./hypercube/export-properties/index.js"),i=n(
795
+ "./hypercube/export-properties/index.js"),i=r(
796
796
  /*! ./import-properties */
797
- "./hypercube/import-properties/index.js");t.default={exportProperties:r.default,importProperties:i.default}},"./index.js":
797
+ "./hypercube/import-properties/index.js");t.default={exportProperties:n.default,importProperties:i.default}},"./index.js":
798
798
  /*!******************!*\
799
799
  !*** ./index.js ***!
800
800
  \******************/
801
801
  /*! exports provided: default */
802
- function(e,t,n){n.r(t);var r=n(
802
+ function(e,t,r){r.r(t);var n=r(
803
803
  /*! ./hypercube */
804
- "./hypercube/index.js"),i=n(
804
+ "./hypercube/index.js"),i=r(
805
805
  /*! ./color-chart */
806
- "./color-chart/index.js"),o=n(
806
+ "./color-chart/index.js"),o=r(
807
807
  /*! ./axis-chart */
808
- "./axis-chart/index.js"),a=n(
808
+ "./axis-chart/index.js"),a=r(
809
809
  /*! ./quarantine/quarantine-property */
810
- "./quarantine/quarantine-property.js"),s=n(
810
+ "./quarantine/quarantine-property.js"),s=r(
811
811
  /*! ./quarantine/unquarantine-property */
812
- "./quarantine/unquarantine-property.js"),u=n(
812
+ "./quarantine/unquarantine-property.js"),l=r(
813
813
  /*! ./quarantine/quarantine-array-prop */
814
- "./quarantine/quarantine-array-prop.js"),l=n(
814
+ "./quarantine/quarantine-array-prop.js"),u=r(
815
815
  /*! ./quarantine/unquarantine-array-prop */
816
- "./quarantine/unquarantine-array-prop.js"),c=n(
816
+ "./quarantine/unquarantine-array-prop.js"),c=r(
817
817
  /*! ./conditional-coloring */
818
- "./conditional-coloring.js"),f=n(
818
+ "./conditional-coloring.js"),d=r(
819
819
  /*! ./conditional-show */
820
- "./conditional-show.js");t.default={hypercube:r.default,colorChart:i.default,axisChart:o.default,quarantineProperty:a.default,unquarantineProperty:s.default,quarantineArrayProp:u.default,unquarantineArrayProp:l.default,conditionalColoring:c.default,conditionalShow:f.default}},"./quarantine/get-quarantine-path.js":
820
+ "./conditional-show.js");t.default={hypercube:n.default,colorChart:i.default,axisChart:o.default,quarantineProperty:a.default,unquarantineProperty:s.default,quarantineArrayProp:l.default,unquarantineArrayProp:u.default,conditionalColoring:c.default,conditionalShow:d.default}},"./quarantine/get-quarantine-path.js":
821
821
  /*!*******************************************!*\
822
822
  !*** ./quarantine/get-quarantine-path.js ***!
823
823
  \*******************************************/
824
824
  /*! exports provided: default */
825
- function(e,t,n){function r(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}n.r(t),n.d(t,"default",(function(){return r}))},"./quarantine/quarantine-array-item.js":
825
+ function(e,t,r){function n(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}r.r(t),r.d(t,"default",(function(){return n}))},"./quarantine/quarantine-array-item.js":
826
826
  /*!*********************************************!*\
827
827
  !*** ./quarantine/quarantine-array-item.js ***!
828
828
  \*********************************************/
829
829
  /*! exports provided: default */
830
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
830
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
831
831
  /*! ../utils */
832
- "./utils/index.js"),i=n(
832
+ "./utils/index.js"),i=r(
833
833
  /*! ./get-quarantine-path */
834
- "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,n=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,u=r.default.getValue(a,s);if(void 0!==u){var l=r.default.getValue(a,"qDef.cId");l||(l=r.default.generateId(),r.default.setValue(a,"qDef.cId",l));var c=Object(i.default)(n,o,l);r.default.setValue(t,c,u),r.default.setValue(a,s,void 0)}}},"./quarantine/quarantine-array-prop.js":
834
+ "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,r=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,l=n.default.getValue(a,s);if(void 0!==l){var u=n.default.getValue(a,"qDef.cId");u||(u=n.default.generateId(),n.default.setValue(a,"qDef.cId",u));var c=Object(i.default)(r,o,u);n.default.setValue(t,c,l),n.default.setValue(a,s,void 0)}}},"./quarantine/quarantine-array-prop.js":
835
835
  /*!*********************************************!*\
836
836
  !*** ./quarantine/quarantine-array-prop.js ***!
837
837
  \*********************************************/
838
838
  /*! exports provided: default */
839
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
839
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
840
840
  /*! ../utils */
841
- "./utils/index.js"),i=n(
841
+ "./utils/index.js"),i=r(
842
842
  /*! ./quarantine-array-item */
843
- "./quarantine/quarantine-array-item.js");function o(e){var t=e.properties,n=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;r.default.getValue(t,n,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/quarantine-property.js":
843
+ "./quarantine/quarantine-array-item.js");function o(e){var t=e.properties,r=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;n.default.getValue(t,r,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/quarantine-property.js":
844
844
  /*!*******************************************!*\
845
845
  !*** ./quarantine/quarantine-property.js ***!
846
846
  \*******************************************/
847
847
  /*! exports provided: default */
848
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
848
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
849
849
  /*! ../utils */
850
- "./utils/index.js");function i(e,t,n){var i,o,a=r.default.getValue(e,t);if(!r.default.isAtomicValue(a))try{if((o=(o=(i=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(i)}catch(e){return}r.default.getValue(e,"qLayoutExclude.quarantine")||r.default.setValue(e,"qLayoutExclude.quarantine",{});var s=r.default.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}},"./quarantine/unquarantine-array-item.js":
850
+ "./utils/index.js");function i(e,t,r){var i,o,a=n.default.getValue(e,t);if(!n.default.isAtomicValue(a))try{if((o=(o=(i=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(i)}catch(e){return}n.default.getValue(e,"qLayoutExclude.quarantine")||n.default.setValue(e,"qLayoutExclude.quarantine",{});var s=n.default.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}},"./quarantine/unquarantine-array-item.js":
851
851
  /*!***********************************************!*\
852
852
  !*** ./quarantine/unquarantine-array-item.js ***!
853
853
  \***********************************************/
854
854
  /*! exports provided: default */
855
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
855
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
856
856
  /*! ../utils */
857
- "./utils/index.js"),i=n(
857
+ "./utils/index.js"),i=r(
858
858
  /*! ./get-quarantine-path */
859
- "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,n=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,u=r.default.getValue(a,"qDef.cId");if(u){var l=Object(i.default)(n,o,u),c=r.default.getValue(t,l);void 0!==c&&(r.default.setValue(a,s,c),r.default.setValue(t,l,void 0))}}},"./quarantine/unquarantine-array-prop.js":
859
+ "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,r=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,l=n.default.getValue(a,"qDef.cId");if(l){var u=Object(i.default)(r,o,l),c=n.default.getValue(t,u);void 0!==c&&(n.default.setValue(a,s,c),n.default.setValue(t,u,void 0))}}},"./quarantine/unquarantine-array-prop.js":
860
860
  /*!***********************************************!*\
861
861
  !*** ./quarantine/unquarantine-array-prop.js ***!
862
862
  \***********************************************/
863
863
  /*! exports provided: default */
864
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
864
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
865
865
  /*! ../utils */
866
- "./utils/index.js"),i=n(
866
+ "./utils/index.js"),i=r(
867
867
  /*! ./unquarantine-array-item */
868
- "./quarantine/unquarantine-array-item.js");function o(e){var t=e.properties,n=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;r.default.getValue(t,n,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/unquarantine-property.js":
868
+ "./quarantine/unquarantine-array-item.js");function o(e){var t=e.properties,r=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;n.default.getValue(t,r,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/unquarantine-property.js":
869
869
  /*!*********************************************!*\
870
870
  !*** ./quarantine/unquarantine-property.js ***!
871
871
  \*********************************************/
872
872
  /*! exports provided: default */
873
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
873
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
874
874
  /*! ../utils */
875
- "./utils/index.js");function i(e,t){var n=r.default.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){r.default.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}},"./utils/array-util.js":
875
+ "./utils/index.js");function i(e,t){var r=n.default.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){n.default.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}},"./utils/array-util.js":
876
876
  /*!*****************************!*\
877
877
  !*** ./utils/array-util.js ***!
878
878
  \*****************************/
879
879
  /*! exports provided: default */
880
- function(e,t,n){n.r(t);var r=n(
880
+ function(e,t,r){r.r(t);var n=r(
881
881
  /*! ./find-item-by-property-value */
882
- "./utils/find-item-by-property-value.js"),i=n(
882
+ "./utils/find-item-by-property-value.js"),i=r(
883
883
  /*! ./find-index-by-property-value */
884
- "./utils/find-index-by-property-value.js");t.default={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:r.default,findIndexByPropertyValue:i.default}},"./utils/attribute-expression-util/create.js":
884
+ "./utils/find-index-by-property-value.js");t.default={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var i=e.indexOf(t[n]);if(r>i)return!1;r=i}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:n.default,findIndexByPropertyValue:i.default}},"./utils/attribute-expression-util/create.js":
885
885
  /*!***************************************************!*\
886
886
  !*** ./utils/attribute-expression-util/create.js ***!
887
887
  \***************************************************/
888
888
  /*! exports provided: default */
889
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function i(e,t){if(!e||!r[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}},"./utils/attribute-expression-util/index.js":
889
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function i(e,t){if(!e||!n[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r}},"./utils/attribute-expression-util/index.js":
890
890
  /*!**************************************************!*\
891
891
  !*** ./utils/attribute-expression-util/index.js ***!
892
892
  \**************************************************/
893
893
  /*! exports provided: default */
894
- function(e,t,n){n.r(t);var r=n(
894
+ function(e,t,r){r.r(t);var n=r(
895
895
  /*! ./create */
896
- "./utils/attribute-expression-util/create.js"),i=n(
896
+ "./utils/attribute-expression-util/create.js"),i=r(
897
897
  /*! ./move-by-id-from-group */
898
- "./utils/attribute-expression-util/move-by-id-from-group.js");t.default={create:r.default,moveByIdFromGroup:i.default,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"}}},"./utils/attribute-expression-util/is-size-changed.js":
898
+ "./utils/attribute-expression-util/move-by-id-from-group.js");t.default={create:n.default,moveByIdFromGroup:i.default,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"}}},"./utils/attribute-expression-util/is-size-changed.js":
899
899
  /*!************************************************************!*\
900
900
  !*** ./utils/attribute-expression-util/is-size-changed.js ***!
901
901
  \************************************************************/
902
902
  /*! exports provided: default */
903
- function(e,t,n){function r(e,t){return e.length!==t}n.r(t),n.d(t,"default",(function(){return r}))},"./utils/attribute-expression-util/move-by-id-from-group.js":
903
+ function(e,t,r){function n(e,t){return e.length!==t}r.r(t),r.d(t,"default",(function(){return n}))},"./utils/attribute-expression-util/move-by-id-from-group.js":
904
904
  /*!******************************************************************!*\
905
905
  !*** ./utils/attribute-expression-util/move-by-id-from-group.js ***!
906
906
  \******************************************************************/
907
907
  /*! exports provided: default */
908
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
908
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
909
909
  /*! ./move-by-id */
910
- "./utils/attribute-expression-util/move-by-id.js"),i=n(
910
+ "./utils/attribute-expression-util/move-by-id.js"),i=r(
911
911
  /*! ./is-size-changed */
912
- "./utils/attribute-expression-util/is-size-changed.js");function o(e,t,n,o,a){n=n||"qAttributeExpressions",a=a||"id";for(var s=0;s<e.length;s++){var u=e[s][n],l=t.length;if(Object(r.default)(u,t,o,a),Object(i.default)(t,l))return t}return t}},"./utils/attribute-expression-util/move-by-id.js":
912
+ "./utils/attribute-expression-util/is-size-changed.js");function o(e,t,r,o,a){r=r||"qAttributeExpressions",a=a||"id";for(var s=0;s<e.length;s++){var l=e[s][r],u=t.length;if(Object(n.default)(l,t,o,a),Object(i.default)(t,u))return t}return t}},"./utils/attribute-expression-util/move-by-id.js":
913
913
  /*!*******************************************************!*\
914
914
  !*** ./utils/attribute-expression-util/move-by-id.js ***!
915
915
  \*******************************************************/
916
916
  /*! exports provided: default */
917
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
917
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
918
918
  /*! ../find-index-by-property-value */
919
- "./utils/find-index-by-property-value.js");function i(e,t,n,i){t=t||[];var o=Object(r.default)(e,i,n),a=Object(r.default)(t,i,n);if(-1!==o&&-1===a){var s=e.splice(o,1);t.push(s[0])}return t}},"./utils/find-index-by-property-value.js":
919
+ "./utils/find-index-by-property-value.js");function i(e,t,r,i){t=t||[];var o=Object(n.default)(e,i,r),a=Object(n.default)(t,i,r);if(-1!==o&&-1===a){var s=e.splice(o,1);t.push(s[0])}return t}},"./utils/find-index-by-property-value.js":
920
920
  /*!***********************************************!*\
921
921
  !*** ./utils/find-index-by-property-value.js ***!
922
922
  \***********************************************/
923
923
  /*! exports provided: default */
924
- function(e,t,n){function r(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}n.r(t),n.d(t,"default",(function(){return r}))},"./utils/find-item-by-property-value.js":
924
+ function(e,t,r){function n(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}r.r(t),r.d(t,"default",(function(){return n}))},"./utils/find-item-by-property-value.js":
925
925
  /*!**********************************************!*\
926
926
  !*** ./utils/find-item-by-property-value.js ***!
927
927
  \**********************************************/
928
928
  /*! exports provided: default */
929
- function(e,t,n){function r(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}n.r(t),n.d(t,"default",(function(){return r}))},"./utils/generate-id.js":
929
+ function(e,t,r){function n(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null}r.r(t),r.d(t,"default",(function(){return n}))},"./utils/generate-id.js":
930
930
  /*!******************************!*\
931
931
  !*** ./utils/generate-id.js ***!
932
932
  \******************************/
933
933
  /*! exports provided: default */
934
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
934
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
935
935
  /*! ./get-base62 */
936
- "./utils/get-base62.js");function i(){return Object(r.default)(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},"./utils/get-base62.js":
936
+ "./utils/get-base62.js");function i(){return Object(n.default)(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},"./utils/get-base62.js":
937
937
  /*!*****************************!*\
938
938
  !*** ./utils/get-base62.js ***!
939
939
  \*****************************/
940
940
  /*! exports provided: default */
941
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
941
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
942
942
  /*! ./get-char */
943
- "./utils/get-char.js");function i(e){var t=Object(r.default)(e%62),n=Math.floor(e/62);return n>0?i(n)+t:t}},"./utils/get-char.js":
943
+ "./utils/get-char.js");function i(e){var t=Object(n.default)(e%62),r=Math.floor(e/62);return r>0?i(r)+t:t}},"./utils/get-char.js":
944
944
  /*!***************************!*\
945
945
  !*** ./utils/get-char.js ***!
946
946
  \***************************/
947
947
  /*! exports provided: default */
948
- function(e,t,n){function r(e){var t,n=e;return n>9?(t=65+n-10)>90&&(t+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?r(n+1):String.fromCharCode(t)}n.r(t),n.d(t,"default",(function(){return r}))},"./utils/hypercube-util.js":
948
+ function(e,t,r){function n(e){var t,r=e;return r>9?(t=65+r-10)>90&&(t+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?n(r+1):String.fromCharCode(t)}r.r(t),r.d(t,"default",(function(){return n}))},"./utils/hypercube-util.js":
949
949
  /*!*********************************!*\
950
950
  !*** ./utils/hypercube-util.js ***!
951
951
  \*********************************/
952
952
  /*! exports provided: default */
953
- function(e,t,n){n.r(t);var r=n(
953
+ function(e,t,r){r.r(t);var n=r(
954
954
  /*! . */
955
- "./utils/index.js"),i=n(
955
+ "./utils/index.js"),i=r(
956
956
  /*! ./wrap-file-name */
957
- "./utils/wrap-file-name.js");t.default={getNumDimensions:function(e){return r.default.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return r.default.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:i.default,getItemLabel:function(e){return e.label||e.name}}},"./utils/index.js":
957
+ "./utils/wrap-file-name.js");t.default={getNumDimensions:function(e){return n.default.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return n.default.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:i.default,getItemLabel:function(e){return e.label||e.name}}},"./utils/index.js":
958
958
  /*!************************!*\
959
959
  !*** ./utils/index.js ***!
960
960
  \************************/
961
961
  /*! exports provided: default */
962
- function(e,t,n){n.r(t);var r=n(
962
+ function(e,t,r){r.r(t);var n=r(
963
963
  /*! ./generate-id */
964
- "./utils/generate-id.js");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)}t.default={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:r.default}},"./utils/number-format-util.js":
964
+ "./utils/generate-id.js");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)}t.default={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(""!==a){if(void 0===i[a]||null===i[a])return r;i=i[a]}}return i},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r: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:n.default}},"./utils/number-format-util.js":
965
965
  /*!*************************************!*\
966
966
  !*** ./utils/number-format-util.js ***!
967
967
  \*************************************/
968
968
  /*! exports provided: default */
969
- function(e,t,n){n.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}}},"./utils/wrap-file-name.js":
969
+ function(e,t,r){r.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}}},"./utils/wrap-file-name.js":
970
970
  /*!*********************************!*\
971
971
  !*** ./utils/wrap-file-name.js ***!
972
972
  \*********************************/
973
973
  /*! exports provided: default */
974
- function(e,t,n){function r(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}n.r(t),n.d(t,"default",(function(){return r}))}})}));var BE=ie(VE.exports),zE={version:"1.8.7",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}},YE=function(e){return function(t){var n,r=t.qHyperCubeDef.qMeasures,i=[0,0,0];if(!r.length)return e.get("Visualizations.Descriptions.Bars");for(var o=0;o<r.length;++o)(n=vp(r[o].qDef.series))===Ra.TYPE.BAR?i[0]=1:n===Ra.TYPE.LINE?i[1]=1:i[2]=1;var a=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(i.join(""),2)-1];return e.get(a)}},UE=function(e){return function(t,n){var r,i=t.qHyperCubeDef.qMeasures[n];if(i){var o=i.qDef.series.type;r=o===Ra.TYPE.LINE?"Visualizations.Descriptions.HeightLine":o===Ra.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)}};function WE(e){var t,n,r=e.qHyperCubeDef.qMeasures,i=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===i&&1===r.length&&vp(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===Ra.TYPE.LINE?e.color.mode="primary":"byDimension"===i&&r.length>1&&(e.color.mode="byMultiple")}function XE(e){var t=e.translator;return{dimensions:{min:1,max:1,description:YE(t)},measures:{min:1,max:15,description:UE(t),added:function(e,t){var n,r=e.qDef;WE(t),null!==(n=r.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?r.series={type:Ra.TYPE.LINE,axis:Ra.AXIS.SECONDARY}:r.series={type:Ra.TYPE.BAR,axis:Ra.AXIS.PRIMARY})},moved:function(e,t){WE(t)}}}}function GE(e){var t=XE(e);return{properties:zE,data:{targets:[j({path:"/qHyperCubeDef"},t)]},importProperties:function(e){var n=e.exportFormat,r=e.initialProperties,i=e.hypercubePath,o=BE.axisChart.importProperties({exportFormat:n,initialProperties:r,dataDefinition:t,hypercubePath:i}),a="linechart"===n.properties.visualization,s=[];o.qProperty.qHyperCubeDef.qMeasures.forEach((function(e){e.qDef.series||(e.qDef.series={type:a?"line":"bar",axis:0,marker:"circle",markerFill:!0}),s.indexOf(e.qDef.series.axis)<0&&s.push(e.qDef.series.axis)}));var u=s.sort().shift();return o.qProperty.measureAxes[u]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&me(!0,o.qProperty.measureAxes[u],n.properties.measureAxis,{logarithmic:!1}),o},exportProperties:function(e){var t=e.propertyTree,n=e.hyperCubePath,r=e.viewDataMode;return BE.axisChart.exportProperties({propertyTree:t,hyperCubePath:n,viewDataMode:r})}}}function KE(e){var t=$c(e,"qHyperCube.qMeasureInfo",[]).some((function(e){var t=e.series;return vp(void 0===t?Ra.NOPE_SERIES:t)===Ra.TYPE.LINE}));return qe(e,(function(){return t&&Se.isTime(!0,e)}))}function $E(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function JE(e){var t,n,r;return $E(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.mode)&&void 0!==t?t:"primary")}function ZE(e){var t,n;return $E(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function QE(e){return ZE(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function eC(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach((function(t,n){return function(e,t,n){e.qAttributeExpressions=0===t?[].concat(ee(function(e){var t,n,r,i,o;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];var a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(i=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==i?i:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}(n)),ee(QE(e))):QE(e)}(t,n,e)}))}function tC(e){var t,n=e.flags,r={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:function(e){return"stacked"===e.barGrouping.grouping||KE(e)?"stacked":"grouped"},component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}],change:function(e){return e.qDef.series.type!==Ra.TYPE.BAR||n.isEnabled("BARS_IN_SECONDARY_AXIS")||(e.qDef.series.axis=0),e}},i={ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}],show:function(e){var t;return!!n.isEnabled("BARS_IN_SECONDARY_AXIS")||vp(null===(t=e.qDef)||void 0===t?void 0:t.series)!==Ra.TYPE.BAR}},o={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show:function(e){var t;return vp(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ra.TYPE.MARKER}},a={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show:function(e){var t;return vp(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ra.TYPE.MARKER&&!["line"].includes(e.qDef.series.marker)}};if(n.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")){var s,u,l={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:function(){return $E.apply(void 0,arguments)}},c=null===(s=e.anything)||void 0===s||null===(u=s.sense)||void 0===u?void 0:u.theme;t={supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:function(e,t,n){var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:r,seriesAxis:i,seriesMarker:o,seriesMarkerFill:a}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:l,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:function(){var e,t=c.getDataColorSpecials().primary,n=null===(e=c.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:JE},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:ZE}}}}}}}}}else t={seriesType:r,seriesAxis:i,seriesMarker:o,seriesMarkerFill:a};return{items:{series:{type:"items",items:t}}}}function nC(e,t,n,r){var i,o,a,s=n||0;t?i=t.getMeasureLayouts():i=null!==(o=null==e||null===(a=e.qHyperCubeDef)||void 0===a?void 0:a.qMeasures)&&void 0!==o?o:[];return i.filter((function(e){var t=(e||{}).series;return 0===s?ob(t,r):!ob(t,r)}))}function rC(e,t){return t.getMeasures().filter((function(e){return vp(e.qDef.series)===Ra.TYPE.LINE})).length>0}function iC(e,t,n,r){var i=t.getMeasures().filter((function(e){return vp(e.qDef.series)===Ra.TYPE.BAR}));return r?i.filter((function(e){return e.qDef.series.axis===Ra.AXIS.PRIMARY})).length>n||i.filter((function(e){return e.qDef.series.axis===Ra.AXIS.SECONDARY})).length>n:i.length>n}function oC(e){var t,n,r,i,o,a,s,u=e.translator,l=e.flags,c=l.isEnabled("BARS_IN_SECONDARY_AXIS"),f={uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:(n={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}]},r={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:function(e){return"none"!==$c(e,"".concat(function(e,t){for(var n=-1,r=0;r<e.length;r++)if(e[r].key===t){n=r;break}return n}(e,"bar"),".").concat(n.baseRef))},defaultValue:function(){return{index:-1,color:"#205891"}}},i={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},o={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},a={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},s={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]},{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues:function(e){var t="grouped"===e.barGrouping.grouping,u=e.qHyperCubeDef.qMeasures.filter((function(e){return vp(e.qDef.series)===Ra.TYPE.BAR})).length,l=t&&u>1;return[{key:"bar",style:{strokeWidth:n.defaultValue,strokeColor:r.defaultValue(),width:l?.9:.7}},{key:"line",style:{dataPointSize:i.defaultValue,lineThickness:o.defaultValue,lineType:a.defaultValue,lineCurve:s.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:n,barStrokeColor:r,barWidth:{component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:function(e,t,n){var r=t.getMeasures().some((function(e){return vp(e.qDef.series)===Ra.TYPE.LINE}));return!qe(n.layout,r&&Se.isTime(!0,n.layout))},defaultValue:.7,min:.01,max:1,step:.01}}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:i,lineThickness:o,lineType:a,lineCurve:s}}}}}}),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:function(e,t,n){return iC(0,t,1,c)&&!KE(n.layout)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:function(e,t,n){return KE(n.layout)},convertFunctions:(t="vertical",{get:function(e,n,r){return KE(r.layout)?t:e(n.type)},set:function(e,n,r,i){n(r.type,KE(i.layout)?t:e,t)}})},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:function(e,t,n){return!KE(n.layout)}},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:function(e,t){return rC(0,t)}},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:function(e,t){return rC(0,t)},items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:function(e){return e.dataPoint&&e.dataPoint.show},options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:function(e,t){return iC(0,t,0,c)},defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:function(e){return eC(e)}},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:function(e){return l.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&e.qHyperCubeDef.qMeasures.some((function(e){return $E(e)}))}}}},legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label:function(e,t){var n,r="vertical"===t.layout.orientation||KE(t.layout)?"x":"y",i=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((function(e){return e.qDef}))}(e,t).map((function(e){return e.qFallbackTitle||""})).join(", ");return n=i?u.get("properties.".concat(r,"AxisWithInfo"),[i]):u.get("properties.".concat(r,"Axis")),n},items:{othersGroup:{items:{dock:{options:function(e,t,n){var r="Common.Bottom",i="Common.Top";return"vertical"===n.layout.orientation||KE(n.layout)||(r=n.yMirrorMode?"properties.dock.right":"properties.dock.left",i=n.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:r},{value:"far",translation:i}]}}}},axisDisplaySettings:{type:"items",components:"items",show:function(e,t,n){return!KE(n.layout)},items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:10,show:function(e){return"custom"===e.dimensionAxis.axisDisplayMode},invalid:function(e){var t=e.qHyperCubeDef,n=t.qDimensions,r=t.qMeasures,i=e.dimensionAxis.maxVisibleItems;return i<0||i>1e4/(n.length+r.length)},globalChange:function(e){if("custom"===e.dimensionAxis.axisDisplayMode){var t=e.qHyperCubeDef,n=t.qDimensions,r=t.qMeasures,i=e.dimensionAxis.maxVisibleItems;i<1?e.dimensionAxis.maxVisibleItems=10:i>1e4/(n.length+r.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(i,Math.floor(1e4/(n.length+r.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:function(e){return["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}}}},measureAxis:{uses:"axis.measureAxis",label:function(e,t){var n,r="vertical"===t.layout.orientation||KE(t.layout)?"y":"x",i=nC(e,t,0,c).map((function(e){return e.qFallbackTitle}));return n=i.length?u.get("properties.".concat(r,"AxisWithInfo"),[i.join(",")]):u.get("properties.".concat(r,"Axis")),n},show:function(e,t){return nC(e,t,0,c).length>0},items:{axis:{items:{show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show:function(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((function(e){return(null==e?void 0:e.series)&&ob(null==e?void 0:e.series,c)}))}}},dock:{ref:"measureAxes.0.dock",show:function(e){return"none"!==e.measureAxes[0].show},options:function(e,t,n){var r="Common.Bottom",i="Common.Top";return("vertical"===n.layout.orientation||KE(n.layout))&&(r=n.yMirrorMode?"properties.dock.right":"properties.dock.left",i=n.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:r},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.0.spacing",show:function(e){return e.measureAxes[0]&&"none"!==e.measureAxes[0].show}}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:function(e){return!e.measureAxes[0].autoMinMax}},min:{ref:"measureAxes.0.min",show:function(e){return["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax},invalid:function(e){return"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}},max:{ref:"measureAxes.0.max",show:function(e){return["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax},invalid:function(e){return"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:function(e,t){var n,r="vertical"===t.layout.orientation||KE(t.layout)?"y":"x",i=nC(e,t,1,c).map((function(e){return e.qFallbackTitle}));return n=i.length?u.get("properties.".concat(r,"AxisWithInfo"),[i.join(",")]):u.get("properties.".concat(r,"Axis")),n},show:function(e,t){return nC(e,t,1,c).length>0},items:{axis:{items:{show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show:function(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((function(e){return(null==e?void 0:e.series)&&!ob(null==e?void 0:e.series,c)}))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:function(e){return"none"!==e.measureAxes[1].show},options:function(e,t,n){var r="Common.Bottom",i="Common.Top";return("vertical"===n.layout.orientation||KE(n.layout))&&(r=n.yMirrorMode?"properties.dock.right":"properties.dock.left",i=n.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:r},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.1.spacing",show:function(e){return e.measureAxes[1]&&"none"!==e.measureAxes[1].show}}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:function(e){return!e.measureAxes[1].autoMinMax}},min:{ref:"measureAxes.1.min",show:function(e){return["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax},invalid:function(e){return"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}},max:{ref:"measureAxes.1.max",show:function(e){return["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax},invalid:function(e){return"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}}}}},tooltips:{uses:"tooltip"}}};l.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(f.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});return{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{items:{nullSuppression:{show:function(e,t,n){return!KE(n.layout)}}}},measures:tC(e)}},sorting:{uses:"sortingWithDisclaimer"},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:function(e){return function(e,t){return e.some((function(e){return ob(e.qDef.series,t)}))}(e.qHyperCubeDef.qMeasures,c)}},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:function(e){return function(e,t){return e.some((function(e){return!ob(e.qDef.series,t)}))}(e.qHyperCubeDef.qMeasures,c)}},dimRefLines:{uses:"dimReflines"}}},settings:f}}}function aC(e){return e.qHyperCubeDef.qMeasures.filter((function(e){return vp(e.qDef.series)===Ra.TYPE.LINE})).length>0}function sC(e){var t=e.flags,n=e.flags.isEnabled("BARS_IN_SECONDARY_AXIS");return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:function(e,t){return aC(e)||!KE(t)},items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:function(e,t){return function(e,t){var n=e.qHyperCubeDef.qMeasures.filter((function(e){return vp(e.qDef.series)===Ra.TYPE.BAR}));return t?n.filter((function(e){return e.qDef.series.axis===Ra.AXIS.PRIMARY})).length>1||n.filter((function(e){return e.qDef.series.axis===Ra.AXIS.SECONDARY})).length>1:n.length>1}(e,n)&&!KE(t)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:function(e,t){return!KE(t)}},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:function(){return[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}]},show:function(e){return aC(e)&&e.qHyperCubeDef.qMeasures.length>1}},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:function(e){return aC(e)}}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:function(e){return t.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&e.qHyperCubeDef.qMeasures.some((function(e){return $E(e)}))}}}}}}}var uC={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function lC(e,t,n,r,i){var o=uC[i],a=o.axis,s=o.icon,u=o.tid,l=o.translation;t.addItem({icon:s,tid:u,translation:l,select:function(){return H(regeneratorRuntime.mark((function t(){var o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("measure"!==e.type){t.next=6;break}return t.next=3,r.addLibraryMeasure(e.id);case 3:o=t.sent,t.next=9;break;case 6:return t.next=8,r.addExpressionMeasure(e.name,"");case 8:o=t.sent;case 9:o.qDef.series.type=i,o.qDef.series.axis=a,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path","data.".concat(o.qDef.cId));case 14:case"end":return t.stop()}}),t)})))()}})}function cC(e,t,n,r,i){!function(e,t,n){var r=e.item,i=["contextMenu.add",r.name];if(n.canAddMeasure()){var o=e.menu.addItem({translation:i,tid:"add-as"});lC(r,o,t,n,"bar"),lC(r,o,t,n,"line"),lC(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function fC(e){var t={},n=e.tooltip;if(n){var r,i;t.chart_tooltip_custom=!n.auto;var o=null===(r=n.chart)||void 0===r||null===(i=r.object)||void 0===i?void 0:i.refId;!n.auto&&o&&(t.chart_tooltip_custom_mini_chart=o)}return t}var dC=function(e){return!!(e&&e.qHyperCube.qSize.qcy>0)};function mC(e){return{definition:oC(e),softDefinition:sC(e),support:{snapshot:dC,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:cC,extendMetrics:fC,importProperties:function(t,n,r,i){var o={layout:{templateId:n.templateId}};r.mapProperties(o);var a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=BE.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:XE(e),defaultPropertyValues:a,hypercubePath:i});return function(e,t,n){var r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((function(e){e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)}));var o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&me(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),t.flags.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&eC(e.qProperty)}(s,e,t),s},exportProperties:function(e,t,n){return function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((function(e){e.qAttributeExpressions=[]}))}(e),BE.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:function(e){return e.qExtendsId?e:function(e){return OS(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((function(e){vp(e.qDef.series)===Ra.TYPE.BAR&&1===e.qDef.series.axis&&(e.qDef.series.axis=0)})),e.version=qS),e}(e)}}}}function pC(a){var s=a.flags,u=function(){var e=S();return e.use(E),e.use(C(M)),e.use(Oy),e.use(Cy()),e.component("scrollbar",iu),e.component("point-label",_g),e.component("label-space",Hg),e.component("time-axis",Vh.picassoComponents.timeAxis),e.component("axis-overlay",Vh.picassoComponents.axisOverlay),e.component("reference-line-labels",qa),e.component("box-sliced-hat",jy),e.component("box-out-of-bounds",wy),e.component("data-out-of-bounds-marker",Vg),e.component("scroll-hint",ho),e.component("brush-highlighter",Zg),e.scale("time",Vh.picassoScales.time),e.symbol("line-point",Bg),e}();return{qae:GE(a),ext:mC(a),component:function(){var a=function(){var e=Q(t(),2),r=e[0],i=e[1];return n((function(){return i(Zc())}),[]),r}(),l=kE(),h=function(){var e=c(),r=f(),i=d(),o=m(),a=Q(t(),2),s=a[0],u=a[1],l=p();return n((function(){u({options:j({direction:"ltr"},e),translator:r,theme:o,embed:i,deviceType:l})}),[e.direction,e.freeResize,r.language(),o.name(),l]),s}(),v=jE(),y=function(r){var i=r.picasso,o=r.environment,a=e(),s=Q(t(),2),u=s[0],l=s[1];return n((function(){if(o){a.style.overflow="hidden";var e=i({renderer:{prio:[o.options.renderer||"canvas"]}}).chart({element:a,data:[],settings:{}});l(e);var t=e.destroy;return function(){t()}}}),[o]),u}({picasso:u,environment:h}),M=function(e){var r=e.chart,i=e.actions,a=g(),s=o(),u=Q(t(),2),l=u[0],c=u[1];return n((function(){if(null==r||!r.update||!r.scale||!a)return null;var e=r.scale(ka.SCALE.MAJOR),t=Mm({chart:r,actions:i,selections:a,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:e,selectionActions:{clear:FE},selectionEvents:{start:_E}}});t.setLayout(s);var n=t.destroy;return c(t),function(){n()}}),[a,null==r?void 0:r.update,null==r?void 0:r.scale]),n((function(){null!=l&&l.setLayout&&s&&l.setLayout(s)}),[s]),l}({chart:y,actions:v}),S=LE({picasso:u,chart:y,environment:h,flags:s,viewState:l,viewCache:a,actions:v,selectionService:M});cv({picasso:u,chart:y,models:S,environment:h,viewState:l,viewCache:a,actions:v}),function(e){var t=e.picasso,n=e.chart,o=e.models,a=e.environment,s=e.viewState,u=e.viewCache,l=e.actions,c=r(),f=c.width,d=c.height,m=Q(i(H(regeneratorRuntime.mark((function e(){var r,i,c,m,p,h,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h=function(){n.update({settings:rv({picasso:t,chart:n,models:o,environment:a,viewState:s,viewCache:u,actions:l})})},null!=n&&n.update&&o&&a&&s){e.next=3;break}return e.abrupt("return");case 3:if(r=o.colorService,i=o.discreteModel,c=o.dockService,m=o.layoutService,p=o.refLineModel,c.update({width:f,height:d}),r.custom.updateLegend(),p.update({picasso:t,chart:n,models:o,environment:a,viewState:s,viewCache:u,actions:l}),v=m.getDataPages(),m.setDataPages([]),h(),m.setDataPages(v),m.meta.isContinuous){e.next=14;break}return e.next=14,i.command.initialize();case 14:h();case 15:case"end":return e.stop()}}),e)}))),[f,d]),2)[1];if(m)throw m}({picasso:u,chart:y,models:S,environment:h,viewState:l,viewCache:a,actions:v}),function(e){var t=e.models,n=e.chart,r=e.viewState;b((function(e){if(t){var i=t.layoutService,o=t.dockService,a=t.colorService,s=t.discreteModel,u=t.continuousModel,l=t.reducedModel,c=o.meta.chart.size,f=c.width,d=c.height;return e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:f,h:d}},i.meta.isSnapshot?Promise.resolve():(e.snapshotData.content.chartData={scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:De(n,ka.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(e),l.command.setSnapshotData(e)):u.setSnapshotData(e),a.getSnapshotData().then((function(t){e.snapshotData.content.chartData=j(j({},e.snapshotData.content.chartData),t)})).catch((function(){})))}})),x((function(){return{getViewState:function(){if(r&&n)return{scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:De(n,ka.COMPONENT.LEGEND_CATEGORICAL)}}}}),[r,n])}({models:S,chart:y,viewState:l})}}}export default pC;
974
+ function(e,t,r){function n(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}r.r(t),r.d(t,"default",(function(){return n}))}})}));var zS=P($S.exports);const US={version:"1.8.11",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var YS=e=>t=>{const r=t.qHyperCubeDef.qMeasures,n=[0,0,0];let i;if(!r.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<r.length;++e)i=Lf(r[e].qDef.series),i===ta.BAR?n[0]=1:i===ta.LINE?n[1]=1:n[2]=1;const o=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(n.join(""),2)-1];return e.get(o)},WS=e=>(t,r)=>{let n;const i=t.qHyperCubeDef.qMeasures[r];if(i){const{type:e}=i.qDef.series;n=e===ta.LINE?"Visualizations.Descriptions.HeightLine":e===ta.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else n=r?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(n)};function GS(e){var t,r;const n=e.qHyperCubeDef.qMeasures,i=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===i&&1===n.length&&Lf(null===(r=n[0].qDef)||void 0===r?void 0:r.series)===ta.LINE?e.color.mode="primary":"byDimension"===i&&n.length>1&&(e.color.mode="byMultiple")}function KS(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:YS(t)},measures:{min:1,max:15,description:WS(t),added({qDef:e},t){var r;GS(t),null!==(r=e.series)&&void 0!==r&&r.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:ta.LINE,axis:ra.SECONDARY}:e.series={type:ta.BAR,axis:ra.PRIMARY})},moved(e,t){GS(t)}}}}function XS(e){const t=KS(e);return{properties:US,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:r,hypercubePath:n})=>{const i=zS.axisChart.importProperties({exportFormat:e,initialProperties:r,dataDefinition:t,hypercubePath:n}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&U(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:r})=>zS.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:r})}}function JS(){const e={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}]},t={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:t=>"none"!==rc(t,`${((e,t)=>{let r=-1;for(let n=0;n<e.length;n++)if(e[n].key===t){r=n;break}return r})(t,"bar")}.${e.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},r={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},n={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},i={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},o={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]};return{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues(a){const s="grouped"===a.barGrouping.grouping,l=a.qHyperCubeDef.qMeasures.filter((e=>Lf(e.qDef.series)===ta.BAR)).length,u=s&&l>1;return[{key:"bar",style:{strokeWidth:e.defaultValue,strokeColor:t.defaultValue(),width:u?.9:.7}},{key:"line",style:{dataPointSize:r.defaultValue,lineThickness:n.defaultValue,lineType:i.defaultValue,lineCurve:o.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:e,barStrokeColor:t,barWidth:{component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,r)=>{const n=t.getMeasures().some((e=>Lf(e.qDef.series)===ta.LINE));return!oe.continuous(r.layout,n&&ee.isTime(!0,r.layout))},defaultValue:.7,min:.01,max:1,step:.01}}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:r,lineThickness:n,lineType:i,lineCurve:o}}}}}}}function ZS(e){const t=rc(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=na})=>Lf(e)===ta.LINE));return oe.continuous(e,(()=>t&&ee.isTime(!0,e)))}function QS(e){var t,r;return!(null===(t=e.qDef)||void 0===t||null===(r=t.color)||void 0===r||!r.on)}function eE(e){var t,r,n;return QS(e)&&"primary"===(null!==(t=null===(r=e.qDef)||void 0===r||null===(n=r.color)||void 0===n?void 0:n.mode)&&void 0!==t?t:"primary")}function tE(e){var t,r;return QS(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(r=t.color)||void 0===r?void 0:r.mode)}function rE(e){var t,r,n,i,o;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(r=e.color)||void 0===r?void 0:r.mode))return[];const a=null==e||null===(n=e.color)||void 0===n?void 0:n.colorExpression,s=null!==(i=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==i?i:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function nE(e){return tE(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function iE(e){var t,r;(null!==(t=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)&&void 0!==t?t:[]).forEach(((t,r)=>function(e,t,r){e.qAttributeExpressions=0===t?[...rE(r),...nE(e)]:nE(e)}(t,r,e)))}function oE(e){const{flags:t}=e,r={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||ZS(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}],change:e=>(e.qDef.series.type!==ta.BAR||t.isEnabled("BARS_IN_SECONDARY_AXIS")||(e.qDef.series.axis=0),e)},n={ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}],show(e){var r;return!!t.isEnabled("BARS_IN_SECONDARY_AXIS")||Lf(null===(r=e.qDef)||void 0===r?void 0:r.series)!==ta.BAR}},i={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return Lf(null===(t=e.qDef)||void 0===t?void 0:t.series)===ta.MARKER}},o={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return Lf(null===(t=e.qDef)||void 0===t?void 0:t.series)===ta.MARKER&&!["line"].includes(e.qDef.series.marker)}};let a;if(t.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")){var s,l;const t={ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},u={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>QS(...e)},c=null===(s=e.anything)||void 0===s||null===(l=s.sense)||void 0===l?void 0:l.theme;a={supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,r)=>{var n;return null===(n=r.measureTitle)||void 0===n?void 0:n.call(r)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:r,seriesAxis:n,seriesMarker:i,seriesMarkerFill:o}},color:{type:"items",translation:"properties.color",items:{customColor:t,colorMode:u,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=c.getDataColorSpecials(),r=null===(e=c.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,n=r.indexOf(t);return{index:-1===n?Math.min(6,r.length-1):n}},show:eE},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:tE}}}}}}}}}else a={seriesType:r,seriesAxis:n,seriesMarker:i,seriesMarkerFill:o};return{items:{series:{type:"items",items:a}}}}function aE(e,t,r,n){let i;const o=r||0;var a,s;t?i=t.getMeasureLayouts():i=null!==(a=null==e||null===(s=e.qHyperCubeDef)||void 0===s?void 0:s.qMeasures)&&void 0!==a?a:[];return i.filter((e=>{const{series:t}=e||{};return 0===o?iv(t,n):!iv(t,n)}))}function sE(e,t){return t.getMeasures().filter((e=>Lf(e.qDef.series)===ta.LINE)).length>0}function lE(e,t,r,n){const i=t.getMeasures().filter((e=>Lf(e.qDef.series)===ta.BAR));return n?i.filter((e=>e.qDef.series.axis===ra.PRIMARY)).length>r||i.filter((e=>e.qDef.series.axis===ra.SECONDARY)).length>r:i.length>r}function uE(e){const{translator:t,flags:r}=e,n=r.isEnabled("BARS_IN_SECONDARY_AXIS"),i={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>iE(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>r.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&e.qHyperCubeDef.qMeasures.some((e=>QS(e)))}}},o={uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:JS(),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,r)=>lE(0,t,1,n)&&!ZS(r.layout)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,r)=>ZS(r.layout),convertFunctions:(a="vertical",{get:(e,t,r)=>ZS(r.layout)?a:e(t.type),set(e,t,r,n){t(r.type,ZS(n.layout)?a:e,a)}})},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,r)=>!ZS(r.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t)=>sE(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>sE(0,t),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t)=>lE(0,t,0,n),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:i,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,r){const n="vertical"===r.layout.orientation||ZS(r.layout)?"x":"y",i=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,r).map((e=>e.qFallbackTitle||"")).join(", ");let o;return o=i?t.get(`properties.${n}AxisWithInfo`,[i]):t.get(`properties.${n}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t,r){let n="Common.Bottom",i="Common.Top";return"vertical"===r.layout.orientation||ZS(r.layout)||(n=r.yMirrorMode?"properties.dock.right":"properties.dock.left",i=r.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,r)=>!ZS(r.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:r}=e.qHyperCubeDef,{maxVisibleItems:n}=e.dimensionAxis;return n<0||n>1e4/(t.length+r.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:r}=e.qHyperCubeDef,{maxVisibleItems:n}=e.dimensionAxis;n<1?e.dimensionAxis.maxVisibleItems=10:n>1e4/(t.length+r.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(n,Math.floor(1e4/(t.length+r.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}}},measureAxis:{uses:"axis.measureAxis",label(e,r){const i="vertical"===r.layout.orientation||ZS(r.layout)?"y":"x",o=aE(e,r,0,n).map((e=>e.qFallbackTitle));let a;return a=o.length?t.get(`properties.${i}AxisWithInfo`,[o.join(",")]):t.get(`properties.${i}Axis`),a},show:(e,t)=>aE(e,t,0,n).length>0,items:{axis:{items:{show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&iv(null==e?void 0:e.series,n)))}}},dock:{ref:"measureAxes.0.dock",show:e=>"none"!==e.measureAxes[0].show,options(e,t,r){let n="Common.Bottom",i="Common.Top";return("vertical"===r.layout.orientation||ZS(r.layout))&&(n=r.yMirrorMode?"properties.dock.right":"properties.dock.left",i=r.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.0.spacing",show:e=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label(e,r){const i="vertical"===r.layout.orientation||ZS(r.layout)?"y":"x",o=aE(e,r,1,n).map((e=>e.qFallbackTitle));let a;return a=o.length?t.get(`properties.${i}AxisWithInfo`,[o.join(",")]):t.get(`properties.${i}Axis`),a},show:(e,t)=>aE(e,t,1,n).length>0,items:{axis:{items:{show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!iv(null==e?void 0:e.series,n)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:e=>"none"!==e.measureAxes[1].show,options(e,t,r){let n="Common.Bottom",i="Common.Top";return("vertical"===r.layout.orientation||ZS(r.layout))&&(n=r.yMirrorMode?"properties.dock.right":"properties.dock.left",i=r.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.1.spacing",show:e=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}}}},tooltips:{uses:"tooltip"}}};var a;r.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(o.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});return{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{items:{nullSuppression:{show:(e,t,r)=>!ZS(r.layout)}}},measures:oE(e)}},sorting:{uses:"sortingWithDisclaimer"},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>iv(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,n)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!iv(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,n)},dimRefLines:{uses:"dimReflines"}}},settings:o}}}function cE(e){return e.qHyperCubeDef.qMeasures.filter((e=>Lf(e.qDef.series)===ta.LINE)).length>0}function dE(e){const{flags:t}=e,r=e.flags.isEnabled("BARS_IN_SECONDARY_AXIS");return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>cE(e)||!ZS(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t)=>function(e,t){const r=e.qHyperCubeDef.qMeasures.filter((e=>Lf(e.qDef.series)===ta.BAR));return t?r.filter((e=>e.qDef.series.axis===ra.PRIMARY)).length>1||r.filter((e=>e.qDef.series.axis===ra.SECONDARY)).length>1:r.length>1}(e,r)&&!ZS(t)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!ZS(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>cE(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>cE(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>t.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&e.qHyperCubeDef.qMeasures.some((e=>QS(e)))}}}}}}const mE={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function fE(e,t,r,n,i){const{axis:o,icon:a,tid:s,translation:l}=mE[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await n.addLibraryMeasure(e.id):await n.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,n.updateGlobalChangeListeners(),r.setProperties(n.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path","data."+t.qDef.cId)}})}function pE(e,t,r,n,i){!function(e,t,r){const{item:n}=e,i=["contextMenu.add",n.name];if(r.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});fE(n,o,t,r,"bar"),fE(n,o,t,r,"line"),fE(n,o,t,r,"marker")}}(e,r,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(r,t,i),e.ColorBy(r,t,i),n()}function hE(e){const t={},{tooltip:r}=e;if(r){var n,i;t.chart_tooltip_custom=!r.auto;const e=null===(n=r.chart)||void 0===n||null===(i=n.object)||void 0===i?void 0:i.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const yE=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function gE(e){return{definition:uE(e),softDefinition:dE(e),support:{snapshot:yE,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:pE,extendMetrics:hE,importProperties:(t,r,n,i)=>{const o={layout:{templateId:r.templateId}};n.mapProperties(o);const a={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()},s=zS.axisChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:KS(e),defaultPropertyValues:a,hypercubePath:i});return function(e,t,r){const n="linechart"===r.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:n?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)}));const o=i.sort().shift();e.qProperty.measureAxes[o]&&r.properties.measureAxis&&void 0!==r.properties.measureAxis.autoMinMax&&U(!0,e.qProperty.measureAxes[o],r.properties.measureAxis,{logarithmic:!1}),t.flags.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&iE(e.qProperty)}(s,e,t),s},exportProperties:(e,t,r)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return zS.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:r})},migrate:{properties:e=>e.qExtendsId?e:function(e){return AM(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{Lf(e.qDef.series)===ta.BAR&&1===e.qDef.series.axis&&(e.qDef.series.axis=0)})),e.version=OM),e}(e)}}}function vE(a){const{flags:s}=a,l=(()=>{const e=S();return e.use(E),e.use(C(M)),e.use(Ay),e.use(qy()),e.component("scrollbar",os),e.component("point-label",Fg),e.component("label-space",Vg),e.component("time-axis",Gp.picassoComponents.timeAxis),e.component("axis-overlay",Gp.picassoComponents.axisOverlay),e.component("reference-line-labels",zo),e.component("box-sliced-hat",jy),e.component("box-out-of-bounds",wy),e.component("data-out-of-bounds-marker",_g),e.component("scroll-hint",Yi),e.component("brush-highlighter",Jg),e.scale("time",Gp.picassoScales.time),e.symbol("line-point",Bg),e})();return{qae:XS(a),ext:gE(a),component(){const a=function(){const[e,n]=t();return r((()=>n(ic())),[]),e}(),u=PS(),h=function(){const e=c(),n=d(),i=m(),o=f(),[a,s]=t(),l=p();return r((()=>{s({options:{direction:"ltr",...e},translator:n,theme:o,embed:i,deviceType:l})}),[e.direction,e.freeResize,n.language(),o.name(),l]),a}(),y=VS(),g=function({picasso:n,environment:i}){const o=e(),[a,s]=t();return r((()=>{if(!i)return;o.style.overflow="hidden";const e=n({renderer:{prio:[i.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(e);const{destroy:t}=e;return()=>{t()}}),[i]),a}({picasso:l,environment:h}),M=function({chart:e,actions:n}){const i=v(),a=o(),[s,l]=t();return r((()=>{if(null==e||!e.update||!e.scale||!i)return null;const t=e.scale(ea.SCALE.MAJOR),r=Om({chart:e,actions:n,selections:i,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:t,selectionActions:{clear:_S},selectionEvents:{start:BS}}});r.setLayout(a);const{destroy:o}=r;return l(r),()=>{o()}}),[i,null==e?void 0:e.update,null==e?void 0:e.scale]),r((()=>{null!=s&&s.setLayout&&a&&s.setLayout(a)}),[a]),s}({chart:g,actions:y}),S=kS({picasso:l,chart:g,environment:h,flags:s,viewState:u,viewCache:a,actions:y,selectionService:M});vh({picasso:l,chart:g,models:S,environment:h,viewState:u,viewCache:a,actions:y}),(({picasso:e,chart:t,models:r,environment:o,viewState:a,viewCache:s,actions:l})=>{const{width:u,height:c}=n(),[,d]=i((async()=>{if(!(null!=t&&t.update&&r&&o&&a))return;const{colorService:n,discreteModel:i,dockService:d,layoutService:m,refLineModel:f}=r;function p(){t.update({settings:mh({picasso:e,chart:t,models:r,environment:o,viewState:a,viewCache:s,actions:l})})}d.update({width:u,height:c}),n.custom.updateLegend(),f.update({picasso:e,chart:t,models:r,environment:o,viewState:a,viewCache:s,actions:l});const h=m.getDataPages();m.setDataPages([]),p(),m.setDataPages(h),m.meta.isContinuous||await i.command.initialize(),p()}),[u,c]);if(d)throw d})({picasso:l,chart:g,models:S,environment:h,viewState:u,viewCache:a,actions:y}),(({models:e,chart:t,viewState:r})=>{b((n=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:u}=e,{width:c,height:d}=o.meta.chart.size;return n.snapshotData=n.snapshotData||{},n.snapshotData.content={size:{w:c,h:d}},i.meta.isSnapshot?Promise.resolve():(n.snapshotData.content.chartData={scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:ae(t,ea.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(n),u.command.setSnapshotData(n)):l.setSnapshotData(n),a.getSnapshotData().then((e=>{n.snapshotData.content.chartData={...n.snapshotData.content.chartData,...e}})).catch((()=>{})))})),x((()=>({getViewState(){if(r&&t)return{scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:ae(t,ea.COMPONENT.LEGEND_CATEGORICAL)}}})),[r,t])})({models:S,chart:g,viewState:u})}}}export{vE as default};