@sisense/sdk-ui 2.25.0 → 2.26.0
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/dist/ai.cjs +33 -33
- package/dist/ai.js +626 -639
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +1010 -865
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +6 -6
- package/dist/{apply-styled-options-to-query-BsBTwL6W.js → apply-styled-options-to-query-Bzt2GrgO.js} +1459 -1426
- package/dist/apply-styled-options-to-query-COD9fRYD.cjs +1 -0
- package/dist/dimensions-Ce2zWFrs.js +204 -0
- package/dist/dimensions-u3w5qNF0.cjs +1 -0
- package/dist/index.cjs +380 -380
- package/dist/index.js +17024 -16696
- package/dist/index.umd.js +649 -660
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +11 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +12 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +5 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts +16 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-composed-dashboard.d.ts +2 -3
- package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-dimensions.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-fields.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/drilldown/components/drilldown-widget/drilldown-widget.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-narrative-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-widget-narrative-state.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/core/date-formats/simple-date-format-replacers.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-pivot-query/use-execute-pivot-query.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query/use-execute-query.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/area-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/areamap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/bar-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/column-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/funnel-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/line-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pie-chart/pie-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/polar-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/scatter-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/scattermap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/sunburst-chart/sunburst-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/table.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/treemap-chart/treemap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +6 -6
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +6 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/plot-bands.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/axis-section.d.ts +29 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/tooltip-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/compose-code-to-readable.d.ts +24 -4
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-params-to-view-model.d.ts +6 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts +6 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +118 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/use-scroller-location-save.d.ts +8 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/widget-by-id.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/with-navigator-scroll-save.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/use-get-widget-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +170 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/widget-model-translator.d.ts +8 -14
- package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-endpoints.d.ts +3 -3
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +12 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +10 -2
- package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts +10 -3
- package/dist/packages/sdk-ui/src/infra/plugins/plugin-context.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/plugins/types.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +3 -4
- package/dist/packages/sdk-ui/src/modules/ai/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/utils/filter-relations.d.ts +2 -0
- package/dist/packages/sdk-ui/src/types.d.ts +7 -7
- package/dist/{types-GFLaiax5.cjs → types-COBvZZm_.cjs} +1 -1
- package/dist/{types-BBp2sp_s.js → types-D6jCGncV.js} +1 -1
- package/dist/{use-hover-mptQLQ4S.js → use-hover-B1HPf4hF.js} +6190 -6093
- package/dist/{use-hover-DsnmY-p_.cjs → use-hover-CaQrW_gv.cjs} +112 -112
- package/dist/{utils-DTUC-wtI.js → utils-BQtueE3Z.js} +9591 -9422
- package/dist/utils-CAubp1g1.cjs +179 -0
- package/dist/{widget-composer-D0BZrLna.js → widget-composer-BAJFWk3t.js} +3 -3
- package/dist/{widget-composer-CDb2iOoS.cjs → widget-composer-C75b-E6W.cjs} +1 -1
- package/package.json +8 -8
- package/dist/apply-styled-options-to-query-mFJvsssw.cjs +0 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/index.d.ts +0 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/table-widget.d.ts +0 -22
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/types.d.ts +0 -61
- package/dist/parse-compose-code-DfZskSng.js +0 -352
- package/dist/parse-compose-code-v4J9BrUg.cjs +0 -1
- package/dist/utils-BlNqPAG8.cjs +0 -190
|
@@ -19,9 +19,9 @@ var q = (e, t) => {
|
|
|
19
19
|
t.indexOf(i) < 0 && k.call(e, i) && (r[i] = e[i]);
|
|
20
20
|
return r;
|
|
21
21
|
};
|
|
22
|
-
import { J as ue, c as Z, i as pe } from "./types-
|
|
23
|
-
import { C as me, i as ge, a as fe, b as ye, n as _, m as w, g as B } from "./utils-
|
|
24
|
-
import { T as b, A as Se, n as he, k as G, l as Oe, m as l, o as be, q as T, D as Te, r as W, s as X, t as ve, u as Ee, v as xe } from "./apply-styled-options-to-query-
|
|
22
|
+
import { J as ue, c as Z, i as pe } from "./types-D6jCGncV.js";
|
|
23
|
+
import { C as me, i as ge, a as fe, b as ye, n as _, m as w, g as B } from "./utils-BQtueE3Z.js";
|
|
24
|
+
import { T as b, A as Se, n as he, k as G, l as Oe, m as l, o as be, q as T, D as Te, r as W, s as X, t as ve, u as Ee, v as xe } from "./apply-styled-options-to-query-Bzt2GrgO.js";
|
|
25
25
|
function Ce(e) {
|
|
26
26
|
return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
27
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var le=Object.defineProperty,de=Object.defineProperties;var ce=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var $=(e,t,r)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))q.call(t,r)&&$(e,r,t[r]);if(C)for(var r of C(t))k.call(t,r)&&$(e,r,t[r]);return e},m=(e,t)=>de(e,ce(t));var B=(e,t)=>{var r={};for(var i in e)q.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&C)for(var i of C(e))t.indexOf(i)<0&&k.call(e,i)&&(r[i]=e[i]);return r};const A=require("./types-
|
|
1
|
+
"use strict";var le=Object.defineProperty,de=Object.defineProperties;var ce=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var $=(e,t,r)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))q.call(t,r)&&$(e,r,t[r]);if(C)for(var r of C(t))k.call(t,r)&&$(e,r,t[r]);return e},m=(e,t)=>de(e,ce(t));var B=(e,t)=>{var r={};for(var i in e)q.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&C)for(var i of C(e))t.indexOf(i)<0&&k.call(e,i)&&(r[i]=e[i]);return r};const A=require("./types-COBvZZm_.cjs"),d=require("./utils-CAubp1g1.cjs"),s=require("./apply-styled-options-to-query-COD9fRYD.cjs");function ue(e){return e.replace(/\s+/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function me(e){const t=/\[(.+?)\s\(Calendar\)\]/;return e.replace(t,"[$1]").trim()}function ge(e){if(e)if(e.metadata){if(!e.model)throw new s.TranslatableError("errors.missingModelTitle")}else throw new s.TranslatableError("errors.missingMetadata");else throw new s.TranslatableError("errors.emptyModel");return e}function fe(e){return!e||!e.jaql.datasource.title||!e.jaql.metadata.length}function J(e){if(![...s.ALL_CHART_TYPES,"pivot","pivot2"].includes(e))throw new s.TranslatableError("errors.chartTypeNotSupported",{chartType:e})}function ye(e){return"widgetType"in e&&e.widgetType==="pivot"}function h(e){var t;return"column"in e&&((t=e.column)==null?void 0:t.expression)&&/\(.*\)/.test(e.column.expression)}function _(e){const t="measures"in e&&g(e.measures)||"values"in e&&g(e.values);return ye(e)?"values"in e.dataOptions&&g(e.dataOptions.values):"chartType"in e?e.chartType==="indicator"?"value"in e.dataOptions&&g(e.dataOptions.value)||"secondary"in e.dataOptions&&g(e.dataOptions.secondary):e.chartType==="table"?!("columns"in e.dataOptions)||!g(e.dataOptions.columns)?!1:e.dataOptions.columns.some(i=>h(i)):e.chartType==="boxplot"?!1:e.chartType==="scatter"?"x"in e.dataOptions&&e.dataOptions.x!==void 0&&h(e.dataOptions.x)||"y"in e.dataOptions&&e.dataOptions.y!==void 0&&h(e.dataOptions.y)||"size"in e.dataOptions&&e.dataOptions.size!==void 0:e.chartType==="scattermap"?"colorBy"in e.dataOptions&&e.dataOptions.colorBy!==void 0&&h(e.dataOptions.colorBy)||"details"in e.dataOptions&&e.dataOptions.details!==void 0&&h(e.dataOptions.details)||"size"in e.dataOptions&&e.dataOptions.size!==void 0&&h(e.dataOptions.size):e.chartType==="areamap"?"geo"in e.dataOptions&&g(e.dataOptions.geo)&&"color"in e.dataOptions&&g(e.dataOptions.color):"value"in e.dataOptions&&g(e.dataOptions.value):t}function g(e){return Array.isArray(e)&&e.length>0}function Se(e){const t=e.split(`
|
|
2
2
|
`);for(let r=0;r<t.length-1;r++)if(t[r].trim()===""){const i=t[r+1].trim();if(i.startsWith("import *")||i.startsWith("import {")){t.splice(r,1);break}}return t.join(`
|
|
3
3
|
`)}function Oe(e){const t=i=>/^[$A-Z_][0-9A-Z_$]*$/i.test(i);if("composeCode"in e)return e;const r={};for(const[i,a]of Object.entries(e)){const n=t(i)?i:`"${i}"`;r[n]=a}return r}const he={react:{baseChartTmpl:`import { {{componentString}} } from '@sisense/sdk-ui';
|
|
4
4
|
{{extraImportsString}}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Sisense",
|
|
12
12
|
"Compose SDK"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.26.0",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
"@mui/icons-material": "^6.4.11",
|
|
78
78
|
"@mui/material": "^6.4.11",
|
|
79
79
|
"@mui/system": "^6.4.11",
|
|
80
|
-
"@sisense/sdk-common": "2.
|
|
81
|
-
"@sisense/sdk-data": "2.
|
|
82
|
-
"@sisense/sdk-pivot-query-client": "2.
|
|
83
|
-
"@sisense/sdk-pivot-ui": "2.
|
|
84
|
-
"@sisense/sdk-query-client": "2.
|
|
85
|
-
"@sisense/sdk-rest-client": "2.
|
|
86
|
-
"@sisense/sdk-tracking": "2.
|
|
80
|
+
"@sisense/sdk-common": "2.26.0",
|
|
81
|
+
"@sisense/sdk-data": "2.26.0",
|
|
82
|
+
"@sisense/sdk-pivot-query-client": "2.26.0",
|
|
83
|
+
"@sisense/sdk-pivot-ui": "2.26.0",
|
|
84
|
+
"@sisense/sdk-query-client": "2.26.0",
|
|
85
|
+
"@sisense/sdk-rest-client": "2.26.0",
|
|
86
|
+
"@sisense/sdk-tracking": "2.26.0",
|
|
87
87
|
"@sisense/sisense-charts": "5.2.5",
|
|
88
88
|
"@tanstack/react-query": "4.43.0",
|
|
89
89
|
"classnames": "^2.3.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var zo=Object.defineProperty,ko=Object.defineProperties;var qo=Object.getOwnPropertyDescriptors;var ut=Object.getOwnPropertySymbols;var Hr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable;var Br=(e,t,n)=>t in e?zo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b=(e,t)=>{for(var n in t||(t={}))Hr.call(t,n)&&Br(e,n,t[n]);if(ut)for(var n of ut(t))zr.call(t,n)&&Br(e,n,t[n]);return e},U=(e,t)=>ko(e,qo(t));var en=(e,t)=>{var n={};for(var r in e)Hr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ut)for(var r of ut(e))t.indexOf(r)<0&&zr.call(e,r)&&(n[r]=e[r]);return n};var kr=(e,t,n)=>new Promise((r,i)=>{var s=u=>{try{a(n.next(u))}catch(l){i(l)}},o=u=>{try{a(n.throw(u))}catch(l){i(l)}},a=u=>u.done?r(u.value):Promise.resolve(u.value).then(s,o);a((n=n.apply(e,t)).next())});const cn=require("./index-BX9p-XrU.cjs"),Wo=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Go={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Qo=e=>Go[e],Vo=e=>e.replace(Wo,Qo);let fn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Vo};function Ko(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fn=b(b({},fn),e)}function Yo(){return fn}let Ui;function Jo(e){Ui=e}function Xo(){return Ui}const Zo={type:"3rdParty",init(e){Ko(e.options.react),Jo(e)}},ea={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class mt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||ea,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new mt(this.logger,b({prefix:`${this.prefix}:${t}:`},this.options))}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new mt(this.logger,t)}}var V=new mt;class wt{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&[].concat(this.observers[t]).forEach(o=>{o(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(o=>{o.apply(o,[t,...r])})}}function Me(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function qr(e){return e==null?"":""+e}function ta(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function En(e,t,n){function r(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function i(){return!e||typeof e=="string"}const s=typeof t!="string"?[].concat(t):t.split(".");for(;s.length>1;){if(i())return{};const o=r(s.shift());!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={}}return i()?{}:{obj:e,k:r(s.shift())}}function Wr(e,t,n){const{obj:r,k:i}=En(e,t,Object);r[i]=n}function na(e,t,n,r){const{obj:i,k:s}=En(e,t,Object);i[s]=i[s]||[],i[s].push(n)}function bt(e,t){const{obj:n,k:r}=En(e,t);if(n)return n[r]}function ra(e,t,n){const r=bt(e,n);return r!==void 0?r:bt(t,n)}function Bi(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):Bi(e[r],t[r],n):e[r]=t[r]);return e}function ye(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ia={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function sa(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>ia[t]):e}const oa=[" ",",","?","!",";"];function aa(e,t,n){t=t||"",n=n||"";const r=oa.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=new RegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s}function yt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let s=0;s<r.length;++s){if(!i||typeof i[r[s]]=="string"&&s+1<r.length)return;if(i[r[s]]===void 0){let o=2,a=r.slice(s,s+o).join(n),u=i[a];for(;u===void 0&&r.length>s+o;)o++,a=r.slice(s,s+o).join(n),u=i[a];if(u===void 0)return;if(u===null)return null;if(t.endsWith(a)){if(typeof u=="string")return u;if(a&&typeof u[a]=="string")return u[a]}const l=r.slice(s+o).join(n);return l?yt(u,l,n):void 0}i=i[r[s]]}return i}function Tt(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class Gr extends wt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[t,n];r&&typeof r!="string"&&(a=a.concat(r)),r&&typeof r=="string"&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."));const u=bt(this.data,a);return u||!o||typeof r!="string"?u:yt(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),Wr(this.data,a,i),s.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(typeof r[s]=="string"||Object.prototype.toString.apply(r[s])==="[object Array]")&&this.addResource(t,n,s,r[s],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let u=bt(this.data,a)||{};i?Bi(u,r,s):u=b(b({},u),r),Wr(this.data,a,u),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?b({},this.getResource(t,n)):this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Hi={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,i))}),t}};const Qr={};class St extends wt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ta(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=V.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!aa(t,r,i);if(o&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:s};const l=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(l[0])>-1)&&(s=l.shift()),t=l.join(i)}return typeof s=="string"&&(s=[s]),{key:t,namespaces:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n=b({},n)),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],n),u=a[a.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(f){const C=n.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${C}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u}:`${u}${C}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u}:o}const d=this.resolve(t,n);let c=d&&d.res;const p=d&&d.usedKey||o,h=d&&d.exactUsedKey||o,y=Object.prototype.toString.apply(c),m=["[object Number]","[object Function]","[object RegExp]"],E=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,N=!this.i18nFormat||this.i18nFormat.handleAsObject;if(N&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&m.indexOf(y)<0&&!(typeof E=="string"&&y==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,c,U(b({},n),{ns:a})):`key '${o} (${this.language})' returned an object instead of string.`;return i?(d.res=C,d):C}if(s){const C=y==="[object Array]",F=C?[]:{},G=C?h:p;for(const I in c)if(Object.prototype.hasOwnProperty.call(c,I)){const ot=`${G}${s}${I}`;F[I]=this.translate(ot,U(b({},n),{joinArrays:!1,ns:a})),F[I]===ot&&(F[I]=c[I])}c=F}}else if(N&&typeof E=="string"&&y==="[object Array]")c=c.join(E),c&&(c=this.extendTranslation(c,t,n,r));else{let C=!1,F=!1;const G=n.count!==void 0&&typeof n.count!="string",I=St.hasDefaultValue(n),ot=G?this.pluralResolver.getSuffix(l,n.count,n):"",Bo=n.ordinal&&G?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",Ne=n[`defaultValue${ot}`]||n[`defaultValue${Bo}`]||n.defaultValue;!this.isValidLookup(c)&&I&&(C=!0,c=Ne),this.isValidLookup(c)||(F=!0,c=o);const Ho=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:c,Re=I&&Ne!==c&&this.options.updateMissing;if(F||C||Re){if(this.logger.log(Re?"updateKey":"missingKey",l,u,o,Re?Ne:c),s){const $=this.resolve(o,U(b({},n),{keySeparator:!1}));$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Fe=[];const at=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&at&&at[0])for(let $=0;$<at.length;$++)Fe.push(at[$]);else this.options.saveMissingTo==="all"?Fe=this.languageUtils.toResolveHierarchy(n.lng||this.language):Fe.push(n.lng||this.language);const $r=($,be,jr)=>{const Ur=I&&jr!==c?jr:Ho;this.options.missingKeyHandler?this.options.missingKeyHandler($,u,be,Ur,Re,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing($,u,be,Ur,Re,n),this.emit("missingKey",$,u,be,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&G?Fe.forEach($=>{this.pluralResolver.getSuffixes($,n).forEach(be=>{$r([$],o+be,n[`defaultValue${be}`]||Ne)})}):$r(Fe,o,Ne))}c=this.extendTranslation(c,t,n,d,r),F&&c===o&&this.options.appendNamespaceToMissingKey&&(c=`${u}:${o}`),(F||C)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,C?c:void 0):c=this.options.parseMissingKeyHandler(c))}return i?(d.res=c,d):c}extendTranslation(t,n,r,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,b(b({},this.options.interpolation.defaultVariables),r),i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(U(b({},r),{interpolation:b(b({},this.options.interpolation),r.interpolation)}));const l=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(l){const c=t.match(this.interpolator.nestingRegexp);f=c&&c.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d=b(b({},this.options.interpolation.defaultVariables),d)),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),l){const c=t.match(this.interpolator.nestingRegexp),p=c&&c.length;f<p&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var c=arguments.length,p=new Array(c),h=0;h<c;h++)p[h]=arguments[h];return s&&s[0]===p[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):o.translate(...p,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,u=typeof a=="string"?[a]:a;return t!=null&&u&&u.length&&r.applyPostProcessor!==!1&&(t=Hi.handle(u,t,n,this.options&&this.options.postProcessPassResolved?b({i18nResolved:i},r):r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,o,a;return typeof t=="string"&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(u,n),f=l.key;i=f;let d=l.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const c=n.count!==void 0&&typeof n.count!="string",p=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(m=>{this.isValidLookup(r)||(a=m,!Qr[`${y[0]}-${m}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Qr[`${y[0]}-${m}`]=!0,this.logger.warn(`key "${i}" for languages "${y.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(E=>{if(this.isValidLookup(r))return;o=E;const N=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(N,f,E,m,n);else{let C;c&&(C=this.pluralResolver.getSuffix(E,n.count,n));const F=`${this.options.pluralSeparator}zero`,G=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(N.push(f+C),n.ordinal&&C.indexOf(G)===0&&N.push(f+C.replace(G,this.options.pluralSeparator)),p&&N.push(f+F)),h){const I=`${f}${this.options.contextSeparator}${n.context}`;N.push(I),c&&(N.push(I+C),n.ordinal&&C.indexOf(G)===0&&N.push(I+C.replace(G,this.options.pluralSeparator)),p&&N.push(I+F))}}let ae;for(;ae=N.pop();)this.isValidLookup(r)||(s=ae,r=this.getResource(E,m,ae,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function tn(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Vr{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=V.create("languageUtils")}getScriptPartFromCode(t){if(t=Tt(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Tt(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=tn(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=tn(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=tn(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&s.indexOf(i)===0)return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):typeof t=="string"&&s(this.formatLanguageCode(t)),r.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let ua=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],la={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const ca=["v1","v2","v3"],fa=["v4"],Kr={zero:0,one:1,two:2,few:3,many:4,other:5};function da(){const e={};return ua.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:la[t.fc]}})}),e}class ga{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=V.create("pluralResolver"),(!this.options.compatibilityJSON||fa.includes(this.options.compatibilityJSON))&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=da()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Tt(t),{type:n.ordinal?"ordinal":"cardinal"})}catch(r){return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,s)=>Kr[i]-Kr[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!ca.includes(this.options.compatibilityJSON)}}function Yr(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=ra(e,t,n);return!s&&i&&typeof n=="string"&&(s=yt(e,n,r),s===void 0&&(s=yt(t,n,r))),s}class ha{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=V.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:sa,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?ye(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?ye(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?ye(n.nestingPrefix):n.nestingPrefixEscaped||ye("$t("),this.nestingSuffix=n.nestingSuffix?ye(n.nestingSuffix):n.nestingSuffixEscaped||ye(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,i){let s,o,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(h){return h.replace(/\$/g,"$$$$")}const f=h=>{if(h.indexOf(this.formatSeparator)<0){const N=Yr(n,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,r,U(b(b({},i),n),{interpolationkey:h})):N}const y=h.split(this.formatSeparator),m=y.shift().trim(),E=y.join(this.formatSeparator).trim();return this.format(Yr(n,u,m,this.options.keySeparator,this.options.ignoreJSONStructure),E,r,U(b(b({},i),n),{interpolationkey:m}))};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,c=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>l(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?l(this.escape(h)):l(h)}].forEach(h=>{for(a=0;s=h.regex.exec(t);){const y=s[1].trim();if(o=f(y),o===void 0)if(typeof d=="function"){const E=d(t,s,i);o=typeof E=="string"?E:""}else if(i&&Object.prototype.hasOwnProperty.call(i,y))o="";else if(c){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=qr(o));const m=h.safeValue(o);if(t=t.replace(s[0],m),c?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=s[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;function a(u,l){const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const d=u.split(new RegExp(`${f}[ ]*{`));let c=`{${d[1]}`;u=d[0],c=this.interpolate(c,o);const p=c.match(/'/g),h=c.match(/"/g);(p&&p.length%2===0&&!h||h.length%2!==0)&&(c=c.replace(/'/g,'"'));try{o=JSON.parse(c),l&&(o=b(b({},l),o))}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,y),`${u}${f}${c}`}return delete o.defaultValue,u}for(;i=this.nestingRegexp.exec(t);){let u=[];o=b({},r),o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=f.shift(),u=f,l=!0}if(s=n(a.call(this,i[1].trim(),o),o),s&&i[0]===t&&typeof s!="string")return s;typeof s!="string"&&(s=qr(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),l&&(s=u.reduce((f,d)=>this.format(f,d,r.lng,U(b({},r),{interpolationkey:i[1].trim()})),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}function pa(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(!o)return;const[a,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,"");n[a.trim()]||(n[a.trim()]=l),l==="false"&&(n[a.trim()]=!1),l==="true"&&(n[a.trim()]=!0),isNaN(l)||(n[a.trim()]=parseInt(l,10))})}return{formatName:t,formatOptions:n}}function Te(e){const t={};return function(r,i,s){const o=i+JSON.stringify(s);let a=t[o];return a||(a=e(Tt(i),s),t[o]=a),a(r)}}class ma{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=V.create("formatter"),this.options=t,this.formats={number:Te((n,r)=>{const i=new Intl.NumberFormat(n,b({},r));return s=>i.format(s)}),currency:Te((n,r)=>{const i=new Intl.NumberFormat(n,U(b({},r),{style:"currency"}));return s=>i.format(s)}),datetime:Te((n,r)=>{const i=new Intl.DateTimeFormat(n,b({},r));return s=>i.format(s)}),relativetime:Te((n,r)=>{const i=new Intl.RelativeTimeFormat(n,b({},r));return s=>i.format(s,r.range||"day")}),list:Te((n,r)=>{const i=new Intl.ListFormat(n,b({},r));return s=>i.format(s)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Te(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,u)=>{const{formatName:l,formatOptions:f}=pa(u);if(this.formats[l]){let d=a;try{const c=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},p=c.locale||c.lng||i.locale||i.lng||r;d=this.formats[l](a,p,b(b(b({},f),i),c))}catch(c){this.logger.warn(c)}return d}else this.logger.warn(`there was no format function for ${l}`);return a},t)}}function ba(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class ya extends wt{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=V.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const s={},o={},a={},u={};return t.forEach(l=>{let f=!0;n.forEach(d=>{const c=`${l}|${d}`;!r.reload&&this.store.hasResourceBundle(l,d)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?o[c]===void 0&&(o[c]=!0):(this.state[c]=1,f=!1,o[c]===void 0&&(o[c]=!0),s[c]===void 0&&(s[c]=!0),u[d]===void 0&&(u[d]=!0)))}),f||(a[l]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const i=t.split("|"),s=i[0],o=i[1];n&&this.emit("failedLoading",s,o,n),r&&this.store.addResourceBundle(s,o,r),this.state[t]=n?-1:2;const a={};this.queue.forEach(u=>{na(u.loaded,[s],o),ba(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{a[l]||(a[l]={});const f=u.loaded[l];f.length&&f.forEach(d=>{a[l][d]===void 0&&(a[l][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:s,callback:o});return}this.readingCalls++;const a=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(l&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,s*2,o)},s);return}o(l,f)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const l=u(t,n);l&&typeof l.then=="function"?l.then(f=>a(null,f)).catch(a):a(null,l)}catch(l){a(l)}return}return u(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const s=this.queueLoad(t,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,a),this.loaded(t,o,a)})}saveMissing(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const u=U(b({},o),{isUpdate:s}),l=this.backend.create.bind(this.backend);if(l.length<6)try{let f;l.length===5?f=l(t,n,r,i,u):f=l(t,n,r,i),f&&typeof f.then=="function"?f.then(d=>a(null,d)).catch(a):a(null,f)}catch(f){a(f)}else l(t,n,r,i,a,u)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function Jr(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Xr(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function lt(){}function Ta(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class $e extends wt{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Xr(t),this.services={},this.logger=V,this.modules={external:[]},Ta(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=Jr();this.options=b(b(b({},i),this.options),Xr(n)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=b(b({},i.interpolation),this.options.interpolation)),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function s(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?V.init(s(this.modules.logger),this.options):V.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl!="undefined"&&(f=ma);const d=new Vr(this.options);this.store=new Gr(this.options.resources,this.options);const c=this.services;c.logger=V,c.resourceStore=this.store,c.languageUtils=d,c.pluralResolver=new ga(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=s(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new ha(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new ya(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(p){for(var h=arguments.length,y=new Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];t.emit(p,...y)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new St(this.services,this.options),this.translator.on("*",function(p){for(var h=arguments.length,y=new Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];t.emit(p,...y)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=lt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const u=Me(),l=()=>{const f=(d,c)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(c),r(d,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lt;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode")return r();const s=[],o=a=>{if(!a)return;this.services.languageUtils.toResolveHierarchy(a).forEach(l=>{s.indexOf(l)<0&&s.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=Me();return t||(t=this.languages),n||(n=this.options.ns),r||(r=lt),this.services.backendConnector.reload(t,n,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Hi.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Me();this.emit("languageChanging",t);const s=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,l)=>{l?(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},a=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const l=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||s(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,f=>{o(f,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const s=function(o,a){let u;if(typeof a!="object"){for(var l=arguments.length,f=new Array(l>2?l-2:0),d=2;d<l;d++)f[d-2]=arguments[d];u=i.options.overloadTranslationOptionHandler([o,a].concat(f))}else u=b({},a);u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix=u.keyPrefix||r||s.keyPrefix;const c=i.options.keySeparator||".";let p;return u.keyPrefix&&Array.isArray(o)?p=o.map(h=>`${u.keyPrefix}${c}${h}`):p=u.keyPrefix?`${u.keyPrefix}${c}${o}`:o,i.t(p,u)};return typeof t=="string"?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,u)=>{const l=this.services.backendConnector.state[`${a}|${u}`];return l===-1||l===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}loadNamespaces(t,n){const r=Me();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Me();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0);return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Vr(Jr());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new $e(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lt;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i=U(b(b({},this.options),t),{isClone:!0}),s=new $e(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services=b({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new Gr(this.store.data,i),s.services.resourceStore=s.store),s.translator=new St(s.services,i),s.translator.on("*",function(a){for(var u=arguments.length,l=new Array(u>1?u-1:0),f=1;f<u;f++)l[f-1]=arguments[f];s.emit(a,...l)}),s.init(i,n),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const zi=$e.createInstance();zi.createInstance=$e.createInstance;const Sa={error:"Error"},Aa={error:"Помилка"},Zr="common",va={en:Sa,uk:Aa},Q=zi.createInstance({defaultNS:Zr,resources:Ea(va,Zr),lng:"en",fallbackLng:"en"}),_n={i18nextInstance:Q,initPromise:Q.init().then(()=>Q)},ft=new Map;ft.set("common",_n);const Cn=e=>{if(ft.has(e.namespace))return ft.get(e.namespace);if(e.plugins)for(const s of e.plugins)Q.use(s);Object.keys(e.resource).forEach(s=>{Q.addResourceBundle(s,e.namespace,e.resource[s])});const t=Q.cloneInstance({defaultNS:e.namespace});let n=_n.initPromise.then(()=>t);t.on("languageChanged",s=>{Q.language!==s&&Q.changeLanguage(s)}),Q.on("languageChanged",s=>{t.language!==s&&t.changeLanguage(s)});const r=e.language||"en";Q.language!==r&&(n=n.then(()=>t.changeLanguage(r)).then(()=>t));const i={initPromise:n,i18nextInstance:t};return ft.set(e.namespace,i),i};function Ea(e,t){return Object.keys(e).reduce((n,r)=>(n[r]={[t]:e[r]},n),{})}class On extends Error{constructor(t,n,r){const{key:i,interpolationOptions:s}=n,o=r||_n.i18nextInstance.t,a=Object.assign(Object.assign({},s),{ns:t}),u=o(i,Object.assign(Object.assign({},a),{lng:"en"}));super(u),this.key=i,this.namespace=t,this.interpolationOptions=a}}function ki(e){return e&&e.replace(new RegExp("(?<!\\\\)'","g"),"\\'")}function qi(){return Cn({resource:cn.resources,plugins:[Zo],language:"en-US",namespace:cn.PACKAGE_NAMESPACE})}const{i18nextInstance:Wi}=qi(),_a={errors:{measure:{unsupportedType:"Unsupported measure type for measure: {{measureName}}",dimensionalCalculatedMeasure:{noContext:"DimensionalCalculatedMeasure {{measureName}} must have 'context' property"},dimensionalBaseMeasure:{noAttributeDimExpression:"DimensionalBaseMeasure {{measureName}} must have 'attribute'/'dim'/'expression' property",noAggAggregation:"DimensionalBaseMeasure {{measureName}} must have 'agg' or 'aggregation' property"}},dataModel:{noName:"'name' must be specified in config for DataModel",noMetadata:"'metadata' must be specified in config for DataModel"},filter:{unsupportedType:"Unsupported filter type: {{filterType}}",unsupportedDatetimeLevel:'Filters do not support the following "datetime" levels: Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',membersFilterNullMember:"MembersFilter of {{attributeId}} - member cannot be null",unsupportedConditionFilter:"Jaql for {{attributeName}} contains unsupported condition filter: {{filter}}",formulaFiltersNotSupported:"Formula-based filter for {{attributeName}} not supported yet: {{filter}}"},unsupportedDimensionalElement:"Unsupported dimensional element type"}},Ca={errors:{measure:{unsupportedType:"Непідтримуваний тип measure: {{measureName}}",dimensionalCalculatedMeasure:{noContext:"DimensionalCalculatedMeasure {{measureName}} має мати властивість 'context'"},dimensionalBaseMeasure:{noAttributeDimExpression:"DimensionalBaseMeasure {{measureName}} має мати властивість 'attribute'/'dim'/'expression'",noAggAggregation:"DimensionalBaseMeasure {{measureName}} має мати властивість 'agg' або 'aggregation'"}},dataModel:{noName:"'name' має бути вказано в конфігурації для DataModel",noMetadata:"'metadata' має бути вказано в конфігурації для DataModel"},filter:{unsupportedType:"Непідтримуваний тип фільтра: {{filterType}}",unsupportedDatetimeLevel:'Фільтри не підтримують наступні рівні "datetime": Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',membersFilterNullMember:"MembersFilter у {{attributeId}} - member не може бути нульовим",unsupportedConditionFilter:"Jaql для {{attributeName}} містить непідтримуваний condition фільтр: {{filter}}",formulaFiltersNotSupported:"Фільтри, що містять формули для {{attributeName}} наразі не підтримуються: {{filter}}"},unsupportedDimensionalElement:"Непідтримуваний тип елемента"}},Gi="sdkData",Oa={en:_a,uk:Ca};function xa(){return Cn({resource:Oa,language:"en",namespace:Gi})}const{i18nextInstance:wa}=xa();function Na(){this.__data__=[],this.size=0}function Ge(e,t){return e===t||e!==e&&t!==t}function Nt(e,t){for(var n=e.length;n--;)if(Ge(e[n][0],t))return n;return-1}var Ra=Array.prototype,Fa=Ra.splice;function Ma(e){var t=this.__data__,n=Nt(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Fa.call(t,n,1),--this.size,!0}function Da(e){var t=this.__data__,n=Nt(t,e);return n<0?void 0:t[n][1]}function La(e){return Nt(this.__data__,e)>-1}function Ia(e,t){var n=this.__data__,r=Nt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ee(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ee.prototype.clear=Na;ee.prototype.delete=Ma;ee.prototype.get=Da;ee.prototype.has=La;ee.prototype.set=Ia;function Pa(){this.__data__=new ee,this.size=0}function $a(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ja(e){return this.__data__.get(e)}function Ua(e){return this.__data__.has(e)}var Qi=typeof global=="object"&&global&&global.Object===Object&&global,Ba=typeof self=="object"&&self&&self.Object===Object&&self,W=Qi||Ba||Function("return this")(),B=W.Symbol,Vi=Object.prototype,Ha=Vi.hasOwnProperty,za=Vi.toString,De=B?B.toStringTag:void 0;function ka(e){var t=Ha.call(e,De),n=e[De];try{e[De]=void 0;var r=!0}catch(s){}var i=za.call(e);return r&&(t?e[De]=n:delete e[De]),i}var qa=Object.prototype,Wa=qa.toString;function Ga(e){return Wa.call(e)}var Qa="[object Null]",Va="[object Undefined]",ei=B?B.toStringTag:void 0;function ie(e){return e==null?e===void 0?Va:Qa:ei&&ei in Object(e)?ka(e):Ga(e)}function J(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ka="[object AsyncFunction]",Ya="[object Function]",Ja="[object GeneratorFunction]",Xa="[object Proxy]";function Rt(e){if(!J(e))return!1;var t=ie(e);return t==Ya||t==Ja||t==Ka||t==Xa}var nn=W["__core-js_shared__"],ti=function(){var e=/[^.]+$/.exec(nn&&nn.keys&&nn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Za(e){return!!ti&&ti in e}var eu=Function.prototype,tu=eu.toString;function ge(e){if(e!=null){try{return tu.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var nu=/[\\^$.*+?()[\]{}|]/g,ru=/^\[object .+?Constructor\]$/,iu=Function.prototype,su=Object.prototype,ou=iu.toString,au=su.hasOwnProperty,uu=RegExp("^"+ou.call(au).replace(nu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lu(e){if(!J(e)||Za(e))return!1;var t=Rt(e)?uu:ru;return t.test(ge(e))}function cu(e,t){return e==null?void 0:e[t]}function he(e,t){var n=cu(e,t);return lu(n)?n:void 0}var je=he(W,"Map"),Ue=he(Object,"create");function fu(){this.__data__=Ue?Ue(null):{},this.size=0}function du(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gu="__lodash_hash_undefined__",hu=Object.prototype,pu=hu.hasOwnProperty;function mu(e){var t=this.__data__;if(Ue){var n=t[e];return n===gu?void 0:n}return pu.call(t,e)?t[e]:void 0}var bu=Object.prototype,yu=bu.hasOwnProperty;function Tu(e){var t=this.__data__;return Ue?t[e]!==void 0:yu.call(t,e)}var Su="__lodash_hash_undefined__";function Au(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ue&&t===void 0?Su:t,this}function ce(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ce.prototype.clear=fu;ce.prototype.delete=du;ce.prototype.get=mu;ce.prototype.has=Tu;ce.prototype.set=Au;function vu(){this.size=0,this.__data__={hash:new ce,map:new(je||ee),string:new ce}}function Eu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ft(e,t){var n=e.__data__;return Eu(t)?n[typeof t=="string"?"string":"hash"]:n.map}function _u(e){var t=Ft(this,e).delete(e);return this.size-=t?1:0,t}function Cu(e){return Ft(this,e).get(e)}function Ou(e){return Ft(this,e).has(e)}function xu(e,t){var n=Ft(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function te(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}te.prototype.clear=vu;te.prototype.delete=_u;te.prototype.get=Cu;te.prototype.has=Ou;te.prototype.set=xu;var wu=200;function Nu(e,t){var n=this.__data__;if(n instanceof ee){var r=n.__data__;if(!je||r.length<wu-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new te(r)}return n.set(e,t),this.size=n.size,this}function z(e){var t=this.__data__=new ee(e);this.size=t.size}z.prototype.clear=Pa;z.prototype.delete=$a;z.prototype.get=ja;z.prototype.has=Ua;z.prototype.set=Nu;function Ki(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var At=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();function Qe(e,t,n){t=="__proto__"&&At?At(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Ru=Object.prototype,Fu=Ru.hasOwnProperty;function xn(e,t,n){var r=e[t];(!(Fu.call(e,t)&&Ge(r,n))||n===void 0&&!(t in e))&&Qe(e,t,n)}function Oe(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],u=void 0;u===void 0&&(u=e[a]),i?Qe(n,a,u):xn(n,a,u)}return n}function Mu(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function k(e){return e!=null&&typeof e=="object"}var Du="[object Arguments]";function ni(e){return k(e)&&ie(e)==Du}var Yi=Object.prototype,Lu=Yi.hasOwnProperty,Iu=Yi.propertyIsEnumerable,Be=ni(function(){return arguments}())?ni:function(e){return k(e)&&Lu.call(e,"callee")&&!Iu.call(e,"callee")},L=Array.isArray;function Pu(){return!1}var Ji=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ri=Ji&&typeof module=="object"&&module&&!module.nodeType&&module,$u=ri&&ri.exports===Ji,ii=$u?W.Buffer:void 0,ju=ii?ii.isBuffer:void 0,He=ju||Pu,Uu=9007199254740991,Bu=/^(?:0|[1-9]\d*)$/;function Mt(e,t){var n=typeof e;return t=t==null?Uu:t,!!t&&(n=="number"||n!="symbol"&&Bu.test(e))&&e>-1&&e%1==0&&e<t}var Hu=9007199254740991;function wn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Hu}var zu="[object Arguments]",ku="[object Array]",qu="[object Boolean]",Wu="[object Date]",Gu="[object Error]",Qu="[object Function]",Vu="[object Map]",Ku="[object Number]",Yu="[object Object]",Ju="[object RegExp]",Xu="[object Set]",Zu="[object String]",el="[object WeakMap]",tl="[object ArrayBuffer]",nl="[object DataView]",rl="[object Float32Array]",il="[object Float64Array]",sl="[object Int8Array]",ol="[object Int16Array]",al="[object Int32Array]",ul="[object Uint8Array]",ll="[object Uint8ClampedArray]",cl="[object Uint16Array]",fl="[object Uint32Array]",x={};x[rl]=x[il]=x[sl]=x[ol]=x[al]=x[ul]=x[ll]=x[cl]=x[fl]=!0;x[zu]=x[ku]=x[tl]=x[qu]=x[nl]=x[Wu]=x[Gu]=x[Qu]=x[Vu]=x[Ku]=x[Yu]=x[Ju]=x[Xu]=x[Zu]=x[el]=!1;function dl(e){return k(e)&&wn(e.length)&&!!x[ie(e)]}function Dt(e){return function(t){return e(t)}}var Xi=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ie=Xi&&typeof module=="object"&&module&&!module.nodeType&&module,gl=Ie&&Ie.exports===Xi,rn=gl&&Qi.process,fe=function(){try{var e=Ie&&Ie.require&&Ie.require("util").types;return e||rn&&rn.binding&&rn.binding("util")}catch(t){}}(),si=fe&&fe.isTypedArray,Nn=si?Dt(si):dl,hl=Object.prototype,pl=hl.hasOwnProperty;function Zi(e,t){var n=L(e),r=!n&&Be(e),i=!n&&!r&&He(e),s=!n&&!r&&!i&&Nn(e),o=n||r||i||s,a=o?Mu(e.length,String):[],u=a.length;for(var l in e)(t||pl.call(e,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Mt(l,u)))&&a.push(l);return a}var ml=Object.prototype;function Rn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ml;return e===n}function es(e,t){return function(n){return e(t(n))}}var bl=es(Object.keys,Object),yl=Object.prototype,Tl=yl.hasOwnProperty;function Sl(e){if(!Rn(e))return bl(e);var t=[];for(var n in Object(e))Tl.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ve(e){return e!=null&&wn(e.length)&&!Rt(e)}function Ke(e){return Ve(e)?Zi(e):Sl(e)}function Al(e,t){return e&&Oe(t,Ke(t),e)}function vl(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var El=Object.prototype,_l=El.hasOwnProperty;function Cl(e){if(!J(e))return vl(e);var t=Rn(e),n=[];for(var r in e)r=="constructor"&&(t||!_l.call(e,r))||n.push(r);return n}function Ye(e){return Ve(e)?Zi(e,!0):Cl(e)}function Ol(e,t){return e&&Oe(t,Ye(t),e)}var ts=typeof exports=="object"&&exports&&!exports.nodeType&&exports,oi=ts&&typeof module=="object"&&module&&!module.nodeType&&module,xl=oi&&oi.exports===ts,ai=xl?W.Buffer:void 0,ui=ai?ai.allocUnsafe:void 0;function ns(e,t){if(t)return e.slice();var n=e.length,r=ui?ui(n):new e.constructor(n);return e.copy(r),r}function Fn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function wl(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function rs(){return[]}var Nl=Object.prototype,Rl=Nl.propertyIsEnumerable,li=Object.getOwnPropertySymbols,Mn=li?function(e){return e==null?[]:(e=Object(e),wl(li(e),function(t){return Rl.call(e,t)}))}:rs;function Fl(e,t){return Oe(e,Mn(e),t)}function Dn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Ln=es(Object.getPrototypeOf,Object),Ml=Object.getOwnPropertySymbols,is=Ml?function(e){for(var t=[];e;)Dn(t,Mn(e)),e=Ln(e);return t}:rs;function Dl(e,t){return Oe(e,is(e),t)}function ss(e,t,n){var r=t(e);return L(e)?r:Dn(r,n(e))}function dn(e){return ss(e,Ke,Mn)}function In(e){return ss(e,Ye,is)}var gn=he(W,"DataView"),hn=he(W,"Promise"),vt=he(W,"Set"),Et=he(W,"WeakMap"),ci="[object Map]",Ll="[object Object]",fi="[object Promise]",di="[object Set]",gi="[object WeakMap]",hi="[object DataView]",Il=ge(gn),Pl=ge(je),$l=ge(hn),jl=ge(vt),Ul=ge(Et),H=ie;(gn&&H(new gn(new ArrayBuffer(1)))!=hi||je&&H(new je)!=ci||hn&&H(hn.resolve())!=fi||vt&&H(new vt)!=di||Et&&H(new Et)!=gi)&&(H=function(e){var t=ie(e),n=t==Ll?e.constructor:void 0,r=n?ge(n):"";if(r)switch(r){case Il:return hi;case Pl:return ci;case $l:return fi;case jl:return di;case Ul:return gi}return t});var Bl=Object.prototype,Hl=Bl.hasOwnProperty;function zl(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Hl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var _t=W.Uint8Array;function Pn(e){var t=new e.constructor(e.byteLength);return new _t(t).set(new _t(e)),t}function kl(e,t){var n=t?Pn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var ql=/\w*$/;function Wl(e){var t=new e.constructor(e.source,ql.exec(e));return t.lastIndex=e.lastIndex,t}var pi=B?B.prototype:void 0,mi=pi?pi.valueOf:void 0;function Gl(e){return mi?Object(mi.call(e)):{}}function os(e,t){var n=t?Pn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ql="[object Boolean]",Vl="[object Date]",Kl="[object Map]",Yl="[object Number]",Jl="[object RegExp]",Xl="[object Set]",Zl="[object String]",ec="[object Symbol]",tc="[object ArrayBuffer]",nc="[object DataView]",rc="[object Float32Array]",ic="[object Float64Array]",sc="[object Int8Array]",oc="[object Int16Array]",ac="[object Int32Array]",uc="[object Uint8Array]",lc="[object Uint8ClampedArray]",cc="[object Uint16Array]",fc="[object Uint32Array]";function dc(e,t,n){var r=e.constructor;switch(t){case tc:return Pn(e);case Ql:case Vl:return new r(+e);case nc:return kl(e,n);case rc:case ic:case sc:case oc:case ac:case uc:case lc:case cc:case fc:return os(e,n);case Kl:return new r;case Yl:case Zl:return new r(e);case Jl:return Wl(e);case Xl:return new r;case ec:return Gl(e)}}var bi=Object.create,as=function(){function e(){}return function(t){if(!J(t))return{};if(bi)return bi(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function us(e){return typeof e.constructor=="function"&&!Rn(e)?as(Ln(e)):{}}var gc="[object Map]";function hc(e){return k(e)&&H(e)==gc}var yi=fe&&fe.isMap,pc=yi?Dt(yi):hc,mc="[object Set]";function bc(e){return k(e)&&H(e)==mc}var Ti=fe&&fe.isSet,yc=Ti?Dt(Ti):bc,Tc=1,Sc=2,Ac=4,ls="[object Arguments]",vc="[object Array]",Ec="[object Boolean]",_c="[object Date]",Cc="[object Error]",cs="[object Function]",Oc="[object GeneratorFunction]",xc="[object Map]",wc="[object Number]",fs="[object Object]",Nc="[object RegExp]",Rc="[object Set]",Fc="[object String]",Mc="[object Symbol]",Dc="[object WeakMap]",Lc="[object ArrayBuffer]",Ic="[object DataView]",Pc="[object Float32Array]",$c="[object Float64Array]",jc="[object Int8Array]",Uc="[object Int16Array]",Bc="[object Int32Array]",Hc="[object Uint8Array]",zc="[object Uint8ClampedArray]",kc="[object Uint16Array]",qc="[object Uint32Array]",O={};O[ls]=O[vc]=O[Lc]=O[Ic]=O[Ec]=O[_c]=O[Pc]=O[$c]=O[jc]=O[Uc]=O[Bc]=O[xc]=O[wc]=O[fs]=O[Nc]=O[Rc]=O[Fc]=O[Mc]=O[Hc]=O[zc]=O[kc]=O[qc]=!0;O[Cc]=O[cs]=O[Dc]=!1;function Se(e,t,n,r,i,s){var o,a=t&Tc,u=t&Sc,l=t&Ac;if(n&&(o=i?n(e,r,i,s):n(e)),o!==void 0)return o;if(!J(e))return e;var f=L(e);if(f){if(o=zl(e),!a)return Fn(e,o)}else{var d=H(e),c=d==cs||d==Oc;if(He(e))return ns(e,a);if(d==fs||d==ls||c&&!i){if(o=u||c?{}:us(e),!a)return u?Dl(e,Ol(o,e)):Fl(e,Al(o,e))}else{if(!O[d])return i?e:{};o=dc(e,d,a)}}s||(s=new z);var p=s.get(e);if(p)return p;s.set(e,o),yc(e)?e.forEach(function(m){o.add(Se(m,t,n,m,e,s))}):pc(e)&&e.forEach(function(m,E){o.set(E,Se(m,t,n,E,e,s))});var h=l?u?In:dn:u?Ye:Ke,y=f?void 0:h(e);return Ki(y||e,function(m,E){y&&(E=m,m=e[E]),xn(o,E,Se(m,t,n,E,e,s))}),o}var Wc=1,Gc=4;function $n(e){return Se(e,Wc|Gc)}function Qc(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var u=o[++i];if(n(s[u],u,s)===!1)break}return t}}var ds=Qc();function gs(e,t){return e&&ds(e,t,Ke)}var Vc="__lodash_hash_undefined__";function Kc(e){return this.__data__.set(e,Vc),this}function Yc(e){return this.__data__.has(e)}function ze(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new te;++t<n;)this.add(e[t])}ze.prototype.add=ze.prototype.push=Kc;ze.prototype.has=Yc;function Jc(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function hs(e,t){return e.has(t)}var Xc=1,Zc=2;function ps(e,t,n,r,i,s){var o=n&Xc,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var d=-1,c=!0,p=n&Zc?new ze:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var h=e[d],y=t[d];if(r)var m=o?r(y,h,d,t,e,s):r(h,y,d,e,t,s);if(m!==void 0){if(m)continue;c=!1;break}if(p){if(!Jc(t,function(E,N){if(!hs(p,N)&&(h===E||i(h,E,n,r,s)))return p.push(N)})){c=!1;break}}else if(!(h===y||i(h,y,n,r,s))){c=!1;break}}return s.delete(e),s.delete(t),c}function ef(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function ms(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var tf=1,nf=2,rf="[object Boolean]",sf="[object Date]",of="[object Error]",af="[object Map]",uf="[object Number]",lf="[object RegExp]",cf="[object Set]",ff="[object String]",df="[object Symbol]",gf="[object ArrayBuffer]",hf="[object DataView]",Si=B?B.prototype:void 0,sn=Si?Si.valueOf:void 0;function pf(e,t,n,r,i,s,o){switch(n){case hf:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gf:return!(e.byteLength!=t.byteLength||!s(new _t(e),new _t(t)));case rf:case sf:case uf:return Ge(+e,+t);case of:return e.name==t.name&&e.message==t.message;case lf:case ff:return e==t+"";case af:var a=ef;case cf:var u=r&tf;if(a||(a=ms),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;r|=nf,o.set(e,t);var f=ps(a(e),a(t),r,i,s,o);return o.delete(e),f;case df:if(sn)return sn.call(e)==sn.call(t)}return!1}var mf=1,bf=Object.prototype,yf=bf.hasOwnProperty;function Tf(e,t,n,r,i,s){var o=n&mf,a=dn(e),u=a.length,l=dn(t),f=l.length;if(u!=f&&!o)return!1;for(var d=u;d--;){var c=a[d];if(!(o?c in t:yf.call(t,c)))return!1}var p=s.get(e),h=s.get(t);if(p&&h)return p==t&&h==e;var y=!0;s.set(e,t),s.set(t,e);for(var m=o;++d<u;){c=a[d];var E=e[c],N=t[c];if(r)var ae=o?r(N,E,c,t,e,s):r(E,N,c,e,t,s);if(!(ae===void 0?E===N||i(E,N,n,r,s):ae)){y=!1;break}m||(m=c=="constructor")}if(y&&!m){var C=e.constructor,F=t.constructor;C!=F&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof F=="function"&&F instanceof F)&&(y=!1)}return s.delete(e),s.delete(t),y}var Sf=1,Ai="[object Arguments]",vi="[object Array]",ct="[object Object]",Af=Object.prototype,Ei=Af.hasOwnProperty;function vf(e,t,n,r,i,s){var o=L(e),a=L(t),u=o?vi:H(e),l=a?vi:H(t);u=u==Ai?ct:u,l=l==Ai?ct:l;var f=u==ct,d=l==ct,c=u==l;if(c&&He(e)){if(!He(t))return!1;o=!0,f=!1}if(c&&!f)return s||(s=new z),o||Nn(e)?ps(e,t,n,r,i,s):pf(e,t,u,n,r,i,s);if(!(n&Sf)){var p=f&&Ei.call(e,"__wrapped__"),h=d&&Ei.call(t,"__wrapped__");if(p||h){var y=p?e.value():e,m=h?t.value():t;return s||(s=new z),i(y,m,n,r,s)}}return c?(s||(s=new z),Tf(e,t,n,r,i,s)):!1}function Je(e,t,n,r,i){return e===t?!0:e==null||t==null||!k(e)&&!k(t)?e!==e&&t!==t:vf(e,t,n,r,Je,i)}var Ef=1,_f=2;function Cf(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var a=o[0],u=e[a],l=o[1];if(o[2]){if(u===void 0&&!(a in e))return!1}else{var f=new z,d;if(!(d===void 0?Je(l,u,Ef|_f,r,f):d))return!1}}return!0}function bs(e){return e===e&&!J(e)}function Of(e){for(var t=Ke(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,bs(i)]}return t}function ys(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function xf(e){var t=Of(e);return t.length==1&&t[0][2]?ys(t[0][0],t[0][1]):function(n){return n===e||Cf(n,e,t)}}var wf="[object Symbol]";function Lt(e){return typeof e=="symbol"||k(e)&&ie(e)==wf}var Nf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rf=/^\w*$/;function jn(e,t){if(L(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Lt(e)?!0:Rf.test(e)||!Nf.test(e)||t!=null&&e in Object(t)}var Ff="Expected a function";function Un(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ff);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Un.Cache||te),n}Un.Cache=te;var Mf=500;function Df(e){var t=Un(e,function(r){return n.size===Mf&&n.clear(),r}),n=t.cache;return t}var Lf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,If=/\\(\\)?/g,Pf=Df(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Lf,function(n,r,i,s){t.push(i?s.replace(If,"$1"):r||n)}),t});function Bn(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var $f=1/0,_i=B?B.prototype:void 0,Ci=_i?_i.toString:void 0;function Hn(e){if(typeof e=="string")return e;if(L(e))return Bn(e,Hn)+"";if(Lt(e))return Ci?Ci.call(e):"";var t=e+"";return t=="0"&&1/e==-$f?"-0":t}function Ts(e){return e==null?"":Hn(e)}function Xe(e,t){return L(e)?e:jn(e,t)?[e]:Pf(Ts(e))}var jf=1/0;function xe(e){if(typeof e=="string"||Lt(e))return e;var t=e+"";return t=="0"&&1/e==-jf?"-0":t}function It(e,t){t=Xe(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[xe(t[n++])];return n&&n==r?e:void 0}function Ss(e,t,n){var r=e==null?void 0:It(e,t);return r===void 0?n:r}function Uf(e,t){return e!=null&&t in Object(e)}function Bf(e,t,n){t=Xe(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var o=xe(t[r]);if(!(s=e!=null&&n(e,o)))break;e=e[o]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&wn(i)&&Mt(o,i)&&(L(e)||Be(e)))}function As(e,t){return e!=null&&Bf(e,t,Uf)}var Hf=1,zf=2;function kf(e,t){return jn(e)&&bs(t)?ys(xe(e),t):function(n){var r=Ss(n,e);return r===void 0&&r===t?As(n,e):Je(t,r,Hf|zf)}}function Pt(e){return e}function qf(e){return function(t){return t==null?void 0:t[e]}}function Wf(e){return function(t){return It(t,e)}}function Gf(e){return jn(e)?qf(xe(e)):Wf(e)}function vs(e){return typeof e=="function"?e:e==null?Pt:typeof e=="object"?L(e)?kf(e[0],e[1]):xf(e):Gf(e)}function Qf(e,t){var n={};return t=vs(t),gs(e,function(r,i,s){Qe(n,i,t(r,i,s))}),n}function Vf(e){for(var t=e.length,n=5381,r=52711,i;t--;)i=e.charCodeAt(t),n=n*33^i,r=r*33^i;return(n>>>0)*4096+(r>>>0)}var ke="|",Kf=/\[object ([HTML|SVG](.*)Element)\]/,Yf={"[object Arguments]":0,"[object Array]":1,"[object ArrayBuffer]":2,"[object AsyncFunction]":3,"[object AsyncGeneratorFunction]":4,"[object BigInt]":5,"[object BigInt64Array]":6,"[object BigUint64Array]":7,"[object Boolean]":8,"[object DataView]":9,"[object Date]":10,"[object DocumentFragment]":11,"[object Error]":12,"[object Event]":13,"[object Float32Array]":14,"[object Float64Array]":15,"[object Function]":16,"[object Generator]":17,"[object GeneratorFunction]":18,"[object Int8Array]":19,"[object Int16Array]":20,"[object Map]":21,"[object Number]":22,"[object Object]":23,"[object Promise]":24,"[object RegExp]":25,"[object Set]":26,"[object SharedArrayBuffer]":27,"[object String]":28,"[object Uint8Array]":29,"[object Uint8ClampedArray]":30,"[object Uint16Array]":31,"[object Uint32Array]":32,"[object WeakMap]":33,"[object WeakRef]":34,"[object WeakSet]":35,CUSTOM:36,ELEMENT:37},Jf={"[object Arguments]":1,"[object Array]":2},Es={"[object Generator]":1,"[object Promise]":2,"[object WeakMap]":3,"[object WeakRef]":4,"[object WeakSet]":5},Xf={"[object AsyncFunction]":1,"[object AsyncGeneratorFunction]":2,"[object Boolean]":3,"[object Function]":4,"[object GeneratorFunction]":5,"[object Number]":6,"[object String]":7},Zf={"[object BigInt64Array]":1,"[object BigUint64Array]":2,"[object Float32Array]":3,"[object Float64Array]":4,"[object Int8Array]":5,"[object Int16Array]":6,"[object Uint8Array]":7,"[object Uint8ClampedArray]":8,"[object Uint16Array]":9,"[object Uint32Array]":10},ed={"[object Arguments]":1,"[object Array]":2,"[object ArrayBuffer]":3,"[object BigInt64Array]":4,"[object BigUint64Array]":5,"[object DataView]":6,"[object Float32Array]":7,"[object Float64Array]":8,"[object Int8Array]":9,"[object Int16Array]":10,"[object Map]":11,"[object Object]":12,"[object Set]":13,"[object SharedArrayBuffer]":14,"[object Uint8Array]":15,"[object Uint8ClampedArray]":16,"[object Uint16Array]":17,"[object Uint32Array]":18,CUSTOM:19},Le={bigint:"i",boolean:"b",empty:"e",function:"g",number:"n",object:"o",string:"s",symbol:"s"};function td(e,t){return e[0]>t[0]}function _s(e,t){return e>t}function zn(e,t){for(var n,r,i=0;i<e.length;++i){for(r=e[i],n=i-1;~n&&t(e[n],r);--n)e[n+1]=e[n];e[n+1]=r}return e}function D(e,t){return Le.object+ke+Yf[e]+ke+t}var Oi=new WeakMap,nd=0;function pn(e,t){var n=Oi.get(e);if(n)return n;var r=D(t,"NOT_ENUMERABLE"+ke+nd++);return Oi.set(e,r),r}var rd=Object.prototype.toString;function id(e,t,n){if(ed[t])return xi(t,e,n);if(t==="[object Date]")return D(t,e.getTime());if(t==="[object RegExp]")return D(t,e.toString());if(t==="[object Event]")return D(t,[e.bubbles,e.cancelBubble,e.cancelable,e.composed,e.currentTarget,e.defaultPrevented,e.eventPhase,e.isTrusted,e.returnValue,e.target,e.type].join());if(t==="[object Error]")return D(t,e.message+ke+e.stack);if(t==="[object DocumentFragment]")return D(t,ld(e));var r=t.match(Kf);return r?D("ELEMENT",r[1]+ke+e.outerHTML):Es[t]?pn(e,t):Xf[t]?D(t,e.toString()):xi("CUSTOM",e,n)}function xi(e,t,n){var r=n.cache.get(t);return r?D(e,"RECURSIVE~"+r):(n.cache.set(t,++n.id),e==="[object Object]"?t[Symbol.iterator]?pn(t,e):D(e,Ni(t,n)):Jf[e]?D(e,sd(t,n)):e==="[object Map]"?D(e,cd(t,n)):e==="[object Set]"?D(e,fd(t,n)):Zf[e]?D(e,t.join()):e==="[object ArrayBuffer]"?D(e,wi(t)):e==="[object DataView]"?D(e,wi(t.buffer)):Es[e]?pn(t,e):D("CUSTOM",Ni(t,n)))}function sd(e,t){for(var n=e.length,r=new Array(n);--n>=0;)r[n]=ve(e[n],t);return r.join()}function od(e){return Buffer.from(e).toString("utf8")}function ad(e){return String.fromCharCode.apply(null,new Uint16Array(e))}function ud(){return"UNSUPPORTED"}function ld(e){for(var t=e.children,n=t.length,r=new Array(n);--n>=0;)r[n]=t[n].outerHTML;return r.join()}var wi=typeof Buffer!="undefined"&&typeof Buffer.from=="function"?od:typeof Uint16Array=="function"?ad:ud;function cd(e,t){var n=new Array(e.size),r=0;for(e.forEach(function(i,s){n[r++]=[ve(s,t),ve(i,t)]}),zn(n,td);--r>=0;)n[r]="["+n[r][0]+","+n[r][1]+"]";return"["+n.join()+"]"}function Ni(e,t){for(var n=zn(Object.getOwnPropertyNames(e),_s),r=n.length,i=new Array(r),s=r;--s>=0;)i[s]=n[s]+":"+ve(e[n[s]],t);return"{"+i.join()+"}"}function fd(e,t){var n=new Array(e.size),r=0;return e.forEach(function(i){n[r++]=ve(i,t)}),"["+zn(n,_s).join()+"]"}function ve(e,t){var n=typeof e;return e==null||n==="undefined"?Le.empty+e:n==="object"?id(e,rd.call(e),t||{cache:new WeakMap,id:1}):n==="function"||n==="symbol"?Le[n]+e.toString():n==="boolean"?Le.boolean+ +e:Le[n]+e}function Cs(e){return Vf(ve(e,void 0))}function mn(e,t,n){(n!==void 0&&!Ge(e[t],n)||n===void 0&&!(t in e))&&Qe(e,t,n)}function Os(e){return k(e)&&Ve(e)}var dd="[object Object]",gd=Function.prototype,hd=Object.prototype,xs=gd.toString,pd=hd.hasOwnProperty,md=xs.call(Object);function kn(e){if(!k(e)||ie(e)!=dd)return!1;var t=Ln(e);if(t===null)return!0;var n=pd.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&xs.call(n)==md}function bn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function bd(e){return Oe(e,Ye(e))}function yd(e,t,n,r,i,s,o){var a=bn(e,n),u=bn(t,n),l=o.get(u);if(l){mn(e,n,l);return}var f=s?s(a,u,n+"",e,t,o):void 0,d=f===void 0;if(d){var c=L(u),p=!c&&He(u),h=!c&&!p&&Nn(u);f=u,c||p||h?L(a)?f=a:Os(a)?f=Fn(a):p?(d=!1,f=ns(u,!0)):h?(d=!1,f=os(u,!0)):f=[]:kn(u)||Be(u)?(f=a,Be(a)?f=bd(a):(!J(a)||Rt(a))&&(f=us(u))):d=!1}d&&(o.set(u,f),i(f,u,r,s,o),o.delete(u)),mn(e,n,f)}function ws(e,t,n,r,i){e!==t&&ds(t,function(s,o){if(i||(i=new z),J(s))yd(e,t,o,n,ws,r,i);else{var a=r?r(bn(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),mn(e,o,a)}},Ye)}function Ns(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Ri=Math.max;function Rs(e,t,n){return t=Ri(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Ri(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),Ns(e,this,a)}}function Fs(e){return function(){return e}}var Td=At?function(e,t){return At(e,"toString",{configurable:!0,enumerable:!1,value:Fs(t),writable:!0})}:Pt,Sd=800,Ad=16,vd=Date.now;function Ms(e){var t=0,n=0;return function(){var r=vd(),i=Ad-(r-n);if(n=r,i>0){if(++t>=Sd)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var qn=Ms(Td);function Ds(e,t){return qn(Rs(e,t,Pt),e+"")}function Ls(e,t,n){if(!J(n))return!1;var r=typeof t;return(r=="number"?Ve(n)&&Mt(t,n.length):r=="string"&&t in n)?Ge(n[t],e):!1}function Ed(e){return Ds(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&Ls(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var Wn=Ed(function(e,t,n){ws(e,t,n)});function Is(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Ps(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function _d(e,t){return t.length<2?e:It(e,Ps(t,0,-1))}function Cd(e,t){return t=Xe(t,e),e=_d(e,t),e==null||delete e[xe(Is(t))]}function Od(e){return kn(e)?void 0:e}var Fi=B?B.isConcatSpreadable:void 0;function xd(e){return L(e)||Be(e)||!!(Fi&&e&&e[Fi])}function $s(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=xd),i||(i=[]);++s<o;){var a=e[s];n(a)?Dn(i,a):r||(i[i.length]=a)}return i}function wd(e){var t=e==null?0:e.length;return t?$s(e):[]}function js(e){return qn(Rs(e,void 0,wd),e+"")}var Nd=1,Rd=2,Fd=4,Us=js(function(e,t){var n={};if(e==null)return n;var r=!1;t=Bn(t,function(s){return s=Xe(s,e),r||(r=s.length>1),s}),Oe(e,In(e),n),r&&(n=Se(n,Nd|Rd|Fd,Od));for(var i=t.length;i--;)Cd(n,t[i]);return n});let Ze=class extends On{constructor(t,n){super(Gi,{key:t,interpolationOptions:n},wa.t)}};class $t{constructor(t,n,r,i,s){this.__serializable="DimensionalElement",this._name=t,this._title=t,this.type=n,this.description=r||"",i&&(this._dataSource=i),s&&(this.composeCode=s)}get name(){return this._name}set name(t){this._name=t}get title(){return this._title}set title(t){this._title=t}get dataSource(){return this._dataSource}serialize(){return{name:this.name,type:this.type,description:this.description,dataSource:this.dataSource,composeCode:this.composeCode,__serializable:this.__serializable}}toJSON(){return this.serialize()}toString(){return this.jaql()}}function ue(e){let t=e.replace(/[^a-zA-Z0-9_.]/g,"").replace(/\./g,"_");return t.charAt(0).match(/[0-9]/)&&(t="_"+t),t}function Md(e){return/[^a-zA-Z0-9_]/.test(e)||/^[0-9]/.test(e)}function qe(e){return Md(e)?`[[${e}]]`:e}const Gn="DM",A={Sum:"sum",Average:"avg",Min:"min",Max:"max",Count:"count",CountDistinct:"countDistinct",Median:"median",Variance:"var",StandardDeviation:"stdev"};exports.Sort=void 0;(function(e){e[e.None=0]="None",e[e.Ascending=1]="Ascending",e[e.Descending=2]="Descending"})(exports.Sort=exports.Sort||(exports.Sort={}));const v={Measure:"measure",MeasureTemplate:"measuretemplate",BaseMeasure:"basemeasure",CalculatedMeasure:"calculatedmeasure",Dimension:"dimension",DateDimension:"datedimension",TextDimension:"textdimension",NumericDimension:"numericdimension",DateLevel:"datelevel",Attribute:"attribute",TextAttribute:"text-attribute",NumericAttribute:"numeric-attribute",Filter:"filter",DimensionFilter:"dimensionfilter",MeasureFilter:"measurefilter",isMetadata(e){return v.isMeasure(e)||v.isDimension(e)||v.isAttribute(e)||v.isFilter(e)},isMeasureTemplate(e){return e?typeof e=="string"?e.toLowerCase()===v.MeasureTemplate:e.agg==="*"||e.aggregation==="*"||e.type&&e.type.toLowerCase()===v.MeasureTemplate:!1},isBaseMeasure(e){return e?typeof e=="string"?e.toLowerCase()===v.BaseMeasure:(e.agg||e.aggregation)&&(e.attribute||e.jaql||e.dim||e.expression)&&!this.isMeasureTemplate(e):!1},isMeasure(e){if(!e)return!1;if(typeof e=="string"){const t=e;return t.toLowerCase()===v.Measure||t.toLowerCase()===v.BaseMeasure||t.toLowerCase()===v.MeasureTemplate||t.toLowerCase()===v.CalculatedMeasure}return this.isBaseMeasure(e)||this.isCalculatedMeasure(e)||this.isMeasureTemplate(e)},isCalculatedMeasure(e){return e?typeof e=="string"?e.toLowerCase()===v.CalculatedMeasure:(e.expression||e.formula)&&e.context:!1},isDateDimension(e){return e?typeof e=="string"?e.toLowerCase()===v.DateDimension:(e.dim||e.expression)&&e.level:!1},isTextDimension(e){return e&&typeof e=="string"?e.toLowerCase()===v.TextDimension:!1},isNumericDimension(e){return e&&typeof e=="string"?e.toLowerCase()===v.NumericDimension:!1},isDimension(e){if(e&&typeof e=="object"&&(e=e.type),typeof e=="string"){const t=e;return t.toLowerCase()===v.DateDimension||t.toLowerCase()===v.Dimension||t.toLowerCase()===v.TextDimension||t.toLowerCase()===v.NumericDimension}return!1},isAttribute(e){if(typeof e=="string"){const t=e;return t.toLowerCase()===v.Attribute||t.toLowerCase()===v.TextAttribute||t.toLowerCase()===v.NumericAttribute||t.toLowerCase()===v.DateLevel}return e&&e.type?this.isAttribute(e.type):!1},isFilter(e){if(e&&typeof e=="object"&&(e=e.type),typeof e=="string"){const t=e;return t.toLowerCase()===v.Filter||t.toLowerCase()===v.DimensionFilter||t.toLowerCase()===v.MeasureFilter}return!1}},g={Years:"Years",Quarters:"Quarters",Months:"Months",Weeks:"Weeks",Days:"Days",Hours:"Hours",MinutesRoundTo30:"MinutesRoundTo30",MinutesRoundTo15:"MinutesRoundTo15",Minutes:"Minutes",Seconds:"Seconds",AggHours:"AggHours",AggMinutesRoundTo30:"AggMinutesRoundTo30",AggMinutesRoundTo15:"AggMinutesRoundTo15",AggMinutesRoundTo1:"AggMinutesRoundTo1",get all(){return[g.Years,g.Quarters,g.Months,g.Weeks,g.Days,g.Hours,g.MinutesRoundTo30,g.MinutesRoundTo15,g.Minutes,g.Seconds,g.AggHours,g.AggMinutesRoundTo30,g.AggMinutesRoundTo15,g.AggMinutesRoundTo1]},get dateOnly(){return[g.Years,g.Quarters,g.Months,g.Weeks,g.Days]},get timeOnly(){return[g.Hours,g.MinutesRoundTo30,g.MinutesRoundTo15,g.Minutes,g.Seconds,g.AggHours,g.AggMinutesRoundTo30,g.AggMinutesRoundTo15,g.AggMinutesRoundTo1]}};var on;(function(e){e.TEXT="text",e.NUMERIC="numeric",e.DATETIME="datetime"})(on=on||(on={}));var Pe;(function(e){e.ASC="asc",e.DESC="desc"})(Pe=Pe||(Pe={}));var an;(function(e){e.PRE="pre",e.POST="post"})(an=an||(an={}));function yn(e,t=[]){try{return e==null?String(e):typeof e=="string"?`'${ki(e)}'`:typeof e=="number"||typeof e=="boolean"?String(e):e instanceof Date?`new Date('${e.toISOString()}')`:Array.isArray(e)?`[${e.map(n=>yn(n,t)).join(", ")}]`:typeof e=="object"&&e!==null?"composeCode"in e?e.composeCode:`{ ${Object.entries(e).filter(([r])=>!t.includes(r)).map(([r,i])=>`${/[^a-zA-Z0-9_$]/.test(r)?`'${r}'`:r}: ${yn(i,t)}`).join(", ")} }`:JSON.stringify(e)}catch(n){return console.error(n,JSON.stringify(e,null,2)),JSON.stringify(e)}}function Dd(e){let t=e.length;for(;t>0&&e[t-1]===void 0;)t--;return e.slice(0,t)}function jt(e,t){return function(n){return function(...r){const i=Dd(r),s=i.length,o=i.map(l=>yn(l,["guid"])).filter((l,f)=>!(["","{ }","{}","undefined","null"].includes(l)&&f===s-1)).join(", "),a=`${e}.${t!=null?t:n.name}(${o})`,u=n(...r);return u.composeCode=a,u}}}function T(e,t){return jt("filterFactory",t)(e)}function Mi(e,t){return jt("filterFactory.logic",t)(e)}function Ld(e,t){return jt("analyticsFactory",t)(e)}function S(e,t){return jt("measureFactory",t)(e)}const Bs={StandardCompetition:"1224",ModifiedCompetition:"1334",Dense:"1223",Ordinal:"1234"},Hs={Ascending:"ASC",Descending:"DESC"};function de(e,t,n){if(typeof n=="number")e.push(n.toString());else if(n&&v.isMeasureTemplate(n.type)){n=n.sum();const r=`[${ue(n.name)}]`;e.push(r),t[r]=n}else if(n&&v.isMeasure(n.type)){const r=`[${ue(n.name)}]`;e.push(r),t[r]=n}else if(n&&v.isFilter(n.type)){const r=`[${ue(n.name)}]`;e.push(r),t[r]=n}else if(n&&v.isAttribute(n.type)){const r=`[${ue(n.name)}]`;e.push(r),t[r]=n}}function w(e,t,n,r){const i={},s=[n+"("];return de(s,i,e),r&&s.push(`, ${r}`),s.push(")"),new Y(t,s.join(""),i)}const Qn=S((e,t,n,r,i)=>{const s=Object.fromEntries(Object.entries(n!=null?n:{}).map(([o,a])=>[o.startsWith("[")?o:`[${o}]`,a]));return new Y(e,t,s,r,i)},"customFormula");function Ut(e,t,n,r,i){const s=[],o={};i===!0&&s.push("("),de(s,o,e),s.push(t),de(s,o,n),i===!0&&s.push(")");const a=s.join("");return new Y(r!=null?r:a,a,o)}const q=S((e,t,n,r)=>new le(n!=null?n:`${t.toString()} ${e.name}`,e,t,r),"aggregate"),Id=S(e=>new Y(`${e}`,`${e}`,{}),"constant"),Ct=S((e,t,n)=>q(e,A.Sum,t,n),"sum"),zs=S((e,t,n)=>q(e,A.Average,t,n),"average"),ks=S((e,t,n)=>q(e,A.Average,t,n),"avg"),Bt=S((e,t,n)=>q(e,A.Min,t,n),"min"),Ht=S((e,t,n)=>q(e,A.Max,t,n),"max"),Vn=S((e,t,n)=>q(e,A.Median,t,n),"median"),Kn=S((e,t,n)=>q(e,A.Count,t,n),"count"),zt=S((e,t,n)=>q(e,A.CountDistinct,t,n),"countDistinct"),Pd=S((e,t,n,r)=>{const i=[],s={};i.push("("),de(i,s,e),t.forEach(a=>{i.push(","),de(i,s,a)}),i.push(")");const o=i.join("");return new Y(n!=null?n:o,o,s,r)},"measuredValue"),$d=S((e,t,n,r)=>Ut(e,"+",t,n,r),"add"),jd=S((e,t,n,r)=>Ut(e,"-",t,n,r),"subtract"),Ud=S((e,t,n,r)=>Ut(e,"*",t,n,r),"multiply"),Bd=S((e,t,n,r)=>Ut(e,"/",t,n,r),"divide"),Hd=S((e,t)=>w(e,t!=null?t:"YTD "+e.name,"YTDSum"),"yearToDateSum"),zd=S((e,t)=>w(e,t!=null?t:"QTD "+t,"QTDSum"),"quarterToDateSum"),kd=S((e,t)=>w(e,t!=null?t:"MTD "+e.name,"MTDSum"),"monthToDateSum"),qd=S((e,t)=>w(e,t!=null?t:"MTD "+e.name,"WTDSum"),"weekToDateSum"),Wd=S((e,t,n)=>w(e,n!=null?n:"Running Sum "+e.name,"RSum"),"runningSum"),Gd=S((e,t)=>w(e,t!=null?t:e.name+" Growth","growth"),"growth"),Qd=S((e,t)=>w(e,t!=null?t:e.name+" Growth","growthrate"),"growthRate"),Vd=S((e,t)=>w(e,t!=null?t:e.name+" Growth","growthpastweek"),"growthPastWeek"),Kd=S((e,t)=>w(e,t!=null?t:e.name+" Growth","growthpastmonth"),"growthPastMonth"),Yd=S((e,t)=>w(e,t!=null?t:e.name+" Growth","growthpastquarter"),"growthPastQuarter"),Jd=S((e,t)=>w(e,t!=null?t:e.name+" Growth","growthpastyear"),"growthPastYear"),Xd=S((e,t)=>w(e,t!=null?t:e.name+" Difference","diffpastperiod"),"difference"),Zd=S((e,t)=>w(e,t!=null?t:e.name+" Difference","diffpastweek"),"diffPastWeek"),eg=S((e,t)=>w(e,t!=null?t:e.name+" Difference","diffpastmonth"),"diffPastMonth"),tg=S((e,t)=>w(e,t!=null?t:e.name+" Difference","diffpastquarter"),"diffPastQuarter"),ng=S((e,t)=>w(e,t!=null?t:e.name+" Difference","diffpastyear"),"diffPastYear"),rg=S((e,t)=>w(e,t!=null?t:e.name+" Past Day","pastday"),"pastDay"),ig=S((e,t)=>w(e,t!=null?t:e.name+" Past Week","pastweek"),"pastWeek"),sg=S((e,t)=>w(e,t!=null?t:e.name+" Past Month","pastmonth"),"pastMonth"),og=S((e,t)=>w(e,t!=null?t:e.name+" Past Quarter","pastquarter"),"pastQuarter"),ag=S((e,t)=>w(e,t!=null?t:e.name+" Past Year","pastyear"),"pastYear"),ug=S((e,t)=>w(e,t!=null?t:e.name+" Contribution","contribution"),"contribution"),Yn=S((e,t,n)=>{let r;const i=s=>s.replace("advancedSmoothing","smooth").replace("localEstimates","local");return n&&(r=Object.entries(n).map(s=>i(`"${s[0]}=${s[1]}"`)).join(",")),w(e,t!=null?t:e.name+" Trend","trend",r)},"trend"),Jn=S((e,t,n)=>{let r;if(n){const i=Object.assign({forecastHorizon:3},n);if(i.startDate){const s=new Date(i.startDate);i.startDate=s.toISOString().replace(/.\d+Z$/g,"")}if(i.endDate){const s=new Date(i.endDate);i.endDate=s.toISOString().replace(/.\d+Z$/g,"")}r=Object.entries(i).map(s=>`"${s[0]}=${s[1]}"`).join(",")}else r='"forecastHorizon=3"';return w(e,t!=null?t:e.name+" Forecast","forecast",r)},"forecast"),lg=S((e,t,n=Hs.Descending,r=Bs.StandardCompetition,i=[])=>{const s=[],o={};s.push("rank("),de(s,o,e),s.push(`,${n},${r}`),i.forEach(u=>{s.push(","),de(s,o,u)}),s.push(")");const a=s.join("");return t||(t=`${e.name} rank`),new Y(t,a,o)},"rank"),cg=Object.freeze(Object.defineProperty({__proto__:null,RankingSortTypes:Hs,RankingTypes:Bs,add:$d,aggregate:q,average:zs,avg:ks,constant:Id,contribution:ug,count:Kn,countDistinct:zt,customFormula:Qn,diffPastMonth:eg,diffPastQuarter:tg,diffPastWeek:Zd,diffPastYear:ng,difference:Xd,divide:Bd,forecast:Jn,growth:Gd,growthPastMonth:Kd,growthPastQuarter:Yd,growthPastWeek:Vd,growthPastYear:Jd,growthRate:Qd,max:Ht,measuredValue:Pd,median:Vn,min:Bt,monthToDateSum:kd,multiply:Ud,pastDay:rg,pastMonth:sg,pastQuarter:og,pastWeek:ig,pastYear:ag,quarterToDateSum:zd,rank:lg,runningSum:Wd,subtract:jd,sum:Ct,trend:Yn,weekToDateSum:qd,yearToDateSum:Hd},Symbol.toStringTag,{value:"Module"}));class Xn extends $t{constructor(t,n,r,i,s,o,a){super(t,n,i,o,a),this.__serializable="AbstractMeasure",this._sort=exports.Sort.None,this._format="#,#.00",this._format=r,this._sort=s||exports.Sort.None}getSort(){return this._sort}getFormat(){return this._format}serialize(){const t=super.serialize();return this.getFormat()!==void 0&&(t.format=this.getFormat()),this.getSort()!==void 0&&(t.sort=this.getSort()),t}}class le extends Xn{constructor(t,n,r,i,s,o,a,u){super(t,v.BaseMeasure,i,s,o,a,u),this.__serializable="DimensionalBaseMeasure",this.attribute=n,this.aggregation=r}static aggregationFromJAQL(t){switch(t){case"sum":return A.Sum;case"avg":return A.Average;case"min":return A.Min;case"max":return A.Max;case"countduplicates":return A.Count;case"median":return A.Median;case"count":return A.CountDistinct;case"var":return A.Variance;case"stdev":return A.StandardDeviation}return A.Sum}static aggregationToJAQL(t){switch(t){case A.Sum:return"sum";case A.Average:return"avg";case A.Min:return"min";case A.Max:return"max";case A.Count:return"countduplicates";case A.CountDistinct:return"count";case A.Median:return"median";case A.Variance:return"var";case A.StandardDeviation:return"stdev"}return A.Sum}sort(t){return new le(this.name,this.attribute,this.aggregation,this._format,this.description,t,this.dataSource,this.composeCode)}format(t){return new le(this.name,this.attribute,this.aggregation,t,this.description,this._sort,this.dataSource,this.composeCode)}get id(){return`${this.attribute.expression}_${this.aggregation}`}serialize(){const t=super.serialize();return t.aggregation=this.aggregation,t.attribute=this.attribute.serialize(),t}jaql(t){const n=this.attribute.jaql(!0),r={jaql:Object.assign(Object.assign({},n),{title:this.name,agg:le.aggregationToJAQL(this.aggregation)})};return this._format&&(r.format={number:this._format}),this._sort!=exports.Sort.None&&(r.jaql.sort=this._sort==exports.Sort.Ascending?"asc":"desc"),t===!0?r.jaql:r}}const Zn=e=>!!(e&&e.__serializable==="DimensionalBaseMeasure");class Y extends Xn{constructor(t,n,r,i,s,o,a,u){super(t,v.CalculatedMeasure,i,s,o,a,u),this.__serializable="DimensionalCalculatedMeasure",this.expression=n,this.context=r}sort(t){return new Y(this.name,this.expression,this.context,this._format,this.description,t,this.dataSource,this.composeCode)}format(t){return new Y(this.name,this.expression,this.context,t,this.description,this._sort,this.dataSource,this.composeCode)}get id(){return this.expression}serialize(){const t=super.serialize();return t.expression=this.expression,t.context=Object.fromEntries(Object.entries(this.context).map(([n,r])=>[n,r.serialize?r.serialize():r])),t}jaql(t){const n={jaql:{title:this.name,formula:this.expression}},r={};return Object.getOwnPropertyNames(this.context).forEach(s=>{const o=this.context[s];r[s]=o&&typeof o.jaql=="function"?o.jaql(!0):o}),n.jaql.context=r,this._format&&(n.format={number:this._format}),this._sort!=exports.Sort.None&&(n.jaql.sort=this._sort==exports.Sort.Ascending?"asc":"desc"),t===!0?n.jaql:n}}const er=e=>!!(e&&e.__serializable==="DimensionalCalculatedMeasure");class Ot extends Xn{constructor(t,n,r,i,s,o,a){super(t,v.MeasureTemplate,r,i,s,o,a),this.__serializable="DimensionalMeasureTemplate",this.attribute=n}get id(){return`${this.attribute.expression}_*`}serialize(){const t=super.serialize();return t.attribute=this.attribute.serialize(),t}sort(t){return new Ot(this.name,this.attribute,this._format,this.description,t,this.dataSource,this.composeCode)}format(t){return new Ot(this.name,this.attribute,t,this.description,this._sort,this.dataSource,this.composeCode)}jaql(t){return this.sum(this._format).sort(this._sort).jaql(t)}sum(t){return Ct(this.attribute,void 0,t).sort(this._sort)}average(t){return zs(this.attribute,void 0,t).sort(this._sort)}median(t){return Vn(this.attribute,void 0,t).sort(this._sort)}min(t){return Bt(this.attribute,void 0,t).sort(this._sort)}max(t){return Ht(this.attribute,void 0,t).sort(this._sort)}count(t){return Kn(this.attribute,void 0,t).sort(this._sort)}countDistinct(t){return zt(this.attribute,void 0,t).sort(this._sort)}}const fg=e=>!!(e&&e.__serializable==="DimensionalMeasureTemplate");function qs(e,t){return Je(e,t)}const kt=()=>({guid:To(13),disabled:!1,locked:!1}),Ws=()=>Object.assign(Object.assign({},kt()),{excludeMembers:!1,enableMultiSelection:!0,deactivatedMembers:[]});function dg(e){return"excludeMembers"in e}const tr=e=>{const t=dg(e)?Ws():kt();return Object.fromEntries(Object.entries(e).filter(([n,r])=>!qs(r,t[n])))},X={Contains:"contains",StartsWith:"startsWith",EndsWith:"endsWith",Equals:"equals",DoesntEqual:"doesntEqual",DoesntStartWith:"doesntStartWith",DoesntContain:"doesntContain",DoesntEndWith:"doesntEndWith",Like:"like"},R={Equals:"equals",DoesntEqual:"doesntEqual",From:"from",FromNotEqual:"fromNotEqual",To:"to",ToNotEqual:"toNotEqual"},Ee={From:"from",To:"to",Last:"last",Next:"next",Anchor:"Anchor"},Gs={Union:"or",Intersection:"and",Exclude:"exclude"},et={Top:"top",Bottom:"bottom"},j={logicalAttribute:"logicalAttribute",members:"members",exclude:"exclude",measure:"measure",ranking:"ranking",measureRanking:"measure-ranking",text:"text",numeric:"numeric",dateRange:"dateRange",relativeDate:"relativeDate",cascading:"cascading",advanced:"advanced"};class P extends $t{constructor(t,n,r,i){super("filter",v.Filter,void 0,void 0,i),this.__serializable="AbstractFilter",this.filterType=n,this.isScope=!0,P.checkAttributeSupport(t),this.attribute=t,this.config=Wn({},kt(),r!=null?r:{})}get name(){return Cs(this.jaql()).toString(16)}serialize(){const t=super.serialize();return t.filterType=this.filterType,t.attribute=this.attribute.serialize(),this.config&&(t.config=this.config),t.composeCode=this.composeCode,t}jaql(t){if(this.config.disabled)return P.disabledJaql(t);const n=this.attribute.jaql(!1),r=this.attribute;if(r.getFormat&&r.getFormat()!==void 0){const i=r.translateGranularityToJaql();n.format={mask:{[i.level]:r.getFormat()}}}return n.jaql.filter=this.filterJaql(),this.attribute.dataSource&&(n.jaql.datasource=this.attribute.dataSource),this.isScope&&(n.panel="scope"),t===!0?n.jaql:n}static checkAttributeSupport(t){const{granularity:n}=t;if(n===g.Hours||n===g.MinutesRoundTo30||n===g.MinutesRoundTo15||n===g.Minutes||n===g.Seconds)throw new Ze("errors.filter.unsupportedDatetimeLevel")}static disabledJaql(t){return t?{filter:{}}:{jaql:{filter:{}}}}}class nr extends P{constructor(t,n,r,i){super(t[0].attribute,j.logicalAttribute,r,i),this.__serializable="LogicalAttributeFilter",this.operator=n,this.filters=t}get id(){return`${this.operator}_${this.filters.map(t=>t.id).join()}`}serialize(){const t=super.serialize();return t.operator=this.operator,t.filters=this.filters.map(n=>n.serialize()),t}filterJaql(){const t={};return t[this.operator]=this.filters.map(n=>n.filterJaql()),t}}class Qs extends P{constructor(t,n,r,i){if(super(t,j.members,void 0,i),this.__serializable="MembersFilter",this.members=n!=null?n:[],this.members.filter(s=>s==null).length>0)throw new Ze("errors.filter.membersFilterNullMember",{attributeId:t.id});this.config=Wn({},Ws(),r!=null?r:{})}get id(){return`${this.attribute.id}_${this.members.map(t=>t.toString()).join()}`}get name(){return Cs([this.jaql(),Us(this.config,["guid","originalFilterJaql"])]).toString(16)}serialize(){const t=super.serialize();return this.config&&(t.config=this.config.backgroundFilter?Object.assign(Object.assign({},this.config),{backgroundFilter:this.config.backgroundFilter.serialize()}):this.config),t.members=this.members,t}filterJaql(){const t={members:this.members.map(r=>r.toString())},n=this.config.excludeMembers?{exclude:t}:t;return this.config.backgroundFilter?{and:[n,this.config.backgroundFilter.filterJaql()]}:n}}class Vs extends P{constructor(t,n,r){super(t[0].attribute,j.cascading,n,r),this.__serializable="CascadingFilter",this._filters=t}get filters(){const{disabled:t,locked:n}=this.config;return this._filters.map(r=>(r.config=Object.assign(Object.assign({},r.config),{disabled:t,locked:n}),r))}get id(){return`${this.filterType}_${this._filters.map(t=>t.id).join()}`}serialize(){const t=super.serialize();return t._filters=this.filters.map(n=>n.serialize()),t}filterJaql(){return{}}jaql(t){return this.config.disabled?P.disabledJaql(t):this.filters.map(n=>(n.isScope=!0,n.jaql(t)))}}class Ks extends P{constructor(t,n,r,i){super(t.attribute,j.exclude,r,i),this.__serializable="ExcludeFilter",this.input=n,this.filter=t}get id(){let t=`exclude_${this.filter.id}`;return this.input&&(t+="_from_"+this.input.id),t}serialize(){const t=super.serialize();return t.filter=this.filter.serialize(),this.input&&(t.input=this.input.serialize()),t}filterJaql(){const t={},n=this.filter.filterJaql();return this.input?(t.filter=this.input.filterJaql(),t.filter.filter={exclude:n}):t.exclude=n,t}}class qt extends P{constructor(t,n,r,i,s,o,a,u){super(t,n,a,u),this.__serializable="DoubleOperatorFilter",r&&i!==void 0&&(this.valueA=i,this.operatorA=r),s&&o!==void 0&&(this.operatorB=s,this.valueB=o)}get id(){let t=`${this.attribute.id}`;return this.operatorA&&this.valueA!==void 0&&(t+=`_${this.operatorA}:${this.valueA}`),this.operatorB&&this.valueB!==void 0&&(t+=`_${this.operatorB}:${this.valueB}`),t}serialize(){const t=super.serialize();return this.operatorA&&(t.operatorA=this.operatorA),this.operatorB&&(t.operatorB=this.operatorB),this.valueA!==void 0&&(t.valueA=this.valueA),this.valueB!==void 0&&(t.valueB=this.valueB),t}filterJaql(){const t={};return this.operatorA&&this.valueA!==void 0&&(t[this.operatorA]=this.valueA),this.operatorB&&this.valueB!==void 0&&(t[this.operatorB]=this.valueB),t}}class Ys extends qt{constructor(t,n,r,i,s,o,a,u){super(t,j.measure,r,i,s,o,a,u),this.__serializable="MeasureFilter",this.measure=n}get id(){let t=`${this.attribute.id}_${this.measure.id}`;return this.operatorA&&this.valueA!==void 0&&(t+=`_${this.operatorA}:${this.valueA}`),this.operatorB&&this.valueB!==void 0&&(t+=`_${this.operatorB}${this.valueB}`),t}serialize(){const t=super.serialize();return t.measure=this.measure.serialize(),t}jaql(t){if(this.config.disabled)return P.disabledJaql(t);const n=super.jaql(t);return(Zn(this.measure)||er(this.measure))&&Object.entries(this.measure.jaql().jaql).forEach(([r,i])=>{n.jaql[r]=i}),n}}class rr extends P{constructor(t,n,r,i,s,o){super(t,j.ranking,s,o),this.__serializable="RankingFilter",this.count=i,this.operator=r,this.measure=n}get id(){return`${this.operator}_${this.count}_${this.attribute.id}_by_${this.measure.id}`}serialize(){const t=super.serialize();return t.count=this.count,t.operator=this.operator,t.measure=this.measure.serialize(),t}filterJaql(){const t={};return t[this.operator]=this.count,t.by=this.measure.jaql(!0),t}}class ir extends P{constructor(t,n,r,i,s){super(t.attribute,j.measureRanking,i,s),this.__serializable="MeasureRankingFilter",this.count=r,this.operator=n,this.measure=t}get id(){return`${this.operator}_${this.count}_measure_${this.measure.id}`}serialize(){const t=super.serialize();return t.measure=this.measure.serialize(),t.count=this.count,t.operator=this.operator,t}filterJaql(){const t={};return t[this.operator]=this.count,t}jaql(t){if(this.config.disabled)return P.disabledJaql(t);const n=super.jaql(t);return(Zn(this.measure)||er(this.measure))&&Object.entries(this.measure.jaql().jaql).forEach(([r,i])=>{n.jaql[r]=i}),n.jaql.type="measure",n}}class Js extends qt{constructor(t,n,r,i,s,o,a){super(t,j.numeric,n,r,i,s,o,a),this.__serializable="NumericFilter"}serialize(){return super.serialize()}}class Z extends qt{constructor(t,n,r,i,s){super(t,j.text,n,r,void 0,void 0,i,s),this.__serializable="TextFilter"}serialize(){return super.serialize()}}class Xs extends qt{constructor(t,n,r,i,s){super(t,j.dateRange,Ee.From,n,Ee.To,r,i,s),this.__serializable="DateRangeFilter",typeof n=="object"&&(this.valueA=n.toISOString()),typeof r=="object"&&(this.valueB=r.toISOString())}get level(){return this.attribute}get from(){return this.valueA}get to(){return this.valueB}filterJaql(){return super.filterJaql()}serialize(){return super.serialize()}}class Wt extends P{constructor(t,n,r,i,s,o,a){super(t,j.relativeDate,o,a),this.__serializable="RelativeDateFilter",i||(i=Ee.Next),this.anchor=s,this.operator=i,this.offset=n,this.count=r}get level(){return this.attribute}get id(){let t=`${this.level.id}_${this.operator}_${this.offset}_${this.count}`;return this.anchor&&(typeof this.anchor=="string"?t+=`_${this.anchor}`:typeof this.anchor=="object"&&(t+=`_${this.anchor.toISOString()}`)),t}serialize(){const t=super.serialize();return t.offset=this.offset,t.count=this.count,t.operator=this.operator,this.anchor&&(t.anchor=typeof this.anchor=="string"?this.anchor:this.anchor.toISOString()),t}filterJaql(){const t={};return t[this.operator]={offset:this.offset,count:this.count},this.anchor&&(typeof this.anchor=="string"?t[this.operator].anchor=this.anchor:typeof this.anchor=="object"&&(t[this.operator].anchor=this.anchor.toISOString())),t}}class Zs extends P{constructor(t,n,r,i){super(t,j.advanced,r,i),this.__serializable="CustomFilter",delete n.filterType,this.jaqlExpression=n}get id(){return`custom_${this.attribute.id}_${this.config.guid}`}filterJaql(){return this.jaqlExpression}serialize(){const t=super.serialize();return t.jaqlExpression=this.jaqlExpression,t}}function gg(e){return e&&e.__serializable==="CustomFilter"}function hg(e){return e&&e.__serializable==="MembersFilter"}function pg(e){return e&&e.__serializable==="NumericFilter"}function mg(e){return e&&e.__serializable==="RankingFilter"}function bg(e){return e&&e.__serializable==="MeasureRankingFilter"}function yg(e){return e&&e.__serializable==="MeasureFilter"}function Tg(e){return e&&e.__serializable==="ExcludeFilter"}function Sg(e){return e&&e.__serializable==="LogicalAttributeFilter"}function tt(e){return e&&e.__serializable==="CascadingFilter"}function Ag(e){return e&&e.__serializable==="RelativeDateFilter"}function vg(e){return e&&e.__serializable==="TextFilter"}function Eg(e){return e&&e.__serializable==="DateRangeFilter"}const eo=T((e,t)=>new nr(e,Gs.Union,t),"union"),to=T((e,t)=>new nr(e,Gs.Intersection,t),"intersection"),Gt=T((e,t,n)=>new Ks(e,t,n),"exclude"),sr=T((e,t,n)=>new Z(e,X.DoesntContain,t,n),"doesntContain"),or=T((e,t,n)=>new Z(e,X.DoesntEndWith,t,n),"doesntEndWith"),ar=T((e,t,n)=>new Z(e,X.DoesntStartWith,t,n),"doesntStartWith"),ur=T((e,t,n)=>new Z(e,X.Contains,t,n),"contains"),lr=T((e,t,n)=>new Z(e,X.EndsWith,t,n),"endsWith"),cr=T((e,t,n)=>new Z(e,X.StartsWith,t,n),"startsWith"),no=T((e,t,n)=>new Z(e,X.Like,t,n),"like"),fr=T((e,t,n)=>typeof t=="string"?new Z(e,X.DoesntEqual,t,n):ne(e,R.DoesntEqual,t,void 0,void 0,n),"doesntEqual"),dr=T((e,t,n)=>typeof t=="string"?new Z(e,X.Equals,t,n):ne(e,R.Equals,t,void 0,void 0,n),"equals"),gr=T((e,t,n)=>ne(e,R.FromNotEqual,t,void 0,void 0,n),"greaterThan"),hr=T((e,t,n)=>ne(e,R.From,t,void 0,void 0,n),"greaterThanOrEqual"),pr=T((e,t,n)=>ne(e,R.ToNotEqual,t,void 0,void 0,n),"lessThan"),mr=T((e,t,n)=>ne(e,R.To,t,void 0,void 0,n),"lessThanOrEqual"),We=T((e,t,n,r)=>ne(e,R.From,t,R.To,n,r),"between"),_g=T((e,t,n,r)=>ne(e,R.FromNotEqual,t,R.ToNotEqual,n,r),"betweenNotEqual"),ne=T((e,t,n,r,i,s)=>new Js(e,t,n,r,i,s),"numeric"),nt=T((e,t,n)=>new Qs(e,t,n),"members"),Cg=T((e,t,n)=>rt(e,t,void 0,n),"dateFrom"),Og=T((e,t,n)=>rt(e,void 0,t,n),"dateTo"),rt=T((e,t,n,r)=>new Xs(e,t,n,r),"dateRange"),ro=T((e,t,n,r,i)=>new Wt(e,t,n,void 0,r,i),"dateRelative"),br=T((e,t,n,r,i)=>new Wt(e,t,n,Ee.Next,r,i),"dateRelativeFrom"),pe=T((e,t,n,r,i)=>new Wt(e,t,n,Ee.Last,r,i),"dateRelativeTo"),xg=T((e,t)=>pe(e.Years,0,1,void 0,t),"thisYear"),wg=T((e,t)=>pe(e.Months,0,1,void 0,t),"thisMonth"),Ng=T((e,t)=>pe(e.Quarters,0,1,void 0,t),"thisQuarter"),Rg=T((e,t)=>pe(e.Days,0,1,void 0,t),"today");function se(e){if("attribute"in e)return e.attribute;for(const t of Object.values(e.context))if(!(typeof t!="object"||t===null)){if("attribute"in t)return t.attribute;if("context"in t&&typeof t.context=="object")return se(t)}throw new Error("Cannot determine attribute from measure")}function oe(e,t,n,r,i,s,o){return new Ys(e,t,n,r,i,s,o)}const io=T((e,t,n)=>oe(se(e),e,R.Equals,t,void 0,void 0,n),"measureEquals"),so=T((e,t,n)=>oe(se(e),e,R.FromNotEqual,t,void 0,void 0,n),"measureGreaterThan"),oo=T((e,t,n)=>oe(se(e),e,R.From,t,void 0,void 0,n),"measureGreaterThanOrEqual"),ao=T((e,t,n)=>oe(se(e),e,R.To,t,void 0,void 0,n),"measureLessThanOrEqual"),uo=T((e,t,n)=>oe(se(e),e,R.ToNotEqual,t,void 0,void 0,n),"measureLessThan"),Tn=T((e,t,n,r)=>oe(se(e),e,R.From,t,R.To,n,r),"measureBetween"),Fg=T((e,t,n,r)=>oe(se(e),e,R.FromNotEqual,t,R.ToNotEqual,n,r),"measureBetweenNotEqual"),yr=T((e,t,n,r)=>new rr(e,t,et.Top,n,r),"topRanking"),Tr=T((e,t,n,r)=>new rr(e,t,et.Bottom,n,r),"bottomRanking"),lo=T((e,t,n)=>new ir(e,et.Top,t,n),"measureTopRanking"),co=T((e,t,n)=>new ir(e,et.Bottom,t,n),"measureBottomRanking"),fo=T((e,t)=>new Vs(e,t),"cascading");exports.logic=void 0;(function(e){const t=n=>{if(Array.isArray(n)){const[r,...i]=n;return i.length===0?t(r):{operator:"AND",left:t(r),right:t(i)}}return n};e.and=Mi((n,r)=>({operator:"AND",left:t(n),right:t(r)}),"and"),e.or=Mi((n,r)=>({operator:"OR",left:t(n),right:t(r)}),"or")})(exports.logic=exports.logic||(exports.logic={}));const go=T((e,t,n)=>new Zs(e,t,n),"customFilter"),Mg=Object.freeze(Object.defineProperty({__proto__:null,between:We,betweenNotEqual:_g,bottomRanking:Tr,cascading:fo,contains:ur,customFilter:go,dateFrom:Cg,dateRange:rt,dateRelative:ro,dateRelativeFrom:br,dateRelativeTo:pe,dateTo:Og,doesntContain:sr,doesntEndWith:or,doesntEqual:fr,doesntStartWith:ar,endsWith:lr,equals:dr,exclude:Gt,greaterThan:gr,greaterThanOrEqual:hr,intersection:to,lessThan:pr,lessThanOrEqual:mr,like:no,get logic(){return exports.logic},measureBase:oe,measureBetween:Tn,measureBetweenNotEqual:Fg,measureBottomRanking:co,measureEquals:io,measureGreaterThan:so,measureGreaterThanOrEqual:oo,measureLessThan:uo,measureLessThanOrEqual:ao,measureTopRanking:lo,members:nt,numeric:ne,startsWith:cr,thisMonth:wg,thisQuarter:Ng,thisYear:xg,today:Rg,topRanking:yr,union:eo},Symbol.toStringTag,{value:"Module"})),Dg=e=>["__int4","__int8","int","tinyint","bigint","int2","int4","int8","smallint","mediumint","serial","integer","byteint","int64"].includes(e.toLowerCase()),Lg=e=>["basemeasure","calculatedmeasure","float","float4","float8","double precision","double","numeric","decimal","real","number","float64"].includes(e.toLowerCase()),Sr=e=>Dg(e)||Lg(e)||e==="numeric-attribute",ho=e=>["textdimension","string","varchar","text","ntext","char","character","character varying","smalltext","nchar","nvarchar","json","jsonb","object","text-attribute"].includes(e.toLowerCase()),it=e=>["datelevel","date","time","datetime","timestamp without time zone","timestamp","timestamp with time zone","timestamp(6)","timestamp_tz","timestamp_ntz","timestamp_ltz","timestampltz","timestampntz","timestamptz","datetime64[ns]","timewithtimezone","timestampwithtimezone","timestamp_with_timezone"].includes(e.toLowerCase()),po=e=>["bool","boolean","bit","logical"].includes(e.toLowerCase()),mo=e=>Sr(e)?"number":it(e)?"datetime":ho(e)?"text":po(e)?"boolean":"text",Ig=e=>{const{dim:t,datatype:n,title:r,datasource:i}=e,s="sort"in e?e.sort:void 0,o=Vt({expression:t,dataType:n,granularity:_e(e),title:r,dataSource:i,sort:s});return it(n)&&o.getSort()===exports.Sort.None?o.sort(exports.Sort.Descending):o},Pg=e=>{const{dim:t,title:n,datatype:r,agg:i,datasource:s}=e;if(i)return Kt({expression:t,dataType:r,agg:i,granularity:_e(e),format:void 0,sort:void 0,title:n,dataSource:s})},Di=(e,t)=>{if("formula"in e)return _r(e);const{dim:n,datatype:r,agg:i}=e;return Kt({expression:n,granularity:_e(e),dataType:r,agg:i,format:void 0,sort:void 0,title:t})};var dt;(function(e){e.INCLUDE_ALL="INCLUDE_ALL",e.ADVANCED="ADVANCED",e.INVALID="INVALID",e.CONDITION="CONDITION",e.SPECIFIC_ITEMS="SPECIFIC_ITEMS"})(dt=dt||(dt={}));var gt;(function(e){e.PERIOD="PERIOD",e.DATE_RANGE="DATE_RANGE"})(gt=gt||(gt={}));var ht;(function(e){e.NUMERIC_RANGE="NUMERIC_RANGE"})(ht=ht||(ht={}));var re;(function(e){e.YEARS="years",e.QUARTERS="quarters",e.MONTHS="months",e.WEEKS="weeks",e.DAYS="days",e.HOURS="hours",e.MINUTES="minutes"})(re=re||(re={}));var Ae;(function(e){e.DATE_TIME="datetime",e.NUMERIC="numeric",e.TEXT="text"})(Ae=Ae||(Ae={}));const $g=["1","30"],_=Object.assign(Object.assign(Object.assign({},dt),gt),ht),jg={[_.INCLUDE_ALL]:{all:!0,filterType:_.INCLUDE_ALL},[_.PERIOD]:{last:{count:1,offset:1},isNotCurrentPeriod:!0,filterType:_.PERIOD},[_.DATE_RANGE]:{filterType:_.DATE_RANGE},[_.NUMERIC_RANGE]:{filterType:_.NUMERIC_RANGE},[_.CONDITION]:{explicit:!1,multiSelection:!0,exclude:{members:[]},filterType:_.CONDITION},[_.SPECIFIC_ITEMS]:{explicit:!0,multiSelection:!0,members:[],filterType:_.SPECIFIC_ITEMS}},Ug={filter:jg.INCLUDE_ALL,level:re.YEARS};exports.ConditionFilterType=void 0;(function(e){e.IS="members",e.IS_NOT="exclude",e.IS_WITHIN="isWithin",e.TOP="top",e.BOTTOM="bottom",e.AFTER="after",e.BEFORE="before",e.STARTS_WITH="startsWith",e.DOESNT_START_WITH="doesntStartWith",e.ENDS_WITH="endsWith",e.DOESNT_END_WITH="doesntEndWith",e.CONTAINS="contains",e.DOESNT_CONTAIN="doesntContain",e.EQUALS="equals",e.DOESNT_EQUAL="doesntEqual",e.IS_EMPTY="isEmpty",e.IS_NOT_EMPTY="isNotEmpty",e.GREATER_THAN="fromNotEqual",e.GREATER_THAN_OR_EQUAL="from",e.LESS_THAN="toNotEqual",e.LESS_THAN_OR_EQUAL="to",e.BETWEEN="between",e.IS_NOT_BETWEEN="isNotBetween",e.MULTIPLE_CONDITION="multipleCondition",e.NONE="none"})(exports.ConditionFilterType=exports.ConditionFilterType||(exports.ConditionFilterType={}));const Bg=e=>e.top!==void 0,Hg=e=>e.bottom!==void 0,zg=e=>{var t;return!!(!((t=e.exclude)===null||t===void 0)&&t.members)},kg=e=>!!e.members&&!!e.isCondition,qg=e=>{var t,n;return((t=e.last)===null||t===void 0?void 0:t.anchor)!==void 0||((n=e.next)===null||n===void 0?void 0:n.anchor)!==void 0},Wg=e=>e.fromNotEqual!==void 0,Gg=e=>e.from!==void 0&&!e.isBetween,Qg=e=>e.toNotEqual!==void 0,Vg=e=>e.to!==void 0&&!e.isBetween,Kg=e=>e.equals!==void 0,Yg=e=>e.doesntEqual!==void 0,Jg=e=>!!(e.equals===""&&e.isEmpty),Xg=e=>!!(e.doesntEqual===""&&e.isEmpty),Zg=e=>e.contains!==void 0,eh=e=>e.doesntContain!==void 0,th=e=>e.startsWith!==void 0,nh=e=>e.doesntStartWith!==void 0,rh=e=>e.endsWith!==void 0,ih=e=>e.doesntEndWith!==void 0,sh=e=>e.from!==void 0&&e.to!==void 0,oh=e=>{var t,n;return((t=e.exclude)===null||t===void 0?void 0:t.from)!==void 0&&((n=e.exclude)===null||n===void 0?void 0:n.to)!==void 0},ah=e=>!!(e.or||e.and),Qt=e=>Hg(e)?exports.ConditionFilterType.BOTTOM:Bg(e)?exports.ConditionFilterType.TOP:zg(e)?exports.ConditionFilterType.IS_NOT:qg(e)?exports.ConditionFilterType.IS_WITHIN:Wg(e)?exports.ConditionFilterType.GREATER_THAN:Qg(e)?exports.ConditionFilterType.LESS_THAN:Kg(e)?exports.ConditionFilterType.EQUALS:Yg(e)?exports.ConditionFilterType.DOESNT_EQUAL:Jg(e)?exports.ConditionFilterType.IS_EMPTY:Xg(e)?exports.ConditionFilterType.IS_NOT_EMPTY:Zg(e)?exports.ConditionFilterType.CONTAINS:eh(e)?exports.ConditionFilterType.DOESNT_CONTAIN:ih(e)?exports.ConditionFilterType.DOESNT_END_WITH:nh(e)?exports.ConditionFilterType.DOESNT_START_WITH:rh(e)?exports.ConditionFilterType.ENDS_WITH:th(e)?exports.ConditionFilterType.STARTS_WITH:oh(e)?exports.ConditionFilterType.IS_NOT_BETWEEN:kg(e)?exports.ConditionFilterType.IS:ah(e)?exports.ConditionFilterType.MULTIPLE_CONDITION:sh(e)?exports.ConditionFilterType.BETWEEN:Gg(e)?exports.ConditionFilterType.GREATER_THAN_OR_EQUAL:Vg(e)?exports.ConditionFilterType.LESS_THAN_OR_EQUAL:exports.ConditionFilterType.NONE,Sn=(e,t,n)=>{var r,i,s,o,a,u,l;switch(Qt(t)){case exports.ConditionFilterType.BOTTOM:if(t.by)return Tr(e,Di(t.by,t.rankingMessage),t[exports.ConditionFilterType.BOTTOM],{guid:n});break;case exports.ConditionFilterType.EQUALS:return dr(e,t[exports.ConditionFilterType.EQUALS],{guid:n});case exports.ConditionFilterType.DOESNT_EQUAL:return fr(e,t[exports.ConditionFilterType.DOESNT_EQUAL],{guid:n});case exports.ConditionFilterType.GREATER_THAN:return gr(e,t[exports.ConditionFilterType.GREATER_THAN],{guid:n});case exports.ConditionFilterType.GREATER_THAN_OR_EQUAL:return hr(e,t[exports.ConditionFilterType.GREATER_THAN_OR_EQUAL],{guid:n});case exports.ConditionFilterType.TOP:if(t.by)return yr(e,Di(t.by,t.rankingMessage),t[exports.ConditionFilterType.TOP],{guid:n});break;case exports.ConditionFilterType.STARTS_WITH:return cr(e,t[exports.ConditionFilterType.STARTS_WITH],{guid:n});case exports.ConditionFilterType.DOESNT_START_WITH:return ar(e,t[exports.ConditionFilterType.DOESNT_START_WITH],{guid:n});case exports.ConditionFilterType.ENDS_WITH:return lr(e,t[exports.ConditionFilterType.ENDS_WITH],{guid:n});case exports.ConditionFilterType.DOESNT_END_WITH:return or(e,t[exports.ConditionFilterType.DOESNT_END_WITH],{guid:n});case exports.ConditionFilterType.CONTAINS:return ur(e,t[exports.ConditionFilterType.CONTAINS],{guid:n});case exports.ConditionFilterType.DOESNT_CONTAIN:return sr(e,t[exports.ConditionFilterType.DOESNT_CONTAIN],{guid:n});case exports.ConditionFilterType.LESS_THAN:return pr(e,t[exports.ConditionFilterType.LESS_THAN],{guid:n});case exports.ConditionFilterType.LESS_THAN_OR_EQUAL:return mr(e,t[exports.ConditionFilterType.LESS_THAN_OR_EQUAL],{guid:n});case exports.ConditionFilterType.BETWEEN:return We(e,t.from,t.to,{guid:n});case exports.ConditionFilterType.IS_NOT_BETWEEN:return Gt(We(e,(r=t.exclude)===null||r===void 0?void 0:r.from,(i=t.exclude)===null||i===void 0?void 0:i.to,{guid:n}),void 0,{guid:n});case exports.ConditionFilterType.MULTIPLE_CONDITION:if(t.and)return to(t.and.map(d=>Sn(e,d,n)),{guid:n});if(t.or)return eo(t.or.map(d=>Sn(e,d,n)),{guid:n});break;case exports.ConditionFilterType.IS_NOT:{const d=((s=t.filter)===null||s===void 0?void 0:s.turnedOff)&&((o=t.filter.exclude)===null||o===void 0?void 0:o.members)||[],c=((u=(a=t.exclude)===null||a===void 0?void 0:a.members)===null||u===void 0?void 0:u.filter(h=>!d.includes(h)))||[],p=tr({guid:n,excludeMembers:!0,enableMultiSelection:(l=t.multiSelection)!==null&&l!==void 0?l:!0,deactivatedMembers:d});return nt(e,c,p)}}throw new Ze("errors.filter.unsupportedConditionFilter",{filter:JSON.stringify(t),attributeName:e.name})},uh=(e,t,n)=>{var r,i;switch(Qt(t)){case exports.ConditionFilterType.EQUALS:return io(e,t[exports.ConditionFilterType.EQUALS],{guid:n});case exports.ConditionFilterType.GREATER_THAN:return so(e,t[exports.ConditionFilterType.GREATER_THAN],{guid:n});case exports.ConditionFilterType.GREATER_THAN_OR_EQUAL:return oo(e,t[exports.ConditionFilterType.GREATER_THAN_OR_EQUAL],{guid:n});case exports.ConditionFilterType.LESS_THAN:return uo(e,t[exports.ConditionFilterType.LESS_THAN],{guid:n});case exports.ConditionFilterType.LESS_THAN_OR_EQUAL:return ao(e,t[exports.ConditionFilterType.LESS_THAN_OR_EQUAL],{guid:n});case exports.ConditionFilterType.BETWEEN:return Tn(e,t.from,t.to,{guid:n});case exports.ConditionFilterType.IS_NOT_BETWEEN:return Gt(Tn(e,(r=t.exclude)===null||r===void 0?void 0:r.from,(i=t.exclude)===null||i===void 0?void 0:i.to,{guid:n}),void 0,{guid:n});case exports.ConditionFilterType.TOP:return lo(e,t[exports.ConditionFilterType.TOP],{guid:n});case exports.ConditionFilterType.BOTTOM:return co(e,t[exports.ConditionFilterType.BOTTOM],{guid:n})}throw new Ze("errors.filter.unsupportedConditionFilter",{filter:JSON.stringify(t),attributeName:e.name})},lh=(e,t)=>{let n=e?e.toLocaleLowerCase():re.YEARS;return n===re.MINUTES&&t==="60"&&(n=re.HOURS),n},ch=e=>e==null?void 0:e.all,fh=e=>e.last?e.last:e.next,dh=e=>{var t;return((t=fh(e))===null||t===void 0?void 0:t.offset)<2},bo=e=>{var t;return((t=e==null?void 0:e.members)===null||t===void 0?void 0:t.length)>=0},gh=(e,t)=>e&&typeof e=="string"||t&&typeof t=="string",hh=(e,t)=>e===""&&t==="",ph=(e,t)=>{const{from:n,to:r}=e;return t!==Ae.DATE_TIME?!1:gh(n,r)?!0:hh(n,r)},mh=e=>{const{from:t,to:n}=e;return t!==void 0&&n!==void 0&&!e.isBetween},yo=e=>Qt(e)!==exports.ConditionFilterType.NONE,bh=e=>Object.keys(e).includes("isAdvanced"),yh=e=>!!(e.level&&e.bucket&&e.level===re.MINUTES&&$g.includes(e.bucket)),Th=e=>e.filterType===_.INVALID,Li=(e,t=Ae.DATE_TIME,n)=>n&&yh(n)||bh(e)?_.ADVANCED:ch(e)?_.INCLUDE_ALL:dh(e)?_.PERIOD:bo(e)?_.SPECIFIC_ITEMS:ph(e,t)?_.DATE_RANGE:mh(e)?_.NUMERIC_RANGE:yo(e)?_.CONDITION:(Th(e),_.INVALID),Sh=(e,t)=>{const{level:n,filter:r,bucket:i}=e,s=r||Ug.filter,o={filter:Object.assign(Object.assign({},s),{filterType:Li(s,t)})};if(t===Ae.DATE_TIME){const a=s,u=(a==null?void 0:a.level)||n;o.level=lh(u,i),o.filter.filterType=Li(s,t,{level:u,bucket:i})}return o},Ii=(e,t)=>{const n={config:Object.assign(Object.assign({},kt()),{guid:t,originalFilterJaql:e}),jaql:r=>r?e:{jaql:e,panel:"scope"},attribute:{id:e.dim},type:"filter"};return Object.assign({},n)},Ah=(e,t)=>nt(e,[],{guid:t}),vh=(e,t,n,r)=>{const i=Eh(t),s=_h(t,i),o=tr({guid:n,excludeMembers:!1,enableMultiSelection:r!=null?r:!0,deactivatedMembers:i});return nt(e,s,o)};function Eh(e){var t,n,r,i;return!((t=e.filter)===null||t===void 0)&&t.turnedOff?(i=(r=(n=e.filter)===null||n===void 0?void 0:n.exclude)===null||r===void 0?void 0:r.members)!==null&&i!==void 0?i:[]:[]}function _h(e,t){const n=e.members;return t?n.filter(r=>!t.includes(r)):n}const Ch=(e,t,n)=>rt(e,t.from,t.to,{guid:n}),Oh=(e,t,n)=>We(e,t.from,t.to,{guid:n}),xh=(e,t,n)=>t.last?pe(e,t.last.offset,t.last.count,t.last.anchor,{guid:n}):br(e,t.next.offset,t.next.count,t.next.anchor,{guid:n}),wh=(e,t,n)=>go(e,t,{guid:n}),Pi=(e,t)=>{var n,r;try{if("formula"in e)throw new Ze("errors.filter.formulaFiltersNotSupported",{filter:JSON.stringify(e),attributeName:(r=(n=e.title)!==null&&n!==void 0?n:e.column)!==null&&r!==void 0?r:e.dim});const i=Sh(e,e.datatype),{filter:s}=i,{filterType:o}=s,a=Ig(e),u=Pg(e);switch(o){case _.INCLUDE_ALL:return Ah(a,t);case _.SPECIFIC_ITEMS:return vh(a,s,t,s.multiSelection);case _.CONDITION:return u?uh(u,s,t):Sn(a,s,t);case _.DATE_RANGE:return Ch(a,s,t);case _.PERIOD:return xh(a,s,t);case _.NUMERIC_RANGE:return Oh(a,s,t);case _.ADVANCED:return wh(a,s,t);case _.INVALID:return Ii(e,t)}}catch(i){console.debug("Fall back to generic pass-through JAQL filter due to filter translation error:",i)}return Ii(e,t)};function Nh(){const e=new Uint32Array(1);return crypto.getRandomValues(e),e[0]/4294967296}const To=function(e){e||(e=20);const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=new Array(e);let r=0,i;for(let s=0;s<e;s+=1){if(s>0&&s%5==0){n[s]="-";continue}r<=2&&(r=33554432+Nh()*16777216|0),i=r&15,r=r>>4,n[s]=t[s==19?i&3|8:i]}return n.join("")},Rh=e=>{if(!e)return{filters:void 0,relations:void 0};if(Array.isArray(e))return{filters:e,relations:void 0};const t=new Set;function n(o){const[a,...u]=o;if(t.add(a),!u.length)return r({instanceid:a.config.guid});const l=r(a),f=n(u);return{left:l,right:f,operator:"AND"}}function r(o){return o&&(Fh(o)?tt(o)?n(o.filters):(t.add(o),{instanceid:o.config.guid}):("left"in o&&(o.left=r(o.left)),"right"in o&&(o.right=r(o.right)),"composeCode"in o&&delete o.composeCode,o))}const i=$n(e),s=r(i);return{filters:Array.from(t),relations:s}};function Fh(e){return"config"in e&&"guid"in e.config}function Mh(e){return typeof e=="string"?e:e.title}function Ar(e){return typeof e=="object"&&"type"in e&&"title"in e}function Dh(e){return{id:e.id,address:e.address,title:e.title,type:e.live?"live":"elasticube"}}function vr(e){return Ar(e)?{title:e.title,live:e.type==="live"}:{title:e,live:!1}}function Lh(e){var t;return Ar(e)?{title:e.title,live:e.type==="live",id:(t=e.id)!==null&&t!==void 0?t:"",address:e.address}:{title:e,id:""}}function So(e){return e?e==="asc"?exports.Sort.Ascending:exports.Sort.Descending:exports.Sort.None}function Er(e){switch(e){case"sortAsc":return exports.Sort.Ascending;case"sortDesc":return exports.Sort.Descending;default:return exports.Sort.None}}function Ih(e){switch(e){case exports.Sort.Ascending:return"sortAsc";case exports.Sort.Descending:return"sortDesc";default:return"sortNone"}}const Ao=(e,t,n=!1,r=!1)=>{const i=e.filter.filter&&!("turnedOff"in e.filter.filter),s=t||To(),o=Pi(e,s);if(i){const a=Pi(Object.assign(Object.assign({},e),{filter:e.filter.filter}),`${t}-bg`),u=o.config;return o.config=Object.assign(Object.assign({},u),{backgroundFilter:a}),o}return o.config=Object.assign(Object.assign({},o.config),{originalFilterJaql:e,disabled:n,locked:r}),o};function me(e){const[t,n]=e.slice(1,-1).split(".");return{table:t,column:n?n.replace("(Calendar)","").trim():""}}function Ph(e){return me(e.expression).table}function $h(e){return me(e.expression).column}function jh(e){switch(e){case Pe.ASC:return"sortAsc";case Pe.DESC:return"sortDesc";default:return"sortNone"}}const Vt=({expression:e,dataType:t,granularity:n,format:r,sort:i,title:s,panel:o,dataSource:a,indexed:u,merged:l})=>{const f=me(e).column,d=So(i);if(t!==void 0&&it(t))return new K(s!=null?s:f,e,n||g.Years,r||K.getDefaultFormatForGranularity(n||g.Years),void 0,d,a,void 0,o,u,l);const p=!t||Sr(t)?v.NumericAttribute:v.TextAttribute;return new we(s!=null?s:f,e,p,void 0,d,a,void 0,o,u,l)},Kt=({expression:e,dataType:t,agg:n,granularity:r,format:i,sort:s,title:o,dataSource:a,indexed:u,merged:l})=>{const f=Vt({expression:e,dataType:t,granularity:r,format:i,sort:s,title:o,dataSource:a,indexed:u,merged:l}),d=le.aggregationFromJAQL(n),c=me(e).column,p=o!=null?o:`${d} ${c}`;return Uh(d,f,p,i)};function Uh(e,t,n,r){switch(e){case A.Sum:return Ct(t,n,r);case A.Average:return ks(t,n,r);case A.Min:return Bt(t,n,r);case A.Max:return Ht(t,n,r);case A.Count:return Kn(t,n,r);case A.CountDistinct:return zt(t,n,r);case A.Median:return Vn(t,n,r);case A.Variance:return q(t,A.Variance,n,r);case A.StandardDeviation:return q(t,A.StandardDeviation,n,r);default:return Ct(t,n,r)}}const _r=e=>{var t;const n=Qf((t=e.context)!==null&&t!==void 0?t:{},i=>typeof i=="string"?i:i&&vo(i)),r=Qn(e.title,e.formula,n,void 0,e.description);if(e.sort){const i=So(e.sort);return r.sort(i)}return r};function vo(e,t,n){if("filter"in e)return Ao(e);if("formula"in e)return _r(e);const s="datasource"in e?e.datasource:void 0;return e.agg?Kt({expression:e.dim,dataType:e.datatype,agg:e.agg||"",granularity:_e(e),format:t,sort:e.sort,title:e.title,dataSource:s}):Vt({expression:e.dim,dataType:e.datatype,granularity:_e(e),format:t,sort:e.sort,title:e.title,panel:n,dataSource:s,indexed:e.indexed,merged:e.merged})}function _e(e){return e!=null&&e.datatype&&it(e.datatype)?K.translateJaqlToGranularity(e):void 0}const Cr=e=>mo(e).replace("number","numeric");class we extends $t{constructor(t,n,r,i,s,o,a,u,l,f){if(super(t,r||v.Attribute,i,o,a),this.__serializable="DimensionalAttribute",this._sort=exports.Sort.None,this.expression=n,!a&&n){const{table:d,column:c}=me(n);this.composeCode=`${Gn}.${qe(d)}.${qe(c)}`}u==="columns"&&(this.panel=u),this._sort=s||exports.Sort.None,this.merged=f,this.indexed=l}get id(){return this.expression}getSort(){return this._sort}sort(t){return new we(this.name,this.expression,this.type,this.description,t,this.dataSource,this.composeCode,this.panel,this.indexed,this.merged)}jaql(t){const n={jaql:{title:this.name,dim:this.expression,datatype:Cr(this.type)}};return this.panel&&(n.panel=this.panel),this._sort!=exports.Sort.None&&(n.jaql.sort=this._sort==exports.Sort.Ascending?"asc":"desc"),t===!0?n.jaql:n}serialize(){const t=super.serialize();return t.expression=this.expression,this.getSort()!==exports.Sort.None&&(t.sort=this.getSort()),t}}const Bh=e=>!!(e&&e.__serializable==="DimensionalAttribute");class K extends we{constructor(t,n,r,i,s,o,a,u,l,f,d){if(super(t,n,v.DateLevel,s,o,a,u,void 0,f,d),this.__serializable="DimensionalLevelAttribute",this._format=i,this.granularity=r,!u&&n){const{table:c,column:p}=me(n),h=r?`.${r}`:"";this.composeCode=`${Gn}.${qe(c)}.${qe(p)}${h}`}l==="columns"&&(this.panel=l)}get id(){let t=`${this.expression}`;const{level:n="",dateTimeLevel:r="",bucket:i}=this.translateGranularityToJaql();return t+=`_${(n||r).toLowerCase()}`,i&&(t+=`_${i}`),t}getSort(){return this._sort}sort(t){return new K(this.name,this.expression,this.granularity,this._format,this.description,t,this.dataSource,this.composeCode,void 0,this.indexed,this.merged)}getFormat(){return this._format}format(t){return new K(this.name,this.expression,this.granularity,t,this.description,this._sort,this.dataSource,this.composeCode,void 0,this.indexed,this.merged)}setGranularity(t){return new K(this.name,this.expression,t,this._format,this.description,this._sort,this.dataSource,this.composeCode,void 0,this.indexed,this.merged)}serialize(){const t=super.serialize();return t.granularity=this.granularity,this.getFormat()!==void 0&&(t.format=this.getFormat()),t}jaql(t){const n={jaql:Object.assign({title:this.name,dim:this.expression,datatype:Cr(this.type)},this.translateGranularityToJaql())};if(this.panel&&(n.panel=this.panel),this._format!==void 0){const r=n.jaql.dateTimeLevel||n.jaql.level;n.format={mask:{}},n.format.mask[r]=this._format}return this._sort!=exports.Sort.None&&(n.jaql.sort=this._sort==exports.Sort.Ascending?"asc":"desc"),t===!0?n.jaql:n}translateGranularityToJaql(){const t="minutes",n="seconds";switch(this.granularity){case g.Years:case g.Quarters:case g.Months:case g.Weeks:case g.Days:return{level:this.granularity.toLowerCase()};case g.Hours:return{dateTimeLevel:t,bucket:"60"};case g.MinutesRoundTo30:return{dateTimeLevel:t,bucket:"30"};case g.MinutesRoundTo15:return{dateTimeLevel:t,bucket:"15"};case g.Minutes:return{dateTimeLevel:t,bucket:"1"};case g.Seconds:return{dateTimeLevel:n,bucket:"0"};case g.AggHours:return{level:t,bucket:"60"};case g.AggMinutesRoundTo30:return{level:t,bucket:"30"};case g.AggMinutesRoundTo15:return{level:t,bucket:"15"};case g.AggMinutesRoundTo1:return{level:t,bucket:"1"};default:return console.warn("Unsupported level"),{level:this.granularity}}}static translateJaqlToGranularity(t){const n=r=>(console.warn("Unsupported granularity",r),r);if(t.dateTimeLevel){if(t.dateTimeLevel!=="minutes"&&t.dateTimeLevel!=="seconds")return n(t.dateTimeLevel);switch(t.bucket){case"60":return g.Hours;case"30":return g.MinutesRoundTo30;case"15":return g.MinutesRoundTo15;case"1":return g.Minutes;case"0":return g.Seconds;default:return n(t.dateTimeLevel)}}switch(t.level){case"years":return g.Years;case"quarters":return g.Quarters;case"months":return g.Months;case"weeks":return g.Weeks;case"days":return g.Days;case"minutes":switch(t.bucket){case"60":return g.AggHours;case"30":return g.AggMinutesRoundTo30;case"15":return g.AggMinutesRoundTo15;case"1":return g.AggMinutesRoundTo1;default:return n(t.level)}default:return n(t.level)}}static getDefaultFormatForGranularity(t){switch(t){case g.Years:return"yyyy";case g.Quarters:return"Q yyyy";case g.Months:return"yyyy-MM";case g.Weeks:return"ww yyyy";case g.Days:return"yyyy-MM-dd";case g.Hours:return"yyyy-MM-dd HH:mm";case g.MinutesRoundTo30:return"yyyy-MM-dd HH:mm";case g.MinutesRoundTo15:return"yyyy-MM-dd HH:mm";case g.Minutes:return"yyyy-MM-dd HH:mm";case g.Seconds:return"yyyy-MM-dd HH:mm:ss";case g.AggHours:return"HH:mm";case g.AggMinutesRoundTo30:return"HH:mm";case g.AggMinutesRoundTo15:return"HH:mm";case g.AggMinutesRoundTo1:return"HH:mm";default:return""}}}const Hh=e=>!!(e&&e.__serializable==="DimensionalLevelAttribute");function zh(e){return e.granularity?kh(e):new we(e.name||e.title,e.attribute||e.expression||e.dim,e.type,e.desc||e.description,e.sort,e.dataSource,void 0,void 0,e.indexed,e.merged)}function kh(e){return new K(e.name||e.title,e.attribute||e.expression||e.dim,e.granularity,e.format,e.desc||e.description,e.sort,e.dataSource,void 0,void 0,e.indexed,e.merged)}function qh(e,t,n,r){return(r.length>0?r+".":"")+ue(e)+"."+ue(t)+(n&&n.length>0?"."+n:"")}function Wh(e){return"granularity"in e}function Gh(e){return"attribute"in e}function Qh(e){return"measure"in e}const Eo={rows:!1,columns:!1};function Or(e){return typeof e=="string"&&["sortAsc","sortDesc","sortNone"].includes(e)}function xt(e){return!!e&&"operator"in e&&(e.operator==="AND"||e.operator==="OR")&&!!e.right&&!!e.left}function Vh(e=[],t=[]){if(!xt(e)&&!xt(t))return vn(e,t);const{filters:n,relations:r}=xr(e),i=_o(t),s=vn(n,i),o=Oo(n,r,s);return Co(s,o)}function xr(e){if(!e)return{filters:[],relations:null};if(L(e))return{filters:e,relations:null};const t=new Set;function n(i){if(wo(i))return t.add(i),{instanceid:i.config.guid};if(xt(i)){const s=n(i.left),o=n(i.right);return{left:s,right:o,operator:i.operator}}throw new Xt}const r=n(e);return{filters:Array.from(t),relations:r}}function _o(e){return e?xr(e).filters:[]}function Co(e,t){if(!t||wr(t))return e;const n=r(t);return wo(n)?[n]:n;function r(i){if(Yt(i))return e.find(s=>s.config.guid===i.instanceid);if(Jt(i))return(i.operator==="AND"?exports.logic.and:exports.logic.or)(r(i.left),r(i.right));throw new Xt}}function wr(e){return!!e&&"instanceid"in e}function Oo(e,t,n,r={}){if(t===null)return null;const i=Kh(e,n,r.shouldReplaceSameAttributeFilters);return i.length===0?t:i.reduce((s,o)=>{switch(o.type){case"add":return Yh(o.payload,s);case"remove":return An(o.payload,s);case"replace":return xo(s,o.payload.prevFilter,o.payload.newFilter)}},t)}function un(e,t){return e.config.guid===t.config.guid}function xo(e,t,n){if(!e)return null;return i(e);function i(s){if(Yt(s))return s.instanceid===t.config.guid?{instanceid:n.config.guid}:s;if(Jt(s))return{left:i(s.left),right:i(s.right),operator:s.operator};throw new Xt}}function Kh(e,t,n=!1){const r=[],i=new Set,s=new Set;return n&&e.forEach((o,a)=>{if(o.config.disabled)return;const u=t.findIndex((l,f)=>!s.has(f)&&!un(o,l)&&Ce(o)===Ce(l));u!==-1&&(r.push({type:"replace",payload:{prevFilter:o,newFilter:t[u]}}),i.add(a),s.add(u))}),e.forEach((o,a)=>{if(i.has(a))return;t.some(l=>un(o,l))||r.push({type:"remove",payload:o})}),t.forEach((o,a)=>{if(s.has(a))return;e.some(l=>un(o,l))||r.push({type:"add",payload:o})}),r}function Yh(e,t){return t?{left:t,right:{instanceid:e.config.guid},operator:"AND"}:{instanceid:e.config.guid}}function An(e,t){if(!t)return null;if(wr(t))return t.instanceid===e.config.guid?null:t;const n=An(e,t.left),r=An(e,t.right);return n===null&&r?r:r===null&&n?n:n===null&&r===null?null:{left:n,right:r,operator:t.operator}}function Jh(e,t){if(!e)return null;function n(r){if(Xh(r))return{instanceid:r.instanceId};if(Zh(r))return n(r.value);if(ep(r))return{operator:r.operator,left:n(r.left),right:n(r.right)};if(tp(r)){const i=t.find(s=>{if(!tt(s))return!1;const o=s.filters.map(a=>a.config.guid);return r.levels.every(a=>o.includes(a.instanceId))});if(i)return{instanceid:i.config.guid};throw new Error("Broken filter relations model. Cascading filter not found.")}throw new Error("Broken filter relations model. Unknown node type.")}return n(e)}function Xh(e){return"instanceId"in e}function Zh(e){return"value"in e}function ep(e){return"operator"in e}function tp(e){return"levels"in e&&L(e.levels)}function Yt(e){return"instanceid"in e}function Jt(e){return"operator"in e}function wo(e){return"config"in e&&"guid"in e.config}function np(e,t){if(!e)return;function n(r){if(Yt(r)){const i=t.find(s=>s.config.guid===r.instanceid);return i&&tt(i)?{type:"CascadingIdentifier",levels:i.filters.map(o=>({type:"Identifier",instanceId:o.config.guid}))}:{type:"Identifier",instanceId:r.instanceid}}else{if(Jt(r))return{type:"LogicalExpression",operator:r.operator,left:n(r.left),right:n(r.right)};throw new Error("Unknown node type in filter relations rules.")}}return n(e)}function rp(e,t){return e.find(n=>n.config.guid===t)}class Xt extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function ip(e){return e.nodeType==="openBracket"}function sp(e){return e.nodeType==="closeBracket"}function op(e){return e.nodeType==="attribute"}function ap(e){return e.nodeType==="operator"}function Ce(e){if(tt(e))return e.filters.map(Ce).join("-");const{attribute:t}=e,n=e.jaql().jaql,r=t.expression||n.dim,i=t.granularity||((n==null?void 0:n.datatype)==="datetime"?K.translateJaqlToGranularity(n):"");return`${r}${i}`}function vn(e=[],t=[]){const n=[...e];return t.forEach(r=>{const i=n.findIndex(o=>Ce(r)===Ce(o));i!==-1?n[i]=r:n.push(r)}),n}function up(e){if(!e)return e;const t=$n(e);function n(r){if("instanceId"in r)return{instanceid:r.instanceId};if("value"in r)return n(r.value);if("operator"in r){const i={operator:r.operator};return"left"in r&&(i.left=n(r.left)),"right"in r&&(i.right=n(r.right)),i}return r}return n(t)}const No=["polar"],Nr=["line","area","bar","column","streamgraph",...No],Rr=["pie","funnel","treemap","sunburst"],Fr=["scatter"],Ro=["table"],Fo=["indicator"],Mr=["boxplot"],Mo=["areamap"],lp=["image"],Do=["scattermap"],Lo=["calendar-heatmap"],Dr=["arearange"],cp=e=>Nr.find(t=>t===e)!==void 0,fp=e=>Rr.find(t=>t===e)!==void 0,dp=e=>Fr.find(t=>t===e)!==void 0,gp=e=>Do.find(t=>t===e)!==void 0,hp=e=>Fo.find(t=>t===e)!==void 0,pp=e=>No.find(t=>t===e)!==void 0,mp=e=>Ro.find(t=>t===e)!==void 0,bp=e=>Mr.find(t=>t===e)!==void 0,yp=e=>Mo.find(t=>t===e)!==void 0,Tp=e=>Dr.find(t=>t===e)!==void 0,Sp=e=>Lo.find(t=>t===e)!==void 0,Ap=[...Nr,...Rr,...Fr,...Ro,...Fo,...Mr,...Mo,...lp,...Do,...Lo,...Dr];class st extends On{constructor(t,n){super(cn.PACKAGE_NAMESPACE,{key:t,interpolationOptions:n},Wi.t)}}const M=[];for(let e=0;e<256;++e)M.push((e+256).toString(16).slice(1));function vp(e,t=0){return(M[e[t+0]]+M[e[t+1]]+M[e[t+2]]+M[e[t+3]]+"-"+M[e[t+4]]+M[e[t+5]]+"-"+M[e[t+6]]+M[e[t+7]]+"-"+M[e[t+8]]+M[e[t+9]]+"-"+M[e[t+10]]+M[e[t+11]]+M[e[t+12]]+M[e[t+13]]+M[e[t+14]]+M[e[t+15]]).toLowerCase()}let ln;const Ep=new Uint8Array(16);function _p(){if(!ln){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ln=crypto.getRandomValues.bind(crypto)}return ln(Ep)}const Cp=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$i={randomUUID:Cp};function Op(e,t,n){var i,s,o;e=e||{};const r=(o=(s=e.random)!=null?s:(i=e.rng)==null?void 0:i.call(e))!=null?o:_p();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,vp(r)}function Lr(e,t,n){return $i.randomUUID&&!t&&!e?$i.randomUUID():Op(e)}function xp(e,t){const n=t==null?void 0:t.find(r=>Io(e)===r.attribute.id);return n&&!n.config.disabled&&(n.isScope&&(n.isScope=!1),e.jaql.in={selected:n.jaql()}),e}function wp(e,t){const n=[],r=[];return t.forEach(i=>{e.some(o=>Io(o)===i.attribute.id)?n.push(i):r.push(i)}),[n,r]}function Io(e){const{dim:t,level:n,dateTimeLevel:r,bucket:i}=e.jaql;let s=`${t}`;return(n||r)&&(s+=`_${n||r}`),i&&(s+=`_${i}`),s}var Np=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Rp(e,t,n){return{rowsCount:e.length,columnsCount:t.length,measuresCount:n.length}}function Fp(e){switch(e){case"sortAsc":return"asc";case"sortDesc":return"desc";default:return"none"}}function Mp(e,t,n){var r,i;const s=Fp(e.direction),o=t===n.rowsCount-1,a={dir:s,initialized:!0,field:e.by&&"valuesIndex"in e.by?n.rowsCount+n.columnsCount+e.by.valuesIndex:t};return o&&(a.sortingLastDimension=!0),!((i=(r=e.by)===null||r===void 0?void 0:r.columnsMembersPath)===null||i===void 0)&&i.length&&(a.measurePath=e.by.columnsMembersPath.reduce((u,l,f)=>Object.assign(Object.assign({},u),{[n.rowsCount+f]:l}),{})),{sort:s,sortDetails:a}}function Dp(e,t){if(t.rowsCount===0)return;const n=t.rowsCount-1,r=e[n],i=r.jaql,{sortDetails:s,sort:o}=i,a=Np(i,["sortDetails","sort"]);if(s&&s.field!==n&&s.field<e.length){const l=e[s.field];l.jaql.sortDetails=s,l.jaql.sort=o,r.jaql=a}}const pt="ComposeSDK";function Po(e,t){const{attributes:n,measures:r,filters:i,filterRelations:s,highlights:o,dataSource:a,count:u,offset:l,ungroup:f}=e,d=f&&r.length===0,c=Object.assign({metadata:Ip({attributes:n,measures:r,filters:i,filterRelations:s,highlights:o},t)},Pp(a,u,l,d));return s?Object.assign(Object.assign({},c),{filterRelations:s}):c}function $o(e,t,n,r,i){const[s,o]=wp(e,r);e.forEach(l=>xp(l,s));const a=l=>{const f=l.jaql();return n?Array.isArray(f)?f.map(d=>Object.assign(Object.assign({},d),{instanceid:l.config.guid})):Object.assign(Object.assign({},f),{instanceid:l.config.guid}):f},u=(i?t.flatMap(l=>a(l)):[...t,...o].flatMap(l=>a(l))).filter(l=>Object.keys(l.jaql.filter||{}).length!==0);return i&&o.length>0&&console.warn(`The following highlight filters were not applied due to missing attributes: [${o.map(l=>l.attribute.name).join(", ")}].`),u}function Lp(e){var t,n;const r=(t=e.jaql)===null||t===void 0?void 0:t.formula;if(!r||!r.includes("trend")&&!r.includes("forecast"))return e;const i=structuredClone(e),s=(n=i.jaql)===null||n===void 0?void 0:n.context;if(s)for(const o in s){const a=s[o];a.datatype==="text"&&a.agg==="count"&&(a.datatype="numeric")}return i}function Ip(e,t){const{attributes:n,measures:r,filters:i,filterRelations:s,highlights:o}=e,a=n.map(f=>f.jaql()),u=r.map(f=>Lp(f.jaql())),l=$o(a,i,s,o,t);return[...a,...u,...l]}function Pp(e,t,n,r){return Object.assign(Object.assign(Object.assign({datasource:vr(e),by:pt,queryGuid:Lr()},r?{ungroup:!0}:{}),t?{count:t}:{}),n?{offset:n}:{})}function $p(e,t){const{rowsAttributes:n,columnsAttributes:r,measures:i,filters:s,filterRelations:o,grandTotals:a,highlights:u,dataSource:l,count:f,offset:d}=e,c=Object.assign({metadata:Up({rowsAttributes:n,columnsAttributes:r,measures:i,filters:s,highlights:u,filterRelations:o},t)},Bp(l,a,f,d));return o?Object.assign(Object.assign({},c),{filterRelations:o}):c}function ji(e,t,n,r){if(Gh(e)){const i=t==="rows"&&e.sort&&e.sort.direction!=="sortNone",s=Object.assign(Object.assign({},e.attribute.jaql(!0)),i?Mp(e.sort,n,r):{});e.name&&(s.title=e.name);const o={jaql:s,panel:t,field:{index:n,id:`${t}-${n}`}};return e.includeSubTotals&&(o.format={subtotal:!0}),o}else return{jaql:e.jaql(!0),panel:t,field:{index:n,id:`${t}-${n}`}}}function jp(e,t,n){const r={index:n,id:`${t}-${n}`};if(Qh(e)){const s=e.measure.jaql();return Object.assign(Object.assign({},s),{jaql:Object.assign(Object.assign({},s.jaql),{subtotalAgg:e.totalsCalculation,datatype:"numeric"}),format:Object.assign(Object.assign(Object.assign({},s.format),{databars:e.dataBars||!1}),e.shouldRequestMinMax&&{color:{type:"range"}}),panel:t,field:r})}const i=e.jaql();return Object.assign(Object.assign({},i),{jaql:Object.assign(Object.assign({},i.jaql),{datatype:"numeric"}),panel:t,field:r})}function Up(e,t){const{rowsAttributes:n,columnsAttributes:r,measures:i,filters:s,filterRelations:o,highlights:a}=e,u=Rp(n,r,i);let l=0;const f=n.map((m,E)=>ji(m,"rows",E+l,u));l=l+n.length;const d=r.map((m,E)=>ji(m,"columns",E+l,u));l=l+r.length;const c=[...f,...d],p=i.map((m,E)=>jp(m,"measures",E+l)),h=$o(c,s,o,a,t),y=[...c,...p,...h];return Dp(y,u),y}function Bp(e,t,n,r){return Object.assign(Object.assign(Object.assign({datasource:vr(e),by:pt,queryGuid:Lr(),dashboard:pt,widget:pt,format:"pivot"},n?{count:n}:{}),r?{offset:r}:{}),{grandTotals:Object.assign(Object.assign({},Eo),t)})}function Hp(e){return"value"in e}function zp(e){return"valuePromise"in e}const kp=(e,t)=>{const n=new Map;return{withCache:s=>(...o)=>kr(exports,null,function*(){const a=e(...o);if(n.has(a)){const u=n.get(a);if(Hp(u))return u.value;if(zp(u))return u.valuePromise;throw new st("errors.unexpectedCacheValue")}else{const u=s(...o);return n.set(a,{valuePromise:u,createdAt:new Date}),u.then(l=>(n.set(a,{value:l,createdAt:new Date}),t!=null&&t.cacheMaxSize&&n.size>t.cacheMaxSize&&qp(n),l))}}),clearCache:s=>{if(s){n.delete(s);return}n.clear()}}};function qp(e){const t=Array.from(e.keys()),n=t.reduce((r,i)=>{const s=e.get(i),o=e.get(r);return s.createdAt<o.createdAt?i:r},t[0]);e.delete(n)}const Zt=(e,t)=>{const{dataSource:n,dimensions:r=[],measures:i=[],filters:s=[],filterRelations:o,highlights:a=[],count:u,offset:l,ungroup:f}=e;s&&s.forEach(c=>c.isScope=!0),a&&a.forEach(c=>c.isScope=!0);const d=n||t;if(!d)throw new st("errors.executeQueryNoDataSource");return{dataSource:d,attributes:r,measures:i,filters:s,filterRelations:o,highlights:a,count:u,offset:l,ungroup:f}};function jo(e,t,n){const r=Zt(e,t==null?void 0:t.defaultDataSource);return t.queryClient.executeQuery(r,n).resultPromise.catch(i=>{throw i.message.includes("SecondsLevelIsNotSupportedException")?new st("errors.secondsDateTimeLevelIsNotSupported"):i})}const Wp=(e,t,n)=>{const r=Zt(e,t==null?void 0:t.defaultDataSource);return t.queryClient.executeCsvQuery(r,n).resultPromise},Gp=(e,t,n)=>{const{dataSource:r,rows:i=[],columns:s=[],values:o=[],grandTotals:a={},filters:u=[],filterRelations:l,highlights:f=[],count:d,offset:c}=e;u&&u.forEach(h=>h.isScope=!0),f&&f.forEach(h=>h.isScope=!0);const p=r||(t==null?void 0:t.defaultDataSource);if(!p)throw new st("errors.executeQueryNoDataSource");return t.queryClient.executePivotQuery({dataSource:p,rowsAttributes:i,columnsAttributes:s,measures:o,grandTotals:a,filters:u,filterRelations:l,highlights:f,count:d,offset:c},n).resultPromise},Qp=e=>JSON.stringify(U(b({},Po(e,!1)),{queryGuid:""})),Uo=(e,t)=>{const n=Zt(e,t==null?void 0:t.defaultDataSource);return Qp(n)},Vp=250,{withCache:Kp,clearCache:Yp}=kp(Uo,{cacheMaxSize:Vp}),Jp=Kp(jo),Xp=Yp,Ir="$trend",Pr="$forecast";function Zp(e){return typeof e=="object"&&e!==null&&"sort"in e&&"getSort"in e}function em(e){return typeof e=="object"&&e!==null&&"composeCode"in e&&"sort"in e}function tm(e){const r=e,{column:t}=r,n=en(r,["column"]);if(!Zp(t))throw new Error("Narrative styled dimensions require dimensional Attribute instances (data model columns).");return{attribute:t,style:n}}function nm(e){const r=e,{column:t}=r,n=en(r,["column"]);if(!em(t))throw new Error("Narrative styled measures require dimensional Measure instances (e.g. from measureFactory).");return{measure:t,style:n}}function rm(e){return e.map(({attribute:t,style:n})=>{const r=n==null?void 0:n.sortType;if(!r)return t;const i=typeof r=="object"?r.direction:r;return Or(i)?t.sort(Er(i)):t})}function im(e){var t,n,r,i;return((n=(t=e.composeCode)==null?void 0:t.includes("measureFactory.trend"))!=null?n:!1)||((i=(r=e.name)==null?void 0:r.startsWith(Ir))!=null?i:!1)}function sm(e){var t,n,r,i;return((n=(t=e.composeCode)==null?void 0:t.includes("measureFactory.forecast"))!=null?n:!1)||((i=(r=e.name)==null?void 0:r.startsWith(Pr))!=null?i:!1)}function om(e,t){var i,s,o;const n=(i=t==null?void 0:t.ignoreTrendAndForecast)!=null?i:!1,r=[];for(const{measure:a,style:u}of e){const l=u==null?void 0:u.sortType,f=l&&Or(l)?a.sort(Er(l)):a;r.push(f),!n&&(u!=null&&u.trend)&&!im(a)&&r.push(Yn(a,`${Ir}_${(s=a.name)!=null?s:"Measure"}`,u.trend)),!n&&(u!=null&&u.forecast)&&!sm(a)&&r.push(Jn(a,`${Pr}_${(o=a.name)!=null?o:"Measure"}`,u.forecast))}return r}exports.ALL_CHART_TYPES=Ap;exports.AbstractTranslatableError=On;exports.AggregationTypes=A;exports.BOXPLOT_CHART_TYPES=Mr;exports.CARTESIAN_CHART_TYPES=Nr;exports.CATEGORICAL_CHART_TYPES=Rr;exports.CascadingFilter=Vs;exports.CustomFilter=Zs;exports.DATA_MODEL_MODULE_NAME=Gn;exports.DEFAULT_PIVOT_GRAND_TOTALS=Eo;exports.DateLevels=g;exports.DateOperators=Ee;exports.DateRangeFilter=Xs;exports.DimensionalAttribute=we;exports.DimensionalBaseMeasure=le;exports.DimensionalCalculatedMeasure=Y;exports.DimensionalElement=$t;exports.DimensionalLevelAttribute=K;exports.DimensionalMeasureTemplate=Ot;exports.ExcludeFilter=Ks;exports.FORECAST_PREFIX=Pr;exports.FilterTypes=j;exports.LogicalAttributeFilter=nr;exports.MeasureFilter=Ys;exports.MeasureRankingFilter=ir;exports.MembersFilter=Qs;exports.MetadataTypes=v;exports.NumericFilter=Js;exports.NumericOperators=R;exports.RANGE_CHART_TYPES=Dr;exports.RankingFilter=rr;exports.RankingOperators=et;exports.RelativeDateFilter=Wt;exports.SCATTER_CHART_TYPES=Fr;exports.Set=vt;exports.SetCache=ze;exports.TREND_PREFIX=Ir;exports.TextFilter=Z;exports.TextOperators=X;exports.TranslatableError=st;exports.UnknownRelationsNodeError=Xt;exports.WeakMap=Et;exports.adaptDimensionsForQuery=rm;exports.adaptMeasuresForQuery=om;exports.apply=Ns;exports.arrayEach=Ki;exports.arrayMap=Bn;exports.assignValue=xn;exports.baseAssignValue=Qe;exports.baseClone=Se;exports.baseCreate=as;exports.baseFlatten=$s;exports.baseForOwn=gs;exports.baseGet=It;exports.baseGetTag=ie;exports.baseIsEqual=Je;exports.baseIteratee=vs;exports.baseRest=Ds;exports.baseSlice=Ps;exports.baseToString=Hn;exports.baseUnary=Dt;exports.between=We;exports.bottomRanking=Tr;exports.cacheHas=hs;exports.calculateNewRelations=Oo;exports.cascading=fo;exports.castPath=Xe;exports.clearExecuteQueryCache=Xp;exports.cloneDeep=$n;exports.combineFiltersAndRelations=Co;exports.constant=Fs;exports.contains=ur;exports.convertDataSource=Dh;exports.convertFilterRelationsModelToJaql=up;exports.convertFilterRelationsModelToRelationRules=Jh;exports.convertJaqlDataSource=vr;exports.convertJaqlDataSourceForDto=Lh;exports.convertSortDirectionToSort=Er;exports.convertSortToSortDirection=Ih;exports.copyArray=Fn;exports.countDistinct=zt;exports.createAttribute=zh;exports.createAttributeHelper=Vt;exports.createCalculatedMeasureHelper=_r;exports.createDimensionalElementFromJaql=vo;exports.createExecuteQueryCacheKey=Uo;exports.createFilterFromJaql=Ao;exports.createMeasureHelper=Kt;exports.customFormula=Qn;exports.dateRange=rt;exports.dateRelative=ro;exports.dateRelativeFrom=br;exports.dateRelativeTo=pe;exports.doesntContain=sr;exports.doesntEndWith=or;exports.doesntEqual=fr;exports.doesntStartWith=ar;exports.endsWith=lr;exports.equals=dr;exports.escapeSingleQuotes=ki;exports.exclude=Gt;exports.executeCsvQuery=Wp;exports.executePivotQuery=Gp;exports.executeQuery=jo;exports.executeQueryWithCache=Jp;exports.filterFactory=Mg;exports.filterRelationRulesToFilterRelationsModel=np;exports.findFilterByGuid=rp;exports.flatRest=js;exports.forecast=Jn;exports.get=Ss;exports.getAllKeysIn=In;exports.getColumnNameFromAttribute=$h;exports.getDataSourceName=Mh;exports.getDefaults=Yo;exports.getFilterCompareId=Ce;exports.getFilterListAndRelationsJaql=Rh;exports.getFiltersArray=_o;exports.getGranularityFromJaql=_e;exports.getI18n=Xo;exports.getJaqlQueryPayload=Po;exports.getPivotJaqlQueryPayload=$p;exports.getRelationsWithReplacedFilter=xo;exports.getSelectedConditionOption=Qt;exports.getSortType=jh;exports.getTableNameFromAttribute=Ph;exports.greaterThan=gr;exports.greaterThanOrEqual=hr;exports.hasIn=As;exports.i18nextInstance=Wi;exports.identity=Pt;exports.initI18next=Cn;exports.initializeI18n=qi;exports.isAreamap=yp;exports.isArray=L;exports.isArrayLike=Ve;exports.isArrayLikeObject=Os;exports.isAttributeDescriptionNode=op;exports.isBoolean=po;exports.isBoxplot=bp;exports.isCalendarHeatmap=Sp;exports.isCartesian=cp;exports.isCascadingFilter=tt;exports.isCategorical=fp;exports.isCloseBracketDescriptionNode=sp;exports.isConditionFilter=yo;exports.isCustomFilter=gg;exports.isDataSourceInfo=Ar;exports.isDateRangeFilter=Eg;exports.isDatetime=it;exports.isDimensionalAttribute=Bh;exports.isDimensionalBaseMeasure=Zn;exports.isDimensionalCalculatedMeasure=er;exports.isDimensionalLevelAttribute=Hh;exports.isDimensionalMeasureTemplate=fg;exports.isEqual=qs;exports.isExcludeFilter=Tg;exports.isFilterRelations=xt;exports.isFunction=Rt;exports.isIndex=Mt;exports.isIndicator=hp;exports.isIterateeCall=Ls;exports.isLevelAttribute=Wh;exports.isLogicalAttributeFilter=Sg;exports.isMeasureFilter=yg;exports.isMeasureRankingFilter=bg;exports.isMembersFilter=hg;exports.isNumber=Sr;exports.isNumericFilter=pg;exports.isObject=J;exports.isObjectLike=k;exports.isOpenBracketDescriptionNode=ip;exports.isOperatorDescriptionNode=ap;exports.isPlainObject=kn;exports.isPolar=pp;exports.isRange=Tp;exports.isRankingFilter=mg;exports.isRelationsRule=Jt;exports.isRelationsRuleIdNode=Yt;exports.isRelativeDateFilter=Ag;exports.isScatter=dp;exports.isScattermap=gp;exports.isSortDirection=Or;exports.isSpecificItemsFilter=bo;exports.isSymbol=Lt;exports.isTable=mp;exports.isText=ho;exports.isTextFilter=vg;exports.isTrivialSingleNodeRelations=wr;exports.jaqlSimpleColumnType=Cr;exports.last=Is;exports.lessThan=pr;exports.lessThanOrEqual=mr;exports.like=no;exports.max=Ht;exports.measureFactory=cg;exports.members=nt;exports.merge=Wn;exports.mergeFilters=vn;exports.mergeFiltersOrFilterRelations=Vh;exports.min=Bt;exports.nodeUtil=fe;exports.normalizeAttributeName=qh;exports.normalizeName=ue;exports.omit=Us;exports.parseExpression=me;exports.prepareQueryParams=Zt;exports.root=W;exports.setToArray=ms;exports.setToString=qn;exports.shortOut=Ms;exports.simpleColumnType=mo;exports.simplifyFilterConfig=tr;exports.splitFiltersAndRelations=xr;exports.startsWith=cr;exports.toDimensionQueryAdaptItem=tm;exports.toKey=xe;exports.toMeasureQueryAdaptItem=nm;exports.toString=Ts;exports.topRanking=yr;exports.trend=Yn;exports.v4=Lr;exports.withComposeCodeForAnalytics=Ld;exports.wrapIfNeedsNormalization=qe;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type FunctionComponent } from 'react';
|
|
2
|
-
import { TableWidgetProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* The TableWidget component extending the Table component to support widget style options.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* Example of using the `Widget` component to
|
|
8
|
-
* plot a bar chart of the `Sample ECommerce` data source hosted in a Sisense instance.
|
|
9
|
-
* Drill-down capability is enabled.
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <TableWidget
|
|
12
|
-
* dataSource={DM.DataSource}
|
|
13
|
-
* dataOptions={{
|
|
14
|
-
* columns: [DM.Category.Category]
|
|
15
|
-
* }}
|
|
16
|
-
* />
|
|
17
|
-
* ```
|
|
18
|
-
* @param props - Table Widget properties
|
|
19
|
-
* @returns Widget component representing a table
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
export declare const TableWidget: FunctionComponent<TableWidgetProps>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
-
import { TableDataOptions } from '../../../../domains/visualizations/core/chart-data-options/types';
|
|
4
|
-
import { TableWidgetStyleOptions } from '../../../../types';
|
|
5
|
-
/**
|
|
6
|
-
* Props for the {@link TableWidget} component
|
|
7
|
-
*
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export interface TableWidgetProps {
|
|
11
|
-
/**
|
|
12
|
-
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
13
|
-
*
|
|
14
|
-
* If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
15
|
-
*
|
|
16
|
-
* @category Data
|
|
17
|
-
*/
|
|
18
|
-
dataSource?: DataSource;
|
|
19
|
-
/**
|
|
20
|
-
* Filters that will slice query results
|
|
21
|
-
*
|
|
22
|
-
* @category Data
|
|
23
|
-
*/
|
|
24
|
-
filters?: Filter[] | FilterRelations;
|
|
25
|
-
/**
|
|
26
|
-
* Configurations for how to interpret and present the data passed to the table
|
|
27
|
-
*
|
|
28
|
-
* @category Chart
|
|
29
|
-
*/
|
|
30
|
-
dataOptions: TableDataOptions;
|
|
31
|
-
/**
|
|
32
|
-
* Style options for both the table and widget including the widget header
|
|
33
|
-
*
|
|
34
|
-
* @category Widget
|
|
35
|
-
*/
|
|
36
|
-
styleOptions?: TableWidgetStyleOptions;
|
|
37
|
-
/**
|
|
38
|
-
* React nodes to be rendered at the top of component, before the table
|
|
39
|
-
*
|
|
40
|
-
* @category Widget
|
|
41
|
-
*/
|
|
42
|
-
topSlot?: ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* React nodes to be rendered at the bottom of component, after the table
|
|
45
|
-
*
|
|
46
|
-
* @category Widget
|
|
47
|
-
*/
|
|
48
|
-
bottomSlot?: ReactNode;
|
|
49
|
-
/**
|
|
50
|
-
* Title of the widget
|
|
51
|
-
*
|
|
52
|
-
* @category Widget
|
|
53
|
-
*/
|
|
54
|
-
title?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Description of the widget
|
|
57
|
-
*
|
|
58
|
-
* @category Widget
|
|
59
|
-
*/
|
|
60
|
-
description?: string;
|
|
61
|
-
}
|