@pydantic/genai-prices 0.0.48 → 0.0.49

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/cli.js CHANGED
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
- import de from "yargs";
3
- import { format as he } from "util";
4
- import { resolve as ae, normalize as Le } from "path";
5
- import { readFileSync as _e, writeFile as Me, statSync as Ae } from "fs";
2
+ import dt from "yargs";
3
+ import { format as _t } from "util";
4
+ import { resolve as at, normalize as Lt } from "path";
5
+ import { readFileSync as ht, writeFile as Mt, statSync as Qt } from "fs";
6
6
  import "assert";
7
- import { fileURLToPath as Qe } from "url";
8
- function Te() {
9
- return Pe() ? 0 : 1;
7
+ import { fileURLToPath as At } from "url";
8
+ function Tt() {
9
+ return Pt() ? 0 : 1;
10
10
  }
11
- function Pe() {
12
- return Se() && !process.defaultApp;
11
+ function Pt() {
12
+ return St() && !process.defaultApp;
13
13
  }
14
- function Se() {
14
+ function St() {
15
15
  return !!process.versions.electron;
16
16
  }
17
- function Ge(i) {
18
- return i.slice(Te() + 1);
17
+ function Gt(i) {
18
+ return i.slice(Tt() + 1);
19
19
  }
20
20
  /**
21
21
  * @license
@@ -29,23 +29,23 @@ function K(i) {
29
29
  let m = "", s = !1;
30
30
  const u = i.match(/^-+/);
31
31
  for (let k = u ? u[0].length : 0; k < i.length; k++) {
32
- let _ = i.charAt(k);
33
- s && (s = !1, _ = _.toUpperCase()), k !== 0 && (_ === "-" || _ === "_") ? s = !0 : _ !== "-" && _ !== "_" && (m += _);
32
+ let h = i.charAt(k);
33
+ s && (s = !1, h = h.toUpperCase()), k !== 0 && (h === "-" || h === "_") ? s = !0 : h !== "-" && h !== "_" && (m += h);
34
34
  }
35
35
  return m;
36
36
  }
37
37
  }
38
- function Ce(i, n) {
38
+ function Ct(i, n) {
39
39
  const m = i.toLowerCase();
40
40
  n = n || "-";
41
41
  let s = "";
42
42
  for (let u = 0; u < i.length; u++) {
43
- const k = m.charAt(u), _ = i.charAt(u);
44
- k !== _ && u > 0 ? s += `${n}${m.charAt(u)}` : s += _;
43
+ const k = m.charAt(u), h = i.charAt(u);
44
+ k !== h && u > 0 ? s += `${n}${m.charAt(u)}` : s += h;
45
45
  }
46
46
  return s;
47
47
  }
48
- function Re(i) {
48
+ function Rt(i) {
49
49
  return i == null ? !1 : typeof i == "number" || /^0x[0-9a-f]+$/i.test(i) ? !0 : /^0[^.]/.test(i) ? !1 : /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(i);
50
50
  }
51
51
  /**
@@ -53,14 +53,14 @@ function Re(i) {
53
53
  * Copyright (c) 2016, Contributors
54
54
  * SPDX-License-Identifier: ISC
55
55
  */
56
- function ze(i) {
56
+ function zt(i) {
57
57
  if (Array.isArray(i))
58
- return i.map((_) => typeof _ != "string" ? _ + "" : _);
58
+ return i.map((h) => typeof h != "string" ? h + "" : h);
59
59
  i = i.trim();
60
60
  let n = 0, m = null, s = null, u = null;
61
61
  const k = [];
62
- for (let _ = 0; _ < i.length; _++) {
63
- if (m = s, s = i.charAt(_), s === " " && !u) {
62
+ for (let h = 0; h < i.length; h++) {
63
+ if (m = s, s = i.charAt(h), s === " " && !u) {
64
64
  m !== " " && n++;
65
65
  continue;
66
66
  }
@@ -83,7 +83,7 @@ var L;
83
83
  * SPDX-License-Identifier: ISC
84
84
  */
85
85
  let T;
86
- class Oe {
86
+ class Nt {
87
87
  constructor(n) {
88
88
  T = n;
89
89
  }
@@ -105,7 +105,7 @@ class Oe {
105
105
  number: void 0,
106
106
  __: void 0,
107
107
  key: void 0
108
- }, m), u = ze(n), k = typeof n == "string", _ = Ne(Object.assign(/* @__PURE__ */ Object.create(null), s.alias)), h = Object.assign({
108
+ }, m), u = zt(n), k = typeof n == "string", h = Ot(Object.assign(/* @__PURE__ */ Object.create(null), s.alias)), _ = Object.assign({
109
109
  "boolean-negation": !0,
110
110
  "camel-case-expansion": !0,
111
111
  "combine-arrays": !1,
@@ -124,7 +124,7 @@ class Oe {
124
124
  "strip-aliased": !1,
125
125
  "strip-dashed": !1,
126
126
  "unknown-options-as-args": !1
127
- }, s.configuration), q = Object.assign(/* @__PURE__ */ Object.create(null), s.default), B = s.configObjects || [], A = s.envPrefix, P = h["populate--"], S = P ? "--" : "_", D = /* @__PURE__ */ Object.create(null), oe = /* @__PURE__ */ Object.create(null), G = s.__ || T.format, r = {
127
+ }, s.configuration), q = Object.assign(/* @__PURE__ */ Object.create(null), s.default), B = s.configObjects || [], Q = s.envPrefix, P = _["populate--"], S = P ? "--" : "_", D = /* @__PURE__ */ Object.create(null), ot = /* @__PURE__ */ Object.create(null), G = s.__ || T.format, r = {
128
128
  aliases: /* @__PURE__ */ Object.create(null),
129
129
  arrays: /* @__PURE__ */ Object.create(null),
130
130
  bools: /* @__PURE__ */ Object.create(null),
@@ -136,9 +136,9 @@ class Oe {
136
136
  nargs: /* @__PURE__ */ Object.create(null),
137
137
  coercions: /* @__PURE__ */ Object.create(null),
138
138
  keys: []
139
- }, M = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, W = new RegExp("^--" + h["negation-prefix"] + "(.+)");
140
- [].concat(s.array || []).filter(Boolean).forEach(function(e) {
141
- const a = typeof e == "object" ? e.key : e, c = Object.keys(e).map(function(o) {
139
+ }, M = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, W = new RegExp("^--" + _["negation-prefix"] + "(.+)");
140
+ [].concat(s.array || []).filter(Boolean).forEach(function(t) {
141
+ const a = typeof t == "object" ? t.key : t, c = Object.keys(t).map(function(o) {
142
142
  return {
143
143
  boolean: "bools",
144
144
  string: "strings",
@@ -146,56 +146,56 @@ class Oe {
146
146
  }[o];
147
147
  }).filter(Boolean).pop();
148
148
  c && (r[c][a] = !0), r.arrays[a] = !0, r.keys.push(a);
149
- }), [].concat(s.boolean || []).filter(Boolean).forEach(function(e) {
150
- r.bools[e] = !0, r.keys.push(e);
151
- }), [].concat(s.string || []).filter(Boolean).forEach(function(e) {
152
- r.strings[e] = !0, r.keys.push(e);
153
- }), [].concat(s.number || []).filter(Boolean).forEach(function(e) {
154
- r.numbers[e] = !0, r.keys.push(e);
155
- }), [].concat(s.count || []).filter(Boolean).forEach(function(e) {
156
- r.counts[e] = !0, r.keys.push(e);
157
- }), [].concat(s.normalize || []).filter(Boolean).forEach(function(e) {
158
- r.normalize[e] = !0, r.keys.push(e);
159
- }), typeof s.narg == "object" && Object.entries(s.narg).forEach(([e, a]) => {
160
- typeof a == "number" && (r.nargs[e] = a, r.keys.push(e));
161
- }), typeof s.coerce == "object" && Object.entries(s.coerce).forEach(([e, a]) => {
162
- typeof a == "function" && (r.coercions[e] = a, r.keys.push(e));
163
- }), typeof s.config < "u" && (Array.isArray(s.config) || typeof s.config == "string" ? [].concat(s.config).filter(Boolean).forEach(function(e) {
164
- r.configs[e] = !0;
165
- }) : typeof s.config == "object" && Object.entries(s.config).forEach(([e, a]) => {
166
- (typeof a == "boolean" || typeof a == "function") && (r.configs[e] = a);
167
- })), be(s.key, _, s.default, r.arrays), Object.keys(q).forEach(function(e) {
168
- (r.aliases[e] || []).forEach(function(a) {
169
- q[a] = q[e];
149
+ }), [].concat(s.boolean || []).filter(Boolean).forEach(function(t) {
150
+ r.bools[t] = !0, r.keys.push(t);
151
+ }), [].concat(s.string || []).filter(Boolean).forEach(function(t) {
152
+ r.strings[t] = !0, r.keys.push(t);
153
+ }), [].concat(s.number || []).filter(Boolean).forEach(function(t) {
154
+ r.numbers[t] = !0, r.keys.push(t);
155
+ }), [].concat(s.count || []).filter(Boolean).forEach(function(t) {
156
+ r.counts[t] = !0, r.keys.push(t);
157
+ }), [].concat(s.normalize || []).filter(Boolean).forEach(function(t) {
158
+ r.normalize[t] = !0, r.keys.push(t);
159
+ }), typeof s.narg == "object" && Object.entries(s.narg).forEach(([t, a]) => {
160
+ typeof a == "number" && (r.nargs[t] = a, r.keys.push(t));
161
+ }), typeof s.coerce == "object" && Object.entries(s.coerce).forEach(([t, a]) => {
162
+ typeof a == "function" && (r.coercions[t] = a, r.keys.push(t));
163
+ }), typeof s.config < "u" && (Array.isArray(s.config) || typeof s.config == "string" ? [].concat(s.config).filter(Boolean).forEach(function(t) {
164
+ r.configs[t] = !0;
165
+ }) : typeof s.config == "object" && Object.entries(s.config).forEach(([t, a]) => {
166
+ (typeof a == "boolean" || typeof a == "function") && (r.configs[t] = a);
167
+ })), bt(s.key, h, s.default, r.arrays), Object.keys(q).forEach(function(t) {
168
+ (r.aliases[t] || []).forEach(function(a) {
169
+ q[a] = q[t];
170
170
  });
171
171
  });
172
- let y = null;
173
- Ie();
172
+ let I = null;
173
+ yt();
174
174
  let j = [];
175
- const w = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }), ne = {};
176
- for (let e = 0; e < u.length; e++) {
177
- const a = u[e], c = a.replace(/^-{3,}/, "---");
178
- let o, t, l, p, d, v;
175
+ const w = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }), nt = {};
176
+ for (let t = 0; t < u.length; t++) {
177
+ const a = u[t], c = a.replace(/^-{3,}/, "---");
178
+ let o, e, l, p, d, v;
179
179
  if (a !== "--" && /^-/.test(a) && $(a))
180
180
  U(a);
181
181
  else if (c.match(/^---+(=|$)/)) {
182
182
  U(a);
183
183
  continue;
184
- } else if (a.match(/^--.+=/) || !h["short-option-groups"] && a.match(/^-.+=/))
185
- p = a.match(/^--?([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && (g(p[1], r.arrays) ? e = F(e, p[1], u, p[2]) : g(p[1], r.nargs) !== !1 ? e = V(e, p[1], u, p[2]) : b(p[1], p[2], !0));
186
- else if (a.match(W) && h["boolean-negation"])
187
- p = a.match(W), p !== null && Array.isArray(p) && p.length >= 2 && (t = p[1], b(t, g(t, r.arrays) ? [!1] : !1));
188
- else if (a.match(/^--.+/) || !h["short-option-groups"] && a.match(/^-[^-]+/))
189
- p = a.match(/^--?(.+)/), p !== null && Array.isArray(p) && p.length >= 2 && (t = p[1], g(t, r.arrays) ? e = F(e, t, u) : g(t, r.nargs) !== !1 ? e = V(e, t, u) : (d = u[e + 1], d !== void 0 && (!d.match(/^-/) || d.match(M)) && !g(t, r.bools) && !g(t, r.counts) || /^(true|false)$/.test(d) ? (b(t, d), e++) : b(t, R(t))));
184
+ } else if (a.match(/^--.+=/) || !_["short-option-groups"] && a.match(/^-.+=/))
185
+ p = a.match(/^--?([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && (g(p[1], r.arrays) ? t = F(t, p[1], u, p[2]) : g(p[1], r.nargs) !== !1 ? t = V(t, p[1], u, p[2]) : b(p[1], p[2], !0));
186
+ else if (a.match(W) && _["boolean-negation"])
187
+ p = a.match(W), p !== null && Array.isArray(p) && p.length >= 2 && (e = p[1], b(e, g(e, r.arrays) ? [!1] : !1));
188
+ else if (a.match(/^--.+/) || !_["short-option-groups"] && a.match(/^-[^-]+/))
189
+ p = a.match(/^--?(.+)/), p !== null && Array.isArray(p) && p.length >= 2 && (e = p[1], g(e, r.arrays) ? t = F(t, e, u) : g(e, r.nargs) !== !1 ? t = V(t, e, u) : (d = u[t + 1], d !== void 0 && (!d.match(/^-/) || d.match(M)) && !g(e, r.bools) && !g(e, r.counts) || /^(true|false)$/.test(d) ? (b(e, d), t++) : b(e, R(e))));
190
190
  else if (a.match(/^-.\..+=/))
191
191
  p = a.match(/^-([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && b(p[1], p[2]);
192
192
  else if (a.match(/^-.\..+/) && !a.match(M))
193
- d = u[e + 1], p = a.match(/^-(.\..+)/), p !== null && Array.isArray(p) && p.length >= 2 && (t = p[1], d !== void 0 && !d.match(/^-/) && !g(t, r.bools) && !g(t, r.counts) ? (b(t, d), e++) : b(t, R(t)));
193
+ d = u[t + 1], p = a.match(/^-(.\..+)/), p !== null && Array.isArray(p) && p.length >= 2 && (e = p[1], d !== void 0 && !d.match(/^-/) && !g(e, r.bools) && !g(e, r.counts) ? (b(e, d), t++) : b(e, R(e)));
194
194
  else if (a.match(/^-[^-]+/) && !a.match(M)) {
195
195
  l = a.slice(1, -1).split(""), o = !1;
196
196
  for (let x = 0; x < l.length; x++) {
197
197
  if (d = a.slice(x + 2), l[x + 1] && l[x + 1] === "=") {
198
- v = a.slice(x + 3), t = l[x], g(t, r.arrays) ? e = F(e, t, u, v) : g(t, r.nargs) !== !1 ? e = V(e, t, u, v) : b(t, v), o = !0;
198
+ v = a.slice(x + 3), e = l[x], g(e, r.arrays) ? t = F(t, e, u, v) : g(e, r.nargs) !== !1 ? t = V(t, e, u, v) : b(e, v), o = !0;
199
199
  break;
200
200
  }
201
201
  if (d === "-") {
@@ -212,82 +212,82 @@ class Oe {
212
212
  } else
213
213
  b(l[x], R(l[x]));
214
214
  }
215
- t = a.slice(-1)[0], !o && t !== "-" && (g(t, r.arrays) ? e = F(e, t, u) : g(t, r.nargs) !== !1 ? e = V(e, t, u) : (d = u[e + 1], d !== void 0 && (!/^(-|--)[^-]/.test(d) || d.match(M)) && !g(t, r.bools) && !g(t, r.counts) || /^(true|false)$/.test(d) ? (b(t, d), e++) : b(t, R(t))));
215
+ e = a.slice(-1)[0], !o && e !== "-" && (g(e, r.arrays) ? t = F(t, e, u) : g(e, r.nargs) !== !1 ? t = V(t, e, u) : (d = u[t + 1], d !== void 0 && (!/^(-|--)[^-]/.test(d) || d.match(M)) && !g(e, r.bools) && !g(e, r.counts) || /^(true|false)$/.test(d) ? (b(e, d), t++) : b(e, R(e))));
216
216
  } else if (a.match(/^-[0-9]$/) && a.match(M) && g(a.slice(1), r.bools))
217
- t = a.slice(1), b(t, R(t));
217
+ e = a.slice(1), b(e, R(e));
218
218
  else if (a === "--") {
219
- j = u.slice(e + 1);
219
+ j = u.slice(t + 1);
220
220
  break;
221
- } else if (h["halt-at-non-option"]) {
222
- j = u.slice(e);
221
+ } else if (_["halt-at-non-option"]) {
222
+ j = u.slice(t);
223
223
  break;
224
224
  } else
225
225
  U(a);
226
226
  }
227
- re(w, !0), re(w, !1), ke(w), ge(), me(w, r.aliases, q, !0), qe(w), h["set-placeholder-key"] && fe(w), Object.keys(r.counts).forEach(function(e) {
228
- z(w, e.split(".")) || b(e, 0);
229
- }), P && j.length && (w[S] = []), j.forEach(function(e) {
230
- w[S].push(e);
231
- }), h["camel-case-expansion"] && h["strip-dashed"] && Object.keys(w).filter((e) => e !== "--" && e.includes("-")).forEach((e) => {
232
- delete w[e];
233
- }), h["strip-aliased"] && [].concat(...Object.keys(_).map((e) => _[e])).forEach((e) => {
234
- h["camel-case-expansion"] && e.includes("-") && delete w[e.split(".").map((a) => K(a)).join(".")], delete w[e];
227
+ rt(w, !0), rt(w, !1), kt(w), gt(), mt(w, r.aliases, q, !0), qt(w), _["set-placeholder-key"] && ft(w), Object.keys(r.counts).forEach(function(t) {
228
+ z(w, t.split(".")) || b(t, 0);
229
+ }), P && j.length && (w[S] = []), j.forEach(function(t) {
230
+ w[S].push(t);
231
+ }), _["camel-case-expansion"] && _["strip-dashed"] && Object.keys(w).filter((t) => t !== "--" && t.includes("-")).forEach((t) => {
232
+ delete w[t];
233
+ }), _["strip-aliased"] && [].concat(...Object.keys(h).map((t) => h[t])).forEach((t) => {
234
+ _["camel-case-expansion"] && t.includes("-") && delete w[t.split(".").map((a) => K(a)).join(".")], delete w[t];
235
235
  });
236
- function U(e) {
237
- const a = H("_", e);
236
+ function U(t) {
237
+ const a = H("_", t);
238
238
  (typeof a == "string" || typeof a == "number") && w._.push(a);
239
239
  }
240
- function V(e, a, c, o) {
241
- let t, l = g(a, r.nargs);
240
+ function V(t, a, c, o) {
241
+ let e, l = g(a, r.nargs);
242
242
  if (l = typeof l != "number" || isNaN(l) ? 1 : l, l === 0)
243
- return Q(o) || (y = Error(G("Argument unexpected for: %s", a))), b(a, R(a)), e;
244
- let p = Q(o) ? 0 : 1;
245
- if (h["nargs-eats-options"])
246
- c.length - (e + 1) + p < l && (y = Error(G("Not enough arguments following: %s", a))), p = l;
243
+ return A(o) || (I = Error(G("Argument unexpected for: %s", a))), b(a, R(a)), t;
244
+ let p = A(o) ? 0 : 1;
245
+ if (_["nargs-eats-options"])
246
+ c.length - (t + 1) + p < l && (I = Error(G("Not enough arguments following: %s", a))), p = l;
247
247
  else {
248
- for (t = e + 1; t < c.length && (!c[t].match(/^-[^0-9]/) || c[t].match(M) || $(c[t])); t++)
248
+ for (e = t + 1; e < c.length && (!c[e].match(/^-[^0-9]/) || c[e].match(M) || $(c[e])); e++)
249
249
  p++;
250
- p < l && (y = Error(G("Not enough arguments following: %s", a)));
250
+ p < l && (I = Error(G("Not enough arguments following: %s", a)));
251
251
  }
252
252
  let d = Math.min(p, l);
253
- for (!Q(o) && d > 0 && (b(a, o), d--), t = e + 1; t < d + e + 1; t++)
254
- b(a, c[t]);
255
- return e + d;
253
+ for (!A(o) && d > 0 && (b(a, o), d--), e = t + 1; e < d + t + 1; e++)
254
+ b(a, c[e]);
255
+ return t + d;
256
256
  }
257
- function F(e, a, c, o) {
258
- let t = [], l = o || c[e + 1];
257
+ function F(t, a, c, o) {
258
+ let e = [], l = o || c[t + 1];
259
259
  const p = g(a, r.nargs);
260
260
  if (g(a, r.bools) && !/^(true|false)$/.test(l))
261
- t.push(!0);
262
- else if (Q(l) || Q(o) && /^-/.test(l) && !M.test(l) && !$(l)) {
261
+ e.push(!0);
262
+ else if (A(l) || A(o) && /^-/.test(l) && !M.test(l) && !$(l)) {
263
263
  if (q[a] !== void 0) {
264
264
  const d = q[a];
265
- t = Array.isArray(d) ? d : [d];
265
+ e = Array.isArray(d) ? d : [d];
266
266
  }
267
267
  } else {
268
- Q(o) || t.push(Y(a, o, !0));
269
- for (let d = e + 1; d < c.length && !(!h["greedy-arrays"] && t.length > 0 || p && typeof p == "number" && t.length >= p || (l = c[d], /^-/.test(l) && !M.test(l) && !$(l))); d++)
270
- e = d, t.push(Y(a, l, k));
268
+ A(o) || e.push(Y(a, o, !0));
269
+ for (let d = t + 1; d < c.length && !(!_["greedy-arrays"] && e.length > 0 || p && typeof p == "number" && e.length >= p || (l = c[d], /^-/.test(l) && !M.test(l) && !$(l))); d++)
270
+ t = d, e.push(Y(a, l, k));
271
271
  }
272
- return typeof p == "number" && (p && t.length < p || isNaN(p) && t.length === 0) && (y = Error(G("Not enough arguments following: %s", a))), b(a, t), e;
272
+ return typeof p == "number" && (p && e.length < p || isNaN(p) && e.length === 0) && (I = Error(G("Not enough arguments following: %s", a))), b(a, e), t;
273
273
  }
274
- function b(e, a, c = k) {
275
- if (/-/.test(e) && h["camel-case-expansion"]) {
276
- const l = e.split(".").map(function(p) {
274
+ function b(t, a, c = k) {
275
+ if (/-/.test(t) && _["camel-case-expansion"]) {
276
+ const l = t.split(".").map(function(p) {
277
277
  return K(p);
278
278
  }).join(".");
279
- se(e, l);
279
+ st(t, l);
280
280
  }
281
- const o = Y(e, a, c), t = e.split(".");
282
- O(w, t, o), r.aliases[e] && r.aliases[e].forEach(function(l) {
281
+ const o = Y(t, a, c), e = t.split(".");
282
+ N(w, e, o), r.aliases[t] && r.aliases[t].forEach(function(l) {
283
283
  const p = l.split(".");
284
- O(w, p, o);
285
- }), t.length > 1 && h["dot-notation"] && (r.aliases[t[0]] || []).forEach(function(l) {
284
+ N(w, p, o);
285
+ }), e.length > 1 && _["dot-notation"] && (r.aliases[e[0]] || []).forEach(function(l) {
286
286
  let p = l.split(".");
287
- const d = [].concat(t);
288
- d.shift(), p = p.concat(d), (r.aliases[e] || []).includes(p.join(".")) || O(w, p, o);
289
- }), g(e, r.normalize) && !g(e, r.arrays) && [e].concat(r.aliases[e] || []).forEach(function(p) {
290
- Object.defineProperty(ne, p, {
287
+ const d = [].concat(e);
288
+ d.shift(), p = p.concat(d), (r.aliases[t] || []).includes(p.join(".")) || N(w, p, o);
289
+ }), g(t, r.normalize) && !g(t, r.arrays) && [t].concat(r.aliases[t] || []).forEach(function(p) {
290
+ Object.defineProperty(nt, p, {
291
291
  enumerable: !0,
292
292
  get() {
293
293
  return a;
@@ -298,203 +298,203 @@ class Oe {
298
298
  });
299
299
  });
300
300
  }
301
- function se(e, a) {
302
- r.aliases[e] && r.aliases[e].length || (r.aliases[e] = [a], D[a] = !0), r.aliases[a] && r.aliases[a].length || se(a, e);
301
+ function st(t, a) {
302
+ r.aliases[t] && r.aliases[t].length || (r.aliases[t] = [a], D[a] = !0), r.aliases[a] && r.aliases[a].length || st(a, t);
303
303
  }
304
- function Y(e, a, c) {
305
- c && (a = Ee(a)), (g(e, r.bools) || g(e, r.counts)) && typeof a == "string" && (a = a === "true");
306
- let o = Array.isArray(a) ? a.map(function(t) {
307
- return H(e, t);
308
- }) : H(e, a);
309
- return g(e, r.counts) && (Q(o) || typeof o == "boolean") && (o = Z()), g(e, r.normalize) && g(e, r.arrays) && (Array.isArray(a) ? o = a.map((t) => T.normalize(t)) : o = T.normalize(a)), o;
304
+ function Y(t, a, c) {
305
+ c && (a = Et(a)), (g(t, r.bools) || g(t, r.counts)) && typeof a == "string" && (a = a === "true");
306
+ let o = Array.isArray(a) ? a.map(function(e) {
307
+ return H(t, e);
308
+ }) : H(t, a);
309
+ return g(t, r.counts) && (A(o) || typeof o == "boolean") && (o = Z()), g(t, r.normalize) && g(t, r.arrays) && (Array.isArray(a) ? o = a.map((e) => T.normalize(e)) : o = T.normalize(a)), o;
310
310
  }
311
- function H(e, a) {
312
- return !h["parse-positional-numbers"] && e === "_" || !g(e, r.strings) && !g(e, r.bools) && !Array.isArray(a) && (Re(a) && h["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${a}`))) || !Q(a) && g(e, r.numbers)) && (a = Number(a)), a;
311
+ function H(t, a) {
312
+ return !_["parse-positional-numbers"] && t === "_" || !g(t, r.strings) && !g(t, r.bools) && !Array.isArray(a) && (Rt(a) && _["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${a}`))) || !A(a) && g(t, r.numbers)) && (a = Number(a)), a;
313
313
  }
314
- function ke(e) {
314
+ function kt(t) {
315
315
  const a = /* @__PURE__ */ Object.create(null);
316
- me(a, r.aliases, q), Object.keys(r.configs).forEach(function(c) {
317
- const o = e[c] || a[c];
316
+ mt(a, r.aliases, q), Object.keys(r.configs).forEach(function(c) {
317
+ const o = t[c] || a[c];
318
318
  if (o)
319
319
  try {
320
- let t = null;
320
+ let e = null;
321
321
  const l = T.resolve(T.cwd(), o), p = r.configs[c];
322
322
  if (typeof p == "function") {
323
323
  try {
324
- t = p(l);
324
+ e = p(l);
325
325
  } catch (d) {
326
- t = d;
326
+ e = d;
327
327
  }
328
- if (t instanceof Error) {
329
- y = t;
328
+ if (e instanceof Error) {
329
+ I = e;
330
330
  return;
331
331
  }
332
332
  } else
333
- t = T.require(l);
334
- J(t);
335
- } catch (t) {
336
- t.name === "PermissionDenied" ? y = t : e[c] && (y = Error(G("Invalid JSON config file: %s", o)));
333
+ e = T.require(l);
334
+ J(e);
335
+ } catch (e) {
336
+ e.name === "PermissionDenied" ? I = e : t[c] && (I = Error(G("Invalid JSON config file: %s", o)));
337
337
  }
338
338
  });
339
339
  }
340
- function J(e, a) {
341
- Object.keys(e).forEach(function(c) {
342
- const o = e[c], t = a ? a + "." + c : c;
343
- typeof o == "object" && o !== null && !Array.isArray(o) && h["dot-notation"] ? J(o, t) : (!z(w, t.split(".")) || g(t, r.arrays) && h["combine-arrays"]) && b(t, o);
340
+ function J(t, a) {
341
+ Object.keys(t).forEach(function(c) {
342
+ const o = t[c], e = a ? a + "." + c : c;
343
+ typeof o == "object" && o !== null && !Array.isArray(o) && _["dot-notation"] ? J(o, e) : (!z(w, e.split(".")) || g(e, r.arrays) && _["combine-arrays"]) && b(e, o);
344
344
  });
345
345
  }
346
- function ge() {
347
- typeof B < "u" && B.forEach(function(e) {
348
- J(e);
346
+ function gt() {
347
+ typeof B < "u" && B.forEach(function(t) {
348
+ J(t);
349
349
  });
350
350
  }
351
- function re(e, a) {
352
- if (typeof A > "u")
351
+ function rt(t, a) {
352
+ if (typeof Q > "u")
353
353
  return;
354
- const c = typeof A == "string" ? A : "", o = T.env();
355
- Object.keys(o).forEach(function(t) {
356
- if (c === "" || t.lastIndexOf(c, 0) === 0) {
357
- const l = t.split("__").map(function(p, d) {
354
+ const c = typeof Q == "string" ? Q : "", o = T.env();
355
+ Object.keys(o).forEach(function(e) {
356
+ if (c === "" || e.lastIndexOf(c, 0) === 0) {
357
+ const l = e.split("__").map(function(p, d) {
358
358
  return d === 0 && (p = p.substring(c.length)), K(p);
359
359
  });
360
- (a && r.configs[l.join(".")] || !a) && !z(e, l) && b(l.join("."), o[t]);
360
+ (a && r.configs[l.join(".")] || !a) && !z(t, l) && b(l.join("."), o[e]);
361
361
  }
362
362
  });
363
363
  }
364
- function qe(e) {
364
+ function qt(t) {
365
365
  let a;
366
366
  const c = /* @__PURE__ */ new Set();
367
- Object.keys(e).forEach(function(o) {
367
+ Object.keys(t).forEach(function(o) {
368
368
  if (!c.has(o) && (a = g(o, r.coercions), typeof a == "function"))
369
369
  try {
370
- const t = H(o, a(e[o]));
370
+ const e = H(o, a(t[o]));
371
371
  [].concat(r.aliases[o] || [], o).forEach((l) => {
372
- c.add(l), e[l] = t;
372
+ c.add(l), t[l] = e;
373
373
  });
374
- } catch (t) {
375
- y = t;
374
+ } catch (e) {
375
+ I = e;
376
376
  }
377
377
  });
378
378
  }
379
- function fe(e) {
379
+ function ft(t) {
380
380
  return r.keys.forEach((a) => {
381
- ~a.indexOf(".") || typeof e[a] > "u" && (e[a] = void 0);
382
- }), e;
381
+ ~a.indexOf(".") || typeof t[a] > "u" && (t[a] = void 0);
382
+ }), t;
383
383
  }
384
- function me(e, a, c, o = !1) {
385
- Object.keys(c).forEach(function(t) {
386
- z(e, t.split(".")) || (O(e, t.split("."), c[t]), o && (oe[t] = !0), (a[t] || []).forEach(function(l) {
387
- z(e, l.split(".")) || O(e, l.split("."), c[t]);
384
+ function mt(t, a, c, o = !1) {
385
+ Object.keys(c).forEach(function(e) {
386
+ z(t, e.split(".")) || (N(t, e.split("."), c[e]), o && (ot[e] = !0), (a[e] || []).forEach(function(l) {
387
+ z(t, l.split(".")) || N(t, l.split("."), c[e]);
388
388
  }));
389
389
  });
390
390
  }
391
- function z(e, a) {
392
- let c = e;
393
- h["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(t) {
394
- c = c[t] || {};
391
+ function z(t, a) {
392
+ let c = t;
393
+ _["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(e) {
394
+ c = c[e] || {};
395
395
  });
396
396
  const o = a[a.length - 1];
397
397
  return typeof c != "object" ? !1 : o in c;
398
398
  }
399
- function O(e, a, c) {
400
- let o = e;
401
- h["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(v) {
402
- v = ce(v), typeof o == "object" && o[v] === void 0 && (o[v] = {}), typeof o[v] != "object" || Array.isArray(o[v]) ? (Array.isArray(o[v]) ? o[v].push({}) : o[v] = [o[v], {}], o = o[v][o[v].length - 1]) : o = o[v];
399
+ function N(t, a, c) {
400
+ let o = t;
401
+ _["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(v) {
402
+ v = ct(v), typeof o == "object" && o[v] === void 0 && (o[v] = {}), typeof o[v] != "object" || Array.isArray(o[v]) ? (Array.isArray(o[v]) ? o[v].push({}) : o[v] = [o[v], {}], o = o[v][o[v].length - 1]) : o = o[v];
403
403
  });
404
- const t = ce(a[a.length - 1]), l = g(a.join("."), r.arrays), p = Array.isArray(c);
405
- let d = h["duplicate-arguments-array"];
406
- !d && g(t, r.nargs) && (d = !0, (!Q(o[t]) && r.nargs[t] === 1 || Array.isArray(o[t]) && o[t].length === r.nargs[t]) && (o[t] = void 0)), c === Z() ? o[t] = Z(o[t]) : Array.isArray(o[t]) ? d && l && p ? o[t] = h["flatten-duplicate-arrays"] ? o[t].concat(c) : (Array.isArray(o[t][0]) ? o[t] : [o[t]]).concat([c]) : !d && !!l == !!p ? o[t] = c : o[t] = o[t].concat([c]) : o[t] === void 0 && l ? o[t] = p ? c : [c] : d && !(o[t] === void 0 || g(t, r.counts) || g(t, r.bools)) ? o[t] = [o[t], c] : o[t] = c;
404
+ const e = ct(a[a.length - 1]), l = g(a.join("."), r.arrays), p = Array.isArray(c);
405
+ let d = _["duplicate-arguments-array"];
406
+ !d && g(e, r.nargs) && (d = !0, (!A(o[e]) && r.nargs[e] === 1 || Array.isArray(o[e]) && o[e].length === r.nargs[e]) && (o[e] = void 0)), c === Z() ? o[e] = Z(o[e]) : Array.isArray(o[e]) ? d && l && p ? o[e] = _["flatten-duplicate-arrays"] ? o[e].concat(c) : (Array.isArray(o[e][0]) ? o[e] : [o[e]]).concat([c]) : !d && !!l == !!p ? o[e] = c : o[e] = o[e].concat([c]) : o[e] === void 0 && l ? o[e] = p ? c : [c] : d && !(o[e] === void 0 || g(e, r.counts) || g(e, r.bools)) ? o[e] = [o[e], c] : o[e] = c;
407
407
  }
408
- function be(...e) {
409
- e.forEach(function(a) {
408
+ function bt(...t) {
409
+ t.forEach(function(a) {
410
410
  Object.keys(a || {}).forEach(function(c) {
411
- r.aliases[c] || (r.aliases[c] = [].concat(_[c] || []), r.aliases[c].concat(c).forEach(function(o) {
412
- if (/-/.test(o) && h["camel-case-expansion"]) {
413
- const t = K(o);
414
- t !== c && r.aliases[c].indexOf(t) === -1 && (r.aliases[c].push(t), D[t] = !0);
411
+ r.aliases[c] || (r.aliases[c] = [].concat(h[c] || []), r.aliases[c].concat(c).forEach(function(o) {
412
+ if (/-/.test(o) && _["camel-case-expansion"]) {
413
+ const e = K(o);
414
+ e !== c && r.aliases[c].indexOf(e) === -1 && (r.aliases[c].push(e), D[e] = !0);
415
415
  }
416
416
  }), r.aliases[c].concat(c).forEach(function(o) {
417
- if (o.length > 1 && /[A-Z]/.test(o) && h["camel-case-expansion"]) {
418
- const t = Ce(o, "-");
419
- t !== c && r.aliases[c].indexOf(t) === -1 && (r.aliases[c].push(t), D[t] = !0);
417
+ if (o.length > 1 && /[A-Z]/.test(o) && _["camel-case-expansion"]) {
418
+ const e = Ct(o, "-");
419
+ e !== c && r.aliases[c].indexOf(e) === -1 && (r.aliases[c].push(e), D[e] = !0);
420
420
  }
421
421
  }), r.aliases[c].forEach(function(o) {
422
- r.aliases[o] = [c].concat(r.aliases[c].filter(function(t) {
423
- return o !== t;
422
+ r.aliases[o] = [c].concat(r.aliases[c].filter(function(e) {
423
+ return o !== e;
424
424
  }));
425
425
  }));
426
426
  });
427
427
  });
428
428
  }
429
- function g(e, a) {
430
- const c = [].concat(r.aliases[e] || [], e), o = Object.keys(a), t = c.find((l) => o.includes(l));
431
- return t ? a[t] : !1;
429
+ function g(t, a) {
430
+ const c = [].concat(r.aliases[t] || [], t), o = Object.keys(a), e = c.find((l) => o.includes(l));
431
+ return e ? a[e] : !1;
432
432
  }
433
- function ue(e) {
433
+ function ut(t) {
434
434
  const a = Object.keys(r);
435
435
  return [].concat(a.map((o) => r[o])).some(function(o) {
436
- return Array.isArray(o) ? o.includes(e) : o[e];
436
+ return Array.isArray(o) ? o.includes(t) : o[t];
437
437
  });
438
438
  }
439
- function we(e, ...a) {
439
+ function wt(t, ...a) {
440
440
  return [].concat(...a).some(function(o) {
441
- const t = e.match(o);
442
- return t && ue(t[1]);
441
+ const e = t.match(o);
442
+ return e && ut(e[1]);
443
443
  });
444
444
  }
445
- function ve(e) {
446
- if (e.match(M) || !e.match(/^-[^-]+/))
445
+ function vt(t) {
446
+ if (t.match(M) || !t.match(/^-[^-]+/))
447
447
  return !1;
448
448
  let a = !0, c;
449
- const o = e.slice(1).split("");
450
- for (let t = 0; t < o.length; t++) {
451
- if (c = e.slice(t + 2), !ue(o[t])) {
449
+ const o = t.slice(1).split("");
450
+ for (let e = 0; e < o.length; e++) {
451
+ if (c = t.slice(e + 2), !ut(o[e])) {
452
452
  a = !1;
453
453
  break;
454
454
  }
455
- if (o[t + 1] && o[t + 1] === "=" || c === "-" || /[A-Za-z]/.test(o[t]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(c) || o[t + 1] && o[t + 1].match(/\W/))
455
+ if (o[e + 1] && o[e + 1] === "=" || c === "-" || /[A-Za-z]/.test(o[e]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(c) || o[e + 1] && o[e + 1].match(/\W/))
456
456
  break;
457
457
  }
458
458
  return a;
459
459
  }
460
- function $(e) {
461
- return h["unknown-options-as-args"] && xe(e);
460
+ function $(t) {
461
+ return _["unknown-options-as-args"] && xt(t);
462
462
  }
463
- function xe(e) {
464
- return e = e.replace(/^-{3,}/, "--"), e.match(M) || ve(e) ? !1 : !we(e, /^-+([^=]+?)=[\s\S]*$/, W, /^-+([^=]+?)$/, /^-+([^=]+?)-$/, /^-+([^=]+?\d+)$/, /^-+([^=]+?)\W+.*$/);
463
+ function xt(t) {
464
+ return t = t.replace(/^-{3,}/, "--"), t.match(M) || vt(t) ? !1 : !wt(t, /^-+([^=]+?)=[\s\S]*$/, W, /^-+([^=]+?)$/, /^-+([^=]+?)-$/, /^-+([^=]+?\d+)$/, /^-+([^=]+?)\W+.*$/);
465
465
  }
466
- function R(e) {
467
- return !g(e, r.bools) && !g(e, r.counts) && `${e}` in q ? q[e] : Be(ye(e));
466
+ function R(t) {
467
+ return !g(t, r.bools) && !g(t, r.counts) && `${t}` in q ? q[t] : Bt(It(t));
468
468
  }
469
- function Be(e) {
469
+ function Bt(t) {
470
470
  return {
471
471
  [L.BOOLEAN]: !0,
472
472
  [L.STRING]: "",
473
473
  [L.NUMBER]: void 0,
474
474
  [L.ARRAY]: []
475
- }[e];
475
+ }[t];
476
476
  }
477
- function ye(e) {
477
+ function It(t) {
478
478
  let a = L.BOOLEAN;
479
- return g(e, r.strings) ? a = L.STRING : g(e, r.numbers) ? a = L.NUMBER : g(e, r.bools) ? a = L.BOOLEAN : g(e, r.arrays) && (a = L.ARRAY), a;
479
+ return g(t, r.strings) ? a = L.STRING : g(t, r.numbers) ? a = L.NUMBER : g(t, r.bools) ? a = L.BOOLEAN : g(t, r.arrays) && (a = L.ARRAY), a;
480
480
  }
481
- function Q(e) {
482
- return e === void 0;
481
+ function A(t) {
482
+ return t === void 0;
483
483
  }
484
- function Ie() {
485
- Object.keys(r.counts).find((e) => g(e, r.arrays) ? (y = Error(G("Invalid configuration: %s, opts.count excludes opts.array.", e)), !0) : g(e, r.nargs) ? (y = Error(G("Invalid configuration: %s, opts.count excludes opts.narg.", e)), !0) : !1);
484
+ function yt() {
485
+ Object.keys(r.counts).find((t) => g(t, r.arrays) ? (I = Error(G("Invalid configuration: %s, opts.count excludes opts.array.", t)), !0) : g(t, r.nargs) ? (I = Error(G("Invalid configuration: %s, opts.count excludes opts.narg.", t)), !0) : !1);
486
486
  }
487
487
  return {
488
488
  aliases: Object.assign({}, r.aliases),
489
- argv: Object.assign(ne, w),
490
- configuration: h,
491
- defaulted: Object.assign({}, oe),
492
- error: y,
489
+ argv: Object.assign(nt, w),
490
+ configuration: _,
491
+ defaulted: Object.assign({}, ot),
492
+ error: I,
493
493
  newAliases: Object.assign({}, D)
494
494
  };
495
495
  }
496
496
  }
497
- function Ne(i) {
497
+ function Ot(i) {
498
498
  const n = [], m = /* @__PURE__ */ Object.create(null);
499
499
  let s = !0;
500
500
  for (Object.keys(i).forEach(function(u) {
@@ -503,16 +503,16 @@ function Ne(i) {
503
503
  s = !1;
504
504
  for (let u = 0; u < n.length; u++)
505
505
  for (let k = u + 1; k < n.length; k++)
506
- if (n[u].filter(function(h) {
507
- return n[k].indexOf(h) !== -1;
506
+ if (n[u].filter(function(_) {
507
+ return n[k].indexOf(_) !== -1;
508
508
  }).length) {
509
509
  n[u] = n[u].concat(n[k]), n.splice(k, 1), s = !0;
510
510
  break;
511
511
  }
512
512
  }
513
513
  return n.forEach(function(u) {
514
- u = u.filter(function(_, h, q) {
515
- return q.indexOf(_) === h;
514
+ u = u.filter(function(h, _, q) {
515
+ return q.indexOf(h) === _;
516
516
  });
517
517
  const k = u.pop();
518
518
  k !== void 0 && typeof k == "string" && (m[k] = u);
@@ -521,10 +521,10 @@ function Ne(i) {
521
521
  function Z(i) {
522
522
  return i !== void 0 ? i + 1 : 1;
523
523
  }
524
- function ce(i) {
524
+ function ct(i) {
525
525
  return i === "__proto__" ? "___proto___" : i;
526
526
  }
527
- function Ee(i) {
527
+ function Et(i) {
528
528
  return typeof i == "string" && (i[0] === "'" || i[0] === '"') && i[i.length - 1] === i[0] ? i.substring(1, i.length - 1) : i;
529
529
  }
530
530
  /**
@@ -535,44 +535,44 @@ function Ee(i) {
535
535
  * Copyright (c) 2016, Contributors
536
536
  * SPDX-License-Identifier: ISC
537
537
  */
538
- var X, ee, te;
539
- const pe = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, le = (ee = (X = process == null ? void 0 : process.versions) === null || X === void 0 ? void 0 : X.node) !== null && ee !== void 0 ? ee : (te = process == null ? void 0 : process.version) === null || te === void 0 ? void 0 : te.slice(1);
540
- if (le && Number(le.match(/^([^.]+)/)[1]) < pe)
541
- throw Error(`yargs parser supports a minimum Node.js version of ${pe}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
542
- const De = process ? process.env : {};
543
- new Oe({
538
+ var X, tt, et;
539
+ const pt = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, lt = (tt = (X = process == null ? void 0 : process.versions) === null || X === void 0 ? void 0 : X.node) !== null && tt !== void 0 ? tt : (et = process == null ? void 0 : process.version) === null || et === void 0 ? void 0 : et.slice(1);
540
+ if (lt && Number(lt.match(/^([^.]+)/)[1]) < pt)
541
+ throw Error(`yargs parser supports a minimum Node.js version of ${pt}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
542
+ const Dt = process ? process.env : {};
543
+ new Nt({
544
544
  cwd: process.cwd,
545
- env: () => De,
546
- format: he,
547
- normalize: Le,
548
- resolve: ae,
545
+ env: () => Dt,
546
+ format: _t,
547
+ normalize: Lt,
548
+ resolve: at,
549
549
  // TODO: figure out a way to combine ESM and CJS coverage, such that
550
550
  // we can exercise all the lines below:
551
551
  require: (i) => {
552
552
  if (typeof require < "u")
553
553
  return require(i);
554
554
  if (i.match(/\.json$/))
555
- return JSON.parse(_e(i, "utf8"));
555
+ return JSON.parse(ht(i, "utf8"));
556
556
  throw Error("only .json config files are supported in ESM");
557
557
  }
558
558
  });
559
- const je = {
559
+ const jt = {
560
560
  fs: {
561
- readFileSync: _e,
562
- writeFile: Me
561
+ readFileSync: ht,
562
+ writeFile: Mt
563
563
  },
564
- format: he,
565
- resolve: ae,
564
+ format: _t,
565
+ resolve: at,
566
566
  exists: (i) => {
567
567
  try {
568
- return Ae(i).isFile();
568
+ return Qt(i).isFile();
569
569
  } catch {
570
570
  return !1;
571
571
  }
572
572
  }
573
573
  };
574
- let I;
575
- class Ve {
574
+ let y;
575
+ class Vt {
576
576
  constructor(n) {
577
577
  n = n || {}, this.directory = n.directory || "./locales", this.updateFiles = typeof n.updateFiles == "boolean" ? n.updateFiles : !0, this.locale = n.locale || "en", this.fallbackToLanguage = typeof n.fallbackToLanguage == "boolean" ? n.fallbackToLanguage : !0, this.cache = /* @__PURE__ */ Object.create(null), this.writeQueue = [];
578
578
  }
@@ -587,15 +587,15 @@ class Ve {
587
587
  directory: this.directory,
588
588
  locale: this.locale,
589
589
  cb: s
590
- })) : s(), I.format.apply(I.format, [this.cache[this.locale][m] || m].concat(n));
590
+ })) : s(), y.format.apply(y.format, [this.cache[this.locale][m] || m].concat(n));
591
591
  }
592
592
  __n() {
593
593
  const n = Array.prototype.slice.call(arguments), m = n.shift(), s = n.shift(), u = n.shift();
594
594
  let k = function() {
595
595
  };
596
596
  typeof n[n.length - 1] == "function" && (k = n.pop()), this.cache[this.locale] || this._readLocaleFile();
597
- let _ = u === 1 ? m : s;
598
- this.cache[this.locale][m] && (_ = this.cache[this.locale][m][u === 1 ? "one" : "other"]), !this.cache[this.locale][m] && this.updateFiles ? (this.cache[this.locale][m] = {
597
+ let h = u === 1 ? m : s;
598
+ this.cache[this.locale][m] && (h = this.cache[this.locale][m][u === 1 ? "one" : "other"]), !this.cache[this.locale][m] && this.updateFiles ? (this.cache[this.locale][m] = {
599
599
  one: m,
600
600
  other: s
601
601
  }, this._enqueueWrite({
@@ -603,8 +603,8 @@ class Ve {
603
603
  locale: this.locale,
604
604
  cb: k
605
605
  })) : k();
606
- const h = [_];
607
- return ~_.indexOf("%d") && h.push(u), I.format.apply(I.format, h.concat(n));
606
+ const _ = [h];
607
+ return ~h.indexOf("%d") && _.push(u), y.format.apply(y.format, _.concat(n));
608
608
  }
609
609
  setLocale(n) {
610
610
  this.locale = n;
@@ -620,16 +620,16 @@ class Ve {
620
620
  _taggedLiteral(n, ...m) {
621
621
  let s = "";
622
622
  return n.forEach(function(u, k) {
623
- const _ = m[k + 1];
624
- s += u, typeof _ < "u" && (s += "%s");
623
+ const h = m[k + 1];
624
+ s += u, typeof h < "u" && (s += "%s");
625
625
  }), this.__.apply(this, [s].concat([].slice.call(m, 1)));
626
626
  }
627
627
  _enqueueWrite(n) {
628
628
  this.writeQueue.push(n), this.writeQueue.length === 1 && this._processWriteQueue();
629
629
  }
630
630
  _processWriteQueue() {
631
- const n = this, m = this.writeQueue[0], s = m.directory, u = m.locale, k = m.cb, _ = this._resolveLocaleFile(s, u), h = JSON.stringify(this.cache[u], null, 2);
632
- I.fs.writeFile(_, h, "utf-8", function(q) {
631
+ const n = this, m = this.writeQueue[0], s = m.directory, u = m.locale, k = m.cb, h = this._resolveLocaleFile(s, u), _ = JSON.stringify(this.cache[u], null, 2);
632
+ y.fs.writeFile(h, _, "utf-8", function(q) {
633
633
  n.writeQueue.shift(), n.writeQueue.length > 0 && n._processWriteQueue(), k(q);
634
634
  });
635
635
  }
@@ -637,7 +637,7 @@ class Ve {
637
637
  let n = {};
638
638
  const m = this._resolveLocaleFile(this.directory, this.locale);
639
639
  try {
640
- I.fs.readFileSync && (n = JSON.parse(I.fs.readFileSync(m, "utf-8")));
640
+ y.fs.readFileSync && (n = JSON.parse(y.fs.readFileSync(m, "utf-8")));
641
641
  } catch (s) {
642
642
  if (s instanceof SyntaxError && (s.message = "syntax error in " + m), s.code === "ENOENT")
643
643
  n = {};
@@ -647,20 +647,20 @@ class Ve {
647
647
  this.cache[this.locale] = n;
648
648
  }
649
649
  _resolveLocaleFile(n, m) {
650
- let s = I.resolve(n, "./", m + ".json");
650
+ let s = y.resolve(n, "./", m + ".json");
651
651
  if (this.fallbackToLanguage && !this._fileExistsSync(s) && ~m.lastIndexOf("_")) {
652
- const u = I.resolve(n, "./", m.split("_")[0] + ".json");
652
+ const u = y.resolve(n, "./", m.split("_")[0] + ".json");
653
653
  this._fileExistsSync(u) && (s = u);
654
654
  }
655
655
  return s;
656
656
  }
657
657
  _fileExistsSync(n) {
658
- return I.exists(n);
658
+ return y.exists(n);
659
659
  }
660
660
  }
661
- function Fe(i, n) {
662
- I = n;
663
- const m = new Ve(i);
661
+ function Ft(i, n) {
662
+ y = n;
663
+ const m = new Vt(i);
664
664
  return {
665
665
  __: m.__.bind(m),
666
666
  __n: m.__n.bind(m),
@@ -670,19 +670,19 @@ function Fe(i, n) {
670
670
  locale: m.locale
671
671
  };
672
672
  }
673
- const He = (i) => Fe(i, je);
674
- let N;
673
+ const Ht = (i) => Ft(i, jt);
674
+ let O;
675
675
  try {
676
- N = Qe(import.meta.url);
676
+ O = At(import.meta.url);
677
677
  } catch {
678
- N = process.cwd();
678
+ O = process.cwd();
679
679
  }
680
- const $e = N.substring(0, N.lastIndexOf("node_modules"));
681
- $e || process.cwd(), process.cwd, process.exit, process.nextTick, typeof process.stdout.columns < "u" && process.stdout.columns, He({
682
- directory: ae(N, "../../../locales"),
680
+ const $t = O.substring(0, O.lastIndexOf("node_modules"));
681
+ $t || process.cwd(), process.cwd, process.exit, process.nextTick, typeof process.stdout.columns < "u" && process.stdout.columns, Ht({
682
+ directory: at(O, "../../../locales"),
683
683
  updateFiles: !1
684
684
  });
685
- const ie = [
685
+ const it = [
686
686
  {
687
687
  id: "anthropic",
688
688
  name: "Anthropic",
@@ -1596,6 +1596,17 @@ const ie = [
1596
1596
  output_mtok: 0.6
1597
1597
  }
1598
1598
  },
1599
+ {
1600
+ id: "qwen.qwen3-coder-480b-a35b-v1:0",
1601
+ name: "Qwen3-Coder-480B-A35B-Instruct",
1602
+ match: {
1603
+ contains: "qwen.qwen3-coder-480b-a35b-v1"
1604
+ },
1605
+ prices: {
1606
+ input_mtok: 0.45,
1607
+ output_mtok: 1.8
1608
+ }
1609
+ },
1599
1610
  {
1600
1611
  id: "regional.anthropic.claude-3-5-haiku-20241022-v1:0",
1601
1612
  match: {
@@ -4775,41 +4786,22 @@ Compared to other leading proprietary and open-weights models Command A delivers
4775
4786
  }
4776
4787
  },
4777
4788
  {
4778
- id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
4779
- name: "Qwen3-Coder-480B-A35B-Instruct",
4780
- match: {
4781
- or: [
4782
- {
4783
- equals: "qwen/qwen3-coder-480b-a35b-instruct"
4784
- },
4785
- {
4786
- equals: "qwen/qwen3-coder-480b-a35b-instruct-fast"
4787
- }
4788
- ]
4789
- },
4790
- context_window: 262144,
4791
- prices: {
4792
- input_mtok: 0.45,
4793
- output_mtok: 1.8
4794
- }
4795
- },
4796
- {
4797
- id: "SentientAGI/Dobby-Unhinged-Llama-3.3-70B",
4798
- name: "Dobby-Unhinged-Llama-3.3-70B",
4789
+ id: "deepseek-ai/DeepSeek-R1-0528",
4790
+ name: "DeepSeek-R1-0528",
4799
4791
  match: {
4800
4792
  or: [
4801
4793
  {
4802
- equals: "sentientagi/dobby-unhinged-llama-3.3-70b"
4794
+ equals: "deepseek-ai/deepseek-r1-0528"
4803
4795
  },
4804
4796
  {
4805
- equals: "sentientagi/dobby-unhinged-llama-3.3-70b-fast"
4797
+ equals: "deepseek-ai/deepseek-r1-0528-fast"
4806
4798
  }
4807
4799
  ]
4808
4800
  },
4809
- context_window: 131072,
4801
+ context_window: 163840,
4810
4802
  prices: {
4811
- input_mtok: 0.9,
4812
- output_mtok: 0.9
4803
+ input_mtok: 3,
4804
+ output_mtok: 8
4813
4805
  }
4814
4806
  },
4815
4807
  {
@@ -6232,8 +6224,8 @@ Compared to other leading proprietary and open-weights models Command A delivers
6232
6224
  },
6233
6225
  context_window: 262144,
6234
6226
  prices: {
6235
- input_mtok: 0.29,
6236
- output_mtok: 1.2
6227
+ input_mtok: 0.3,
6228
+ output_mtok: 1.3
6237
6229
  }
6238
6230
  },
6239
6231
  {
@@ -6603,25 +6595,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
6603
6595
  output_mtok: 0.072
6604
6596
  }
6605
6597
  },
6606
- {
6607
- id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
6608
- name: "DeepSeek-R1-Distill-Llama-70B",
6609
- match: {
6610
- or: [
6611
- {
6612
- equals: "deepseek-ai/deepseek-r1-distill-llama-70b"
6613
- },
6614
- {
6615
- equals: "deepseek-ai/deepseek-r1-distill-llama-70b-fast"
6616
- }
6617
- ]
6618
- },
6619
- context_window: 8192,
6620
- prices: {
6621
- input_mtok: 0.64,
6622
- output_mtok: 0.64
6623
- }
6624
- },
6625
6598
  {
6626
6599
  id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B",
6627
6600
  name: "DeepSeek-R1-Distill-Qwen-14B",
@@ -6723,6 +6696,25 @@ Compared to other leading proprietary and open-weights models Command A delivers
6723
6696
  output_mtok: 0.8
6724
6697
  }
6725
6698
  },
6699
+ {
6700
+ id: "deepseek-ai/DeepSeek-V3.2",
6701
+ name: "DeepSeek-V3.2",
6702
+ match: {
6703
+ or: [
6704
+ {
6705
+ equals: "deepseek-ai/deepseek-v3.2"
6706
+ },
6707
+ {
6708
+ equals: "deepseek-ai/deepseek-v3.2-fast"
6709
+ }
6710
+ ]
6711
+ },
6712
+ context_window: 163840,
6713
+ prices: {
6714
+ input_mtok: 0.269,
6715
+ output_mtok: 0.4
6716
+ }
6717
+ },
6726
6718
  {
6727
6719
  id: "deepseek-ai/DeepSeek-V3.2-Exp",
6728
6720
  name: "DeepSeek-V3.2-Exp",
@@ -6795,8 +6787,8 @@ Compared to other leading proprietary and open-weights models Command A delivers
6795
6787
  },
6796
6788
  context_window: 131072,
6797
6789
  prices: {
6798
- input_mtok: 0.104,
6799
- output_mtok: 0.312
6790
+ input_mtok: 0.108,
6791
+ output_mtok: 0.32
6800
6792
  }
6801
6793
  },
6802
6794
  {
@@ -6933,22 +6925,22 @@ Compared to other leading proprietary and open-weights models Command A delivers
6933
6925
  }
6934
6926
  },
6935
6927
  {
6936
- id: "zai-org/GLM-4-32B-0414",
6937
- name: "GLM-4-32B-0414",
6928
+ id: "zai-org/AutoGLM-Phone-9B-Multilingual",
6929
+ name: "AutoGLM-Phone-9B-Multilingual",
6938
6930
  match: {
6939
6931
  or: [
6940
6932
  {
6941
- equals: "zai-org/glm-4-32b-0414"
6933
+ equals: "zai-org/autoglm-phone-9b-multilingual"
6942
6934
  },
6943
6935
  {
6944
- equals: "zai-org/glm-4-32b-0414-fast"
6936
+ equals: "zai-org/autoglm-phone-9b-multilingual-fast"
6945
6937
  }
6946
6938
  ]
6947
6939
  },
6948
- context_window: 32e3,
6940
+ context_window: 65536,
6949
6941
  prices: {
6950
- input_mtok: 0.55,
6951
- output_mtok: 1.66
6942
+ input_mtok: 0.035,
6943
+ output_mtok: 0.138
6952
6944
  }
6953
6945
  },
6954
6946
  {
@@ -7045,6 +7037,25 @@ Compared to other leading proprietary and open-weights models Command A delivers
7045
7037
  input_mtok: 0.44,
7046
7038
  output_mtok: 1.76
7047
7039
  }
7040
+ },
7041
+ {
7042
+ id: "zai-org/GLM-4.6V-Flash",
7043
+ name: "GLM-4.6V-Flash",
7044
+ match: {
7045
+ or: [
7046
+ {
7047
+ equals: "zai-org/glm-4.6v-flash"
7048
+ },
7049
+ {
7050
+ equals: "zai-org/glm-4.6v-flash-fast"
7051
+ }
7052
+ ]
7053
+ },
7054
+ context_window: 131072,
7055
+ prices: {
7056
+ input_mtok: 0.3,
7057
+ output_mtok: 0.9
7058
+ }
7048
7059
  }
7049
7060
  ]
7050
7061
  },
@@ -7486,6 +7497,96 @@ Compared to other leading proprietary and open-weights models Command A delivers
7486
7497
  }
7487
7498
  ]
7488
7499
  },
7500
+ {
7501
+ id: "huggingface_ovhcloud",
7502
+ name: "HuggingFace (ovhcloud)",
7503
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
7504
+ api_pattern: "https://router\\.huggingface\\.co/ovhcloud",
7505
+ provider_match: {
7506
+ and: [
7507
+ {
7508
+ contains: "huggingface"
7509
+ },
7510
+ {
7511
+ contains: "ovhcloud"
7512
+ }
7513
+ ]
7514
+ },
7515
+ extractors: [
7516
+ {
7517
+ api_flavor: "chat",
7518
+ root: "usage",
7519
+ model_path: "model",
7520
+ mappings: [
7521
+ {
7522
+ path: "prompt_tokens",
7523
+ dest: "input_tokens",
7524
+ required: !0
7525
+ },
7526
+ {
7527
+ path: ["prompt_tokens_details", "cached_tokens"],
7528
+ dest: "cache_read_tokens",
7529
+ required: !1
7530
+ },
7531
+ {
7532
+ path: ["prompt_tokens_details", "audio_tokens"],
7533
+ dest: "input_audio_tokens",
7534
+ required: !1
7535
+ },
7536
+ {
7537
+ path: ["completion_tokens_details", "audio_tokens"],
7538
+ dest: "output_audio_tokens",
7539
+ required: !1
7540
+ },
7541
+ {
7542
+ path: "completion_tokens",
7543
+ dest: "output_tokens",
7544
+ required: !0
7545
+ }
7546
+ ]
7547
+ }
7548
+ ],
7549
+ models: [
7550
+ {
7551
+ id: "Qwen/Qwen2.5-VL-72B-Instruct",
7552
+ name: "Qwen2.5-VL-72B-Instruct",
7553
+ match: {
7554
+ or: [
7555
+ {
7556
+ equals: "qwen/qwen2.5-vl-72b-instruct"
7557
+ },
7558
+ {
7559
+ equals: "qwen/qwen2.5-vl-72b-instruct-fast"
7560
+ }
7561
+ ]
7562
+ },
7563
+ context_window: 32768,
7564
+ prices: {
7565
+ input_mtok: 1.01,
7566
+ output_mtok: 1.01
7567
+ }
7568
+ },
7569
+ {
7570
+ id: "Qwen/Qwen3-Coder-30B-A3B-Instruct",
7571
+ name: "Qwen3-Coder-30B-A3B-Instruct",
7572
+ match: {
7573
+ or: [
7574
+ {
7575
+ equals: "qwen/qwen3-coder-30b-a3b-instruct"
7576
+ },
7577
+ {
7578
+ equals: "qwen/qwen3-coder-30b-a3b-instruct-fast"
7579
+ }
7580
+ ]
7581
+ },
7582
+ context_window: 262144,
7583
+ prices: {
7584
+ input_mtok: 0.07,
7585
+ output_mtok: 0.26
7586
+ }
7587
+ }
7588
+ ]
7589
+ },
7489
7590
  {
7490
7591
  id: "huggingface_publicai",
7491
7592
  name: "HuggingFace (publicai)",
@@ -7567,45 +7668,90 @@ Compared to other leading proprietary and open-weights models Command A delivers
7567
7668
  prices: {}
7568
7669
  },
7569
7670
  {
7570
- id: "allenai/Olmo-3-32B-Think",
7571
- name: "Olmo-3-32B-Think",
7671
+ id: "allenai/Olmo-3-7B-Instruct",
7672
+ name: "Olmo-3-7B-Instruct",
7572
7673
  match: {
7573
7674
  or: [
7574
7675
  {
7575
- equals: "allenai/olmo-3-32b-think"
7676
+ equals: "allenai/olmo-3-7b-instruct"
7576
7677
  },
7577
7678
  {
7578
- equals: "allenai/olmo-3-32b-think-fast"
7679
+ equals: "allenai/olmo-3-7b-instruct-fast"
7579
7680
  }
7580
7681
  ]
7581
7682
  },
7582
7683
  prices: {}
7583
7684
  },
7584
7685
  {
7585
- id: "allenai/Olmo-3-7B-Instruct",
7586
- name: "Olmo-3-7B-Instruct",
7686
+ id: "allenai/Olmo-3-7B-Think",
7687
+ name: "Olmo-3-7B-Think",
7587
7688
  match: {
7588
7689
  or: [
7589
7690
  {
7590
- equals: "allenai/olmo-3-7b-instruct"
7691
+ equals: "allenai/olmo-3-7b-think"
7591
7692
  },
7592
7693
  {
7593
- equals: "allenai/olmo-3-7b-instruct-fast"
7694
+ equals: "allenai/olmo-3-7b-think-fast"
7594
7695
  }
7595
7696
  ]
7596
7697
  },
7597
7698
  prices: {}
7598
7699
  },
7599
7700
  {
7600
- id: "allenai/Olmo-3-7B-Think",
7601
- name: "Olmo-3-7B-Think",
7701
+ id: "allenai/Olmo-3.1-32B-Instruct",
7702
+ name: "Olmo-3.1-32B-Instruct",
7602
7703
  match: {
7603
7704
  or: [
7604
7705
  {
7605
- equals: "allenai/olmo-3-7b-think"
7706
+ equals: "allenai/olmo-3.1-32b-instruct"
7606
7707
  },
7607
7708
  {
7608
- equals: "allenai/olmo-3-7b-think-fast"
7709
+ equals: "allenai/olmo-3.1-32b-instruct-fast"
7710
+ }
7711
+ ]
7712
+ },
7713
+ prices: {}
7714
+ },
7715
+ {
7716
+ id: "allenai/Olmo-3.1-32B-Think",
7717
+ name: "Olmo-3.1-32B-Think",
7718
+ match: {
7719
+ or: [
7720
+ {
7721
+ equals: "allenai/olmo-3.1-32b-think"
7722
+ },
7723
+ {
7724
+ equals: "allenai/olmo-3.1-32b-think-fast"
7725
+ }
7726
+ ]
7727
+ },
7728
+ prices: {}
7729
+ },
7730
+ {
7731
+ id: "dicta-il/DictaLM-3.0-24B-Thinking",
7732
+ name: "DictaLM-3.0-24B-Thinking",
7733
+ match: {
7734
+ or: [
7735
+ {
7736
+ equals: "dicta-il/dictalm-3.0-24b-thinking"
7737
+ },
7738
+ {
7739
+ equals: "dicta-il/dictalm-3.0-24b-thinking-fast"
7740
+ }
7741
+ ]
7742
+ },
7743
+ prices: {}
7744
+ },
7745
+ {
7746
+ id: "swiss-ai/Apertus-70B-Instruct-2509",
7747
+ name: "Apertus-70B-Instruct-2509",
7748
+ match: {
7749
+ or: [
7750
+ {
7751
+ equals: "swiss-ai/apertus-70b-instruct-2509"
7752
+ },
7753
+ {
7754
+ equals: "swiss-ai/apertus-70b-instruct-2509-fast"
7609
7755
  }
7610
7756
  ]
7611
7757
  },
@@ -7625,6 +7771,21 @@ Compared to other leading proprietary and open-weights models Command A delivers
7625
7771
  ]
7626
7772
  },
7627
7773
  prices: {}
7774
+ },
7775
+ {
7776
+ id: "utter-project/EuroLLM-22B-Instruct-2512",
7777
+ name: "EuroLLM-22B-Instruct-2512",
7778
+ match: {
7779
+ or: [
7780
+ {
7781
+ equals: "utter-project/eurollm-22b-instruct-2512"
7782
+ },
7783
+ {
7784
+ equals: "utter-project/eurollm-22b-instruct-2512-fast"
7785
+ }
7786
+ ]
7787
+ },
7788
+ prices: {}
7628
7789
  }
7629
7790
  ]
7630
7791
  },
@@ -7736,27 +7897,46 @@ Compared to other leading proprietary and open-weights models Command A delivers
7736
7897
  }
7737
7898
  },
7738
7899
  {
7739
- id: "meta-llama/Llama-3.1-8B-Instruct",
7740
- name: "Llama-3.1-8B-Instruct",
7900
+ id: "deepseek-ai/DeepSeek-V3-0324",
7901
+ name: "DeepSeek-V3-0324",
7741
7902
  match: {
7742
7903
  or: [
7743
7904
  {
7744
- equals: "meta-llama/llama-3.1-8b-instruct"
7905
+ equals: "deepseek-ai/deepseek-v3-0324"
7745
7906
  },
7746
7907
  {
7747
- equals: "meta-llama/llama-3.1-8b-instruct-fast"
7908
+ equals: "deepseek-ai/deepseek-v3-0324-fast"
7748
7909
  }
7749
7910
  ]
7750
7911
  },
7751
- context_window: 16384,
7912
+ context_window: 131072,
7752
7913
  prices: {
7753
- input_mtok: 0.1,
7754
- output_mtok: 0.2
7914
+ input_mtok: 3,
7915
+ output_mtok: 4.5
7755
7916
  }
7756
7917
  },
7757
7918
  {
7758
- id: "meta-llama/Llama-3.3-70B-Instruct",
7759
- name: "Llama-3.3-70B-Instruct",
7919
+ id: "meta-llama/Llama-3.1-8B-Instruct",
7920
+ name: "Llama-3.1-8B-Instruct",
7921
+ match: {
7922
+ or: [
7923
+ {
7924
+ equals: "meta-llama/llama-3.1-8b-instruct"
7925
+ },
7926
+ {
7927
+ equals: "meta-llama/llama-3.1-8b-instruct-fast"
7928
+ }
7929
+ ]
7930
+ },
7931
+ context_window: 16384,
7932
+ prices: {
7933
+ input_mtok: 0.1,
7934
+ output_mtok: 0.2
7935
+ }
7936
+ },
7937
+ {
7938
+ id: "meta-llama/Llama-3.3-70B-Instruct",
7939
+ name: "Llama-3.3-70B-Instruct",
7760
7940
  match: {
7761
7941
  or: [
7762
7942
  {
@@ -7863,6 +8043,25 @@ Compared to other leading proprietary and open-weights models Command A delivers
7863
8043
  }
7864
8044
  ],
7865
8045
  models: [
8046
+ {
8047
+ id: "EssentialAI/rnj-1-instruct",
8048
+ name: "rnj-1-instruct",
8049
+ match: {
8050
+ or: [
8051
+ {
8052
+ equals: "essentialai/rnj-1-instruct"
8053
+ },
8054
+ {
8055
+ equals: "essentialai/rnj-1-instruct-fast"
8056
+ }
8057
+ ]
8058
+ },
8059
+ context_window: 32768,
8060
+ prices: {
8061
+ input_mtok: 0.15,
8062
+ output_mtok: 0.15
8063
+ }
8064
+ },
7866
8065
  {
7867
8066
  id: "Qwen/Qwen2.5-72B-Instruct",
7868
8067
  name: "Qwen2.5-72B-Instruct",
@@ -7995,6 +8194,41 @@ Compared to other leading proprietary and open-weights models Command A delivers
7995
8194
  output_mtok: 1.5
7996
8195
  }
7997
8196
  },
8197
+ {
8198
+ id: "Qwen/Qwen3-VL-32B-Instruct",
8199
+ name: "Qwen3-VL-32B-Instruct",
8200
+ match: {
8201
+ or: [
8202
+ {
8203
+ equals: "qwen/qwen3-vl-32b-instruct"
8204
+ },
8205
+ {
8206
+ equals: "qwen/qwen3-vl-32b-instruct-fast"
8207
+ }
8208
+ ]
8209
+ },
8210
+ context_window: 262144,
8211
+ prices: {
8212
+ input_mtok: 0.5,
8213
+ output_mtok: 1.5
8214
+ }
8215
+ },
8216
+ {
8217
+ id: "ServiceNow-AI/Apriel-1.6-15b-Thinker",
8218
+ name: "Apriel-1.6-15b-Thinker",
8219
+ match: {
8220
+ or: [
8221
+ {
8222
+ equals: "servicenow-ai/apriel-1.6-15b-thinker"
8223
+ },
8224
+ {
8225
+ equals: "servicenow-ai/apriel-1.6-15b-thinker-fast"
8226
+ }
8227
+ ]
8228
+ },
8229
+ context_window: 131072,
8230
+ prices: {}
8231
+ },
7998
8232
  {
7999
8233
  id: "deepcogito/cogito-671b-v2.1",
8000
8234
  name: "cogito-671b-v2.1",
@@ -16529,6 +16763,352 @@ Compared to other leading proprietary and open-weights models Command A delivers
16529
16763
  }
16530
16764
  ]
16531
16765
  },
16766
+ {
16767
+ id: "ovhcloud",
16768
+ name: "OVHcloud AI Endpoints",
16769
+ pricing_urls: ["https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/models"],
16770
+ api_pattern: "https://oai\\.endpoints\\.kepler\\.ai\\.cloud\\.ovh\\.net",
16771
+ extractors: [
16772
+ {
16773
+ api_flavor: "chat",
16774
+ root: "usage",
16775
+ model_path: "model",
16776
+ mappings: [
16777
+ {
16778
+ path: "prompt_tokens",
16779
+ dest: "input_tokens",
16780
+ required: !0
16781
+ },
16782
+ {
16783
+ path: ["prompt_tokens_details", "cached_tokens"],
16784
+ dest: "cache_read_tokens",
16785
+ required: !1
16786
+ },
16787
+ {
16788
+ path: ["prompt_tokens_details", "audio_tokens"],
16789
+ dest: "input_audio_tokens",
16790
+ required: !1
16791
+ },
16792
+ {
16793
+ path: ["completion_tokens_details", "audio_tokens"],
16794
+ dest: "output_audio_tokens",
16795
+ required: !1
16796
+ },
16797
+ {
16798
+ path: "completion_tokens",
16799
+ dest: "output_tokens",
16800
+ required: !0
16801
+ }
16802
+ ]
16803
+ }
16804
+ ],
16805
+ models: [
16806
+ {
16807
+ id: "BGE-M3",
16808
+ name: "BGE-M3",
16809
+ match: {
16810
+ or: [
16811
+ {
16812
+ equals: "BGE-M3"
16813
+ },
16814
+ {
16815
+ equals: "bge-m3"
16816
+ }
16817
+ ]
16818
+ },
16819
+ context_window: 8192,
16820
+ prices: {
16821
+ input_mtok: 0.01
16822
+ }
16823
+ },
16824
+ {
16825
+ id: "DeepSeek-R1-Distill-Llama-70B",
16826
+ name: "DeepSeek-R1-Distill-Llama-70B",
16827
+ match: {
16828
+ or: [
16829
+ {
16830
+ equals: "DeepSeek-R1-Distill-Llama-70B"
16831
+ },
16832
+ {
16833
+ equals: "deepseek-r1-distill-llama-70b"
16834
+ }
16835
+ ]
16836
+ },
16837
+ context_window: 131072,
16838
+ prices: {
16839
+ input_mtok: 0.74,
16840
+ output_mtok: 0.74
16841
+ }
16842
+ },
16843
+ {
16844
+ id: "Llama-3.1-8B-Instruct",
16845
+ name: "Llama-3.1-8B-Instruct",
16846
+ match: {
16847
+ or: [
16848
+ {
16849
+ equals: "Llama-3.1-8B-Instruct"
16850
+ },
16851
+ {
16852
+ equals: "llama-3.1-8b-instruct"
16853
+ }
16854
+ ]
16855
+ },
16856
+ context_window: 131072,
16857
+ prices: {
16858
+ input_mtok: 0.11,
16859
+ output_mtok: 0.11
16860
+ }
16861
+ },
16862
+ {
16863
+ id: "Meta-Llama-3_1-70B-Instruct",
16864
+ name: "Meta-Llama-3_1-70B-Instruct",
16865
+ match: {
16866
+ or: [
16867
+ {
16868
+ equals: "Meta-Llama-3_1-70B-Instruct"
16869
+ },
16870
+ {
16871
+ equals: "meta-llama-3_1-70b-instruct"
16872
+ }
16873
+ ]
16874
+ },
16875
+ context_window: 131072,
16876
+ prices: {
16877
+ input_mtok: 0.74,
16878
+ output_mtok: 0.74
16879
+ }
16880
+ },
16881
+ {
16882
+ id: "Meta-Llama-3_3-70B-Instruct",
16883
+ name: "Meta-Llama-3_3-70B-Instruct",
16884
+ match: {
16885
+ or: [
16886
+ {
16887
+ equals: "Meta-Llama-3_3-70B-Instruct"
16888
+ },
16889
+ {
16890
+ equals: "meta-llama-3_3-70b-instruct"
16891
+ }
16892
+ ]
16893
+ },
16894
+ context_window: 131072,
16895
+ prices: {
16896
+ input_mtok: 0.74,
16897
+ output_mtok: 0.74
16898
+ }
16899
+ },
16900
+ {
16901
+ id: "Mistral-7B-Instruct-v0.3",
16902
+ name: "Mistral-7B-Instruct-v0.3",
16903
+ match: {
16904
+ or: [
16905
+ {
16906
+ equals: "Mistral-7B-Instruct-v0.3"
16907
+ },
16908
+ {
16909
+ equals: "mistral-7b-instruct-v0.3"
16910
+ }
16911
+ ]
16912
+ },
16913
+ context_window: 65536,
16914
+ prices: {
16915
+ input_mtok: 0.11,
16916
+ output_mtok: 0.11
16917
+ }
16918
+ },
16919
+ {
16920
+ id: "Mistral-Nemo-Instruct-2407",
16921
+ name: "Mistral-Nemo-Instruct-2407",
16922
+ match: {
16923
+ or: [
16924
+ {
16925
+ equals: "Mistral-Nemo-Instruct-2407"
16926
+ },
16927
+ {
16928
+ equals: "mistral-nemo-instruct-2407"
16929
+ }
16930
+ ]
16931
+ },
16932
+ context_window: 65536,
16933
+ prices: {
16934
+ input_mtok: 0.14,
16935
+ output_mtok: 0.14
16936
+ }
16937
+ },
16938
+ {
16939
+ id: "Mistral-Small-3.2-24B-Instruct-2506",
16940
+ name: "Mistral-Small-3.2-24B-Instruct-2506",
16941
+ match: {
16942
+ or: [
16943
+ {
16944
+ equals: "Mistral-Small-3.2-24B-Instruct-2506"
16945
+ },
16946
+ {
16947
+ equals: "mistral-small-3.2-24b-instruct-2506"
16948
+ }
16949
+ ]
16950
+ },
16951
+ context_window: 131072,
16952
+ prices: {
16953
+ input_mtok: 0.1,
16954
+ output_mtok: 0.31
16955
+ }
16956
+ },
16957
+ {
16958
+ id: "Mixtral-8x7B-Instruct-v0.1",
16959
+ name: "Mixtral-8x7B-Instruct-v0.1",
16960
+ match: {
16961
+ or: [
16962
+ {
16963
+ equals: "Mixtral-8x7B-Instruct-v0.1"
16964
+ },
16965
+ {
16966
+ equals: "mixtral-8x7b-instruct-v0.1"
16967
+ }
16968
+ ]
16969
+ },
16970
+ context_window: 32768,
16971
+ prices: {
16972
+ input_mtok: 0.7,
16973
+ output_mtok: 0.7
16974
+ }
16975
+ },
16976
+ {
16977
+ id: "Qwen2.5-Coder-32B-Instruct",
16978
+ name: "Qwen2.5-Coder-32B-Instruct",
16979
+ match: {
16980
+ or: [
16981
+ {
16982
+ equals: "Qwen2.5-Coder-32B-Instruct"
16983
+ },
16984
+ {
16985
+ equals: "qwen2.5-coder-32b-instruct"
16986
+ }
16987
+ ]
16988
+ },
16989
+ context_window: 32768,
16990
+ prices: {
16991
+ input_mtok: 0.96,
16992
+ output_mtok: 0.96
16993
+ }
16994
+ },
16995
+ {
16996
+ id: "Qwen2.5-VL-72B-Instruct",
16997
+ name: "Qwen2.5-VL-72B-Instruct",
16998
+ match: {
16999
+ or: [
17000
+ {
17001
+ equals: "Qwen2.5-VL-72B-Instruct"
17002
+ },
17003
+ {
17004
+ equals: "qwen2.5-vl-72b-instruct"
17005
+ }
17006
+ ]
17007
+ },
17008
+ context_window: 32768,
17009
+ prices: {
17010
+ input_mtok: 1.01,
17011
+ output_mtok: 1.01
17012
+ }
17013
+ },
17014
+ {
17015
+ id: "Qwen3-32B",
17016
+ name: "Qwen3-32B",
17017
+ match: {
17018
+ or: [
17019
+ {
17020
+ equals: "Qwen3-32B"
17021
+ },
17022
+ {
17023
+ equals: "qwen3-32b"
17024
+ }
17025
+ ]
17026
+ },
17027
+ context_window: 32768,
17028
+ prices: {
17029
+ input_mtok: 0.09,
17030
+ output_mtok: 0.25
17031
+ }
17032
+ },
17033
+ {
17034
+ id: "Qwen3-Coder-30B-A3B-Instruct",
17035
+ name: "Qwen3-Coder-30B-A3B-Instruct",
17036
+ match: {
17037
+ or: [
17038
+ {
17039
+ equals: "Qwen3-Coder-30B-A3B-Instruct"
17040
+ },
17041
+ {
17042
+ equals: "qwen3-coder-30b-a3b-instruct"
17043
+ }
17044
+ ]
17045
+ },
17046
+ context_window: 262144,
17047
+ prices: {
17048
+ input_mtok: 0.07,
17049
+ output_mtok: 0.26
17050
+ }
17051
+ },
17052
+ {
17053
+ id: "bge-base-en-v1.5",
17054
+ name: "bge-base-en-v1.5",
17055
+ match: {
17056
+ equals: "bge-base-en-v1.5"
17057
+ },
17058
+ context_window: 512,
17059
+ prices: {
17060
+ input_mtok: 0.01
17061
+ }
17062
+ },
17063
+ {
17064
+ id: "bge-multilingual-gemma2",
17065
+ name: "bge-multilingual-gemma2",
17066
+ match: {
17067
+ equals: "bge-multilingual-gemma2"
17068
+ },
17069
+ context_window: 8192,
17070
+ prices: {
17071
+ input_mtok: 0.01
17072
+ }
17073
+ },
17074
+ {
17075
+ id: "gpt-oss-120b",
17076
+ name: "gpt-oss-120b",
17077
+ match: {
17078
+ equals: "gpt-oss-120b"
17079
+ },
17080
+ context_window: 131072,
17081
+ prices: {
17082
+ input_mtok: 0.09,
17083
+ output_mtok: 0.47
17084
+ }
17085
+ },
17086
+ {
17087
+ id: "gpt-oss-20b",
17088
+ name: "gpt-oss-20b",
17089
+ match: {
17090
+ equals: "gpt-oss-20b"
17091
+ },
17092
+ context_window: 131072,
17093
+ prices: {
17094
+ input_mtok: 0.05,
17095
+ output_mtok: 0.18
17096
+ }
17097
+ },
17098
+ {
17099
+ id: "llava-next-mistral-7b",
17100
+ name: "llava-next-mistral-7b",
17101
+ match: {
17102
+ equals: "llava-next-mistral-7b"
17103
+ },
17104
+ context_window: 32768,
17105
+ prices: {
17106
+ input_mtok: 0.32,
17107
+ output_mtok: 0.32
17108
+ }
17109
+ }
17110
+ ]
17111
+ },
16532
17112
  {
16533
17113
  id: "perplexity",
16534
17114
  name: "Perplexity",
@@ -17645,35 +18225,35 @@ Compared to other leading proprietary and open-weights models Command A delivers
17645
18225
  ]
17646
18226
  }
17647
18227
  ];
17648
- function Ke(i, n) {
18228
+ function Kt(i, n) {
17649
18229
  if (n <= 0) return 0;
17650
18230
  let m = 0;
17651
- const s = [...i.tiers].sort((_, h) => _.start - h.start), u = s[0]?.start ?? n, k = Math.min(n, u);
18231
+ const s = [...i.tiers].sort((h, _) => h.start - _.start), u = s[0]?.start ?? n, k = Math.min(n, u);
17652
18232
  m += k * i.base / 1e6;
17653
- for (let _ = 0; _ < s.length; _++) {
17654
- const h = s[_], q = s[_ + 1]?.start ?? 1 / 0, B = Math.max(0, Math.min(n, q) - h.start);
17655
- B > 0 && (m += B * h.price / 1e6);
18233
+ for (let h = 0; h < s.length; h++) {
18234
+ const _ = s[h], q = s[h + 1]?.start ?? 1 / 0, B = Math.max(0, Math.min(n, q) - _.start);
18235
+ B > 0 && (m += B * _.price / 1e6);
17656
18236
  }
17657
18237
  return m;
17658
18238
  }
17659
18239
  function C(i, n, m) {
17660
- return i === void 0 || n === void 0 ? 0 : typeof i == "number" ? i * n / 1e6 : Ke(i, n);
18240
+ return i === void 0 || n === void 0 ? 0 : typeof i == "number" ? i * n / 1e6 : Kt(i, n);
17661
18241
  }
17662
- function We(i, n) {
18242
+ function Wt(i, n) {
17663
18243
  let m = 0, s = 0;
17664
- const u = i.cache_read_tokens ?? 0, k = i.cache_write_tokens ?? 0, _ = i.cache_audio_read_tokens ?? 0, h = i.output_audio_tokens ?? 0;
18244
+ const u = i.cache_read_tokens ?? 0, k = i.cache_write_tokens ?? 0, h = i.cache_audio_read_tokens ?? 0, _ = i.output_audio_tokens ?? 0;
17665
18245
  let q = i.input_audio_tokens ?? 0;
17666
- if (q -= _, q < 0)
18246
+ if (q -= h, q < 0)
17667
18247
  throw new Error("cache_audio_read_tokens cannot be greater than input_audio_tokens");
17668
18248
  let B = i.input_tokens ?? 0;
17669
18249
  if (B -= u, B -= k, B -= q, B < 0)
17670
18250
  throw new Error("Uncached text input tokens cannot be negative");
17671
- let A = u;
17672
- if (A -= _, A < 0)
18251
+ let Q = u;
18252
+ if (Q -= h, Q < 0)
17673
18253
  throw new Error("cache_audio_read_tokens cannot be greater than cache_read_tokens");
17674
- m += C(n.input_mtok, B), m += C(n.cache_read_mtok, A), m += C(n.cache_write_mtok, k), m += C(n.input_audio_mtok, q), m += C(n.cache_audio_read_mtok, _);
18254
+ m += C(n.input_mtok, B), m += C(n.cache_read_mtok, Q), m += C(n.cache_write_mtok, k), m += C(n.input_audio_mtok, q), m += C(n.cache_audio_read_mtok, h);
17675
18255
  let P = i.output_tokens ?? 0;
17676
- if (P -= h, P < 0)
18256
+ if (P -= _, P < 0)
17677
18257
  throw new Error("output_audio_tokens cannot be greater than output_tokens");
17678
18258
  s += C(n.output_mtok, P), s += C(n.output_audio_mtok, i.output_audio_tokens);
17679
18259
  let S = m + s;
@@ -17683,7 +18263,7 @@ function We(i, n) {
17683
18263
  total_price: S
17684
18264
  };
17685
18265
  }
17686
- function Ue(i, n) {
18266
+ function Ut(i, n) {
17687
18267
  if (!Array.isArray(i.prices))
17688
18268
  return i.prices;
17689
18269
  for (let m = i.prices.length - 1; m >= 0; m--) {
@@ -17694,11 +18274,11 @@ function Ue(i, n) {
17694
18274
  if (n >= new Date(u.start_date))
17695
18275
  return s.prices;
17696
18276
  } else {
17697
- const k = n.toISOString().slice(11, 19), _ = u.start_time, h = u.end_time;
17698
- if (h < _) {
17699
- if (k >= _ || k < h)
18277
+ const k = n.toISOString().slice(11, 19), h = u.start_time, _ = u.end_time;
18278
+ if (_ < h) {
18279
+ if (k >= h || k < _)
17700
18280
  return s.prices;
17701
- } else if (k >= _ && k < h)
18281
+ } else if (k >= h && k < _)
17702
18282
  return s.prices;
17703
18283
  }
17704
18284
  }
@@ -17707,38 +18287,38 @@ function Ue(i, n) {
17707
18287
  function E(i, n) {
17708
18288
  return "or" in i ? i.or.some((m) => E(m, n)) : "and" in i ? i.and.every((m) => E(m, n)) : "equals" in i ? n === i.equals : "starts_with" in i ? n.startsWith(i.starts_with) : "ends_with" in i ? n.endsWith(i.ends_with) : "contains" in i ? n.includes(i.contains) : "regex" in i ? new RegExp(i.regex).test(n) : !1;
17709
18289
  }
17710
- function Ye(i, n) {
18290
+ function Yt(i, n) {
17711
18291
  const m = n.toLowerCase().trim(), s = i.find((u) => u.id === m);
17712
18292
  return s || i.find((u) => u.provider_match && E(u.provider_match, m));
17713
18293
  }
17714
- function Je(i, { modelId: n, providerApiUrl: m, providerId: s }) {
18294
+ function Jt(i, { modelId: n, providerApiUrl: m, providerId: s }) {
17715
18295
  if (s)
17716
- return Ye(i, s);
18296
+ return Yt(i, s);
17717
18297
  if (m)
17718
18298
  return i.find((u) => new RegExp(u.api_pattern).test(m));
17719
18299
  if (n)
17720
18300
  return i.find((u) => u.model_match && E(u.model_match, n));
17721
18301
  }
17722
- function Ze(i, n) {
18302
+ function Zt(i, n) {
17723
18303
  return i.find((m) => E(m.match, n));
17724
18304
  }
17725
- let Xe = ie;
17726
- Promise.resolve(ie);
17727
- function et(i, n, m) {
17728
- const s = n.toLowerCase().trim(), u = m?.provider ?? Je(Xe, { modelId: s, providerApiUrl: m?.providerApiUrl, providerId: m?.providerId });
18305
+ let Xt = it;
18306
+ Promise.resolve(it);
18307
+ function te(i, n, m) {
18308
+ const s = n.toLowerCase().trim(), u = m?.provider ?? Jt(Xt, { modelId: s, providerApiUrl: m?.providerApiUrl, providerId: m?.providerId });
17729
18309
  if (!u) return null;
17730
- const k = Ze(u.models, s);
18310
+ const k = Zt(u.models, s);
17731
18311
  if (!k) return null;
17732
- const _ = m?.timestamp ?? /* @__PURE__ */ new Date(), h = Ue(k, _), q = We(i, h);
18312
+ const h = m?.timestamp ?? /* @__PURE__ */ new Date(), _ = Ut(k, h), q = Wt(i, _);
17733
18313
  return {
17734
18314
  auto_update_timestamp: void 0,
17735
18315
  model: k,
17736
- model_price: h,
18316
+ model_price: _,
17737
18317
  provider: u,
17738
18318
  ...q
17739
18319
  };
17740
18320
  }
17741
- const f = de(Ge(process.argv)).scriptName("genai-prices").command(
18321
+ const f = dt(Gt(process.argv)).scriptName("genai-prices").command(
17742
18322
  "list [provider]",
17743
18323
  "List providers and models",
17744
18324
  (i) => i.positional("provider", { describe: "Provider ID to filter", type: "string" })
@@ -17747,9 +18327,9 @@ const f = de(Ge(process.argv)).scriptName("genai-prices").command(
17747
18327
  "Calculate price",
17748
18328
  (i) => i.positional("model", { array: !0, describe: "Model(s) (optionally provider:model)", type: "string" }).option("input-tokens", { type: "number" }).option("cache-write-tokens", { type: "number" }).option("cache-read-tokens", { type: "number" }).option("output-tokens", { type: "number" }).option("input-audio-tokens", { type: "number" }).option("cache-audio-read-tokens", { type: "number" }).option("output-audio-tokens", { type: "number" }).option("requests", { type: "number" }).option("provider", { type: "string" }).option("auto-update", { default: !1, type: "boolean" }).option("timestamp", { describe: "RFC3339 timestamp", type: "string" })
17749
18329
  ).option("auto-update", { describe: "Enable auto-update from GitHub", type: "boolean" }).option("input-tokens", { type: "number" }).option("cache-write-tokens", { type: "number" }).option("cache-read-tokens", { type: "number" }).option("output-tokens", { type: "number" }).option("input-audio-tokens", { type: "number" }).option("cache-audio-read-tokens", { type: "number" }).option("output-audio-tokens", { type: "number" }).option("requests", { type: "number" }).option("provider", { type: "string" }).option("timestamp", { describe: "RFC3339 timestamp", type: "string" }).version("0.1.0").help().parseSync();
17750
- function tt() {
18330
+ function ee() {
17751
18331
  if (f._[0] === "list") {
17752
- const m = ie;
18332
+ const m = it;
17753
18333
  if (f.provider) {
17754
18334
  const s = m.find((u) => u.id === f.provider);
17755
18335
  s || (console.error(`Provider ${f.provider} not found.`), process.exit(1)), console.log(`${s.name}: (${s.models.length} models)`);
@@ -17777,15 +18357,15 @@ function tt() {
17777
18357
  }, s = f.timestamp ? new Date(String(f.timestamp)) : void 0;
17778
18358
  let u = !1;
17779
18359
  for (const k of n) {
17780
- let _, h = k;
17781
- h.includes(":") && ([_, h] = h.split(":", 2));
18360
+ let h, _ = k;
18361
+ _.includes(":") && ([h, _] = _.split(":", 2));
17782
18362
  try {
17783
- const q = et(m, h, { providerId: _, timestamp: s });
18363
+ const q = te(m, _, { providerId: h, timestamp: s });
17784
18364
  if (!q) {
17785
18365
  u = !0, console.error(`No price found for model ${k}`);
17786
18366
  continue;
17787
18367
  }
17788
- const B = q.model.context_window, A = [
18368
+ const B = q.model.context_window, Q = [
17789
18369
  ["Provider", q.provider.name],
17790
18370
  ["Model", q.model.name ?? q.model.id],
17791
18371
  ["Model Prices", JSON.stringify(q.model_price)],
@@ -17794,7 +18374,7 @@ function tt() {
17794
18374
  ["Input Price", `$${q.input_price}`],
17795
18375
  ["Output Price", `$${q.output_price}`]
17796
18376
  ];
17797
- for (const [P, S] of A)
18377
+ for (const [P, S] of Q)
17798
18378
  S !== void 0 && console.log(`${P.padStart(14)}: ${S}`);
17799
18379
  console.log("");
17800
18380
  } catch (q) {
@@ -17803,6 +18383,6 @@ function tt() {
17803
18383
  }
17804
18384
  process.exit(u ? 1 : 0);
17805
18385
  }
17806
- de().showHelp(), process.exit(1);
18386
+ dt().showHelp(), process.exit(1);
17807
18387
  }
17808
- tt();
18388
+ ee();