@bpinternal/billing-ui 0.5.0 → 0.5.1

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/index.js CHANGED
@@ -77,13 +77,13 @@ var _r = { parse: function(a, e) {
77
77
  }
78
78
  var m, u = d.charAt(1) !== "/", g = d.startsWith("<!--"), b = c + d.length, f = a.charAt(b);
79
79
  if (g) {
80
- var N = St(d);
81
- return s < 0 ? (n.push(N), n) : ((m = r[s]).children.push(N), n);
80
+ var C = St(d);
81
+ return s < 0 ? (n.push(C), n) : ((m = r[s]).children.push(C), n);
82
82
  }
83
83
  if (u && (s++, (t = St(d)).type === "tag" && e.components[t.name] && (t.type = "component", i = !0), t.voidElement || i || !f || f === "<" || t.children.push({ type: "text", content: a.slice(b, a.indexOf("<", b)) }), s === 0 && n.push(t), (m = r[s - 1]) && m.children.push(t), r[s] = t), (!u || t.voidElement) && (s > -1 && (t.voidElement || t.name === d.slice(2, -1)) && (s--, t = s === -1 ? n : r[s]), !i && f !== "<" && f)) {
84
84
  m = s === -1 ? n : r[s].children;
85
- var C = a.indexOf("<", b), v = a.slice(b, C === -1 ? void 0 : C);
86
- Cr.test(v) && (v = " "), (C > -1 && s + m.length >= 0 || v !== " ") && m.push({ type: "text", content: v });
85
+ var N = a.indexOf("<", b), v = a.slice(b, N === -1 ? void 0 : N);
86
+ Cr.test(v) && (v = " "), (N > -1 && s + m.length >= 0 || v !== " ") && m.push({ type: "text", content: v });
87
87
  }
88
88
  }), n;
89
89
  }, stringify: function(a) {
@@ -232,10 +232,10 @@ const Pr = (a) => {
232
232
  }), t;
233
233
  }, Ir = (a, e, t, n, r, s) => {
234
234
  if (e === "") return [];
235
- const i = n.transKeepBasicHtmlNodesFor || [], l = e && new RegExp(i.map((C) => `<${C}`).join("|")).test(e);
235
+ const i = n.transKeepBasicHtmlNodesFor || [], l = e && new RegExp(i.map((N) => `<${N}`).join("|")).test(e);
236
236
  if (!a && !l && !s) return [e];
237
- const d = {}, c = (C) => {
238
- ta(C).forEach((h) => {
237
+ const d = {}, c = (N) => {
238
+ ta(N).forEach((h) => {
239
239
  ke(h) || (Oa(h) ? c(Ua(h)) : aa(h) && !ka(h) && Object.assign(d, h));
240
240
  });
241
241
  };
@@ -243,13 +243,13 @@ const Pr = (a) => {
243
243
  const m = _r.parse(`<0>${e}</0>`), u = {
244
244
  ...d,
245
245
  ...r
246
- }, g = (C, v, h) => {
247
- const A = Ua(C), x = f(A, v.children, h);
248
- return Fr(A) && x.length === 0 || C.props && C.props.i18nIsDynamicList ? A : x;
249
- }, b = (C, v, h, A, x) => {
250
- C.dummy ? (C.children = v, h.push(dr(C, {
246
+ }, g = (N, v, h) => {
247
+ const A = Ua(N), x = f(A, v.children, h);
248
+ return Fr(A) && x.length === 0 || N.props && N.props.i18nIsDynamicList ? A : x;
249
+ }, b = (N, v, h, A, x) => {
250
+ N.dummy ? (N.children = v, h.push(dr(N, {
251
251
  key: A
252
- }, x ? void 0 : v))) : h.push(...ur.map([C], (k) => {
252
+ }, x ? void 0 : v))) : h.push(...ur.map([N], (k) => {
253
253
  const S = {
254
254
  ...k.props
255
255
  };
@@ -259,8 +259,8 @@ const Pr = (a) => {
259
259
  ref: k.ref
260
260
  }, x ? null : v);
261
261
  }));
262
- }, f = (C, v, h) => {
263
- const A = ta(C);
262
+ }, f = (N, v, h) => {
263
+ const A = ta(N);
264
264
  return ta(v).reduce((k, S, w) => {
265
265
  const y = S.children && S.children[0] && S.children[0].content && t.services.interpolator.interpolate(S.children[0].content, u, t.language);
266
266
  if (S.type === "tag") {
@@ -312,11 +312,11 @@ const Pr = (a) => {
312
312
  }
313
313
  return k;
314
314
  }, []);
315
- }, N = f([{
315
+ }, C = f([{
316
316
  dummy: !0,
317
317
  children: a || []
318
318
  }], m, ta(a || []));
319
- return Ua(N[0]);
319
+ return Ua(C[0]);
320
320
  };
321
321
  function Er(a) {
322
322
  let {
@@ -335,23 +335,23 @@ function Er(a) {
335
335
  shouldUnescape: b,
336
336
  ...f
337
337
  } = a;
338
- const N = u || Za();
339
- if (!N)
338
+ const C = u || Za();
339
+ if (!C)
340
340
  return xa("You will need to pass in an i18next instance by using i18nextReactModule"), e;
341
- const C = g || N.t.bind(N) || ((R) => R), v = {
341
+ const N = g || C.t.bind(C) || ((R) => R), v = {
342
342
  ...sn(),
343
- ...N.options && N.options.react
343
+ ...C.options && C.options.react
344
344
  };
345
- let h = m || C.ns || N.options && N.options.defaultNS;
345
+ let h = m || N.ns || C.options && C.options.defaultNS;
346
346
  h = ke(h) ? [h] : h || ["translation"];
347
347
  const A = ln(e, v), x = d || A || v.transEmptyNodeValue || r, {
348
348
  hashTransKey: k
349
349
  } = v, S = r || (k ? k(A || x) : A || x);
350
- N.options && N.options.interpolation && N.options.interpolation.defaultVariables && (l = l && Object.keys(l).length > 0 ? {
350
+ C.options && C.options.interpolation && C.options.interpolation.defaultVariables && (l = l && Object.keys(l).length > 0 ? {
351
351
  ...l,
352
- ...N.options.interpolation.defaultVariables
352
+ ...C.options.interpolation.defaultVariables
353
353
  } : {
354
- ...N.options.interpolation.defaultVariables
354
+ ...C.options.interpolation.defaultVariables
355
355
  });
356
356
  const w = l || t !== void 0 || !e ? i.interpolation : {
357
357
  interpolation: {
@@ -367,7 +367,7 @@ function Er(a) {
367
367
  ...w,
368
368
  defaultValue: x,
369
369
  ns: h
370
- }, D = S ? C(S, y) : x;
370
+ }, D = S ? N(S, y) : x;
371
371
  c && Object.keys(c).forEach((R) => {
372
372
  const E = c[R];
373
373
  if (typeof E.type == "function" || !E.props || !E.props.children || D.indexOf(`${R}/>`) < 0 && D.indexOf(`${R} />`) < 0) return;
@@ -376,7 +376,7 @@ function Er(a) {
376
376
  }
377
377
  c[R] = qe(J);
378
378
  });
379
- const T = Ir(c || e, D, N, v, y, b), I = n !== void 0 ? n : v.defaultTransParent;
379
+ const T = Ir(c || e, D, C, v, y, b), I = n !== void 0 ? n : v.defaultTransParent;
380
380
  return I ? qe(I, f, T) : T;
381
381
  }
382
382
  const Rr = {
@@ -414,9 +414,9 @@ function xt(a) {
414
414
  ...f
415
415
  } = a;
416
416
  const {
417
- i18n: N,
418
- defaultNS: C
419
- } = ba(Xa) || {}, v = u || N || Za(), h = g || v && v.t.bind(v);
417
+ i18n: C,
418
+ defaultNS: N
419
+ } = ba(Xa) || {}, v = u || C || Za(), h = g || v && v.t.bind(v);
420
420
  return Er({
421
421
  children: e,
422
422
  count: t,
@@ -427,7 +427,7 @@ function xt(a) {
427
427
  values: l,
428
428
  defaults: d,
429
429
  components: c,
430
- ns: m || h && h.ns || C || v && v.options && v.options.defaultNS,
430
+ ns: m || h && h.ns || N || v && v.options && v.options.defaultNS,
431
431
  i18n: v,
432
432
  t: g,
433
433
  shouldUnescape: b,
@@ -463,28 +463,28 @@ const Br = (a, e) => {
463
463
  } = i;
464
464
  let c = r || s.options && s.options.defaultNS;
465
465
  c = ke(c) ? [c] : c || ["translation"], s.reportNamespaces.addUsedNamespaces && s.reportNamespaces.addUsedNamespaces(c);
466
- const m = (s.isInitialized || s.initializedStoreOnce) && c.every((x) => kr(x, s, i)), u = zr(s, e.lng || null, i.nsMode === "fallback" ? c : c[0], d), g = () => u, b = () => cn(s, e.lng || null, i.nsMode === "fallback" ? c : c[0], d), [f, N] = K(g);
467
- let C = c.join();
468
- e.lng && (C = `${e.lng}${C}`);
469
- const v = Br(C), h = Ea(!0);
466
+ const m = (s.isInitialized || s.initializedStoreOnce) && c.every((x) => kr(x, s, i)), u = zr(s, e.lng || null, i.nsMode === "fallback" ? c : c[0], d), g = () => u, b = () => cn(s, e.lng || null, i.nsMode === "fallback" ? c : c[0], d), [f, C] = K(g);
467
+ let N = c.join();
468
+ e.lng && (N = `${e.lng}${N}`);
469
+ const v = Br(N), h = Ea(!0);
470
470
  Ce(() => {
471
471
  const {
472
472
  bindI18n: x,
473
473
  bindI18nStore: k
474
474
  } = i;
475
475
  h.current = !0, !m && !l && (e.lng ? At(s, e.lng, c, () => {
476
- h.current && N(b);
476
+ h.current && C(b);
477
477
  }) : wt(s, c, () => {
478
- h.current && N(b);
479
- })), m && v && v !== C && h.current && N(b);
478
+ h.current && C(b);
479
+ })), m && v && v !== N && h.current && C(b);
480
480
  const S = () => {
481
- h.current && N(b);
481
+ h.current && C(b);
482
482
  };
483
483
  return x && s && s.on(x, S), k && s && s.store.on(k, S), () => {
484
484
  h.current = !1, x && s && x.split(" ").forEach((w) => s.off(w, S)), k && s && k.split(" ").forEach((w) => s.store.off(w, S));
485
485
  };
486
- }, [s, C]), Ce(() => {
487
- h.current && m && N(g);
486
+ }, [s, N]), Ce(() => {
487
+ h.current && m && C(g);
488
488
  }, [s, d, m]);
489
489
  const A = [f, s, m];
490
490
  if (A.t = f, A.i18n = s, A.ready = m, m || !m && !l) return A;
@@ -863,8 +863,8 @@ class Fa extends Ra {
863
863
  }
864
864
  const u = this.resolve(e, t);
865
865
  let g = u && u.res;
866
- const b = u && u.usedKey || i, f = u && u.exactUsedKey || i, N = Object.prototype.toString.apply(g), C = ["[object Number]", "[object Function]", "[object RegExp]"], v = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, h = !this.i18nFormat || this.i18nFormat.handleAsObject, A = !q(g) && typeof g != "boolean" && typeof g != "number";
867
- if (h && g && A && C.indexOf(N) < 0 && !(q(v) && Array.isArray(g))) {
866
+ const b = u && u.usedKey || i, f = u && u.exactUsedKey || i, C = Object.prototype.toString.apply(g), N = ["[object Number]", "[object Function]", "[object RegExp]"], v = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, h = !this.i18nFormat || this.i18nFormat.handleAsObject, A = !q(g) && typeof g != "boolean" && typeof g != "number";
867
+ if (h && g && A && N.indexOf(C) < 0 && !(q(v) && Array.isArray(g))) {
868
868
  if (!t.returnObjects && !this.options.returnObjects) {
869
869
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
870
870
  const x = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(b, g, {
@@ -978,14 +978,14 @@ class Fa extends Ra {
978
978
  r = m;
979
979
  let u = c.namespaces;
980
980
  this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
981
- const g = t.count !== void 0 && !q(t.count), b = g && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), f = t.context !== void 0 && (q(t.context) || typeof t.context == "number") && t.context !== "", N = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
982
- u.forEach((C) => {
983
- this.isValidLookup(n) || (l = C, !It[`${N[0]}-${C}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(l) && (It[`${N[0]}-${C}`] = !0, this.logger.warn(`key "${r}" for languages "${N.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), N.forEach((v) => {
981
+ const g = t.count !== void 0 && !q(t.count), b = g && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), f = t.context !== void 0 && (q(t.context) || typeof t.context == "number") && t.context !== "", C = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
982
+ u.forEach((N) => {
983
+ this.isValidLookup(n) || (l = N, !It[`${C[0]}-${N}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(l) && (It[`${C[0]}-${N}`] = !0, this.logger.warn(`key "${r}" for languages "${C.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), C.forEach((v) => {
984
984
  if (this.isValidLookup(n)) return;
985
985
  i = v;
986
986
  const h = [m];
987
987
  if (this.i18nFormat && this.i18nFormat.addLookupKeys)
988
- this.i18nFormat.addLookupKeys(h, m, v, C, t);
988
+ this.i18nFormat.addLookupKeys(h, m, v, N, t);
989
989
  else {
990
990
  let x;
991
991
  g && (x = this.pluralResolver.getSuffix(v, t.count, t));
@@ -997,7 +997,7 @@ class Fa extends Ra {
997
997
  }
998
998
  let A;
999
999
  for (; A = h.pop(); )
1000
- this.isValidLookup(n) || (s = A, n = this.getResource(v, C, A, t));
1000
+ this.isValidLookup(n) || (s = A, n = this.getResource(v, N, A, t));
1001
1001
  }));
1002
1002
  });
1003
1003
  }), {
@@ -1331,12 +1331,12 @@ class ns {
1331
1331
  nestingPrefix: g,
1332
1332
  nestingPrefixEscaped: b,
1333
1333
  nestingSuffix: f,
1334
- nestingSuffixEscaped: N,
1335
- nestingOptionsSeparator: C,
1334
+ nestingSuffixEscaped: C,
1335
+ nestingOptionsSeparator: N,
1336
1336
  maxReplaces: v,
1337
1337
  alwaysFormat: h
1338
1338
  } = e.interpolation;
1339
- this.escape = t !== void 0 ? t : Wr, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = r !== void 0 ? r : !1, this.prefix = s ? Ze(s) : i || "{{", this.suffix = l ? Ze(l) : d || "}}", this.formatSeparator = c || ",", this.unescapePrefix = m ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : m || "", this.nestingPrefix = g ? Ze(g) : b || Ze("$t("), this.nestingSuffix = f ? Ze(f) : N || Ze(")"), this.nestingOptionsSeparator = C || ",", this.maxReplaces = v || 1e3, this.alwaysFormat = h !== void 0 ? h : !1, this.resetRegExp();
1339
+ this.escape = t !== void 0 ? t : Wr, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = r !== void 0 ? r : !1, this.prefix = s ? Ze(s) : i || "{{", this.suffix = l ? Ze(l) : d || "}}", this.formatSeparator = c || ",", this.unescapePrefix = m ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : m || "", this.nestingPrefix = g ? Ze(g) : b || Ze("$t("), this.nestingSuffix = f ? Ze(f) : C || Ze(")"), this.nestingOptionsSeparator = N || ",", this.maxReplaces = v || 1e3, this.alwaysFormat = h !== void 0 ? h : !1, this.resetRegExp();
1340
1340
  }
1341
1341
  reset() {
1342
1342
  this.options && this.init(this.options);
@@ -1356,11 +1356,11 @@ class ns {
1356
1356
  interpolationkey: b
1357
1357
  }) : v;
1358
1358
  }
1359
- const f = b.split(this.formatSeparator), N = f.shift().trim(), C = f.join(this.formatSeparator).trim();
1360
- return this.format(Mt(t, d, N, this.options.keySeparator, this.options.ignoreJSONStructure), C, n, {
1359
+ const f = b.split(this.formatSeparator), C = f.shift().trim(), N = f.join(this.formatSeparator).trim();
1360
+ return this.format(Mt(t, d, C, this.options.keySeparator, this.options.ignoreJSONStructure), N, n, {
1361
1361
  ...r,
1362
1362
  ...t,
1363
- interpolationkey: N
1363
+ interpolationkey: C
1364
1364
  });
1365
1365
  };
1366
1366
  this.resetRegExp();
@@ -1376,8 +1376,8 @@ class ns {
1376
1376
  const f = s[1].trim();
1377
1377
  if (i = c(f), i === void 0)
1378
1378
  if (typeof m == "function") {
1379
- const C = m(e, s, r);
1380
- i = q(C) ? C : "";
1379
+ const N = m(e, s, r);
1380
+ i = q(N) ? N : "";
1381
1381
  } else if (r && Object.prototype.hasOwnProperty.call(r, f))
1382
1382
  i = "";
1383
1383
  else if (u) {
@@ -1386,8 +1386,8 @@ class ns {
1386
1386
  } else
1387
1387
  this.logger.warn(`missed to pass in variable ${f} for interpolating ${e}`), i = "";
1388
1388
  else !q(i) && !this.useRawValueToEscape && (i = Tt(i));
1389
- const N = b.safeValue(i);
1390
- if (e = e.replace(s[0], N), u ? (b.regex.lastIndex += i.length, b.regex.lastIndex -= s[0].length) : b.regex.lastIndex = 0, l++, l >= this.maxReplaces)
1389
+ const C = b.safeValue(i);
1390
+ if (e = e.replace(s[0], C), u ? (b.regex.lastIndex += i.length, b.regex.lastIndex -= s[0].length) : b.regex.lastIndex = 0, l++, l >= this.maxReplaces)
1391
1391
  break;
1392
1392
  }
1393
1393
  }), e;
@@ -1407,8 +1407,8 @@ class ns {
1407
1407
  ...c,
1408
1408
  ...i
1409
1409
  });
1410
- } catch (N) {
1411
- return this.logger.warn(`failed parsing options string in nesting for key ${d}`, N), `${d}${m}${g}`;
1410
+ } catch (C) {
1411
+ return this.logger.warn(`failed parsing options string in nesting for key ${d}`, C), `${d}${m}${g}`;
1412
1412
  }
1413
1413
  return i.defaultValue && i.defaultValue.indexOf(this.prefix) > -1 && delete i.defaultValue, d;
1414
1414
  };
@@ -1783,13 +1783,13 @@ class ha extends Ra {
1783
1783
  }), m && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (g.formatter = s(m), g.formatter.init(g, this.options), this.options.interpolation.format = g.formatter.format.bind(g.formatter)), g.interpolator = new ns(this.options), g.utils = {
1784
1784
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1785
1785
  }, g.backendConnector = new is(s(this.modules.backend), g.resourceStore, g, this.options), g.backendConnector.on("*", function(b) {
1786
- for (var f = arguments.length, N = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
1787
- N[C - 1] = arguments[C];
1788
- e.emit(b, ...N);
1786
+ for (var f = arguments.length, C = new Array(f > 1 ? f - 1 : 0), N = 1; N < f; N++)
1787
+ C[N - 1] = arguments[N];
1788
+ e.emit(b, ...C);
1789
1789
  }), this.modules.languageDetector && (g.languageDetector = s(this.modules.languageDetector), g.languageDetector.init && g.languageDetector.init(g, this.options.detection, this.options)), this.modules.i18nFormat && (g.i18nFormat = s(this.modules.i18nFormat), g.i18nFormat.init && g.i18nFormat.init(this)), this.translator = new Fa(this.services, this.options), this.translator.on("*", function(b) {
1790
- for (var f = arguments.length, N = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
1791
- N[C - 1] = arguments[C];
1792
- e.emit(b, ...N);
1790
+ for (var f = arguments.length, C = new Array(f > 1 ? f - 1 : 0), N = 1; N < f; N++)
1791
+ C[N - 1] = arguments[N];
1792
+ e.emit(b, ...C);
1793
1793
  }), this.modules.external.forEach((b) => {
1794
1794
  b.init && b.init(this);
1795
1795
  });
@@ -2222,7 +2222,7 @@ const ds = {
2222
2222
  dashboardStorageTitle: "Storage",
2223
2223
  dashboardStorageHint: "Shared across files, knowledge base, and tables.",
2224
2224
  dashboardAiTitle: "AI usage",
2225
- dashboardAiHint: "Each conversation includes an AI allowance — this is how much you've used.",
2225
+ dashboardAiHint: "Each conversation includes an allowance of AI usage. Track how much of that allowance you've used",
2226
2226
  dashboardLoadError: "We couldn't load your usage. Try again in a moment.",
2227
2227
  dashboardNoBotSpend: "No per-bot AI spend this period.",
2228
2228
  dashboardAiByBot: "AI spend by bot",
@@ -2525,7 +2525,7 @@ const ds = {
2525
2525
  dashboardStorageTitle: "Stockage",
2526
2526
  dashboardStorageHint: "Partagé entre les fichiers, la base de connaissances et les tables.",
2527
2527
  dashboardAiTitle: "Utilisation de l'IA",
2528
- dashboardAiHint: "Chaque conversation inclut une allocation d'IA — voici combien vous avez utilisé.",
2528
+ dashboardAiHint: "Chaque conversation inclut une allocation d'usage IA. Suivez la part de cette allocation que vous avez utilisée",
2529
2529
  dashboardLoadError: "Impossible de charger votre utilisation. Réessayez dans un instant.",
2530
2530
  dashboardNoBotSpend: "Aucune dépense IA par bot pour cette période.",
2531
2531
  dashboardAiByBot: "Dépenses IA par bot",
@@ -2822,7 +2822,7 @@ const ds = {
2822
2822
  dashboardStorageTitle: "Almacenamiento",
2823
2823
  dashboardStorageHint: "Compartido entre archivos, base de conocimiento y tablas.",
2824
2824
  dashboardAiTitle: "Uso de IA",
2825
- dashboardAiHint: "Cada conversación incluye una asignación de IA — esto es cuánto has usado.",
2825
+ dashboardAiHint: "Cada conversación incluye una asignación de uso de IA. Controla cuánto de esa asignación has usado",
2826
2826
  dashboardLoadError: "No pudimos cargar tu uso. Inténtalo de nuevo en un momento.",
2827
2827
  dashboardNoBotSpend: "Sin gasto de IA por bot en este período.",
2828
2828
  dashboardAiByBot: "Gasto de IA por bot",
@@ -3119,7 +3119,7 @@ const ds = {
3119
3119
  dashboardStorageTitle: "Armazenamento",
3120
3120
  dashboardStorageHint: "Compartilhado entre arquivos, base de conhecimento e tabelas.",
3121
3121
  dashboardAiTitle: "Uso de IA",
3122
- dashboardAiHint: "Cada conversa inclui uma cota de IA — isso é quanto você usou.",
3122
+ dashboardAiHint: "Cada conversa inclui uma cota de uso de IA. Acompanhe quanto dessa cota você já usou",
3123
3123
  dashboardLoadError: "Não foi possível carregar seu uso. Tente novamente em um momento.",
3124
3124
  dashboardNoBotSpend: "Sem gastos de IA por bot neste período.",
3125
3125
  dashboardAiByBot: "Gastos de IA por bot",
@@ -3254,15 +3254,15 @@ const hi = ({
3254
3254
  manageBillingUrl: g,
3255
3255
  onBillingChange: b,
3256
3256
  refreshInterval: f = 3e4,
3257
- children: N
3257
+ children: C
3258
3258
  }) => {
3259
- const C = m || "default", [v] = K(
3259
+ const N = m || "default", [v] = K(
3260
3260
  () => new or({ defaultOptions: { queries: { retry: 1, staleTime: 3e4, gcTime: 1e3 * 60 * 60 } } })
3261
3261
  ), h = hs(r), A = _e(() => gr(e), [e]);
3262
3262
  Ce(() => {
3263
3263
  if (!u || typeof window > "u")
3264
3264
  return;
3265
- const y = `bpb-cache:${C}`;
3265
+ const y = `bpb-cache:${N}`;
3266
3266
  try {
3267
3267
  const I = window.localStorage.getItem(y);
3268
3268
  I && ir(v, JSON.parse(I));
@@ -3281,14 +3281,14 @@ const hi = ({
3281
3281
  return () => {
3282
3282
  D && clearTimeout(D), T();
3283
3283
  };
3284
- }, [u, C, v]);
3285
- const x = wa(() => v.invalidateQueries({ queryKey: ["bpb", C] }), [v, C]), k = wa((y) => b == null ? void 0 : b(y), [b]), S = f > 0 ? f : !1;
3284
+ }, [u, N, v]);
3285
+ const x = wa(() => v.invalidateQueries({ queryKey: ["bpb", N] }), [v, N]), k = wa((y) => b == null ? void 0 : b(y), [b]), S = f > 0 ? f : !1;
3286
3286
  Ka.changeLanguage(n);
3287
3287
  const w = _e(
3288
3288
  () => ({
3289
3289
  client: a,
3290
3290
  queryClient: v,
3291
- scope: C,
3291
+ scope: N,
3292
3292
  stripePromise: A,
3293
3293
  email: t,
3294
3294
  locale: n,
@@ -3307,7 +3307,7 @@ const hi = ({
3307
3307
  [
3308
3308
  a,
3309
3309
  v,
3310
- C,
3310
+ N,
3311
3311
  A,
3312
3312
  t,
3313
3313
  n,
@@ -3330,7 +3330,7 @@ const hi = ({
3330
3330
  "data-bpb-theme": h ? "dark" : "light",
3331
3331
  "data-bpb-color-scheme": s,
3332
3332
  style: { display: "contents" },
3333
- children: N
3333
+ children: C
3334
3334
  }
3335
3335
  ) }) });
3336
3336
  };
@@ -3495,7 +3495,7 @@ function vs(a, e) {
3495
3495
  i({ id: r, type: a, period: `${m}-01T00:00:00.000Z` }),
3496
3496
  l({})
3497
3497
  ]), b = new Map(g.bots.map((f) => [f.id, f.name]));
3498
- return u.data.map((f) => ({ botId: f.botId, name: b.get(f.botId) ?? f.botId, value: f.value })).sort((f, N) => N.value - f.value);
3498
+ return u.data.map((f) => ({ botId: f.botId, name: b.get(f.botId) ?? f.botId, value: f.value })).sort((f, C) => C.value - f.value);
3499
3499
  },
3500
3500
  enabled: d && ((e == null ? void 0 : e.enabled) ?? !0),
3501
3501
  refetchInterval: s
@@ -3746,19 +3746,19 @@ const Ss = (a, e) => {
3746
3746
  const s = [];
3747
3747
  let i = 0, l = 0, d = 0, c;
3748
3748
  const m = r.length;
3749
- for (let N = 0; N < m; N++) {
3750
- const C = r[N];
3749
+ for (let C = 0; C < m; C++) {
3750
+ const N = r[C];
3751
3751
  if (i === 0 && l === 0) {
3752
- if (C === Ut) {
3753
- s.push(r.slice(d, N)), d = N + 1;
3752
+ if (N === Ut) {
3753
+ s.push(r.slice(d, C)), d = C + 1;
3754
3754
  continue;
3755
3755
  }
3756
- if (C === "/") {
3757
- c = N;
3756
+ if (N === "/") {
3757
+ c = C;
3758
3758
  continue;
3759
3759
  }
3760
3760
  }
3761
- C === "[" ? i++ : C === "]" ? i-- : C === "(" ? l++ : C === ")" && l--;
3761
+ N === "[" ? i++ : N === "]" ? i-- : N === "(" ? l++ : N === ")" && l--;
3762
3762
  }
3763
3763
  const u = s.length === 0 ? r : r.slice(d);
3764
3764
  let g = u, b = !1;
@@ -3823,27 +3823,27 @@ const Ss = (a, e) => {
3823
3823
  isExternal: g,
3824
3824
  modifiers: b,
3825
3825
  hasImportantModifier: f,
3826
- baseClassName: N,
3827
- maybePostfixModifierPosition: C
3826
+ baseClassName: C,
3827
+ maybePostfixModifierPosition: N
3828
3828
  } = t(u);
3829
3829
  if (g) {
3830
3830
  c = u + (c.length > 0 ? " " + c : c);
3831
3831
  continue;
3832
3832
  }
3833
- let v = !!C, h;
3833
+ let v = !!N, h;
3834
3834
  if (v) {
3835
- const w = N.substring(0, C);
3835
+ const w = C.substring(0, N);
3836
3836
  h = n(w);
3837
- const y = h && i[h] ? n(N) : void 0;
3837
+ const y = h && i[h] ? n(C) : void 0;
3838
3838
  y && y !== h && (h = y, v = !1);
3839
3839
  } else
3840
- h = n(N);
3840
+ h = n(C);
3841
3841
  if (!h) {
3842
3842
  if (!v) {
3843
3843
  c = u + (c.length > 0 ? " " + c : c);
3844
3844
  continue;
3845
3845
  }
3846
- if (h = n(N), !h) {
3846
+ if (h = n(C), !h) {
3847
3847
  c = u + (c.length > 0 ? " " + c : c);
3848
3848
  continue;
3849
3849
  }
@@ -3901,7 +3901,7 @@ const Ss = (a, e) => {
3901
3901
  const n = Tn.exec(a);
3902
3902
  return n ? n[1] ? e(n[1]) : t : !1;
3903
3903
  }, Pn = (a) => a === "position" || a === "percentage", Fn = (a) => a === "image" || a === "url", Ln = (a) => a === "length" || a === "size" || a === "bg-size", In = (a) => a === "length", po = (a) => a === "number", En = (a) => a === "family-name", Rn = (a) => a === "number" || a === "weight", Mn = (a) => a === "shadow", mo = () => {
3904
- const a = he("color"), e = he("font"), t = he("text"), n = he("font-weight"), r = he("tracking"), s = he("leading"), i = he("breakpoint"), l = he("container"), d = he("spacing"), c = he("radius"), m = he("shadow"), u = he("inset-shadow"), g = he("text-shadow"), b = he("drop-shadow"), f = he("blur"), N = he("perspective"), C = he("aspect"), v = he("ease"), h = he("animate"), A = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
3904
+ const a = he("color"), e = he("font"), t = he("text"), n = he("font-weight"), r = he("tracking"), s = he("leading"), i = he("breakpoint"), l = he("container"), d = he("spacing"), c = he("radius"), m = he("shadow"), u = he("inset-shadow"), g = he("text-shadow"), b = he("drop-shadow"), f = he("blur"), C = he("perspective"), N = he("aspect"), v = he("ease"), h = he("animate"), A = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
3905
3905
  "center",
3906
3906
  "top",
3907
3907
  "bottom",
@@ -3927,7 +3927,7 @@ const Ss = (a, e) => {
3927
3927
  repeat: ["", "x", "y", "space", "round"]
3928
3928
  }], $ = () => ["auto", "cover", "contain", lo, no, {
3929
3929
  size: [L, F]
3930
- }], V = () => [ja, pa, He], O = () => [
3930
+ }], V = () => [ja, pa, He], U = () => [
3931
3931
  // Deprecated since Tailwind CSS v4.0.0
3932
3932
  "",
3933
3933
  "none",
@@ -3975,7 +3975,7 @@ const Ss = (a, e) => {
3975
3975
  * @see https://tailwindcss.com/docs/aspect-ratio
3976
3976
  */
3977
3977
  aspect: [{
3978
- aspect: ["auto", "square", Oe, F, L, C]
3978
+ aspect: ["auto", "square", Oe, F, L, N]
3979
3979
  }],
3980
3980
  /**
3981
3981
  * Container
@@ -5102,105 +5102,105 @@ const Ss = (a, e) => {
5102
5102
  * @see https://tailwindcss.com/docs/border-radius
5103
5103
  */
5104
5104
  rounded: [{
5105
- rounded: O()
5105
+ rounded: U()
5106
5106
  }],
5107
5107
  /**
5108
5108
  * Border Radius Start
5109
5109
  * @see https://tailwindcss.com/docs/border-radius
5110
5110
  */
5111
5111
  "rounded-s": [{
5112
- "rounded-s": O()
5112
+ "rounded-s": U()
5113
5113
  }],
5114
5114
  /**
5115
5115
  * Border Radius End
5116
5116
  * @see https://tailwindcss.com/docs/border-radius
5117
5117
  */
5118
5118
  "rounded-e": [{
5119
- "rounded-e": O()
5119
+ "rounded-e": U()
5120
5120
  }],
5121
5121
  /**
5122
5122
  * Border Radius Top
5123
5123
  * @see https://tailwindcss.com/docs/border-radius
5124
5124
  */
5125
5125
  "rounded-t": [{
5126
- "rounded-t": O()
5126
+ "rounded-t": U()
5127
5127
  }],
5128
5128
  /**
5129
5129
  * Border Radius Right
5130
5130
  * @see https://tailwindcss.com/docs/border-radius
5131
5131
  */
5132
5132
  "rounded-r": [{
5133
- "rounded-r": O()
5133
+ "rounded-r": U()
5134
5134
  }],
5135
5135
  /**
5136
5136
  * Border Radius Bottom
5137
5137
  * @see https://tailwindcss.com/docs/border-radius
5138
5138
  */
5139
5139
  "rounded-b": [{
5140
- "rounded-b": O()
5140
+ "rounded-b": U()
5141
5141
  }],
5142
5142
  /**
5143
5143
  * Border Radius Left
5144
5144
  * @see https://tailwindcss.com/docs/border-radius
5145
5145
  */
5146
5146
  "rounded-l": [{
5147
- "rounded-l": O()
5147
+ "rounded-l": U()
5148
5148
  }],
5149
5149
  /**
5150
5150
  * Border Radius Start Start
5151
5151
  * @see https://tailwindcss.com/docs/border-radius
5152
5152
  */
5153
5153
  "rounded-ss": [{
5154
- "rounded-ss": O()
5154
+ "rounded-ss": U()
5155
5155
  }],
5156
5156
  /**
5157
5157
  * Border Radius Start End
5158
5158
  * @see https://tailwindcss.com/docs/border-radius
5159
5159
  */
5160
5160
  "rounded-se": [{
5161
- "rounded-se": O()
5161
+ "rounded-se": U()
5162
5162
  }],
5163
5163
  /**
5164
5164
  * Border Radius End End
5165
5165
  * @see https://tailwindcss.com/docs/border-radius
5166
5166
  */
5167
5167
  "rounded-ee": [{
5168
- "rounded-ee": O()
5168
+ "rounded-ee": U()
5169
5169
  }],
5170
5170
  /**
5171
5171
  * Border Radius End Start
5172
5172
  * @see https://tailwindcss.com/docs/border-radius
5173
5173
  */
5174
5174
  "rounded-es": [{
5175
- "rounded-es": O()
5175
+ "rounded-es": U()
5176
5176
  }],
5177
5177
  /**
5178
5178
  * Border Radius Top Left
5179
5179
  * @see https://tailwindcss.com/docs/border-radius
5180
5180
  */
5181
5181
  "rounded-tl": [{
5182
- "rounded-tl": O()
5182
+ "rounded-tl": U()
5183
5183
  }],
5184
5184
  /**
5185
5185
  * Border Radius Top Right
5186
5186
  * @see https://tailwindcss.com/docs/border-radius
5187
5187
  */
5188
5188
  "rounded-tr": [{
5189
- "rounded-tr": O()
5189
+ "rounded-tr": U()
5190
5190
  }],
5191
5191
  /**
5192
5192
  * Border Radius Bottom Right
5193
5193
  * @see https://tailwindcss.com/docs/border-radius
5194
5194
  */
5195
5195
  "rounded-br": [{
5196
- "rounded-br": O()
5196
+ "rounded-br": U()
5197
5197
  }],
5198
5198
  /**
5199
5199
  * Border Radius Bottom Left
5200
5200
  * @see https://tailwindcss.com/docs/border-radius
5201
5201
  */
5202
5202
  "rounded-bl": [{
5203
- "rounded-bl": O()
5203
+ "rounded-bl": U()
5204
5204
  }],
5205
5205
  /**
5206
5206
  * Border Width
@@ -6025,7 +6025,7 @@ const Ss = (a, e) => {
6025
6025
  * @see https://tailwindcss.com/docs/perspective
6026
6026
  */
6027
6027
  perspective: [{
6028
- perspective: [N, L, F]
6028
+ perspective: [C, L, F]
6029
6029
  }],
6030
6030
  /**
6031
6031
  * Perspective Origin
@@ -6586,7 +6586,7 @@ const Ss = (a, e) => {
6586
6586
  orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
6587
6587
  };
6588
6588
  }, go = /* @__PURE__ */ Vs(mo);
6589
- function U(...a) {
6589
+ function O(...a) {
6590
6590
  return go(_s(a));
6591
6591
  }
6592
6592
  function ee(a, e = "usd", t = 2, n = "en-US") {
@@ -6776,7 +6776,7 @@ const On = {
6776
6776
  ],
6777
6777
  enterprise: ["Voice channel", "Dedicated support", "SLA & security review", "Custom storage"],
6778
6778
  managed: []
6779
- }, st = ({ variant: a = "accent", children: e, className: t }) => /* @__PURE__ */ o("span", { className: U("bpb-badge", `bpb-badge--${a}`, t), children: e }), be = ({
6779
+ }, st = ({ variant: a = "accent", children: e, className: t }) => /* @__PURE__ */ o("span", { className: O("bpb-badge", `bpb-badge--${a}`, t), children: e }), be = ({
6780
6780
  variant: a = "primary",
6781
6781
  size: e = "md",
6782
6782
  block: t = !1,
@@ -6790,7 +6790,7 @@ const On = {
6790
6790
  "button",
6791
6791
  {
6792
6792
  type: l,
6793
- className: U("bpb-btn", `bpb-btn--${a}`, `bpb-btn--${e}`, t && "bpb-btn--block", r),
6793
+ className: O("bpb-btn", `bpb-btn--${a}`, `bpb-btn--${e}`, t && "bpb-btn--block", r),
6794
6794
  disabled: s || n,
6795
6795
  "data-loading": n || void 0,
6796
6796
  ...d,
@@ -7073,7 +7073,7 @@ const xe = ({
7073
7073
  "aria-modal": "true",
7074
7074
  "aria-label": i["aria-label"],
7075
7075
  tabIndex: -1,
7076
- className: U("bpb-dialog", `bpb-dialog--${t}`, r),
7076
+ className: O("bpb-dialog", `bpb-dialog--${t}`, r),
7077
7077
  onClick: (u) => u.stopPropagation(),
7078
7078
  children: [
7079
7079
  s && /* @__PURE__ */ o("button", { type: "button", className: "bpb-dialog__close", "aria-label": "Close", onClick: m, children: /* @__PURE__ */ o(lt, { size: 18 }) }),
@@ -7104,7 +7104,7 @@ const xe = ({
7104
7104
  onChange: t,
7105
7105
  className: n,
7106
7106
  ...r
7107
- }) => /* @__PURE__ */ o("div", { role: "radiogroup", "aria-label": r["aria-label"], className: U("bpb-segmented", n), children: a.map((s) => {
7107
+ }) => /* @__PURE__ */ o("div", { role: "radiogroup", "aria-label": r["aria-label"], className: O("bpb-segmented", n), children: a.map((s) => {
7108
7108
  const i = s.value === e;
7109
7109
  return /* @__PURE__ */ p(
7110
7110
  "button",
@@ -7112,7 +7112,7 @@ const xe = ({
7112
7112
  type: "button",
7113
7113
  role: "radio",
7114
7114
  "aria-checked": i,
7115
- className: U("bpb-segmented__option", i && "bpb-segmented__option--selected"),
7115
+ className: O("bpb-segmented__option", i && "bpb-segmented__option--selected"),
7116
7116
  onClick: () => t(s.value),
7117
7117
  children: [
7118
7118
  s.label,
@@ -7125,7 +7125,7 @@ const xe = ({
7125
7125
  "span",
7126
7126
  {
7127
7127
  "aria-hidden": !0,
7128
- className: U("bpb-skeleton", t && "bpb-skeleton--rounded", n),
7128
+ className: O("bpb-skeleton", t && "bpb-skeleton--rounded", n),
7129
7129
  style: { width: a ?? "100%", height: e }
7130
7130
  }
7131
7131
  );
@@ -7161,7 +7161,7 @@ const Bo = ({
7161
7161
  featureDescriptions: l
7162
7162
  }) => {
7163
7163
  var Q, z, H;
7164
- const { isOutdatedBilling: d, toast: c, analytics: m } = G(), { t: u } = oe(), [g, b] = K(r), { data: f, isLoading: N } = ze(), { data: C } = ia(), { data: v } = Fe({ enabled: a }), { data: h } = bn({ enabled: a }), A = Nn(), x = (h == null ? void 0 : h.planReadonly) ?? !1;
7164
+ const { isOutdatedBilling: d, toast: c, analytics: m } = G(), { t: u } = oe(), [g, b] = K(r), { data: f, isLoading: C } = ze(), { data: N } = ia(), { data: v } = Fe({ enabled: a }), { data: h } = bn({ enabled: a }), A = Nn(), x = (h == null ? void 0 : h.planReadonly) ?? !1;
7165
7165
  Ce(() => {
7166
7166
  a && m.capture(pe.PLAN_PICKER_VIEWED, { interval: g });
7167
7167
  }, [a, m]);
@@ -7233,7 +7233,7 @@ const Bo = ({
7233
7233
  }
7234
7234
  ) }),
7235
7235
  /* @__PURE__ */ p("div", { className: "bpb-upgrade__grid", children: [
7236
- N && [0, 1, 2].map((_) => /* @__PURE__ */ p("div", { className: "bpb-plan-card", "aria-hidden": !0, children: [
7236
+ C && [0, 1, 2].map((_) => /* @__PURE__ */ p("div", { className: "bpb-plan-card", "aria-hidden": !0, children: [
7237
7237
  /* @__PURE__ */ o(Y, { width: 120, height: 22 }),
7238
7238
  /* @__PURE__ */ o(Y, { width: 90, height: 40 }),
7239
7239
  /* @__PURE__ */ o(Y, { width: "100%", height: 36, rounded: !0 }),
@@ -7241,11 +7241,11 @@ const Bo = ({
7241
7241
  ] }, _)),
7242
7242
  R.map((_, ne) => {
7243
7243
  var ce, ae;
7244
- const P = ue(_), $ = Eo(_, g), V = Ro(_, g), O = (((ce = _.prices.month) == null ? void 0 : ce.amount) ?? 0) <= 0, j = P === y && (y === "community" || g === S), le = P === y && y !== "community" && g !== S, ie = !!D && _.id === D && !j, Z = y !== void 0 && na.indexOf(P) < na.indexOf(y), ge = (P === n || _.id === n) && !j, fe = j && T ? "cancel_downgrade" : j ? "current" : le ? "switch_interval" : ie ? "next" : Z ? "downgrade" : "upgrade", ye = ne > 0 ? R[ne - 1] : void 0, Le = i[P] ?? rt[P], we = _.features.conversation_sessions, Ie = nt(C, _, g), X = A.isPending && (fe === "downgrade" && ((ae = A.variables) == null ? void 0 : ae.planId) === _.id || fe === "cancel_downgrade");
7244
+ const P = ue(_), $ = Eo(_, g), V = Ro(_, g), U = (((ce = _.prices.month) == null ? void 0 : ce.amount) ?? 0) <= 0, j = P === y && (y === "community" || g === S), le = P === y && y !== "community" && g !== S, ie = !!D && _.id === D && !j, Z = y !== void 0 && na.indexOf(P) < na.indexOf(y), ge = (P === n || _.id === n) && !j, fe = j && T ? "cancel_downgrade" : j ? "current" : le ? "switch_interval" : ie ? "next" : Z ? "downgrade" : "upgrade", ye = ne > 0 ? R[ne - 1] : void 0, Le = i[P] ?? rt[P], we = _.features.conversation_sessions, Ie = nt(N, _, g), X = A.isPending && (fe === "downgrade" && ((ae = A.variables) == null ? void 0 : ae.planId) === _.id || fe === "cancel_downgrade");
7245
7245
  return /* @__PURE__ */ p(
7246
7246
  "div",
7247
7247
  {
7248
- className: U("bpb-plan-card", ge && "bpb-plan-card--highlighted bpb-glow"),
7248
+ className: O("bpb-plan-card", ge && "bpb-plan-card--highlighted bpb-glow"),
7249
7249
  "data-plan-id": _.id,
7250
7250
  children: [
7251
7251
  /* @__PURE__ */ p("div", { className: "bpb-plan-card__header", children: [
@@ -7263,7 +7263,7 @@ const Bo = ({
7263
7263
  we !== void 0 && /* @__PURE__ */ p("div", { className: "bpb-plan-card__allowance", children: [
7264
7264
  /* @__PURE__ */ p("div", { className: "bpb-plan-card__metric", children: [
7265
7265
  /* @__PURE__ */ o("span", { className: "bpb-plan-card__metric-value", children: re(we) }),
7266
- /* @__PURE__ */ o("span", { className: "bpb-plan-card__metric-unit", children: u(O ? "conversationsUnit" : "conversationsPerMonth") })
7266
+ /* @__PURE__ */ o("span", { className: "bpb-plan-card__metric-unit", children: u(U ? "conversationsUnit" : "conversationsPerMonth") })
7267
7267
  ] }),
7268
7268
  Ie ? /* @__PURE__ */ o("p", { className: "bpb-plan-card__pack", children: u("upgradeThenPer", {
7269
7269
  price: ee(Ie.amount, Ie.currency, 0),
@@ -7437,7 +7437,7 @@ const Oo = 4, Uo = ({
7437
7437
  onSubscribe: l
7438
7438
  }) => {
7439
7439
  var E, J, M, B, Q;
7440
- const { locale: d } = G(), { t: c } = oe(), { data: m } = ia(), u = ((E = a == null ? void 0 : a.prices.month) == null ? void 0 : E.currency) ?? ((J = a == null ? void 0 : a.prices.year) == null ? void 0 : J.currency) ?? "usd", g = a == null ? void 0 : a.features.conversation_sessions, b = a && ue(a) === "community" ? c("conversationsUnit") : c("conversationsPerMonth"), f = a ? nt(m, a, e) : null, N = (t == null ? void 0 : t.costs.immediate.amountDue) ?? 0, C = (t == null ? void 0 : t.costs.immediate.accountBalance) ?? 0, v = (t == null ? void 0 : t.costs.nextCycle.total) ?? 0, h = t != null && t.nextBillingDate ? $e(ho(t.nextBillingDate, 1), d) : null, A = a ? rt[ue(a)].slice(0, Oo) : [], x = a ? ((M = a.prices[e]) == null ? void 0 : M.amount) ?? 0 : 0, k = (t == null ? void 0 : t.costs.immediate.lineItems) ?? [], S = k.filter((z) => z.type === "discount"), w = k.filter((z) => z.type === "proration_credit" || z.type === "proration_charge").reduce((z, H) => z + H.amount, 0), y = !!(t != null && t.subscription.plan.effectiveDate), D = ((B = a == null ? void 0 : a.prices.month) == null ? void 0 : B.amount) ?? 0, T = ((Q = a == null ? void 0 : a.prices.year) == null ? void 0 : Q.amount) ?? 0, I = e === "year" && D > 0 && T > 0 ? Math.round(D * 12 - T) : 0, R = Math.round(I / 12);
7440
+ const { locale: d } = G(), { t: c } = oe(), { data: m } = ia(), u = ((E = a == null ? void 0 : a.prices.month) == null ? void 0 : E.currency) ?? ((J = a == null ? void 0 : a.prices.year) == null ? void 0 : J.currency) ?? "usd", g = a == null ? void 0 : a.features.conversation_sessions, b = a && ue(a) === "community" ? c("conversationsUnit") : c("conversationsPerMonth"), f = a ? nt(m, a, e) : null, C = (t == null ? void 0 : t.costs.immediate.amountDue) ?? 0, N = (t == null ? void 0 : t.costs.immediate.accountBalance) ?? 0, v = (t == null ? void 0 : t.costs.nextCycle.total) ?? 0, h = t != null && t.nextBillingDate ? $e(ho(t.nextBillingDate, 1), d) : null, A = a ? rt[ue(a)].slice(0, Oo) : [], x = a ? ((M = a.prices[e]) == null ? void 0 : M.amount) ?? 0 : 0, k = (t == null ? void 0 : t.costs.immediate.lineItems) ?? [], S = k.filter((z) => z.type === "discount"), w = k.filter((z) => z.type === "proration_credit" || z.type === "proration_charge").reduce((z, H) => z + H.amount, 0), y = !!(t != null && t.subscription.plan.effectiveDate), D = ((B = a == null ? void 0 : a.prices.month) == null ? void 0 : B.amount) ?? 0, T = ((Q = a == null ? void 0 : a.prices.year) == null ? void 0 : Q.amount) ?? 0, I = e === "year" && D > 0 && T > 0 ? Math.round(D * 12 - T) : 0, R = Math.round(I / 12);
7441
7441
  return /* @__PURE__ */ p("div", { className: "bpb-summary-wrap", children: [
7442
7442
  /* @__PURE__ */ p("div", { className: "bpb-summary bpb-glow", children: [
7443
7443
  /* @__PURE__ */ o("h3", { className: "bpb-summary__title", children: a ? `${se(a.name)} plan` : /* @__PURE__ */ o(Y, { width: 140, height: 24 }) }),
@@ -7481,11 +7481,11 @@ const Oo = 4, Uo = ({
7481
7481
  ] }),
7482
7482
  /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
7483
7483
  /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ o(Ia, { label: c("orderProratedToday"), children: c("orderProratedTodayDesc") }) }),
7484
- /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(N, u) })
7484
+ /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(C, u) })
7485
7485
  ] }),
7486
7486
  /* @__PURE__ */ p("div", { className: "bpb-summary__line bpb-summary__line--total", children: [
7487
7487
  /* @__PURE__ */ o("span", { children: c("orderDueToday") }),
7488
- /* @__PURE__ */ o("span", { children: ee(N, u) })
7488
+ /* @__PURE__ */ o("span", { children: ee(C, u) })
7489
7489
  ] }),
7490
7490
  w < 0 && /* @__PURE__ */ o("p", { className: "bpb-summary__addon-note", children: c("orderCreditTowardNext", { amount: ee(Math.abs(w), u) }) })
7491
7491
  ] }),
@@ -7510,15 +7510,15 @@ const Oo = 4, Uo = ({
7510
7510
  /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ o(Ia, { label: w < 0 ? c("orderCreditUnusedTime") : c("orderAdjustUnusedTime"), children: w < 0 ? c("orderCreditUnusedTimeDesc") : c("orderAdjustUnusedTimeDesc") }) }),
7511
7511
  /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(w, u) })
7512
7512
  ] }),
7513
- C !== 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
7513
+ N !== 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
7514
7514
  /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: c("orderAccountCredit") }),
7515
- /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(C, u) })
7515
+ /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(N, u) })
7516
7516
  ] }),
7517
7517
  /* @__PURE__ */ p("div", { className: "bpb-summary__line bpb-summary__line--total", children: [
7518
7518
  /* @__PURE__ */ o("span", { children: c("orderDueToday") }),
7519
- /* @__PURE__ */ o("span", { children: ee(N, u) })
7519
+ /* @__PURE__ */ o("span", { children: ee(C, u) })
7520
7520
  ] }),
7521
- w < 0 && N === 0 && /* @__PURE__ */ o("p", { className: "bpb-summary__addon-note", children: c("orderBalanceAsCredit", { amount: ee(Math.abs(w), u) }) })
7521
+ w < 0 && C === 0 && /* @__PURE__ */ o("p", { className: "bpb-summary__addon-note", children: c("orderBalanceAsCredit", { amount: ee(Math.abs(w), u) }) })
7522
7522
  ] }),
7523
7523
  I > 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__savings", children: [
7524
7524
  /* @__PURE__ */ o(Un, { size: 18, className: "bpb-summary__savings-icon" }),
@@ -7620,16 +7620,16 @@ function Kn(a) {
7620
7620
  const e = a.toUpperCase();
7621
7621
  return qo.includes(e) ? jo : $o[e] ?? [];
7622
7622
  }
7623
- const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("label", { className: U("bpb-input", e), children: [
7623
+ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("label", { className: O("bpb-input", e), children: [
7624
7624
  /* @__PURE__ */ o("span", { className: "bpb-input__label", children: a }),
7625
7625
  /* @__PURE__ */ o("input", { className: "bpb-input__field bpb-input__field--labeled", id: t, ...n })
7626
- ] }) : /* @__PURE__ */ o("input", { className: U("bpb-input__field", e), id: t, ...n }), Hn = ({ label: a, className: e, children: t, ...n }) => /* @__PURE__ */ p("label", { className: U("bpb-input", e), children: [
7626
+ ] }) : /* @__PURE__ */ o("input", { className: O("bpb-input__field", e), id: t, ...n }), Hn = ({ label: a, className: e, children: t, ...n }) => /* @__PURE__ */ p("label", { className: O("bpb-input", e), children: [
7627
7627
  a && /* @__PURE__ */ o("span", { className: "bpb-input__label", children: a }),
7628
7628
  /* @__PURE__ */ p("span", { className: "bpb-input__select-wrap", children: [
7629
7629
  /* @__PURE__ */ o(
7630
7630
  "select",
7631
7631
  {
7632
- className: U("bpb-input__field bpb-input__field--select", a && "bpb-input__field--labeled"),
7632
+ className: O("bpb-input__field bpb-input__field--select", a && "bpb-input__field--labeled"),
7633
7633
  ...n,
7634
7634
  children: t
7635
7635
  }
@@ -7651,7 +7651,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7651
7651
  type: "button",
7652
7652
  role: "radio",
7653
7653
  "aria-checked": e === "month",
7654
- className: U("bpb-interval-card", e === "month" && "bpb-interval-card--selected"),
7654
+ className: O("bpb-interval-card", e === "month" && "bpb-interval-card--selected"),
7655
7655
  onClick: () => t("month"),
7656
7656
  children: [
7657
7657
  /* @__PURE__ */ o("span", { className: "bpb-interval-card__title", children: n("checkoutMonthlyBilling") }),
@@ -7669,7 +7669,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7669
7669
  type: "button",
7670
7670
  role: "radio",
7671
7671
  "aria-checked": e === "year",
7672
- className: U("bpb-interval-card", e === "year" && "bpb-interval-card--selected"),
7672
+ className: O("bpb-interval-card", e === "year" && "bpb-interval-card--selected"),
7673
7673
  onClick: () => t("year"),
7674
7674
  children: [
7675
7675
  /* @__PURE__ */ p("span", { className: "bpb-interval-card__title", children: [
@@ -7722,7 +7722,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7722
7722
  type: "button",
7723
7723
  role: "tab",
7724
7724
  "aria-selected": n === "saved",
7725
- className: U("bpb-pay-tab", n === "saved" && "bpb-pay-tab--selected"),
7725
+ className: O("bpb-pay-tab", n === "saved" && "bpb-pay-tab--selected"),
7726
7726
  onClick: () => r("saved"),
7727
7727
  children: [
7728
7728
  /* @__PURE__ */ o(Kt, { size: 16 }),
@@ -7736,7 +7736,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7736
7736
  type: "button",
7737
7737
  role: "tab",
7738
7738
  "aria-selected": n === "new",
7739
- className: U("bpb-pay-tab", n === "new" && "bpb-pay-tab--selected"),
7739
+ className: O("bpb-pay-tab", n === "new" && "bpb-pay-tab--selected"),
7740
7740
  onClick: () => r("new"),
7741
7741
  children: [
7742
7742
  /* @__PURE__ */ o(Kt, { size: 16 }),
@@ -7760,7 +7760,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7760
7760
  ] }),
7761
7761
  c && /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
7762
7762
  !l && /* @__PURE__ */ o("div", { className: "bpb-payment-element__skeleton", children: /* @__PURE__ */ o(Y, { height: 48 }) }),
7763
- /* @__PURE__ */ o("div", { className: U("bpb-card-element", !l && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
7763
+ /* @__PURE__ */ o("div", { className: O("bpb-card-element", !l && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
7764
7764
  Aa,
7765
7765
  {
7766
7766
  options: { style: Wn(t), hidePostalCode: !0 },
@@ -7786,8 +7786,8 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7786
7786
  businessName: g,
7787
7787
  onBusinessNameChange: b,
7788
7788
  taxType: f,
7789
- onTaxTypeChange: N,
7790
- taxValue: C,
7789
+ onTaxTypeChange: C,
7790
+ taxValue: N,
7791
7791
  onTaxValueChange: v
7792
7792
  }) => {
7793
7793
  const { t: h } = oe(), [A, x] = K(!1), k = r || !e, S = Kn(c), w = S.find((y) => y.type === f);
@@ -7798,7 +7798,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7798
7798
  /* @__PURE__ */ o(Y, { height: 48 }),
7799
7799
  /* @__PURE__ */ o(Y, { height: 48 })
7800
7800
  ] }),
7801
- /* @__PURE__ */ o("div", { className: U(!A && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
7801
+ /* @__PURE__ */ o("div", { className: O(!A && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
7802
7802
  Xt,
7803
7803
  {
7804
7804
  options: {
@@ -7858,7 +7858,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7858
7858
  type: "checkbox",
7859
7859
  checked: m,
7860
7860
  onChange: (y) => {
7861
- u(y.target.checked), y.target.checked && !f && S[0] && N(S[0].type);
7861
+ u(y.target.checked), y.target.checked && !f && S[0] && C(S[0].type);
7862
7862
  }
7863
7863
  }
7864
7864
  ),
@@ -7881,7 +7881,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7881
7881
  {
7882
7882
  "aria-label": h("checkoutTaxIdTypeLabel"),
7883
7883
  value: f,
7884
- onChange: (y) => N(y.target.value),
7884
+ onChange: (y) => C(y.target.value),
7885
7885
  children: S.map((y) => /* @__PURE__ */ p("option", { value: y.type, children: [
7886
7886
  y.label,
7887
7887
  " — ",
@@ -7893,7 +7893,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7893
7893
  Qa,
7894
7894
  {
7895
7895
  placeholder: w ? w.description : h("checkoutTaxIdNumberPlaceholder"),
7896
- value: C,
7896
+ value: N,
7897
7897
  onChange: (y) => v(y.target.value),
7898
7898
  inputMode: "text"
7899
7899
  }
@@ -7903,13 +7903,13 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7903
7903
  ] });
7904
7904
  }, Ko = ({ planId: a, initialInterval: e, clientSecret: t, onSuccess: n }) => {
7905
7905
  var ht;
7906
- const r = en(), s = an(), { email: i, toast: l, analytics: d, isDark: c } = G(), { t: m } = oe(), [u, g] = K(e), [b, f] = K("payment"), [N, C] = K(null), [v, h] = K(!1), [A, x] = K(!1), [k, S] = K(!1), [w, y] = K(void 0), [D, T] = K(!1), [I, R] = K(""), [E, J] = K(""), [M, B] = K(""), [Q, z] = K(!1), [H, _] = K(null), { data: ne } = ze(), { data: P } = Fe(), { data: $, isLoading: V } = mn(), { data: O, isLoading: j } = gn(), { data: le } = hn(), ie = ne == null ? void 0 : ne.find((Se) => Se.id === a), Z = ((ht = $ == null ? void 0 : $.paymentMethod) == null ? void 0 : ht.card) ?? null, ge = (O == null ? void 0 : O.address) ?? null;
7906
+ const r = en(), s = an(), { email: i, toast: l, analytics: d, isDark: c } = G(), { t: m } = oe(), [u, g] = K(e), [b, f] = K("payment"), [C, N] = K(null), [v, h] = K(!1), [A, x] = K(!1), [k, S] = K(!1), [w, y] = K(void 0), [D, T] = K(!1), [I, R] = K(""), [E, J] = K(""), [M, B] = K(""), [Q, z] = K(!1), [H, _] = K(null), { data: ne } = ze(), { data: P } = Fe(), { data: $, isLoading: V } = mn(), { data: U, isLoading: j } = gn(), { data: le } = hn(), ie = ne == null ? void 0 : ne.find((Se) => Se.id === a), Z = ((ht = $ == null ? void 0 : $.paymentMethod) == null ? void 0 : ht.card) ?? null, ge = (U == null ? void 0 : U.address) ?? null;
7907
7907
  Ce(() => {
7908
- N === null && !V && $ !== void 0 && C(Z ? "saved" : "new");
7909
- }, [N, V, $, Z]), Ce(() => {
7908
+ C === null && !V && $ !== void 0 && N(Z ? "saved" : "new");
7909
+ }, [C, V, $, Z]), Ce(() => {
7910
7910
  w === void 0 && ge && y(ge.country);
7911
7911
  }, [w, ge]);
7912
- const fe = _e(() => ({ plan: { planId: a, interval: u } }), [a, u]), ye = pn(fe), Le = yn(), we = vn(), Ie = Cn(), X = Nn(), ce = ie ? se(ie.name) : "", ae = N === "new" || !Z, de = A || !ge, Ae = ae ? v : !!Z, Ee = de ? k : !0;
7912
+ const fe = _e(() => ({ plan: { planId: a, interval: u } }), [a, u]), ye = pn(fe), Le = yn(), we = vn(), Ie = Cn(), X = Nn(), ce = ie ? se(ie.name) : "", ae = C === "new" || !Z, de = A || !ge, Ae = ae ? v : !!Z, Ee = de ? k : !0;
7913
7913
  Ce(() => {
7914
7914
  f(Ae ? "address" : "payment");
7915
7915
  }, [Ae]), Ce(() => {
@@ -7918,7 +7918,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7918
7918
  const Je = (Se) => {
7919
7919
  Se !== u && d.capture(pe.CHECKOUT_INTERVAL_CHANGED, { plan_name: ce, interval: Se }), g(Se);
7920
7920
  }, da = (Se) => {
7921
- d.capture(pe.PAYMENT_METHOD_SELECTED, { method: Se === "saved" ? "saved_card" : "new_card" }), C(Se);
7921
+ d.capture(pe.PAYMENT_METHOD_SELECTED, { method: Se === "saved" ? "saved_card" : "new_card" }), N(Se);
7922
7922
  }, Ve = !!r && !!s && !!ie && !ye.isError && !!ye.data && Ae && Ee && !Q, ar = async () => {
7923
7923
  var bt, ft, yt, vt;
7924
7924
  if (!r || !s || !ie)
@@ -8005,7 +8005,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8005
8005
  stepNumber: 1,
8006
8006
  savedCard: Z,
8007
8007
  isDark: c,
8008
- tab: N ?? "new",
8008
+ tab: C ?? "new",
8009
8009
  onTabChange: da,
8010
8010
  onPaymentChange: h
8011
8011
  }
@@ -8050,12 +8050,12 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8050
8050
  ) })
8051
8051
  ] });
8052
8052
  }, Ho = ({ open: a, onOpenChange: e, planId: t, interval: n, onBack: r, onSuccess: s }) => {
8053
- var C;
8054
- const { stripePromise: i, isDark: l, locale: d, isOutdatedBilling: c } = G(), { t: m } = oe(), u = fn(), g = (C = u.data) == null ? void 0 : C.clientSecret, { mutate: b, reset: f } = u;
8053
+ var N;
8054
+ const { stripePromise: i, isDark: l, locale: d, isOutdatedBilling: c } = G(), { t: m } = oe(), u = fn(), g = (N = u.data) == null ? void 0 : N.clientSecret, { mutate: b, reset: f } = u;
8055
8055
  Ce(() => {
8056
8056
  a && !c ? b() : f();
8057
8057
  }, [a, c, b, f]);
8058
- const N = _e(
8058
+ const C = _e(
8059
8059
  () => g ? {
8060
8060
  clientSecret: g,
8061
8061
  appearance: Vn(l),
@@ -8073,7 +8073,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8073
8073
  u.error instanceof Error && u.error.message && /* @__PURE__ */ o("p", { className: "bpb-checkout__error-detail", children: u.error.message }),
8074
8074
  /* @__PURE__ */ o("p", { className: "bpb-checkout__error-detail", children: m("checkoutSessionErrorDetail") }),
8075
8075
  /* @__PURE__ */ o(be, { variant: "outline", onClick: () => b(), children: m("tryAgain") })
8076
- ] }) : !N || !g ? /* @__PURE__ */ p("div", { className: "bpb-checkout__columns", "aria-busy": "true", children: [
8076
+ ] }) : !C || !g ? /* @__PURE__ */ p("div", { className: "bpb-checkout__columns", "aria-busy": "true", children: [
8077
8077
  /* @__PURE__ */ p("div", { className: "bpb-checkout__main", children: [
8078
8078
  /* @__PURE__ */ o(Y, { height: 56 }),
8079
8079
  /* @__PURE__ */ o(Y, { height: 56 }),
@@ -8081,7 +8081,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8081
8081
  /* @__PURE__ */ o(Y, { height: 56 })
8082
8082
  ] }),
8083
8083
  /* @__PURE__ */ o("div", { className: "bpb-checkout__aside", children: /* @__PURE__ */ o(Y, { height: 320 }) })
8084
- ] }) : /* @__PURE__ */ o(tn, { stripe: i, options: N, children: /* @__PURE__ */ o(
8084
+ ] }) : /* @__PURE__ */ o(tn, { stripe: i, options: C, children: /* @__PURE__ */ o(
8085
8085
  Ko,
8086
8086
  {
8087
8087
  planId: t,
@@ -8095,7 +8095,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8095
8095
  ] }) });
8096
8096
  }, Yo = ({ value: a, onChange: e, min: t = 0, max: n, step: r = 1, className: s, ...i }) => {
8097
8097
  const l = () => e(Math.max(t, a - r)), d = () => e(n === void 0 ? a + r : Math.min(n, a + r));
8098
- return /* @__PURE__ */ p("div", { className: U("bpb-stepper", s), children: [
8098
+ return /* @__PURE__ */ p("div", { className: O("bpb-stepper", s), children: [
8099
8099
  /* @__PURE__ */ o(
8100
8100
  "button",
8101
8101
  {
@@ -8139,14 +8139,14 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8139
8139
  onUpgrade: t
8140
8140
  }) => {
8141
8141
  var z, H, _, ne;
8142
- const { toast: n, locale: r } = G(), { t: s } = oe(), { data: i } = Fe(), { data: l } = ia(), { data: d } = ze(), { data: c } = bn(), m = Ns(), [u, g] = K(null), b = d == null ? void 0 : d.find((P) => P.id === (i == null ? void 0 : i.plan.current.planId)), f = (i == null ? void 0 : i.plan.current.interval) ?? "month", N = (c == null ? void 0 : c.addonsReadonly) ?? !1, C = i != null && i.plan.current.periodEnd ? $e(i.plan.current.periodEnd, r) : null, v = _e(() => {
8142
+ const { toast: n, locale: r } = G(), { t: s } = oe(), { data: i } = Fe(), { data: l } = ia(), { data: d } = ze(), { data: c } = bn(), m = Ns(), [u, g] = K(null), b = d == null ? void 0 : d.find((P) => P.id === (i == null ? void 0 : i.plan.current.planId)), f = (i == null ? void 0 : i.plan.current.interval) ?? "month", C = (c == null ? void 0 : c.addonsReadonly) ?? !1, N = i != null && i.plan.current.periodEnd ? $e(i.plan.current.periodEnd, r) : null, v = _e(() => {
8143
8143
  var $;
8144
8144
  if (!i || !l)
8145
8145
  return null;
8146
8146
  const P = {};
8147
8147
  for (const V of l) {
8148
- const O = i.addons[V.id];
8149
- P[V.id] = (($ = O == null ? void 0 : O.next) == null ? void 0 : $.quantity) ?? (O == null ? void 0 : O.current.quantity) ?? 0;
8148
+ const U = i.addons[V.id];
8149
+ P[V.id] = (($ = U == null ? void 0 : U.next) == null ? void 0 : $.quantity) ?? (U == null ? void 0 : U.current.quantity) ?? 0;
8150
8150
  }
8151
8151
  return P;
8152
8152
  }, [i, l]), h = u ?? v, A = _e(() => !l || !b ? [] : l.flatMap((P) => {
@@ -8161,13 +8161,13 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8161
8161
  ), w = pn(S ?? { plan: { planId: "", interval: f } }, {
8162
8162
  enabled: !!S && x
8163
8163
  }), y = ((z = b == null ? void 0 : b.prices[f]) == null ? void 0 : z.currency) ?? "usd", D = ((H = w.data) == null ? void 0 : H.costs.immediate.amountDue) ?? 0, T = (_ = w.data) != null && _.nextBillingDate ? $e(w.data.nextBillingDate, r) : null, I = ((ne = b == null ? void 0 : b.prices[f]) == null ? void 0 : ne.amount) ?? 0, R = I + k, E = b && h ? yo(b, l, h) : [], J = (P, $) => $ === "bytes" ? ra(P) : re(P), M = (P, $) => {
8164
- const V = l == null ? void 0 : l.find((ie) => ie.id === P), O = V == null ? void 0 : V.increments;
8165
- if (!O || $ <= 0)
8164
+ const V = l == null ? void 0 : l.find((ie) => ie.id === P), U = V == null ? void 0 : V.increments;
8165
+ if (!U || $ <= 0)
8166
8166
  return null;
8167
- const j = O.conversation_sessions ?? 0;
8167
+ const j = U.conversation_sessions ?? 0;
8168
8168
  if (j > 0)
8169
8169
  return s("addonsConvos", { n: re(j * $) });
8170
- const le = O.file_storage ?? 0;
8170
+ const le = U.file_storage ?? 0;
8171
8171
  return le > 0 ? ra(le * $) : null;
8172
8172
  }, B = () => {
8173
8173
  h && m.mutate(
@@ -8208,7 +8208,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8208
8208
  ] }) : /* @__PURE__ */ p(ve, { children: [
8209
8209
  /* @__PURE__ */ o("div", { className: "bpb-addons", children: A.map(({ addon: P, price: $ }) => {
8210
8210
  var ie;
8211
- const V = ((ie = i == null ? void 0 : i.addons[P.id]) == null ? void 0 : ie.current.quantity) ?? 0, O = (h == null ? void 0 : h[P.id]) ?? 0, j = O !== V ? O === 0 ? C ? s("addonRemovedOnDate", { activeNow: V, date: C }) : s("addonRemovedNextCycle", { activeNow: V }) : C ? s("addonChangedOnDate", { activeNow: V, pending: O, date: C }) : s("addonChangedNextCycle", { activeNow: V, pending: O }) : V > 0 ? s("addonActiveOnly", { count: V }) : null, le = M(P.id, O);
8211
+ const V = ((ie = i == null ? void 0 : i.addons[P.id]) == null ? void 0 : ie.current.quantity) ?? 0, U = (h == null ? void 0 : h[P.id]) ?? 0, j = U !== V ? U === 0 ? N ? s("addonRemovedOnDate", { activeNow: V, date: N }) : s("addonRemovedNextCycle", { activeNow: V }) : N ? s("addonChangedOnDate", { activeNow: V, pending: U, date: N }) : s("addonChangedNextCycle", { activeNow: V, pending: U }) : V > 0 ? s("addonActiveOnly", { count: V }) : null, le = M(P.id, U);
8212
8212
  return /* @__PURE__ */ p("div", { className: "bpb-addon-row", children: [
8213
8213
  /* @__PURE__ */ p("div", { className: "bpb-addon-row__info", children: [
8214
8214
  /* @__PURE__ */ o("span", { className: "bpb-addon-row__name", children: Ue[P.id] ? s(Ue[P.id]) : Sa(P.name) }),
@@ -8221,9 +8221,9 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8221
8221
  j && /* @__PURE__ */ o(
8222
8222
  "span",
8223
8223
  {
8224
- className: U(
8224
+ className: O(
8225
8225
  "bpb-addon-row__status",
8226
- O !== V && "bpb-addon-row__status--changed"
8226
+ U !== V && "bpb-addon-row__status--changed"
8227
8227
  ),
8228
8228
  children: j
8229
8229
  }
@@ -8235,7 +8235,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8235
8235
  Yo,
8236
8236
  {
8237
8237
  "aria-label": `${Ue[P.id] ? s(Ue[P.id]) : Sa(P.name)} quantity`,
8238
- value: O,
8238
+ value: U,
8239
8239
  onChange: (Z) => g({ ...h ?? {}, [P.id]: Z })
8240
8240
  }
8241
8241
  )
@@ -8301,14 +8301,14 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8301
8301
  interval: s(f === "year" ? "perYear" : "perMonth")
8302
8302
  })
8303
8303
  ] }),
8304
- N && /* @__PURE__ */ o("p", { className: "bpb-manage-addons__note", role: "alert", children: s("addonsReadonlyNote") }),
8304
+ C && /* @__PURE__ */ o("p", { className: "bpb-manage-addons__note", role: "alert", children: s("addonsReadonlyNote") }),
8305
8305
  /* @__PURE__ */ p("div", { className: "bpb-manage-addons__actions", children: [
8306
8306
  /* @__PURE__ */ o(be, { variant: "outline", onClick: () => a(!1), disabled: m.isPending, children: s("cancel") }),
8307
8307
  /* @__PURE__ */ o(
8308
8308
  be,
8309
8309
  {
8310
8310
  variant: "primary",
8311
- disabled: !x || N,
8311
+ disabled: !x || C,
8312
8312
  loading: m.isPending,
8313
8313
  onClick: B,
8314
8314
  children: s("addonsUpdateSubscription")
@@ -8406,10 +8406,10 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8406
8406
  onSuccess: t
8407
8407
  }) => {
8408
8408
  var Ie;
8409
- const n = en(), r = an(), { toast: s, analytics: i } = G(), { t: l } = oe(), { data: d, isLoading: c } = mn(), { data: m, isLoading: u } = gn(), { data: g, isLoading: b } = hn(), f = yn(), N = vn(), C = Cn(), v = ((Ie = d == null ? void 0 : d.paymentMethod) == null ? void 0 : Ie.card) ?? null, h = (m == null ? void 0 : m.address) ?? null, A = (g == null ? void 0 : g.taxIds) ?? [], [x, k] = K(!1), [S, w] = K(!1), [y, D] = K(!1), [T, I] = K(!1), [R, E] = K(null), [J, M] = K(!1), [B, Q] = K(!1), [z, H] = K(null), [_, ne] = K(h == null ? void 0 : h.country), [P, $] = K(A.length > 0), [V, O] = K(null), j = V ?? A.map((X) => ({ type: X.type, value: X.value })), le = Kn(_), ie = V !== null, Z = x || !v, ge = (X, ce) => O(j.map((ae, de) => de === X ? { ...ae, ...ce } : ae)), fe = () => {
8409
+ const n = en(), r = an(), { toast: s, analytics: i } = G(), { t: l } = oe(), { data: d, isLoading: c } = mn(), { data: m, isLoading: u } = gn(), { data: g, isLoading: b } = hn(), f = yn(), C = vn(), N = Cn(), v = ((Ie = d == null ? void 0 : d.paymentMethod) == null ? void 0 : Ie.card) ?? null, h = (m == null ? void 0 : m.address) ?? null, A = (g == null ? void 0 : g.taxIds) ?? [], [x, k] = K(!1), [S, w] = K(!1), [y, D] = K(!1), [T, I] = K(!1), [R, E] = K(null), [J, M] = K(!1), [B, Q] = K(!1), [z, H] = K(null), [_, ne] = K(h == null ? void 0 : h.country), [P, $] = K(A.length > 0), [V, U] = K(null), j = V ?? A.map((X) => ({ type: X.type, value: X.value })), le = Kn(_), ie = V !== null, Z = x || !v, ge = (X, ce) => U(j.map((ae, de) => de === X ? { ...ae, ...ce } : ae)), fe = () => {
8410
8410
  var X;
8411
- return O([...j, { type: ((X = le[0]) == null ? void 0 : X.type) ?? "", value: "" }]);
8412
- }, ye = (X) => O(j.filter((ce, ae) => ae !== X)), Le = async () => {
8411
+ return U([...j, { type: ((X = le[0]) == null ? void 0 : X.type) ?? "", value: "" }]);
8412
+ }, ye = (X) => U(j.filter((ce, ae) => ae !== X)), Le = async () => {
8413
8413
  if (!n || !r)
8414
8414
  return;
8415
8415
  const X = r.getElement(Aa);
@@ -8448,7 +8448,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8448
8448
  Q(!0), H(null);
8449
8449
  try {
8450
8450
  const { address: de, name: Ae } = ae;
8451
- await N.mutateAsync({
8451
+ await C.mutateAsync({
8452
8452
  lineOne: de.line1 ?? "",
8453
8453
  lineTwo: de.line2 ?? void 0,
8454
8454
  city: de.city ?? "",
@@ -8457,7 +8457,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8457
8457
  country: de.country ?? ""
8458
8458
  });
8459
8459
  const Ee = (Ae == null ? void 0 : Ae.trim()) || void 0, Je = j.filter((Ve) => !!Ve.type && Ve.value.trim() !== "").map((Ve) => ({ type: Ve.type, value: Ve.value.trim() }));
8460
- (Ee !== ((g == null ? void 0 : g.name) ?? void 0) || ie) && await C.mutateAsync({ name: Ee, taxIds: Je }), i.capture(pe.BILLING_ADDRESS_UPDATED), s({ type: "success", message: l("paymentDetailsUpdated") }), t == null || t();
8460
+ (Ee !== ((g == null ? void 0 : g.name) ?? void 0) || ie) && await N.mutateAsync({ name: Ee, taxIds: Je }), i.capture(pe.BILLING_ADDRESS_UPDATED), s({ type: "success", message: l("paymentDetailsUpdated") }), t == null || t();
8461
8461
  } catch (de) {
8462
8462
  const Ae = de instanceof Error && de.message ? de.message : l("paymentAddressError");
8463
8463
  H(Ae), s({ type: "error", message: l("paymentDetailsUpdateError") });
@@ -8537,7 +8537,7 @@ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8537
8537
  ct,
8538
8538
  {
8539
8539
  size: 16,
8540
- className: U("bpb-tax-toggle__chevron", P && "bpb-tax-toggle__chevron--open")
8540
+ className: O("bpb-tax-toggle__chevron", P && "bpb-tax-toggle__chevron--open")
8541
8541
  }
8542
8542
  ),
8543
8543
  l("paymentTaxIds"),
@@ -8666,15 +8666,15 @@ const Si = ({
8666
8666
  period: l
8667
8667
  }) => {
8668
8668
  var J, M;
8669
- const { isOutdatedBilling: d, analytics: c, scope: m } = G(), { t: u } = oe(), { data: g } = ze(), { data: b } = ia(), { data: f } = Fe({ enabled: !d }), { data: N } = la({ period: l, enabled: !d }), C = a !== void 0, [v, h] = K(!1), A = g == null ? void 0 : g.find((B) => B.id === (f == null ? void 0 : f.plan.current.planId)), x = f ? A ? ue(A) === "community" : !0 : !1, k = _e(() => za(N).find((B) => B.key === "conversation_sessions"), [N]), S = !C && !d && x && !!k && k.pct / 100 >= ai && !v && !Zn(Jt, m, "modal"), w = C ? !!a : S;
8669
+ const { isOutdatedBilling: d, analytics: c, scope: m } = G(), { t: u } = oe(), { data: g } = ze(), { data: b } = ia(), { data: f } = Fe({ enabled: !d }), { data: C } = la({ period: l, enabled: !d }), N = a !== void 0, [v, h] = K(!1), A = g == null ? void 0 : g.find((B) => B.id === (f == null ? void 0 : f.plan.current.planId)), x = f ? A ? ue(A) === "community" : !0 : !1, k = _e(() => za(C).find((B) => B.key === "conversation_sessions"), [C]), S = !N && !d && x && !!k && k.pct / 100 >= ai && !v && !Zn(Jt, m, "modal"), w = N ? !!a : S;
8670
8670
  Ce(() => {
8671
8671
  w && c.capture(pe.PLAN_PICKER_VIEWED, {
8672
- source: C ? "outgrow_free" : "outgrow_free_auto",
8672
+ source: N ? "outgrow_free" : "outgrow_free_auto",
8673
8673
  interval: r
8674
8674
  });
8675
- }, [w, C, c]);
8675
+ }, [w, N, c]);
8676
8676
  const y = () => {
8677
- C || (Xn(Jt, m, "modal"), h(!0)), e == null || e(!1);
8677
+ N || (Xn(Jt, m, "modal"), h(!0)), e == null || e(!1);
8678
8678
  }, D = _e(() => g ? g.filter((B) => {
8679
8679
  const Q = ue(B);
8680
8680
  return Q !== "community" && Q !== "enterprise" && Q !== "managed";
@@ -8717,11 +8717,11 @@ const Si = ({
8717
8717
  ) })
8718
8718
  ] }),
8719
8719
  /* @__PURE__ */ o("div", { className: "bpb-outgrow__grid", children: D.map((B, Q) => {
8720
- const z = ue(B), H = ni(B, r), _ = ri(B, r), ne = z === n || B.id === n, P = B.features.conversation_sessions, $ = nt(b, B, r), V = Q > 0 ? D[Q - 1] : void 0, O = (s[z] ?? rt[z]).slice(0, ti);
8720
+ const z = ue(B), H = ni(B, r), _ = ri(B, r), ne = z === n || B.id === n, P = B.features.conversation_sessions, $ = nt(b, B, r), V = Q > 0 ? D[Q - 1] : void 0, U = (s[z] ?? rt[z]).slice(0, ti);
8721
8721
  return /* @__PURE__ */ p(
8722
8722
  "div",
8723
8723
  {
8724
- className: U("bpb-plan-card", ne && "bpb-plan-card--highlighted bpb-glow"),
8724
+ className: O("bpb-plan-card", ne && "bpb-plan-card--highlighted bpb-glow"),
8725
8725
  "data-plan-id": B.id,
8726
8726
  children: [
8727
8727
  /* @__PURE__ */ p("div", { className: "bpb-plan-card__header", children: [
@@ -8774,7 +8774,7 @@ const Si = ({
8774
8774
  ),
8775
8775
  /* @__PURE__ */ p("ul", { className: "bpb-plan-card__features", children: [
8776
8776
  V && /* @__PURE__ */ o("li", { className: "bpb-outgrow__features-lead", children: u("outgrowEverythingIn", { planName: se(V.name) }) }),
8777
- O.map((j) => {
8777
+ U.map((j) => {
8778
8778
  const le = ut(j), ie = On[j], Z = ie !== void 0 ? u(ie.label) : j, ge = (i == null ? void 0 : i[j]) ?? (ie !== void 0 ? u(ie.desc) : void 0);
8779
8779
  return /* @__PURE__ */ p("li", { children: [
8780
8780
  /* @__PURE__ */ o("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ o(le, { size: 13 }) }),
@@ -8835,7 +8835,7 @@ const Si = ({
8835
8835
  "div",
8836
8836
  {
8837
8837
  className: "bpb-usage-bar__fill bpb-usage-bar__fill--normal",
8838
- style: { width: `${Math.max(2, Math.round(i.value / s * 100))}%` }
8838
+ style: { width: `${i.value > 0 ? Math.max(2, Math.round(i.value / s * 100)) : 0}%` }
8839
8839
  }
8840
8840
  ) })
8841
8841
  ] }, i.botId)) });
@@ -8843,37 +8843,51 @@ const Si = ({
8843
8843
  entry: a,
8844
8844
  metric: e,
8845
8845
  planAllowance: t,
8846
- planName: n
8846
+ planName: n,
8847
+ stacked: r
8847
8848
  }) => {
8848
- const { t: r } = oe(), s = a.usage ?? 0, i = a.quota > 0 ? Math.max(0, Math.min(100, Math.round(s / a.quota * 100))) : 0, l = i > 0 ? Math.max(5, i) : 0, d = i >= 90 ? "critical" : i >= 75 ? "warning" : "normal", c = t ?? a.quota, m = Math.max(0, a.quota - c), u = m > 0 ? n ? r("dashboardFromPlanWithAddons", {
8849
- amount: Be(c, e.unit),
8849
+ const { t: s } = oe(), i = a.usage ?? 0, l = a.quota > 0 ? Math.max(0, Math.min(100, Math.round(i / a.quota * 100))) : 0, d = l > 0 ? Math.max(5, l) : 0, c = l >= 90 ? "critical" : l >= 75 ? "warning" : "normal", m = t ?? a.quota, u = Math.max(0, a.quota - m), g = u > 0 ? n ? s("dashboardFromPlanWithAddons", {
8850
+ amount: Be(m, e.unit),
8850
8851
  planName: n,
8851
- addonAmount: Be(m, e.unit)
8852
- }) : r("dashboardFromPlanGenericWithAddons", {
8853
- amount: Be(c, e.unit),
8854
- addonAmount: Be(m, e.unit)
8855
- }) : n ? r("dashboardFromPlan", { amount: Be(a.quota, e.unit), planName: n }) : r("dashboardFromPlanGeneric", { amount: Be(a.quota, e.unit) });
8852
+ addonAmount: Be(u, e.unit)
8853
+ }) : s("dashboardFromPlanGenericWithAddons", {
8854
+ amount: Be(m, e.unit),
8855
+ addonAmount: Be(u, e.unit)
8856
+ }) : n ? s("dashboardFromPlan", { amount: Be(a.quota, e.unit), planName: n }) : s("dashboardFromPlanGeneric", { amount: Be(a.quota, e.unit) });
8856
8857
  return /* @__PURE__ */ p("div", { className: "bpb-usage-row", children: [
8857
- /* @__PURE__ */ p("div", { className: "bpb-usage-row__head", children: [
8858
+ /* @__PURE__ */ p("div", { className: O("bpb-usage-row__head", r && "bpb-usage-row__head--stacked"), children: [
8858
8859
  /* @__PURE__ */ o("span", { className: "bpb-usage-row__label", children: e.label }),
8859
8860
  /* @__PURE__ */ p("span", { className: "bpb-usage-row__value", children: [
8860
- /* @__PURE__ */ o("span", { className: "bpb-usage-row__used", children: Be(s, e.unit) }),
8861
+ /* @__PURE__ */ o("span", { className: "bpb-usage-row__used", children: Be(i, e.unit) }),
8861
8862
  /* @__PURE__ */ p("span", { className: "bpb-usage-row__quota", children: [
8862
8863
  " / ",
8863
8864
  Be(a.quota, e.unit)
8864
8865
  ] })
8865
8866
  ] })
8866
8867
  ] }),
8867
- /* @__PURE__ */ p("span", { className: "bpb-usage-tip", tabIndex: 0, role: "note", "aria-label": u, children: [
8868
- /* @__PURE__ */ o("div", { className: "bpb-usage-bar", role: "progressbar", "aria-valuenow": i, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ o(
8869
- "div",
8870
- {
8871
- className: U("bpb-usage-bar__fill", `bpb-usage-bar__fill--${d}`),
8872
- style: { width: `${l}%` }
8873
- }
8874
- ) }),
8875
- /* @__PURE__ */ o("span", { className: "bpb-usage-tip__bubble", role: "tooltip", children: u })
8876
- ] })
8868
+ /* @__PURE__ */ p(
8869
+ "span",
8870
+ {
8871
+ className: "bpb-usage-tip",
8872
+ tabIndex: 0,
8873
+ role: "note",
8874
+ "aria-label": g,
8875
+ onMouseMove: (b) => {
8876
+ const f = b.currentTarget.getBoundingClientRect(), C = (b.clientX - f.left) / f.width * 100;
8877
+ b.currentTarget.style.setProperty("--bpb-tip-x", `${C}%`);
8878
+ },
8879
+ children: [
8880
+ /* @__PURE__ */ o("div", { className: "bpb-usage-bar", role: "progressbar", "aria-valuenow": l, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ o(
8881
+ "div",
8882
+ {
8883
+ className: O("bpb-usage-bar__fill", `bpb-usage-bar__fill--${c}`),
8884
+ style: { width: `${d}%` }
8885
+ }
8886
+ ) }),
8887
+ /* @__PURE__ */ o("span", { className: "bpb-usage-tip__bubble", role: "tooltip", children: g })
8888
+ ]
8889
+ }
8890
+ )
8877
8891
  ] });
8878
8892
  }, ki = ({
8879
8893
  period: a,
@@ -8888,66 +8902,63 @@ const Si = ({
8888
8902
  ), g = (T) => {
8889
8903
  const I = l[u + T];
8890
8904
  I && c(I.value);
8891
- }, { data: b, isLoading: f, isError: N } = la({ period: d, enabled: !r }), { data: C } = Fe({ enabled: !r }), { data: v } = ze(), h = v == null ? void 0 : v.find((T) => T.id === (C == null ? void 0 : C.plan.current.planId)), A = h ? se(h.name) : void 0, x = (T) => h == null ? void 0 : h.features[T];
8905
+ }, { data: b, isLoading: f, isError: C } = la({ period: d, enabled: !r }), { data: N } = Fe({ enabled: !r }), { data: v } = ze(), h = v == null ? void 0 : v.find((T) => T.id === (N == null ? void 0 : N.plan.current.planId)), A = h ? se(h.name) : void 0, x = (T) => h == null ? void 0 : h.features[T];
8892
8906
  if (r)
8893
- return /* @__PURE__ */ o("div", { className: U("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o(ca, {}) });
8907
+ return /* @__PURE__ */ o("div", { className: O("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o(ca, {}) });
8894
8908
  if (f)
8895
- return /* @__PURE__ */ p("div", { className: U("bpb-usage bpb-scope", n), "aria-busy": "true", children: [
8909
+ return /* @__PURE__ */ p("div", { className: O("bpb-usage bpb-scope", n), "aria-busy": "true", children: [
8896
8910
  /* @__PURE__ */ o(Y, { height: 80 }),
8897
8911
  /* @__PURE__ */ o(Y, { height: 140 })
8898
8912
  ] });
8899
- if (N || !b)
8900
- return /* @__PURE__ */ o("div", { className: U("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o("p", { className: "bpb-usage__error", role: "alert", children: i("dashboardLoadError") }) });
8913
+ if (C || !b)
8914
+ return /* @__PURE__ */ o("div", { className: O("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o("p", { className: "bpb-usage__error", role: "alert", children: i("dashboardLoadError") }) });
8901
8915
  const k = b.conversation_sessions, S = b.ai_spend, y = [
8902
8916
  { key: "table_rows", label: i("dashboardTableRows"), unit: "count" },
8903
8917
  { key: "vector_db_storage", label: i("dashboardVectorDb"), unit: "bytes" },
8904
8918
  { key: "file_storage", label: i("dashboardFileStorage"), unit: "bytes" }
8905
8919
  ].filter((T) => b[T.key]);
8906
- return /* @__PURE__ */ p("div", { className: U("bpb-usage bpb-scope", n), children: [
8907
- e && l.length > 1 && /* @__PURE__ */ p("div", { className: "bpb-usage__header", children: [
8908
- /* @__PURE__ */ o("span", { className: "bpb-usage__header-title", children: i("dashboardUsage") }),
8909
- /* @__PURE__ */ p("div", { className: "bpb-usage__period", children: [
8910
- /* @__PURE__ */ o("span", { className: "bpb-usage__period-label", children: i("dashboardBillingPeriod") }),
8911
- /* @__PURE__ */ p("div", { className: "bpb-usage__period-control", children: [
8920
+ return /* @__PURE__ */ p("div", { className: O("bpb-usage bpb-scope", n), children: [
8921
+ e && l.length > 1 && /* @__PURE__ */ o("div", { className: "bpb-usage__header", children: /* @__PURE__ */ p("div", { className: "bpb-usage__period", children: [
8922
+ /* @__PURE__ */ o("span", { className: "bpb-usage__period-label", children: i("dashboardBillingPeriod") }),
8923
+ /* @__PURE__ */ p("div", { className: "bpb-usage__period-control", children: [
8924
+ /* @__PURE__ */ o(
8925
+ "button",
8926
+ {
8927
+ type: "button",
8928
+ className: "bpb-usage__period-step",
8929
+ "aria-label": i("dashboardPrevMonth"),
8930
+ onClick: () => g(1),
8931
+ disabled: u >= l.length - 1,
8932
+ children: /* @__PURE__ */ o(qn, { size: 15 })
8933
+ }
8934
+ ),
8935
+ /* @__PURE__ */ p("span", { className: "bpb-usage__period-field", children: [
8936
+ /* @__PURE__ */ o(Lo, { size: 15, className: "bpb-usage__period-icon" }),
8912
8937
  /* @__PURE__ */ o(
8913
- "button",
8938
+ "select",
8914
8939
  {
8915
- type: "button",
8916
- className: "bpb-usage__period-step",
8917
- "aria-label": i("dashboardPrevMonth"),
8918
- onClick: () => g(1),
8919
- disabled: u >= l.length - 1,
8920
- children: /* @__PURE__ */ o(qn, { size: 15 })
8940
+ className: "bpb-usage__period-select",
8941
+ "aria-label": i("dashboardBillingPeriod"),
8942
+ value: d,
8943
+ onChange: (T) => c(T.target.value),
8944
+ children: l.map((T) => /* @__PURE__ */ o("option", { value: T.value, children: T.label }, T.value))
8921
8945
  }
8922
8946
  ),
8923
- /* @__PURE__ */ p("span", { className: "bpb-usage__period-field", children: [
8924
- /* @__PURE__ */ o(Lo, { size: 15, className: "bpb-usage__period-icon" }),
8925
- /* @__PURE__ */ o(
8926
- "select",
8927
- {
8928
- className: "bpb-usage__period-select",
8929
- "aria-label": i("dashboardBillingPeriod"),
8930
- value: d,
8931
- onChange: (T) => c(T.target.value),
8932
- children: l.map((T) => /* @__PURE__ */ o("option", { value: T.value, children: T.label }, T.value))
8933
- }
8934
- ),
8935
- /* @__PURE__ */ o(ct, { size: 14, className: "bpb-usage__period-chevron" })
8936
- ] }),
8937
- /* @__PURE__ */ o(
8938
- "button",
8939
- {
8940
- type: "button",
8941
- className: "bpb-usage__period-step",
8942
- "aria-label": i("dashboardNextMonth"),
8943
- onClick: () => g(-1),
8944
- disabled: u <= 0,
8945
- children: /* @__PURE__ */ o(sa, { size: 15 })
8946
- }
8947
- )
8948
- ] })
8947
+ /* @__PURE__ */ o(ct, { size: 14, className: "bpb-usage__period-chevron" })
8948
+ ] }),
8949
+ /* @__PURE__ */ o(
8950
+ "button",
8951
+ {
8952
+ type: "button",
8953
+ className: "bpb-usage__period-step",
8954
+ "aria-label": i("dashboardNextMonth"),
8955
+ onClick: () => g(-1),
8956
+ disabled: u <= 0,
8957
+ children: /* @__PURE__ */ o(sa, { size: 15 })
8958
+ }
8959
+ )
8949
8960
  ] })
8950
- ] }),
8961
+ ] }) }),
8951
8962
  k && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8952
8963
  /* @__PURE__ */ o("h3", { className: "bpb-usage__group-title", children: i("dashboardConversationsTitle") }),
8953
8964
  /* @__PURE__ */ o("p", { className: "bpb-usage__group-hint", children: i("dashboardConversationsHint") }),
@@ -8957,7 +8968,8 @@ const Si = ({
8957
8968
  entry: k,
8958
8969
  metric: { key: "conversation_sessions", label: i("dashboardConversationsMetric"), unit: "count" },
8959
8970
  planAllowance: x("conversation_sessions"),
8960
- planName: A
8971
+ planName: A,
8972
+ stacked: !0
8961
8973
  }
8962
8974
  ) })
8963
8975
  ] }),
@@ -8978,7 +8990,14 @@ const Si = ({
8978
8990
  S && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8979
8991
  /* @__PURE__ */ o("h3", { className: "bpb-usage__group-title", children: i("dashboardAiTitle") }),
8980
8992
  /* @__PURE__ */ o("p", { className: "bpb-usage__group-hint", children: i("dashboardAiHint") }),
8981
- /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: /* @__PURE__ */ o(Va, { entry: S, metric: { key: "ai_spend", label: i("dashboardAiSpend"), unit: "nano-usd" } }) }),
8993
+ /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: /* @__PURE__ */ o(
8994
+ Va,
8995
+ {
8996
+ entry: S,
8997
+ metric: { key: "ai_spend", label: i("dashboardAiSpend"), unit: "nano-usd" },
8998
+ stacked: !0
8999
+ }
9000
+ ) }),
8982
9001
  m && /* @__PURE__ */ p("div", { className: "bpb-usage__card bpb-usage__card--bots", children: [
8983
9002
  /* @__PURE__ */ o("span", { className: "bpb-usage__subhead", children: i("dashboardAiByBot") }),
8984
9003
  /* @__PURE__ */ o(oi, { period: d })
@@ -8994,7 +9013,7 @@ const Si = ({
8994
9013
  period: s,
8995
9014
  className: i
8996
9015
  }) => {
8997
- const { isOutdatedBilling: l, analytics: d, scope: c } = G(), { t: m } = oe(), { data: u } = la({ period: s, enabled: !l }), [g, b] = K({}), [f, N] = K(!1), [C, v] = K(null), h = u ? Object.entries(u).map(([T, I]) => ({ key: T, pct: I.quota > 0 ? (I.usage ?? 0) / I.quota : 0 })).filter((T) => T.pct >= e).sort((T, I) => I.pct - T.pct)[0] : void 0, A = !!h && (g[h.key] || Zn(Qt, c, h.key));
9016
+ const { isOutdatedBilling: l, analytics: d, scope: c } = G(), { t: m } = oe(), { data: u } = la({ period: s, enabled: !l }), [g, b] = K({}), [f, C] = K(!1), [N, v] = K(null), h = u ? Object.entries(u).map(([T, I]) => ({ key: T, pct: I.quota > 0 ? (I.usage ?? 0) / I.quota : 0 })).filter((T) => T.pct >= e).sort((T, I) => I.pct - T.pct)[0] : void 0, A = !!h && (g[h.key] || Zn(Qt, c, h.key));
8998
9017
  if (l || !h || A)
8999
9018
  return null;
9000
9019
  const k = {
@@ -9008,13 +9027,13 @@ const Si = ({
9008
9027
  source: "usage_banner",
9009
9028
  metric: h.key,
9010
9029
  usage_pct: Math.round(h.pct * 100)
9011
- }), t ? t() : N(!0);
9030
+ }), t ? t() : C(!0);
9012
9031
  }, D = w ? "critical" : "warning";
9013
9032
  return /* @__PURE__ */ p(ve, { children: [
9014
9033
  /* @__PURE__ */ p(
9015
9034
  "div",
9016
9035
  {
9017
- className: U(
9036
+ className: O(
9018
9037
  "bpb-usage-banner bpb-scope",
9019
9038
  `bpb-usage-banner--${a}`,
9020
9039
  `bpb-usage-banner--${D}`,
@@ -9048,28 +9067,28 @@ const Si = ({
9048
9067
  Bo,
9049
9068
  {
9050
9069
  open: f,
9051
- onOpenChange: N,
9070
+ onOpenChange: C,
9052
9071
  onSelectPlan: (T, I) => {
9053
- N(!1), v({ planId: T, interval: I });
9072
+ C(!1), v({ planId: T, interval: I });
9054
9073
  }
9055
9074
  }
9056
9075
  ),
9057
- C && /* @__PURE__ */ o(
9076
+ N && /* @__PURE__ */ o(
9058
9077
  Ho,
9059
9078
  {
9060
- open: !!C,
9079
+ open: !!N,
9061
9080
  onOpenChange: (T) => !T && v(null),
9062
- planId: C.planId,
9063
- interval: C.interval,
9081
+ planId: N.planId,
9082
+ interval: N.interval,
9064
9083
  onBack: () => {
9065
- v(null), N(!0);
9084
+ v(null), C(!0);
9066
9085
  },
9067
9086
  onSuccess: () => v(null)
9068
9087
  }
9069
9088
  )
9070
9089
  ] })
9071
9090
  ] });
9072
- }, Ai = ({ Icon: a, title: e, description: t, onClick: n, className: r }) => /* @__PURE__ */ p("button", { type: "button", className: U("bpb-action-card bpb-scope", r), onClick: n, children: [
9091
+ }, Ai = ({ Icon: a, title: e, description: t, onClick: n, className: r }) => /* @__PURE__ */ p("button", { type: "button", className: O("bpb-action-card bpb-scope", r), onClick: n, children: [
9073
9092
  /* @__PURE__ */ p("div", { className: "bpb-action-card__header", children: [
9074
9093
  /* @__PURE__ */ o(a, { size: 20 }),
9075
9094
  e
@@ -9081,7 +9100,7 @@ const Si = ({
9081
9100
  "button",
9082
9101
  {
9083
9102
  type: "button",
9084
- className: U(
9103
+ className: O(
9085
9104
  "bpb-summary-card bpb-scope",
9086
9105
  a ? "bpb-summary-card--addons" : "bpb-summary-card--plan",
9087
9106
  e
@@ -9105,18 +9124,18 @@ const Si = ({
9105
9124
  }
9106
9125
  );
9107
9126
  }, xi = ({ onManage: a, className: e }) => {
9108
- var N, C;
9127
+ var C, N;
9109
9128
  const { isOutdatedBilling: t } = G(), { t: n } = oe(), { data: r, isLoading: s } = Fe({ enabled: !t }), { data: i, isLoading: l } = ze();
9110
9129
  if (t)
9111
9130
  return /* @__PURE__ */ o(er, { isAddons: !1, className: e });
9112
9131
  if (s || l)
9113
- return /* @__PURE__ */ o(Y, { height: 84, rounded: !0, className: U("bpb-scope", e) });
9114
- const d = r == null ? void 0 : r.plan.current, c = i == null ? void 0 : i.find((v) => v.id === (d == null ? void 0 : d.planId)), m = (d == null ? void 0 : d.interval) ?? "month", u = ((N = c == null ? void 0 : c.prices[m]) == null ? void 0 : N.amount) ?? 0, g = ((C = c == null ? void 0 : c.prices[m]) == null ? void 0 : C.currency) ?? "usd", b = c == null ? void 0 : c.features.conversation_sessions, f = c ? ue(c) : "community";
9132
+ return /* @__PURE__ */ o(Y, { height: 84, rounded: !0, className: O("bpb-scope", e) });
9133
+ const d = r == null ? void 0 : r.plan.current, c = i == null ? void 0 : i.find((v) => v.id === (d == null ? void 0 : d.planId)), m = (d == null ? void 0 : d.interval) ?? "month", u = ((C = c == null ? void 0 : c.prices[m]) == null ? void 0 : C.amount) ?? 0, g = ((N = c == null ? void 0 : c.prices[m]) == null ? void 0 : N.currency) ?? "usd", b = c == null ? void 0 : c.features.conversation_sessions, f = c ? ue(c) : "community";
9115
9134
  return /* @__PURE__ */ p(
9116
9135
  "button",
9117
9136
  {
9118
9137
  type: "button",
9119
- className: U(
9138
+ className: O(
9120
9139
  "bpb-summary-card bpb-summary-card--plan bpb-scope",
9121
9140
  `bpb-summary-card--tier-${f === "managed" ? "enterprise" : f}`,
9122
9141
  e
@@ -9146,7 +9165,7 @@ const Si = ({
9146
9165
  if (t)
9147
9166
  return /* @__PURE__ */ o(er, { isAddons: !0, className: e });
9148
9167
  if (s || l)
9149
- return /* @__PURE__ */ o(Y, { height: 84, rounded: !0, className: U("bpb-scope", e) });
9168
+ return /* @__PURE__ */ o(Y, { height: 84, rounded: !0, className: O("bpb-scope", e) });
9150
9169
  const d = (i ?? []).flatMap((c) => {
9151
9170
  var u;
9152
9171
  const m = ((u = r == null ? void 0 : r.addons[c.id]) == null ? void 0 : u.current.quantity) ?? 0;
@@ -9156,7 +9175,7 @@ const Si = ({
9156
9175
  "button",
9157
9176
  {
9158
9177
  type: "button",
9159
- className: U(
9178
+ className: O(
9160
9179
  "bpb-summary-card bpb-summary-card--addons bpb-scope",
9161
9180
  d.length > 0 && "bpb-summary-card--active",
9162
9181
  e
@@ -9192,7 +9211,7 @@ const Si = ({
9192
9211
  "button",
9193
9212
  {
9194
9213
  type: "button",
9195
- className: U("bpb-plan-banner bpb-plan-banner--community bpb-scope", e),
9214
+ className: O("bpb-plan-banner bpb-plan-banner--community bpb-scope", e),
9196
9215
  onClick: E,
9197
9216
  disabled: !r,
9198
9217
  children: [
@@ -9211,21 +9230,21 @@ const Si = ({
9211
9230
  );
9212
9231
  }
9213
9232
  if (d || m || g)
9214
- return /* @__PURE__ */ o(Y, { height: 132, rounded: !0, className: U("bpb-scope", e) });
9215
- const b = l == null ? void 0 : l.plan.current, f = c == null ? void 0 : c.find((E) => E.id === (b == null ? void 0 : b.planId)), N = (b == null ? void 0 : b.interval) ?? "month", C = ((I = f == null ? void 0 : f.prices[N]) == null ? void 0 : I.currency) ?? "usd", v = f ? ue(f) : "community", h = Object.fromEntries(
9233
+ return /* @__PURE__ */ o(Y, { height: 132, rounded: !0, className: O("bpb-scope", e) });
9234
+ const b = l == null ? void 0 : l.plan.current, f = c == null ? void 0 : c.find((E) => E.id === (b == null ? void 0 : b.planId)), C = (b == null ? void 0 : b.interval) ?? "month", N = ((I = f == null ? void 0 : f.prices[C]) == null ? void 0 : I.currency) ?? "usd", v = f ? ue(f) : "community", h = Object.fromEntries(
9216
9235
  Object.entries((l == null ? void 0 : l.addons) ?? {}).map(([E, J]) => {
9217
9236
  var M;
9218
9237
  return [E, ((M = J.current) == null ? void 0 : M.quantity) ?? 0];
9219
9238
  })
9220
- ), A = ((R = f == null ? void 0 : f.prices[N]) == null ? void 0 : R.amount) ?? 0, x = (u ?? []).reduce((E, J) => {
9221
- const M = f ? tt(J, f, N) : null;
9239
+ ), A = ((R = f == null ? void 0 : f.prices[C]) == null ? void 0 : R.amount) ?? 0, x = (u ?? []).reduce((E, J) => {
9240
+ const M = f ? tt(J, f, C) : null;
9222
9241
  return E + (h[J.id] ?? 0) * ((M == null ? void 0 : M.amount) ?? 0);
9223
- }, 0), k = A + x, S = N === "year" ? "/yr" : "/mo", w = vo(f, u, h).find((E) => E.key === "conversation_sessions"), y = i(v === "community" ? "conversationsUnit" : "conversationsPerMonth"), D = b != null && b.periodEnd ? $e(b.periodEnd, n) : null, T = v === "enterprise" || v === "managed";
9242
+ }, 0), k = A + x, S = C === "year" ? "/yr" : "/mo", w = vo(f, u, h).find((E) => E.key === "conversation_sessions"), y = i(v === "community" ? "conversationsUnit" : "conversationsPerMonth"), D = b != null && b.periodEnd ? $e(b.periodEnd, n) : null, T = v === "enterprise" || v === "managed";
9224
9243
  return /* @__PURE__ */ p(
9225
9244
  "button",
9226
9245
  {
9227
9246
  type: "button",
9228
- className: U("bpb-plan-banner", `bpb-plan-banner--${v}`, "bpb-scope", e),
9247
+ className: O("bpb-plan-banner", `bpb-plan-banner--${v}`, "bpb-scope", e),
9229
9248
  onClick: () => {
9230
9249
  s.capture(pe.UPGRADE_CTA_CLICKED, { source: "plan_banner", current_tier: v }), a();
9231
9250
  },
@@ -9243,11 +9262,11 @@ const Si = ({
9243
9262
  ] }),
9244
9263
  /* @__PURE__ */ p("div", { className: "bpb-plan-banner__summary", children: [
9245
9264
  T ? /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price", children: i("planBannerCustomPricing") }) : /* @__PURE__ */ p("span", { className: "bpb-plan-banner__price", children: [
9246
- k > 0 ? ee(k, C, 0) : i("free"),
9265
+ k > 0 ? ee(k, N, 0) : i("free"),
9247
9266
  k > 0 && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price-suffix", children: S })
9248
9267
  ] }),
9249
9268
  /* @__PURE__ */ p("span", { className: "bpb-plan-banner__meta", children: [
9250
- i(N === "year" ? "billedAnnually" : "billedMonthly"),
9269
+ i(C === "year" ? "billedAnnually" : "billedMonthly"),
9251
9270
  x > 0 && ` ${i("planBannerInclAddons")}`
9252
9271
  ] }),
9253
9272
  D && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__meta", children: i("planBannerRenews", { date: D }) })
@@ -9265,8 +9284,8 @@ const Si = ({
9265
9284
  if (s)
9266
9285
  return null;
9267
9286
  if (c || u || b)
9268
- return /* @__PURE__ */ o(Y, { height: 72, rounded: !0, className: U("bpb-scope", n) });
9269
- const f = m == null ? void 0 : m.find((E) => E.id === (d == null ? void 0 : d.plan.current.planId)), N = za(g), C = N.find((E) => E.key === "conversation_sessions"), v = N[0], h = v && v.key !== "conversation_sessions" && v.pct >= 75 ? v : C ?? v, A = h ? Math.round(h.pct) : 0, x = A > 0 ? Math.max(5, A) : 0, k = h ? mt(h.pct) : "normal", S = k !== "normal", w = f ? ue(f) === "community" : !1, y = d != null && d.plan.current.periodEnd ? $e(d.plan.current.periodEnd, i) : null;
9287
+ return /* @__PURE__ */ o(Y, { height: 72, rounded: !0, className: O("bpb-scope", n) });
9288
+ const f = m == null ? void 0 : m.find((E) => E.id === (d == null ? void 0 : d.plan.current.planId)), C = za(g), N = C.find((E) => E.key === "conversation_sessions"), v = C[0], h = v && v.key !== "conversation_sessions" && v.pct >= 75 ? v : N ?? v, A = h ? Math.round(h.pct) : 0, x = A > 0 ? Math.max(5, A) : 0, k = h ? mt(h.pct) : "normal", S = k !== "normal", w = f ? ue(f) === "community" : !1, y = d != null && d.plan.current.periodEnd ? $e(d.plan.current.periodEnd, i) : null;
9270
9289
  let D = null, T = null;
9271
9290
  if (h && S) {
9272
9291
  const E = ga(h.remaining, h.unit);
@@ -9274,7 +9293,7 @@ const Si = ({
9274
9293
  }
9275
9294
  const I = /* @__PURE__ */ o(ve, { children: h ? /* @__PURE__ */ p(ve, { children: [
9276
9295
  /* @__PURE__ */ p("div", { className: "bpb-plan-usage__head", children: [
9277
- S && /* @__PURE__ */ o($n, { size: 16, className: U("bpb-plan-usage__alert", `bpb-plan-usage__alert--${k}`) }),
9296
+ S && /* @__PURE__ */ o($n, { size: 16, className: O("bpb-plan-usage__alert", `bpb-plan-usage__alert--${k}`) }),
9278
9297
  /* @__PURE__ */ o("span", { className: "bpb-plan-usage__plan", children: h.label }),
9279
9298
  /* @__PURE__ */ p("span", { className: "bpb-plan-usage__count", children: [
9280
9299
  ga(h.used, h.unit),
@@ -9294,14 +9313,14 @@ const Si = ({
9294
9313
  children: /* @__PURE__ */ o(
9295
9314
  "div",
9296
9315
  {
9297
- className: U("bpb-plan-usage__fill", `bpb-plan-usage__fill--${k}`),
9316
+ className: O("bpb-plan-usage__fill", `bpb-plan-usage__fill--${k}`),
9298
9317
  style: { width: `${x}%` }
9299
9318
  }
9300
9319
  )
9301
9320
  }
9302
9321
  ),
9303
9322
  D ? /* @__PURE__ */ p("p", { className: "bpb-plan-usage__status", children: [
9304
- /* @__PURE__ */ p("strong", { className: U("bpb-plan-usage__status-word", `bpb-plan-usage__status-word--${k}`), children: [
9323
+ /* @__PURE__ */ p("strong", { className: O("bpb-plan-usage__status-word", `bpb-plan-usage__status-word--${k}`), children: [
9305
9324
  D,
9306
9325
  "."
9307
9326
  ] }),
@@ -9315,7 +9334,7 @@ const Si = ({
9315
9334
  ] }) : /* @__PURE__ */ p("div", { className: "bpb-plan-usage__head", children: [
9316
9335
  /* @__PURE__ */ o("span", { className: "bpb-plan-usage__plan", children: f ? se(f.name) : l("free") }),
9317
9336
  a && /* @__PURE__ */ o(sa, { size: 15, className: "bpb-plan-usage__chevron" })
9318
- ] }) }), R = U(
9337
+ ] }) }), R = O(
9319
9338
  "bpb-plan-usage bpb-scope",
9320
9339
  `bpb-plan-usage--${t}`,
9321
9340
  S && `bpb-plan-usage--${k}`,
@@ -9332,28 +9351,28 @@ const Si = ({
9332
9351
  block: s = !1,
9333
9352
  className: i
9334
9353
  }) => {
9335
- const { isOutdatedBilling: l, locale: d, analytics: c } = G(), { data: m } = la({ period: n, enabled: !l }), { data: u } = Fe({ enabled: !l }), { data: g } = ze(), [b, f] = K(!1), N = Ea(null), C = () => {
9336
- N.current && (clearTimeout(N.current), N.current = null);
9354
+ const { isOutdatedBilling: l, locale: d, analytics: c } = G(), { data: m } = la({ period: n, enabled: !l }), { data: u } = Fe({ enabled: !l }), { data: g } = ze(), [b, f] = K(!1), C = Ea(null), N = () => {
9355
+ C.current && (clearTimeout(C.current), C.current = null);
9337
9356
  };
9338
- Ce(() => C, []);
9357
+ Ce(() => N, []);
9339
9358
  const v = za(m), h = !l && v.length > 0, A = () => {
9340
- h && (C(), N.current = setTimeout(() => f(!0), Math.max(0, e)));
9359
+ h && (N(), C.current = setTimeout(() => f(!0), Math.max(0, e)));
9341
9360
  }, x = () => {
9342
- C(), f(!1);
9361
+ N(), f(!1);
9343
9362
  }, k = g == null ? void 0 : g.find((R) => R.id === (u == null ? void 0 : u.plan.current.planId)), S = k ? se(k.name) : "Free", w = u != null && u.plan.current.periodEnd ? $e(u.plan.current.periodEnd, d) : null, y = k ? ue(k) === "community" : !k, D = y ? v.find((R) => R.key === "conversation_sessions") : void 0, T = y && !!r, I = () => {
9344
9363
  c.capture(pe.UPGRADE_CTA_CLICKED, { source: "usage_popover" }), r == null || r();
9345
9364
  };
9346
9365
  return /* @__PURE__ */ p(
9347
9366
  "span",
9348
9367
  {
9349
- className: U("bpb-usage-pop bpb-scope", s && "bpb-usage-pop--block", i),
9368
+ className: O("bpb-usage-pop bpb-scope", s && "bpb-usage-pop--block", i),
9350
9369
  onMouseEnter: A,
9351
9370
  onMouseLeave: x,
9352
9371
  onFocus: A,
9353
9372
  onBlur: x,
9354
9373
  children: [
9355
9374
  a,
9356
- b && h && /* @__PURE__ */ p("span", { className: U("bpb-usage-pop__card", `bpb-usage-pop__card--${t}`), role: "tooltip", children: [
9375
+ b && h && /* @__PURE__ */ p("span", { className: O("bpb-usage-pop__card", `bpb-usage-pop__card--${t}`), role: "tooltip", children: [
9357
9376
  y ? /* @__PURE__ */ p("span", { className: "bpb-usage-pop__header", children: [
9358
9377
  /* @__PURE__ */ o("span", { className: "bpb-usage-pop__plan-name", children: "Free plan usage" }),
9359
9378
  D && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__subtitle", children: [
@@ -9390,7 +9409,7 @@ const Si = ({
9390
9409
  /* @__PURE__ */ o("span", { className: "bpb-usage-pop__bar", children: /* @__PURE__ */ o(
9391
9410
  "span",
9392
9411
  {
9393
- className: U("bpb-usage-pop__fill", `bpb-usage-pop__fill--${mt(R.pct)}`),
9412
+ className: O("bpb-usage-pop__fill", `bpb-usage-pop__fill--${mt(R.pct)}`),
9394
9413
  style: { width: `${E}%` }
9395
9414
  }
9396
9415
  ) })
@@ -9423,7 +9442,7 @@ const Si = ({
9423
9442
  const { isOutdatedBilling: d } = G(), { data: c } = la({ period: s, enabled: !d }), m = za(c);
9424
9443
  if (d || m.length === 0)
9425
9444
  return null;
9426
- const u = m[0], g = mt(u.pct), b = u.pct > 0 ? Math.max(5, u.pct) : 0, f = (a - e) / 2, N = 2 * Math.PI * f, C = N * (1 - b / 100), v = l["aria-label"] ?? `${Math.round(u.pct)}% of your ${u.label.toLowerCase()} used`, h = /* @__PURE__ */ p(ve, { children: [
9445
+ const u = m[0], g = mt(u.pct), b = u.pct > 0 ? Math.max(5, u.pct) : 0, f = (a - e) / 2, C = 2 * Math.PI * f, N = C * (1 - b / 100), v = l["aria-label"] ?? `${Math.round(u.pct)}% of your ${u.label.toLowerCase()} used`, h = /* @__PURE__ */ p(ve, { children: [
9427
9446
  /* @__PURE__ */ p("svg", { className: "bpb-usage-ring__svg", width: a, height: a, viewBox: `0 0 ${a} ${a}`, "aria-hidden": !0, children: [
9428
9447
  /* @__PURE__ */ o(
9429
9448
  "circle",
@@ -9439,15 +9458,15 @@ const Si = ({
9439
9458
  /* @__PURE__ */ o(
9440
9459
  "circle",
9441
9460
  {
9442
- className: U("bpb-usage-ring__arc", `bpb-usage-ring__arc--${g}`),
9461
+ className: O("bpb-usage-ring__arc", `bpb-usage-ring__arc--${g}`),
9443
9462
  cx: a / 2,
9444
9463
  cy: a / 2,
9445
9464
  r: f,
9446
9465
  fill: "none",
9447
9466
  strokeWidth: e,
9448
9467
  strokeLinecap: "round",
9449
- strokeDasharray: N,
9450
- strokeDashoffset: C,
9468
+ strokeDasharray: C,
9469
+ strokeDashoffset: N,
9451
9470
  transform: `rotate(-90 ${a / 2} ${a / 2})`
9452
9471
  }
9453
9472
  )
@@ -9456,7 +9475,7 @@ const Si = ({
9456
9475
  Math.round(u.pct),
9457
9476
  "%"
9458
9477
  ] })
9459
- ] }), A = U("bpb-usage-ring", n && "bpb-usage-ring--clickable");
9478
+ ] }), A = O("bpb-usage-ring", n && "bpb-usage-ring--clickable");
9460
9479
  return /* @__PURE__ */ o(ii, { delay: r, period: s, className: i, children: n ? /* @__PURE__ */ o("button", { type: "button", className: A, onClick: n, "aria-label": v, children: h }) : /* @__PURE__ */ o("span", { className: A, tabIndex: 0, role: "img", "aria-label": v, children: h }) });
9461
9480
  };
9462
9481
  export {
@@ -9526,7 +9545,7 @@ export {
9526
9545
  yo as addonLimitsPreview,
9527
9546
  tt as addonPrice,
9528
9547
  me as billingKeys,
9529
- U as cn,
9548
+ O as cn,
9530
9549
  nt as conversationPackPrice,
9531
9550
  fo as conversationsAddon,
9532
9551
  _a as currencySymbol,