@nebula.js/sn-pie-chart 1.11.7 → 1.11.8

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,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-pie-chart v1.11.7
2
+ * @nebula.js/sn-pie-chart v1.11.8
3
3
  * Copyright (c) 2021 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- import e from"hammerjs";import t from"picasso.js";import r from"picasso-plugin-q";import n from"picasso-plugin-hammer";import i from"react";import{Button as o,Popover as a,List as s,ListItem as u,ListItemIcon as l,ListItemText as c}from"@material-ui/core";import p from"react-dom";import{createGenerateClassName as f,StylesProvider as d,ThemeProvider as m}from"@material-ui/styles";import{useOptions as h,useElement as g,useSelections as v,useState as y,useLayout as b,useAction as x,useEffect as q,useModel as D,useApp as C,useTranslator as w,useStaleLayout as S,usePlugins as M,useEmbed as E,useTheme as I,useConstraints as O,useAppLayout as T,usePromise as A,useRect as j,onTakeSnapshot as k,useImperativeHandle as L}from"@nebula.js/stardust";var P={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}}};function N(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 R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,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,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function V(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){_(o,n,i,a,s,"next",e)}function s(e){_(o,n,i,a,s,"throw",e)}a(void 0)}))}}function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(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 U(e,t,r){return t&&z(e.prototype,t),r&&z(e,r),e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(){return(W=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 Y(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&&$(e,t)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(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 Z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Z(e):t}function X(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 r,n=K(e);if(t){var i=K(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return G(this,r)}}function Q(e,t,r){return(Q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=K(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||re(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 te(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)||re(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 re(e,t){if(e){if("string"==typeof e)return ne(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)?ne(e,t):void 0}}function ne(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 ie=function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return e?e.getStyle(t,r,n):i};function oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ae=Object.prototype.hasOwnProperty,se=Object.prototype.toString,ue=Object.defineProperty,le=Object.getOwnPropertyDescriptor,ce=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===se.call(e)},pe=function(e){if(!e||"[object Object]"!==se.call(e))return!1;var t,r=ae.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ae.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||ae.call(e,t)},fe=function(e,t){ue&&"__proto__"===t.name?ue(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(!ae.call(e,t))return;if(le)return le(e,t).value}return e[t]},me=function e(){var t,r,n,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(r in t)n=de(s,r),s!==(i=de(t,r))&&(c&&i&&(pe(i)||(o=ce(i)))?(o?(o=!1,a=n&&ce(n)?n:[]):a=n&&pe(n)?n:{},fe(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&fe(s,{name:r,newValue:i}));return s},he="center",ge="bottom",ve={NoDataExist:{label:"NoDataExist",alignment:he,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:he,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:he,default:!1},LimitedData:{label:"LimitedData",alignment:ge,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:ge,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:ge,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:ge,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}]],be={};ye.forEach((function(e){var t=ee(e,2),r=t[0],n=t[1],i=n.width,o=n.height;be[r]={width:i,height:o}}));var xe=function(){return be};function qe(e,t){return{layoutModes:xe(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?R({align:.5,preserveAspectRatio:!0},t.logicalSize):void 0}}var De=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};function Ce(e,t){var r=e.component(t);return r&&r._DO_NOT_USE_getInfo&&r._DO_NOT_USE_getInfo().offset}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 Se(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,r=e.data,n=e.style;return r[0].map((function(e){return t("tr",{},function(e,t){var r=t.h,n=t.style;return e.map((function(e){var t={style:R(R({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(t.colspan=e.colspan),r("td",t,e.content)}))}(e,{h:t,style:n}))}))},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 Me=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ee=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Ie=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Oe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:function(e){return Me.test(e)},isRtlChar:function(e){return Ee.test(e)||Ie.test(e)},detectTextDirection:function(e){var t,r,n=e?e.length:0;for(t=0;t<n;t++){if(r=e[t],Oe.isLtrChar(r))return"ltr";if(Oe.isRtlChar(r))return"rtl"}return"ltr"}},Te={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,r){var n=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(r.coloring.label&&(a.label="".concat(r.coloring.label)),"color"!==r.coloring.type&&n.fillTooltip){var s=i("fill"),u="measure"===r.coloring.fieldType;if(a.value=u&&s?s(n.fillTooltip.value):n.fillTooltip.label?n.fillTooltip.label:n.fillTooltip.value,!r.coloring.label){var l=o(n.fillTooltip.source.key).field(n.fillTooltip.source.field).title();a.label="".concat(l)}}return a.fill=void 0===n._fillColor?Te.getNodeFillColor(t):n._fillColor,a},getMeasure:function(e,t){var r=e(t.source.key).field(t.source.field).title();return{label:"".concat(r),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 r=Oe.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t.rtl?"right":"left",direction:r},colspan:2},{}]},getDescriptionRow:function(e,t){var r=Oe.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t.rtl?"right":"left",direction:r},colspan:2},{}]},getFooterRow:function(e,t){var r=Oe.detectTextDirection(e);return[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t.rtl?"right":"left",direction:r},colspan:2},{}]},getImageRow:function(e,t){var r=Oe.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"}}));var o=e.imageError?"".concat(e.src,"?").concat(Math.random()):e.src;n.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,n),""],style:{"text-align":t.rtl?"right":"left",direction:r,"max-width":e.width},colspan:2},{}]},getNMoreRow:function(e,t,r){var n=t?t.get("Object.ChartTooltip.NMore",e):"+".concat(e," more"),i=Oe.detectTextDirection(n);return[{content:n,style:{"font-weight":"bold","text-align":r.rtl?"right":"left",direction:i},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){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Oe.detectTextDirection(t.color.label),i=r.rtl?[":",t.color.label]:[t.color.label,":"],o=Oe.detectTextDirection(t.color.value),a=r.rtl?[t.color.value,Te.getColorSymbol(e,t)]:[Te.getColorSymbol(e,t),t.color.value];return[{content:i,style:{"text-align":r.rtl?"right":"left",direction:n}},{content:a,style:{"text-align":r.rtl?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow:function(e,t,r){var n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=Oe.detectTextDirection(e.label),s=i.rtl?[":",e.label]:[e.label,":"],u=Oe.detectTextDirection(e.value);return n=o?i.rtl?[e.value,Te.getColorSymbol(t,r)]:[Te.getColorSymbol(t,r),e.value]:[e.value],[{content:s,style:{"text-align":i.rtl?"right":"left",direction:a}},{content:n,style:{"text-align":i.rtl?"left":"right",direction:u,"vertical-align":"middle"}}]}};function Ae(e,t,r,n){var i=parseInt(ie(e,t,r,n),10);if(!isNaN(i))return i}var je=function(e){return function(t){return e.getContrastingColorTo(t.node.attrs.fill)}};function ke(e,t){return{padding:10,placements:e.simplifiedPlacements.map((function(r){return function(e,t,r){return{position:e.position,justify:e.justify,fill:e.onBackground?ie(t,r,"label.value","color"):je(t),overflow:e.overflow,padding:e.padding}}(r,t,e.themeId)})),fontSize:Ae(t,e.themeId,"label.value","fontSize"),fontFamily:ie(t,e.themeId,"label.value","fontFamily"),label:e.label}}function Le(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Pe(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ne(){}var Re="\\s*([+-]?\\d+)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ve=/^#([0-9a-f]{3,8})$/,He=new RegExp("^rgb\\("+[Re,Re,Re]+"\\)$"),ze=new RegExp("^rgb\\("+[_e,_e,_e]+"\\)$"),Ue=new RegExp("^rgba\\("+[Re,Re,Re,Fe]+"\\)$"),Be=new RegExp("^rgba\\("+[_e,_e,_e,Fe]+"\\)$"),We=new RegExp("^hsl\\("+[Fe,_e,_e]+"\\)$"),Ye=new RegExp("^hsla\\("+[Fe,_e,_e,Fe]+"\\)$"),Ke={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 $e(){return this.rgb().formatHex()}function Je(){return this.rgb().formatRgb()}function Ze(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ve.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ge(t):3===r?new et(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Xe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Xe(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=He.exec(e))?new et(t[1],t[2],t[3],1):(t=ze.exec(e))?new et(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ue.exec(e))?Xe(t[1],t[2],t[3],t[4]):(t=Be.exec(e))?Xe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=We.exec(e))?it(t[1],t[2]/100,t[3]/100,1):(t=Ye.exec(e))?it(t[1],t[2]/100,t[3]/100,t[4]):Ke.hasOwnProperty(e)?Ge(Ke[e]):"transparent"===e?new et(NaN,NaN,NaN,0):null}function Ge(e){return new et(e>>16&255,e>>8&255,255&e,1)}function Xe(e,t,r,n){return n<=0&&(e=t=r=NaN),new et(e,t,r,n)}function Qe(e){return e instanceof Ne||(e=Ze(e)),e?new et((e=e.rgb()).r,e.g,e.b,e.opacity):new et}function et(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function tt(){return"#"+nt(this.r)+nt(this.g)+nt(this.b)}function rt(){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 nt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function it(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new at(e,t,r,n)}function ot(e){if(e instanceof at)return new at(e.h,e.s,e.l,e.opacity);if(e instanceof Ne||(e=Ze(e)),!e)return new at;if(e instanceof at)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,u=(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/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new at(a,s,u,e.opacity)}function at(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function st(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Le(Ne,Ze,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:$e,formatHex:$e,formatHsl:function(){return ot(this).formatHsl()},formatRgb:Je,toString:Je}),Le(et,(function(e,t,r,n){return 1===arguments.length?Qe(e):new et(e,t,r,null==n?1:n)}),Pe(Ne,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new et(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new et(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:tt,formatHex:tt,formatRgb:rt,toString:rt})),Le(at,(function(e,t,r,n){return 1===arguments.length?ot(e):new at(e,t,r,null==n?1:n)}),Pe(Ne,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new at(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new at(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 et(st(e>=240?e-240:e+120,i,n),st(e,i,n),st(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 ut=Math.PI/180,lt=180/Math.PI,ct=4/29,pt=6/29,ft=3*pt*pt;function dt(e){if(e instanceof mt)return new mt(e.l,e.a,e.b,e.opacity);if(e instanceof qt)return Dt(e);e instanceof et||(e=Qe(e));var t,r,n=yt(e.r),i=yt(e.g),o=yt(e.b),a=ht((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=ht((.4360747*n+.3850649*i+.1430804*o)/.96422),r=ht((.0139322*n+.0971045*i+.7141733*o)/.82521)),new mt(116*a-16,500*(t-a),200*(a-r),e.opacity)}function mt(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function ht(e){return e>.008856451679035631?Math.pow(e,1/3):e/ft+ct}function gt(e){return e>pt?e*e*e:ft*(e-ct)}function vt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function bt(e){if(e instanceof qt)return new qt(e.h,e.c,e.l,e.opacity);if(e instanceof mt||(e=dt(e)),0===e.a&&0===e.b)return new qt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*lt;return new qt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function xt(e,t,r,n){return 1===arguments.length?bt(e):new qt(e,t,r,null==n?1:n)}function qt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Dt(e){if(isNaN(e.h))return new mt(e.l,0,0,e.opacity);var t=e.h*ut;return new mt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Ct(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}Le(mt,(function(e,t,r,n){return 1===arguments.length?dt(e):new mt(e,t,r,null==n?1:n)}),Pe(Ne,{brighter:function(e){return new mt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new mt(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 et(vt(3.1338561*(t=.96422*gt(t))-1.6168667*(e=1*gt(e))-.4906146*(r=.82521*gt(r))),vt(-.9787684*t+1.9161415*e+.033454*r),vt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Le(qt,xt,Pe(Ne,{brighter:function(e){return new qt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new qt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Dt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,r){return Ct(e(t),r)}}(e))}(Ct);function wt(){}function St(e,t){var r=new wt;if(e instanceof wt)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 Mt(){}wt.prototype=St.prototype={constructor:wt,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 Et=St.prototype;function It(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 Tt(){}Mt.prototype={constructor:Mt,has:Et.has,add:function(e){return this["$"+(e+="")]=e,this},remove:Et.remove,clear:Et.clear,values:Et.keys,size:Et.size,empty:Et.empty,each:Et.each};var At=1/.7,jt="\\s*([+-]?\\d+)\\s*",kt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pt=/^#([0-9a-f]{3})$/,Nt=/^#([0-9a-f]{6})$/,Rt=new RegExp("^rgb\\("+[jt,jt,jt]+"\\)$"),Ft=new RegExp("^rgb\\("+[Lt,Lt,Lt]+"\\)$"),_t=new RegExp("^rgba\\("+[jt,jt,jt,kt]+"\\)$"),Vt=new RegExp("^rgba\\("+[Lt,Lt,Lt,kt]+"\\)$"),Ht=new RegExp("^hsl\\("+[kt,Lt,Lt]+"\\)$"),zt=new RegExp("^hsla\\("+[kt,Lt,Lt,kt]+"\\)$"),Ut={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=Pt.exec(e))?new $t((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=Nt.exec(e))?Wt(parseInt(t[1],16)):(t=Rt.exec(e))?new $t(t[1],t[2],t[3],1):(t=Ft.exec(e))?new $t(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=_t.exec(e))?Yt(t[1],t[2],t[3],t[4]):(t=Vt.exec(e))?Yt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ht.exec(e))?Zt(t[1],t[2]/100,t[3]/100,1):(t=zt.exec(e))?Zt(t[1],t[2]/100,t[3]/100,t[4]):Ut.hasOwnProperty(e)?Wt(Ut[e]):"transparent"===e?new $t(NaN,NaN,NaN,0):null}function Wt(e){return new $t(e>>16&255,e>>8&255,255&e,1)}function Yt(e,t,r,n){return n<=0&&(e=t=r=NaN),new $t(e,t,r,n)}function Kt(e){return e instanceof Tt||(e=Bt(e)),e?new $t((e=e.rgb()).r,e.g,e.b,e.opacity):new $t}function $t(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Jt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Zt(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 Gt(e){if(e instanceof Xt)return new Xt(e.h,e.s,e.l,e.opacity);if(e instanceof Tt||(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,u=(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/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Xt(a,s,u,e.opacity)}function Xt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Qt(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}It(Tt,Bt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),It($t,(function(e,t,r,n){return 1===arguments.length?Kt(e):new $t(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return e=null==e?At:Math.pow(At,e),new $t(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new $t(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"#"+Jt(this.r)+Jt(this.g)+Jt(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+")")}})),It(Xt,(function(e,t,r,n){return 1===arguments.length?Gt(e):new Xt(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return e=null==e?At:Math.pow(At,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 $t(Qt(e>=240?e-240:e+120,i,n),Qt(e,i,n),Qt(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 er=Math.PI/180,tr=180/Math.PI,rr=4/29,nr=6/29,ir=3*nr*nr;function or(e){if(e instanceof ar)return new ar(e.l,e.a,e.b,e.opacity);if(e instanceof fr){if(isNaN(e.h))return new ar(e.l,0,0,e.opacity);var t=e.h*er;return new ar(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof $t||(e=Kt(e));var r,n,i=cr(e.r),o=cr(e.g),a=cr(e.b),s=sr((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?r=n=s:(r=sr((.4360747*i+.3850649*o+.1430804*a)/.96422),n=sr((.0139322*i+.0971045*o+.7141733*a)/.82521)),new ar(116*s-16,500*(r-s),200*(s-n),e.opacity)}function ar(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function sr(e){return e>.008856451679035631?Math.pow(e,1/3):e/ir+rr}function ur(e){return e>nr?e*e*e:ir*(e-rr)}function lr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function cr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pr(e){if(e instanceof fr)return new fr(e.h,e.c,e.l,e.opacity);if(e instanceof ar||(e=or(e)),0===e.a&&0===e.b)return new fr(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*tr;return new fr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function fr(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}It(ar,(function(e,t,r,n){return 1===arguments.length?or(e):new ar(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return new ar(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new ar(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 $t(lr(3.1338561*(t=.96422*ur(t))-1.6168667*(e=1*ur(e))-.4906146*(r=.82521*ur(r))),lr(-.9787684*t+1.9161415*e+.033454*r),lr(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),It(fr,(function(e,t,r,n){return 1===arguments.length?pr(e):new fr(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return new fr(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new fr(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return or(this).rgb()}}));var dr=-.29227,mr=-.90649,hr=1.97294,gr=hr*mr,vr=1.78277*hr,yr=-.6557636667999999;function br(e){if(e instanceof xr)return new xr(e.h,e.s,e.l,e.opacity);e instanceof $t||(e=Kt(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(yr*n+gr*t-vr*r)/(yr+gr-vr),o=n-i,a=(hr*(r-i)-dr*o)/mr,s=Math.sqrt(a*a+o*o)/(hr*i*(1-i)),u=s?Math.atan2(a,o)*tr-120:NaN;return new xr(u<0?u+360:u,s,i,e.opacity)}function xr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function qr(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)]}It(xr,(function(e,t,r,n){return 1===arguments.length?br(e):new xr(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return e=null==e?At:Math.pow(At,e),new xr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new xr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*er,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new $t(255*(t+r*(-.14861*n+1.78277*i)),255*(t+r*(dr*n+mr*i)),255*(t+r*(hr*n)),this.opacity)}}));var Dr,Cr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wr(e){return new Sr(e)}function Sr(e){if(!(t=Cr.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 Mr(e,t){var r=qr(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")}wr.prototype=Sr.prototype,Sr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Er={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Mr(100*e,t)},r:Mr,s:function(e,t){var r=qr(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Dr=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")+qr(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 Ir(e){return e}var Or=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Tr(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],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}):Ir,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):Ir,s=e.percent||"%";function u(e){var t=(e=wr(e)).fill,r=e.align,u=e.sign,l=e.symbol,c=e.zero,p=e.width,f=e.comma,d=e.precision,m=e.trim,h=e.type;"n"===h?(f=!0,h="g"):Er[h]||(null==d&&(d=12),m=!0,h="g"),(c||"0"===t&&"="===r)&&(c=!0,t="0",r="=");var g="$"===l?i[0]:"#"===l&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",v="$"===l?i[1]:/[%p]/.test(h)?s:"",y=Er[h],b=/[defgprs%]/.test(h);function x(e){var i,s,l,x=g,q=v;if("c"===h)q=y(e)+q,e="";else{var D=(e=+e)<0;if(e=y(Math.abs(e),d),m&&(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)),D&&0==+e&&(D=!1),x=(D?"("===u?u:"-":"-"===u||"("===u?"":u)+x,q=("s"===h?Or[8+Dr/3]:"")+q+(D&&"("===u?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(l=e.charCodeAt(i))||l>57){q=(46===l?o+e.slice(i+1):e.slice(i))+q,e=e.slice(0,i);break}}f&&!c&&(e=n(e,1/0));var C=x.length+e.length+q.length,w=C<p?new Array(p-C+1).join(t):"";switch(f&&c&&(e=n(w+e,w.length?p-q.length:1/0),w=""),r){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return d=null==d?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),x.toString=function(){return e+""},x}return{format:u,formatPrefix:function(e,t){var r=u(((e=wr(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=qr(Math.abs(e)))?e[1]:NaN}(t)/3))),i=Math.pow(10,-n),o=Or[8+n/3];return function(e){return r(i*e)+o}}}}!function(e){Tr(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ar=new Date,jr=new Date;function kr(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 kr((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 Ar.setTime(+t),jr.setTime(+n),e(Ar),e(jr),Math.floor(r(Ar,jr))},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 Lr=kr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Lr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?kr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):Lr:null};kr((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()})),kr((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()})),kr((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 Pr=kr((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 Nr(e){return kr((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 Rr=Nr(0),Fr=Nr(1);Nr(2),Nr(3);var _r=Nr(4);Nr(5),Nr(6),kr((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 Vr=kr((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()}));Vr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?kr((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},kr((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()})),kr((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()}));var Hr=kr((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 zr(e){return kr((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 Ur=zr(0),Br=zr(1);zr(2),zr(3);var Wr=zr(4);zr(5),zr(6),kr((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()}));var Yr=kr((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 Kr(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 $r(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 Jr(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Yr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?kr((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 Zr,Gr,Xr,Qr={"-":"",_:" ",0:"0"},en=/^\s*\d+/,tn=/^%/,rn=/[\\^$*+?|[\]().{}]/g;function nn(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 on(e){return e.replace(rn,"\\$&")}function an(e){return new RegExp("^(?:"+e.map(on).join("|")+")","i")}function sn(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function un(e,t,r){var n=en.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function ln(e,t,r){var n=en.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function cn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function pn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function fn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function dn(e,t,r){var n=en.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function mn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function hn(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 gn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function vn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function yn(e,t,r){var n=en.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function bn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function xn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function qn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Dn(e,t,r){var n=en.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Cn(e,t,r){var n=en.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function wn(e,t,r){var n=tn.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Sn(e,t,r){var n=en.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Mn(e,t,r){var n=en.exec(t.slice(r));return n?(e.Q=1e3*+n[0],r+n[0].length):-1}function En(e,t){return nn(e.getDate(),t,2)}function In(e,t){return nn(e.getHours(),t,2)}function On(e,t){return nn(e.getHours()%12||12,t,2)}function Tn(e,t){return nn(1+Pr.count(Vr(e),e),t,3)}function An(e,t){return nn(e.getMilliseconds(),t,3)}function jn(e,t){return An(e,t)+"000"}function kn(e,t){return nn(e.getMonth()+1,t,2)}function Ln(e,t){return nn(e.getMinutes(),t,2)}function Pn(e,t){return nn(e.getSeconds(),t,2)}function Nn(e){var t=e.getDay();return 0===t?7:t}function Rn(e,t){return nn(Rr.count(Vr(e),e),t,2)}function Fn(e,t){var r=e.getDay();return e=r>=4||0===r?_r(e):_r.ceil(e),nn(_r.count(Vr(e),e)+(4===Vr(e).getDay()),t,2)}function _n(e){return e.getDay()}function Vn(e,t){return nn(Fr.count(Vr(e),e),t,2)}function Hn(e,t){return nn(e.getFullYear()%100,t,2)}function zn(e,t){return nn(e.getFullYear()%1e4,t,4)}function Un(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+nn(t/60|0,"0",2)+nn(t%60,"0",2)}function Bn(e,t){return nn(e.getUTCDate(),t,2)}function Wn(e,t){return nn(e.getUTCHours(),t,2)}function Yn(e,t){return nn(e.getUTCHours()%12||12,t,2)}function Kn(e,t){return nn(1+Hr.count(Yr(e),e),t,3)}function $n(e,t){return nn(e.getUTCMilliseconds(),t,3)}function Jn(e,t){return $n(e,t)+"000"}function Zn(e,t){return nn(e.getUTCMonth()+1,t,2)}function Gn(e,t){return nn(e.getUTCMinutes(),t,2)}function Xn(e,t){return nn(e.getUTCSeconds(),t,2)}function Qn(e){var t=e.getUTCDay();return 0===t?7:t}function ei(e,t){return nn(Ur.count(Yr(e),e),t,2)}function ti(e,t){var r=e.getUTCDay();return e=r>=4||0===r?Wr(e):Wr.ceil(e),nn(Wr.count(Yr(e),e)+(4===Yr(e).getUTCDay()),t,2)}function ri(e){return e.getUTCDay()}function ni(e,t){return nn(Br.count(Yr(e),e),t,2)}function ii(e,t){return nn(e.getUTCFullYear()%100,t,2)}function oi(e,t){return nn(e.getUTCFullYear()%1e4,t,4)}function ai(){return"+0000"}function si(){return"%"}function ui(e){return+e}function li(e){return Math.floor(+e/1e3)}!function(e){Zr=function(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=an(i),c=sn(i),p=an(o),f=sn(o),d=an(a),m=sn(a),h=an(s),g=sn(s),v=an(u),y=sn(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:En,e:En,f:jn,H:In,I:On,j:Tn,L:An,m:kn,M:Ln,p:function(e){return i[+(e.getHours()>=12)]},Q:ui,s:li,S:Pn,u:Nn,U:Rn,V:Fn,w:_n,W:Vn,x:null,X:null,y:Hn,Y:zn,Z:Un,"%":si},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:Bn,e:Bn,f:Jn,H:Wn,I:Yn,j:Kn,L:$n,m:Zn,M:Gn,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:ui,s:li,S:Xn,u:Qn,U:ei,V:ti,w:ri,W:ni,x:null,X:null,y:ii,Y:oi,Z:ai,"%":si},q={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},A:function(e,t,r){var n=p.exec(t.slice(r));return n?(e.w=f[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=v.exec(t.slice(r));return n?(e.m=y[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.m=g[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return w(e,t,r,n)},d:vn,e:vn,f:Cn,H:bn,I:bn,j:yn,L:Dn,m:gn,M:xn,p:function(e,t,r){var n=l.exec(t.slice(r));return n?(e.p=c[n[0].toLowerCase()],r+n[0].length):-1},Q:Sn,s:Mn,S:qn,u:ln,U:cn,V:pn,w:un,W:fn,x:function(e,t,n){return w(e,r,t,n)},X:function(e,t,r){return w(e,n,t,r)},y:mn,Y:dn,Z:hn,"%":wn};function D(e,t){return function(r){var n,i,o,a=[],s=-1,u=0,l=e.length;for(r instanceof Date||(r=new Date(+r));++s<l;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=Qr[n=e.charAt(++s)])?n=e.charAt(++s):i="e"===n?" ":"0",(o=t[n])&&(n=o(r,i)),a.push(n),u=s+1);return a.push(e.slice(u,s)),a.join("")}}function C(e,t){return function(r){var n,i,o=Jr(1900);if(w(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=$r(Jr(o.y))).getUTCDay(),n=i>4||0===i?Br.ceil(n):Br(n),n=Hr.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(Jr(o.y))).getDay(),n=i>4||0===i?Fr.ceil(n):Fr(n),n=Pr.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?$r(Jr(o.y)).getUTCDay():t(Jr(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,$r(o)):t(o)}}function w(e,t,r,n){for(var i,o,a=0,s=t.length,u=r.length;a<s;){if(n>=u)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=q[i in Qr?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=D(r,b),b.X=D(n,b),b.c=D(t,b),x.x=D(r,x),x.X=D(n,x),x.c=D(t,x),{format:function(e){var t=D(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",Kr);return t.toString=function(){return e},t},utcFormat:function(e){var t=D(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e,$r);return t.toString=function(){return e},t}}}(e),Gr=Zr.utcFormat,Xr=Zr.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||Gr("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||Xr("%Y-%m-%dT%H:%M:%S.%LZ");var ci=me.bind(null,!0),pi={},fi=Array.isArray;function di(e){return null!=e&&!Array.isArray(e)&&"object"===F(e)}function mi(e){return void 0===e}function hi(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function gi(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=isNaN(r)?{}:[];e[r||t]=mi(e[r||t])?o:e[t],e=e[r||t]}})),e}function vi(e,t){var r=!0;if(di(e)&&di(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){vi(e[n],t[n])||(r=!1)})),r);if(fi(e)&&fi(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!vi(e[n],t[n]))return!1;return!0}return e===t}pi.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?ci({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);vi(o,a)||hi(t,i)||(mi(a)?n.push({op:"add",path:s,value:o}):di(o)&&di(a)?n=n.concat(pi.generate(a,o,s)):fi(o)&&fi(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&mi(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(vi(t,i))return n;if(!mi(t[0])&&mi(t[0].qInfo)||0===t.length)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(pi.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(n.push({op:"move",path:"".concat(r,"/").concat(u),from:"".concat(r,"/").concat(o)}),i.splice(u,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){mi(t[i])&&!hi(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},pi.apply=function(e,t){t.forEach((function(t){var r,n=gi(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&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(fi(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(fi(o)&&fi(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,te(u))}else if(di(o)&&di(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!hi(r,e)&&delete r[e]})),ci(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 l=gi(e,t.from);fi(n)?n.splice(+i,0,l.splice(+a,1)[0]):(n[i]=l[a],delete l[a])}else"remove"===t.op&&(fi(n)?n.splice(+i,1):delete n[i])}))},pi.clone=function(e){return ci({},e)},pi.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},pi.updateObject=function(e,t){Object.keys(e).length?pi.apply(e,pi.generate(e,t)):ci(e,t)};var yi=[[2,4,6],[2,4],[3]],bi=[,[,,[[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 xi(e,t,r){var n,i=e?e.length:0,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(n=1;n<i;n++)o=Math.min(o,e[n]/e[n-1]);void 0!==r&&(o=Math.min(o,r/e[i-1])),e.splice(0,0,o)}function qi(e,t,r){var n,i=e?e.length:0;for(n=0;n<i;n++)xi(e[n],t,r)}!function(){var e,t;for(qi(yi,1,10),e=0;e<bi.length;e++)if(bi[e])for(t=0;t<bi[e].length;t++)Array.isArray(bi[e][t])&&qi(bi[e][t])}();var Di={exports:{}};function Ci(){}function wi(){}wi.resetWarningCache=Ci;Di.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:wi,resetWarningCache:Ci};return r.PropTypes=r,r}();var Si=Di.exports;function Mi(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Ei(e){var t=e.d,r=e.size,n=e.style,o=void 0===n?{}:n,a=e.viewBox,s=void 0===a?"0 0 16 16":a,u=R({fontSize:Mi(r),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},o);return i.createElement("i",{style:u},i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:s,fill:"currentColor"},i.createElement("path",{d:t})))}var Ii={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"},Oi={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"},Ti="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Ai={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"},ji={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 ki(e,t,r){(function(e){var t=e.model,r=e.properties;return t.modifiers?t.modifiers.apply({model:t,properties:r}):Promise.resolve()})({model:e,properties:r}).then((function(){e.colorSupport&&e.colorSupport.colorByUpdater(r,"qHyperCubeDef.");var n=pi.generate(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))}))}function Li(e,t,r,n,i,o){e.getEffectiveProperties().then((function(a){var s=me(!0,{},a),u=s.qHyperCubeDef[n][t],l=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r];l.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(l.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),s.qHyperCubeDef[n][t]=l,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r]=u,i&&i({oldItem:u,newItem:l,oldProperties:a,newProperties:s,model:e}),ki(e,a,s)}))}function Pi(e){return"H"===e.qGrouping?e.title||"":e.qFallbackTitle||""}function Ni(e){var t=e.dir,r=e.dock,n=e.altList,i=e.model,o=e.translator,a=e.app,s=e.onChange;return 0===n.length?null:{dir:t,dock:r,getAlternatives:function(){var e=n.map((function(e){return function(e,t,r){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:r.get("Object.ErrorMessage.MissingDimension")}));var n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);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){Li(i,e,t,"qDimensions",s)}}}function Ri(e,t,r){var n=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:Pi(e),drillUp:function(e){r.drillUp(n,t,e)}}}function Fi(e){var t=e.altList,r=e.app,n=e.dir,i=e.dock,o=e.model,a=e.onChange,s=e.skipAttributeExpressions,u=e.translator;return 0===t.length?null:{dir:n,dock:i,getAlternatives:function(){var e=t.map((function(e){return function(e,t,r){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:r.get("Object.ErrorMessage.MissingMeasure")}));var n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);var i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,r,u).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){Li(o,e,t,"qMeasures",a,s)}}}function _i(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}var Vi=["children"],Hi={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"}}},zi=function(e){var t=e.children,r=J(e,Vi);return i.createElement(o,W({size:"small",disableRipple:!0,disableTouchRipple:!0},r),t)};function Ui(){function e(e){var t=e.title,r=e.selected,n=e.onClick,o=Oe.detectTextDirection(t);return i.createElement(u,{button:!0,onClick:n,style:{textAlign:"start"}},i.createElement(l,{style:{minWidth:32}},i.createElement(Ei,{d:r?Ti:""})),i.createElement(c,{primaryTypographyProps:{dir:o}},t))}function t(t){var r=t.alignTo,n=t.changeTo,o=t.current,u=t.dir,l=t.dock,c=t.list,p=t.onClose,f=t.show,d=c.map((function(t,r){return i.createElement(e,{key:t.id,title:t.title,onClick:function(){return n(r)}})}));return i.createElement(a,W({anchorEl:r,open:f,onClose:p},Hi[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),i.createElement(s,{dense:!0,dir:u,component:"nav"},i.createElement(e,{title:o,selected:!0,onClick:p}),d))}e.propTypes={title:Si.string.isRequired,selected:Si.bool,onClick:Si.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:Si.any,changeTo:Si.func.isRequired,current:Si.string.isRequired,dir:Si.string.isRequired,dock:Si.string.isRequired,list:Si.array,onClose:Si.func.isRequired,show:Si.bool.isRequired},t.defaultProps={list:[],alignTo:null};var r=function(e){Y(n,i.Component);var r=X(n);function n(e){var t;return H(this,n),(t=r.call(this,e)).state={open:!1,inSelection:e.selections&&e.selections.isActive()},t.openPopover=t.openPopover.bind(Z(t)),t.closePopover=t.closePopover.bind(Z(t)),t.changeTo=t.changeTo.bind(Z(t)),t.alignToRef=i.createRef(),t}return U(n,[{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,r=e.titleData,n=e.popover,o=e.translator,a=e.disabled,s=e.isDimension,u=e.padding,l=e.minWidth,c=e.hasAlternative,p=R({flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal"},this.props.style),f=r.breadcrumbs.length,d=a||this.state.inSelection,m=r.breadcrumbs.map((function(e,t){return i.createElement(zi,{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:r.drillUp(f-t)},title:e},i.createElement("span",{style:p},e),i.createElement(Ei,W({},ji,{size:"small",style:{margin:"0 8px"}})))})),h=n&&!this.state.open?this.openPopover:this.closePopover,g=!n||a||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:!s&&g&&"20px",lineHeight:!s&&g&&"20px",border:!s&&g&&"none"};u&&(v.padding=u),l&&(v.minWidth=l);var y=Oe.detectTextDirection(r.text),b=i.createElement(zi,{style:v,onClick:g?void 0:h,title:r.text,tabIndex:"-1"},r.locked&&i.createElement(Ei,W({},Oi,{size:"small",title:o.get("Tooltip.selections.locked")})),i.createElement("span",{style:p,dir:y},r.text),n&&i.createElement(Ei,W({},Ai,{size:"small",style:{margin:"0 8px"}})));return i.createElement(i.Fragment,null,r.drilldown&&i.createElement(Ei,W({},Ii,{size:"small",title:o.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,i.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:c?"auto":"none"}},b),n&&i.createElement(t,{dock:n.dock,dir:n.dir,current:r.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}]),n}();function n(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&De(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:Si.bool.isRequired,padding:Si.string,minWidth:Si.string,titleData:Si.shape({breadcrumbs:Si.arrayOf(Si.string).isRequired,drilldown:Si.bool.isRequired,index:Si.number.isRequired,locked:Si.bool.isRequired,text:Si.string.isRequired,popoverText:Si.string.isRequired,drillUp:Si.func}).isRequired,popover:Si.shape({dir:Si.string.isRequired,dock:Si.string.isRequired,changeTo:Si.func.isRequired,getAlternatives:Si.func.isRequired}),translator:Si.shape({get:Si.func.isRequired}).isRequired,selections:Si.shape({isActive:Si.func,addListener:Si.func,removeListener:Si.func}),style:Si.shape({fontSize:Si.string,color:Si.string,fontFamily:Si.string}).isRequired,isDimension:Si.bool.isRequired,hasAlternative:Si.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||o(this.settings.settings)?28:20},render:function(){var e,t=this,a=this.settings,s=a.settings,u=s.app,l=s.disabled,c=s.explicitItemInfos,p=s.hyperCube,f=s.hyperCubeDef,d=s.isDimension,m=s.minWidth,h=s.model,g=s.onChangeToAlternative,v=s.padding,y=s.rtl,b=s.selections,x=s.skipAttributeExpressions,q=s.translator,D=a.layout.dock,C="top"!==D&&"bottom"!==D||!y?"ltr":"rtl",w=function(e,t){var r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(r.width="".concat(t.height,"px"),r.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),r.transformOrigin="top left"):"right"===e&&(r.width="".concat(t.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),r.transformOrigin="top left"),r}(D,this.rect),S=f&&f.qLayoutExclude&&f.qLayoutExclude.qHyperCubeDef,M=S&&S[d?"qDimensions":"qMeasures"]||[],E=c||p[d?"qDimensionInfo":"qMeasureInfo"],I=d?Ni:Fi,O=d?Ri:_i,T=h&&h.colorSupport&&h.modifiers&&I({altList:M,app:u,dir:y?"rtl":"ltr",dock:n(D),model:h,onChange:g,skipAttributeExpressions:x,translator:q}),A=(e=this.settings.settings).isDimension&&De(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings),j=E.map((function(e,n){var o="number"==typeof e.explicitColumn?e.explicitColumn:n,a=O(e,o,h),s=n===E.length-1;return i.createElement(i.Fragment,{key:e.cId},i.createElement(r,{popover:T,titleData:a,model:h,translator:q,selections:b,disabled:l(),style:t.style,isDimension:d,padding:v,minWidth:m,hasAlternative:A}),!s&&i.createElement("span",null,", "))}));return i.createElement("div",{style:w,dir:C},j)}}}function Bi(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 Wi(e){if(e.type)return e;if("#"===e.charAt(0))return Wi(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 Yi(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 Ki(e){var t="hsl"===(e=Wi(e)).type?Wi(function(e){var t=(e=Wi(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",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])),Yi({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 $i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ji(){return(Ji=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 Zi(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 Gi(){return(Gi=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 Xi(e){return(Xi="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 Qi(e){return(Qi="function"==typeof Symbol&&"symbol"===Xi(Symbol.iterator)?function(e){return Xi(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Xi(e)})(e)}function eo(e){return e&&"object"===Qi(e)&&!Array.isArray(e)}function to(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},n=r.clone?Gi({},e):e;return eo(e)&&eo(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(eo(t[i])&&i in e?n[i]=to(e[i],t[i],r):n[i]=t[i])})),n}var ro=["xs","sm","md","lg","xl"];function no(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=Zi(e,["values","unit","step"]);function u(e){var t="number"==typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function l(e,t){var n=ro.indexOf(t)+1;return n===ro.length?u(e):"@media (min-width:".concat(r[e]).concat(i,") and ")+"(max-width:".concat(r[ro[n]]-a/100).concat(i,")")}return Ji({keys:ro,values:r,up:u,down:function(e){var t=ro.indexOf(e)+1,n=r[ro[t]];return t===ro.length?u("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-a/100).concat(i,")")},between:l,only:function(e){return l(e,e)},width:function(e){return r[e]}},s)}function io(e,t,r){var n;return Ji({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ji({paddingLeft:t(2),paddingRight:t(2)},r,$i({},e.up("sm"),Ji({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(n={minHeight:56},$i(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),$i(n,e.up("sm"),{minHeight:64}),n)},r)}var oo="#7986cb",ao="#3f51b5",so="#303f9f",uo="#ff4081",lo="#f50057",co="#c51162",po={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"},fo="#e57373",mo="#f44336",ho="#d32f2f",go={black:"#000",white:"#fff"},vo={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:go.white,default:po[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)"}},yo={text:{primary:go.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:po[800],default:"#303030"},action:{active:go.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 bo(e,t,r,n){e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=function(e,t){if(e=Wi(e),t=Bi(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 Yi(e)}(e.main,n):"dark"===t&&(e.dark=function(e,t){if(e=Wi(e),t=Bi(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 Yi(e)}(e.main,1.5*n)))}function xo(e){var t=e.primary,r=void 0===t?{light:oo,main:ao,dark:so}:t,n=e.secondary,i=void 0===n?{light:uo,main:lo,dark:co}:n,o=e.error,a=void 0===o?{light:fo,main:mo,dark:ho}:o,s=e.type,u=void 0===s?"light":s,l=e.contrastThreshold,c=void 0===l?3:l,p=e.tonalOffset,f=void 0===p?.2:p,d=Zi(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var r=Ki(e),n=Ki(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}(e,yo.text.primary)>=c?yo.text.primary:vo.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=Ji({},e)).main&&e[t]&&(e.main=e[t]),bo(e,"light",r,f),bo(e,"dark",n,f),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:yo,light:vo};return to(Ji({common:go,type:u,primary:h(r),secondary:h(i,"A400","A200","A700"),error:h(a),grey:po,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:f},g[u]),d,{clone:!1})}function qo(e){return Math.round(1e5*e)/1e5}var Do={textTransform:"uppercase"};function Co(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,u=void 0===s?300:s,l=r.fontWeightRegular,c=void 0===l?400:l,p=r.fontWeightMedium,f=void 0===p?500:p,d=r.fontWeightBold,m=void 0===d?700:d,h=r.htmlFontSize,g=void 0===h?16:h,v=r.allVariants,y=r.pxToRem,b=Zi(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=y||function(e){return"".concat(e/g*x,"rem")},D=function(e,t,r,n,o){return Ji({fontFamily:i,fontWeight:e,fontSize:q(t),lineHeight:r},'"Roboto", "Helvetica", "Arial", sans-serif'===i?{letterSpacing:"".concat(qo(n/t),"em")}:{},{},o,{},v)},C={h1:D(u,96,1,-1.5),h2:D(u,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(f,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(f,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(f,14,1.75,.4,Do),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Do)};return to(Ji({htmlFontSize:g,pxToRem:q,round:qo,fontFamily:i,fontSize:a,fontWeightLight:u,fontWeightRegular:c,fontWeightMedium:f,fontWeightBold:m},C),b,{clone:!1})}function wo(){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 So=["none",wo(0,2,1,-1,0,1,1,0,0,1,3,0),wo(0,3,1,-2,0,2,2,0,0,1,5,0),wo(0,3,3,-2,0,3,4,0,0,1,8,0),wo(0,2,4,-1,0,4,5,0,0,1,10,0),wo(0,3,5,-1,0,5,8,0,0,1,14,0),wo(0,3,5,-1,0,6,10,0,0,1,18,0),wo(0,4,5,-2,0,7,10,1,0,2,16,1),wo(0,5,5,-3,0,8,10,1,0,3,14,2),wo(0,5,6,-3,0,9,12,1,0,3,16,2),wo(0,6,6,-3,0,10,14,1,0,4,18,3),wo(0,6,7,-4,0,11,15,1,0,4,20,3),wo(0,7,8,-4,0,12,17,2,0,5,22,4),wo(0,7,8,-4,0,13,19,2,0,5,24,4),wo(0,7,9,-4,0,14,21,2,0,5,26,4),wo(0,8,9,-5,0,15,22,2,0,6,28,5),wo(0,8,10,-5,0,16,24,2,0,6,30,5),wo(0,8,11,-5,0,17,26,2,0,6,32,5),wo(0,9,11,-5,0,18,28,2,0,7,34,6),wo(0,9,12,-6,0,19,29,2,0,7,36,6),wo(0,10,13,-6,0,20,31,3,0,8,38,7),wo(0,10,13,-6,0,21,33,3,0,8,40,7),wo(0,10,14,-6,0,22,35,3,0,8,42,7),wo(0,11,14,-7,0,23,36,3,0,9,44,8),wo(0,11,15,-7,0,24,38,3,0,9,46,8)],Mo={borderRadius:4};function Eo(){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 Io={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)"},Oo={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},To=function(e){return"".concat(Math.round(e),"ms")},Ao={easing:Io,duration:Oo,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?Oo.standard:r,i=t.easing,o=void 0===i?Io.easeInOut:i,a=t.delay,s=void 0===a?0:a;return Zi(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof n?n:To(n)," ").concat(o," ").concat("string"==typeof s?s:To(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))}},jo={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var ko=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,u=e.spacing,l=e.typography,c=void 0===l?{}:l,p=Zi(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),f=xo(a),d=no(r),m=Eo(u),h=Ji({breakpoints:d,direction:"ltr",mixins:io(d,m,i),overrides:{},palette:f,props:{},shadows:s||So,typography:Co(f,c),spacing:m},to({shape:Mo,transitions:Ao,zIndex:jo},p));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 Lo(e,t){return i.createElement(d,{generateClassName:t},i.createElement(m,{theme:ko},e))}var Po=f({productionPrefix:"q".concat("a296"),disableGlobal:!0,seed:""});function No(){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,r=e.y,n=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(r)?s.y:r,s.width=Number.isNaN(n)?s.width:n,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,r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createElement,n=void 0===r?document.createElement.bind(document):r,i=e(),o={element:function(){return t},root:function(){return t},appendTo:function(e){return t||((t=n("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 r=i.scaleRatio.x,n=i.scaleRatio.y;return t.style.left="".concat(Math.round(i.margin.left+i.x*r),"px"),t.style.top="".concat(Math.round(i.margin.top+i.y*n),"px"),t.style.width="".concat(Math.round(i.width),"px"),t.style.height="".concat(Math.round(i.height),"px"),t.style.transform="scale(".concat(r,", ").concat(n,")"),t.style.transformOrigin="top left",p.render(Lo(e,Po),t),!0},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){return t&&p.unmountComponentAtNode(t),o},destroy:function(){t&&t.parentElement&&(p.unmountComponentAtNode(t),t.parentElement.removeChild(t)),t=null},size:function(t){return t&&(i=e(t)),i}};return o}}()),e.component("data-title",Ui()),e.component("disclaimer",((t=function(e){Y(r,i.Component);var t=X(r);function r(){return H(this,r),t.apply(this,arguments)}return U(r,[{key:"render",value:function(){var e=this.props,t=e.label,r=e.spanStyle;return i.createElement(i.Fragment,null,i.createElement("span",{ref:this.alignToRef,style:r,title:t},t))}}]),r}()).propTypes={label:Si.string.isRequired,spanStyle:Si.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render:function(){var e=this.settings,r=e.settings,n=r.label,o=r.rtl,a=e.layout.dock,s="top"!==a&&"bottom"!==a||!o?"ltr":"rtl",u=function(e,t){var r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width="".concat(t.height,"px"),r.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),r.transformOrigin="top left";break;case"right":r.width="".concat(t.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),r.transformOrigin="top left";break;case"center":r.width="".concat(t.width,"px"),r.height="".concat(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}(a,this.rect),l="center"===a?n:"* ".concat(n),c="center"!==a?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return i.createElement("div",{style:u,dir:s},i.createElement(i.Fragment,null,i.createElement(t,{label:l,spanStyle:c})))}}))}}function Ro(e){return xt(e).l<70}function Fo(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var _o={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render:function(){return function(e){var t=e.chart,r=e.settings,n=t.component(r.component);if(!n)return[];var i=t.findShapes(r.selector).filter((function(e){return e.key===r.component}));if(i.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];for(var o,a,s,u=[],l=i[i.length-1],c=0;c<i.length;c+=1){var p=i[c],f=l.attrs.fill,d=p.attrs.fill;if(o=f,a=void 0,s=void 0,((a=xt(d).l/100)>(s=xt(o).l/100)?(a+.05)/(s+.05):(s+.05)/(a+.05))<=1.2){var m=p.desc.slice,h=m.start,g=m.offset,v=p.desc.slice,y=v.innerRadius,b=v.outerRadius;if(y=Math.max(y,l.desc.slice.innerRadius),(b=Math.min(b,l.desc.slice.outerRadius))>y){var x=Fo({r:b,a:h},g),q=Fo({r:y,a:h},g);u.push({type:"line",x1:x.x,y1:x.y,x2:q.x,y2:q.y,strokeWidth:1,opacity:.4,stroke:Ro(d)?"#ccc":"#333"})}}l=p}return u}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Vo(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ho(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zo(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="",n=0;n<e.length;n++){var i=e[n];r+=0===n?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),r+=" "}return t&&(r+="Z"),r}function Uo(e){var t=e.size,r=e.angle,n={x:e.x,y:e.y},i=t/2,o=e.x-i,a=e.y-i,s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];return s=s.map((function(e){return function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},n=Math.cos(t),i=Math.sin(t),o=Ho(e,r);return Vo({x:n*o.x-i*o.y,y:i*o.x+n*o.y},r)}(e,r,n)})),{type:"path",fill:e.fill,d:zo(s)}}var Bo={require:["chart"],defaultSettings:{settings:{},style:{}},render:function(){return function(e){var t=e.chart,r=e.settings;if(!t.component(r.component))return[];var n=t.findShapes(r.selector).filter((function(e){return e.key===r.component}));if(n.length<2)return[];for(var i,o,a=[],s=0;s<n.length;s+=1){var u=n[s];if(u.data.radius.value<0){var l=u.desc.slice,c=l.start,p=l.end,f=l.offset,d=(c+p)/2,m=(i={r:r.offset,a:d},{x:(o=f).x+i.r*Math.sin(i.a),y:o.y-i.r*Math.cos(i.a)}),h=Uo(R({size:r.size,fill:r.fill,angle:d+Math.PI},m));h.data=R(R({},u.data),{},{_share:u.desc.share,_fillColor:u.attrs.fill}),a.push(h)}}return a}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Wo(e){return(Wo="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 Yo(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function Ko(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Yo(o,n,i,a,s,"next",e)}function s(e){Yo(o,n,i,a,s,"throw",e)}a(void 0)}))}}function $o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jo(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 Zo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jo(Object(r),!0).forEach((function(t){$o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Go(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 Xo(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)||ea(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 Qo(e){return function(e){if(Array.isArray(e))return ta(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ea(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 ea(e,t){if(e){if("string"==typeof e)return ta(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)?ta(e,t):void 0}}function ta(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 ra=Object.prototype.hasOwnProperty,na=Object.prototype.toString,ia=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,aa=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===na.call(e)},sa=function(e){if(!e||"[object Object]"!==na.call(e))return!1;var t,r=ra.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ra.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||ra.call(e,t)},ua=function(e,t){ia&&"__proto__"===t.name?ia(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},la=function(e,t){if("__proto__"===t){if(!ra.call(e,t))return;if(oa)return oa(e,t).value}return e[t]},ca=function e(){var t,r,n,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(r in t)n=la(s,r),s!==(i=la(t,r))&&(c&&i&&(sa(i)||(o=aa(i)))?(o?(o=!1,a=n&&aa(n)?n:[]):a=n&&sa(n)?n:{},ua(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&ua(s,{name:r,newValue:i}));return s};function pa(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 fa(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 da(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 u=t.pic.extract({field:n.key(),trackBy:n.value}).length;return a(n,u)}return{}}function ma(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 ha(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 ga(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function va(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ya(){}var ba=1/.7,xa="\\s*([+-]?\\d+)\\s*",qa="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Da="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ca=/^#([0-9a-f]{3,8})$/,wa=new RegExp("^rgb\\("+[xa,xa,xa]+"\\)$"),Sa=new RegExp("^rgb\\("+[Da,Da,Da]+"\\)$"),Ma=new RegExp("^rgba\\("+[xa,xa,xa,qa]+"\\)$"),Ea=new RegExp("^rgba\\("+[Da,Da,Da,qa]+"\\)$"),Ia=new RegExp("^hsl\\("+[qa,Da,Da]+"\\)$"),Oa=new RegExp("^hsla\\("+[qa,Da,Da,qa]+"\\)$"),Ta={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 Aa(){return this.rgb().formatHex()}function ja(){return this.rgb().formatRgb()}function ka(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ca.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?La(t):3===r?new Fa(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Pa(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Pa(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=wa.exec(e))?new Fa(t[1],t[2],t[3],1):(t=Sa.exec(e))?new Fa(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ma.exec(e))?Pa(t[1],t[2],t[3],t[4]):(t=Ea.exec(e))?Pa(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ia.exec(e))?za(t[1],t[2]/100,t[3]/100,1):(t=Oa.exec(e))?za(t[1],t[2]/100,t[3]/100,t[4]):Ta.hasOwnProperty(e)?La(Ta[e]):"transparent"===e?new Fa(NaN,NaN,NaN,0):null}function La(e){return new Fa(e>>16&255,e>>8&255,255&e,1)}function Pa(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fa(e,t,r,n)}function Na(e){return e instanceof ya||(e=ka(e)),e?new Fa((e=e.rgb()).r,e.g,e.b,e.opacity):new Fa}function Ra(e,t,r,n){return 1===arguments.length?Na(e):new Fa(e,t,r,null==n?1:n)}function Fa(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function _a(){return"#"+Ha(this.r)+Ha(this.g)+Ha(this.b)}function Va(){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 Ha(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function za(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,r,n)}function Ua(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof ya||(e=ka(e)),!e)return new Ba;if(e instanceof Ba)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,u=(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/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Ba(a,s,u,e.opacity)}function Ba(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Wa(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 Ya(e){return function(){return e}}function Ka(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Ya(isNaN(e)?t:e)}ga(ya,ka,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Aa,formatHex:Aa,formatHsl:function(){return Ua(this).formatHsl()},formatRgb:ja,toString:ja}),ga(Fa,Ra,va(ya,{brighter:function(e){return e=null==e?ba:Math.pow(ba,e),new Fa(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Fa(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:_a,formatHex:_a,formatRgb:Va,toString:Va})),ga(Ba,(function(e,t,r,n){return 1===arguments.length?Ua(e):new Ba(e,t,r,null==n?1:n)}),va(ya,{brighter:function(e){return e=null==e?ba:Math.pow(ba,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ba(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 Fa(Wa(e>=240?e-240:e+120,i,n),Wa(e,i,n),Wa(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 $a=function e(t){var r=function(e){return 1==(e=+e)?Ka: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):Ya(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=Ra(e)).r,(t=Ra(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Ka(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),Ja=/^class(-pyramid)?/,Za=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,u=t.limits,l={},c="percent"===t.limitType?u.map((function(e){return i+(o-i)*e})):u,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(Qo(c))),o=Math.max.apply(Math,[o].concat(Qo(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,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 u=0;u<n.length;u++)t<n[u]&&n[u]<r&&(a.push(n[u]),o.push(i[u]));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 l=0;l<n.length;l++)if(n[l]>r){o.push(i[l]),o.push(i[l]);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:p,limits:"percent"===t.limitType?c:u}));else if(t.breakTypes){var f=t.breakTypes;l.type="continuous",l.domain=[i],l.range=[p[0]];for(var d=0;d<c.length;d+=1)if(f[d]){var m=p[d],h=p[d+1],g=$a(m,h)(.5);l.range.push(g),l.domain.push(c[d]),d<c.length-1&&f[d+1]&&(l.range.push(p[d+1]),l.domain.push((c[d]+c[d+1])/2))}else l.range.push(p[d]),l.range.push(p[d+1]),l.domain.push(c[d]),l.domain.push(c[d]+Math.min(1e-6,(o-i)/1e6));l.range.push(p[p.length-1]),l.domain.push(o)}else l.domain=c,l.range=p;return l};function Ga(e,t,r,n,i){var o,a,s,u=0,l=[],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)||(l[s]?l[s]+=1:l[s]=1);for(o=0;o<l.length;o+=1)l[o]&&(u+=1);return u<=n||u>=i?Math.max(u,n):Ga(e,t,r,n+1,i)}var Xa=function(e,t,r,n){var i,o,a=t.theme,s=t.hc,u=n.f,l={mode:"field",fieldType:"measure",field:u?u.key():void 0,reverse:r.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(u){if(Number.isNaN(+u.min())||Number.isNaN(+u.max()))return{invalid:!0};(p=!("S"===(i=r.pic.raw()).qMode&&i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||"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:u.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Qo(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(l.min=r.input.measureMin,l.max=r.input.measureMax,l.max<l.min)return{invalid:!0}}else if(u&&!p)l.min=u.min(),l.max=u.max();else if(u){if(!c.length)return{invalid:!0};l.min=Math.min.apply(Math,Qo(c)),l.max=Math.max.apply(Math,Qo(c))}if(r.input.measureScheme&&(l.palettes={quant:r.input.measureScheme}),a){var f=a.getDataColorScales().filter((function(e){return e.key===r.input.measureScheme}))[0];l.type=f&&Ja.test(f.type)?"categorical":"continuous","categorical"===l.type&&(o=f.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Qo(f.colors.map((function(e){return e?e.length:0})))):f.colors.length)}if("categorical"===l.type){for(var d=p?Ga(l.max,l.min,c,1,o):o,m=(l.max-l.min)/d,h=[],g=0;g<d+1;g+=1)h.push(l.min+m*g);l.domain=h,l.range=function(e){for(var t=e.resources.theme.palette("quant",d),r=Math.max(1,Math.floor(t.length/d)),n=[],i=0;i<d;i+=1)n.push(t[i*r]);return[n[0]].concat(n,[n[n.length-1]])}}return l};function Qa(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 es(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function ts(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 u=r.indexOf(o);-1!==u&&(r.splice(u,1),n.splice(u,1))}}return{domain:r,range:n,exclude:i}}function rs(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?Qa:o,s=r.input.byMeasureDef||{activeMeasureIndex:0},u=a(r,s),l=Xa(0,{theme:n,hc:i},r,{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=r.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=r.pic.fields().filter((function(e){return"measure"===e.type()}))[u.raw().matchMeasure]),r.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&ca(l,Za(e,p.gradient,l,c))}else l.auxiliary=s;return l}(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?ma:i,a=n.getCByField,s=void 0===a?ha:a,u=n.getPersistence,l=void 0===u?da:u,c=o(t,r),p=s(r,c),f=p?p.raw():{},d=r&&r.pic?r.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!d.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:f.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===f.labelExpRef&&(m.label=r.input.altLabel)),!m.label&&p&&(m.label=p.title()),r.input.dimensionScheme&&(m.palettes={categorical:r.input.dimensionScheme}),r.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),ca(m,l(t,r,c,p,{byRow:fa,byElemNo:pa})),m}(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 u=Xa(0,{hc:i,theme:o},r,{f:s});return u.invalid||(u.label=r.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),u}(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 u=[],l=[];"measure"===r.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){u.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?l.push(n.primary):l.push(i)}}));var c=r.input.dimensionScheme?{categorical:r.input.dimensionScheme}:void 0,p=o?o.getDataColorPalettes()[0]:void 0;return"measure"===r.input.useBaseColors&&p&&(c={categorical:p.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 f=[],d=[];return i.qDimensionInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?d.push(n.primary):d.push(i)}})),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:d}:void 0}}var m=n.primary;if(void 0!==r.input.paletteColor)r.input.paletteColor&&(m=e.resolveUIColor(r.input.paletteColor));else{var h=r.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(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)),Zo(Zo({},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 Zo(Zo({},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(es(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=ts(e.measureOverrides,e.explicit),es(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=ts(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 ns(e){var t=Zo({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(ca(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=ca(!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=ca(!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 Za(i,n.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=n[0],u=n[1]?n[1].colorMap:null;if(s){var l=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=l}return u?function(e,t,r,n){var i=n.external,o=n.field,a=Zo({},e);ca(a,pa(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,ca(a,pa(o)))):!1===t.autoFill&&t.single?a.range=[r.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),ca(a,pa(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 u=i.items[s],l=(u.text||u).label;n[l]&&-1===a.indexOf(u.value)&&(a.push(u.value),o.push(t.resolveUIColor(n[l])))}return a.push(-3,-2),o.push(r.others),o.push(r.nil),a},range:function(){return o}}}(t.colors,r,a)),a}(a,u,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=Zo(Zo({},e),n.getDataColorSpecials())),r.settings=ca(e,rs(this,r,t,e))}return r.settings}};return i}var is=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},os=function(e){throw e.isHandled=!0,e},as=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()},ss=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()},us=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(os):Promise.reject()};function ls(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 cs(e){return function(t){return"object"===Wo(t.datum[e])?t.datum[e].value:void 0}}function ps(e){return"object"===Wo(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function fs(e){return-3===e.datum.value}var ds=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"},ms=function(e,t,r){return!(r.invalid||"color"===r.type||"measure"===r.mode&&t.qMeasureInfo.length<=1||"dimension"===r.mode)&&!1!==e.show};function hs(e,t){var r=e.styleReference,n=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,s=t.theme,u=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:ds(o,n,i)},show:ms(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(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 gs(e,t,r){var n=[],i=[],o=function(e,t,r){return"categorical"===t.coloring.type?function(e,t,r){var n=hs(e,t);if(!n.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,p=t.theme,f=t.scales,d={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"},m="".concat(c,"Legend");return ca(!0,n,{type:"legend-cat",key:"".concat(i,"-cat"),scale:m in f?m: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:p?p.getStyle(o,"legend.label","color"):void 0,fontSize:p?p.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:p?p.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:d[r]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:u,style:l})}(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,u=t.theme,l=hs(e,t);return!!l.show&&ca(!0,l,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:u?u.getStyle(n,"legend.label","color"):void 0,fontSize:u?u.getStyle(n,"legend.label","fontSize"):void 0,fontFamily:u?u.getStyle(n,"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,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={},$o(e,"".concat(r,"start"),(function(e){e.preventDefault(),this.started!==r&&(this.started=r,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),$o(e,"".concat(r,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),$o(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 vs=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function ys(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,r=ns(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 as(e,{layout:r,app:n})})).getMeasure((function(e,t){var r=t.layout,n=t.app;return ss(e,{layout:r,app:n})})).getAttributeDimension((function(e,t){var r=t.layout,n=t.model,i=t.app;return us(e,{layout:r,model:n,app:i})}));return r.getSnapshotData=is,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=Zo({},i),n={},!r.key)throw new Error("Missing key");t.set(Zo(Zo({},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=Zo(Zo({},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,u=n.getDataColorScales().filter((function(e){return e.key===s}))[0];if(u){var l=u.colors[0]?u.colors:[[]].concat(Qo(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: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={},u=i;if(r){var l={override:!0,domain:r.explicit&&"function"==typeof r.explicit.domain?r.explicit.domain:[].concat(Qo((r.explicit||{}).domain||[]),[-3,-2]),range:r.explicit&&"function"==typeof r.explicit.range?r.explicit.range:[].concat(Qo((r.explicit||{}).range||[]),[r.others,r.nil])};if("field"===r.mode){if("dimension"===r.fieldType){var c,p=ls({hc:t,source:o,coloring:r}).data;if(r.legendDataset){var f=0,d={};a.data("q")({data:t}).extract({field:r.field,trackBy:r.valueAccessor,reduce:function(e){var t=e[0];return d[t]=f++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return d[e.qElemNumber]}}}}}}var m={data:p,range:r.range,domain:r.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]=m,c&&(s["".concat(u,"Legend")]=Zo(Zo({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.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[u]=ca({},h,{type:"categorical"===r.type?"threshold-color":"sequential-color",range:r.range,domain:r.domain,invert:r.reverse}),"sequential-color"===s[u].type&&(s["".concat(u,"Range")]=ca({},h,{invert:!!n}))}else if("color"!==r.type)throw new Error("UNUSED FIELD")}else if("dimension"===r.mode){var g={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]=g}else if("measure"===r.mode){var v={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:l,type:"categorical-color"};s[u]=v}}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=cs(n),o=cs("".concat(n,"IsAnOther")),a=function(e,t){var n=e.fieldType,a=e.invalid,s=e.mode,u=e.nil,l=e.others,c=e.primary,p=e.type;return a?function(e){return fs(e)||o(e)?l:u}:r[t]?function(e){return fs(e)?l:ps(e)||-2===i(e)&&"dimension"===n||"NaN"===i(e)?u:o(e)?l:e.resources.scale(t)(i(e))||l}:"constant"===s?function(e){return fs(e)||o(e)?l:ps(e)?u:c}:"color"===p?function(e){return fs(e)||o(e)?l:ps(e)?u:i(e)||l}:null},s=a(t,n);if(t.measureOverrides){var u=cs("".concat(n,"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: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,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?(r={field:t,reduce:"first"},"color"===i.type&&(r.value=function(e){return"NaN"!==e.qNum?vs(e.qNum):e.qText&&ka(e.qText)?e.qText:c})):"dimension"===i.mode?r=void 0!==i.field?i.field:n.qDimensionInfo.length-1:"measure"===i.mode&&(r=u);var p=$o({},l,r);return n.qDimensionInfo.length>1&&(p["".concat(l,"IsAnOther")]={fields:n.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(l,"MeasureIdx")]=u),p}({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,u=e.styleReference,l=void 0===u?"object.legend":u,c=e.settings,p=void 0===c?{}:c,f=e.style,d=void 0===f?{}:f,m=arguments.length>1?arguments[1]:void 0;return gs({eventName:t,key:n,rtl:s,viewState:o,chart:a,styleReference:l,settings:p,style:d},{legendProps:r.legendProps,scaleKey:r.key,coloring:i(),theme:r.theme,hc:r.hc,scales:this.scales()},m)}};return o}var bs=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function xs(e){var t=e.qHyperCube,r=t.qDimensionInfo,n=t.qMeasureInfo,i=r.some(bs),o=n.some(bs),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function qs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Zo(Zo(Zo({},e),t),{},{colorProps:Zo(Zo({},e.colorProps),t.colorProps||{})});return r}var Ds=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Cs(e){var t,r=e.qHyperCube.qDimensionInfo.some(Ds),n=e.qHyperCube.qMeasureInfo.some(Ds),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 ws=function(){};function Ss(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 Ms(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 Es(e){return(Es="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 Is(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Os(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 Ts(e,t,r){return t&&Os(e.prototype,t),r&&Os(e,r),e}function As(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function js(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 ks(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?js(Object(r),!0).forEach((function(t){As(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):js(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ls(e,t){return(Ls=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ps(){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 Ns(e,t,r){return(Ns=Ps()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Ls(i,r.prototype),i}).apply(null,arguments)}function Rs(e){return function(e){if(Array.isArray(e))return _s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Fs(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 Fs(e,t){if(e){if("string"==typeof e)return _s(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)?_s(e,t):void 0}}function _s(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 Vs=Object.prototype.hasOwnProperty,Hs=Object.prototype.toString,zs=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,Bs=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Hs.call(e)},Ws=function(e){if(!e||"[object Object]"!==Hs.call(e))return!1;var t,r=Vs.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Vs.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Vs.call(e,t)},Ys=function(e,t){zs&&"__proto__"===t.name?zs(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ks=function(e,t){if("__proto__"===t){if(!Vs.call(e,t))return;if(Us)return Us(e,t).value}return e[t]},$s=function e(){var t,r,n,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(r in t)n=Ks(s,r),s!==(i=Ks(t,r))&&(c&&i&&(Ws(i)||(o=Bs(i)))?(o?(o=!1,a=n&&Bs(n)?n:[]):a=n&&Ws(n)?n:{},Ys(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&Ys(s,{name:r,newValue:i}));return s};function Js(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 u=0;u<n.wrappedFields.length;u++)if(s=n.wrappedFields[u].attrDims.map((function(e){return e.instance})).indexOf(e),a=n.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 Zs(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 Gs(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,u=e.sourceKey,l=e.target,c=e.targetProp,p=n;if(i.field&&i.field!==r){var f=Js(i.field,o,{cache:t});if(-1===f)return;p=$s({qRow:a},f(s))}l[c]=Zs(i,p,{key:u})}function Xs(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(),u=t.key(),l="object"===Es(i[a].field)?i[a].field:t.field(i[a].field),c=n.normalizeConfig(i[a],t),p=c.props,f=c.main,d=Object.keys(p),m=!!i[a].trackBy,h=Es(i[a].trackBy),g={},v=[],y=[],b=0;b<s.qDataPages.length;b++){var x=Js(l,s.qDataPages[b],{cache:r});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=$s({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Zs(f,C,{key:u});if(!f.filter||f.filter(C)){for(var S=0;S<d.length;S++){var M=p[d[S]],E=M.fields||[M];M.fields&&(w[d[S]]=[]);for(var I=0;I<E.length;I++)Gs({cache:r,f:l,mainCell:C,p:E[I],prop:d[S],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:u,target:M.fields?w[d[S]]:w,targetProp:M.fields?I:d[S]});if(M.fields){var O=w[d[S]].map((function(e){return e.value})),T=w[d[S]].map((function(e){return e.label}));w[d[S]]={value:"function"==typeof M.value?M.value(O):void 0!==M.value?M.value:O,label:"function"==typeof M.label?M.label(T):void 0!==M.label?String(M.label):String(w[d[S]].value)}}}m&&n.track({cfg:i[a],itemData:C,obj:w,target:v,tracker:g,trackType:h}),y.push(w)}}}m?o.push.apply(o,Rs(n.collect(v,{main:f,propsArr:d,props:p}))):o.push.apply(o,y)}return o}function Qs(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 eu(e,t){var r,n,i,o,a,s=new iu(e),u=+e.value&&(s.value=e.value),l=[s];for(null==t&&(t=tu);r=l.pop();)if(u&&(r.value=+r.data.value),(i=t(r.data))&&(a=i.length))for(r.children=new Array(a),o=a-1;o>=0;--o)l.push(n=r.children[o]=new iu(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(nu)}function tu(e){return e.children}function ru(e){e.data=e.data.data}function nu(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function iu(e){this.data=e,this.depth=this.height=0,this.parent=null}function ou(e){if("function"!=typeof e)throw new Error;return e}iu.prototype=eu.prototype={constructor:iu,count:function(){return this.eachAfter(Qs)},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 eu(this).eachBefore(ru)}};var au={depth:-1},su={};function uu(e){return e.id}function lu(e){return e.parentId}function cu(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 u=cu(r,i[s]);Array.isArray(u)?a.push.apply(a,Rs(u)):a.push(u)}return a}if(!n[o]&&Array.isArray(i)){var l=new Array(i.length);r=n.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=cu(r,i[c]);return l}n[o]in i&&(i=i[n[o]])}return i}function pu(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,Rs(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&n.push.apply(n,Rs(pu(e[o].children,t-1,r)));return n}function fu(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=Rs(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 pu(e.children,o-1,r)}}return!1}function du(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 mu=/^qDimensionInfo(?:\/(\d+))?/,hu=/^\/?qMeasureInfo\/(\d+)/,gu=/\/qAttrExprInfo\/(\d+)/,vu=/\/qAttrDimInfo\/(\d+)/;function yu(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 bu(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,u=-1,l=-1,c=n,p=r.qEffectiveInterColumnSortOrder,f=yu(r);return mu.test(c)&&(i=!0,o=+mu.exec(c)[1],c=n.replace(mu,"")),hu.test(c)&&("K"===r.qMode?u=+hu.exec(c)[1]:p&&-1!==p.indexOf(-1)?(u=+hu.exec(c)[1],l=0):l=+hu.exec(c)[1],c=c.replace(hu,"")),c&&(vu.exec(c)?s=+vu.exec(c)[1]:gu.exec(c)&&(a=+gu.exec(c)[1])),{fieldDepth:(i?"S"===r.qMode?f[o]:p?p.indexOf(o):o:p&&-1!==p.indexOf(-1)?p.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:u,measureIdx:l,attrDimIdx:s,attrIdx:a}}function xu(e,t){var r,n,i=fu(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 qu(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 Du(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 u=r[t[s]],l=u.fields||[u],c=void 0,p=void 0;u.fields&&(c=[],p=[]);for(var f=function(e){var r=l[e],f=void 0,d=void 0,m=void 0,h=void 0,g=void 0,v=void 0;if("primitive"===r.type?(m=r.value,v=String(r.value)):("function"==typeof r.value&&(f=function(e){return r.value(e,n)}),"function"==typeof r.label&&(d=function(e){return r.label(e,n)}),r.accessor?(h=r.accessor(n),Array.isArray(h)?(g=h.map(r.valueAccessor),r.attrAccessor&&(g=g.map(r.attrAccessor)),f&&(m=g.map(f),f=null),d&&(v=g.map(d),d=null),m=r.reduce?r.reduce(m):m,v=r.reduceLabel?r.reduceLabel(v,m):String(m)):v=m=r.attrAccessor?r.attrAccessor(r.valueAccessor(h)):r.valueAccessor(h)):(m=i,v=i)),u.fields){var y=f?f(m):m;c.push(y),p.push(d&&null!=v?d(v):null!=v?v:String(y))}else{var b=f?f(m):m;o[t[s]]={value:b,label:d?d(v):null!=v?v:String(b)},r.field&&(o[t[s]].source={field:r.field.key(),key:a})}},d=0;d<l.length;d++)f(d);c&&(o[t[s]]={value:"function"==typeof u.value?u.value(c,n):c,label:"function"==typeof u.label?u.label(p,n):p})}}var Cu=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=cu(n,e);return o&&o[0]?(t.tree=eu(o[0],r.children||function(e){return e[i]}),t.tree):null};function wu(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 u=t[s],l="__root",c=!1,p=0;p<i.length;p++){var f=u[i[p]],d="".concat(l,"__").concat(f.qText);a[d]||(a[d]=ks({__id:d,__parent:l,qValues:[]},f),c=!0),l=d}if(c)for(var m=0;m<o.length;m++){var h=u[o[m]];a[l].qValues.push(h)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=uu,t=lu;function r(r){var n,i,o,a,s,u,l,c=r.length,p=new Array(c),f={};for(i=0;i<c;++i)n=r[i],s=p[i]=new iu(n),null!=(u=e(n,i,r))&&(u+="")&&(f[l="$"+(s.id=u)]=l in f?su:s);for(i=0;i<c;++i)if(s=p[i],null!=(u=t(r[i],i,r))&&(u+="")){if(!(a=f["$"+u]))throw new Error("missing: "+u);if(a===su)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=au,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(nu),o.parent=null,c>0)throw new Error("cycle");return o}return r.id=function(t){return arguments.length?(e=ou(t),r):e},r.parentId=function(e){return arguments.length?(t=ou(e),r):t},r}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var Su=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 u=r[t[s]],l=u.fields?u.fields:[u],c=0;c<l.length;c++){var p=l[c];if(p.field!==a){var f=xu(o,bu(p.field,{cube:n,cache:i}));p.accessor=f.nodeFn,p.valueAccessor=f.valueFn,p.attrAccessor=f.attrFn}}};function Mu(){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?wu(t):Cu(i,r,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 p=yu(i),f=p[l-1];c=r.fields[f]}else{var d=i.qEffectiveInterColumnSortOrder[l-1];l>i.qEffectiveInterColumnSortOrder.length&&(d=i.qDimensionInfo.length),c=r.fields[d]}var m=n.normalizeConfig(ks(ks({},e),{},{field:c?c.key():void 0}),t),h=m.props,g=m.main,v=Object.keys(h);u[l]={propsArr:v,props:h,main:g};var y=c?bu(c,{cube:i,cache:r}):{fieldDepth:0};Su({propsArr:v,props:h,cube:i,cache:r,itemDepthObject:y,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=u[q[D].depth].propsArr,w=u[q[D].depth].props,S=u[q[D].depth].main,M=x[D],E=M.data,I=qu(S,E,{key:o});Du({propsArr:C,props:w,item:M,itemData:E,ret:I,sourceKey:o,isTree:!0}),q[D].data=I}return a}function Eu(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(),u=t.key();if(!Cu(s,r,e))continue;var l="object"===Es(i[a].field)?i[a].field:t.field(i[a].field),c=n.normalizeConfig(i[a],t),p=c.props,f=c.main,d=Object.keys(p),m=bu(l,{cube:s,cache:r}),h=xu({fieldDepth:0},m),g=h.nodeFn,v=h.attrFn,y=h.valueFn;Su({propsArr:d,props:p,cube:s,cache:r,itemDepthObject:m,f:l});for(var b=!!i[a].trackBy,x=Es(i[a].trackBy),q={},D=[],C=g(r.tree),w=[],S=0;S<C.length;S++){var M=C[S],E=v?v(y(M)):y(M);if(!f.filter||f.filter(E)){var I=qu(f,E,{key:u});Du({propsArr:d,props:p,item:M,itemData:E,ret:I,sourceKey:u}),b&&n.track({cfg:i[a],itemData:E,obj:I,target:D,tracker:q,trackType:x}),w.push(I)}}b?o.push.apply(o,Rs(n.collect(D,{main:f,propsArr:d,props:p}))):o.push.apply(o,w)}return o}var Iu,Ou=(function(e){
7
+ import e from"hammerjs";import t from"picasso.js";import r from"picasso-plugin-q";import n from"picasso-plugin-hammer";import i from"react";import{Button as o,Popover as a,List as s,ListItem as u,ListItemIcon as l,ListItemText as c}from"@material-ui/core";import p from"react-dom";import{createGenerateClassName as f,StylesProvider as d,ThemeProvider as m}from"@material-ui/styles";import{useOptions as h,useElement as g,useSelections as v,useState as y,useLayout as b,useAction as x,useEffect as q,useModel as D,useApp as C,useTranslator as w,useStaleLayout as S,usePlugins as M,useEmbed as E,useTheme as I,useConstraints as O,useAppLayout as T,usePromise as A,useRect as j,onTakeSnapshot as k,useImperativeHandle as L}from"@nebula.js/stardust";var P={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}}};function N(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 R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,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,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function V(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){_(o,n,i,a,s,"next",e)}function s(e){_(o,n,i,a,s,"throw",e)}a(void 0)}))}}function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(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 U(e,t,r){return t&&z(e.prototype,t),r&&z(e,r),e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(){return(W=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 Y(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&&$(e,t)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(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 Z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Z(e):t}function X(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 r,n=K(e);if(t){var i=K(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return G(this,r)}}function Q(e,t,r){return(Q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=K(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||re(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 te(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)||re(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 re(e,t){if(e){if("string"==typeof e)return ne(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)?ne(e,t):void 0}}function ne(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 ie=function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return e?e.getStyle(t,r,n):i};function oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ae=Object.prototype.hasOwnProperty,se=Object.prototype.toString,ue=Object.defineProperty,le=Object.getOwnPropertyDescriptor,ce=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===se.call(e)},pe=function(e){if(!e||"[object Object]"!==se.call(e))return!1;var t,r=ae.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ae.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||ae.call(e,t)},fe=function(e,t){ue&&"__proto__"===t.name?ue(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(!ae.call(e,t))return;if(le)return le(e,t).value}return e[t]},me=function e(){var t,r,n,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(r in t)n=de(s,r),s!==(i=de(t,r))&&(c&&i&&(pe(i)||(o=ce(i)))?(o?(o=!1,a=n&&ce(n)?n:[]):a=n&&pe(n)?n:{},fe(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&fe(s,{name:r,newValue:i}));return s},he="center",ge="bottom",ve={NoDataExist:{label:"NoDataExist",alignment:he,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:he,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:he,default:!1},LimitedData:{label:"LimitedData",alignment:ge,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:ge,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:ge,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:ge,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}]],be={};ye.forEach((function(e){var t=ee(e,2),r=t[0],n=t[1],i=n.width,o=n.height;be[r]={width:i,height:o}}));var xe=function(){return be};function qe(e,t){return{layoutModes:xe(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?R({align:.5,preserveAspectRatio:!0},t.logicalSize):void 0}}var De=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};function Ce(e,t){var r=e.component(t);return r&&r._DO_NOT_USE_getInfo&&r._DO_NOT_USE_getInfo().offset}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 Se(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,r=e.data,n=e.style;return r[0].map((function(e){return t("tr",{},function(e,t){var r=t.h,n=t.style;return e.map((function(e){var t={style:R(R({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(t.colspan=e.colspan),r("td",t,e.content)}))}(e,{h:t,style:n}))}))},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 Me=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ee=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Ie=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Oe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:function(e){return Me.test(e)},isRtlChar:function(e){return Ee.test(e)||Ie.test(e)},detectTextDirection:function(e){var t,r,n=e?e.length:0;for(t=0;t<n;t++){if(r=e[t],Oe.isLtrChar(r))return"ltr";if(Oe.isRtlChar(r))return"rtl"}return"ltr"}},Te={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,r){var n=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(r.coloring.label&&(a.label="".concat(r.coloring.label)),"color"!==r.coloring.type&&n.fillTooltip){var s=i("fill"),u="measure"===r.coloring.fieldType;if(a.value=u&&s?s(n.fillTooltip.value):n.fillTooltip.label?n.fillTooltip.label:n.fillTooltip.value,!r.coloring.label){var l=o(n.fillTooltip.source.key).field(n.fillTooltip.source.field).title();a.label="".concat(l)}}return a.fill=void 0===n._fillColor?Te.getNodeFillColor(t):n._fillColor,a},getMeasure:function(e,t){var r=e(t.source.key).field(t.source.field).title();return{label:"".concat(r),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 r=Oe.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t.rtl?"right":"left",direction:r},colspan:2},{}]},getDescriptionRow:function(e,t){var r=Oe.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t.rtl?"right":"left",direction:r},colspan:2},{}]},getFooterRow:function(e,t){var r=Oe.detectTextDirection(e);return[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t.rtl?"right":"left",direction:r},colspan:2},{}]},getImageRow:function(e,t){var r=Oe.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"}}));var o=e.imageError?"".concat(e.src,"?").concat(Math.random()):e.src;n.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,n),""],style:{"text-align":t.rtl?"right":"left",direction:r,"max-width":e.width},colspan:2},{}]},getNMoreRow:function(e,t,r){var n=t?t.get("Object.ChartTooltip.NMore",e):"+".concat(e," more"),i=Oe.detectTextDirection(n);return[{content:n,style:{"font-weight":"bold","text-align":r.rtl?"right":"left",direction:i},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){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Oe.detectTextDirection(t.color.label),i=r.rtl?[":",t.color.label]:[t.color.label,":"],o=Oe.detectTextDirection(t.color.value),a=r.rtl?[t.color.value,Te.getColorSymbol(e,t)]:[Te.getColorSymbol(e,t),t.color.value];return[{content:i,style:{"text-align":r.rtl?"right":"left",direction:n}},{content:a,style:{"text-align":r.rtl?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow:function(e,t,r){var n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=Oe.detectTextDirection(e.label),s=i.rtl?[":",e.label]:[e.label,":"],u=Oe.detectTextDirection(e.value);return n=o?i.rtl?[e.value,Te.getColorSymbol(t,r)]:[Te.getColorSymbol(t,r),e.value]:[e.value],[{content:s,style:{"text-align":i.rtl?"right":"left",direction:a}},{content:n,style:{"text-align":i.rtl?"left":"right",direction:u,"vertical-align":"middle"}}]}};function Ae(e,t,r,n){var i=parseInt(ie(e,t,r,n),10);if(!isNaN(i))return i}var je=function(e){return function(t){return e.getContrastingColorTo(t.node.attrs.fill)}};function ke(e,t){return{padding:10,placements:e.simplifiedPlacements.map((function(r){return function(e,t,r){return{position:e.position,justify:e.justify,fill:e.onBackground?ie(t,r,"label.value","color"):je(t),overflow:e.overflow,padding:e.padding}}(r,t,e.themeId)})),fontSize:Ae(t,e.themeId,"label.value","fontSize"),fontFamily:ie(t,e.themeId,"label.value","fontFamily"),label:e.label}}function Le(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Pe(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ne(){}var Re="\\s*([+-]?\\d+)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ve=/^#([0-9a-f]{3,8})$/,He=new RegExp("^rgb\\("+[Re,Re,Re]+"\\)$"),ze=new RegExp("^rgb\\("+[_e,_e,_e]+"\\)$"),Ue=new RegExp("^rgba\\("+[Re,Re,Re,Fe]+"\\)$"),Be=new RegExp("^rgba\\("+[_e,_e,_e,Fe]+"\\)$"),We=new RegExp("^hsl\\("+[Fe,_e,_e]+"\\)$"),Ye=new RegExp("^hsla\\("+[Fe,_e,_e,Fe]+"\\)$"),Ke={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 $e(){return this.rgb().formatHex()}function Je(){return this.rgb().formatRgb()}function Ze(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ve.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ge(t):3===r?new et(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Xe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Xe(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=He.exec(e))?new et(t[1],t[2],t[3],1):(t=ze.exec(e))?new et(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ue.exec(e))?Xe(t[1],t[2],t[3],t[4]):(t=Be.exec(e))?Xe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=We.exec(e))?it(t[1],t[2]/100,t[3]/100,1):(t=Ye.exec(e))?it(t[1],t[2]/100,t[3]/100,t[4]):Ke.hasOwnProperty(e)?Ge(Ke[e]):"transparent"===e?new et(NaN,NaN,NaN,0):null}function Ge(e){return new et(e>>16&255,e>>8&255,255&e,1)}function Xe(e,t,r,n){return n<=0&&(e=t=r=NaN),new et(e,t,r,n)}function Qe(e){return e instanceof Ne||(e=Ze(e)),e?new et((e=e.rgb()).r,e.g,e.b,e.opacity):new et}function et(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function tt(){return"#"+nt(this.r)+nt(this.g)+nt(this.b)}function rt(){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 nt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function it(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new at(e,t,r,n)}function ot(e){if(e instanceof at)return new at(e.h,e.s,e.l,e.opacity);if(e instanceof Ne||(e=Ze(e)),!e)return new at;if(e instanceof at)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,u=(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/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new at(a,s,u,e.opacity)}function at(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function st(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Le(Ne,Ze,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:$e,formatHex:$e,formatHsl:function(){return ot(this).formatHsl()},formatRgb:Je,toString:Je}),Le(et,(function(e,t,r,n){return 1===arguments.length?Qe(e):new et(e,t,r,null==n?1:n)}),Pe(Ne,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new et(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new et(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:tt,formatHex:tt,formatRgb:rt,toString:rt})),Le(at,(function(e,t,r,n){return 1===arguments.length?ot(e):new at(e,t,r,null==n?1:n)}),Pe(Ne,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new at(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new at(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 et(st(e>=240?e-240:e+120,i,n),st(e,i,n),st(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 ut=Math.PI/180,lt=180/Math.PI,ct=4/29,pt=6/29,ft=3*pt*pt;function dt(e){if(e instanceof mt)return new mt(e.l,e.a,e.b,e.opacity);if(e instanceof qt)return Dt(e);e instanceof et||(e=Qe(e));var t,r,n=yt(e.r),i=yt(e.g),o=yt(e.b),a=ht((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=ht((.4360747*n+.3850649*i+.1430804*o)/.96422),r=ht((.0139322*n+.0971045*i+.7141733*o)/.82521)),new mt(116*a-16,500*(t-a),200*(a-r),e.opacity)}function mt(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function ht(e){return e>.008856451679035631?Math.pow(e,1/3):e/ft+ct}function gt(e){return e>pt?e*e*e:ft*(e-ct)}function vt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function bt(e){if(e instanceof qt)return new qt(e.h,e.c,e.l,e.opacity);if(e instanceof mt||(e=dt(e)),0===e.a&&0===e.b)return new qt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*lt;return new qt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function xt(e,t,r,n){return 1===arguments.length?bt(e):new qt(e,t,r,null==n?1:n)}function qt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Dt(e){if(isNaN(e.h))return new mt(e.l,0,0,e.opacity);var t=e.h*ut;return new mt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Ct(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}Le(mt,(function(e,t,r,n){return 1===arguments.length?dt(e):new mt(e,t,r,null==n?1:n)}),Pe(Ne,{brighter:function(e){return new mt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new mt(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 et(vt(3.1338561*(t=.96422*gt(t))-1.6168667*(e=1*gt(e))-.4906146*(r=.82521*gt(r))),vt(-.9787684*t+1.9161415*e+.033454*r),vt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Le(qt,xt,Pe(Ne,{brighter:function(e){return new qt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new qt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Dt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,r){return Ct(e(t),r)}}(e))}(Ct);function wt(){}function St(e,t){var r=new wt;if(e instanceof wt)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 Mt(){}wt.prototype=St.prototype={constructor:wt,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 Et=St.prototype;function It(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 Tt(){}Mt.prototype={constructor:Mt,has:Et.has,add:function(e){return this["$"+(e+="")]=e,this},remove:Et.remove,clear:Et.clear,values:Et.keys,size:Et.size,empty:Et.empty,each:Et.each};var At=1/.7,jt="\\s*([+-]?\\d+)\\s*",kt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pt=/^#([0-9a-f]{3})$/,Nt=/^#([0-9a-f]{6})$/,Rt=new RegExp("^rgb\\("+[jt,jt,jt]+"\\)$"),Ft=new RegExp("^rgb\\("+[Lt,Lt,Lt]+"\\)$"),_t=new RegExp("^rgba\\("+[jt,jt,jt,kt]+"\\)$"),Vt=new RegExp("^rgba\\("+[Lt,Lt,Lt,kt]+"\\)$"),Ht=new RegExp("^hsl\\("+[kt,Lt,Lt]+"\\)$"),zt=new RegExp("^hsla\\("+[kt,Lt,Lt,kt]+"\\)$"),Ut={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=Pt.exec(e))?new $t((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=Nt.exec(e))?Wt(parseInt(t[1],16)):(t=Rt.exec(e))?new $t(t[1],t[2],t[3],1):(t=Ft.exec(e))?new $t(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=_t.exec(e))?Yt(t[1],t[2],t[3],t[4]):(t=Vt.exec(e))?Yt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ht.exec(e))?Zt(t[1],t[2]/100,t[3]/100,1):(t=zt.exec(e))?Zt(t[1],t[2]/100,t[3]/100,t[4]):Ut.hasOwnProperty(e)?Wt(Ut[e]):"transparent"===e?new $t(NaN,NaN,NaN,0):null}function Wt(e){return new $t(e>>16&255,e>>8&255,255&e,1)}function Yt(e,t,r,n){return n<=0&&(e=t=r=NaN),new $t(e,t,r,n)}function Kt(e){return e instanceof Tt||(e=Bt(e)),e?new $t((e=e.rgb()).r,e.g,e.b,e.opacity):new $t}function $t(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Jt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Zt(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 Gt(e){if(e instanceof Xt)return new Xt(e.h,e.s,e.l,e.opacity);if(e instanceof Tt||(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,u=(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/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Xt(a,s,u,e.opacity)}function Xt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Qt(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}It(Tt,Bt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),It($t,(function(e,t,r,n){return 1===arguments.length?Kt(e):new $t(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return e=null==e?At:Math.pow(At,e),new $t(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new $t(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"#"+Jt(this.r)+Jt(this.g)+Jt(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+")")}})),It(Xt,(function(e,t,r,n){return 1===arguments.length?Gt(e):new Xt(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return e=null==e?At:Math.pow(At,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 $t(Qt(e>=240?e-240:e+120,i,n),Qt(e,i,n),Qt(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 er=Math.PI/180,tr=180/Math.PI,rr=4/29,nr=6/29,ir=3*nr*nr;function or(e){if(e instanceof ar)return new ar(e.l,e.a,e.b,e.opacity);if(e instanceof fr){if(isNaN(e.h))return new ar(e.l,0,0,e.opacity);var t=e.h*er;return new ar(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof $t||(e=Kt(e));var r,n,i=cr(e.r),o=cr(e.g),a=cr(e.b),s=sr((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?r=n=s:(r=sr((.4360747*i+.3850649*o+.1430804*a)/.96422),n=sr((.0139322*i+.0971045*o+.7141733*a)/.82521)),new ar(116*s-16,500*(r-s),200*(s-n),e.opacity)}function ar(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function sr(e){return e>.008856451679035631?Math.pow(e,1/3):e/ir+rr}function ur(e){return e>nr?e*e*e:ir*(e-rr)}function lr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function cr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pr(e){if(e instanceof fr)return new fr(e.h,e.c,e.l,e.opacity);if(e instanceof ar||(e=or(e)),0===e.a&&0===e.b)return new fr(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*tr;return new fr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function fr(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}It(ar,(function(e,t,r,n){return 1===arguments.length?or(e):new ar(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return new ar(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new ar(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 $t(lr(3.1338561*(t=.96422*ur(t))-1.6168667*(e=1*ur(e))-.4906146*(r=.82521*ur(r))),lr(-.9787684*t+1.9161415*e+.033454*r),lr(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),It(fr,(function(e,t,r,n){return 1===arguments.length?pr(e):new fr(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return new fr(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new fr(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return or(this).rgb()}}));var dr=-.29227,mr=-.90649,hr=1.97294,gr=hr*mr,vr=1.78277*hr,yr=-.6557636667999999;function br(e){if(e instanceof xr)return new xr(e.h,e.s,e.l,e.opacity);e instanceof $t||(e=Kt(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(yr*n+gr*t-vr*r)/(yr+gr-vr),o=n-i,a=(hr*(r-i)-dr*o)/mr,s=Math.sqrt(a*a+o*o)/(hr*i*(1-i)),u=s?Math.atan2(a,o)*tr-120:NaN;return new xr(u<0?u+360:u,s,i,e.opacity)}function xr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function qr(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)]}It(xr,(function(e,t,r,n){return 1===arguments.length?br(e):new xr(e,t,r,null==n?1:n)}),Ot(Tt,{brighter:function(e){return e=null==e?At:Math.pow(At,e),new xr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new xr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*er,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new $t(255*(t+r*(-.14861*n+1.78277*i)),255*(t+r*(dr*n+mr*i)),255*(t+r*(hr*n)),this.opacity)}}));var Dr,Cr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wr(e){return new Sr(e)}function Sr(e){if(!(t=Cr.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 Mr(e,t){var r=qr(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")}wr.prototype=Sr.prototype,Sr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Er={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Mr(100*e,t)},r:Mr,s:function(e,t){var r=qr(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Dr=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")+qr(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 Ir(e){return e}var Or=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Tr(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],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}):Ir,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):Ir,s=e.percent||"%";function u(e){var t=(e=wr(e)).fill,r=e.align,u=e.sign,l=e.symbol,c=e.zero,p=e.width,f=e.comma,d=e.precision,m=e.trim,h=e.type;"n"===h?(f=!0,h="g"):Er[h]||(null==d&&(d=12),m=!0,h="g"),(c||"0"===t&&"="===r)&&(c=!0,t="0",r="=");var g="$"===l?i[0]:"#"===l&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",v="$"===l?i[1]:/[%p]/.test(h)?s:"",y=Er[h],b=/[defgprs%]/.test(h);function x(e){var i,s,l,x=g,q=v;if("c"===h)q=y(e)+q,e="";else{var D=(e=+e)<0;if(e=y(Math.abs(e),d),m&&(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)),D&&0==+e&&(D=!1),x=(D?"("===u?u:"-":"-"===u||"("===u?"":u)+x,q=("s"===h?Or[8+Dr/3]:"")+q+(D&&"("===u?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(l=e.charCodeAt(i))||l>57){q=(46===l?o+e.slice(i+1):e.slice(i))+q,e=e.slice(0,i);break}}f&&!c&&(e=n(e,1/0));var C=x.length+e.length+q.length,w=C<p?new Array(p-C+1).join(t):"";switch(f&&c&&(e=n(w+e,w.length?p-q.length:1/0),w=""),r){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return d=null==d?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),x.toString=function(){return e+""},x}return{format:u,formatPrefix:function(e,t){var r=u(((e=wr(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=qr(Math.abs(e)))?e[1]:NaN}(t)/3))),i=Math.pow(10,-n),o=Or[8+n/3];return function(e){return r(i*e)+o}}}}!function(e){Tr(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ar=new Date,jr=new Date;function kr(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 kr((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 Ar.setTime(+t),jr.setTime(+n),e(Ar),e(jr),Math.floor(r(Ar,jr))},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 Lr=kr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Lr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?kr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):Lr:null};kr((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()})),kr((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()})),kr((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 Pr=kr((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 Nr(e){return kr((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 Rr=Nr(0),Fr=Nr(1);Nr(2),Nr(3);var _r=Nr(4);Nr(5),Nr(6),kr((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 Vr=kr((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()}));Vr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?kr((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},kr((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()})),kr((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()}));var Hr=kr((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 zr(e){return kr((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 Ur=zr(0),Br=zr(1);zr(2),zr(3);var Wr=zr(4);zr(5),zr(6),kr((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()}));var Yr=kr((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 Kr(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 $r(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 Jr(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Yr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?kr((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 Zr,Gr,Xr,Qr={"-":"",_:" ",0:"0"},en=/^\s*\d+/,tn=/^%/,rn=/[\\^$*+?|[\]().{}]/g;function nn(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 on(e){return e.replace(rn,"\\$&")}function an(e){return new RegExp("^(?:"+e.map(on).join("|")+")","i")}function sn(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function un(e,t,r){var n=en.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function ln(e,t,r){var n=en.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function cn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function pn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function fn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function dn(e,t,r){var n=en.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function mn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function hn(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 gn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function vn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function yn(e,t,r){var n=en.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function bn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function xn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function qn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Dn(e,t,r){var n=en.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Cn(e,t,r){var n=en.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function wn(e,t,r){var n=tn.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Sn(e,t,r){var n=en.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Mn(e,t,r){var n=en.exec(t.slice(r));return n?(e.Q=1e3*+n[0],r+n[0].length):-1}function En(e,t){return nn(e.getDate(),t,2)}function In(e,t){return nn(e.getHours(),t,2)}function On(e,t){return nn(e.getHours()%12||12,t,2)}function Tn(e,t){return nn(1+Pr.count(Vr(e),e),t,3)}function An(e,t){return nn(e.getMilliseconds(),t,3)}function jn(e,t){return An(e,t)+"000"}function kn(e,t){return nn(e.getMonth()+1,t,2)}function Ln(e,t){return nn(e.getMinutes(),t,2)}function Pn(e,t){return nn(e.getSeconds(),t,2)}function Nn(e){var t=e.getDay();return 0===t?7:t}function Rn(e,t){return nn(Rr.count(Vr(e),e),t,2)}function Fn(e,t){var r=e.getDay();return e=r>=4||0===r?_r(e):_r.ceil(e),nn(_r.count(Vr(e),e)+(4===Vr(e).getDay()),t,2)}function _n(e){return e.getDay()}function Vn(e,t){return nn(Fr.count(Vr(e),e),t,2)}function Hn(e,t){return nn(e.getFullYear()%100,t,2)}function zn(e,t){return nn(e.getFullYear()%1e4,t,4)}function Un(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+nn(t/60|0,"0",2)+nn(t%60,"0",2)}function Bn(e,t){return nn(e.getUTCDate(),t,2)}function Wn(e,t){return nn(e.getUTCHours(),t,2)}function Yn(e,t){return nn(e.getUTCHours()%12||12,t,2)}function Kn(e,t){return nn(1+Hr.count(Yr(e),e),t,3)}function $n(e,t){return nn(e.getUTCMilliseconds(),t,3)}function Jn(e,t){return $n(e,t)+"000"}function Zn(e,t){return nn(e.getUTCMonth()+1,t,2)}function Gn(e,t){return nn(e.getUTCMinutes(),t,2)}function Xn(e,t){return nn(e.getUTCSeconds(),t,2)}function Qn(e){var t=e.getUTCDay();return 0===t?7:t}function ei(e,t){return nn(Ur.count(Yr(e),e),t,2)}function ti(e,t){var r=e.getUTCDay();return e=r>=4||0===r?Wr(e):Wr.ceil(e),nn(Wr.count(Yr(e),e)+(4===Yr(e).getUTCDay()),t,2)}function ri(e){return e.getUTCDay()}function ni(e,t){return nn(Br.count(Yr(e),e),t,2)}function ii(e,t){return nn(e.getUTCFullYear()%100,t,2)}function oi(e,t){return nn(e.getUTCFullYear()%1e4,t,4)}function ai(){return"+0000"}function si(){return"%"}function ui(e){return+e}function li(e){return Math.floor(+e/1e3)}!function(e){Zr=function(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=an(i),c=sn(i),p=an(o),f=sn(o),d=an(a),m=sn(a),h=an(s),g=sn(s),v=an(u),y=sn(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:En,e:En,f:jn,H:In,I:On,j:Tn,L:An,m:kn,M:Ln,p:function(e){return i[+(e.getHours()>=12)]},Q:ui,s:li,S:Pn,u:Nn,U:Rn,V:Fn,w:_n,W:Vn,x:null,X:null,y:Hn,Y:zn,Z:Un,"%":si},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:Bn,e:Bn,f:Jn,H:Wn,I:Yn,j:Kn,L:$n,m:Zn,M:Gn,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:ui,s:li,S:Xn,u:Qn,U:ei,V:ti,w:ri,W:ni,x:null,X:null,y:ii,Y:oi,Z:ai,"%":si},q={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},A:function(e,t,r){var n=p.exec(t.slice(r));return n?(e.w=f[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=v.exec(t.slice(r));return n?(e.m=y[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.m=g[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return w(e,t,r,n)},d:vn,e:vn,f:Cn,H:bn,I:bn,j:yn,L:Dn,m:gn,M:xn,p:function(e,t,r){var n=l.exec(t.slice(r));return n?(e.p=c[n[0].toLowerCase()],r+n[0].length):-1},Q:Sn,s:Mn,S:qn,u:ln,U:cn,V:pn,w:un,W:fn,x:function(e,t,n){return w(e,r,t,n)},X:function(e,t,r){return w(e,n,t,r)},y:mn,Y:dn,Z:hn,"%":wn};function D(e,t){return function(r){var n,i,o,a=[],s=-1,u=0,l=e.length;for(r instanceof Date||(r=new Date(+r));++s<l;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=Qr[n=e.charAt(++s)])?n=e.charAt(++s):i="e"===n?" ":"0",(o=t[n])&&(n=o(r,i)),a.push(n),u=s+1);return a.push(e.slice(u,s)),a.join("")}}function C(e,t){return function(r){var n,i,o=Jr(1900);if(w(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=$r(Jr(o.y))).getUTCDay(),n=i>4||0===i?Br.ceil(n):Br(n),n=Hr.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(Jr(o.y))).getDay(),n=i>4||0===i?Fr.ceil(n):Fr(n),n=Pr.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?$r(Jr(o.y)).getUTCDay():t(Jr(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,$r(o)):t(o)}}function w(e,t,r,n){for(var i,o,a=0,s=t.length,u=r.length;a<s;){if(n>=u)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=q[i in Qr?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=D(r,b),b.X=D(n,b),b.c=D(t,b),x.x=D(r,x),x.X=D(n,x),x.c=D(t,x),{format:function(e){var t=D(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",Kr);return t.toString=function(){return e},t},utcFormat:function(e){var t=D(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e,$r);return t.toString=function(){return e},t}}}(e),Gr=Zr.utcFormat,Xr=Zr.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||Gr("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||Xr("%Y-%m-%dT%H:%M:%S.%LZ");var ci=me.bind(null,!0),pi={},fi=Array.isArray;function di(e){return null!=e&&!Array.isArray(e)&&"object"===F(e)}function mi(e){return void 0===e}function hi(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function gi(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=isNaN(r)?{}:[];e[r||t]=mi(e[r||t])?o:e[t],e=e[r||t]}})),e}function vi(e,t){var r=!0;if(di(e)&&di(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){vi(e[n],t[n])||(r=!1)})),r);if(fi(e)&&fi(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!vi(e[n],t[n]))return!1;return!0}return e===t}pi.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?ci({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);vi(o,a)||hi(t,i)||(mi(a)?n.push({op:"add",path:s,value:o}):di(o)&&di(a)?n=n.concat(pi.generate(a,o,s)):fi(o)&&fi(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&mi(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(vi(t,i))return n;if(!mi(t[0])&&mi(t[0].qInfo)||0===t.length)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(pi.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(n.push({op:"move",path:"".concat(r,"/").concat(u),from:"".concat(r,"/").concat(o)}),i.splice(u,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){mi(t[i])&&!hi(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},pi.apply=function(e,t){t.forEach((function(t){var r,n=gi(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&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(fi(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(fi(o)&&fi(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,te(u))}else if(di(o)&&di(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!hi(r,e)&&delete r[e]})),ci(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 l=gi(e,t.from);fi(n)?n.splice(+i,0,l.splice(+a,1)[0]):(n[i]=l[a],delete l[a])}else"remove"===t.op&&(fi(n)?n.splice(+i,1):delete n[i])}))},pi.clone=function(e){return ci({},e)},pi.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},pi.updateObject=function(e,t){Object.keys(e).length?pi.apply(e,pi.generate(e,t)):ci(e,t)};var yi=[[2,4,6],[2,4],[3]],bi=[,[,,[[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 xi(e,t,r){var n,i=e?e.length:0,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(n=1;n<i;n++)o=Math.min(o,e[n]/e[n-1]);void 0!==r&&(o=Math.min(o,r/e[i-1])),e.splice(0,0,o)}function qi(e,t,r){var n,i=e?e.length:0;for(n=0;n<i;n++)xi(e[n],t,r)}!function(){var e,t;for(qi(yi,1,10),e=0;e<bi.length;e++)if(bi[e])for(t=0;t<bi[e].length;t++)Array.isArray(bi[e][t])&&qi(bi[e][t])}();var Di={exports:{}};function Ci(){}function wi(){}wi.resetWarningCache=Ci;Di.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:wi,resetWarningCache:Ci};return r.PropTypes=r,r}();var Si=Di.exports;function Mi(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Ei(e){var t=e.d,r=e.size,n=e.style,o=void 0===n?{}:n,a=e.viewBox,s=void 0===a?"0 0 16 16":a,u=R({fontSize:Mi(r),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},o);return i.createElement("i",{style:u},i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:s,fill:"currentColor"},i.createElement("path",{d:t})))}var Ii={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"},Oi={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"},Ti="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Ai={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"},ji={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 ki(e,t,r){(function(e){var t=e.model,r=e.properties;return t.modifiers?t.modifiers.apply({model:t,properties:r}):Promise.resolve()})({model:e,properties:r}).then((function(){e.colorSupport&&e.colorSupport.colorByUpdater(r,"qHyperCubeDef.");var n=pi.generate(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))}))}function Li(e,t,r,n,i,o){e.getEffectiveProperties().then((function(a){var s=me(!0,{},a),u=s.qHyperCubeDef[n][t],l=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r];l.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(l.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),s.qHyperCubeDef[n][t]=l,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r]=u,i&&i({oldItem:u,newItem:l,oldProperties:a,newProperties:s,model:e}),ki(e,a,s)}))}function Pi(e){return"H"===e.qGrouping?e.title||"":e.qFallbackTitle||""}function Ni(e){var t=e.dir,r=e.dock,n=e.altList,i=e.model,o=e.translator,a=e.app,s=e.onChange;return 0===n.length?null:{dir:t,dock:r,getAlternatives:function(){var e=n.map((function(e){return function(e,t,r){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:r.get("Object.ErrorMessage.MissingDimension")}));var n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);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){Li(i,e,t,"qDimensions",s)}}}function Ri(e,t,r){var n=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:Pi(e),drillUp:function(e){r.drillUp(n,t,e)}}}function Fi(e){var t=e.altList,r=e.app,n=e.dir,i=e.dock,o=e.model,a=e.onChange,s=e.skipAttributeExpressions,u=e.translator;return 0===t.length?null:{dir:n,dock:i,getAlternatives:function(){var e=t.map((function(e){return function(e,t,r){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:r.get("Object.ErrorMessage.MissingMeasure")}));var n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);var i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,r,u).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){Li(o,e,t,"qMeasures",a,s)}}}function _i(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}var Vi=["children"],Hi={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"}}},zi=function(e){var t=e.children,r=J(e,Vi);return i.createElement(o,W({size:"small",disableRipple:!0,disableTouchRipple:!0},r),t)};function Ui(){function e(e){var t=e.title,r=e.selected,n=e.onClick,o=Oe.detectTextDirection(t);return i.createElement(u,{button:!0,onClick:n,style:{textAlign:"start"}},i.createElement(l,{style:{minWidth:32}},i.createElement(Ei,{d:r?Ti:""})),i.createElement(c,{primaryTypographyProps:{dir:o}},t))}function t(t){var r=t.alignTo,n=t.changeTo,o=t.current,u=t.dir,l=t.dock,c=t.list,p=t.onClose,f=t.show,d=c.map((function(t,r){return i.createElement(e,{key:t.id,title:t.title,onClick:function(){return n(r)}})}));return i.createElement(a,W({anchorEl:r,open:f,onClose:p},Hi[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),i.createElement(s,{dense:!0,dir:u,component:"nav"},i.createElement(e,{title:o,selected:!0,onClick:p}),d))}e.propTypes={title:Si.string.isRequired,selected:Si.bool,onClick:Si.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:Si.any,changeTo:Si.func.isRequired,current:Si.string.isRequired,dir:Si.string.isRequired,dock:Si.string.isRequired,list:Si.array,onClose:Si.func.isRequired,show:Si.bool.isRequired},t.defaultProps={list:[],alignTo:null};var r=function(e){Y(n,i.Component);var r=X(n);function n(e){var t;return H(this,n),(t=r.call(this,e)).state={open:!1,inSelection:e.selections&&e.selections.isActive()},t.openPopover=t.openPopover.bind(Z(t)),t.closePopover=t.closePopover.bind(Z(t)),t.changeTo=t.changeTo.bind(Z(t)),t.alignToRef=i.createRef(),t}return U(n,[{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,r=e.titleData,n=e.popover,o=e.translator,a=e.disabled,s=e.isDimension,u=e.padding,l=e.minWidth,c=e.hasAlternative,p=R({flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal"},this.props.style),f=r.breadcrumbs.length,d=a||this.state.inSelection,m=r.breadcrumbs.map((function(e,t){return i.createElement(zi,{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:r.drillUp(f-t)},title:e},i.createElement("span",{style:p},e),i.createElement(Ei,W({},ji,{size:"small",style:{margin:"0 8px"}})))})),h=n&&!this.state.open?this.openPopover:this.closePopover,g=!n||a||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:!s&&g&&"20px",lineHeight:!s&&g&&"20px",border:!s&&g&&"none"};u&&(v.padding=u),l&&(v.minWidth=l);var y=Oe.detectTextDirection(r.text),b=i.createElement(zi,{style:v,onClick:g?void 0:h,title:r.text,tabIndex:"-1"},r.locked&&i.createElement(Ei,W({},Oi,{size:"small",title:o.get("Tooltip.selections.locked")})),i.createElement("span",{style:p,dir:y},r.text),n&&i.createElement(Ei,W({},Ai,{size:"small",style:{margin:"0 8px"}})));return i.createElement(i.Fragment,null,r.drilldown&&i.createElement(Ei,W({},Ii,{size:"small",title:o.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,i.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:c?"auto":"none"}},b),n&&i.createElement(t,{dock:n.dock,dir:n.dir,current:r.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}]),n}();function n(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&De(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:Si.bool.isRequired,padding:Si.string,minWidth:Si.string,titleData:Si.shape({breadcrumbs:Si.arrayOf(Si.string).isRequired,drilldown:Si.bool.isRequired,index:Si.number.isRequired,locked:Si.bool.isRequired,text:Si.string.isRequired,popoverText:Si.string.isRequired,drillUp:Si.func}).isRequired,popover:Si.shape({dir:Si.string.isRequired,dock:Si.string.isRequired,changeTo:Si.func.isRequired,getAlternatives:Si.func.isRequired}),translator:Si.shape({get:Si.func.isRequired}).isRequired,selections:Si.shape({isActive:Si.func,addListener:Si.func,removeListener:Si.func}),style:Si.shape({fontSize:Si.string,color:Si.string,fontFamily:Si.string}).isRequired,isDimension:Si.bool.isRequired,hasAlternative:Si.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||o(this.settings.settings)?28:20},render:function(){var e,t=this,a=this.settings,s=a.settings,u=s.app,l=s.disabled,c=s.explicitItemInfos,p=s.hyperCube,f=s.hyperCubeDef,d=s.isDimension,m=s.minWidth,h=s.model,g=s.onChangeToAlternative,v=s.padding,y=s.rtl,b=s.selections,x=s.skipAttributeExpressions,q=s.translator,D=a.layout.dock,C="top"!==D&&"bottom"!==D||!y?"ltr":"rtl",w=function(e,t){var r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(r.width="".concat(t.height,"px"),r.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),r.transformOrigin="top left"):"right"===e&&(r.width="".concat(t.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),r.transformOrigin="top left"),r}(D,this.rect),S=f&&f.qLayoutExclude&&f.qLayoutExclude.qHyperCubeDef,M=S&&S[d?"qDimensions":"qMeasures"]||[],E=c||p[d?"qDimensionInfo":"qMeasureInfo"],I=d?Ni:Fi,O=d?Ri:_i,T=h&&h.colorSupport&&h.modifiers&&I({altList:M,app:u,dir:y?"rtl":"ltr",dock:n(D),model:h,onChange:g,skipAttributeExpressions:x,translator:q}),A=(e=this.settings.settings).isDimension&&De(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings),j=E.map((function(e,n){var o="number"==typeof e.explicitColumn?e.explicitColumn:n,a=O(e,o,h),s=n===E.length-1;return i.createElement(i.Fragment,{key:e.cId},i.createElement(r,{popover:T,titleData:a,model:h,translator:q,selections:b,disabled:l(),style:t.style,isDimension:d,padding:v,minWidth:m,hasAlternative:A}),!s&&i.createElement("span",null,", "))}));return i.createElement("div",{style:w,dir:C},j)}}}function Bi(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 Wi(e){if(e.type)return e;if("#"===e.charAt(0))return Wi(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 Yi(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 Ki(e){var t="hsl"===(e=Wi(e)).type?Wi(function(e){var t=(e=Wi(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",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])),Yi({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 $i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ji(){return(Ji=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 Zi(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 Gi(){return(Gi=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 Xi(e){return(Xi="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 Qi(e){return(Qi="function"==typeof Symbol&&"symbol"===Xi(Symbol.iterator)?function(e){return Xi(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Xi(e)})(e)}function eo(e){return e&&"object"===Qi(e)&&!Array.isArray(e)}function to(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},n=r.clone?Gi({},e):e;return eo(e)&&eo(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(eo(t[i])&&i in e?n[i]=to(e[i],t[i],r):n[i]=t[i])})),n}var ro=["xs","sm","md","lg","xl"];function no(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=Zi(e,["values","unit","step"]);function u(e){var t="number"==typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function l(e,t){var n=ro.indexOf(t)+1;return n===ro.length?u(e):"@media (min-width:".concat(r[e]).concat(i,") and ")+"(max-width:".concat(r[ro[n]]-a/100).concat(i,")")}return Ji({keys:ro,values:r,up:u,down:function(e){var t=ro.indexOf(e)+1,n=r[ro[t]];return t===ro.length?u("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-a/100).concat(i,")")},between:l,only:function(e){return l(e,e)},width:function(e){return r[e]}},s)}function io(e,t,r){var n;return Ji({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ji({paddingLeft:t(2),paddingRight:t(2)},r,$i({},e.up("sm"),Ji({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(n={minHeight:56},$i(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),$i(n,e.up("sm"),{minHeight:64}),n)},r)}var oo="#7986cb",ao="#3f51b5",so="#303f9f",uo="#ff4081",lo="#f50057",co="#c51162",po={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"},fo="#e57373",mo="#f44336",ho="#d32f2f",go={black:"#000",white:"#fff"},vo={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:go.white,default:po[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)"}},yo={text:{primary:go.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:po[800],default:"#303030"},action:{active:go.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 bo(e,t,r,n){e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=function(e,t){if(e=Wi(e),t=Bi(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 Yi(e)}(e.main,n):"dark"===t&&(e.dark=function(e,t){if(e=Wi(e),t=Bi(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 Yi(e)}(e.main,1.5*n)))}function xo(e){var t=e.primary,r=void 0===t?{light:oo,main:ao,dark:so}:t,n=e.secondary,i=void 0===n?{light:uo,main:lo,dark:co}:n,o=e.error,a=void 0===o?{light:fo,main:mo,dark:ho}:o,s=e.type,u=void 0===s?"light":s,l=e.contrastThreshold,c=void 0===l?3:l,p=e.tonalOffset,f=void 0===p?.2:p,d=Zi(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var r=Ki(e),n=Ki(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}(e,yo.text.primary)>=c?yo.text.primary:vo.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=Ji({},e)).main&&e[t]&&(e.main=e[t]),bo(e,"light",r,f),bo(e,"dark",n,f),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:yo,light:vo};return to(Ji({common:go,type:u,primary:h(r),secondary:h(i,"A400","A200","A700"),error:h(a),grey:po,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:f},g[u]),d,{clone:!1})}function qo(e){return Math.round(1e5*e)/1e5}var Do={textTransform:"uppercase"};function Co(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,u=void 0===s?300:s,l=r.fontWeightRegular,c=void 0===l?400:l,p=r.fontWeightMedium,f=void 0===p?500:p,d=r.fontWeightBold,m=void 0===d?700:d,h=r.htmlFontSize,g=void 0===h?16:h,v=r.allVariants,y=r.pxToRem,b=Zi(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=y||function(e){return"".concat(e/g*x,"rem")},D=function(e,t,r,n,o){return Ji({fontFamily:i,fontWeight:e,fontSize:q(t),lineHeight:r},'"Roboto", "Helvetica", "Arial", sans-serif'===i?{letterSpacing:"".concat(qo(n/t),"em")}:{},{},o,{},v)},C={h1:D(u,96,1,-1.5),h2:D(u,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(f,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(f,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(f,14,1.75,.4,Do),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Do)};return to(Ji({htmlFontSize:g,pxToRem:q,round:qo,fontFamily:i,fontSize:a,fontWeightLight:u,fontWeightRegular:c,fontWeightMedium:f,fontWeightBold:m},C),b,{clone:!1})}function wo(){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 So=["none",wo(0,2,1,-1,0,1,1,0,0,1,3,0),wo(0,3,1,-2,0,2,2,0,0,1,5,0),wo(0,3,3,-2,0,3,4,0,0,1,8,0),wo(0,2,4,-1,0,4,5,0,0,1,10,0),wo(0,3,5,-1,0,5,8,0,0,1,14,0),wo(0,3,5,-1,0,6,10,0,0,1,18,0),wo(0,4,5,-2,0,7,10,1,0,2,16,1),wo(0,5,5,-3,0,8,10,1,0,3,14,2),wo(0,5,6,-3,0,9,12,1,0,3,16,2),wo(0,6,6,-3,0,10,14,1,0,4,18,3),wo(0,6,7,-4,0,11,15,1,0,4,20,3),wo(0,7,8,-4,0,12,17,2,0,5,22,4),wo(0,7,8,-4,0,13,19,2,0,5,24,4),wo(0,7,9,-4,0,14,21,2,0,5,26,4),wo(0,8,9,-5,0,15,22,2,0,6,28,5),wo(0,8,10,-5,0,16,24,2,0,6,30,5),wo(0,8,11,-5,0,17,26,2,0,6,32,5),wo(0,9,11,-5,0,18,28,2,0,7,34,6),wo(0,9,12,-6,0,19,29,2,0,7,36,6),wo(0,10,13,-6,0,20,31,3,0,8,38,7),wo(0,10,13,-6,0,21,33,3,0,8,40,7),wo(0,10,14,-6,0,22,35,3,0,8,42,7),wo(0,11,14,-7,0,23,36,3,0,9,44,8),wo(0,11,15,-7,0,24,38,3,0,9,46,8)],Mo={borderRadius:4};function Eo(){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 Io={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)"},Oo={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},To=function(e){return"".concat(Math.round(e),"ms")},Ao={easing:Io,duration:Oo,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?Oo.standard:r,i=t.easing,o=void 0===i?Io.easeInOut:i,a=t.delay,s=void 0===a?0:a;return Zi(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof n?n:To(n)," ").concat(o," ").concat("string"==typeof s?s:To(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))}},jo={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var ko=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,u=e.spacing,l=e.typography,c=void 0===l?{}:l,p=Zi(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),f=xo(a),d=no(r),m=Eo(u),h=Ji({breakpoints:d,direction:"ltr",mixins:io(d,m,i),overrides:{},palette:f,props:{},shadows:s||So,typography:Co(f,c),spacing:m},to({shape:Mo,transitions:Ao,zIndex:jo},p));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 Lo(e,t){return i.createElement(d,{generateClassName:t},i.createElement(m,{theme:ko},e))}var Po=f({productionPrefix:"q".concat("f605"),disableGlobal:!0,seed:""});function No(){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,r=e.y,n=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(r)?s.y:r,s.width=Number.isNaN(n)?s.width:n,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,r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createElement,n=void 0===r?document.createElement.bind(document):r,i=e(),o={element:function(){return t},root:function(){return t},appendTo:function(e){return t||((t=n("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 r=i.scaleRatio.x,n=i.scaleRatio.y;return t.style.left="".concat(Math.round(i.margin.left+i.x*r),"px"),t.style.top="".concat(Math.round(i.margin.top+i.y*n),"px"),t.style.width="".concat(Math.round(i.width),"px"),t.style.height="".concat(Math.round(i.height),"px"),t.style.transform="scale(".concat(r,", ").concat(n,")"),t.style.transformOrigin="top left",p.render(Lo(e,Po),t),!0},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){return t&&p.unmountComponentAtNode(t),o},destroy:function(){t&&t.parentElement&&(p.unmountComponentAtNode(t),t.parentElement.removeChild(t)),t=null},size:function(t){return t&&(i=e(t)),i}};return o}}()),e.component("data-title",Ui()),e.component("disclaimer",((t=function(e){Y(r,i.Component);var t=X(r);function r(){return H(this,r),t.apply(this,arguments)}return U(r,[{key:"render",value:function(){var e=this.props,t=e.label,r=e.spanStyle;return i.createElement(i.Fragment,null,i.createElement("span",{ref:this.alignToRef,style:r,title:t},t))}}]),r}()).propTypes={label:Si.string.isRequired,spanStyle:Si.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render:function(){var e=this.settings,r=e.settings,n=r.label,o=r.rtl,a=e.layout.dock,s="top"!==a&&"bottom"!==a||!o?"ltr":"rtl",u=function(e,t){var r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width="".concat(t.height,"px"),r.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),r.transformOrigin="top left";break;case"right":r.width="".concat(t.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),r.transformOrigin="top left";break;case"center":r.width="".concat(t.width,"px"),r.height="".concat(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}(a,this.rect),l="center"===a?n:"* ".concat(n),c="center"!==a?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return i.createElement("div",{style:u,dir:s},i.createElement(i.Fragment,null,i.createElement(t,{label:l,spanStyle:c})))}}))}}function Ro(e){return xt(e).l<70}function Fo(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var _o={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render:function(){return function(e){var t=e.chart,r=e.settings,n=t.component(r.component);if(!n)return[];var i=t.findShapes(r.selector).filter((function(e){return e.key===r.component}));if(i.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];for(var o,a,s,u=[],l=i[i.length-1],c=0;c<i.length;c+=1){var p=i[c],f=l.attrs.fill,d=p.attrs.fill;if(o=f,a=void 0,s=void 0,((a=xt(d).l/100)>(s=xt(o).l/100)?(a+.05)/(s+.05):(s+.05)/(a+.05))<=1.2){var m=p.desc.slice,h=m.start,g=m.offset,v=p.desc.slice,y=v.innerRadius,b=v.outerRadius;if(y=Math.max(y,l.desc.slice.innerRadius),(b=Math.min(b,l.desc.slice.outerRadius))>y){var x=Fo({r:b,a:h},g),q=Fo({r:y,a:h},g);u.push({type:"line",x1:x.x,y1:x.y,x2:q.x,y2:q.y,strokeWidth:1,opacity:.4,stroke:Ro(d)?"#ccc":"#333"})}}l=p}return u}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Vo(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ho(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zo(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="",n=0;n<e.length;n++){var i=e[n];r+=0===n?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),r+=" "}return t&&(r+="Z"),r}function Uo(e){var t=e.size,r=e.angle,n={x:e.x,y:e.y},i=t/2,o=e.x-i,a=e.y-i,s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];return s=s.map((function(e){return function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},n=Math.cos(t),i=Math.sin(t),o=Ho(e,r);return Vo({x:n*o.x-i*o.y,y:i*o.x+n*o.y},r)}(e,r,n)})),{type:"path",fill:e.fill,d:zo(s)}}var Bo={require:["chart"],defaultSettings:{settings:{},style:{}},render:function(){return function(e){var t=e.chart,r=e.settings;if(!t.component(r.component))return[];var n=t.findShapes(r.selector).filter((function(e){return e.key===r.component}));if(n.length<2)return[];for(var i,o,a=[],s=0;s<n.length;s+=1){var u=n[s];if(u.data.radius.value<0){var l=u.desc.slice,c=l.start,p=l.end,f=l.offset,d=(c+p)/2,m=(i={r:r.offset,a:d},{x:(o=f).x+i.r*Math.sin(i.a),y:o.y-i.r*Math.cos(i.a)}),h=Uo(R({size:r.size,fill:r.fill,angle:d+Math.PI},m));h.data=R(R({},u.data),{},{_share:u.desc.share,_fillColor:u.attrs.fill}),a.push(h)}}return a}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Wo(e){return(Wo="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 Yo(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function Ko(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Yo(o,n,i,a,s,"next",e)}function s(e){Yo(o,n,i,a,s,"throw",e)}a(void 0)}))}}function $o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jo(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 Zo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jo(Object(r),!0).forEach((function(t){$o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Go(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 Xo(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)||ea(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 Qo(e){return function(e){if(Array.isArray(e))return ta(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ea(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 ea(e,t){if(e){if("string"==typeof e)return ta(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)?ta(e,t):void 0}}function ta(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 ra=Object.prototype.hasOwnProperty,na=Object.prototype.toString,ia=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,aa=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===na.call(e)},sa=function(e){if(!e||"[object Object]"!==na.call(e))return!1;var t,r=ra.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ra.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||ra.call(e,t)},ua=function(e,t){ia&&"__proto__"===t.name?ia(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},la=function(e,t){if("__proto__"===t){if(!ra.call(e,t))return;if(oa)return oa(e,t).value}return e[t]},ca=function e(){var t,r,n,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(r in t)n=la(s,r),s!==(i=la(t,r))&&(c&&i&&(sa(i)||(o=aa(i)))?(o?(o=!1,a=n&&aa(n)?n:[]):a=n&&sa(n)?n:{},ua(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&ua(s,{name:r,newValue:i}));return s};function pa(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 fa(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 da(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 u=t.pic.extract({field:n.key(),trackBy:n.value}).length;return a(n,u)}return{}}function ma(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 ha(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 ga(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function va(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ya(){}var ba=1/.7,xa="\\s*([+-]?\\d+)\\s*",qa="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Da="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ca=/^#([0-9a-f]{3,8})$/,wa=new RegExp("^rgb\\("+[xa,xa,xa]+"\\)$"),Sa=new RegExp("^rgb\\("+[Da,Da,Da]+"\\)$"),Ma=new RegExp("^rgba\\("+[xa,xa,xa,qa]+"\\)$"),Ea=new RegExp("^rgba\\("+[Da,Da,Da,qa]+"\\)$"),Ia=new RegExp("^hsl\\("+[qa,Da,Da]+"\\)$"),Oa=new RegExp("^hsla\\("+[qa,Da,Da,qa]+"\\)$"),Ta={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 Aa(){return this.rgb().formatHex()}function ja(){return this.rgb().formatRgb()}function ka(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ca.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?La(t):3===r?new Fa(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Pa(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Pa(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=wa.exec(e))?new Fa(t[1],t[2],t[3],1):(t=Sa.exec(e))?new Fa(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ma.exec(e))?Pa(t[1],t[2],t[3],t[4]):(t=Ea.exec(e))?Pa(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ia.exec(e))?za(t[1],t[2]/100,t[3]/100,1):(t=Oa.exec(e))?za(t[1],t[2]/100,t[3]/100,t[4]):Ta.hasOwnProperty(e)?La(Ta[e]):"transparent"===e?new Fa(NaN,NaN,NaN,0):null}function La(e){return new Fa(e>>16&255,e>>8&255,255&e,1)}function Pa(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fa(e,t,r,n)}function Na(e){return e instanceof ya||(e=ka(e)),e?new Fa((e=e.rgb()).r,e.g,e.b,e.opacity):new Fa}function Ra(e,t,r,n){return 1===arguments.length?Na(e):new Fa(e,t,r,null==n?1:n)}function Fa(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function _a(){return"#"+Ha(this.r)+Ha(this.g)+Ha(this.b)}function Va(){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 Ha(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function za(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,r,n)}function Ua(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof ya||(e=ka(e)),!e)return new Ba;if(e instanceof Ba)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,u=(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/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Ba(a,s,u,e.opacity)}function Ba(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Wa(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 Ya(e){return function(){return e}}function Ka(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Ya(isNaN(e)?t:e)}ga(ya,ka,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Aa,formatHex:Aa,formatHsl:function(){return Ua(this).formatHsl()},formatRgb:ja,toString:ja}),ga(Fa,Ra,va(ya,{brighter:function(e){return e=null==e?ba:Math.pow(ba,e),new Fa(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Fa(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:_a,formatHex:_a,formatRgb:Va,toString:Va})),ga(Ba,(function(e,t,r,n){return 1===arguments.length?Ua(e):new Ba(e,t,r,null==n?1:n)}),va(ya,{brighter:function(e){return e=null==e?ba:Math.pow(ba,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ba(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 Fa(Wa(e>=240?e-240:e+120,i,n),Wa(e,i,n),Wa(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 $a=function e(t){var r=function(e){return 1==(e=+e)?Ka: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):Ya(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=Ra(e)).r,(t=Ra(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Ka(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),Ja=/^class(-pyramid)?/,Za=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,u=t.limits,l={},c="percent"===t.limitType?u.map((function(e){return i+(o-i)*e})):u,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(Qo(c))),o=Math.max.apply(Math,[o].concat(Qo(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,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 u=0;u<n.length;u++)t<n[u]&&n[u]<r&&(a.push(n[u]),o.push(i[u]));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 l=0;l<n.length;l++)if(n[l]>r){o.push(i[l]),o.push(i[l]);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:p,limits:"percent"===t.limitType?c:u}));else if(t.breakTypes){var f=t.breakTypes;l.type="continuous",l.domain=[i],l.range=[p[0]];for(var d=0;d<c.length;d+=1)if(f[d]){var m=p[d],h=p[d+1],g=$a(m,h)(.5);l.range.push(g),l.domain.push(c[d]),d<c.length-1&&f[d+1]&&(l.range.push(p[d+1]),l.domain.push((c[d]+c[d+1])/2))}else l.range.push(p[d]),l.range.push(p[d+1]),l.domain.push(c[d]),l.domain.push(c[d]+Math.min(1e-6,(o-i)/1e6));l.range.push(p[p.length-1]),l.domain.push(o)}else l.domain=c,l.range=p;return l};function Ga(e,t,r,n,i){var o,a,s,u=0,l=[],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)||(l[s]?l[s]+=1:l[s]=1);for(o=0;o<l.length;o+=1)l[o]&&(u+=1);return u<=n||u>=i?Math.max(u,n):Ga(e,t,r,n+1,i)}var Xa=function(e,t,r,n){var i,o,a=t.theme,s=t.hc,u=n.f,l={mode:"field",fieldType:"measure",field:u?u.key():void 0,reverse:r.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(u){if(Number.isNaN(+u.min())||Number.isNaN(+u.max()))return{invalid:!0};(p=!("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:u.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Qo(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(l.min=r.input.measureMin,l.max=r.input.measureMax,l.max<l.min)return{invalid:!0}}else if(u&&!p)l.min=u.min(),l.max=u.max();else if(u){if(!c.length)return{invalid:!0};l.min=Math.min.apply(Math,Qo(c)),l.max=Math.max.apply(Math,Qo(c))}if(r.input.measureScheme&&(l.palettes={quant:r.input.measureScheme}),a){var f=a.getDataColorScales().filter((function(e){return e.key===r.input.measureScheme}))[0];l.type=f&&Ja.test(f.type)?"categorical":"continuous","categorical"===l.type&&(o=f.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Qo(f.colors.map((function(e){return e?e.length:0})))):f.colors.length)}if("categorical"===l.type){for(var d=p?Ga(l.max,l.min,c,1,o):o,m=(l.max-l.min)/d,h=[],g=0;g<d+1;g+=1)h.push(l.min+m*g);l.domain=h,l.range=function(e){for(var t=e.resources.theme.palette("quant",d),r=Math.max(1,Math.floor(t.length/d)),n=[],i=0;i<d;i+=1)n.push(t[i*r]);return[n[0]].concat(n,[n[n.length-1]])}}return l};function Qa(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 es(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function ts(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 u=r.indexOf(o);-1!==u&&(r.splice(u,1),n.splice(u,1))}}return{domain:r,range:n,exclude:i}}function rs(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?Qa:o,s=r.input.byMeasureDef||{activeMeasureIndex:0},u=a(r,s),l=Xa(0,{theme:n,hc:i},r,{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=r.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=r.pic.fields().filter((function(e){return"measure"===e.type()}))[u.raw().matchMeasure]),r.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&ca(l,Za(e,p.gradient,l,c))}else l.auxiliary=s;return l}(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?ma:i,a=n.getCByField,s=void 0===a?ha:a,u=n.getPersistence,l=void 0===u?da:u,c=o(t,r),p=s(r,c),f=p?p.raw():{},d=r&&r.pic?r.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!d.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:f.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===f.labelExpRef&&(m.label=r.input.altLabel)),!m.label&&p&&(m.label=p.title()),r.input.dimensionScheme&&(m.palettes={categorical:r.input.dimensionScheme}),r.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),ca(m,l(t,r,c,p,{byRow:fa,byElemNo:pa})),m}(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 u=Xa(0,{hc:i,theme:o},r,{f:s});return u.invalid||(u.label=r.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),u}(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 u=[],l=[];"measure"===r.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){u.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?l.push(n.primary):l.push(i)}}));var c=r.input.dimensionScheme?{categorical:r.input.dimensionScheme}:void 0,p=o?o.getDataColorPalettes()[0]:void 0;return"measure"===r.input.useBaseColors&&p&&(c={categorical:p.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 f=[],d=[];return i.qDimensionInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?d.push(n.primary):d.push(i)}})),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:d}:void 0}}var m=n.primary;if(void 0!==r.input.paletteColor)r.input.paletteColor&&(m=e.resolveUIColor(r.input.paletteColor));else{var h=r.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(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)),Zo(Zo({},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 Zo(Zo({},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(es(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=ts(e.measureOverrides,e.explicit),es(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=ts(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 ns(e){var t=Zo({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(ca(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=ca(!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=ca(!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 Za(i,n.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=n[0],u=n[1]?n[1].colorMap:null;if(s){var l=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=l}return u?function(e,t,r,n){var i=n.external,o=n.field,a=Zo({},e);ca(a,pa(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,ca(a,pa(o)))):!1===t.autoFill&&t.single?a.range=[r.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),ca(a,pa(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 u=i.items[s],l=(u.text||u).label;n[l]&&-1===a.indexOf(u.value)&&(a.push(u.value),o.push(t.resolveUIColor(n[l])))}return a.push(-3,-2),o.push(r.others),o.push(r.nil),a},range:function(){return o}}}(t.colors,r,a)),a}(a,u,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=Zo(Zo({},e),n.getDataColorSpecials())),r.settings=ca(e,rs(this,r,t,e))}return r.settings}};return i}var is=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},os=function(e){throw e.isHandled=!0,e},as=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()},ss=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()},us=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(os):Promise.reject()};function ls(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 cs(e){return function(t){return"object"===Wo(t.datum[e])?t.datum[e].value:void 0}}function ps(e){return"object"===Wo(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function fs(e){return-3===e.datum.value}var ds=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"},ms=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 hs(e,t){var r=e.styleReference,n=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,s=t.theme,u=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:ds(o,n,i)},show:"function"==typeof o.show?function(){return ms(o,u,a)}:ms(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(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 gs(e,t,r){var n=[],i=[],o=function(e,t,r){return"categorical"===t.coloring.type?function(e,t,r){var n=hs(e,t);if(!n.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,p=t.theme,f=t.scales,d={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"},m="".concat(c,"Legend");return ca(!0,n,{type:"legend-cat",key:"".concat(i,"-cat"),scale:m in f?m: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:p?p.getStyle(o,"legend.label","color"):void 0,fontSize:p?p.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:p?p.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:d[r]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:u,style:l})}(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,u=t.theme,l=hs(e,t);return!!l.show&&ca(!0,l,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:u?u.getStyle(n,"legend.label","color"):void 0,fontSize:u?u.getStyle(n,"legend.label","fontSize"):void 0,fontFamily:u?u.getStyle(n,"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,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={},$o(e,"".concat(r,"start"),(function(e){e.preventDefault(),this.started!==r&&(this.started=r,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),$o(e,"".concat(r,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),$o(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 vs=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function ys(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,r=ns(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 as(e,{layout:r,app:n})})).getMeasure((function(e,t){var r=t.layout,n=t.app;return ss(e,{layout:r,app:n})})).getAttributeDimension((function(e,t){var r=t.layout,n=t.model,i=t.app;return us(e,{layout:r,model:n,app:i})}));return r.getSnapshotData=is,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=Zo({},i),n={},!r.key)throw new Error("Missing key");t.set(Zo(Zo({},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=Zo(Zo({},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,u=n.getDataColorScales().filter((function(e){return e.key===s}))[0];if(u){var l=u.colors[0]?u.colors:[[]].concat(Qo(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: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={},u=i;if(r){var l={override:!0,domain:r.explicit&&"function"==typeof r.explicit.domain?r.explicit.domain:[].concat(Qo((r.explicit||{}).domain||[]),[-3,-2]),range:r.explicit&&"function"==typeof r.explicit.range?r.explicit.range:[].concat(Qo((r.explicit||{}).range||[]),[r.others,r.nil])};if("field"===r.mode){if("dimension"===r.fieldType){var c,p=ls({hc:t,source:o,coloring:r}).data;if(r.legendDataset){var f=0,d={};a.data("q")({data:t}).extract({field:r.field,trackBy:r.valueAccessor,reduce:function(e){var t=e[0];return d[t]=f++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return d[e.qElemNumber]}}}}}}var m={data:p,range:r.range,domain:r.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]=m,c&&(s["".concat(u,"Legend")]=Zo(Zo({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.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[u]=ca({},h,{type:"categorical"===r.type?"threshold-color":"sequential-color",range:r.range,domain:r.domain,invert:r.reverse}),"sequential-color"===s[u].type&&(s["".concat(u,"Range")]=ca({},h,{invert:!!n}))}else if("color"!==r.type)throw new Error("UNUSED FIELD")}else if("dimension"===r.mode){var g={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]=g}else if("measure"===r.mode){var v={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:l,type:"categorical-color"};s[u]=v}}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=cs(n),o=cs("".concat(n,"IsAnOther")),a=function(e,t){var n=e.fieldType,a=e.invalid,s=e.mode,u=e.nil,l=e.others,c=e.primary,p=e.type;return a?function(e){return fs(e)||o(e)?l:u}:r[t]?function(e){return fs(e)?l:ps(e)||-2===i(e)&&"dimension"===n||"NaN"===i(e)?u:o(e)?l:e.resources.scale(t)(i(e))||l}:"constant"===s?function(e){return fs(e)||o(e)?l:ps(e)?u:c}:"color"===p?function(e){return fs(e)||o(e)?l:ps(e)?u:i(e)||l}:null},s=a(t,n);if(t.measureOverrides){var u=cs("".concat(n,"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: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,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?(r={field:t,reduce:"first"},"color"===i.type&&(r.value=function(e){return"NaN"!==e.qNum?vs(e.qNum):e.qText&&ka(e.qText)?e.qText:c})):"dimension"===i.mode?r=void 0!==i.field?i.field:n.qDimensionInfo.length-1:"measure"===i.mode&&(r=u);var p=$o({},l,r);return n.qDimensionInfo.length>1&&(p["".concat(l,"IsAnOther")]={fields:n.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(l,"MeasureIdx")]=u),p}({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,u=e.styleReference,l=void 0===u?"object.legend":u,c=e.settings,p=void 0===c?{}:c,f=e.style,d=void 0===f?{}:f,m=arguments.length>1?arguments[1]:void 0;return gs({eventName:t,key:n,rtl:s,viewState:o,chart:a,styleReference:l,settings:p,style:d},{legendProps:r.legendProps,scaleKey:r.key,coloring:i(),theme:r.theme,hc:r.hc,scales:this.scales()},m)}};return o}var bs=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function xs(e){var t=e.qHyperCube,r=t.qDimensionInfo,n=t.qMeasureInfo,i=r.some(bs),o=n.some(bs),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function qs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Zo(Zo(Zo({},e),t),{},{colorProps:Zo(Zo({},e.colorProps),t.colorProps||{})});return r}var Ds=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Cs(e){var t,r=e.qHyperCube.qDimensionInfo.some(Ds),n=e.qHyperCube.qMeasureInfo.some(Ds),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 ws=function(){};function Ss(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 Ms(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 Es(e){return(Es="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 Is(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Os(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 Ts(e,t,r){return t&&Os(e.prototype,t),r&&Os(e,r),e}function As(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function js(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 ks(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?js(Object(r),!0).forEach((function(t){As(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):js(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ls(e,t){return(Ls=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ps(){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 Ns(e,t,r){return(Ns=Ps()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Ls(i,r.prototype),i}).apply(null,arguments)}function Rs(e){return function(e){if(Array.isArray(e))return _s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Fs(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 Fs(e,t){if(e){if("string"==typeof e)return _s(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)?_s(e,t):void 0}}function _s(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 Vs=Object.prototype.hasOwnProperty,Hs=Object.prototype.toString,zs=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,Bs=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Hs.call(e)},Ws=function(e){if(!e||"[object Object]"!==Hs.call(e))return!1;var t,r=Vs.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Vs.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Vs.call(e,t)},Ys=function(e,t){zs&&"__proto__"===t.name?zs(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ks=function(e,t){if("__proto__"===t){if(!Vs.call(e,t))return;if(Us)return Us(e,t).value}return e[t]},$s=function e(){var t,r,n,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(r in t)n=Ks(s,r),s!==(i=Ks(t,r))&&(c&&i&&(Ws(i)||(o=Bs(i)))?(o?(o=!1,a=n&&Bs(n)?n:[]):a=n&&Ws(n)?n:{},Ys(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&Ys(s,{name:r,newValue:i}));return s};function Js(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 u=0;u<n.wrappedFields.length;u++)if(s=n.wrappedFields[u].attrDims.map((function(e){return e.instance})).indexOf(e),a=n.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 Zs(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 Gs(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,u=e.sourceKey,l=e.target,c=e.targetProp,p=n;if(i.field&&i.field!==r){var f=Js(i.field,o,{cache:t});if(-1===f)return;p=$s({qRow:a},f(s))}l[c]=Zs(i,p,{key:u})}function Xs(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(),u=t.key(),l="object"===Es(i[a].field)?i[a].field:t.field(i[a].field),c=n.normalizeConfig(i[a],t),p=c.props,f=c.main,d=Object.keys(p),m=!!i[a].trackBy,h=Es(i[a].trackBy),g={},v=[],y=[],b=0;b<s.qDataPages.length;b++){var x=Js(l,s.qDataPages[b],{cache:r});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=$s({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Zs(f,C,{key:u});if(!f.filter||f.filter(C)){for(var S=0;S<d.length;S++){var M=p[d[S]],E=M.fields||[M];M.fields&&(w[d[S]]=[]);for(var I=0;I<E.length;I++)Gs({cache:r,f:l,mainCell:C,p:E[I],prop:d[S],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:u,target:M.fields?w[d[S]]:w,targetProp:M.fields?I:d[S]});if(M.fields){var O=w[d[S]].map((function(e){return e.value})),T=w[d[S]].map((function(e){return e.label}));w[d[S]]={value:"function"==typeof M.value?M.value(O):void 0!==M.value?M.value:O,label:"function"==typeof M.label?M.label(T):void 0!==M.label?String(M.label):String(w[d[S]].value)}}}m&&n.track({cfg:i[a],itemData:C,obj:w,target:v,tracker:g,trackType:h}),y.push(w)}}}m?o.push.apply(o,Rs(n.collect(v,{main:f,propsArr:d,props:p}))):o.push.apply(o,y)}return o}function Qs(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 eu(e,t){var r,n,i,o,a,s=new iu(e),u=+e.value&&(s.value=e.value),l=[s];for(null==t&&(t=tu);r=l.pop();)if(u&&(r.value=+r.data.value),(i=t(r.data))&&(a=i.length))for(r.children=new Array(a),o=a-1;o>=0;--o)l.push(n=r.children[o]=new iu(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(nu)}function tu(e){return e.children}function ru(e){e.data=e.data.data}function nu(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function iu(e){this.data=e,this.depth=this.height=0,this.parent=null}function ou(e){if("function"!=typeof e)throw new Error;return e}iu.prototype=eu.prototype={constructor:iu,count:function(){return this.eachAfter(Qs)},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 eu(this).eachBefore(ru)}};var au={depth:-1},su={};function uu(e){return e.id}function lu(e){return e.parentId}function cu(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 u=cu(r,i[s]);Array.isArray(u)?a.push.apply(a,Rs(u)):a.push(u)}return a}if(!n[o]&&Array.isArray(i)){var l=new Array(i.length);r=n.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=cu(r,i[c]);return l}n[o]in i&&(i=i[n[o]])}return i}function pu(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,Rs(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&n.push.apply(n,Rs(pu(e[o].children,t-1,r)));return n}function fu(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=Rs(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 pu(e.children,o-1,r)}}return!1}function du(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 mu=/^qDimensionInfo(?:\/(\d+))?/,hu=/^\/?qMeasureInfo\/(\d+)/,gu=/\/qAttrExprInfo\/(\d+)/,vu=/\/qAttrDimInfo\/(\d+)/;function yu(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 bu(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,u=-1,l=-1,c=n,p=r.qEffectiveInterColumnSortOrder,f=yu(r);return mu.test(c)&&(i=!0,o=+mu.exec(c)[1],c=n.replace(mu,"")),hu.test(c)&&("K"===r.qMode?u=+hu.exec(c)[1]:p&&-1!==p.indexOf(-1)?(u=+hu.exec(c)[1],l=0):l=+hu.exec(c)[1],c=c.replace(hu,"")),c&&(vu.exec(c)?s=+vu.exec(c)[1]:gu.exec(c)&&(a=+gu.exec(c)[1])),{fieldDepth:(i?"S"===r.qMode?f[o]:p?p.indexOf(o):o:p&&-1!==p.indexOf(-1)?p.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:u,measureIdx:l,attrDimIdx:s,attrIdx:a}}function xu(e,t){var r,n,i=fu(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 qu(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 Du(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 u=r[t[s]],l=u.fields||[u],c=void 0,p=void 0;u.fields&&(c=[],p=[]);for(var f=function(e){var r=l[e],f=void 0,d=void 0,m=void 0,h=void 0,g=void 0,v=void 0;if("primitive"===r.type?(m=r.value,v=String(r.value)):("function"==typeof r.value&&(f=function(e){return r.value(e,n)}),"function"==typeof r.label&&(d=function(e){return r.label(e,n)}),r.accessor?(h=r.accessor(n),Array.isArray(h)?(g=h.map(r.valueAccessor),r.attrAccessor&&(g=g.map(r.attrAccessor)),f&&(m=g.map(f),f=null),d&&(v=g.map(d),d=null),m=r.reduce?r.reduce(m):m,v=r.reduceLabel?r.reduceLabel(v,m):String(m)):v=m=r.attrAccessor?r.attrAccessor(r.valueAccessor(h)):r.valueAccessor(h)):(m=i,v=i)),u.fields){var y=f?f(m):m;c.push(y),p.push(d&&null!=v?d(v):null!=v?v:String(y))}else{var b=f?f(m):m;o[t[s]]={value:b,label:d?d(v):null!=v?v:String(b)},r.field&&(o[t[s]].source={field:r.field.key(),key:a})}},d=0;d<l.length;d++)f(d);c&&(o[t[s]]={value:"function"==typeof u.value?u.value(c,n):c,label:"function"==typeof u.label?u.label(p,n):p})}}var Cu=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=cu(n,e);return o&&o[0]?(t.tree=eu(o[0],r.children||function(e){return e[i]}),t.tree):null};function wu(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 u=t[s],l="__root",c=!1,p=0;p<i.length;p++){var f=u[i[p]],d="".concat(l,"__").concat(f.qText);a[d]||(a[d]=ks({__id:d,__parent:l,qValues:[]},f),c=!0),l=d}if(c)for(var m=0;m<o.length;m++){var h=u[o[m]];a[l].qValues.push(h)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=uu,t=lu;function r(r){var n,i,o,a,s,u,l,c=r.length,p=new Array(c),f={};for(i=0;i<c;++i)n=r[i],s=p[i]=new iu(n),null!=(u=e(n,i,r))&&(u+="")&&(f[l="$"+(s.id=u)]=l in f?su:s);for(i=0;i<c;++i)if(s=p[i],null!=(u=t(r[i],i,r))&&(u+="")){if(!(a=f["$"+u]))throw new Error("missing: "+u);if(a===su)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=au,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(nu),o.parent=null,c>0)throw new Error("cycle");return o}return r.id=function(t){return arguments.length?(e=ou(t),r):e},r.parentId=function(e){return arguments.length?(t=ou(e),r):t},r}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var Su=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 u=r[t[s]],l=u.fields?u.fields:[u],c=0;c<l.length;c++){var p=l[c];if(p.field!==a){var f=xu(o,bu(p.field,{cube:n,cache:i}));p.accessor=f.nodeFn,p.valueAccessor=f.valueFn,p.attrAccessor=f.attrFn}}};function Mu(){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?wu(t):Cu(i,r,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 p=yu(i),f=p[l-1];c=r.fields[f]}else{var d=i.qEffectiveInterColumnSortOrder[l-1];l>i.qEffectiveInterColumnSortOrder.length&&(d=i.qDimensionInfo.length),c=r.fields[d]}var m=n.normalizeConfig(ks(ks({},e),{},{field:c?c.key():void 0}),t),h=m.props,g=m.main,v=Object.keys(h);u[l]={propsArr:v,props:h,main:g};var y=c?bu(c,{cube:i,cache:r}):{fieldDepth:0};Su({propsArr:v,props:h,cube:i,cache:r,itemDepthObject:y,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=u[q[D].depth].propsArr,w=u[q[D].depth].props,S=u[q[D].depth].main,M=x[D],E=M.data,I=qu(S,E,{key:o});Du({propsArr:C,props:w,item:M,itemData:E,ret:I,sourceKey:o,isTree:!0}),q[D].data=I}return a}function Eu(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(),u=t.key();if(!Cu(s,r,e))continue;var l="object"===Es(i[a].field)?i[a].field:t.field(i[a].field),c=n.normalizeConfig(i[a],t),p=c.props,f=c.main,d=Object.keys(p),m=bu(l,{cube:s,cache:r}),h=xu({fieldDepth:0},m),g=h.nodeFn,v=h.attrFn,y=h.valueFn;Su({propsArr:d,props:p,cube:s,cache:r,itemDepthObject:m,f:l});for(var b=!!i[a].trackBy,x=Es(i[a].trackBy),q={},D=[],C=g(r.tree),w=[],S=0;S<C.length;S++){var M=C[S],E=v?v(y(M)):y(M);if(!f.filter||f.filter(E)){var I=qu(f,E,{key:u});Du({propsArr:d,props:p,item:M,itemData:E,ret:I,sourceKey:u}),b&&n.track({cfg:i[a],itemData:E,obj:I,target:D,tracker:q,trackType:x}),w.push(I)}}b?o.push.apply(o,Rs(n.collect(D,{main:f,propsArr:d,props:p}))):o.push.apply(o,w)}return o}var Iu,Ou=(function(e){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
9
  e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,u,l,c,p,f=e.length,d=e.search(/[0-9\-\+#]/),m=d>0?e.substring(0,d):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),v=f-g,y=e.substring(v,v+1),b=v+("."===y||","===y?1:0),x=g>0?e.substring(b,f):"";if(r=(t="-"===(e=e.substring(d,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"),(!(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="",v=(p=t[0]).length%u,f=p.length,b=0;b<f;b++)h+=p.charAt(b),!((b-v+1)%u)&&b<f-u&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}}(Iu={exports:{}}),Iu.exports);function Tu(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Au={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"},ju=/%$/,ku=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Lu=/^\(oct\)/i,Pu=/^\(dec\)/i,Nu=/^\(hex\)/i,Ru=/^\(bin\)/i,Fu=/^\(rom\)/i,_u=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Vu=/#|0/g;function Hu(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 zu(e,t,r){var n=Tu(e);return r?n:new RegExp(n||"",t)}function Uu(e,t,r){var n,i,o,a,s,u,l,c,p,f,d,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),f=t,(d=r)&&(d=Tu(d)),f&&(f=Tu(f)),p=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(d,"[#0]+)?")),a=(o=(o=m.match(p))?o[0]:"")?m.substr(0,m.indexOf(o)):m,s=o?m.substring(m.indexOf(o)+o.length):"",o||(o=m?"#":"##########"),t&&t===r&&(i=(n=o.split(r)).pop(),o=n.join("")+r+i,t=""),u=t,t=/,/.test(r)?"¤":",",u&&(o=o.replace(zu(u,"g"),t)),l=r,r=".",l&&(o=o.replace(zu(l,"g"),r)),c=(c=o.match(/#/g))?c.length:0;var h,g=m.split(l);g[1]&&(h=g[1].match(Vu)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=ju.test(m),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(zu(t,null,!0),"|").concat(zu(r,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=r,e.temp=c}var Bu=function(){function e(t,r,n,i,o){Is(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 Au;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 Ts(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],_u.test(e[0])&&(n.positive.isFunctional=!0),e[1]?_u.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?_u.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||Uu(n.positive,t,r),n.negative&&!n.negative.isFunctional&&Uu(n.negative,t,r),n.zero&&!n.zero.isFunctional&&Uu(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,i,o,a,s,u,l,c=this._prepared,p="",f="",d=e;if(isNaN(e))return"".concat(d);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 ku.test(t)?e=Hu(e,Number(/\d{2}/.exec(t)[0]),t,r):Lu.test(t)?e=Hu(e,8,t,r):Pu.test(t)?e=Hu(e,10,t,r):Nu.test(t)?e=Hu(e,16,t,r):Ru.test(t)?e=Hu(e,2,t,r):Fu.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 m,h,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),v=g[0];for(s=0,r=Number(Number(e).toExponential().split("e")[1]);v<=r&&s<g.length;)v=g[++s];s>0&&(m=g[s-1]),m&&r>0&&m>0?h=m:(r<0&&m<0||!m)&&(v<0&&v-r<=c.maxPrecision?h=v:m<=r&&!(v>0&&-r<=c.maxPrecision)&&(h=m)),h&&(p=this.abbreviations[h],e/=Math.pow(10,h))}if(n=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(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var y=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=Ou(b+=o,y)||"0",l){var x=Math.max(0,Math.min(14,l.length)),q=l.replace(/#+$/,"").length,D=("I"===this.type?0:n%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=D.length;s<q;s++)D+="0";D&&(e+=o+D)}else 0===y&&(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)/,""),f=""):(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(n)/Math.log(10)))),s=0;s<t;s++)u+="#";e=Ou(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+f+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Wu(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,u=n.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),p=Object.create(null),f=0,d=0;return(t=s?function(){return r=l.apply(void 0,arguments),t.has(r)?t.get(r):t.set(r,e.apply(void 0,arguments))}:function(n){return r=l(n),t.has(r)?t.get(r):t.set(r,e(n))}).set=function(e,t){return f>=o&&(delete c[p[d]],delete p[d],f--,d++),c[e]=t,p[f]=e,f++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),p=Object.create(null),f=0,d=0},t.size=function(){return f},t}function Yu(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 Ns(Bu,t)}(i,e,t,r,n),a=Wu(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 Ku=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],$u=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ju=["January","February","March","April","May","June","July","August","September","October","November","December"],Zu=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Gu(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function Xu(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Qu=function(){function e(t,r,n){Is(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Ku,qDayNames:$u,qLongMonthNames:Ju,qMonthNames:Zu}),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=(As(i={},"T",o.qTimeFmt||"hh:mm:ss"),As(i,"D",o.qDateFmt||"YYYY-MM-DD"),As(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[n]),this.pattern=r}return Ts(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*Xu(t),n=60*Xu(r),i=60*Xu(n),o=1e3*Xu(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,u=n.f,l=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)&&(l=r?r.getDay()-1:0)<0&&(l=6);var c="";return r&&(c=r.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:Gu("".concat(t.year).slice(-2),2),YYY:Gu("".concat(t.year).slice(-3),3),def:function(e){return Gu("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Gu("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Gu("".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 Gu("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Gu("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Gu("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Gu("".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),l=[];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&l.push(c);var p=new RegExp(l.join("|"),"g");return t.replace(p,(function(e){var t,r,n;for(r in u)if(Object.prototype.hasOwnProperty.call(u,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var i in u[r])if(i===e||i.toLowerCase()===e){void 0===(n=u[r][i])&&(n=u[r][i.toLowerCase()]);break}return void 0===n&&(n=u[r].def),"function"==typeof n&&(n=n(e)),n}))}}]),e}();function el(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ns(Qu,t)}function tl(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function rl(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=el(r,e,t),i=Wu(n.format.bind(n),{toKey:function(e){return"object"===Es(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?tl(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=el(r,e,t),i=Wu(n.format.bind(n),{toKey:function(e){return"object"===Es(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function nl(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return rl(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"),Yu(r,n,i,o,t)}function il(){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,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),p=function(e){return e.qText||""},f="dimension"===u?"first":"avg",d=nl(r,o),m="dimension"===u?"first":function(e,t){return d(t)},h={id:function(){return n},key:function(){return i},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(h)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:c,label:p,reduce:f,reduceLabel:m,formatter:function(){return d},tags:function(){return r.qTags}};return h}function ol(e,t,r,n,i){return(t[e]||[]).map((function(t,o){var a="".concat(n?"".concat(n,"/"):"").concat(e,"/").concat(o),s={instance:il($s({id:"".concat(r?"".concat(r,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=ol("qAttrDimInfo",t,r,a,$s({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=ol("qAttrExprInfo",t,r,a,$s({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=ol("qMeasureInfo",t,r,a,$s({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function al(){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,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=al.util,p={cache:u,cube:l,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},f={key:function(){return i},raw:function(){return l},field:function(e){return du(e,p)},fields:function(){return u.fields.slice()},extract:function(e){return p.extractor(e,f,u,c)},hierarchy:function(e){return p.hierarchy(e,f,u,c)},_cache:function(){return u}};"K"===l.qMode||"T"===l.qMode||!l.qMode&&l.qNodesOnDim?(p.extractor=Eu,p.hierarchy=Mu,p.pages="K"===l.qMode?l.qStackedDataPages:l.qTreeDataPages):"S"===l.qMode?(p.extractor=Xs,p.pages=l.qDataPages,p.hierarchy=Mu):p.extractor=function(){return[]},p.fieldExtractor=function(e){return p.extractor({field:e},f,u,c)};var d="S"===l.qMode?function(e){return e.qElemNumber}:void 0,m="S"===l.qMode?function(e){return e.qNum}:void 0;(e=u.wrappedFields).push.apply(e,Rs(ol("qDimensionInfo",l,i,"",$s({},p,{value:d,type:"dimension"})))),(t=u.wrappedFields).push.apply(t,Rs(ol("qMeasureInfo",l,i,"",$s({},p,{value:m,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=f.field(e.from),r=il(ks({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return p.extractor({field:e},f,u,c)},key:e.key,type:t.type(),localeInfo:p.localeInfo,value:t.value},e.override||{}));u.virtualFields.push(r)})),(r=u.allFields).push.apply(r,Rs(u.virtualFields)),f}var sl=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],ul=/\/qDimensionInfo(?:\/(\d+))?/,ll=/\/qMeasureInfo\/(\d+)/,cl=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,pl=/\/qAttrExprInfo\/(\d+)/,fl=/\/?qHyperCube/,dl=/\/?qTreeData/,ml=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},hl=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function gl(e,t){var r=e,n=-1,i=-1,o="",a=function(e){return e};fl.test(e)?(o="".concat(r.substr(0,r.indexOf("qHyperCube")+10)),a=ml):dl.test(e)&&(o="".concat(r.substr(0,r.indexOf("qTreeData")+9)),a=hl);var s=!0;if(ul.test(e)&&(n=+ul.exec(e)[1]),ll.test(e)&&(i=+ll.exec(e)[1]),cl.test(e)){i=-1,n=0;var u=+cl.exec(r)[2];isNaN(u)||(n=u,r=r.replace(/\/\d+$/,"")),s=!1}if(pl.test(e)){var l=i;if(t){i=0;var c=cu(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,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+pl.exec(r)[1]}else n>-1?(n=-1,i=+pl.exec(r)[1]):i+=+pl.exec(r)[1]+1}return sl.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)||Fs(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 vl(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={},u=e.isActive(),l=!1;return e.brushes().forEach((function(e){var t=gl(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var r=e.brush.ranges();r.length&&(l=!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 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(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){var p=n.qHyperCube,f=p.qNoOfLeftDims,d=p.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===f||d>=f)&&f>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:d-f})})):m.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=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 yl(e){al.util=e.data("matrix").util,e.data("q",al),e.formatter("q-number",Yu),e.formatter("q-time",rl)}function bl(e){var t=function(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}(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var r=t.qIsOneAndOnlyOne;return void 0!==r&&r}function xl(){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"===Wo(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 ql(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))}yl.qBrushHelper=vl,yl.selections=vl;function Dl(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 u=e.filter((function(e){return-2!==e.value}));return u.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=bl({layout:r,path:e}),n=i.filter((function(t){return t.key===e})),o=t?[n.pop()]:n;a.push.apply(a,Qo(o))})),a.filter(Boolean)}({layout:s,values:u}):u},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 Cl=[],wl=0,Sl=function(e){var t=Cl.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()})))},Ml=function(){document.addEventListener("keyup",Sl)},El=function(){document.removeEventListener("keyup",Sl)},Il=function(e,t){Object.keys(t).forEach((function(r){e.on(r,t[r])}))},Ol=function(e,t){Object.keys(t).forEach((function(r){e.removeListener(r,t[r])}))};function Tl(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 Al(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,u=e.emit,l=void 0===u?"rangeClear":u,c=n.event===i,p=r.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!p)return!1;var f=t.component(o);return!!f&&(f.emit(l),"string"==typeof s&&t.brush(s).clear(),f)}function jl(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,u=e.cleared;return Al({selectionInfo:t,chart:r,document:n,eventName:void 0!==u&&u?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function kl(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,u=e.cleared;return Al({selectionInfo:t,chart:r,document:n,eventName:void 0!==u&&u?void 0:o,componentName:s,brushName:e.brushName})}function Ll(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,u=e.cleared,l=void 0!==u&&u,c=e.brushName,p=Al({selectionInfo:t,chart:r,document:n,eventName:l?void 0:s,componentName:o,brushName:void 0!==c&&c});if(p){var f=p.settings.settings,d=f.scale,m=f.brush,h=r.scale(d).data().fields.map((function(e){return e.id()})),g=r.brush(m),v=g.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));g&&v.length&&v.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function Pl(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;Al({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 Nl(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 u=r.currentComponent;r.previousComponent!==u&&(n.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function Rl(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,u=void 0===s?"legend-range-brush":s,l=e.cleared,c=void 0!==l&&l,p=e.brushName;Al({selectionInfo:t,chart:r,document:n,eventName:c?void 0:a,componentName:u,brushName:void 0!==p&&p})&&i.clear()}var Fl=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=Go(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function _l(e){var t,r=e.lasso;null!=r&&null!==(t=r.active)&&void 0!==t&&t.call(r)&&(null==r||r.action(!1))}function Vl(e){var t,r=e.chart,n=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,p=i.reset,f=void 0===p?_l:p,d=i.clear,m=!1!==d&&function(e){var t=e.clear,r=void 0===t?Fl: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(Zo({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return jl(Zo(Zo({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return kl(Zo(Zo({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ll(Zo(Zo({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Pl(Zo(Zo({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Nl(Zo(Zo({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Rl(Zo(Zo({},t),e))}},t))}}({clear:d,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:m,reset:f,lasso:c}),g={};Object.entries(h).forEach((function(e){var t=Xo(e,2),r=t[0],n=t[1];g[r]=function(e,t){return t?function(r){return t({event:r,defaultFunc:e})}:e}(n,u[r])}));var v=function(e){var t=e.selectionEvents,r=e.selections,n=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,u={selections:r,selectionInfo:n,chart:o,document:a},l=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)(Zo(Zo({},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:l})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(Zo(Zo({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:n,clear:m,chart:r,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",v),Object.entries(g).forEach((function(e){var t=Xo(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",v),Object.entries(g).forEach((function(e){var t=Xo(e,2),r=t[0],n=t[1];null==s||s.removeListener(r,n)}))}}var Hl=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function zl(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,u=o.majorScale,l=void 0===u?void 0:u,c=o.selectionActions,p=(c=void 0===c?{}:c).clear,f=c.reset,d=o.selectionEvents,m=void 0===d?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:d,h=o.brushEvents,g=void 0===h?{}:h,v=o.brushName,y=void 0===v?"selection":v,b=o.brushMaxListeners,x=void 0===b?20:b,q=o.brushRanges,D=void 0!==q&&q,C=o.interceptors,w=void 0===C?{}:C,S=t.brush(y);if("number"==typeof x&&S.setMaxListeners(x),D){var M=!0===D?Hl:D;S.configure({ranges:M})}var E={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]:{},r=t.selections,n=t.brush,i=t.majorScale,o=t.actions,a=t.picassoQ,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,u=void 0===s?"/qHyperCubeDef":s;if(!r)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var l=++wl,c=null,p=[],f={};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 d=Dl({brush:n,getConfig:function(){return{layout:c,allowSimultaneous:p}}}),m=d.rangeInterceptor,h=d.interceptor;n.intercept("set-ranges",m),n.intercept("toggle-ranges",m),n.intercept("toggle-values",h),n.intercept("set-values",h),n.intercept("add-values",h),n.on("start",(function(){return r.begin(u)}));var g={activate:function(){},deactivated:function(){return n.end()},cleared:function(){return n.clear()},canceled:function(){return n.end()}};Il(r,g);var v=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&&(f=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){a.selections(n,f,c).forEach((function(e){Tl(e,o.select.brushSelectionIncludeMax,v),r.select(e)}))}))):n.on("update",(function(){a.selections(n,f,c).forEach((function(e){return r.select(e)}))})),0===Cl.length&&Ml(),Cl.push({key:l,selections:r}),{layout:function(e){c=e},allowSimultaneous:function(e){p=e},release:function(){c=null;var e=Cl.indexOf(Cl.filter((function(e){return e.key===l}))[0]);-1!==e&&Cl.splice(e,1),Cl.length||El(),Ol(r,g)}}}({brush:S,majorScale:l,actions:r,selections:n,picassoQ:i});!function(e){var t=e.brush,r=e.interceptors,n=void 0===r?{}:r;Object.entries(n).forEach((function(e){var r=Xo(e,2),n=r[0],i=r[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(n,e)}))}))}({brush:S,interceptors:w});var O=function(e){var t=e.chart,r=e.selectionActions,n=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,u=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=Xo(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=Xo(e,2),n=r[0],i=r[1];t.removeListener(n,i)}))}}({brush:n,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),l=Vl({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(){u(),l(),c()}}({chart:t,brush:S,actions:r,selections:n,selectionInfo:E.selectionInfo,selectionActions:{clear:p,reset:f},selectionEvents:m,brushEvents:g});if(s){var T=!0===s?Qo(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;I.allowSimultaneous(T)}return{unbindEvents:O,state:E,picassoSelections:I,brush:S}}function Ul(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=zl({chart:t,actions:i,selections:r,picassoQ:yl,config:a}),u=s.unbindEvents,l=s.state,c=s.picassoSelections,p=s.brush,f=a.custom,d=void 0===f?{}:f,m=a.legendAlias,h=void 0===m?void 0:m,g=a.setBrushAliases,v=void 0===g?ql:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return l.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:xl(n)},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,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 u=(null!==(r=null==a?void 0:a.qHyperCube)&&void 0!==r?r:{}).qDimensionInfo,l=void 0===u?[]:u;return s.lockedDimensions=l.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=l.map((function(e,t){return bl({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===l.length||l.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(n=l[0])||void 0===n||!n.qLocked),s}({selections:r,picassoSelections:c,layout:e});Object.assign(l,t)},setBrushAliases:function(e){var t=e.colorField,r=e.useLegendCube,n=void 0!==r&&r,i=Go(e,["colorField","useLegendCube"]),o=Zo({useLegendCube:n,colorField:t,brush:p,legendAlias:h},i);v(Zo(Zo({},o),{},{defaultFunc:function(){return ql(o)}}))},destroy:function(){u(),c.release()},custom:Zo({},d)}}var Bl={};function Wl(){Wl.init.call(this)}Bl.isObject=function(e){return"object"===F(e)&&null!==e},Bl.isNumber=function(e){return"number"==typeof e},Bl.isUndefined=function(e){return void 0===e},Bl.isFunction=function(e){return"function"==typeof e};var Yl=Wl;Wl.EventEmitter=Wl,Wl.prototype._events=void 0,Wl.prototype._maxListeners=void 0,Wl.defaultMaxListeners=10,Wl.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},Wl.prototype.setMaxListeners=function(e){if(!Bl.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},Wl.prototype.emit=function(e){var t,r,n,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(r=this._events[e],Bl.isUndefined(r))return!1;if(Bl.isFunction(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];r.apply(this,i)}else if(Bl.isObject(r)){for(n=arguments.length,i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];for(n=(a=r.slice()).length,o=0;o<n;o++)a[o].apply(this,i)}return!0},Wl.prototype.addListener=function(e,t){var r;if(!Bl.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Bl.isFunction(t.listener)?t.listener:t),this._events[e]?Bl.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Bl.isObject(this._events[e])&&!this._events[e].warned)&&((r=Bl.isUndefined(this._maxListeners)?Wl.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,Bl.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),Bl.isFunction(console.trace)&&console.trace()));return this},Wl.prototype.on=Wl.prototype.addListener,Wl.prototype.once=function(e,t){if(!Bl.isFunction(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},Wl.prototype.removeListener=function(e,t){var r,n,i,o;if(!Bl.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(r=this._events[e]).length,n=-1,r===t||Bl.isFunction(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Bl.isObject(r)){for(o=i;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){n=o;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},Wl.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],Bl.isFunction(r))this.removeListener(e,r);else if(Array.isArray(r))for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},Wl.prototype.listeners=function(e){return this._events&&this._events[e]?Bl.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},Wl.listenerCount=function(e,t){return e._events&&e._events[t]?Bl.isFunction(e._events[t])?1:e._events[t].length:0};function Kl(){var e,t={};return e=t,Object.keys(Yl.prototype).forEach((function(t){e[t]=Yl.prototype[t]})),Yl.init(e),t.lasso={active:function(){return!1}},t.select={on:t.on,removeListener:t.removeListener},t}function $l(e){var t,r=e.picasso,n=h(),i=g(),o=v(),a=ee(y(),2),s=a[0],u=a[1],l=Kl(),c=b(),p=!(null===(t=c.qSelectionInfo)||void 0===t||!t.qInSelections),f=ee(y(!1),2),d=f[0],m=f[1];return l.lasso=function(e){var t,r,n,i=e.layout,o=e.isInSelections,a=e.isLassoActionActive,s=e.setIsLassoActionActive;return{active:a,hidden:!o||!(null===(t=i.qHyperCube)||void 0===t||null===(r=t.qDimensionInfo)||void 0===r||null===(n=r[0])||void 0===n||!n.qIsOneAndOnlyOne),action:function(e){s("boolean"==typeof e?e:!a)},icon:{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"}}]}}}({layout:c,isInSelections:p,isLassoActionActive:d,setIsLassoActionActive:m}),x((function(){return s&&(s.interactions.lasso.active=function(){return d}),R({},l.lasso)}),[s,d,p]),q((function(){i.style.overflow="hidden";var e=r({renderer:{prio:[n.renderer||"canvas"]}}),t=e.chart({element:i,data:[],settings:{}}),a=Ul({chart:t,actions:l,selections:o,config:{selectionActions:!1}});a.setLayout(c),a.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});var s=function(e){var t=Zo({},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}({legendScrollOffset:0,rotation:0});return s.intercept("rotation",(function(e){return(s.get("rotation")+e)%(2*Math.PI)})),s.onChanged("rotation",(function(){t.update({partialData:!0})})),l.on("selections-start",(function(){t.brush("selection").start()})),u({picasso:e,chart:t,selectionService:a,viewState:s,interactions:l}),function(){a.destroy(),t.destroy(),l.removeAllListeners(),delete l.select,s.intercept("rotation",void 0),s.onChanged("rotation",void 0)}}),[]),s}function Jl(e){var t=e.instance,r=D(),n=C(),i=w(),o=g(),a=ee(y(),2),s=a[0],u=a[1],l=S(),c=M();return q((function(){if(t){o.style.overflow="hidden";var e=function(e){var t,r,n,i,o=e.picasso,a=e.model,s=e.app,u=e.translator,l=e.layoutService,c=void 0===l?void 0:l,p=e.createConfig,f=void 0===p?ws:p,d=e.config,m=void 0===d?{}:d,h=e.custom,g=void 0===h?{}:h,v=m.localeInfo,y=m.key,b=m.theme,x=void 0===b?void 0:b,q=m.auto,D=void 0===q?void 0:q,C=m.definitionPath,w=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),S={theme:x,key:y,localeInfo:v,layout:w,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:Zo(Zo({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:w?xs(w):void 0})},M=ys({picasso:o,model:a,app:s,translator:u,auto:D});!1!==D&&M.auto((function(e){return D?D({layout:e,defaultAuto:Cs}):Cs(e)}));var E=!1;return{getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,r=e.color;return M.resolveUIColor({index:t,color:r})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(C)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return E},custom:Zo({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:xs}),r=qs(S,t);return M.config(r),M.getAuxiliarySettings(C).then((function(){E=!0}))}}}({picasso:t.picasso,model:r,app:n,translator:i,config:{auto:!1,key:"fill"}}),a=function(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}(l),s=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 Ko(regeneratorRuntime.mark((function e(){var n,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(r.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=Ko(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(Zo({},i));case 4:if("object"===Wo(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(Zo({},i))}))),e.next=6,Promise.all([a,s]);case 6:u=e.sent,o.initialized=!0,(n=o.definitions).push.apply(n,Qo(u[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var r=Xo(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(r){var n=ca(!0,{},r.brush);ca(!0,r,t),t.brush&&(r.brush=function(e,t){return"object"===Wo(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Ms({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Ms({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(n,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:t.picasso,plugins:c,pluginArgs:a});u({colorService:e,pluginService:s})}}),[r,n,t,l,i.language()]),s}var Zl={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 Gl(e){var t=e.split("/");return"qmem:"===t[0]&&""===t[1]}function Xl(e){var t,r,n,i,o;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(r=(void 0!==(t=e.session.options||e.enigmaModel.session.sessionConfig).secure?t.secure:t.isSecure)?"https://":"http://",n=t.host||"localhost",i=t.port?":".concat(t.port):"","/"!==(o=t.prefix?t.prefix:"/")[o.length-1]&&(o="".concat(o,"/")),r+n+i+o):""}function Ql(e,t){var r=e.replace(t,"").replace(/^\.\.\//i,"/");return"/"!==r[0]?"/".concat(r):r}function ec(e,t){return t+("/"===e[0]?e.substr(1):e)}var tc=function(e,t){var r;function n(){r&&(clearTimeout(r),r=null)}function i(e){var t=e;t.onload=null,t.onerror=null,n()}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,r=s.height,u=s.width,l=o[t]*(r>u?1:r/u),c=o[t]*(u>r?1:u/r);!r||!u||0===r&&0===u?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(l,r),width:Math.min(c,u)},n()):(e={height:l,width:c},n()),a(e)},s.onerror=function(){i(s),a({height:20,width:20,imageError:!0})},s.src=e,r=setTimeout((function(){i(s),a({height:20,width:20,imageError:!0})}),3e3)}))};function rc(e,t,r){return nc.apply(this,arguments)}function nc(){return(nc=V(regeneratorRuntime.mark((function e(t,r,n){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=Xl(n))&&(Ql(i,o),i=ec(i=(i=i.replace(/"/g,'\\"')).replace(/'/g,"\\'"),o)),e.next=5,tc(i,r);case 5:return a=e.sent,s=a.height,u=a.width,l=a.imageError,e.abrupt("return",{src:i,size:r,height:s,width:u,imageError:l});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ic(e,t,r,n,i){return oc.apply(this,arguments)}function oc(){return(oc=V(regeneratorRuntime.mark((function e(t,r,n,i,o){var a,s,u,l,c,p,f,d,m,h,g,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=n.ref,o&&o.label&&(s=o.label),!(r.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=t&&t.getImage&&Gl(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,tc(l,i);case 10:c=e.sent,p=c.height,f=c.width,d=c.imageError,a={src:l,size:i,height:p,width:f,imageError:d},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,tc(s,i);case 23:m=e.sent,h=m.height,g=m.width,v=m.imageError,a={src:s,size:i,height:h,width:g,imageError:v};case 28:return e.abrupt("return",a);case 29:case"end":return e.stop()}}),e,null,[[3,17]])})))).apply(this,arguments)}function ac(e,t,r,n){return sc.apply(this,arguments)}function sc(){return(sc=V(regeneratorRuntime.mark((function e(t,r,n,i){var o,a,s,u,l,c,p,f,d,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=i.label,s=r.qFallbackTitle,!Gl(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,tc(c,n);case 12:p=e.sent,f=p.height,d=p.width,m=p.imageError,o={src:c,size:n,height:f,width:d,imageError:m};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 uc(e,t,r,n){return lc.apply(this,arguments)}function lc(){return(lc=V(regeneratorRuntime.mark((function e(t,r,n,i){var o,a,s,u,l,c,p,f,d,m,h,g,v,y,b,x,q,D;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p=r.app,f=r.flags,d=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:m=ee(d,1),h=m[0],g=h.size||"small",v=h.type||"media",y=-1,b=0;case 9:if(!(b<n.length)){e.next=16;break}if(n[b].cId!==h.cId){e.next=13;break}return y=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!==y&&x[y]&&(q=x[y]),"media"!==v||null===(l=h.ref)||void 0===l||null===(c=l.qStaticContentUrl)||void 0===c||!c.qUrl){e.next=20;break}return e.abrupt("return",rc(h,g,p));case 20:if("url"!==v){e.next=22;break}return e.abrupt("return",ic(p,f,h,g,q));case 22:if(!(f.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===v&&q&&q.label)){e.next=25;break}return D=n[y],e.abrupt("return",ac(p,D,g,q));case 25:return e.abrupt("return",[]);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cc=function(e){return V(regeneratorRuntime.mark((function t(){var r,n,i,o,a,s,u,l,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=e.customTooltipModel,n=e.nodes,i=e.attrExps,o=e.opts,a=n,s=[],u=0;u<a.length;u++)s.push(uc(r,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)})))()},pc=function(e){var t,r,n=null===(t=e.customTooltipModel.layout)||void 0===t||null===(r=t.tooltip)||void 0===r?void 0:r.imageComponents;return!!n&&n.length>0},fc=function(e){return V(regeneratorRuntime.mark((function t(){var r,n,i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.customTooltipModel,n=e.nodes,i=e.attrExps,o=e.opts,a=n,t.next=4,cc({customTooltipModel:r,nodes:n,attrExps:i,opts:o});case 4:return a=t.sent,t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})))()},dc=function(e){var t=e.customTooltipModel;return pc({customTooltipModel:t})};var mc=function(e,t){var r,n,i,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,u=t;return{qInfo:{qType:Zl.CHART.CHART_PARENT_TYPE,qId:Zl.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:u}},hc=function(e){var t,r,n,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:Zl.CHART.CHART_CHILD_TYPE},qExtendsId:i}};function gc(e){return vc.apply(this,arguments)}function vc(){return(vc=V(regeneratorRuntime.mark((function e(t){var r,n,i,o,a,s,u,l,c,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,i=t.properties,o=t.customTooltipModel,null===(r=(a=o).miniChartToken.sessionObj)||void 0===r||!r.id){e.next=5;break}return e.next=5,n.destroySessionObject(a.miniChartToken.sessionObj.id);case 5:return s=Zl.CHART.STATE,u=mc(i,s),e.next=9,n.createSessionObject(u);case 9:if(l=e.sent,c=hc(i),l.id===Zl.CHART.CHART_OBJECT_ID){e.next=14;break}return n.destroySessionObject(l.id),e.abrupt("return",void 0);case 14:return a.miniChartToken.sessionObj=l,e.next=17,l.createChild(c);case 17:if(p=e.sent,a.miniChartToken.sessionObj&&a.miniChartToken.sessionObj.id===l.id){e.next=21;break}return n.destroySessionObject(l.id),e.abrupt("return",void 0);case 21:return a.miniChartToken.model=p,e.abrupt("return",p);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yc(e){return bc.apply(this,arguments)}function bc(){return(bc=V(regeneratorRuntime.mark((function e(t){var r,n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.app,n=t.customTooltipModel,i=n,o=Zl.CHART.STATE,e.next=5,r.removeSessionAlternateState(o);case 5:i.miniChartToken.alternateState=void 0;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xc(e){return qc.apply(this,arguments)}function qc(){return(qc=V(regeneratorRuntime.mark((function e(t){var r,n,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,n=t.properties,i=t.customTooltipModel,o=i,a=Zl.CHART.STATE,s=n.qStateName,o.miniChartToken.alternateState){e.next=9;break}return o.miniChartToken.alternateState=a,e.next=8,r.addSessionAlternateState(a,s);case 8:o.miniChartToken.alternateState=a;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Dc,Cc,wc={createContainer:function(e){var t,r,n=e.ctx,i=e.layout;if(!((null===(t=i.qHyperCube)||void 0===t||null===(r=t.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var r,n,i,o,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=Zl.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:Zl.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(n,i)},show:(Cc=V(regeneratorRuntime.mark((function e(t){var r,n,i,o,a,s,u,l,c,p,f,d,m,h,g,v,y,b;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,p=l,f=null==a||null===(r=a.tooltip)||void 0===r||null===(n=r.chart)||void 0===n||null===(i=n.object)||void 0===i?void 0:i.refId,null!=p&&p.embed&&o.removeSessionAlternateState&&o.addSessionAlternateState&&f&&!(a.qHyperCubeDef.qDimensions.length<=0)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,wc.hide({app:o,customTooltipModel:l});case 7:return e.prev=7,e.next=10,xc({app:o,properties:a,customTooltipModel:l});case 10:return e.next=12,gc({app:o,properties:a,customTooltipModel:l});case 12:if(d=e.sent,!(p.miniChartToken.alternateState&&p.miniChartToken.sessionObj&&d)){e.next=23;break}return g=s.map((function(e){var t;return null===(t=e.data)||void 0===t?void 0:t.value})).filter((function(e){return void 0!==e})),v=void 0!==u?u:a.qHyperCubeDef.qDimensions.length-1,p.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",v,g,!1),y=document.getElementById(Zl.CHART.CONTAINER_ID),b={direction:c?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1},e.next=22,l.embed.render({element:y,model:p.miniChartToken.model,options:b,id:null===(m=p.miniChartToken.model)||void 0===m?void 0:m.id,type:null===(h=p.miniChartToken.model)||void 0===h?void 0:h.genericType});case 22:p.miniChartToken.vis=e.sent;case 23:e.next=29;break;case 25:return e.prev=25,e.t0=e.catch(7),e.next=29,wc.hide({app:o,customTooltipModel:l});case 29:case"end":return e.stop()}}),e,null,[[7,25]])}))),function(e){return Cc.apply(this,arguments)}),hide:(Dc=V(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,n=t.customTooltipModel,null!=(i=n)&&i.embed){e.next=4;break}return e.abrupt("return");case 4:return wc.destroyVisualization({customTooltipModel:n}),e.next=7,r.destroySessionObject(Zl.CHART.CHART_OBJECT_ID);case 7:return i.miniChartToken.sessionObj=void 0,e.next=10,yc({app:r,customTooltipModel:n});case 10:case"end":return e.stop()}}),e)}))),function(e){return Dc.apply(this,arguments)}),destroyVisualization:function(e){var t,r,n=e.customTooltipModel;"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 Sc(e,t){var r=t,n=r.qLayoutExclude;n||(r.qLayoutExclude={quarantine:{}},n=r.qLayoutExclude),n.quarantine||(n.quarantine={}),n.quarantine[Zl.CUSTOM.QUARANTINE]=[],e.forEach((function(e){n.quarantine[Zl.CUSTOM.QUARANTINE].push(e)})),r.qLayoutExclude=n}function Mc(e){var t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function Ec(){var e=Zl.CUSTOM,t=e.EXPRESSION,r=e.TITLE,n=e.DESCRIPTION,i=e.IMAGES,o={};return o[t]=!0,o[r]=!0,o[n]=!0,o[i]=!0,o}function Ic(e){var t=Ec();return e.filter((function(e){return t[e.id]}))}var Oc={getNodes:function(e,t){var r=function(e,t){var r=0,n=0;e.center?(r+=e.center.x,n+=e.center.y):(r+=e.clientX,n+=e.clientY);var 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:function(e,t){var r,n=[],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=[],n.push(c)}}else{r||(r=[],Object.keys(i).forEach((function(t){r=r.concat(e.findShapes(t).filter((function(e){return e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]})))})));var p=r.filter((function(e){var t,r,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===l.value&&n.label===l.label}));p.length>0&&(n=n.concat(p[0]))}})),n},displayTooltip:function(e,t,r){var n=r.nodes,i=r.opts,o=void 0===i?{}:i,a=r.customTooltipModel,s=r.extractedNodes,u=void 0===s?[]:s,l=r.hide;if(a&&!l){var c=a.layout,p=a.chart,f=Oc.getAttrExprData(c).attrExps;u.length||n.length?fc({customTooltipModel:a,nodes:Oc.getDataNodes(p,u.length>0?u:n),attrExps:f,opts:o}).then((function(){t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var d,m;null!==(d=o.flags)&&void 0!==d&&d.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=a&&null!==(m=a.miniChartToken)&&void 0!==m&&m.alternateState&&wc.hide({app:o.app,customTooltipModel:a}),t.emit("hide")}},checkIfPromisesExist:function(e){var t=e.customTooltipModel;return dc({customTooltipModel:t})},getAttrExps:function(e,t){var r,n=t,i=null!==(r=e.qHyperCubeDef)&&void 0!==r&&r.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[i]||(n[i]=[]),n[i]},getAttrExprData:function(e){var t,r=[],n="",i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s,u=i.length-1;r=(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)||[],n="qDimensionInfo/".concat(u,"/qAttrExprInfo")}return{attrExps:r,fieldPath:n}},quarantineCustomTooltipAttrs:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null===(t=e.qLayoutExclude)||void 0===t||null===(r=t.quarantine)||void 0===r?void 0:r[Zl.CUSTOM.QUARANTINE];if(!i){var o=n.qAttributeExpressions||[],a=Ic(o);Sc(a,e)}},unquarantineCustomTooltipAttrs:function(e){var t,r,n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(r=t.quarantine)||void 0===r?void 0:r[Zl.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[Zl.CUSTOM.QUARANTINE]},setAttrsFromQuarantine:function(e,t){var r=Mc(e);if(r){var n=void 0!==t?t:r.length-1;if(r[n]){var i=this.getAttrExps(e,r[n]);if(0===Ic(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(te(i),te(s)),l=e;l.qHyperCubeDef?l.qHyperCubeDef.qDimensions[n].qAttributeExpressions=u:l.qHyperCube.qDimensionInfo[n].qAttrExprInfo=u}}}},moveCustomTooltipAttrs:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=[],i=Mc(e)||[],o=[].concat(te(i),[t]);o.forEach((function(e){var t=Ic(e.qAttributeExpressions||[]);t.length>0&&(n=t)}));var a=Ec(),s=i.map((function(e){var t=e,r=e.qAttributeExpressions||[];return t.qAttributeExpressions=r.filter((function(e){return!a[e.id]})),t})),u=void 0!==r?r:s.length-1;s.length>0&&(s[u].qAttributeExpressions=s[u].qAttributeExpressions.concat(n));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};function Tc(e,t,r,n){var i,o,a,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)||[],u=[],l=e.qSubNodes&&e.qSubNodes[n]?e.qSubNodes[n].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 r;switch(e.id){case Zl.CUSTOM.EXPRESSION:r="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Zl.CUSTOM.TITLE:case Zl.CUSTOM.DESCRIPTION:case Zl.CUSTOM.IMAGES:r=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:r="NaN"}return r}(e,i);u.push({source:{key:"qHyperCube",field:"".concat(r,"/").concat(n,"/qAttrExprInfo/").concat(t)},label:o,value:"value"})})),u):u}var Ac=function(e,t){var r=t.dimensionCount;if(r&&!(r<1)){var n=r-1,i="qDimensionInfo";return{field:"".concat(i,"/").concat(n),value:function(t){return Tc(t,e,i,n)}}}};var jc=function(e,t,r){var n,i,o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(n=t.data)||void 0===n||null===(i=n.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];return Number.isNaN(a)?o:function(e,t,r,n){var i,o=(B(i={},Zl.CUSTOM.TITLE,!0),B(i,Zl.CUSTOM.DESCRIPTION,!0),i),a=Oc.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===Zl.CUSTOM.EXPRESSION&&a){var s=e.qFallbackTitle,l="NaN"===a.value||e.isCustomFormatted?a.value:r("qHyperCube").field("".concat(u,"/").concat(i)).formatter()(a.value);n.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&&n.customTooltipInfoAttrExpsArr.push(R(R({},e.id===Zl.CUSTOM.TITLE&&{title:c}),{},{value:c,id:e.id}))}})),n}(r,a.map((function(t){return Te.getMeasure(e,t)})),e,o)};function kc(e){return function(e,t,r){var n=[];return e.forEach((function(e){n.push(jc(r,e,t))})),n}(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 Lc(e){var t=Zl.CUSTOM.EXPRESSION,r=e.qDef,n=r.qNumFormat,i=r.qLabel,o=r.qLabelExpression,a=r.cId;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:a}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:a}}function Pc(e){var t,r=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return r[r.length-1].qAttributeExpressions||[]}var Nc={attrExpr:{migrateProperties:function(e){var t,r,n,i,o=me(!0,{},e),a=(null===(t=o.tooltip)||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)||[],s=Pc(o);return function(e,t){var r,n=null===(r=t.qHyperCubeDef)||void 0===r?void 0:r.qDimensions;n[n.length-1].qAttributeExpressions=e}(s=function(e,t){return t.concat(e.map((function(e){return Lc(e)})))}(a,s),o),null===(i=o.tooltip)||void 0===i||delete i.data,o},getPatches:function(e){var t,r,n,i,o=(null===(t=e.tooltip)||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)||[],a=(null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qDimensions.length)-1;return function(e,t,r){var n=e.length,i=[];return t.forEach((function(e){var t=Lc(e),o=JSON.stringify(t);i.push({qPath:"/qHyperCubeDef/qDimensions/".concat(r,"/qAttributeExpressions/").concat(n),qOp:"add",qValue:o}),n++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(Pc(e),o,a)},checkForBackwardCompatibility:function(e,t){return(e.qMeasureInfo||[]).length>0&&t.length>0},updateProperties:function(e,t){var r=this;return new Promise((function(n){var i,o,a,s,u,l=(null===(i=t.qHyperCube)||void 0===i?void 0:i.qDimensionInfo)||[],c=(null===(o=t.tooltip)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.qHyperCube)||{},p=null===(s=t.qMeta)||void 0===s||null===(u=s.privileges)||void 0===u?void 0:u.includes("update");e&&e.getEffectiveProperties&&r.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((function(t){if(p){var i=r.migrateProperties(t);e.setProperties(i).then((function(){e.app.clearUndoBuffer(),n(!0)}))}else{var o=r.getPatches(t);e.applyPatches(o,!0).then((function(){e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};function Rc(e){var t=e.scaleKey,r=e.legend,n=e.onEdited,i=(r.layout||{}).dock;return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd:function(){n()}}:{},settings:{brush:"selection",scale:"".concat(t,"Range"),direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}var Fc={CORNER_RADIUS:0,INNER_RADIUS:.55,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},_c=function(e,t,r){var n=e.layout;return t.encodings.slice.outerRadius?{scale:"radius",fn:function(e){var t=.8,i=0,o=r?r.style.innerRadius:.55;return n.donut.showAsDonut&&(t=.8-o,i=o),e.scale(Math.max(0,e.datum.radius.value))*t+i}}:.8},Vc=function(e,t,r){if(!e.layout.donut.showAsDonut)return 0;var n=r?r.style.innerRadius:.55;return t.encodings.slice.outerRadius?{scale:"radius",fn:function(e){var t=.8-n,r=n;return e.scale(Math.min(0,e.datum.radius.value))*t+r}}:n},Hc=function(e,t){var r=e.layout,n=t.colorService.getDatumProps(),i=n[Object.keys(n)[0]],o=i&&i.field?i.field:void 0,a="qDimensionInfo/0"===o,s=o?t.ds.field(o).raw():null,u=s&&(s.label||s.title||s.qFallbackTitle)||"",l=t.encodings.slice.outerRadius,c=t.chart.formatter,p=De(r,"qHyperCube.qDimensionInfo",[]).length;function f(e,r){var n=t.ds.field(e).raw();return{field:e,label:!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType)?function(e){return c(r)(e.qNum)}:function(e){return e.qText}}}var d=(r.components||[]).filter((function(e){return"slices"===e.key}))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:R(R({},n),{},{num:f(t.encodings.slice.arc,"arc"),fillTooltip:o?{field:o,label:u,value:function(e){return a?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}}:void 0,customTooltipAttrExps:0!==p?Ac(r,{dimensionCount:p}):void 0,radius:l?f(l,"outerRadius"):void 0})}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:function(){return t.viewState.get("rotation")},endAngle:function(){return t.viewState.get("rotation")+2*Math.PI},slice:{arc:{ref:"num"},innerRadius:Vc({layout:r},t,d),fill:t.colorService.getColor(),strokeWidth:d?Fc.STROKE.WIDTH[d.style.strokeWidth.toUpperCase()]:Fc.STROKE.WIDTH.NONE,stroke:d?d.style.strokeColor.color:Fc.STROKE.COLOR,outerRadius:_c({layout:r},t,d),cornerRadius:d?d.style.cornerRadius:0}}}};function zc(e,t,r){var n=e.layout,i=(n.components||[]).filter((function(e){return"slices"===e.key}))[0],o=i?i.style.innerRadius:.55,a=t.encodings.slice.outerRadius;return!(!n.donut.showAsDonut||!a)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:ie(r.theme,"object.pieChart","label.name","color")||"#333",outerRadius:{scale:"radius",fn:function(e){var t=.8-o,r=o;return e.scale(0)*t+r}}}}}}function Uc(e,t,r){return!(e.layout.donut.showAsDonut||!t.encodings.slice.outerRadius)&&{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:ie(r.theme,"object.pieChart","label.name","color")||"#333"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}}}function Bc(e,t){var r=e.layout,n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return r.donut.showAsDonut||(n.radius.min=0),n}var Wc=ie;function Yc(e){var t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Kc(e){return e.node.data.num.label}function $c(e){return e.node.data.radius.label}function Jc(e,t,r){return e.dataPoint.auto?r?Kc:Yc:"share"===e.dataPoint.labelMode?Yc:"value"===e.dataPoint.labelMode?t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?$c:Kc:null}function Zc(e){var t=e.data;return t?t.label:""}function Gc(e,t,r){var n=parseInt(Wc(e,"object.pieChart",t,r),10);if(!isNaN(n))return n}function Xc(e){var t=((e&&e.components?e.components:void 0)||[]).filter((function(e){return"slices"===e.key}))[0];return!t||t.style.innerRadius>.3}function Qc(e){var t=e.node,r=e.data;return me({_share:t.desc.share,_fillColor:t.attrs.fill},r)}function ep(e,t,r){var n=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",fill:Wc(r.theme,"object.pieChart","label.name","color"),padding:t.encodings.slice.outerRadius?4:2}],fontSize:Gc(r.theme,"label.name","fontSize"),fontFamily:Wc(r.theme,"object.pieChart","label.name","fontFamily"),label:Zc,linkData:function(e){var t=e.node,r=e.data;return me({_share:t.desc.share,_fillColor:t.attrs.fill,_showTooltip:!0},r)}}];if(Jc(e,t,!1)){var i=function(e,t,r){return{label:Jc(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&Xc(e)?"inside":"into",onBackground:e.donut.showAsDonut&&Xc(e),padding:4}],theme:r.theme,themeId:"object.pieChart"}}(e,t,r),o=ke(me(t,i),r.theme);o.linkData=Qc,n.push(o)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:n}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]}}}function tp(e,t){var r=e.layout,n=e.context;return!1!==r.dataPoint.show&&(1===t.dataRowCount?function(e,t,r){var n=Jc(e,t,!0),i=function(e){return function(t){return e.getContrastingColorTo(t.node.attrs.fill)}}(r.theme);return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fill:e.donut.showAsDonut?r.theme.getStyle("object.pieChart","label.name","color"):i,fontSize:Gc(r.theme,"label.name","fontSize"),fontFamily:Wc(r.theme,"object.pieChart","label.name","fontFamily"),label:Zc},{fill:e.donut.showAsDonut?r.theme.getStyle("object.pieChart","label.value","color"):i,fontSize:Gc(r.theme,"label.value","fontSize"),fontFamily:Wc(r.theme,"object.pieChart","label.value","fontFamily"),label:n}]}}}]}}}(r,t,n):ep(r,t,n))}function rp(e){return De(e,"customTooltipModel.useCustomTooltip",!1)}function np(e,t){return rp(t)&&De(e,"tooltip.hideBasic",0)}function ip(e,t){return e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}})}function op(e){return[{content:e.title,style:{"font-weight":"bold"},colspan:2},{}]}function ap(e){return[{content:e.value,colspan:2},{}]}function sp(e,t,r){var n=[ip(e,t)];return n.push(t.color.value),[{content:t.color.label},{content:n,style:{"text-align":r?"left":"right"}}]}function up(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[e.value];return n&&o.unshift(ip(t,r)),[{content:"".concat(e.label,":")},{content:o,style:{"text-align":i?"left":"right"}}]}function lp(e,t,r,n){return np(r,n)||void 0===e.share.value?[]:[{content:e.share.label},{content:e.share.value,style:{"text-align":t?"left":"right"}}]}function cp(e,t,r){return np(r,e)||t.measures.some((function(t){return t.field===e.coloring.field}))||void 0===t.color.value}function pp(e,t,r,n){return 0===r.length&&0===n.length&&(""!==e&&void 0!==e||""!==t&&void 0!==t)}function fp(e,t,r){var n,i=e.node,o=e.node.data,a=e.resources.formatter,s=e.resources.dataset,u={};if("color"!==t.coloring.type&&o.fillTooltip){var l=a("fill"),c="measure"===t.coloring.fieldType;u.value=c&&l?l(o.fillTooltip.value):o.fillTooltip.value,u.label="".concat(o.fillTooltip.label,":")}function p(e){return{label:s(e.source.key).field(e.source.field).title(),value:e.label,field:e.source.field}}t.coloring.label&&(u.label="".concat(t.coloring.label,":")),u.fill=void 0===o._fillColor?i.attrs.fill:o._fillColor,i&&i.desc&&void 0!==i.desc.share?n=i.desc.share:i&&o&&void 0!==o._share&&(n=o._share);var f=[p(o.num)];t.encodings.slice.outerRadius&&f.push(p(o.radius));var d={title:o.label,color:u,share:{label:"".concat(t.translator&&t.translator.get("properties.dataPoints.labelmode.share")||"Share",":"),value:void 0!==n?a("share")(n):void 0},measures:f};if(rp(t)){var m,h,g,v,y,b,x=kc({dataset:s,nodes:[i],layout:r});if(d.customTitle=x.customTooltipInfoAttrExpsArr.filter((function(e){return e.id===Zl.CUSTOM.TITLE})),d.customDescription=x.customTooltipInfoAttrExpsArr.filter((function(e){return e.id===Zl.CUSTOM.DESCRIPTION})),d.customMeasures=x.customTooltipAttrExpsArr,t.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!==(m=r.tooltip)&&void 0!==m&&null!==(h=m.chart)&&void 0!==h&&null!==(g=h.object)&&void 0!==g&&g.refId&&t.customTooltipModel.embed&&"function"==typeof(null===(v=t.customTooltipModel.model)||void 0===v?void 0:v.getEffectiveProperties))if(null!==(y=(b=t.app).isInModalSelection)&&void 0!==y&&y.call(b)){wc.destroyVisualization({customTooltipModel:t.customTooltipModel});var q=t.translator.get("properties.tooltip.notselectedmessage");d.customLimitation=q}else{var D=wc.createContainer({ctx:e,layout:r});d.customChart=D}i.data.customTooltipImages&&(d.customImages=i.data.customTooltipImages)}return d}function dp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=[],i=Se({rtl:r.rtl});return me(!0,i,{scale:"fill",settings:{filter:function(e){return e.filter((function(e){return e.data&&("path"===e.type&&("slices"===e.key||"negative-indicators"===e.key)||"text"===e.type&&e.data._showTooltip&&"pie-labels"===e.key)}))},extract:function(i){var o,a;n=[i.node];var s,u=e.layout,l=fp(i,t,u),c=[],p=np(u,t)?[]:l.measures,f=rp(t)&&pp(l.customTitle[0],l.customDescription[0],p,l.customMeasures)?[]:op(l);(rp(t)&&l.customTitle.length>0&&c.push(op(l.customTitle[0])),rp(t)&&l.customDescription.length>0&&c.push(ap(l.customDescription[0])),c=cp(t,l,u)?c.concat([f].concat(te(p.map((function(e){return up(e,i,l,e.field===t.coloring.field,r.rtl)}))),[lp(l,r.rtl,u,t)])):c.concat([f,sp(i,l,r.rtl)].concat(te(p.map((function(e){return up(e,i,l,!1,r.rtl)}))),[lp(l,r.rtl,u,t)])),rp(t)&&l.customMeasures.length>0)&&(s=c).push.apply(s,te(l.customMeasures.map((function(e){return up(e,i,l,e.field===t.coloring.field,r.rtl)}))));if(null!==(o=t.flags)&&void 0!==o&&o.isEnabled("CUSTOM_TOOLTIP_CHART")&&l.customChart&&c.push(l.customChart),null!==(a=t.flags)&&void 0!==a&&a.isEnabled("CUSTOM_TOOLTIP_CHART")&&l.customLimitation&&c.push(Te.getFooterRow(l.customLimitation,r)),l.customImages){var d,m=l.customImages.map((function(e){return Te.getImageRow(e,i)}));(d=c).push.apply(d,te(m))}return c},placement:function(e){return"slices"===e.nodes[0].key?{type:"slice"}:{type:"bounds"}},direction:r.rtl?"rtl":"ltr",afterShow:function(){var e,i,o,a=t.app,s=t.properties,u=t.customTooltipModel;null!==(e=t.flags)&&void 0!==e&&e.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(i=(o=t.app).isInModalSelection)||void 0===i||!i.call(o))&&u.useCustomTooltip&&u.embed&&wc.show({app:a,properties:s,selectedNodes:n,customTooltipModel:u,rtl:r.rtl})}},style:{content:{fontFamily:r.theme.getStyle("object.pieChart","","fontFamily")}}})}function mp(e){var t=e.srcEvent.target;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}var hp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Pan",requireFailure:r,recognizeWith:n,options:{event:"legendRange",enable:function(t,r){if(this.started||!r)return!0;if(e.constraints.select||e.constraints.active)return!1;var n=(this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return"legend-seq"===e.type}))||mp(r))&&!e.isLocked([this.chart.component("slices")]);return n||this.chart.component("legendRangeBrush").emit("rangeClear"),n}},events:{legendRangestart:function(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove:function(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend:function(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}}};function gp(e,t){var r,n,i=t.element.getBoundingClientRect();return e.center?(r=e.center.x,n=e.center.y):(r=e.clientX,n=e.clientY),{x:r-i.left,y:n-i.top}}function vp(e,t){var r=t.component("slices");if(!r)return!1;var n,i,o,a,s=gp(e,t),u=s.x,l=s.y,c=r.rect.x+r.rect.margin.left+r.rect.width/2,p=r.rect.y+r.rect.margin.top+r.rect.height/2,f=Math.min(r.rect.width,r.rect.height)/2*.8;return n=c,i=p,o=u,a=l,Math.pow(n-o,2)+Math.pow(i-a,2)<=Math.pow(f,2)}var yp=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.requireFailure,i=r.recognizeWith,o=e.customTooltipModel.utils,a=e.debouncer(o.displayTooltip,o.DEBOUNCE_THRESHOLD);return{type:"Tap",requireFailure:n,recognizeWith:i,options:{event:"tap",interval:10,pointers:1,enable:function(t,r){return!r||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key})),this.components.length)}},events:{tap:function(r){r.preventDefault();var n=r.srcEvent.target;if(!n||"INPUT"!==n.nodeName&&!n.hasAttribute("data-other-value")){if(n&&n.hasAttribute("data-action")&&n.hasAttribute("data-component-key"))this.chart.component(n.getAttribute("data-component-key")).emit(n.getAttribute("data-action"));else if(!(n&&n.children&&n.children[0]&&"legend-cat"===n.children[0].getAttribute("data-component-key")||e.isLocked(this.components))){e.interactions.emit("selections-start");var i=gp(r,this.chart);this.components.some((function(e){return"legend-cat"===e.key}))&&(i={cx:i.x,cy:i.y,r:5});var s=this.chart.shapesAt(i,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"}),u=this.chart.component("tooltip"),l="mouse"!==r.pointerType&&u&&u.show;if(s.length){if(this.chart.brushFromShapes(s,{components:[{key:s[0].key,action:r.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect(),l&&this.components.some((function(e){return"slices"===e.key}))){var c=e.customTooltipModel;if(c.useCustomTooltip&&o.checkIfPromisesExist({customTooltipModel:c})){var p=o.getNodes(r,this.chart);a(r,u,{nodes:p,opts:e,customTooltipModel:c})}else u.emit("show",r,{nodes:s})}}else l&&u.emit("hide")}}else this.chart.component("legendRangeBrush").emit("bubbleStart",r)}}}},bp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Pan",requireFailure:r,recognizeWith:n,options:{event:"lasso",enable:function(t,r){if(this.isStarted||!r)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;var n=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y});return!e.isLocked(n)&&n.some((function(e){return"slices"===e.key}))}},events:{lassostart:function(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove:function(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend:function(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}},xp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"areatap",pointers:2,enable:function(t,r){if(this.started||!r)return!0;if(e.constraints.active||e.constraints.select)return!1;var n=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y});return n.some((function(e){return"slices"===e.key}))&&!e.isLocked(n)}},events:{areatap:function(t){var r=this,n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((function(){n.emit("areaEnd"),e.onSelect(),r.started=!1}),100)),t.preventDefault()}}}};function qp(e,t,r){var n=e.chart.component("tooltip");n&&n.show&&(n.emit("hide"),r.customTooltipModel.useCustomTooltip&&t&&t({},n,{nodes:[],opts:r,customTooltipModel:r.customTooltipModel,hide:!0}))}function Dp(e){var t=e.customTooltipModel.utils,r=e.debouncer(t.displayTooltip,t.DEBOUNCE_THRESHOLD);return{type:"native",key:"theusual",events:{wheel:function(t){var n=!1;if(!e.constraints.active&&vp(t,this.chart)){var i=Math.sign(-t.deltaY);e.viewState.set("rotation",i*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){var o=this.chart.componentsFromPoint(t).filter((function(e){return"legend-cat"===e.key}))[0];o&&(n=!0,function(e,t){var r=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(r)}(t,o))}n&&t.preventDefault(),qp(this,r,e)},mousemove:function(n){if(!e.constraints.passive){var i=this.chart.componentsFromPoint({x:n.clientX,y:n.clientY}),o=this.chart.component("tooltip");if(o&&o.show&&i.some((function(e){return"slices"===e.key}))){var a=e.customTooltipModel;if(a.useCustomTooltip&&t.checkIfPromisesExist({customTooltipModel:a})){var s=t.getNodes(n,this.chart);r(n,o,{nodes:s,opts:e,customTooltipModel:a})}else o.emit("show",n)}else o&&o.show&&o.emit("hide")}},mouseup:function(t){2===t.button&&qp(this,r,e)},mouseleave:function(){qp(this,r,e)}}}}var Cp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Pan",requireFailure:r,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable:function(t,r){return!(!this.started&&r)||!e.constraints.active&&!e.interactions.lasso.active()&&vp(r,this.chart)}},events:{rotatestart:function(e){e.preventDefault();var t=this.chart.component("slices").rect,r=this.chart.element.getBoundingClientRect();this.pieCenter={x:r.left+t.x+t.width/2,y:r.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove:function(t){t.preventDefault();var r=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",r-this.prevAngle),this.prevAngle=r},rotateend:function(e){e.preventDefault(),this.started=!1},rotatecancel:function(e){e.preventDefault(),this.started=!1}}}},wp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Pan",requireFailure:r,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable:function(t,r){return!(!this.isStarted&&r)||!e.constraints.active&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return"legend-cat"===e.type}))}},events:{legendPanstart:function(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((function(t){t.emit("panstart",e)})),this.isStarted=!0;var t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove:function(e){this.components.forEach((function(t){t.emit("panmove",e)})),e.preventDefault()},legendPanend:function(e){e.preventDefault(),this.components.forEach((function(t){t.emit("panend",e)})),this.isStarted=!1}}}},Sp=function(e,t){return{key:"hammered",type:"hammer",enable:!0,gestures:t?[Cp(e,{}),yp(e,t,{})]:[hp(e,{}),xp(e,{}),Cp(e,{}),bp(e,{}),wp(e,{}),yp(e,t,{})]}};function Mp(e,t,r){var n=e.getIsSingleSelect(0),i=r.constraints;return i.active&&i.passive?[]:[Sp(t,n),Dp(t)]}function Ep(e,t){var r=e.settings,n={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:r.scales.fill&&r.scales.fill.data&&r.scales.fill.data.field?{data:{field:r.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function Ip(e,t,r){var n=e.layout;if(!n.dimensionTitle)return!1;var i=t.properties;return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:n.qHyperCube,hyperCubeDef:i&&i.qHyperCubeDef,isDimension:!0,disabled:function(){return r.constraints.active||!r.model},model:t.model,app:t.app,translator:t.translator,rtl:r.rtl,selections:t.selections},style:{fontFamily:r.theme.getStyle("object","axis.title","fontFamily"),fontSize:r.theme.getStyle("object","axis.title","fontSize"),color:r.theme.getStyle("object","axis.title","color")}}}function Op(e,t,r){return function(e,t,r){if(!e)return!1;var n=t.translator,i=r.rtl;return{key:"disclaimer",type:"disclaimer",layout:{dock:ve[e].alignment},settings:{label:n.get("Object.Disclaimer.".concat(e)),rtl:i}}}(function(e,t){var r={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(r.props.radius={field:t.encodings.slice.outerRadius});var n=t.ds.extract(r);if(0===n.length)return"NoDataExist";var i=De(e,"qHyperCube.qSize.qcy");if(De(e,"qHyperCube.qDataPages.0.qArea.qHeight")<i)return"LimitedData";if(0===(n=t.encodings.slice.outerRadius?n.filter((function(e){return"NaN"!==e.num.value&&"NaN"!==e.radius.value})):n.filter((function(e){return"NaN"!==e.num.value}))).length)return"OnlyNanData";var o=n;return 0===(n=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?n.filter((function(e){return e.num.value>0&&e.radius.value>0})):n.filter((function(e){return e.num.value>0}))).length?"OnlyNegativeOrZeroValues":o.length!==n.length&&"NegativeOrZeroValues"}(e.layout,t),t,r)}function Tp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};return me(n,r.colorService.getScales()),r.encodings.slice.outerRadius&&me(n,Bc({layout:t},r)),n}function Ap(e){var t=e.instance,n=e.models,i=e.picasso,o=e.flags,a=h(),s=D(),u=C(),l=w(),c=E(),p=I(),f=S(),d=v(),m=O(),g=T().qLocaleInfo,y=ee(A((function(){if(!n)return Promise.resolve();Nc.attrExpr.updateProperties(s,f);return Promise.all([n.colorService.initialize({createConfig:function(e){var t=e.getUseBaseColors;return{theme:p,legendProps:f.legend,layout:f,localeInfo:g,hc:f.qHyperCube,colorProps:R(R({},f.color),{},{useBaseColors:t(f)})}}}),s&&!f.snapshotData?s.getEffectiveProperties():Promise.resolve({}),n.pluginService.initialize()])}),[n]),1)[0];q((function(){null!=t&&t.selectionService&&t.selectionService.setLayout(f)}),[f]),q((function(){if(t&&y){var e=t.chart,h=t.viewState,v=t.interactions,b=n.colorService,x=n.pluginService,q=a.viewState||{};f.snapshotData||(h.preventSet("legendScrollOffset",q.legendScrollOffset||0),h.preventSet("rotation",q.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(f,h);var D=i.data("q")({key:"qHyperCube",data:f.qHyperCube,config:{localeInfo:g}}),C=[{type:"q",key:"qHyperCube",data:f.qHyperCube,config:{localeInfo:g}}].concat(te(b.getData())),w={slice:{arc:"qMeasureInfo/0"}};f.qHyperCube.qMeasureInfo.length>1&&(w.slice.outerRadius="qMeasureInfo/1");var S=function(e){var t=e.layout,r=e.app,n=e.picasso,i=e.model,o=e.chart,a=e.translator,s=e.localeInfo,u=e.embed;return{layout:t,app:r,picasso:n,model:i,chart:o,translator:a,localeInfo:s,useCustomTooltip:t.tooltip&&!t.tooltip.auto,utils:Oc,miniChartToken:{},embed:u}}({layout:f,app:u,model:s,picasso:i,chart:e,translator:l,localeInfo:g,embed:c}),M=function(e,t){return t.slice.outerRadius?e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((function(e){return e.num.value>0&&"NaN"!==e.radius.value})).length:e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((function(e){return e.num.value>0})).length}(i.data("q")({data:f.qHyperCube,config:{localeInfo:g}}),w),E=d?function(){var t=e.brush("selection");r.selections(t,{},f).forEach((function(e){d.select(e)}))}:function(){},I=f.snapshotData&&!a.freeResize?{width:(f.snapshotData.content.size||f.snapshotData.object.size).w,height:(f.snapshotData.content.size||f.snapshotData.object.size).h}:void 0,O=function(e){return t.selectionService.getIsSelectionLocked(e)},T=function(){return function(e){var t=e.layout,r=e.context,n=e.selectionService,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Tp({layout:t},i),a={scales:o},s=[],u=Op({layout:t},i,r);if(u&&"center"===u.layout.dock)return{components:[u]};var l=r.constraints.select||r.constraints.active,c=i.colorService.getLegend({eventName:"legend",key:"legend",viewState:i.viewState,chart:i.chart,styleReference:"object.pieChart",rtl:r.rtl},{navigationDisabled:l});return o.fillRange&&c.components[0]&&("right"===c.components[0].layout.dock||"left"===c.components[0].layout.dock||r.rtl)&&(o.fillRange.invert=!0),s=(s=[Hc({layout:t,settings:a},i),zc({layout:t},i,r),{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}},Uc({layout:t},i,r),Ip({layout:t},i,r)].concat(te(c.components),[Rc({settings:a,scaleKey:"fill",legend:c.components[0]||{},onEdited:i.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},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}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},tp({layout:{dataPoint:me({},t.dataPoint,{show:!(t.effectPath&&t.snapshotData&&!1===t.dataPoint.show)}),donut:t.donut},context:r},i),dp({layout:t},R(R({},i),{},{coloring:i.colorService.getSettings()}),r),(!1!==t.showDisclaimer||!i.flags.isEnabled("SHOW_DISCLAIMER"))&&u])).filter((function(e){return!1!==e})),{interactions:Mp(n,i,r),scales:o,components:i.pluginService.extendComponents(s),palettes:i.colorService.getPalettes(),formatters:Ep({settings:a},i),strategy:qe(0,i)}}({layout:f,context:{rtl:"rtl"===a.direction,theme:p,translator:l,constraints:m,model:s},selectionService:t.selectionService},{picasso:i,ds:D,model:s,app:u,chart:e,onSelect:E,isLocked:O,interactions:v,constraints:m,translator:l,viewState:h,dataRowCount:M,encodings:w,colorService:b,pluginService:x,customTooltipModel:S,debouncer:Ss,properties:y[1],logicalSize:I,flags:o})};t.generateSettings=T,e.update({data:C,settings:T()}),a.effect&&f.effectProperties?a.effect.update(f,e,{encodings:w}):f.effectPath||e.brush("highlight").end()}}),[t,y,a.direction,a.effectProperties,m,p.name(),l.language()])}function jp(e){var t=e.instance,r=e.models,n=g(),i=S();k((function(e){if(!(i.snapshotData&&i.snapshotData.content&&i.snapshotData.content.chartData)&&(function(e,t){var r=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:r.width,h:r.height}}(e,n),t&&r))return function(e){var t=e.layout,r=e.chart,n=e.viewState,i=e.colorService;return t.snapshotData.content=t.snapshotData.content||{},t.snapshotData.content.chartData={legendScrollOffset:Ce(r,"legend-cat"),rotation:n.get("rotation")},i.getSnapshotData().then((function(e){t.snapshotData.content.chartData=R(R({},t.snapshotData.content.chartData),e)})).catch((function(){}))}({layout:e,chart:t.chart,colorService:r.colorService,viewState:t.viewState})})),L((function(){return{getViewState:function(){return{rotation:t.viewState.get("rotation"),legendScrollOffset:Ce(t.chart,"legend-cat")}}}}),[t])}var kp={exports:{}};window;var Lp=oe(kp.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"===F(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
  /*!***************************************!*\
@@ -971,4 +971,4 @@ function(e,t,r){r.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine
971
971
  !*** ./utils/wrap-file-name.js ***!
972
972
  \*********************************/
973
973
  /*! exports provided: default */
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}))}})),Pp=function(e,t,r){if(t){var n,i=t.split("."),o=e,a=i[i.length-1];for(n=0;n<i.length-1;++n)null==o[i[n]]&&(o[i[n]]=Number.isNaN(+i[n+1])?{}:[]),o=o[i[n]];void 0!==r?o[a]=r:delete o[a]}},Np=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(null==o[i[n]])return r;o=o[i[n]]}return o},Rp=function(e){return Np(e,"qHyperCubeDef.qMeasures.length",0)};var Fp={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return Rp(e)>=1}},showLegend:function(e){var t=Np(e,"color.auto"),r=Np(e,"color.expressionIsColor"),n=Np(e,"color.mode");return!(!t&&"primary"===n||!t&&"byExpression"===n&&(r||void 0===r))},persistentColorsShow:function(e){return!Np(e,"color.auto")&&"byDimension"===Np(e,"color.mode")},useDimValColShow:function(e){return void 0===Np(e,"color.useDimColVal")&&Pp(e,"color.useDimColVal",!1),!Np(e,"color.auto")&&"byDimension"===Np(e,"color.mode")&&"libraryItem"===Np(e,"color.byDimDef.type")}},_p=function(e){var t=Fp.colorModeOptions,r=Fp.persistentColorsShow,n=Fp.useDimValColShow,i=Fp.showLegend;this.color={colorMode:{options:function(r){var n=[];return"explore"===e&&n.push({value:"auto",translation:"Common.Auto"}),n.push({value:"primary",translation:"properties.colorMode.primary"}),n.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(r)&&"explore"!==e&&n.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),n}},persistentColors:{show:function(e){return n(e)?r(e)&&!Np(e,"color.useDimColVal"):r(e)}},useDimColVal:{show:n}},this.legend={show:i,showTitle:{show:function(e){var t=Np(e,"color.auto");return Np(e,"legend.show")&&i(e)&&(t||!function(e){return"byExpression"===Np(e,"color.mode")&&!0===Np(e,"color.expressionIsColor")}(e))}},dock:{show:function(e){return Np(e,"legend.show")&&i(e)}}}};function Vp(e){return new _p(e)}var Hp=Vp("hard");var zp=function(e){return{uses:"settings",items:{general:{items:{showDisclaimer:null!=e&&e.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slice:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:function(e){return"none"!==e.style.strokeWidth}},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:function(e,t,r){return r.layout.donut.showAsDonut}}}}}},showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:function(e){return!e.dataPoint.auto}},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:function(e){return!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:Hp.color.colorMode.options},persistentColors:{show:Hp.color.persistentColors.show}}},legend:{show:Hp.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Hp.legend.showTitle.show},dock:{show:Hp.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}},Up={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.properties;return n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}}},Bp={uses:"sorting"},Wp={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Yp(e){return{type:"items",component:"accordion",items:{data:Up,sorting:Bp,addons:Wp,settings:zp(e)}}}var Kp=Vp("explore"),$p=Yp(),Jp={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:$p.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:$p.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue:function(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:function(e){return e.dataPoint.auto?"":e.dataPoint.labelMode}}}}}},color:{uses:"color",items:{mode:{options:Kp.color.colorMode.options},dimension:{items:{persistentColors:{show:function(e){return!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Kp.color.useDimColVal.show(e))}}}}}}}};function Zp(e,t){var r=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(r)}function Gp(e){return e.data.num.label}function Xp(e){return e.data.radius.label}function Qp(e,t,r,n){return function(e,t){return e.dataPoint.auto?1===e.qHyperCube.qSize.qcy?Gp:Zp:"share"===e.dataPoint.labelMode?Zp:"value"===e.dataPoint.labelMode&&t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Xp:Gp}(r,n)(e,t)}function ef(e){var t,r,n,i;return e.data.label?(r=e.data.label,n=20,(i=r).length>n&&(i="".concat(i.substr(0,n-3),"...")),t=i):t="",t}var tf=function(){function e(t){var r=t.element,n=t.properties,i=t.effectHelper,o=t.Flag;H(this,e),this.element=r,this.Flag=o,i.initFade(this.element);var a=r.find(".effectLayer");a.length>0&&a.remove(),r.append('<div class="effectLayer"></div>'),this.effectLayer=r.find(".effectLayer"),this._effectProperties=n,this.selectedIndex=n.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,i.fadeIn(this.element)}return U(e,[{key:"updateOrigSettings",value:function(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}},{key:"updateFlags",value:function(e,t){var r=this,n=this.chart.getAffectedShapes("highlight"),i=this.effectLayer[0].getBoundingClientRect(),o=n.map((function(n){var o=n.desc.slice,a=o.start,s=o.end,u=o.outerRadius,l=o.offset,c=r.chart.component(n.key).rect.scaleRatio,p=n.element.getBoundingClientRect(),f=(a+s)/2,d=p.left-i.left+c.x*(l.x+u*Math.sin(f)),m=p.top-i.top+c.y*(l.y-u*Math.cos(f)),h=Math.cos(f)>0?"top":"bottom",g=Math.sin(f)>0?"right":"left";return{title:ef(n),label:Qp(n,r.chart.formatter,e,t),orientation:"".concat(h).concat(g),position:{x:d,y:m}}}));this.Flag.show(this.effectLayer,o)}},{key:"init",value:function(e,t,r,n){var i=this;return t.getProperties().then((function(e){if(!e.originalModelSettings){var o=me(!0,{},e);e.originalModelSettings=i.updateOrigSettings(o)}e.effectProperties=n,e.effectPath=r,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}},{key:"remove",value:function(e,t,r){return e.options=me(e.options,{effect:null}),r?t.getProperties().then((function(e){return me(e,{effectPath:null,effectProperties:null,dataPoint:me(!0,{},e.originalModelSettings.dataPoint),legend:me(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle})})):Promise.resolve()}}]),e}(),rf=function(e){Y(r,tf);var t=X(r);function r(){return H(this,r),t.apply(this,arguments)}return U(r,[{key:"init",value:function(e,t,n,i){return e.options=me(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===i.max?Promise.resolve():Q(K(r.prototype),"init",this).call(this,e,t,n,i)}},{key:"update",value:function(e,t,r){this.chart=t,this.updateHighlight(e),this.updateFlags(e,r)}},{key:"updateHighlight",value:function(e){var t=this.chart.component("slices").data.items,r=e.effectProperties.min,n=e.effectProperties.max,i=[],o=[1/0,-1],a=[-1/0,-1];t.forEach((function(e,t){var i=e.num.value;r&&i<o[0]&&(o=[i,t]),n&&i>a[0]&&(a=[i,t])})),-1!==o[1]&&i.push(t[o[1]].value),-1!==a[1]&&i.push(t[a[1]].value),i.length&&this.chart.brush("highlight").setValues(i.map((function(e){return{key:"qHyperCube/qDimensionInfo/0",value:e}})))}}]),r}();var nf=function(e){Y(r,tf);var t=X(r);function r(e){var n;return H(this,r),(n=t.call(this,e)).hasPropertiesPanel=!0,n.propsTemplate=e.highlightValuePropsTemplate,n.effectHelper=e.effectHelper,n}return U(r,[{key:"onClick",value:function(e){if(this.chart){var t=this.chart.shapesAt(function(e,t){var r=t.element.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}(e,this.chart),{propagation:"stop"});if(1===t.length){var r=t[0],n=this.chart.component("slices").data.items.map((function(e){return e.value})).indexOf(r.data.value);-1!==n&&(this.selectedIndex=n,this.effectHelper.updateSelectedPointIndex(this))}}}},{key:"update",value:function(e,t,r){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,r),this.updateFlags(e,r)}},{key:"updateHighlight",value:function(e){var t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}},{key:"updateDataPoints",value:function(e,t){var r=this;this.dataPoints=this.chart.findShapes("path").filter((function(e){return"slices"===e.key})).map((function(n,i){var o=Qp(n,r.chart.formatter,e,t),a=ef(n);return{text:"".concat(a," (").concat(o,")"),value:i}}))}},{key:"init",value:function(e,t,n,i){return e.options=me(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===i.selectedIndex?Promise.resolve():Q(K(r.prototype),"init",this).call(this,e,t,n,i)}}]),r}(),of={isCompatible:function(e){var t=e.effectPath;return"/effects/maxmin"===t||"/effects/highlight-value"===t},create:function(e){return"/effects/maxmin"===e.effectPath?new rf(e):"/effects/highlight-value"===e.effectPath?new nf(e):null}};function af(e){var t={},r=e.components,n=e.tooltip,i=r?r.filter((function(e){return"slices"===e.key}))[0]:void 0;if(i&&i.style&&Object.keys(i.style).forEach((function(e){t["chart_style_".concat(e)]=i.style[e]})),n){var o,a;t.chart_tooltip_custom=!n.auto;var s=null===(o=n.chart)||void 0===o||null===(a=o.object)||void 0===a?void 0:a.refId;!n.auto&&s&&(t.chart_tooltip_custom_mini_chart=s)}return t}function sf(e){if(e.qHyperCubeDef){var t=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;1===t.length&&1===r.length&&(r[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}}function uf(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function lf(e){var t=e.translator;return{dimensions:{min:1,max:1,description:function(){return t.get("Visualizations.Descriptions.Slice")},add:function(e,t){uf(e),sf(t),Oc.addCallbackCustomTooltip(t)},move:function(e,t){uf(e),sf(t),Oc.moveCallbackCustomTooltip(t,e)},remove:function(e,t){Oc.removeCallbackCustomTooltip(t,e)},replace:function(e,t,r,n){uf(e),sf(n),Oc.replaceCallbackCustomTooltip(n,t)}},measures:{min:1,max:2,description:function(e,r){return t.get(0===r?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius")},add:function(e,t){sf(t)},remove:function(e,t){!function(e){if(e.qHyperCubeDef){var t=e.qHyperCubeDef.qMeasures;"byExpression"===e.color.mode&&0===t.length&&(e.color.mode="primary")}}(t)}}}}var cf=function(e){return e.qMax<=0},pf=function(e){return!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(cf))};function ff(e){return{definition:Yp(e.flags),softDefinition:Jp,support:{snapshot:pf,export:pf,exportData:!0,sharing:pf,viewData:!0,effects:!0},effects:of,extendMetrics:af,importProperties:function(t,r,n,i){var o={layout:{templateId:r.templateId}};n.mapProperties(o);var a={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()},s=Lp.colorChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:lf(e),defaultPropertyValues:a,hypercubePath:i});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:function(e,t,r){return Lp.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:r})}}}function df(e){return{properties:R({},{version:"1.11.7",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:Fc.STROKE.COLOR},cornerRadius:Fc.CORNER_RADIUS,innerRadius:Fc.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!1,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}}),data:{targets:[lf(e)]},importProperties:function(t){var r=t.exportFormat,n=t.initialProperties,i=t.hypercubePath,o=Lp.colorChart.importProperties({exportFormat:r,initialProperties:n,dataDefinition:lf(e),hypercubePath:i});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode;return Lp.colorChart.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n})}}}export default function(i){!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(P).forEach((function(t){e.add(P[t])}))}}(i.translator);var o=function(){var i=t();return i.use(r),i.use(n(e)),i.use(No()),i.component("pie-dividers",_o),i.component("negative-indicators",Bo),i}();return{qae:df(i),ext:ff(i),component:function(){var e=$l({picasso:o}),t=Jl({instance:e});Ap({instance:e,models:t,picasso:o,flags:i.flags}),function(e){var t=e.instance,r=S(),n=h(),i=j();q((function(){t&&t.generateSettings&&(t.chart.update({settings:t.generateSettings()}),n.effect&&n.effect.update(r,t.chart))}),[i.width,i.height])}({instance:e}),jp({instance:e,models:t})}}}
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}))}})),Pp=function(e,t,r){if(t){var n,i=t.split("."),o=e,a=i[i.length-1];for(n=0;n<i.length-1;++n)null==o[i[n]]&&(o[i[n]]=Number.isNaN(+i[n+1])?{}:[]),o=o[i[n]];void 0!==r?o[a]=r:delete o[a]}},Np=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(null==o[i[n]])return r;o=o[i[n]]}return o},Rp=function(e){return Np(e,"qHyperCubeDef.qMeasures.length",0)};var Fp={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return Rp(e)>=1}},showLegend:function(e){var t=Np(e,"color.auto"),r=Np(e,"color.expressionIsColor"),n=Np(e,"color.mode");return!(!t&&"primary"===n||!t&&"byExpression"===n&&(r||void 0===r))},persistentColorsShow:function(e){return!Np(e,"color.auto")&&"byDimension"===Np(e,"color.mode")},useDimValColShow:function(e){return void 0===Np(e,"color.useDimColVal")&&Pp(e,"color.useDimColVal",!1),!Np(e,"color.auto")&&"byDimension"===Np(e,"color.mode")&&"libraryItem"===Np(e,"color.byDimDef.type")}},_p=function(e){var t=Fp.colorModeOptions,r=Fp.persistentColorsShow,n=Fp.useDimValColShow,i=Fp.showLegend;this.color={colorMode:{options:function(r){var n=[];return"explore"===e&&n.push({value:"auto",translation:"Common.Auto"}),n.push({value:"primary",translation:"properties.colorMode.primary"}),n.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(r)&&"explore"!==e&&n.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),n}},persistentColors:{show:function(e){return n(e)?r(e)&&!Np(e,"color.useDimColVal"):r(e)}},useDimColVal:{show:n}},this.legend={show:i,showTitle:{show:function(e){var t=Np(e,"color.auto");return Np(e,"legend.show")&&i(e)&&(t||!function(e){return"byExpression"===Np(e,"color.mode")&&!0===Np(e,"color.expressionIsColor")}(e))}},dock:{show:function(e){return Np(e,"legend.show")&&i(e)}}}};function Vp(e){return new _p(e)}var Hp=Vp("hard");var zp=function(e){return{uses:"settings",items:{general:{items:{showDisclaimer:null!=e&&e.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slice:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:function(e){return"none"!==e.style.strokeWidth}},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:function(e,t,r){return r.layout.donut.showAsDonut}}}}}},showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:function(e){return!e.dataPoint.auto}},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:function(e){return!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:Hp.color.colorMode.options},persistentColors:{show:Hp.color.persistentColors.show}}},legend:{show:Hp.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Hp.legend.showTitle.show},dock:{show:Hp.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}},Up={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.properties;return n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}}},Bp={uses:"sorting"},Wp={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Yp(e){return{type:"items",component:"accordion",items:{data:Up,sorting:Bp,addons:Wp,settings:zp(e)}}}var Kp=Vp("explore"),$p=Yp(),Jp={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:$p.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:$p.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue:function(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:function(e){return e.dataPoint.auto?"":e.dataPoint.labelMode}}}}}},color:{uses:"color",items:{mode:{options:Kp.color.colorMode.options},dimension:{items:{persistentColors:{show:function(e){return!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Kp.color.useDimColVal.show(e))}}}}}}}};function Zp(e,t){var r=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(r)}function Gp(e){return e.data.num.label}function Xp(e){return e.data.radius.label}function Qp(e,t,r,n){return function(e,t){return e.dataPoint.auto?1===e.qHyperCube.qSize.qcy?Gp:Zp:"share"===e.dataPoint.labelMode?Zp:"value"===e.dataPoint.labelMode&&t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Xp:Gp}(r,n)(e,t)}function ef(e){var t,r,n,i;return e.data.label?(r=e.data.label,n=20,(i=r).length>n&&(i="".concat(i.substr(0,n-3),"...")),t=i):t="",t}var tf=function(){function e(t){var r=t.element,n=t.properties,i=t.effectHelper,o=t.Flag;H(this,e),this.element=r,this.Flag=o,i.initFade(this.element);var a=r.find(".effectLayer");a.length>0&&a.remove(),r.append('<div class="effectLayer"></div>'),this.effectLayer=r.find(".effectLayer"),this._effectProperties=n,this.selectedIndex=n.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,i.fadeIn(this.element)}return U(e,[{key:"updateOrigSettings",value:function(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}},{key:"updateFlags",value:function(e,t){var r=this,n=this.chart.getAffectedShapes("highlight"),i=this.effectLayer[0].getBoundingClientRect(),o=n.map((function(n){var o=n.desc.slice,a=o.start,s=o.end,u=o.outerRadius,l=o.offset,c=r.chart.component(n.key).rect.scaleRatio,p=n.element.getBoundingClientRect(),f=(a+s)/2,d=p.left-i.left+c.x*(l.x+u*Math.sin(f)),m=p.top-i.top+c.y*(l.y-u*Math.cos(f)),h=Math.cos(f)>0?"top":"bottom",g=Math.sin(f)>0?"right":"left";return{title:ef(n),label:Qp(n,r.chart.formatter,e,t),orientation:"".concat(h).concat(g),position:{x:d,y:m}}}));this.Flag.show(this.effectLayer,o)}},{key:"init",value:function(e,t,r,n){var i=this;return t.getProperties().then((function(e){if(!e.originalModelSettings){var o=me(!0,{},e);e.originalModelSettings=i.updateOrigSettings(o)}e.effectProperties=n,e.effectPath=r,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}},{key:"remove",value:function(e,t,r){return e.options=me(e.options,{effect:null}),r?t.getProperties().then((function(e){return me(e,{effectPath:null,effectProperties:null,dataPoint:me(!0,{},e.originalModelSettings.dataPoint),legend:me(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle})})):Promise.resolve()}}]),e}(),rf=function(e){Y(r,tf);var t=X(r);function r(){return H(this,r),t.apply(this,arguments)}return U(r,[{key:"init",value:function(e,t,n,i){return e.options=me(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===i.max?Promise.resolve():Q(K(r.prototype),"init",this).call(this,e,t,n,i)}},{key:"update",value:function(e,t,r){this.chart=t,this.updateHighlight(e),this.updateFlags(e,r)}},{key:"updateHighlight",value:function(e){var t=this.chart.component("slices").data.items,r=e.effectProperties.min,n=e.effectProperties.max,i=[],o=[1/0,-1],a=[-1/0,-1];t.forEach((function(e,t){var i=e.num.value;r&&i<o[0]&&(o=[i,t]),n&&i>a[0]&&(a=[i,t])})),-1!==o[1]&&i.push(t[o[1]].value),-1!==a[1]&&i.push(t[a[1]].value),i.length&&this.chart.brush("highlight").setValues(i.map((function(e){return{key:"qHyperCube/qDimensionInfo/0",value:e}})))}}]),r}();var nf=function(e){Y(r,tf);var t=X(r);function r(e){var n;return H(this,r),(n=t.call(this,e)).hasPropertiesPanel=!0,n.propsTemplate=e.highlightValuePropsTemplate,n.effectHelper=e.effectHelper,n}return U(r,[{key:"onClick",value:function(e){if(this.chart){var t=this.chart.shapesAt(function(e,t){var r=t.element.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}(e,this.chart),{propagation:"stop"});if(1===t.length){var r=t[0],n=this.chart.component("slices").data.items.map((function(e){return e.value})).indexOf(r.data.value);-1!==n&&(this.selectedIndex=n,this.effectHelper.updateSelectedPointIndex(this))}}}},{key:"update",value:function(e,t,r){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,r),this.updateFlags(e,r)}},{key:"updateHighlight",value:function(e){var t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}},{key:"updateDataPoints",value:function(e,t){var r=this;this.dataPoints=this.chart.findShapes("path").filter((function(e){return"slices"===e.key})).map((function(n,i){var o=Qp(n,r.chart.formatter,e,t),a=ef(n);return{text:"".concat(a," (").concat(o,")"),value:i}}))}},{key:"init",value:function(e,t,n,i){return e.options=me(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===i.selectedIndex?Promise.resolve():Q(K(r.prototype),"init",this).call(this,e,t,n,i)}}]),r}(),of={isCompatible:function(e){var t=e.effectPath;return"/effects/maxmin"===t||"/effects/highlight-value"===t},create:function(e){return"/effects/maxmin"===e.effectPath?new rf(e):"/effects/highlight-value"===e.effectPath?new nf(e):null}};function af(e){var t={},r=e.components,n=e.tooltip,i=r?r.filter((function(e){return"slices"===e.key}))[0]:void 0;if(i&&i.style&&Object.keys(i.style).forEach((function(e){t["chart_style_".concat(e)]=i.style[e]})),n){var o,a;t.chart_tooltip_custom=!n.auto;var s=null===(o=n.chart)||void 0===o||null===(a=o.object)||void 0===a?void 0:a.refId;!n.auto&&s&&(t.chart_tooltip_custom_mini_chart=s)}return t}function sf(e){if(e.qHyperCubeDef){var t=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;1===t.length&&1===r.length&&(r[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}}function uf(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function lf(e){var t=e.translator;return{dimensions:{min:1,max:1,description:function(){return t.get("Visualizations.Descriptions.Slice")},add:function(e,t){uf(e),sf(t),Oc.addCallbackCustomTooltip(t)},move:function(e,t){uf(e),sf(t),Oc.moveCallbackCustomTooltip(t,e)},remove:function(e,t){Oc.removeCallbackCustomTooltip(t,e)},replace:function(e,t,r,n){uf(e),sf(n),Oc.replaceCallbackCustomTooltip(n,t)}},measures:{min:1,max:2,description:function(e,r){return t.get(0===r?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius")},add:function(e,t){sf(t)},remove:function(e,t){!function(e){if(e.qHyperCubeDef){var t=e.qHyperCubeDef.qMeasures;"byExpression"===e.color.mode&&0===t.length&&(e.color.mode="primary")}}(t)}}}}var cf=function(e){return e.qMax<=0},pf=function(e){return!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(cf))};function ff(e){return{definition:Yp(e.flags),softDefinition:Jp,support:{snapshot:pf,export:pf,exportData:!0,sharing:pf,viewData:!0,effects:!0},effects:of,extendMetrics:af,importProperties:function(t,r,n,i){var o={layout:{templateId:r.templateId}};n.mapProperties(o);var a={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()},s=Lp.colorChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:lf(e),defaultPropertyValues:a,hypercubePath:i});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:function(e,t,r){return Lp.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:r})}}}function df(e){return{properties:R({},{version:"1.11.8",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:Fc.STROKE.COLOR},cornerRadius:Fc.CORNER_RADIUS,innerRadius:Fc.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!1,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}}),data:{targets:[lf(e)]},importProperties:function(t){var r=t.exportFormat,n=t.initialProperties,i=t.hypercubePath,o=Lp.colorChart.importProperties({exportFormat:r,initialProperties:n,dataDefinition:lf(e),hypercubePath:i});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode;return Lp.colorChart.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n})}}}export default function(i){!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(P).forEach((function(t){e.add(P[t])}))}}(i.translator);var o=function(){var i=t();return i.use(r),i.use(n(e)),i.use(No()),i.component("pie-dividers",_o),i.component("negative-indicators",Bo),i}();return{qae:df(i),ext:ff(i),component:function(){var e=$l({picasso:o}),t=Jl({instance:e});Ap({instance:e,models:t,picasso:o,flags:i.flags}),function(e){var t=e.instance,r=S(),n=h(),i=j();q((function(){t&&t.generateSettings&&(t.chart.update({settings:t.generateSettings()}),n.effect&&n.effect.update(r,t.chart))}),[i.width,i.height])}({instance:e}),jp({instance:e,models:t})}}}