@epam/statgpt-sdmx-toolkit 0.4.0-rc.32 → 0.4.0-rc.34

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/index.mjs CHANGED
@@ -61,24 +61,26 @@ class La {
61
61
  constructor(e) {
62
62
  this.client = e;
63
63
  }
64
- async getConstraints(e, n) {
65
- const { agency: r, id: s, version: a } = H(e), o = {
64
+ async getConstraints(e, n, r) {
65
+ const { agency: s, id: a, version: o } = H(e), c = {
66
66
  filters: n || [],
67
67
  mode: Ze.AVAILABLE,
68
68
  references: ue.NONE
69
- }, i = Rt(r, s, a);
69
+ }, i = Rt(s, a, o);
70
70
  if (this.client.config.sdmxProxyUrl) {
71
- const c = await this.client.postRequest(
71
+ const u = await this.client.postRequest(
72
72
  i,
73
- { body: o },
74
- this.client.config.sdmxProxyUrl
73
+ { body: c },
74
+ this.client.config.sdmxProxyUrl,
75
+ r
75
76
  );
76
- return vt(c);
77
+ return vt(u);
77
78
  }
78
79
  return await this.client.postRequest(
79
80
  i,
80
- { body: o },
81
- this.client.config.constrainsApiUrl || this.client.config.apiUrl
81
+ { body: c },
82
+ this.client.config.constrainsApiUrl || this.client.config.apiUrl,
83
+ r
82
84
  );
83
85
  }
84
86
  }
@@ -106,38 +108,44 @@ const Yt = (t, e) => {
106
108
  }, B = (t, e) => `${t}; labels=${e}`;
107
109
  var et = /* @__PURE__ */ ((t) => (t.REFERENCE_PARTIAL = "referencepartial", t.FULL = "full", t))(et || {});
108
110
  const Ct = "all", Lt = "sdmx/3.0/data/dataflow", tt = "&", Re = ":", St = "=", Wt = "+", Sa = ",", $t = "*", _e = (t, e, n) => {
109
- const { filterKey: r, timeFilter: s } = n, { agency: a, id: o, version: i } = H(t), c = [s || "", e].filter((d) => !!d).join(tt);
110
- return `${`${Lt}/${a}/${o}/${i}`}/${r || $t}?${c}`;
111
+ const { filterKey: r, timeFilter: s } = n, { agency: a, id: o, version: c } = H(t), i = [s || "", e].filter((d) => !!d).join(tt);
112
+ return `${`${Lt}/${a}/${o}/${c}`}/${r || $t}?${i}`;
111
113
  }, qt = (t = "", e = "", n = "", r = ue.DESCENDANTS) => `sdmx/3.0/structure/dataflow/${t}/${e}/${n}?references=${r}&detail=${et.REFERENCE_PARTIAL}`;
112
114
  class Wa {
113
115
  constructor(e) {
114
116
  this.client = e;
115
117
  }
116
- async getDataSet(e, n) {
117
- const { agency: r, id: s, version: a } = H(e);
118
+ async getDataSet(e, n, r) {
119
+ const { agency: s, id: a, version: o } = H(e);
118
120
  return await this.client.getRequest(
119
- qt(r, s, a, n)
121
+ qt(s, a, o, n),
122
+ void 0,
123
+ r
120
124
  );
121
125
  }
122
- async getDatasetData(e, n) {
123
- const r = new URLSearchParams({
126
+ async getDatasetData(e, n, r) {
127
+ const s = new URLSearchParams({
124
128
  includeHistory: "false",
125
129
  limit: "1000",
126
130
  attributes: Ct,
127
131
  dimensionAtObservation: "TIME_PERIOD"
128
132
  // TODO: use time dimensions
129
- }).toString(), s = _e(e, r, n);
130
- return await this.client.getRequest(s);
133
+ }).toString(), a = _e(e, s, n);
134
+ return await this.client.getRequest(
135
+ a,
136
+ void 0,
137
+ r
138
+ );
131
139
  }
132
- async downloadDataSet(e, n, r, s, a, o, i = !1) {
133
- const c = new URLSearchParams({
140
+ async downloadDataSet(e, n, r, s, a, o, c = !1, i) {
141
+ const u = new URLSearchParams({
134
142
  format: n,
135
143
  compress: "false",
136
- attributes: i ? "all" : "none",
144
+ attributes: c ? "all" : "none",
137
145
  limit: "1000"
138
- }).toString(), u = _e(e, c, a);
146
+ }).toString(), d = _e(e, u, a);
139
147
  return this.client.streamRequest(
140
- u,
148
+ d,
141
149
  {
142
150
  method: "GET",
143
151
  headers: {
@@ -145,11 +153,12 @@ class Wa {
145
153
  "Accept-language": r
146
154
  }
147
155
  },
148
- o
156
+ o,
157
+ i
149
158
  );
150
159
  }
151
160
  }
152
- const Qt = (t, e) => t.error || t.message || `${e.status} ${e.statusText}`, Ft = "application/json", Ht = "Content-Type", ee = "Api-Key", Ut = "X-CONVERSATION-ID", j = "Ocp-Apim-Subscription-Key";
161
+ const Qt = (t, e) => t.error || t.message || `${e.status} ${e.statusText}`, Ft = "application/json", Ht = "Content-Type", j = "Api-Key", Ut = "X-CONVERSATION-ID", z = "Ocp-Apim-Subscription-Key";
153
162
  class Ie extends Error {
154
163
  constructor(e) {
155
164
  super(e.message), this.isHttpError = !0, this.name = "HttpError", this.code = e.code, this.status = e.status, this.details = e.details, this.displayMessage = e.displayMessage;
@@ -159,34 +168,34 @@ const nt = 6048e5, Bt = 864e5, de = 6e4, le = 36e5, Gt = 1e3, Ye = /* @__PURE__
159
168
  function E(t, e) {
160
169
  return typeof t == "function" ? t(e) : t && typeof t == "object" && Ye in t ? t[Ye](e) : t instanceof Date ? new t.constructor(e) : new Date(e);
161
170
  }
162
- function y(t, e) {
171
+ function p(t, e) {
163
172
  return E(e || t, t);
164
173
  }
165
174
  function rt(t, e, n) {
166
- const r = y(t, n?.in);
175
+ const r = p(t, n?.in);
167
176
  return isNaN(e) ? E(n?.in || t, NaN) : (e && r.setDate(r.getDate() + e), r);
168
177
  }
169
178
  let Vt = {};
170
179
  function S() {
171
180
  return Vt;
172
181
  }
173
- function _(t, e) {
174
- const n = S(), r = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = y(t, e?.in), a = s.getDay(), o = (a < r ? 7 : 0) + a - r;
182
+ function I(t, e) {
183
+ const n = S(), r = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = p(t, e?.in), a = s.getDay(), o = (a < r ? 7 : 0) + a - r;
175
184
  return s.setDate(s.getDate() - o), s.setHours(0, 0, 0, 0), s;
176
185
  }
177
186
  function L(t, e) {
178
- return _(t, { ...e, weekStartsOn: 1 });
187
+ return I(t, { ...e, weekStartsOn: 1 });
179
188
  }
180
189
  function st(t, e) {
181
- const n = y(t, e?.in), r = n.getFullYear(), s = E(n, 0);
190
+ const n = p(t, e?.in), r = n.getFullYear(), s = E(n, 0);
182
191
  s.setFullYear(r + 1, 0, 4), s.setHours(0, 0, 0, 0);
183
192
  const a = L(s), o = E(n, 0);
184
193
  o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
185
- const i = L(o);
186
- return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= i.getTime() ? r : r - 1;
194
+ const c = L(o);
195
+ return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= c.getTime() ? r : r - 1;
187
196
  }
188
- function z(t) {
189
- const e = y(t), n = new Date(
197
+ function J(t) {
198
+ const e = p(t), n = new Date(
190
199
  Date.UTC(
191
200
  e.getFullYear(),
192
201
  e.getMonth(),
@@ -207,7 +216,7 @@ function Xt(t, ...e) {
207
216
  return e.map(n);
208
217
  }
209
218
  function Ce(t, e) {
210
- const n = y(t, e?.in);
219
+ const n = p(t, e?.in);
211
220
  return n.setHours(0, 0, 0, 0), n;
212
221
  }
213
222
  function jt(t, e, n) {
@@ -215,21 +224,21 @@ function jt(t, e, n) {
215
224
  n?.in,
216
225
  t,
217
226
  e
218
- ), a = Ce(r), o = Ce(s), i = +a - z(a), c = +o - z(o);
219
- return Math.round((i - c) / Bt);
227
+ ), a = Ce(r), o = Ce(s), c = +a - J(a), i = +o - J(o);
228
+ return Math.round((c - i) / Bt);
220
229
  }
221
- function Kt(t, e) {
230
+ function zt(t, e) {
222
231
  const n = st(t, e), r = E(t, 0);
223
232
  return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), L(r);
224
233
  }
225
- function zt(t) {
234
+ function Kt(t) {
226
235
  return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
227
236
  }
228
237
  function re(t) {
229
- return !(!zt(t) && typeof t != "number" || isNaN(+y(t)));
238
+ return !(!Kt(t) && typeof t != "number" || isNaN(+p(t)));
230
239
  }
231
240
  function Jt(t, e) {
232
- const n = y(t, e?.in);
241
+ const n = p(t, e?.in);
233
242
  return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
234
243
  }
235
244
  const Zt = {
@@ -346,11 +355,11 @@ function q(t) {
346
355
  const r = n?.context ? String(n.context) : "standalone";
347
356
  let s;
348
357
  if (r === "formatting" && t.formattingValues) {
349
- const o = t.defaultFormattingWidth || t.defaultWidth, i = n?.width ? String(n.width) : o;
350
- s = t.formattingValues[i] || t.formattingValues[o];
358
+ const o = t.defaultFormattingWidth || t.defaultWidth, c = n?.width ? String(n.width) : o;
359
+ s = t.formattingValues[c] || t.formattingValues[o];
351
360
  } else {
352
- const o = t.defaultWidth, i = n?.width ? String(n.width) : t.defaultWidth;
353
- s = t.values[i] || t.values[o];
361
+ const o = t.defaultWidth, c = n?.width ? String(n.width) : t.defaultWidth;
362
+ s = t.values[c] || t.values[o];
354
363
  }
355
364
  const a = t.argumentCallback ? t.argumentCallback(e) : e;
356
365
  return s[a];
@@ -512,12 +521,12 @@ function Q(t) {
512
521
  const r = n.width, s = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = e.match(s);
513
522
  if (!a)
514
523
  return null;
515
- const o = a[0], i = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(i) ? pn(i, (l) => l.test(o)) : (
524
+ const o = a[0], c = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], i = Array.isArray(c) ? yn(c, (l) => l.test(o)) : (
516
525
  // [TODO] -- I challenge you to fix the type
517
- gn(i, (l) => l.test(o))
526
+ gn(c, (l) => l.test(o))
518
527
  );
519
528
  let u;
520
- u = t.valueCallback ? t.valueCallback(c) : c, u = n.valueCallback ? (
529
+ u = t.valueCallback ? t.valueCallback(i) : i, u = n.valueCallback ? (
521
530
  // [TODO] -- I challenge you to fix the type
522
531
  n.valueCallback(u)
523
532
  ) : u;
@@ -530,12 +539,12 @@ function gn(t, e) {
530
539
  if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
531
540
  return n;
532
541
  }
533
- function pn(t, e) {
542
+ function yn(t, e) {
534
543
  for (let n = 0; n < t.length; n++)
535
544
  if (e(t[n]))
536
545
  return n;
537
546
  }
538
- function yn(t) {
547
+ function pn(t) {
539
548
  return (e, n = {}) => {
540
549
  const r = e.match(t.matchPattern);
541
550
  if (!r) return null;
@@ -543,8 +552,8 @@ function yn(t) {
543
552
  if (!a) return null;
544
553
  let o = t.valueCallback ? t.valueCallback(a[0]) : a[0];
545
554
  o = n.valueCallback ? n.valueCallback(o) : o;
546
- const i = e.slice(s.length);
547
- return { value: o, rest: i };
555
+ const c = e.slice(s.length);
556
+ return { value: o, rest: c };
548
557
  };
549
558
  }
550
559
  const bn = /^(\d+)(th|st|nd|rd)?/i, Dn = /\d+/i, Tn = {
@@ -615,7 +624,7 @@ const bn = /^(\d+)(th|st|nd|rd)?/i, Dn = /\d+/i, Tn = {
615
624
  night: /night/i
616
625
  }
617
626
  }, Rn = {
618
- ordinalNumber: yn({
627
+ ordinalNumber: pn({
619
628
  matchPattern: bn,
620
629
  parsePattern: Dn,
621
630
  valueCallback: (t) => parseInt(t, 10)
@@ -664,34 +673,34 @@ const bn = /^(\d+)(th|st|nd|rd)?/i, Dn = /\d+/i, Tn = {
664
673
  }
665
674
  };
666
675
  function _n(t, e) {
667
- const n = y(t, e?.in);
676
+ const n = p(t, e?.in);
668
677
  return jt(n, Jt(n)) + 1;
669
678
  }
670
679
  function ot(t, e) {
671
- const n = y(t, e?.in), r = +L(n) - +Kt(n);
680
+ const n = p(t, e?.in), r = +L(n) - +zt(n);
672
681
  return Math.round(r / nt) + 1;
673
682
  }
674
683
  function fe(t, e) {
675
- const n = y(t, e?.in), r = n.getFullYear(), s = S(), a = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, o = E(e?.in || t, 0);
684
+ const n = p(t, e?.in), r = n.getFullYear(), s = S(), a = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, o = E(e?.in || t, 0);
676
685
  o.setFullYear(r + 1, 0, a), o.setHours(0, 0, 0, 0);
677
- const i = _(o, e), c = E(e?.in || t, 0);
678
- c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
679
- const u = _(c, e);
680
- return +n >= +i ? r + 1 : +n >= +u ? r : r - 1;
686
+ const c = I(o, e), i = E(e?.in || t, 0);
687
+ i.setFullYear(r, 0, a), i.setHours(0, 0, 0, 0);
688
+ const u = I(i, e);
689
+ return +n >= +c ? r + 1 : +n >= +u ? r : r - 1;
681
690
  }
682
691
  function In(t, e) {
683
692
  const n = S(), r = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, s = fe(t, e), a = E(e?.in || t, 0);
684
- return a.setFullYear(s, 0, r), a.setHours(0, 0, 0, 0), _(a, e);
693
+ return a.setFullYear(s, 0, r), a.setHours(0, 0, 0, 0), I(a, e);
685
694
  }
686
695
  function it(t, e) {
687
- const n = y(t, e?.in), r = +_(n, e) - +In(n, e);
696
+ const n = p(t, e?.in), r = +I(n, e) - +In(n, e);
688
697
  return Math.round(r / nt) + 1;
689
698
  }
690
699
  function h(t, e) {
691
700
  const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
692
701
  return n + r;
693
702
  }
694
- const N = {
703
+ const k = {
695
704
  // Year
696
705
  y(t, e) {
697
706
  const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
@@ -774,7 +783,7 @@ const N = {
774
783
  const r = t.getFullYear(), s = r > 0 ? r : 1 - r;
775
784
  return n.ordinalNumber(s, { unit: "year" });
776
785
  }
777
- return N.y(t, e);
786
+ return k.y(t, e);
778
787
  },
779
788
  // Local week-numbering year
780
789
  Y: function(t, e, n, r) {
@@ -873,7 +882,7 @@ const N = {
873
882
  switch (e) {
874
883
  case "M":
875
884
  case "MM":
876
- return N.M(t, e);
885
+ return k.M(t, e);
877
886
  // 1st, 2nd, ..., 12th
878
887
  case "Mo":
879
888
  return n.ordinalNumber(r + 1, { unit: "month" });
@@ -934,7 +943,7 @@ const N = {
934
943
  },
935
944
  // Day of the month
936
945
  d: function(t, e, n) {
937
- return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : N.d(t, e);
946
+ return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : k.d(t, e);
938
947
  },
939
948
  // Day of year
940
949
  D: function(t, e, n) {
@@ -1169,11 +1178,11 @@ const N = {
1169
1178
  let r = t.getHours() % 12;
1170
1179
  return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1171
1180
  }
1172
- return N.h(t, e);
1181
+ return k.h(t, e);
1173
1182
  },
1174
1183
  // Hour [0-23]
1175
1184
  H: function(t, e, n) {
1176
- return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : N.H(t, e);
1185
+ return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : k.H(t, e);
1177
1186
  },
1178
1187
  // Hour [0-11]
1179
1188
  K: function(t, e, n) {
@@ -1187,15 +1196,15 @@ const N = {
1187
1196
  },
1188
1197
  // Minute
1189
1198
  m: function(t, e, n) {
1190
- return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : N.m(t, e);
1199
+ return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : k.m(t, e);
1191
1200
  },
1192
1201
  // Second
1193
1202
  s: function(t, e, n) {
1194
- return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : N.s(t, e);
1203
+ return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : k.s(t, e);
1195
1204
  },
1196
1205
  // Fraction of second
1197
1206
  S: function(t, e) {
1198
- return N.S(t, e);
1207
+ return k.S(t, e);
1199
1208
  },
1200
1209
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1201
1210
  X: function(t, e, n) {
@@ -1211,10 +1220,10 @@ const N = {
1211
1220
  // so this token always has the same output as `XX`
1212
1221
  case "XXXX":
1213
1222
  case "XX":
1214
- return I(r);
1223
+ return Y(r);
1215
1224
  // Hours and minutes with `:` delimiter
1216
1225
  default:
1217
- return I(r, ":");
1226
+ return Y(r, ":");
1218
1227
  }
1219
1228
  },
1220
1229
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -1229,10 +1238,10 @@ const N = {
1229
1238
  // so this token always has the same output as `xx`
1230
1239
  case "xxxx":
1231
1240
  case "xx":
1232
- return I(r);
1241
+ return Y(r);
1233
1242
  // Hours and minutes with `:` delimiter
1234
1243
  default:
1235
- return I(r, ":");
1244
+ return Y(r, ":");
1236
1245
  }
1237
1246
  },
1238
1247
  // Timezone (GMT)
@@ -1245,7 +1254,7 @@ const N = {
1245
1254
  case "OOO":
1246
1255
  return "GMT" + Se(r, ":");
1247
1256
  default:
1248
- return "GMT" + I(r, ":");
1257
+ return "GMT" + Y(r, ":");
1249
1258
  }
1250
1259
  },
1251
1260
  // Timezone (specific non-location)
@@ -1258,7 +1267,7 @@ const N = {
1258
1267
  case "zzz":
1259
1268
  return "GMT" + Se(r, ":");
1260
1269
  default:
1261
- return "GMT" + I(r, ":");
1270
+ return "GMT" + Y(r, ":");
1262
1271
  }
1263
1272
  },
1264
1273
  // Seconds timestamp
@@ -1276,9 +1285,9 @@ function Se(t, e = "") {
1276
1285
  return a === 0 ? n + String(s) : n + String(s) + e + h(a, 2);
1277
1286
  }
1278
1287
  function We(t, e) {
1279
- return t % 60 === 0 ? (t > 0 ? "-" : "+") + h(Math.abs(t) / 60, 2) : I(t, e);
1288
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + h(Math.abs(t) / 60, 2) : Y(t, e);
1280
1289
  }
1281
- function I(t, e = "") {
1290
+ function Y(t, e = "") {
1282
1291
  const n = t > 0 ? "-" : "+", r = Math.abs(t), s = h(Math.trunc(r / 60), 2), a = h(r % 60, 2);
1283
1292
  return n + s + e + a;
1284
1293
  }
@@ -1344,10 +1353,10 @@ function Wn(t, e, n) {
1344
1353
  }
1345
1354
  const $n = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, qn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Qn = /^'([^]*?)'?$/, Fn = /''/g, Hn = /[a-zA-Z]/;
1346
1355
  function Un(t, e, n) {
1347
- const r = S(), s = r.locale ?? at, a = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, i = y(t, n?.in);
1348
- if (!re(i))
1356
+ const r = S(), s = r.locale ?? at, a = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, c = p(t, n?.in);
1357
+ if (!re(c))
1349
1358
  throw new RangeError("Invalid time value");
1350
- let c = e.match(qn).map((d) => {
1359
+ let i = e.match(qn).map((d) => {
1351
1360
  const l = d[0];
1352
1361
  if (l === "p" || l === "P") {
1353
1362
  const g = se[l];
@@ -1368,18 +1377,18 @@ function Un(t, e, n) {
1368
1377
  );
1369
1378
  return { isToken: !1, value: d };
1370
1379
  });
1371
- s.localize.preprocessor && (c = s.localize.preprocessor(i, c));
1380
+ s.localize.preprocessor && (i = s.localize.preprocessor(c, i));
1372
1381
  const u = {
1373
1382
  firstWeekContainsDate: a,
1374
1383
  weekStartsOn: o,
1375
1384
  locale: s
1376
1385
  };
1377
- return c.map((d) => {
1386
+ return i.map((d) => {
1378
1387
  if (!d.isToken) return d.value;
1379
1388
  const l = d.value;
1380
1389
  (dt(l) || ut(l)) && ae(l, e, String(t));
1381
1390
  const g = Le[l[0]];
1382
- return g(i, l, s.localize, u);
1391
+ return g(c, l, s.localize, u);
1383
1392
  }).join("");
1384
1393
  }
1385
1394
  function Bn(t) {
@@ -1390,7 +1399,7 @@ function Gn() {
1390
1399
  return Object.assign({}, S());
1391
1400
  }
1392
1401
  function Vn(t, e) {
1393
- const n = y(t, e?.in).getDay();
1402
+ const n = p(t, e?.in).getDay();
1394
1403
  return n === 0 ? 7 : n;
1395
1404
  }
1396
1405
  function Xn(t, e) {
@@ -1405,14 +1414,14 @@ function Xn(t, e) {
1405
1414
  function jn(t) {
1406
1415
  return typeof t == "function" && t.prototype?.constructor === t;
1407
1416
  }
1408
- const Kn = 10;
1417
+ const zn = 10;
1409
1418
  class lt {
1410
1419
  subPriority = 0;
1411
1420
  validate(e, n) {
1412
1421
  return !0;
1413
1422
  }
1414
1423
  }
1415
- class zn extends lt {
1424
+ class Kn extends lt {
1416
1425
  constructor(e, n, r, s, a) {
1417
1426
  super(), this.value = e, this.validateValue = n, this.setValue = r, this.priority = s, a && (this.subPriority = a);
1418
1427
  }
@@ -1424,7 +1433,7 @@ class zn extends lt {
1424
1433
  }
1425
1434
  }
1426
1435
  class Jn extends lt {
1427
- priority = Kn;
1436
+ priority = zn;
1428
1437
  subPriority = -1;
1429
1438
  constructor(e, n) {
1430
1439
  super(), this.context = e || ((r) => E(n, r));
@@ -1437,7 +1446,7 @@ class m {
1437
1446
  run(e, n, r, s) {
1438
1447
  const a = this.parse(e, n, r, s);
1439
1448
  return a ? {
1440
- setter: new zn(
1449
+ setter: new Kn(
1441
1450
  a.value,
1442
1451
  this.validate,
1443
1452
  this.set,
@@ -1523,7 +1532,7 @@ function T(t, e) {
1523
1532
  rest: t.rest
1524
1533
  };
1525
1534
  }
1526
- function p(t, e) {
1535
+ function y(t, e) {
1527
1536
  const n = e.match(t);
1528
1537
  return n ? {
1529
1538
  value: parseInt(n[0], 10),
@@ -1546,34 +1555,34 @@ function A(t, e) {
1546
1555
  };
1547
1556
  }
1548
1557
  function ft(t) {
1549
- return p(D.anyDigitsSigned, t);
1558
+ return y(D.anyDigitsSigned, t);
1550
1559
  }
1551
1560
  function b(t, e) {
1552
1561
  switch (t) {
1553
1562
  case 1:
1554
- return p(D.singleDigit, e);
1563
+ return y(D.singleDigit, e);
1555
1564
  case 2:
1556
- return p(D.twoDigits, e);
1565
+ return y(D.twoDigits, e);
1557
1566
  case 3:
1558
- return p(D.threeDigits, e);
1567
+ return y(D.threeDigits, e);
1559
1568
  case 4:
1560
- return p(D.fourDigits, e);
1569
+ return y(D.fourDigits, e);
1561
1570
  default:
1562
- return p(new RegExp("^\\d{1," + t + "}"), e);
1571
+ return y(new RegExp("^\\d{1," + t + "}"), e);
1563
1572
  }
1564
1573
  }
1565
- function J(t, e) {
1574
+ function Z(t, e) {
1566
1575
  switch (t) {
1567
1576
  case 1:
1568
- return p(D.singleDigitSigned, e);
1577
+ return y(D.singleDigitSigned, e);
1569
1578
  case 2:
1570
- return p(D.twoDigitsSigned, e);
1579
+ return y(D.twoDigitsSigned, e);
1571
1580
  case 3:
1572
- return p(D.threeDigitsSigned, e);
1581
+ return y(D.threeDigitsSigned, e);
1573
1582
  case 4:
1574
- return p(D.fourDigitsSigned, e);
1583
+ return y(D.fourDigitsSigned, e);
1575
1584
  default:
1576
- return p(new RegExp("^-?\\d{1," + t + "}"), e);
1585
+ return y(new RegExp("^-?\\d{1," + t + "}"), e);
1577
1586
  }
1578
1587
  }
1579
1588
  function me(t) {
@@ -1596,8 +1605,8 @@ function mt(t, e) {
1596
1605
  if (r <= 50)
1597
1606
  s = t || 100;
1598
1607
  else {
1599
- const a = r + 50, o = Math.trunc(a / 100) * 100, i = t >= a % 100;
1600
- s = t + o - (i ? 100 : 0);
1608
+ const a = r + 50, o = Math.trunc(a / 100) * 100, c = t >= a % 100;
1609
+ s = t + o - (c ? 100 : 0);
1601
1610
  }
1602
1611
  return n ? s : 1 - s;
1603
1612
  }
@@ -1669,18 +1678,18 @@ class tr extends m {
1669
1678
  set(e, n, r, s) {
1670
1679
  const a = fe(e, s);
1671
1680
  if (r.isTwoDigitYear) {
1672
- const i = mt(
1681
+ const c = mt(
1673
1682
  r.year,
1674
1683
  a
1675
1684
  );
1676
1685
  return e.setFullYear(
1677
- i,
1686
+ c,
1678
1687
  0,
1679
1688
  s.firstWeekContainsDate
1680
- ), e.setHours(0, 0, 0, 0), _(e, s);
1689
+ ), e.setHours(0, 0, 0, 0), I(e, s);
1681
1690
  }
1682
1691
  const o = !("era" in n) || n.era === 1 ? r.year : 1 - r.year;
1683
- return e.setFullYear(o, 0, s.firstWeekContainsDate), e.setHours(0, 0, 0, 0), _(e, s);
1692
+ return e.setFullYear(o, 0, s.firstWeekContainsDate), e.setHours(0, 0, 0, 0), I(e, s);
1684
1693
  }
1685
1694
  incompatibleTokens = [
1686
1695
  "y",
@@ -1701,7 +1710,7 @@ class tr extends m {
1701
1710
  class nr extends m {
1702
1711
  priority = 130;
1703
1712
  parse(e, n) {
1704
- return J(n === "R" ? 4 : n.length, e);
1713
+ return Z(n === "R" ? 4 : n.length, e);
1705
1714
  }
1706
1715
  set(e, n, r) {
1707
1716
  const s = E(e, 0);
@@ -1728,7 +1737,7 @@ class nr extends m {
1728
1737
  class rr extends m {
1729
1738
  priority = 130;
1730
1739
  parse(e, n) {
1731
- return J(n === "u" ? 4 : n.length, e);
1740
+ return Z(n === "u" ? 4 : n.length, e);
1732
1741
  }
1733
1742
  set(e, n, r) {
1734
1743
  return e.setFullYear(r, 0, 1), e.setHours(0, 0, 0, 0), e;
@@ -1882,7 +1891,7 @@ class or extends m {
1882
1891
  // 1, 2, ..., 12
1883
1892
  case "M":
1884
1893
  return T(
1885
- p(D.month, e),
1894
+ y(D.month, e),
1886
1895
  s
1887
1896
  );
1888
1897
  // 01, 02, ..., 12
@@ -1930,7 +1939,7 @@ class ir extends m {
1930
1939
  // 1, 2, ..., 12
1931
1940
  case "L":
1932
1941
  return T(
1933
- p(D.month, e),
1942
+ y(D.month, e),
1934
1943
  s
1935
1944
  );
1936
1945
  // 01, 02, ..., 12
@@ -1986,15 +1995,15 @@ class ir extends m {
1986
1995
  ];
1987
1996
  }
1988
1997
  function cr(t, e, n) {
1989
- const r = y(t, n?.in), s = it(r, n) - e;
1990
- return r.setDate(r.getDate() - s * 7), y(r, n?.in);
1998
+ const r = p(t, n?.in), s = it(r, n) - e;
1999
+ return r.setDate(r.getDate() - s * 7), p(r, n?.in);
1991
2000
  }
1992
2001
  class ur extends m {
1993
2002
  priority = 100;
1994
2003
  parse(e, n, r) {
1995
2004
  switch (n) {
1996
2005
  case "w":
1997
- return p(D.week, e);
2006
+ return y(D.week, e);
1998
2007
  case "wo":
1999
2008
  return r.ordinalNumber(e, { unit: "week" });
2000
2009
  default:
@@ -2005,7 +2014,7 @@ class ur extends m {
2005
2014
  return n >= 1 && n <= 53;
2006
2015
  }
2007
2016
  set(e, n, r, s) {
2008
- return _(cr(e, r, s), s);
2017
+ return I(cr(e, r, s), s);
2009
2018
  }
2010
2019
  incompatibleTokens = [
2011
2020
  "y",
@@ -2024,7 +2033,7 @@ class ur extends m {
2024
2033
  ];
2025
2034
  }
2026
2035
  function dr(t, e, n) {
2027
- const r = y(t, n?.in), s = ot(r, n) - e;
2036
+ const r = p(t, n?.in), s = ot(r, n) - e;
2028
2037
  return r.setDate(r.getDate() - s * 7), r;
2029
2038
  }
2030
2039
  class lr extends m {
@@ -2032,7 +2041,7 @@ class lr extends m {
2032
2041
  parse(e, n, r) {
2033
2042
  switch (n) {
2034
2043
  case "I":
2035
- return p(D.week, e);
2044
+ return y(D.week, e);
2036
2045
  case "Io":
2037
2046
  return r.ordinalNumber(e, { unit: "week" });
2038
2047
  default:
@@ -2082,7 +2091,7 @@ class hr extends m {
2082
2091
  parse(e, n, r) {
2083
2092
  switch (n) {
2084
2093
  case "d":
2085
- return p(D.date, e);
2094
+ return y(D.date, e);
2086
2095
  case "do":
2087
2096
  return r.ordinalNumber(e, { unit: "date" });
2088
2097
  default:
@@ -2118,7 +2127,7 @@ class wr extends m {
2118
2127
  switch (n) {
2119
2128
  case "D":
2120
2129
  case "DD":
2121
- return p(D.dayOfYear, e);
2130
+ return y(D.dayOfYear, e);
2122
2131
  case "Do":
2123
2132
  return r.ordinalNumber(e, { unit: "date" });
2124
2133
  default:
@@ -2151,7 +2160,7 @@ class wr extends m {
2151
2160
  ];
2152
2161
  }
2153
2162
  function he(t, e, n) {
2154
- const r = S(), s = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, a = y(t, n?.in), o = a.getDay(), c = (e % 7 + 7) % 7, u = 7 - s, d = e < 0 || e > 6 ? e - (o + u) % 7 : (c + u) % 7 - (o + u) % 7;
2163
+ const r = S(), s = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, a = p(t, n?.in), o = a.getDay(), i = (e % 7 + 7) % 7, u = 7 - s, d = e < 0 || e > 6 ? e - (o + u) % 7 : (i + u) % 7 - (o + u) % 7;
2155
2164
  return rt(a, d, n);
2156
2165
  }
2157
2166
  class gr extends m {
@@ -2190,12 +2199,12 @@ class gr extends m {
2190
2199
  }
2191
2200
  incompatibleTokens = ["D", "i", "e", "c", "t", "T"];
2192
2201
  }
2193
- class pr extends m {
2202
+ class yr extends m {
2194
2203
  priority = 90;
2195
2204
  parse(e, n, r, s) {
2196
2205
  const a = (o) => {
2197
- const i = Math.floor((o - 1) / 7) * 7;
2198
- return (o + s.weekStartsOn + 6) % 7 + i;
2206
+ const c = Math.floor((o - 1) / 7) * 7;
2207
+ return (o + s.weekStartsOn + 6) % 7 + c;
2199
2208
  };
2200
2209
  switch (n) {
2201
2210
  // 3
@@ -2256,12 +2265,12 @@ class pr extends m {
2256
2265
  "T"
2257
2266
  ];
2258
2267
  }
2259
- class yr extends m {
2268
+ class pr extends m {
2260
2269
  priority = 90;
2261
2270
  parse(e, n, r, s) {
2262
2271
  const a = (o) => {
2263
- const i = Math.floor((o - 1) / 7) * 7;
2264
- return (o + s.weekStartsOn + 6) % 7 + i;
2272
+ const c = Math.floor((o - 1) / 7) * 7;
2273
+ return (o + s.weekStartsOn + 6) % 7 + c;
2265
2274
  };
2266
2275
  switch (n) {
2267
2276
  // 3
@@ -2323,7 +2332,7 @@ class yr extends m {
2323
2332
  ];
2324
2333
  }
2325
2334
  function br(t, e, n) {
2326
- const r = y(t, n?.in), s = Vn(r, n), a = e - s;
2335
+ const r = p(t, n?.in), s = Vn(r, n), a = e - s;
2327
2336
  return rt(r, a, n);
2328
2337
  }
2329
2338
  class Dr extends m {
@@ -2533,7 +2542,7 @@ class Pr extends m {
2533
2542
  parse(e, n, r) {
2534
2543
  switch (n) {
2535
2544
  case "h":
2536
- return p(D.hour12h, e);
2545
+ return y(D.hour12h, e);
2537
2546
  case "ho":
2538
2547
  return r.ordinalNumber(e, { unit: "hour" });
2539
2548
  default:
@@ -2554,7 +2563,7 @@ class Mr extends m {
2554
2563
  parse(e, n, r) {
2555
2564
  switch (n) {
2556
2565
  case "H":
2557
- return p(D.hour23h, e);
2566
+ return y(D.hour23h, e);
2558
2567
  case "Ho":
2559
2568
  return r.ordinalNumber(e, { unit: "hour" });
2560
2569
  default:
@@ -2574,7 +2583,7 @@ class vr extends m {
2574
2583
  parse(e, n, r) {
2575
2584
  switch (n) {
2576
2585
  case "K":
2577
- return p(D.hour11h, e);
2586
+ return y(D.hour11h, e);
2578
2587
  case "Ko":
2579
2588
  return r.ordinalNumber(e, { unit: "hour" });
2580
2589
  default:
@@ -2594,7 +2603,7 @@ class Or extends m {
2594
2603
  parse(e, n, r) {
2595
2604
  switch (n) {
2596
2605
  case "k":
2597
- return p(D.hour24h, e);
2606
+ return y(D.hour24h, e);
2598
2607
  case "ko":
2599
2608
  return r.ordinalNumber(e, { unit: "hour" });
2600
2609
  default:
@@ -2615,7 +2624,7 @@ class Ar extends m {
2615
2624
  parse(e, n, r) {
2616
2625
  switch (n) {
2617
2626
  case "m":
2618
- return p(D.minute, e);
2627
+ return y(D.minute, e);
2619
2628
  case "mo":
2620
2629
  return r.ordinalNumber(e, { unit: "minute" });
2621
2630
  default:
@@ -2635,7 +2644,7 @@ class Nr extends m {
2635
2644
  parse(e, n, r) {
2636
2645
  switch (n) {
2637
2646
  case "s":
2638
- return p(D.second, e);
2647
+ return y(D.second, e);
2639
2648
  case "so":
2640
2649
  return r.ordinalNumber(e, { unit: "second" });
2641
2650
  default:
@@ -2689,7 +2698,7 @@ class Rr extends m {
2689
2698
  set(e, n, r) {
2690
2699
  return n.timestampIsSet ? e : E(
2691
2700
  e,
2692
- e.getTime() - z(e) - r
2701
+ e.getTime() - J(e) - r
2693
2702
  );
2694
2703
  }
2695
2704
  incompatibleTokens = ["t", "T", "x"];
@@ -2722,7 +2731,7 @@ class _r extends m {
2722
2731
  set(e, n, r) {
2723
2732
  return n.timestampIsSet ? e : E(
2724
2733
  e,
2725
- e.getTime() - z(e) - r
2734
+ e.getTime() - J(e) - r
2726
2735
  );
2727
2736
  }
2728
2737
  incompatibleTokens = ["t", "T", "X"];
@@ -2762,8 +2771,8 @@ const Cr = {
2762
2771
  d: new hr(),
2763
2772
  D: new wr(),
2764
2773
  E: new gr(),
2765
- e: new pr(),
2766
- c: new yr(),
2774
+ e: new yr(),
2775
+ c: new pr(),
2767
2776
  i: new Dr(),
2768
2777
  a: new Tr(),
2769
2778
  b: new Er(),
@@ -2781,26 +2790,26 @@ const Cr = {
2781
2790
  T: new Yr()
2782
2791
  }, Lr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Sr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Wr = /^'([^]*?)'?$/, $r = /''/g, qr = /\S/, Qr = /[a-zA-Z]/;
2783
2792
  function Fr(t, e, n, r) {
2784
- const s = () => E(n, NaN), a = Gn(), o = a.locale ?? at, i = a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, c = a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0;
2793
+ const s = () => E(n, NaN), a = Gn(), o = a.locale ?? at, c = a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, i = a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0;
2785
2794
  if (!e)
2786
- return t ? s() : y(n, r?.in);
2795
+ return t ? s() : p(n, r?.in);
2787
2796
  const u = {
2788
- firstWeekContainsDate: i,
2789
- weekStartsOn: c,
2797
+ firstWeekContainsDate: c,
2798
+ weekStartsOn: i,
2790
2799
  locale: o
2791
2800
  }, d = [new Jn(r?.in, n)], l = e.match(Sr).map((f) => {
2792
2801
  const w = f[0];
2793
2802
  if (w in se) {
2794
- const M = se[w];
2795
- return M(f, o.formatLong);
2803
+ const P = se[w];
2804
+ return P(f, o.formatLong);
2796
2805
  }
2797
2806
  return f;
2798
2807
  }).join("").match(Lr), g = [];
2799
2808
  for (let f of l) {
2800
2809
  dt(f) && ae(f, e, t), ut(f) && ae(f, e, t);
2801
- const w = f[0], M = Cr[w];
2802
- if (M) {
2803
- const { incompatibleTokens: v } = M;
2810
+ const w = f[0], P = Cr[w];
2811
+ if (P) {
2812
+ const { incompatibleTokens: v } = P;
2804
2813
  if (Array.isArray(v)) {
2805
2814
  const $ = g.find(
2806
2815
  (U) => v.includes(U.token) || U.token === w
@@ -2809,12 +2818,12 @@ function Fr(t, e, n, r) {
2809
2818
  throw new RangeError(
2810
2819
  `The format string mustn't contain \`${$.fullToken}\` and \`${f}\` at the same time`
2811
2820
  );
2812
- } else if (M.incompatibleTokens === "*" && g.length > 0)
2821
+ } else if (P.incompatibleTokens === "*" && g.length > 0)
2813
2822
  throw new RangeError(
2814
2823
  `The format string mustn't contain \`${f}\` and any other token at the same time`
2815
2824
  );
2816
2825
  g.push({ token: w, fullToken: f });
2817
- const W = M.run(
2826
+ const W = P.run(
2818
2827
  t,
2819
2828
  f,
2820
2829
  o.match,
@@ -2836,19 +2845,19 @@ function Fr(t, e, n, r) {
2836
2845
  }
2837
2846
  if (t.length > 0 && qr.test(t))
2838
2847
  return s();
2839
- const x = d.map((f) => f.priority).sort((f, w) => w - f).filter((f, w, M) => M.indexOf(f) === w).map(
2840
- (f) => d.filter((w) => w.priority === f).sort((w, M) => M.subPriority - w.subPriority)
2848
+ const M = d.map((f) => f.priority).sort((f, w) => w - f).filter((f, w, P) => P.indexOf(f) === w).map(
2849
+ (f) => d.filter((w) => w.priority === f).sort((w, P) => P.subPriority - w.subPriority)
2841
2850
  ).map((f) => f[0]);
2842
- let P = y(n, r?.in);
2843
- if (isNaN(+P)) return s();
2844
- const Y = {};
2845
- for (const f of x) {
2846
- if (!f.validate(P, u))
2851
+ let x = p(n, r?.in);
2852
+ if (isNaN(+x)) return s();
2853
+ const N = {};
2854
+ for (const f of M) {
2855
+ if (!f.validate(x, u))
2847
2856
  return s();
2848
- const w = f.set(P, Y, u);
2849
- Array.isArray(w) ? (P = w[0], Object.assign(Y, w[1])) : P = w;
2857
+ const w = f.set(x, N, u);
2858
+ Array.isArray(w) ? (x = w[0], Object.assign(N, w[1])) : x = w;
2850
2859
  }
2851
- return P;
2860
+ return x;
2852
2861
  }
2853
2862
  function Hr(t) {
2854
2863
  return t.match(Wr)[1].replace($r, "'");
@@ -2858,17 +2867,17 @@ function Ur(t, e) {
2858
2867
  let a;
2859
2868
  if (s.date) {
2860
2869
  const u = jr(s.date, 2);
2861
- a = Kr(u.restDateString, u.year);
2870
+ a = zr(u.restDateString, u.year);
2862
2871
  }
2863
2872
  if (!a || isNaN(+a)) return n();
2864
2873
  const o = +a;
2865
- let i = 0, c;
2866
- if (s.time && (i = zr(s.time), isNaN(i)))
2874
+ let c = 0, i;
2875
+ if (s.time && (c = Kr(s.time), isNaN(c)))
2867
2876
  return n();
2868
2877
  if (s.timezone) {
2869
- if (c = Jr(s.timezone), isNaN(c)) return n();
2878
+ if (i = Jr(s.timezone), isNaN(i)) return n();
2870
2879
  } else {
2871
- const u = new Date(o + i), d = y(0, e?.in);
2880
+ const u = new Date(o + c), d = p(0, e?.in);
2872
2881
  return d.setFullYear(
2873
2882
  u.getUTCFullYear(),
2874
2883
  u.getUTCMonth(),
@@ -2880,7 +2889,7 @@ function Ur(t, e) {
2880
2889
  u.getUTCMilliseconds()
2881
2890
  ), d;
2882
2891
  }
2883
- return y(o + i + c, e?.in);
2892
+ return p(o + c + i, e?.in);
2884
2893
  }
2885
2894
  const G = {
2886
2895
  dateTimeDelimiter: /[T ]/,
@@ -2912,13 +2921,13 @@ function jr(t, e) {
2912
2921
  restDateString: t.slice((r[1] || r[2]).length)
2913
2922
  };
2914
2923
  }
2915
- function Kr(t, e) {
2924
+ function zr(t, e) {
2916
2925
  if (e === null) return /* @__PURE__ */ new Date(NaN);
2917
2926
  const n = t.match(Br);
2918
2927
  if (!n) return /* @__PURE__ */ new Date(NaN);
2919
- const r = !!n[4], s = F(n[1]), a = F(n[2]) - 1, o = F(n[3]), i = F(n[4]), c = F(n[5]) - 1;
2928
+ const r = !!n[4], s = F(n[1]), a = F(n[2]) - 1, o = F(n[3]), c = F(n[4]), i = F(n[5]) - 1;
2920
2929
  if (r)
2921
- return rs(e, i, c) ? Zr(e, i, c) : /* @__PURE__ */ new Date(NaN);
2930
+ return rs(e, c, i) ? Zr(e, c, i) : /* @__PURE__ */ new Date(NaN);
2922
2931
  {
2923
2932
  const u = /* @__PURE__ */ new Date(0);
2924
2933
  return !ts(e, a, o) || !ns(e, s) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(e, a, Math.max(s, o)), u);
@@ -2927,7 +2936,7 @@ function Kr(t, e) {
2927
2936
  function F(t) {
2928
2937
  return t ? parseInt(t) : 1;
2929
2938
  }
2930
- function zr(t) {
2939
+ function Kr(t) {
2931
2940
  const e = t.match(Gr);
2932
2941
  if (!e) return NaN;
2933
2942
  const n = ne(e[1]), r = ne(e[2]), s = ne(e[3]);
@@ -2981,10 +2990,10 @@ const V = (t) => {
2981
2990
  return re(e) ? e : null;
2982
2991
  }, os = ["yyyy-MM-dd", "MM-dd-yyyy"], oe = (t, e, n) => {
2983
2992
  const r = {};
2984
- return e?.contentType !== null && (r[Ht] = e?.contentType || Ft), e?.jwt && (r.Authorization = `Bearer ${e.jwt}`), e?.chatReference && (r[Ut] = e.chatReference), { ...r, ...n };
2993
+ return e?.contentType !== null && (r[Ht] = e?.contentType || Ft), e?.jwt ? r.Authorization = `Bearer ${e.jwt}` : t && (r[j] = t), e?.chatReference && (r[Ut] = e.chatReference), { ...r, ...n };
2985
2994
  }, is = (t) => {
2986
2995
  const e = { ...t };
2987
- return e[ee] && (e[ee] = e[ee].substring(0, 8) + "...[REDACTED]"), e.Authorization && (e.Authorization = "Bearer [REDACTED]"), e[j] && (e[j] = e[j].substring(0, 8) + "...[REDACTED]"), e;
2996
+ return e[j] && (e[j] = e[j].substring(0, 8) + "...[REDACTED]"), e.Authorization && (e.Authorization = "Bearer [REDACTED]"), e[z] && (e[z] = e[z].substring(0, 8) + "...[REDACTED]"), e;
2988
2997
  }, qe = async (t, e, n) => await fetch(t, {
2989
2998
  method: n.method || "GET",
2990
2999
  headers: e,
@@ -3003,15 +3012,15 @@ class us {
3003
3012
  this.decoder = new TextDecoder();
3004
3013
  }
3005
3014
  async streamChat(e, n, r = {}, s) {
3006
- const { onMessage: a, onError: o, onComplete: i, signal: c } = r;
3015
+ const { onMessage: a, onError: o, onComplete: c, signal: i } = r;
3007
3016
  try {
3008
3017
  const u = await this.initializeStreamRequest(
3009
3018
  e,
3010
3019
  n,
3011
- c,
3020
+ i,
3012
3021
  s
3013
3022
  );
3014
- await this.processStreamData(u, a), i?.();
3023
+ await this.processStreamData(u, a), c?.();
3015
3024
  } catch (u) {
3016
3025
  this.handleStreamError(u, o);
3017
3026
  }
@@ -3032,16 +3041,16 @@ class us {
3032
3041
  }
3033
3042
  );
3034
3043
  if (!o.ok) {
3035
- const i = await o.text();
3036
- let c = {};
3044
+ const c = await o.text();
3045
+ let i = {};
3037
3046
  try {
3038
- c = JSON.parse(i);
3047
+ i = JSON.parse(c);
3039
3048
  } catch {
3040
- c.error = "Failed to parse error body";
3049
+ i.error = "Failed to parse error body";
3041
3050
  }
3042
3051
  throw new Ie({
3043
3052
  status: o.status,
3044
- message: c.error ?? "No response body"
3053
+ message: i.error ?? "No response body"
3045
3054
  });
3046
3055
  }
3047
3056
  if (!o.body)
@@ -3062,11 +3071,11 @@ class us {
3062
3071
  }
3063
3072
  const o = this.decoder.decode(a, { stream: !0 });
3064
3073
  r += o;
3065
- const i = r.split(`
3074
+ const c = r.split(`
3066
3075
  `);
3067
- r = i.pop() || "";
3068
- for (const c of i)
3069
- this.parseSSEDataLine(c, n);
3076
+ r = c.pop() || "";
3077
+ for (const i of c)
3078
+ this.parseSSEDataLine(i, n);
3070
3079
  }
3071
3080
  } finally {
3072
3081
  e.releaseLock();
@@ -3101,91 +3110,101 @@ class $a {
3101
3110
  apiUrl: e.apiUrl || "NOT SET"
3102
3111
  });
3103
3112
  }
3104
- async getRequest(e, n) {
3105
- return this.request(e, { ...n, method: "GET" });
3113
+ async getRequest(e, n, r) {
3114
+ return this.request(
3115
+ e,
3116
+ { ...n, method: "GET" },
3117
+ void 0,
3118
+ r
3119
+ );
3106
3120
  }
3107
- async postRequest(e, n, r) {
3108
- return this.request(e, { ...n, method: "POST" }, r);
3121
+ async postRequest(e, n, r, s) {
3122
+ return this.request(
3123
+ e,
3124
+ { ...n, method: "POST" },
3125
+ r,
3126
+ s
3127
+ );
3109
3128
  }
3110
- async streamRequest(e, n, r) {
3111
- const s = `${this.config.apiUrl}/${e}`, a = {
3112
- ...oe(void 0, {
3113
- jwt: this.config.jwt
3114
- }),
3115
- ...n.headers
3116
- };
3117
- this.config.apiKey != null && (a[j] = this.config.apiKey);
3118
- const o = new ReadableStream({
3119
- async start(c) {
3129
+ async streamRequest(e, n, r, s) {
3130
+ const a = `${this.config.apiUrl}/${e}`, o = this.buildHeaders(s, n.headers), c = new ReadableStream({
3131
+ async start(u) {
3120
3132
  try {
3121
- const u = await qe(s, a, n);
3122
- if (!u.ok) {
3123
- const x = await u.text();
3133
+ const d = await qe(a, o, n);
3134
+ if (!d.ok) {
3135
+ const x = await d.text();
3124
3136
  throw console.error(
3125
- `Fetch failed! Status: ${u.status}, Body: ${x}`
3126
- ), new Error(`Fetch failed with status ${u.status}`);
3137
+ `Fetch failed! Status: ${d.status}, Body: ${x}`
3138
+ ), new Error(`Fetch failed with status ${d.status}`);
3127
3139
  }
3128
- const d = u.body?.getReader();
3129
- if (!d) throw new Error("Failed to create stream reader");
3130
- const l = new Uint8Array([239, 187, 191]);
3131
- c.enqueue(l);
3132
- const g = async () => {
3133
- const { done: x, value: P } = await d.read();
3134
- x ? c.close() : (c.enqueue(P), await g());
3140
+ const l = d.body?.getReader();
3141
+ if (!l) throw new Error("Failed to create stream reader");
3142
+ const g = new Uint8Array([239, 187, 191]);
3143
+ u.enqueue(g);
3144
+ const M = async () => {
3145
+ const { done: x, value: N } = await l.read();
3146
+ x ? u.close() : (u.enqueue(N), await M());
3135
3147
  };
3136
- g();
3137
- } catch (u) {
3138
- c.error(u);
3148
+ M();
3149
+ } catch (d) {
3150
+ u.error(d);
3139
3151
  }
3140
3152
  }
3141
3153
  }), i = new Headers({
3142
3154
  "Content-Disposition": `attachment; filename=${encodeURIComponent(r)}`
3143
3155
  });
3144
- return new Response(o, { headers: i });
3145
- }
3146
- async request(e, n, r) {
3147
- const s = Date.now(), a = `${r || this.config.apiUrl}/${e}`, o = {
3148
- ...oe(void 0, {
3149
- jwt: this.config.jwt
3150
- }),
3151
- ...n.headers
3152
- };
3153
- this.config.apiKey != null && (o["Ocp-Apim-Subscription-Key"] = this.config.apiKey), this.addInfoRequestLog("API Request", a, n, o);
3156
+ return new Response(c, { headers: i });
3157
+ }
3158
+ async request(e, n, r, s) {
3159
+ const a = Date.now(), o = `${r || this.config.apiUrl}/${e}`, c = this.buildHeaders(s, n.headers);
3160
+ this.addInfoRequestLog("API Request", o, n, c);
3154
3161
  try {
3155
- const i = await qe(a, o, n), c = Date.now() - s;
3156
- let u;
3157
- const d = await i.text();
3162
+ const i = await qe(o, c, n), u = Date.now() - a;
3163
+ let d;
3164
+ const l = await i.text();
3158
3165
  try {
3159
- u = d ? JSON.parse(d) : {};
3166
+ d = l ? JSON.parse(l) : {};
3160
3167
  } catch {
3161
3168
  if (this.addErrorRequestParsing(
3162
- a,
3169
+ o,
3163
3170
  n,
3164
3171
  i,
3165
- c,
3166
- d
3172
+ u,
3173
+ l
3167
3174
  ), !i.ok)
3168
3175
  throw new Error(
3169
- `API request failed: ${i.status} ${i.statusText} - ${d.substring(0, 100)}`
3176
+ `API request failed: ${i.status} ${i.statusText} - ${l.substring(0, 100)}`
3170
3177
  );
3171
- u = { data: d };
3178
+ d = { data: l };
3172
3179
  }
3173
3180
  if (!i.ok) {
3174
- this.addErrorRequestLog(a, n, i, c, u);
3175
- const l = Qt(u, i);
3176
- throw new Error(`API request failed: ${l}`);
3181
+ this.addErrorRequestLog(o, n, i, u, d);
3182
+ const g = Qt(d, i);
3183
+ throw new Error(`API request failed: ${g}`);
3177
3184
  }
3178
- return u;
3185
+ return d;
3179
3186
  } catch (i) {
3180
- const c = Date.now() - s;
3187
+ const u = Date.now() - a;
3181
3188
  throw console.error("API Request Exception", {
3182
3189
  method: n.method,
3183
- url: a,
3184
- duration: `${c}ms`,
3190
+ url: o,
3191
+ duration: `${u}ms`,
3185
3192
  error: i instanceof Error ? i.message : String(i)
3186
3193
  }), i;
3187
3194
  }
3188
3195
  }
3196
+ buildHeaders(e, n) {
3197
+ if (this.config.useDialAuth)
3198
+ return {
3199
+ ...oe(this.config.dialApiKey, { jwt: e }),
3200
+ ...n
3201
+ };
3202
+ const r = {
3203
+ ...oe(void 0, { jwt: this.config.jwt }),
3204
+ ...n
3205
+ };
3206
+ return this.config.apiKey != null && (r[z] = this.config.apiKey), r;
3207
+ }
3189
3208
  addInfoRequestLog(e, n, r, s) {
3190
3209
  const a = {
3191
3210
  method: r.method || "GET",
@@ -3220,13 +3239,13 @@ const qa = ["FREQ", "FREQUENCY"], ds = "TIME_PERIOD", ls = "time_period_start",
3220
3239
  var ms = /* @__PURE__ */ ((t) => (t.CONDITIONAL = "Conditional", t.MANDATORY = "Mandatory", t))(ms || {}), we = /* @__PURE__ */ ((t) => (t.DIMENSION = "Dimension", t.MEASURE_DIMENSION = "MeasureDimension", t.TIME_DIMENSION = "TimeDimension", t))(we || {}), hs = /* @__PURE__ */ ((t) => (t.UNBOUNDED = "unbounded", t))(hs || {});
3221
3240
  const ws = (t, e) => {
3222
3241
  const n = t?.data?.dataSets?.[0], s = t?.data?.structures?.[0]?.attributes?.dimensionGroup || [], a = n?.dimensionGroupAttributes, o = {};
3223
- for (const i of s) {
3224
- const c = i.relationship.dimensions, { codedSeriesKey: u, decodedSeriesKey: d } = gt(
3242
+ for (const c of s) {
3243
+ const i = c.relationship.dimensions, { codedSeriesKey: u, decodedSeriesKey: d } = gt(
3225
3244
  t,
3226
3245
  e,
3227
- c
3246
+ i
3228
3247
  );
3229
- o[i.id] = {
3248
+ o[c.id] = {
3230
3249
  values: a?.[u] || [],
3231
3250
  decodedSeriesKey: d,
3232
3251
  codedSeriesKey: u
@@ -3238,11 +3257,11 @@ const ws = (t, e) => {
3238
3257
  ...r?.dimensions.series || [],
3239
3258
  ...r?.dimensions.observation || []
3240
3259
  ], a = new Array(s?.length), o = new Array(s?.length);
3241
- return n?.forEach((i) => {
3242
- const c = s?.findIndex((l) => l.id === i) || 0, u = e[c], d = s[c].values.findIndex(
3260
+ return n?.forEach((c) => {
3261
+ const i = s?.findIndex((l) => l.id === c) || 0, u = e[i], d = s[i].values.findIndex(
3243
3262
  (l) => l.id === u || l.value === u
3244
3263
  ) || 0;
3245
- a[c] = d >= 0 ? d : u, o[c] = u;
3264
+ a[i] = d >= 0 ? d : u, o[i] = u;
3246
3265
  }), {
3247
3266
  codedSeriesKey: a.join(":"),
3248
3267
  decodedSeriesKey: o.join(":")
@@ -3250,22 +3269,22 @@ const ws = (t, e) => {
3250
3269
  }, Qa = (t, e, n) => {
3251
3270
  const r = t?.data?.dataSets?.[0], s = t?.data?.structures?.[0], a = (s?.attributes?.dimensionGroup || []).filter(
3252
3271
  (l) => l.relationship.dimensions?.length === 1 && l.relationship.dimensions.includes(e || "")
3253
- ), o = r?.dimensionGroupAttributes, i = [
3272
+ ), o = r?.dimensionGroupAttributes, c = [
3254
3273
  ...s?.dimensions.series || [],
3255
3274
  ...s?.dimensions.observation || []
3256
- ], c = i?.findIndex((l) => l.id === e), u = new Array(i?.length);
3257
- u[c] = n || "";
3275
+ ], i = c?.findIndex((l) => l.id === e), u = new Array(c?.length);
3276
+ u[i] = n || "";
3258
3277
  const d = {};
3259
3278
  for (const l of a) {
3260
- const g = l.relationship.dimensions, { codedSeriesKey: x, decodedSeriesKey: P } = gt(
3279
+ const g = l.relationship.dimensions, { codedSeriesKey: M, decodedSeriesKey: x } = gt(
3261
3280
  t,
3262
3281
  u,
3263
3282
  g
3264
3283
  );
3265
3284
  d[l.id] = {
3266
- values: o?.[x] || [],
3267
- decodedSeriesKey: P,
3268
- codedSeriesKey: x
3285
+ values: o?.[M] || [],
3286
+ decodedSeriesKey: x,
3287
+ codedSeriesKey: M
3269
3288
  };
3270
3289
  }
3271
3290
  return d;
@@ -3274,18 +3293,18 @@ const ws = (t, e) => {
3274
3293
  return;
3275
3294
  const n = t.values?.[e];
3276
3295
  return n ?? (e instanceof Array ? { values: e } : { value: e.toString() });
3277
- }, ps = "Observation", Fa = (t) => {
3296
+ }, ys = "Observation", Fa = (t) => {
3278
3297
  const e = t?.data?.dataSets, n = t?.data?.structures?.[0];
3279
3298
  if (!e || !n)
3280
3299
  return [];
3281
- const r = n.attributes, s = n.dimensions, a = r?.dimensionGroup || [], o = e[0].series || e[0].observations, i = s.series?.length ? s.series : s.observation, c = [];
3300
+ const r = n.attributes, s = n.dimensions, a = r?.dimensionGroup || [], o = e[0].series || e[0].observations, c = s.series?.length ? s.series : s.observation, i = [];
3282
3301
  for (const u in o) {
3283
- const d = [], { name: l, parsedTimeSeriesValue: g } = ys(
3302
+ const d = [], { name: l, parsedTimeSeriesValue: g } = ps(
3284
3303
  u,
3285
- i
3286
- ), x = o[u], P = x.attributes || [];
3287
- if (Object.keys(x).length === 0) {
3288
- c.push({
3304
+ c
3305
+ ), M = o[u], x = M.attributes || [];
3306
+ if (Object.keys(M).length === 0) {
3307
+ i.push({
3289
3308
  name: l,
3290
3309
  parsedTimeSeriesValue: g,
3291
3310
  values: d,
@@ -3295,18 +3314,18 @@ const ws = (t, e) => {
3295
3314
  continue;
3296
3315
  }
3297
3316
  d.push(
3298
- ...Es(x, n)
3317
+ ...Es(M, n)
3299
3318
  );
3300
- const Y = ie(
3319
+ const N = ie(
3301
3320
  r?.series || [],
3302
- (v) => P[v]
3321
+ (v) => x[v]
3303
3322
  ), f = xs(
3304
3323
  n.attributes?.dataSet || [],
3305
3324
  e[0].attributes?.filter((v) => v != null) || []
3306
3325
  ), w = ws(
3307
3326
  t,
3308
3327
  g
3309
- ), M = a.map((v, W) => {
3328
+ ), P = a.map((v, W) => {
3310
3329
  const $ = w[v.id], U = gs(
3311
3330
  v,
3312
3331
  $.values[W]
@@ -3317,28 +3336,28 @@ const ws = (t, e) => {
3317
3336
  dimensionGroupData: $
3318
3337
  };
3319
3338
  });
3320
- c.push({
3339
+ i.push({
3321
3340
  name: l,
3322
3341
  parsedTimeSeriesValue: g,
3323
3342
  values: d,
3324
- attributes: Y,
3343
+ attributes: N,
3325
3344
  dataSetAttrs: f,
3326
- dimensionGroupAttributes: M
3345
+ dimensionGroupAttributes: P
3327
3346
  });
3328
3347
  }
3329
- return c;
3330
- }, ys = (t, e) => {
3348
+ return i;
3349
+ }, ps = (t, e) => {
3331
3350
  const n = t.split(new RegExp("(?<!\\|):(?!\\||$)")), r = [];
3332
3351
  for (let s = 0; s < n.length; s++) {
3333
3352
  const a = e?.[s], o = Number(n[s]);
3334
3353
  if (o < 0 || a == null)
3335
3354
  continue;
3336
- const i = a.values[o];
3337
- if (i == null) {
3355
+ const c = a.values[o];
3356
+ if (c == null) {
3338
3357
  r.push(n[s].replace("|:", ":"));
3339
3358
  continue;
3340
3359
  }
3341
- r.push(i?.id || i?.value || "");
3360
+ r.push(c?.id || c?.value || "");
3342
3361
  }
3343
3362
  return {
3344
3363
  name: Ds(r),
@@ -3367,21 +3386,21 @@ const ws = (t, e) => {
3367
3386
  e.attributes?.observation || [],
3368
3387
  (o) => t[o + n]
3369
3388
  ),
3370
- dimensionAtObservation: ps
3389
+ dimensionAtObservation: ys
3371
3390
  }
3372
3391
  ];
3373
3392
  const r = t.observations, s = e.dimensions.observation?.[0], a = [];
3374
3393
  for (const o in r) {
3375
- const i = s?.values[o];
3394
+ const c = s?.values[o];
3376
3395
  a.push({
3377
- dimensionAtObservation: i?.value || i?.id,
3396
+ dimensionAtObservation: c?.value || c?.id,
3378
3397
  values: Qe(
3379
3398
  r[o],
3380
3399
  e.measures
3381
3400
  ),
3382
3401
  obsAttributes: ie(
3383
3402
  e.attributes?.observation || [],
3384
- (c) => r[o][c + n]
3403
+ (i) => r[o][i + n]
3385
3404
  )
3386
3405
  });
3387
3406
  }
@@ -3398,7 +3417,7 @@ const ws = (t, e) => {
3398
3417
  name: e.id,
3399
3418
  value: s || ""
3400
3419
  });
3401
- }, Ms = /^[0-9][0-9][0-9][0-9]-Q[1-4]$/, vs = /^[0-9][0-9][0-9][0-9]-W(0[1-9]|[1-4][0-9]|5[0-3])$/, Os = /^[0-9][0-9][0-9][0-9]-S[1-2]$/, As = /^[0-9][0-9][0-9][0-9]$/, Ns = /^[0-9][0-9][0-9][0-9]-(0[1-9]|1[0-2])-[0-9][0-9]$/, ks = /^[0-9][0-9][0-9][0-9]-M(0[1-9]|(1[0-2]))$/, ge = (t) => As.exec(t), pe = (t) => !!ge(t), Rs = (t) => Os.exec(t), ye = (t) => !!Rs(t), be = (t) => ks.exec(t), De = (t) => !!be(t), Te = (t) => Ms.exec(t), Ee = (t) => !!Te(t), _s = (t) => Ns.exec(t), Is = (t) => !!_s(t), Ys = (t) => vs.exec(t), xe = (t) => !!Ys(t), Pe = 1440 * 60 * 1e3, Me = 7 * Pe;
3420
+ }, Ms = /^[0-9][0-9][0-9][0-9]-Q[1-4]$/, vs = /^[0-9][0-9][0-9][0-9]-W(0[1-9]|[1-4][0-9]|5[0-3])$/, Os = /^[0-9][0-9][0-9][0-9]-S[1-2]$/, As = /^[0-9][0-9][0-9][0-9]$/, Ns = /^[0-9][0-9][0-9][0-9]-(0[1-9]|1[0-2])-[0-9][0-9]$/, ks = /^[0-9][0-9][0-9][0-9]-M(0[1-9]|(1[0-2]))$/, ge = (t) => As.exec(t), ye = (t) => !!ge(t), Rs = (t) => Os.exec(t), pe = (t) => !!Rs(t), be = (t) => ks.exec(t), De = (t) => !!be(t), Te = (t) => Ms.exec(t), Ee = (t) => !!Te(t), _s = (t) => Ns.exec(t), Is = (t) => !!_s(t), Ys = (t) => vs.exec(t), xe = (t) => !!Ys(t), Pe = 1440 * 60 * 1e3, Me = 7 * Pe;
3402
3421
  function ve(t) {
3403
3422
  const e = `${t}-01-01`, n = new Date(e);
3404
3423
  if (n.getDay() !== 4) {
@@ -3412,21 +3431,21 @@ function Cs(t) {
3412
3431
  return e.setDate(e.getDate() + r), new Date(e.valueOf());
3413
3432
  }
3414
3433
  function Fe(t, e = "W") {
3415
- const n = `${t}-12-31`, r = Z(new Date(n), e);
3434
+ const n = `${t}-12-31`, r = ee(new Date(n), e);
3416
3435
  if (r.weekYear === t)
3417
3436
  return r.weekNumber;
3418
3437
  const s = `${t}-12-24`;
3419
- return Z(new Date(s), e).weekNumber;
3438
+ return ee(new Date(s), e).weekNumber;
3420
3439
  }
3421
- function pt(t, e, n = "W") {
3440
+ function yt(t, e, n = "W") {
3422
3441
  return `${t}-${n}${e < 10 ? "0" + e : e}`;
3423
3442
  }
3424
- function Z(t, e = "W") {
3443
+ function ee(t, e = "W") {
3425
3444
  const n = Cs(t), r = n.getFullYear(), s = ve(r), a = 1 + Math.ceil(
3426
3445
  (n.getTime() - s.getTime()) / Me
3427
3446
  );
3428
3447
  return {
3429
- code: pt(r, a, e),
3448
+ code: yt(r, a, e),
3430
3449
  weekNumber: a,
3431
3450
  weekYear: r
3432
3451
  };
@@ -3439,11 +3458,11 @@ function Ss(t) {
3439
3458
  const [e, n] = t.split("-W"), s = ve(+e).getTime() + (+n - 1) * Me + 3 * Pe;
3440
3459
  return new Date(s);
3441
3460
  }
3442
- function yt(t) {
3443
- return pe(t) ? Ws(t) : ye(t) ? qs(t) : Ee(t) ? Fs(t) : De(t) ? Us(t) : xe(t) ? Ls(t) : Gs(t);
3461
+ function pt(t) {
3462
+ return ye(t) ? Ws(t) : pe(t) ? qs(t) : Ee(t) ? Fs(t) : De(t) ? Us(t) : xe(t) ? Ls(t) : Gs(t);
3444
3463
  }
3445
3464
  function bt(t) {
3446
- return pe(t) ? $s(t) : ye(t) ? Qs(t) : Ee(t) ? Hs(t) : De(t) ? Bs(t) : xe(t) ? Ss(t) : Vs(t);
3465
+ return ye(t) ? $s(t) : pe(t) ? Qs(t) : Ee(t) ? Hs(t) : De(t) ? Bs(t) : xe(t) ? Ss(t) : Vs(t);
3447
3466
  }
3448
3467
  function Ws(t) {
3449
3468
  const e = ge(t);
@@ -3523,14 +3542,14 @@ const Gs = (t) => /* @__PURE__ */ new Date(`${t}T00:00:00`), Vs = (t) => {
3523
3542
  const e = /* @__PURE__ */ new Date(`${t}T23:59:00`);
3524
3543
  return e.setMinutes(e.getMinutes() + 1), e;
3525
3544
  }, Xs = 1, js = (t, e, n, r = !0, s = "Q") => {
3526
- const a = [], o = e && e > 3 ? na(e, r) : 1, i = n ? Math.floor((n - 1) / 3) : 4;
3527
- for (let c = o; c <= i; c++)
3528
- a.push(`${t}-${s}${c}`);
3545
+ const a = [], o = e && e > 3 ? na(e, r) : 1, c = n ? Math.floor((n - 1) / 3) : 4;
3546
+ for (let i = o; i <= c; i++)
3547
+ a.push(`${t}-${s}${i}`);
3529
3548
  return a;
3530
- }, Ks = (t, e, n, r = "S") => {
3549
+ }, zs = (t, e, n, r = "S") => {
3531
3550
  const s = [];
3532
3551
  return (e || 1) < 7 && (n || 12) > 6 && s.push(`${t}-${r}1`), n == null && s.push(`${t}-${r}2`), s;
3533
- }, Ha = (t) => Math.ceil(t / 3), Dt = (t, e, n = "M") => `${t}-${n}${e.toString().padStart(2, "0")}`, zs = (t, e, n = "M") => {
3552
+ }, Ha = (t) => Math.ceil(t / 3), Dt = (t, e, n = "M") => `${t}-${n}${e.toString().padStart(2, "0")}`, Ks = (t, e, n = "M") => {
3534
3553
  const r = [];
3535
3554
  for (let s = e; s <= 12; s++)
3536
3555
  r.push(Dt(t, s, n));
@@ -3542,7 +3561,7 @@ const Gs = (t) => /* @__PURE__ */ new Date(`${t}T00:00:00`), Vs = (t) => {
3542
3561
  return s;
3543
3562
  }, Zs = (t, e, n, r = "M") => {
3544
3563
  const s = e || 1, a = n == null, o = n || 12;
3545
- return a ? zs(t, s, r) : Js(t, s, o, r);
3564
+ return a ? Ks(t, s, r) : Js(t, s, o, r);
3546
3565
  }, Ua = (t, e, n = "M") => {
3547
3566
  switch (e) {
3548
3567
  case 0:
@@ -3573,14 +3592,14 @@ const Gs = (t) => /* @__PURE__ */ new Date(`${t}T00:00:00`), Vs = (t) => {
3573
3592
  return [];
3574
3593
  }
3575
3594
  }, ea = (t, e) => {
3576
- const n = k(e, !0), r = k(t), s = n.getFullYear(), a = r.getFullYear(), o = n.getTime() <= r.getTime() ? a + Xs - s : 0;
3577
- return Array.from({ length: o }, (c, u) => s + u);
3578
- }, k = (t, e = !1) => {
3595
+ const n = R(e, !0), r = R(t), s = n.getFullYear(), a = r.getFullYear(), o = n.getTime() <= r.getTime() ? a + Xs - s : 0;
3596
+ return Array.from({ length: o }, (i, u) => s + u);
3597
+ }, R = (t, e = !1) => {
3579
3598
  const n = ta(t, e);
3580
3599
  return n ? (n.getTimezoneOffset() > 0 && n.setMinutes(n.getMinutes() + n.getTimezoneOffset()), n) : /* @__PURE__ */ new Date();
3581
3600
  }, ta = (t, e = !1) => {
3582
3601
  const n = Number(t);
3583
- return t.toString().length !== 13 ? e ? yt(t) : bt(t) : isNaN(n) ? /* @__PURE__ */ new Date(`${t}T00:00:00.000Z`) : new Date(n);
3602
+ return t.toString().length !== 13 ? e ? pt(t) : bt(t) : isNaN(n) ? /* @__PURE__ */ new Date(`${t}T00:00:00.000Z`) : new Date(n);
3584
3603
  }, na = (t, e) => e ? Math.floor((t + 1) / 3) : Math.ceil((t + 1) / 3), Ba = (t, e) => {
3585
3604
  const n = Ue(t) - Ue(e);
3586
3605
  if (n === 0 && t !== e) {
@@ -3588,8 +3607,8 @@ const Gs = (t) => /* @__PURE__ */ new Date(`${t}T00:00:00`), Vs = (t) => {
3588
3607
  return r - s;
3589
3608
  }
3590
3609
  return n;
3591
- }, He = (t) => pe(t) ? 6 : ye(t) ? 5 : Ee(t) ? 4 : De(t) ? 3 : xe(t) ? 2 : Is(t) ? 1 : 0, Ue = (t, e = !1) => (e ? yt(t) : bt(t))?.getTime() || 0;
3592
- var Oe = /* @__PURE__ */ ((t) => (t.LAST_UPDATE_AT = "lastUpdatedAt", t.SERIES_COUNT = "series_count", t))(Oe || {}), ra = /* @__PURE__ */ ((t) => (t.C = "c", t))(ra || {}), R = /* @__PURE__ */ ((t) => (t.EQUALS = "eq", t.NOT_EQUALS = "ne", t.LESS = "lt", t.LESS_OR_EQUAL = "le", t.GREATER = "gt", t.GREATER_OR_EQUAL = "ge", t.CONTAINS = "co", t.NOT_CONTAINS = "nc", t.STARTS = "sw", t.ENDS = "ew", t))(R || {}), sa = /* @__PURE__ */ ((t) => (t.BOOLEAN = "Boolean", t.DATE_TIME = "DateTime", t.DECIMAL = "Decimal", t.INTEGER = "Integer", t.OBSERVATION_TIME_PERIOD = "ObservationalTimePeriod", t.STRING = "String", t.TIME = "Time", t.TIME_RANGE = "TimeRange", t.URI = "URI", t))(sa || {}), aa = /* @__PURE__ */ ((t) => (t.ANNUAL = "A", t.QUARTERLY = "Q", t.MONTHLY = "M", t))(aa || {});
3610
+ }, He = (t) => ye(t) ? 6 : pe(t) ? 5 : Ee(t) ? 4 : De(t) ? 3 : xe(t) ? 2 : Is(t) ? 1 : 0, Ue = (t, e = !1) => (e ? pt(t) : bt(t))?.getTime() || 0;
3611
+ var Oe = /* @__PURE__ */ ((t) => (t.LAST_UPDATE_AT = "lastUpdatedAt", t.SERIES_COUNT = "series_count", t))(Oe || {}), ra = /* @__PURE__ */ ((t) => (t.C = "c", t))(ra || {}), _ = /* @__PURE__ */ ((t) => (t.EQUALS = "eq", t.NOT_EQUALS = "ne", t.LESS = "lt", t.LESS_OR_EQUAL = "le", t.GREATER = "gt", t.GREATER_OR_EQUAL = "ge", t.CONTAINS = "co", t.NOT_CONTAINS = "nc", t.STARTS = "sw", t.ENDS = "ew", t))(_ || {}), sa = /* @__PURE__ */ ((t) => (t.BOOLEAN = "Boolean", t.DATE_TIME = "DateTime", t.DECIMAL = "Decimal", t.INTEGER = "Integer", t.OBSERVATION_TIME_PERIOD = "ObservationalTimePeriod", t.STRING = "String", t.TIME = "Time", t.TIME_RANGE = "TimeRange", t.URI = "URI", t))(sa || {}), aa = /* @__PURE__ */ ((t) => (t.ANNUAL = "A", t.QUARTERLY = "Q", t.MONTHLY = "M", t))(aa || {});
3593
3612
  function Ga(t) {
3594
3613
  return t?.annotations?.find((e) => {
3595
3614
  if (e.id === Oe.LAST_UPDATE_AT)
@@ -3617,34 +3636,34 @@ const Ae = (t, e) => t?.names && t?.names[e] || t?.name, Tt = (t, e, n) => {
3617
3636
  endPeriod: r
3618
3637
  };
3619
3638
  }, ia = (t, e) => t.id.localeCompare(e.id), ca = (t, e) => t.memberValue.localeCompare(e.memberValue), ua = (t, e) => {
3620
- const n = new Array(t.length), r = t.map((o, i) => [o, i]);
3639
+ const n = new Array(t.length), r = t.map((o, c) => [o, c]);
3621
3640
  r.sort(
3622
- (o, i) => ia(o[0], i[0])
3641
+ (o, c) => ia(o[0], c[0])
3623
3642
  );
3624
3643
  const s = [...e];
3625
3644
  s.sort(ca);
3626
3645
  let a = 0;
3627
3646
  for (const o of r) {
3628
- const i = o[0];
3629
- for (; a < s.length && s[a].memberValue.localeCompare(i.id) < 0; )
3647
+ const c = o[0];
3648
+ for (; a < s.length && s[a].memberValue.localeCompare(c.id) < 0; )
3630
3649
  a += 1;
3631
- a < s.length && s[a].memberValue === i.id && (n[o[1]] = o[0]);
3650
+ a < s.length && s[a].memberValue === c.id && (n[o[1]] = o[0]);
3632
3651
  }
3633
3652
  return n.filter((o) => o != null);
3634
3653
  }, da = (t) => !!t?.some((e) => e.parent), Xa = (t, e, n, r, s = []) => {
3635
3654
  let a = t || [];
3636
3655
  if (la(n || [], e || "")) {
3637
3656
  const o = (n || [])[0].cubeRegions?.find(
3638
- ({ isIncluded: i }) => i
3657
+ ({ isIncluded: c }) => c
3639
3658
  );
3640
3659
  if (o) {
3641
- const i = o.memberSelection?.find(
3642
- ({ componentId: c }) => c === e
3660
+ const c = o.memberSelection?.find(
3661
+ ({ componentId: i }) => i === e
3643
3662
  );
3644
- i ? a = a.length === 0 ? (i.selectionValues || []).map(({ memberValue: c }) => ({
3645
- id: c,
3646
- name: c
3647
- })) : ua(a, i.selectionValues) : a = [];
3663
+ c ? a = a.length === 0 ? (c.selectionValues || []).map(({ memberValue: i }) => ({
3664
+ id: i,
3665
+ name: i
3666
+ })) : ua(a, c.selectionValues) : a = [];
3648
3667
  }
3649
3668
  } else s.length !== 0 && (a = a.filter(({ id: o }) => s.includes(o)));
3650
3669
  return da(t) && (a = oa(t, a)), a?.map((o) => ({
@@ -3656,7 +3675,7 @@ const Ae = (t, e) => t?.names && t?.names[e] || t?.name, Tt = (t, e, n) => {
3656
3675
  return t?.filters?.forEach((n) => {
3657
3676
  n.componentCode !== ds && e.push({
3658
3677
  componentCode: n.componentCode,
3659
- operator: R.EQUALS,
3678
+ operator: _.EQUALS,
3660
3679
  value: n.values.join(",")
3661
3680
  });
3662
3681
  }), e;
@@ -3690,8 +3709,8 @@ const Ae = (t, e) => t?.names && t?.names[e] || t?.name, Tt = (t, e, n) => {
3690
3709
  }, ga = (t, e) => {
3691
3710
  const n = Be(t), r = Be(e), s = n.pop(), a = r.pop(), o = Xe(n, r);
3692
3711
  return o !== 0 ? o : s && a ? Xe(s.split("."), a.split(".")) : s || a ? s ? -1 : 1 : 0;
3693
- }, pa = (t, e, n) => {
3694
- ya(n);
3712
+ }, ya = (t, e, n) => {
3713
+ pa(n);
3695
3714
  const r = ga(t, e);
3696
3715
  return Et[n].includes(r);
3697
3716
  }, Et = {
@@ -3701,22 +3720,22 @@ const Ae = (t, e) => t?.names && t?.names[e] || t?.name, Tt = (t, e, n) => {
3701
3720
  "<=": [-1, 0],
3702
3721
  "<": [-1],
3703
3722
  "!=": [-1, 1]
3704
- }, je = Object.keys(Et), ya = (t) => {
3723
+ }, je = Object.keys(Et), pa = (t) => {
3705
3724
  if (je.indexOf(t) === -1)
3706
3725
  throw new Error(`Invalid operator, expected one of ${je.join("|")}`);
3707
3726
  }, ce = "+", Ne = (t, e) => {
3708
3727
  const { agency: n, id: r, version: s } = H(t), a = e.filter(
3709
- (c) => c.agencyID === n && c.id === r && !c?.version?.includes(ce)
3728
+ (i) => i.agencyID === n && i.id === r && !i?.version?.includes(ce)
3710
3729
  );
3711
3730
  if (a.length === 1)
3712
3731
  return a[0];
3713
3732
  if (!s?.includes(ce))
3714
- return a.find((c) => c.version === s);
3733
+ return a.find((i) => i.version === s);
3715
3734
  const o = a.map(
3716
- (c) => c.version
3717
- ), i = ba(s, o);
3735
+ (i) => i.version
3736
+ ), c = ba(s, o);
3718
3737
  return a.find(
3719
- (c) => c.version === i[0]
3738
+ (i) => i.version === c[0]
3720
3739
  );
3721
3740
  }, ba = (t, e) => {
3722
3741
  const n = Da(t, e);
@@ -3735,7 +3754,7 @@ const Ae = (t, e) => t?.names && t?.names[e] || t?.name, Tt = (t, e, n) => {
3735
3754
  return r > 0 ? e.slice(0, r) : "";
3736
3755
  }, Ea = (t, e) => {
3737
3756
  const n = t.trim().replace(/\+/, ""), r = Ta(t);
3738
- return e.startsWith(r) && pa(e, n, ">=");
3757
+ return e.startsWith(r) && ya(e, n, ">=");
3739
3758
  }, ke = (t, e) => {
3740
3759
  const { concept: n } = xa(t, e);
3741
3760
  return n;
@@ -3752,29 +3771,29 @@ const Ae = (t, e) => t?.names && t?.names[e] || t?.name, Tt = (t, e, n) => {
3752
3771
  e
3753
3772
  );
3754
3773
  return {
3755
- concept: Ke(o?.concepts || [], n),
3774
+ concept: ze(o?.concepts || [], n),
3756
3775
  scheme: o
3757
3776
  };
3758
3777
  }
3759
3778
  for (const o of e)
3760
3779
  if (Pa(o, s, r, a))
3761
3780
  return {
3762
- concept: Ke(o?.concepts || [], n),
3781
+ concept: ze(o?.concepts || [], n),
3763
3782
  scheme: o
3764
3783
  };
3765
3784
  return {
3766
3785
  concept: void 0,
3767
3786
  scheme: void 0
3768
3787
  };
3769
- }, Ke = (t, e) => t?.find((n) => n.id === e), Pa = (t, e, n, r) => t.id === e && t.agencyID === n && t.version === r, Ka = (t = [], e = [], n) => {
3788
+ }, ze = (t, e) => t?.find((n) => n.id === e), Pa = (t, e, n, r) => t.id === e && t.agencyID === n && t.version === r, za = (t = [], e = [], n) => {
3770
3789
  const r = n?.conceptIdentity || "", s = ke(r, e), a = K(
3771
3790
  n?.localRepresentation?.enumeration
3772
3791
  ), o = K(
3773
3792
  s?.coreRepresentation?.enumeration
3774
- ), i = a || o;
3775
- if (i != null)
3776
- return Ne(i, t);
3777
- }, za = (t, e, n, r) => {
3793
+ ), c = a || o;
3794
+ if (c != null)
3795
+ return Ne(c, t);
3796
+ }, Ka = (t, e, n, r) => {
3778
3797
  const s = e?.find(
3779
3798
  (a) => a?.id === t?.id
3780
3799
  )?.values;
@@ -3798,7 +3817,7 @@ const Ae = (t, e) => t?.names && t?.names[e] || t?.name, Tt = (t, e, n) => {
3798
3817
  const r = K(e?.conceptIdentity) || "", s = ke(r, t);
3799
3818
  return n ? Ae(s, n) : s?.name ?? s?.id ?? e?.id;
3800
3819
  };
3801
- function ze(t) {
3820
+ function Ke(t) {
3802
3821
  return t?.dataStructures?.[0]?.dataStructureComponents?.dimensionList;
3803
3822
  }
3804
3823
  function Za(t) {
@@ -3815,34 +3834,34 @@ function to(t) {
3815
3834
  const no = (t) => {
3816
3835
  const e = /* @__PURE__ */ new Map(), n = t?.dataStructures?.[0], r = t?.metadataStructures?.[0], s = t?.conceptSchemes || [], a = t?.codelists || [];
3817
3836
  return t && [
3818
- ...ze(t)?.dimensions || [],
3819
- ...ze(t)?.timeDimensions || [],
3837
+ ...Ke(t)?.dimensions || [],
3838
+ ...Ke(t)?.timeDimensions || [],
3820
3839
  ...Ma(r, n),
3821
3840
  ...n?.dataStructureComponents?.attributeList?.attributes || []
3822
3841
  ].forEach(
3823
- (i) => {
3824
- const c = ke(
3825
- i?.conceptIdentity,
3842
+ (c) => {
3843
+ const i = ke(
3844
+ c?.conceptIdentity,
3826
3845
  s
3827
- ), u = i?.localRepresentation?.enumeration || c?.coreRepresentation?.enumeration, d = Ne(
3846
+ ), u = c?.localRepresentation?.enumeration || i?.coreRepresentation?.enumeration, d = Ne(
3828
3847
  u,
3829
3848
  a
3830
3849
  );
3831
- i?.id && (u ? e.set(i?.id, {
3850
+ c?.id && (u ? e.set(c?.id, {
3832
3851
  ...d,
3833
- name: c?.name,
3834
- names: c?.names
3835
- }) : e.set(i?.id, {
3836
- id: i?.id,
3837
- name: c?.name,
3838
- names: c?.names
3852
+ name: i?.name,
3853
+ names: i?.names
3854
+ }) : e.set(c?.id, {
3855
+ id: c?.id,
3856
+ name: i?.name,
3857
+ names: i?.names
3839
3858
  }));
3840
3859
  }
3841
3860
  ), e;
3842
3861
  }, ro = (t) => t?.find(
3843
3862
  (e) => e.id === Oe.SERIES_COUNT
3844
3863
  )?.title || "", va = "/api/download", so = (t, e, n, r, s, a, o) => {
3845
- const i = new URLSearchParams({
3864
+ const c = new URLSearchParams({
3846
3865
  urn: t,
3847
3866
  format: e,
3848
3867
  compress: "false",
@@ -3851,8 +3870,8 @@ const no = (t) => {
3851
3870
  attribute: r,
3852
3871
  language: n,
3853
3872
  isMetadata: o ? "true" : "none"
3854
- }).toString(), c = `${va}?${i}`, u = document.createElement("a");
3855
- u.href = c, u.download = a, document.body.appendChild(u), u.click(), document.body.removeChild(u);
3873
+ }).toString(), i = `${va}?${c}`, u = document.createElement("a");
3874
+ u.href = i, u.download = a, document.body.appendChild(u), u.click(), document.body.removeChild(u);
3856
3875
  }, ao = (t, e) => {
3857
3876
  const n = [];
3858
3877
  for (const r of t) {
@@ -3867,9 +3886,9 @@ const no = (t) => {
3867
3886
  return null;
3868
3887
  const n = [], { startPeriod: r, endPeriod: s } = t;
3869
3888
  if (r && n.push(
3870
- `${R.GREATER_OR_EQUAL}${Re}${Je(r)}`
3889
+ `${_.GREATER_OR_EQUAL}${Re}${Je(r)}`
3871
3890
  ), s && n.push(
3872
- `${R.LESS_OR_EQUAL}${Re}${Je(s)}`
3891
+ `${_.LESS_OR_EQUAL}${Re}${Je(s)}`
3873
3892
  ), n.length === 0)
3874
3893
  return null;
3875
3894
  const a = e;
@@ -3881,34 +3900,34 @@ const no = (t) => {
3881
3900
  return n ? Oa(n, e?.id) : null;
3882
3901
  }, Aa = (t, e) => {
3883
3902
  const n = e.id, r = t?.filters?.find(
3884
- (c) => c.componentCode === n
3903
+ (i) => i.componentCode === n
3885
3904
  );
3886
3905
  if (!r || !r.values)
3887
3906
  return null;
3888
- const s = r.values?.filter((c) => !!c);
3907
+ const s = r.values?.filter((i) => !!i);
3889
3908
  if (!s.length)
3890
3909
  return null;
3891
3910
  const a = r.operator;
3892
- if (a === R.LESS_OR_EQUAL || a === R.LESS)
3911
+ if (a === _.LESS_OR_EQUAL || a === _.LESS)
3893
3912
  return { startPeriod: null, endPeriod: V(s[0]) };
3894
- if (a === R.GREATER_OR_EQUAL || a === R.GREATER)
3913
+ if (a === _.GREATER_OR_EQUAL || a === _.GREATER)
3895
3914
  return { startPeriod: V(s[0]), endPeriod: null };
3896
- const o = V(s[0]), i = V(s[1]);
3897
- return { startPeriod: o, endPeriod: i };
3915
+ const o = V(s[0]), c = V(s[1]);
3916
+ return { startPeriod: o, endPeriod: c };
3898
3917
  }, xt = (t, e, n) => {
3899
- const r = k(e, !0), s = k(n), a = k(t, !0), o = k(t), i = r.getTime() > a.getTime() ? r : a, c = s.getTime() < o.getTime() ? s : o;
3918
+ const r = R(e, !0), s = R(n), a = R(t, !0), o = R(t), c = r.getTime() > a.getTime() ? r : a, i = s.getTime() < o.getTime() ? s : o;
3900
3919
  return {
3901
- start: i,
3902
- end: c
3920
+ start: c,
3921
+ end: i
3903
3922
  };
3904
3923
  }, Na = (t, e, n, r = "W") => {
3905
3924
  const s = +t, { start: a, end: o } = xt(t, e, n);
3906
3925
  if (a.getTime() > o.getTime())
3907
3926
  return [];
3908
- const i = Z(a, r), c = i.weekYear === s ? i.weekNumber : i.weekYear < s ? 1 : Fe(s, r), u = Z(o, r), d = u.weekYear === s ? u.weekNumber : u.weekYear > s ? Fe(s, r) : 1, l = [];
3909
- if (c < d)
3910
- for (let g = c; g <= d; g++)
3911
- l.push(pt(s, g, r));
3927
+ const c = ee(a, r), i = c.weekYear === s ? c.weekNumber : c.weekYear < s ? 1 : Fe(s, r), u = ee(o, r), d = u.weekYear === s ? u.weekNumber : u.weekYear > s ? Fe(s, r) : 1, l = [];
3928
+ if (i < d)
3929
+ for (let g = i; g <= d; g++)
3930
+ l.push(yt(s, g, r));
3912
3931
  return l;
3913
3932
  }, ka = (t) => {
3914
3933
  const e = new Date(t);
@@ -3921,10 +3940,10 @@ const no = (t) => {
3921
3940
  r.getFullYear(),
3922
3941
  r.getMonth(),
3923
3942
  r.getDate()
3924
- ), i = new Date(s.getFullYear(), s.getMonth(), s.getDate());
3925
- for (; o.getTime() < i.getTime(); ) {
3926
- const c = ka(o);
3927
- a.push(c), o.setDate(o.getDate() + 1);
3943
+ ), c = new Date(s.getFullYear(), s.getMonth(), s.getDate());
3944
+ for (; o.getTime() < c.getTime(); ) {
3945
+ const i = ka(o);
3946
+ a.push(i), o.setDate(o.getDate() + 1);
3928
3947
  }
3929
3948
  return a;
3930
3949
  }, _a = (t) => ({
@@ -3937,34 +3956,34 @@ const no = (t) => {
3937
3956
  ({ memberValue: e }) => e === "A" || e === "Y"
3938
3957
  )
3939
3958
  }), Ia = (t, e, n, r) => {
3940
- const s = r === 0 ? k(e.toString(), !0)?.getMonth() + 1 : void 0, a = r === t.length - 1 ? k(n.toString())?.getMonth() + 1 || 1 : void 0;
3959
+ const s = r === 0 ? R(e.toString(), !0)?.getMonth() + 1 : void 0, a = r === t.length - 1 ? R(n.toString())?.getMonth() + 1 || 1 : void 0;
3941
3960
  return { startMonth: s, endMonth: a };
3942
3961
  }, Ya = ["FREQUENCY", "FREQ"], io = (t, e) => {
3943
3962
  const n = t?.[0]?.cubeRegions?.[0]?.memberSelection?.find(
3944
- (c) => Ya.includes(c.componentId)
3945
- )?.selectionValues, r = _a(n || []), s = e?.startPeriod?.getTime() || 1, a = e?.endPeriod?.getTime() || 1, o = ea(a, s), i = [];
3946
- return o.forEach((c, u) => {
3963
+ (i) => Ya.includes(i.componentId)
3964
+ )?.selectionValues, r = _a(n || []), s = e?.startPeriod?.getTime() || 1, a = e?.endPeriod?.getTime() || 1, o = ea(a, s), c = [];
3965
+ return o.forEach((i, u) => {
3947
3966
  const d = [], { startMonth: l, endMonth: g } = Ia(
3948
3967
  o,
3949
3968
  new Date(s),
3950
3969
  new Date(a),
3951
3970
  u
3952
3971
  ), {
3953
- isDailyExist: x,
3954
- isWeeklyExist: P,
3955
- isMonthlyExist: Y,
3972
+ isDailyExist: M,
3973
+ isWeeklyExist: x,
3974
+ isMonthlyExist: N,
3956
3975
  isQuarterlyExist: f,
3957
3976
  isSemiAnnualExist: w,
3958
- isYearlyExist: M
3977
+ isYearlyExist: P
3959
3978
  } = r;
3960
- M && d.push(c.toString()), w && d.push(...Ks(c, l, g)), f && d.push(
3961
- ...js(c, l, g, !1)
3962
- ), Y && d.push(...Zs(c, l, g)), P && d.push(
3963
- ...Na(c, s.toString(), a.toString())
3964
- ), x && d.push(
3965
- ...Ra(c, s.toString(), a.toString())
3966
- ), i.push(...d);
3967
- }), i;
3979
+ P && d.push(i.toString()), w && d.push(...zs(i, l, g)), f && d.push(
3980
+ ...js(i, l, g, !1)
3981
+ ), N && d.push(...Zs(i, l, g)), x && d.push(
3982
+ ...Na(i, s.toString(), a.toString())
3983
+ ), M && d.push(
3984
+ ...Ra(i, s.toString(), a.toString())
3985
+ ), c.push(...d);
3986
+ }), c;
3968
3987
  };
3969
3988
  function Ca(t) {
3970
3989
  const { urn: e } = t.details;
@@ -3992,7 +4011,7 @@ export {
3992
4011
  $t as GET_v3_FILTER_ALL,
3993
4012
  Sa as GET_v3_FILTER_AND,
3994
4013
  Wt as GET_v3_FILTER_OR,
3995
- ps as OBSERVATION_KEY,
4014
+ ys as OBSERVATION_KEY,
3996
4015
  hs as OccurrenceType,
3997
4016
  aa as Periods,
3998
4017
  sa as RepresentationTextType,
@@ -4003,14 +4022,14 @@ export {
4003
4022
  X as SdmxDataFormat,
4004
4023
  et as SdmxDetails,
4005
4024
  ue as SdmxReferences,
4006
- R as SeriesFilterOperator,
4025
+ _ as SeriesFilterOperator,
4007
4026
  ds as TIME_PERIOD,
4008
4027
  fs as TIME_PERIOD_END_ANNOTATION_KEY,
4009
4028
  ls as TIME_PERIOD_START_ANNOTATION_KEY,
4010
4029
  co as buildDatasetDimensionsMetadataMap,
4011
4030
  Ns as dailyPattern,
4012
4031
  Ts as decodeDimensionId,
4013
- Ka as findCodelistByDimension,
4032
+ za as findCodelistByDimension,
4014
4033
  _e as generateDatasetDataRequest,
4015
4034
  Mt as generateShortUrn,
4016
4035
  io as getAdditionalColumns,
@@ -4020,21 +4039,21 @@ export {
4020
4039
  ws as getAttachedDimensionsSeriesByTsId,
4021
4040
  gt as getAttachedDimensionsSeriesKey,
4022
4041
  gs as getAttributeValueFromDataQueryResponse,
4023
- za as getAvailableCodes,
4042
+ Ka as getAvailableCodes,
4024
4043
  Xa as getAvailableCodesFromConstrains,
4025
4044
  Pt as getChildParsedUrn,
4026
4045
  ke as getConcept,
4027
- Ke as getConceptByUrn,
4046
+ ze as getConceptByUrn,
4028
4047
  xa as getConceptWithScheme,
4029
4048
  Ma as getConvertedMetaAttributes,
4030
4049
  _s as getDailyRegExp,
4031
4050
  Ra as getDaysColumns,
4032
4051
  Ja as getDimensionTitle,
4033
- ze as getDimensions,
4052
+ Ke as getDimensions,
4034
4053
  oa as getFilteredItemsWithParents,
4035
4054
  fa as getFiltersDtoFromDataQuery,
4036
4055
  ja as getFiltersDtoMapFromDataQuery,
4037
- Z as getISOWeek,
4056
+ ee as getISOWeek,
4038
4057
  K as getKeyFromUrn,
4039
4058
  Ga as getLastUpdatedTime,
4040
4059
  Fe as getLastWeekNumberOfYear,
@@ -4044,8 +4063,8 @@ export {
4044
4063
  be as getMonthlyRegExp,
4045
4064
  bt as getParsedEndPeriodDate,
4046
4065
  Fa as getParsedResponse,
4047
- yt as getParsedStartPeriodDate,
4048
- k as getPeriodDate,
4066
+ pt as getParsedStartPeriodDate,
4067
+ R as getPeriodDate,
4049
4068
  _a as getPeriods,
4050
4069
  Ha as getQuarterByMonth,
4051
4070
  Te as getQuarterlyRegExp,
@@ -4053,10 +4072,10 @@ export {
4053
4072
  Oa as getQueryTimePeriodFilters,
4054
4073
  Yt as getRequestAcceptHeader,
4055
4074
  ba as getResolvedVersionBySingleWildcard,
4056
- Ks as getSemiAnnualData,
4075
+ zs as getSemiAnnualData,
4057
4076
  Rs as getSemiAnnuallyRegExp,
4058
4077
  ie as getSeriesAttributes,
4059
- ys as getSeriesName,
4078
+ ps as getSeriesName,
4060
4079
  no as getStructureComponentsMap,
4061
4080
  Za as getStructureDimensions,
4062
4081
  to as getTimeDimension,
@@ -4066,7 +4085,7 @@ export {
4066
4085
  ro as getTimeSeriesCount,
4067
4086
  ao as getTimeSeriesFilterKey,
4068
4087
  Ds as getTimeSeriesId,
4069
- pt as getWeekCode,
4088
+ yt as getWeekCode,
4070
4089
  Ss as getWeeklyPeriodEndDate,
4071
4090
  Ls as getWeeklyPeriodStartDate,
4072
4091
  Ys as getWeeklyRegExp,
@@ -4078,10 +4097,10 @@ export {
4078
4097
  Is as isDaily,
4079
4098
  De as isMonthly,
4080
4099
  Ee as isQuarterly,
4081
- ye as isSemiAnnually,
4100
+ pe as isSemiAnnually,
4082
4101
  xe as isWeekly,
4083
4102
  Ea as isWildCardVersionCorrect,
4084
- pe as isYearly,
4103
+ ye as isYearly,
4085
4104
  ks as monthlyPattern,
4086
4105
  so as openDownloadWindow,
4087
4106
  Ms as quarterPattern,