"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=e=>e==null?void 0:e.map(t=>{const a=t.group.label;debugger;return t.label.includes(a)?t:{...t,label:`${t.label}`}}),l=e=>{const{metadata:r}=e||{},t={},a=u((r==null?void 0:r.measures)||[]);return r&&a.forEach(n=>{t[n.value]=n}),t},c=e=>{const{metadata:r}=e||{},t={};return r&&r.types.forEach(a=>{t[a.dimension]={dimension:a.dimension,category:a.category,items:a.items}}),t},p=(e,r)=>e?e.labels&&e.labels[r.toUpperCase()]?e.labels[r.toUpperCase()]:e.label?e.label:e.value:null,i=(e,r,t,a)=>new Intl.Collator(r,{caseFirst:"upper",numeric:!0,sensitivity:"variant"}).compare(e?a:t,e?t:a),m=(e,r,t)=>!isNaN(r)&&!isNaN(t)?e?Number(t)-Number(r):Number(r)-Number(t):0,o=e=>{const[r,t]=e.split(" "),n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].indexOf(r),s=parseInt(t,10);return(n===-1||isNaN(s))&&console.error(`Invalid month/year format: ${e}`),new Date(s,n,1)},N=(e,r,t)=>{let a=Date.parse(r),n=Date.parse(t);return isNaN(a)&&(a=o(r)),isNaN(n)&&(n=o(t)),!isNaN(a)&&!isNaN(n)?e?n-a:a-n:0};exports.alphaSort=i;exports.dateSort=N;exports.getTranslatedValue=p;exports.measuresMap=l;exports.numericSort=m;exports.typesMap=c;
